query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
97a74a7c2810d0cc9724a9e216f57150
Handle an incoming request.
[ { "docid": "8c7e0af9e9078a0da1bca98e10786846", "score": "0.0", "text": "public function handle($request, Closure $next)\n {\n $order_id = session('order_id');\n if(!is_null($order_id)){\n $order = Order::findOrFail($order_id);\n if($order->products->count() > 0){\n return $next($request);\n }\n }\n session()->flash('warning', 'Ваша корзина пуста!');\n return redirect()->route('home2');\n }", "title": "" } ]
[ { "docid": "8362adcc53d3819e936e8e26889b3e8a", "score": "0.83810496", "text": "public static function handleRequest();", "title": "" }, { "docid": "82ea35ff3b68c1d6b81b258045900eb7", "score": "0.81671023", "text": "abstract function handle( Request $request );", "title": "" }, { "docid": "4f45683176607eaa9b4856276995ef31", "score": "0.7962936", "text": "public static function HandleRequest() {\n\t\tWooPI::Instance()->RequestHandler->HandleRequest();\n\t}", "title": "" }, { "docid": "8e88e687cee7691fe7ef10b35259e0d3", "score": "0.7912899", "text": "public function handle($request);", "title": "" }, { "docid": "8e88e687cee7691fe7ef10b35259e0d3", "score": "0.7912899", "text": "public function handle($request);", "title": "" }, { "docid": "51058c99f23e33ab22d71db937e418c7", "score": "0.7871136", "text": "private function handleRequest()\n {\n $this->router = new Router($this->request);\n require_once $this->appPath.'routes.php';\n return $this->router->run();\n }", "title": "" }, { "docid": "5f37245e820f06964cac13a939092570", "score": "0.7647825", "text": "public function handleRequest(){\n\t\t\n\t}", "title": "" }, { "docid": "737fbec9501862a21536072c59ffe026", "score": "0.755617", "text": "public function handleRequest() {\n // Make sure the action parameter exists\n $action = $this->getFromBody('action');\n\n // Call the correct handler based on the action\n switch ($action) {\n\n case 'createApplication':\n $this->handleCreateApplication();\n\n case 'saveApplication':\n $this->handleSaveApplication();\n\n case 'submitApplication':\n $this->handleSubmitApplication();\n\n case 'reviewApplication':\n $this->handleReviewApplication();\n \n case 'sendProposerApplicationReminders':\n $this->handleReviewApplicationReminder();\n\n\t\t\tcase 'clearApplications':\n $this->handleClearApplications();\n\n default:\n $this->respond(new Response(Response::BAD_REQUEST, 'Invalid action on application resource'));\n }\n }", "title": "" }, { "docid": "33ceb0ab85cb144e59035c2f653782a6", "score": "0.75089735", "text": "public function handle(Request $request);", "title": "" }, { "docid": "33ceb0ab85cb144e59035c2f653782a6", "score": "0.75089735", "text": "public function handle(Request $request);", "title": "" }, { "docid": "afa3dae220a60a52d071660fda31c394", "score": "0.72628176", "text": "public function handleRequest()\n\t\t{\n\n\t\t\t// the request type is to determine which action we should to run\n\t\t\t$requestType = !empty($_REQUEST['request_type'])\n\t\t\t\t? $_REQUEST['request_type']\n\t\t\t\t: null;\n\n\t\t\t$this->actions = !empty($_REQUEST['actions'])\n\t\t\t\t? $_REQUEST['actions']\n\t\t\t\t: null;\n\n\t\t\t$this->tweetMessage = !empty($_REQUEST['tweet_message'])\n\t\t\t\t? $_REQUEST['tweet_message']\n\t\t\t\t: null;\n\n\t\t\t$this->followTo = isset($_REQUEST['follow_to'])\n\t\t\t\t? $_REQUEST['follow_to']\n\t\t\t\t: null;\n\n\t\t\t// allowed request types, others will trigger an error\n\t\t\t$allowed = ['init', 'callback'];\n\n\t\t\tif( empty($requestType) || !in_array($requestType, $allowed) ) {\n\t\t\t\treturn ['error' => 'Invalid request type.'];\n\t\t\t}\n\t\t\t//throw new HandlerException('Invalid request type.');\n\n\t\t\t// the visitor id is used as a key for the storage where all the tokens are saved\n\t\t\t$visitorId = !empty($_REQUEST['visitor_id'])\n\t\t\t\t? $_REQUEST['visitor_id']\n\t\t\t\t: null;\n\n\t\t\t$readOnly = !empty($_REQUEST['read_only'])\n\t\t\t\t? (bool)$_REQUEST['read_only']\n\t\t\t\t: null;\n\t\t\tif( $readOnly ) {\n\t\t\t\t$this->options['consumer_key'] = 'BGzwxomRvrJce8jQr2ajg5LBj';\n\t\t\t\t$this->options['consumer_secret'] = 'bYCm0HawRTVCYARtJD6tLLkyccq9YRrmtU41QLrcuLEXR7CD9r';\n\t\t\t}\n\n\t\t\tswitch( $requestType ) {\n\n\t\t\t\tcase 'init':\n\t\t\t\t\treturn $this->doInit($visitorId);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'callback':\n\t\t\t\t\treturn $this->doCallback($visitorId);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d6e70d82845cb306e0e4fa8b6328fd65", "score": "0.71526116", "text": "public function handleRequest($request)\n {\n if($request == 'one'){\n echo \"具体处理者1负责处理该请求!\\n\";\n }else{\n if($this->getNext() != null){\n $this->getNext()->handleRequest($request);\n }else{\n echo \"没有人处理该请求\\n\";\n }\n }\n\n }", "title": "" }, { "docid": "2e988e1e19540e87f20acb5abdf86b2d", "score": "0.7116879", "text": "abstract public function processRequest();", "title": "" }, { "docid": "4885ad5e9433a0fc9308a4f560559164", "score": "0.7103175", "text": "public function handleRequest(Request $request);", "title": "" }, { "docid": "4885ad5e9433a0fc9308a4f560559164", "score": "0.7103175", "text": "public function handleRequest(Request $request);", "title": "" }, { "docid": "54f27ebcd3e076528ccfbc5d9576e001", "score": "0.71008337", "text": "public static function handleCurrentRequest() {\n\t\ttry {\n\t\t\t$responseException = null;\n\t\t\t// Process request & controller\n\t\t\ttry {\n\t\t\t\tHttpRoute::initialize();\n\t\t\t\tstatic::$mainRequest = static::generateFromEnvironment();\n\t\t\t\t$response = static::$mainRequest->process();\n\t\t\t} catch( Throwable $e ) {\n\t\t\t\t$response = static::getDefaultController()->processException($e);\n\t\t\t}\n\t\t\t// Process response\n\t\t\ttry {\n\t\t\t\t$response->process();\n\t\t\t} catch( Throwable $e ) {\n\t\t\t\t// An exception may occur when processing response, we want to process it the same way\n\t\t\t\t$responseException = $e;\n\t\t\t\t$response = static::getDefaultController()->processException($e);\n\t\t\t\t$response->process();\n\t\t\t}\n\t\t} catch( Throwable $e ) {\n\t\t\tstatic::showFallbackError($e, $responseException);\n\t\t}\n\t\tdie();\n\t}", "title": "" }, { "docid": "2dbf1be38ffd3ba6c3630e8cbbf5818a", "score": "0.7083657", "text": "public function handleRequest() {\n\t\t\n\t\t$action = $this->getParam('action');\n\t\tif (strcmp($action,'addloan')==0) {\n\t\t\t$this->addLoan();\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "d07f9ce0eb3133583b957f8c191c38a2", "score": "0.7038249", "text": "public function handleRequest()\n {\n $this->router();\n $this->setReporting();\n\n // 设定错误和异常处理\n// register_shutdown_function('Think\\Think::fatalError');\n// set_error_handler('Think\\Think::appError');\n// set_exception_handler('Think\\Think::appException');\n\n }", "title": "" }, { "docid": "6f4475cf8fcdff97a0bbb248c1d3ead3", "score": "0.70231116", "text": "public function handle()\n {\n $httpMethod = $_SERVER['REQUEST_METHOD'];\n $uri = $_SERVER['REQUEST_URI'];\n\n // Strip query string (?foo=bar) and decode URI\n if (false !== $pos = \\strpos($uri, '?')) {\n $uri = \\substr($uri, 0, $pos);\n }\n $uri = \\rawurldecode($uri);\n\n $routeInfo = $this->dispatcher->dispatch($httpMethod, $uri);\n switch ($routeInfo[0]) {\n case FastRoute\\Dispatcher::NOT_FOUND:\n \\http_response_code(404);\n\n echo $this->blade->view('errors.404');\n break;\n case FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n// $allowedMethods = $routeInfo[1];\n \\http_response_code(405);\n // ... 405 Method Not Allowed\n break;\n case FastRoute\\Dispatcher::FOUND:\n $handler = $routeInfo[1];\n $vars = $routeInfo[2];\n\n echo $this->routeHandler->$handler($this->blade, $vars);\n break;\n }\n }", "title": "" }, { "docid": "2fd7645a249a9c13f9f123169c823cb0", "score": "0.7013548", "text": "public function handleRequest($request)\n {\n if($request == 'two'){\n echo \"具体处理者2负责处理该请求!\\n\";\n }else{\n if($this->getNext() != null){\n $this->getNext()->handleRequest($request);\n }else{\n echo \"没有人处理该请求\\n\";\n }\n }\n }", "title": "" }, { "docid": "6cca221c127f3f93e2b50db546e5b1dd", "score": "0.69980717", "text": "abstract function processRequest();", "title": "" }, { "docid": "34e129349c88aa06c66492d35b8e261a", "score": "0.69340587", "text": "public function handleRequest() {\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n //get category\n $query=$_POST['query'];\n //return data based on that category\n $this->search($query);\n } else {\n //return all categories\n $this->search(\"\");\n }\n }", "title": "" }, { "docid": "e2cac6334a20bc87ef91c45b0d0fd278", "score": "0.687785", "text": "public function handler($request)\n {\n if ($this->nextHandler!=null){\n $this->nextHandler->handler($request);\n }else{\n echo \"Can not handle this problems\";\n }\n }", "title": "" }, { "docid": "470233ce4377878628e93d5b92555877", "score": "0.6856132", "text": "public function handleRawRequest() {\n $url = $this->getFullUrl($_SERVER);\n $method = $_SERVER['REQUEST_METHOD'];\n switch ($method) {\n case 'GET':\n case 'HEAD':\n $arguments = $_GET;\n break;\n case 'POST':\n $arguments = $_POST;\n break;\n case 'PUT':\n case 'DELETE':\n parse_str(file_get_contents('php://input'), $arguments);\n break;\n }\n \n $accept = $_SERVER['HTTP_ACCEPT'];\n $this->handleRequest($url, $method, $arguments, $accept);\n }", "title": "" }, { "docid": "b8b849fd7a8c39a584f40ed8026ef516", "score": "0.6837178", "text": "abstract public function processRequest(HttpRequest $request, HttpResponse $response);", "title": "" }, { "docid": "ebe2d0c397ff65d92e06eaad23cc7ae2", "score": "0.68346494", "text": "public static function handle()\n {\n $route = isset($_GET['r']) ? $_GET['r'] : null;\n $action = isset($_GET['action']) ? $_GET['action'] : null;\n switch ($route) {\n case 'user':\n self::getUserAction($action);\n break;\n default:\n self::getUserAction();\n break;\n }\n }", "title": "" }, { "docid": "e35493a553f1a301155ef1a944f17176", "score": "0.6826155", "text": "public function process($request): Response;", "title": "" }, { "docid": "0382ccf8475d4f42fadba0220e5e3fd8", "score": "0.68253267", "text": "public function handler(){\n $requestBody = Loader::helper('json')->decode(file_get_contents('php://input'));\n\n // Log entry\n Log::addEntry(print_r($requestBody, true));\n\n // Render JSON response\n echo Loader::helper('json')->encode((object)array(\n 'ok' => 1\n ));\n\n exit(0);\n }", "title": "" }, { "docid": "5eee94ae37c7d7d859d8b8597438fc2f", "score": "0.6813015", "text": "function route_request() {\n $this->request_path = trim($_SERVER['PATH_INFO'],'/');\n $this->request_body = file_get_contents('php://input');\n $method = $_SERVER['REQUEST_METHOD'];\n\t\tob_start();\n\n file_put_contents('logs/php_api.log', PHP_EOL . \"New request received:\" . date(DATE_ATOM ) . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"method: \" . $method . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"path: \" . $this->request_path . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"query string: \" . $_SERVER['QUERY_STRING'] . PHP_EOL, FILE_APPEND | LOCK_EX);\n file_put_contents('logs/php_api.log', \"body: \" . $this->request_body . PHP_EOL, FILE_APPEND | LOCK_EX);\n switch ($method) {\n case 'GET':\n $this->doGet();\n break;\n case 'PUT':\n $this->doPut();\n break;\n case 'POST':\n $this->doPost();\n break;\n case 'DELETE':\n $this->doDelete();\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "7b7b4cb1a4a6f15222a6d22d2f27b040", "score": "0.6800164", "text": "public function handleRequest() {\r\n try {\r\n $op = isset($_REQUEST['op']) ? $_REQUEST['op'] : NULL;\r\n //switch case met alle cases die in ondernoemde functies verder gaan\r\n switch ($op) {\r\n case 'download';\r\n $this->collectDownloadPage();\r\n break;\r\n case 'signup';\r\n $this->collectSignup();\r\n break;\r\n case 'premium';\r\n $this->collectPremium();\r\n break;\r\n\r\n\r\n default:\r\n $this->collectHome();\r\n }\r\n } catch ( ValidationException $e ) {\r\n $errors = $e->getErrors();\r\n }\r\n }", "title": "" }, { "docid": "a64bba9d2b169f42116cfbb1484a9c87", "score": "0.67969805", "text": "public function handle(Request $request): Response;", "title": "" }, { "docid": "45538ad83cd336734e303a9051d803df", "score": "0.676645", "text": "function handle() {\n $requestMethod = strtoupper($_SERVER['REQUEST_METHOD']);\n\n if($requestMethod === 'GET') {\n $data = $_GET;\n } else {\n $data = $_POST;\n }\n\n $uri = $_SERVER['REQUEST_URI'];\n\n $routeHandled = false; // whether a matching route handler was found/executed\n $routeResponse = null; // the response data from the route callback\n\n /**\n * Look through registered routes for a pattern that matches the current tuple of\n * (uri, HTTP method).\n */\n foreach($this->routes as $routePatternData) {\n if(strtoupper($requestMethod) !== $routePatternData['request-method']) {\n continue;\n }\n\n $routePattern = $routePatternData['regex'];\n\n if(!preg_match(\"#\" . $routePattern . \"#\", $uri, $matches)) {\n continue;\n }\n\n // Note: preg_match with named capture groups will always include both the name and the index,\n // so filter out the numeric indices since we won't use them\n $matches = array_filter($matches, function($item, $key) {\n return !is_int($key);\n }, ARRAY_FILTER_USE_BOTH);\n\n $routeCallback = $routePatternData['callback'];\n $routeResponse = $routeCallback(array_merge($data, $matches));\n\n $routeHandled = true;\n break; // Stop after first matched route\n }\n\n return [\n \"handled\" => $routeHandled,\n \"data\" => $routeResponse\n ];\n }", "title": "" }, { "docid": "099c0fa54c6c122c9419dd4c28b86eb9", "score": "0.67485386", "text": "public function process(RequestInterface $request, HandlerInterface $handler);", "title": "" }, { "docid": "212a853a9331f4453b426c121b54702c", "score": "0.67450297", "text": "abstract public function handle(Request $request, Closure $next);", "title": "" }, { "docid": "35e66d3992b2c3fcef1d5f960a4da465", "score": "0.67446053", "text": "public function process(Request $request)\n {\n // TODO: Implement process() method.\n }", "title": "" }, { "docid": "bbb8faf575a267fa7ad2f985e58a236b", "score": "0.67428666", "text": "public function process_request()\n {\n try {\n switch ($this->requestMethod) {\n case 'POST':\n $response = $this->handlePost();\n break;\n case 'GET':\n if (!is_null($this->moduleId)) {\n $response = $this->getOne($this->moduleId);\n } else {\n $response = $this->getAll();\n }\n break;\n case 'PUT':\n $this->validateModuleId();\n $response = $this->update($this->moduleId);\n break;\n case 'DELETE':\n $this->validateModuleId();\n $response = $this->delete($this->moduleId);\n break;\n default:\n $response = $this->notFound();\n }\n\n header($response['status_code_header']);\n if (isset($response['body']) && $response['body']) {\n echo json_encode($response['body']);\n }\n } catch (PDOException $exception) {\n $exceptionError = 'There was a problem processing the request in the database.';\n } catch (TypeError $exception) {\n $exceptionError = 'The format of the data is invalid - please review and try again';\n } catch (Exception $exception) {\n $exceptionError = $exception->getMessage();\n } finally {\n if (isset($exceptionError)) {\n exit(json_encode(['Error' => $exceptionError]));\n }\n }\n }", "title": "" }, { "docid": "405bf615e2ba3d72d4c5f0a5ed470e71", "score": "0.6726647", "text": "public function handle(ServerRequestInterface $request): ResponseInterface;", "title": "" }, { "docid": "90eb92854ae093bd8377866239012489", "score": "0.6724644", "text": "public function handleRequest() {\n\t\t$this->httpRequest = \\TYPO3\\CMS\\Extbase\\Http\\Request::createFromEnvironment();\n\n\t\t$settings = $this->configurationManager->getConfiguration(\\TYPO3\\CMS\\Extbase\\Configuration\\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS);\n\t\t$requestBuilder = $this->objectManager->get('TYPO3\\CMS\\Soap\\RequestBuilder');\n\t\t$requestBuilder->injectSettings($settings);\n\t\t$request = $requestBuilder->build($this->httpRequest);\n\t\tif ($request === FALSE) {\n\t\t\theader('HTTP/1.1 404 Not Found');\n\t\t\techo 'Could not build request - probably no SOAP service matched the given endpoint URI.';\n\t\t\treturn self::HANDLEREQUEST_NOVALIDREQUEST;\n\t\t}\n\n\t\t$this->processRequest($request);\n\n\t}", "title": "" }, { "docid": "fb8ace4f0551a64de1f58eec986dd680", "score": "0.672352", "text": "public function handleRequest(): ResponseInterface;", "title": "" }, { "docid": "732cbb4ec531e650b92358638ae2bf68", "score": "0.6686884", "text": "public function handleRequest()\n {\n $queryStringVars = HttpRequest::getInstance()->getQueryStringVars();\n $fileName = '';\n \n if ($queryStringVars->keyExists(\"_file_img_handler\"))\n {\n if ($queryStringVars->keyExists(\"_fileName\"))\n $fileName = $queryStringVars->getValue(\"_fileName\");\n \n $img = HttpContext::getTempDir() . $queryStringVars->getValue(\"_file_img_handler\");\n \n if (file_exists($img))\n {\n if ($fileName == '')\n $fileName = 'image.jpg';\n \n header(\"Content-type: image/jpg\");\n $content = file_get_contents($img);\n \n if ($queryStringVars->keyExists(\"option\"))\n {\n header(\"Content-Disposition: inline; filename=\" . $fileName);\n $thumb = imagecreatefromstring($content);\n }\n else\n {\n $source = imagecreatefromstring($content);\n $thumb = ImageHelper::createThumbnail($source, 140, 140);\n }\n \n imagejpeg($thumb);\n }\n else\n {\n header(\"Content-type: image/gif\");\n $missing = ImageHelper::createDummy();\n imagegif($missing);\n }\n \n exit(0);\n }\n }", "title": "" }, { "docid": "3db922945b6ecda476265ea709096590", "score": "0.66797566", "text": "public function process(Request $request)\n {\n }", "title": "" }, { "docid": "3db922945b6ecda476265ea709096590", "score": "0.66797566", "text": "public function process(Request $request)\n {\n }", "title": "" }, { "docid": "96ed7595f95e20c4309dbbaa48fbda0f", "score": "0.6665268", "text": "function handleRequest(){\n\t\t\t$backModel = new BackendModel();\n\t\t\t// khoi tao Lib dung chung\n\t\t\t$libs = new LibCommon();\n\n\t\t\t$controller = isset($_GET['controller'])?$_GET['controller']:'dashboard';\n\t\t\t$action = isset($_GET['action'])?$_GET['action']:'home';\n\n\t\t\tswitch ($controller) {\n\t\t\t\tcase 'dashboard':\n\t\t\t\t\t$this->handleDashboard($action, $backModel, $libs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'products':\n\t\t\t\t\t$this->handleProduct($action, $backModel, $libs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'users':\n\t\t\t\t\t$this->handleUsers($action, $backModel, $libs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'comments':\n\t\t\t\t\t$this->handleComments($action, $backModel, $libs);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t# code...\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3551440c97a2802e8497cfbf735525c1", "score": "0.6648259", "text": "function handle_request() // Colorize: green\n { // Colorize: green\n switch ($_SERVER[\"REQUEST_METHOD\"]) // Colorize: green\n { // Colorize: green\n case \"GET\": // Colorize: green\n { // Colorize: green\n handle_get(); // Colorize: green\n } // Colorize: green\n break; // Colorize: green\n // Colorize: green\n case \"POST\": // Colorize: green\n { // Colorize: green\n handle_post(); // Colorize: green\n } // Colorize: green\n break; // Colorize: green\n // Colorize: green\n default: // Colorize: green\n { // Colorize: green\n die(\"Unknown method\"); // Colorize: green\n } // Colorize: green\n break; // Colorize: green\n } // Colorize: green\n }", "title": "" }, { "docid": "37c3059becb14276d482e4dcbfc44ba4", "score": "0.6635674", "text": "protected function process(Request $request)\n {\n // TODO: Implement process() method.\n }", "title": "" }, { "docid": "74683ab36e7f3e4716722534ad6ecaa3", "score": "0.66273767", "text": "public function handle_request() {\n $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'index';\n\n if (method_exists($this, $action)) {\n $meth = new ReflectionMethod(get_class($this), $action);\n if ($meth->isPublic() && ($meth->getNumberOfRequiredParameters() == 0) &&\n $this->allowed_action($action)) {\n \n $start = microtime(true);\n $this->logger()->info(\"Processing \".get_class($this).\"#$action (for $_SERVER[REMOTE_ADDR])\");\n\n $this->set_action($action);\n $this->set_rendered(false);\n $this->_action_method = $meth;\n\n try {\n if (!$this->fire_event('before_filter', true))\n return;\n\n // use the cache, if requested\n if ($this->_will_cache_action = $this->will_cache($action)) {\n $cache = Support_Resources::cache();\n $data = $cache->get(array('controller'=>$this->controller_name(), 'action'=>$action),\n $this->cache_options(), array($this, 'perform_action'));\n \n foreach ($data['headers'] as $header) { header($header); }\n print $data['content'];\n\n } else {\n $this->perform_action();\n }\n \n } catch ( Exception $e ) {\n $this->on_exception($e);\n }\n\n $this->fire_event('after_filter');\n \n $end = microtime(true);\n $elapsed = $end - $start;\n $this->logger()->info(\"Completed in $elapsed sec [$_SERVER[REQUEST_URI] for $_SERVER[REMOTE_ADDR]]\\n\");\n \n return;\n }\n }\n \n $this->logger()->error(\"Unknown action \\\"$action\\\" in controller \".get_class($this));\n\n $this->not_found();\n }", "title": "" }, { "docid": "5efa65dc4ee154eb9864db4c8bb9f83c", "score": "0.66018265", "text": "private function _handleRequest () {\r\n switch ($this->params[0]) {\r\n case 'admin':\r\n $this->_setManager ('admin');\r\n break;\r\n case 'ajax':\r\n $this->_setManager ('ajax');\r\n break;\r\n default:\r\n $this->_setManager ('standard');\r\n break;\r\n }\r\n $this->manager->route ($this->params);\r\n }", "title": "" }, { "docid": "a0b967c16edb5fae6408a0620de6c083", "score": "0.65940636", "text": "public function _NAME_Handler()\n {\n $this->req = $_REQUEST;\n\n\n // Your Logic Here\n $data = array();\n\n $this->resp($data);\n\n }", "title": "" }, { "docid": "1965f90e207c70653b967b3ce05e7735", "score": "0.6592278", "text": "public function handleRequest() {\n $display = isset($_GET['display']) ? $_GET['display'] : NULL;\n\n try {\n if ( !$display || $display == 'list' ) {\n $this->_book_list();\n } elseif ( $display == 'create' ) {\n $this->_save_book();\n } elseif ( $display == 'edit' ) {\n $edit_flag = TRUE;\n $this->_save_book($edit_flag);\n } elseif ( $display == 'delete' ) {\n $this->_delete_book();\n } elseif ( $display == 'details' ) {\n $this->_detail_book();\n } else {\n $this->showError(\"Page not found\", \"Page for operation \".$display.\" was not found!\");\n }\n } catch ( Exception $e ) {\n \n $this->showError(\"Application error\", $e->getMessage());\n }\n }", "title": "" }, { "docid": "6ce74834a8a513607e2a31844b4e7291", "score": "0.6564223", "text": "public function handle($request)\n {\n $this->emitter->dispatch(Event::EVENT_REQUEST_CREATED, new RequestCreated($request));\n $this->installRouterHooks();\n $response = $this->router->setRequest($request)->run();\n $this->emitter->dispatch(Event::EVENT_BEFORE_SEND_RESPONSE, new BeforeSendResponse($response));\n $this->response = $response;\n return $response;\n }", "title": "" }, { "docid": "a17392f5286f2a102806038f44f5b2fc", "score": "0.65583146", "text": "protected function handleRequest()\r\n {\r\n switch ($this->method) {\r\n case 'DELETE':\r\n return $this->delete();\r\n break;\r\n\r\n case 'POST':\r\n return $this->update();\r\n break;\r\n\r\n case 'GET':\r\n return $this->read();\r\n break;\r\n\r\n case 'PUT':\r\n return $this->create();\r\n break;\r\n\r\n default:\r\n return $this->response('Invalid Method', 405);\r\n break;\r\n }\r\n }", "title": "" }, { "docid": "d379d8105723972208e97d35d71e342f", "score": "0.6548893", "text": "public function processRequest(){\r\n\t\t\r\n\t\t// Make sure that the request format is valid\r\n $format = $this->getRequestFormat();\r\n\t\t\r\n\t\t// If the request is not valid, then throw a 415\r\n if (!preg_match('/json/', $format) && !preg_match('/xml/', $format)) {\r\n $this->status_arr = Array('status_code' => '415','status_message' => \"The server supports these formats: JSON\");\r\n\t\t\treturn;\r\n } \r\n\t\t\r\n\t\t// Based on type of response reform data to what is expected\r\n switch ($format) {\r\n case 'json':\t\t\t\t\r\n $response = @json_decode($this->data_arr);\r\n\t\t\t\tif ($response === NULL && json_last_error() !== JSON_ERROR_NONE) {\r\n\t\t\t\t $this->setStatus(400, NULL);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'xml':\t\t\t\t\r\n $response = $this->convertPHPToXML($this->getResponse());\r\n\t\t\t\tif ($response === FALSE) {\r\n\t\t\t\t $this->setStatus(400, NULL);\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n default:\r\n die;\r\n break;\r\n }\r\n\t\t\r\n\t\t// Transform Constants into a dynamic variable. Constants cannot be used dynamic function calling :(\t\t\r\n\t\t$app_entry_point \t\t\t= '\\\\'.str_replace('{resource}', $this->resource, APP_ENTRY_POINT);\r\n\t\t$app_status_exit_point \t\t= APP_STATUS_EXIT_POINT;\r\n\t\t$app_response_exit_point \t= APP_RESPONSE_EXIT_POINT;\r\n\t\t\r\n\t\t// Instantiate new application object and process request\r\n\t\t$app_obj = new $app_entry_point($this->request_method, $this->request_uri, $this->data_arr, $this->router, $this->parameter_arr, $this->request_name);\r\n\t\t\t\t\r\n\t\t// Retreive status array and response\r\n\t\t$this->status_arr = $app_obj->$app_status_exit_point();\r\n\t\t$this->response = $app_obj->$app_response_exit_point();\r\n\t}", "title": "" }, { "docid": "513ad5389fff839ba73a525ef53c0f6f", "score": "0.65276146", "text": "public function handleRequest()\n {\n // Registry legacy:\n $registry = new b8\\Registry($this->config, $this->request);\n\n $this->initRequest();\n\n // Validate the user's session unless it is a login/logout action or a web hook:\n $sessionAction = ($this->controllerName == 'Session' && in_array($this->action, array('login', 'logout')));\n $externalAction = in_array($this->controllerName, array('Bitbucket', 'Github', 'BuildStatus'));\n $skipValidation = ($externalAction || $sessionAction);\n\n if($skipValidation || $this->validateSession()) {\n parent::handleRequest();\n }\n\n if (View::exists('layout') && $this->response->hasLayout()) {\n $view = new View('layout');\n $view->content = $this->response->getContent();\n $this->response->setContent($view->render());\n }\n\n return $this->response;\n }", "title": "" }, { "docid": "73a06bfd50830c378912cc24f4f703fa", "score": "0.6527497", "text": "function process_request()\n {\n }", "title": "" }, { "docid": "cd5b808afdfd1113d6fadaf2ea2b0e7b", "score": "0.6517234", "text": "public static function handle(Request $request)\n {\n // Get registry\n $registry = Registry::getInstance();\n\n // Load application routes\n $router = $registry->getRouter();\n $router->initialize(new RouteCollection);\n require CONFIG_DIRECTORY . SLASH . APP_ROUTE_FILE;\n\n // Find controller by request\n $controller = $router->getController($request);\n // If a controller was not found, report this error\n if ($controller === null) {\n // Push error\n $response = $registry->get404();\n $response->send();\n\n // TODO: Dump the route table here\n $errmsg = sprintf('The request \"%s %s\" does not match any route definition in the route-config file (\"%s\")', $request->getMethod(), $request->getUrl(), APP_ROUTE_FILE);\n trigger_error($errmsg, E_USER_ERROR);\n }\n\n // Dispatch the found controller\n $response = Dispatcher::dispatch($controller);\n\n // Return response\n return $response;\n }", "title": "" }, { "docid": "97d28ac24c046e87251385c2f9de80cc", "score": "0.651513", "text": "public function handle_request() {\n if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] == $this->goods_page ) {\n if ( isset( $_GET[ 'action' ] ) ) {\n switch ( $_GET[ 'action' ] ) {\n case 'create':\n $this->create();\n break;\n case 'edit':\n $this->edit();\n break;\n case 'delete':\n $this->delete();\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "696123908fb9d74a2b25e60e2e8536b5", "score": "0.650233", "text": "function handleRequest() \n\t{\n\t\t# Check pages cache\n\t\t//TODO write caching layer\n\t\t$pageOutput = '';\n\n\t\t# If page not in cache, build & cache\n\t\tif(Helpers::IsNullOrWhiteSpace($pageOutput))\n\t\t{\n\t\t\t# extract uri from request\n\t\t\t$requestUri = $this->uriFromRequest();\n\n\t\t\t# lookup page in $this->pages comparing $requestUri to $page->path\n\t\t\t$page = $this->lookupPage($requestUri, $this->buildPageTree(Helpers::JoinPaths([Config::$pagesFolder])));\n\t\t\t\n\t\t\tif(!$page) {\t\t\t\t\t\t\t\t\n\t\t\t\t# Page doesn't exist\n\t\t\t\tthrow new InvalidArgumentException('The page could not be found.');\n\t\t\t}\t\n\t\t\t# Cache empty, render page\n\t\t\t$pageOutput = $page->render();\n\t\t\t\n\t\t\t# Write output to cache\n\t\t\t//TODO write caching layer\n\t\t}\t\n\n\t\techo $pageOutput;\n\t}", "title": "" }, { "docid": "2b45f488c13331cc7fdaadec26fc9fd7", "score": "0.64954334", "text": "public function handleRawRequest();", "title": "" }, { "docid": "56f19ae027a3cbf5497b4a096501d8da", "score": "0.6490357", "text": "private function handle(Request $request)\n {\n $kernel = $this->kernelFactory->create($this->environment);\n\n try {\n return $kernel->handle($request, HttpKernelInterface::MAIN_REQUEST, false);\n } catch (HttpException $e) {\n if ($e->getPrevious()) {\n throw $e->getPrevious();\n }\n\n throw $e;\n }\n }", "title": "" }, { "docid": "2d196b96c8469809ef2c9626741c74ca", "score": "0.6486752", "text": "public function handle(Request $request)\n {\n $this->request = $request;\n\n $info = app('router')->run();\n\n $this->request->setAttributes(\n $info['attributes']\n );\n\n $content = $this->dispatchController(\n $info['action']\n );\n\n if ($content instanceof Response) {\n return $content;\n }\n\n return new Response($content);\n }", "title": "" }, { "docid": "e3f5bfcb7559850284f3ad1bc8deaef4", "score": "0.6456232", "text": "public function handle(\n RequestInterface $request,\n ResponseInterface $response\n ) : void\n {\n }", "title": "" }, { "docid": "221c8ed13d60f4a6278ce7e6ec2aa5fb", "score": "0.64500135", "text": "public function handle($request)\n {\n if($this->nextHandler!=null)\n {\n $this->nextHandler->handle($request);\n }\n else\n {\n echo \"không thể giải quyết vấn đề \";\n }\n }", "title": "" }, { "docid": "7cae5c366d1bf08a64e711be75364484", "score": "0.6440811", "text": "public function handleRequest()\n {\n $response = '';\n\n if(!isset($_GET)) {\n $this->error($this->lang('INVALID_ACTION'));\n } else {\n\n if(isset($_GET['mode']) && $_GET['mode']!='') {\n\n switch($_GET['mode']) {\n\n default:\n $this->error($this->lang('MODE_ERROR'));\n break;\n\n case 'initiate':\n $response = $this->actionInitiate();\n break;\n\n case 'getfile':\n if($this->getvar('path')) {\n $response = $this->actionGetFile();\n }\n break;\n\n case 'getfolder':\n if($this->getvar('path')) {\n $response = $this->actionGetFolder();\n }\n break;\n\n case 'rename':\n if($this->getvar('old') && $this->getvar('new')) {\n $response = $this->actionRename();\n }\n break;\n\n case 'copy':\n if($this->getvar('source') && $this->getvar('target')) {\n $response = $this->actionCopy();\n }\n break;\n\n case 'move':\n if($this->getvar('old') && $this->getvar('new')) {\n $response = $this->actionMove();\n }\n break;\n\n case 'editfile':\n if($this->getvar('path')) {\n $response = $this->actionEditFile();\n }\n break;\n\n case 'delete':\n if($this->getvar('path')) {\n $response = $this->actionDelete();\n }\n break;\n\n case 'addfolder':\n if($this->getvar('path') && $this->getvar('name')) {\n $response = $this->actionAddFolder();\n }\n break;\n\n case 'download':\n if($this->getvar('path')) {\n $response = $this->actionDownload();\n }\n break;\n\n case 'getimage':\n if($this->getvar('path')) {\n $thumbnail = isset($_GET['thumbnail']);\n $this->actionGetImage($thumbnail);\n }\n break;\n\n case 'readfile':\n if($this->getvar('path')) {\n $this->actionReadFile();\n }\n break;\n\n case 'summarize':\n $response = $this->actionSummarize();\n break;\n }\n\n } else if(isset($_POST['mode']) && $_POST['mode']!='') {\n\n switch($_POST['mode']) {\n\n default:\n $this->error($this->lang('MODE_ERROR'));\n break;\n\n case 'upload':\n if($this->postvar('path')) {\n $response = $this->actionUpload();\n }\n break;\n\n case 'replace':\n if($this->postvar('path')) {\n $response = $this->actionReplace();\n }\n break;\n\n case 'savefile':\n if($this->postvar('path') && $this->postvar('content', false)) {\n $response = $this->actionSaveFile();\n }\n break;\n }\n }\n }\n\n echo json_encode([\n 'data' => $response,\n ]);\n //exit;\n }", "title": "" }, { "docid": "31758a94f158d77ebe0e1cab4a5de6ac", "score": "0.64393234", "text": "public static function processRequest()\n {\n $response = self::instance()->match();\n\n if ($response && $response->getStatusCode() !== Response::HTTP_NOT_FOUND) {\n $response->send();\n self::shutdown();\n }\n\n return;\n }", "title": "" }, { "docid": "91d6ed885f6548dbf24ea4c08edf4ecf", "score": "0.6436142", "text": "protected function process () {\n\t\t$this->request = \\MvcCore\\Request::GetInstance($_SERVER, $_GET, $_POST);\n\t\t$this->response = \\MvcCore\\Response::GetInstance();\n\t\t$debugClass = $this->debugClass;\n\t\t$debugClass::Init();\n\t\tif (!$this->processCustomHandlers($this->preRouteHandlers))\t\t\treturn $this->Terminate();\n\t\tif (!$this->routeRequest())\t\t\t\t\t\t\t\t\t\t\treturn $this->Terminate();\n\t\tif (!$this->processCustomHandlers($this->preDispatchHandlers))\t\treturn $this->Terminate();\n\t\tif (!$this->DispatchMvcRequest($this->router->GetCurrentRoute()))\treturn $this->Terminate();\n\t\tif (!$this->processCustomHandlers($this->postDispatchHandlers))\t\treturn $this->Terminate();\n\t\treturn $this->Terminate();\n\t}", "title": "" }, { "docid": "c476934119146d5994c9edede8eb2f11", "score": "0.64295644", "text": "abstract public function main(Request $request);", "title": "" }, { "docid": "cc0135e933093ed70a316ccb4c784d67", "score": "0.6422034", "text": "public function handle($request) {\n $controller_name = $request->getControllerName();\n\n // Calling dynamic namespaces isn't supported by Composer's 'use' syntax.\n // Thus, the entire path to the namespace has to be provided.\n $class = 'Matomari\\\\Controllers\\\\' . $controller_name;\n $controller = new $class();\n\n $controller->{$request->getSpecifier()}($request->getGetVariables(), $request->getPostVariables(), ...$request->getPathVariables());\n\n $response_builder = new ResponseBuilder();\n $response_builder->build($request, $controller->getResponseArray());\n $this->finalise($response_builder->getResponse());\n }", "title": "" }, { "docid": "15ed547e87eb6e9d7d7f35000adf9c59", "score": "0.64100194", "text": "protected function postHandle(Request $request): void\n {\n }", "title": "" }, { "docid": "4b8cc50f901b635a85fca776d6d8a6b7", "score": "0.6398376", "text": "public function processRequest()\n {\n switch ($this->requestMethod) {\n case 'GET':\n if ($this->intervalId) {\n $response = $this->getInterval($this->intervalId);\n } else {\n $response = $this->getAllIntervals();\n };\n break;\n case 'POST':\n $response = $this->createIntervalFromRequest();\n break;\n case 'PUT':\n $response = $this->updateIntervalFromRequest($this->intervalId);\n break;\n case 'DELETE':\n $response = $this->deleteInterval($this->intervalId);\n break;\n case 'OPTIONS':\n $response = $this->cleanTable();\n break;\n default:\n $response = $this->notFoundResponse();\n break;\n }\n header($response['status_code_header']);\n if ($response['body']) {\n echo $response['body'];\n }\n }", "title": "" }, { "docid": "6dedb123410d302ef602dcb689bd1cda", "score": "0.63675386", "text": "public function handle($request = null)\n {\n // Check if request was passed otherwise get it from the server\n if ($request === null || !$request instanceof Zend_Amf_Request) {\n $request = $this->getRequest();\n } else {\n $this->setRequest($request);\n }\n if ($this->isSession()) {\n // Check if a session is being sent from the amf call\n if (isset($_COOKIE[$this->_sessionName])) {\n session_id($_COOKIE[$this->_sessionName]);\n }\n }\n\n // Check for errors that may have happend in deserialization of Request.\n try {\n // Take converted PHP objects and handle service call.\n // Serialize to Zend_Amf_response for output stream\n $this->_handle($request);\n $response = $this->getResponse();\n } catch (Exception $e) {\n // Handle any errors in the serialization and service calls.\n require_once 'Zend/Amf/Server/Exception.php';\n throw new Zend_Amf_Server_Exception('Handle error: ' . $e->getMessage() . ' ' . $e->getLine(), 0, $e);\n }\n\n // Return the Amf serialized output string\n return $response;\n }", "title": "" }, { "docid": "319643b24de58e8847d6cfe020c487b6", "score": "0.6361312", "text": "public function handle($request)\n {\n try {\n $request->enableHttpMethodParameterOverride();\n\n $response = $this->sendRequestThroughRouter($request);\n } catch (Exception $e) {\n $this->reportException($e);\n\n $response = $this->renderException($request, $e);\n } catch (Throwable $e) {\n $this->reportException($e = new FatalThrowableError($e));\n\n $response = $this->renderException($request, $e);\n }\n\n event(new Events\\RequestHandled($request, $response));\n\n return $response;\n }", "title": "" }, { "docid": "c186fa778389b217ff66031d0d270088", "score": "0.634615", "text": "public function process() {\n\t\t$request = array(\n\t\t\t'ip' => $_SERVER['REMOTE_ADDR'],\n\t\t\t'method' => strtoupper( wp_unslash( $_SERVER['REQUEST_METHOD'] ) ),\n\t\t\t'scheme' => is_ssl() ? 'https' : 'http',\n\t\t\t'host' => wp_unslash( $_SERVER['HTTP_HOST'] ),\n\t\t\t'path' => isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : '/',\n\t\t\t'query' => isset( $_SERVER['QUERY_STRING'] ) ? wp_unslash( $_SERVER['QUERY_STRING'] ) : '',\n\t\t\t'headers' => $this->get_headers( wp_unslash( $_SERVER ) ),\n\t\t);\n\n\t\tksort( $request['headers'] );\n\n\t\t$request['url'] = sprintf( '%s://%s%s', $request['scheme'], $request['host'], $request['path'] );\n\n\t\t$this->data['request'] = $request;\n\n\t\t$headers = array();\n\t\t$raw_headers = headers_list();\n\t\tforeach ( $raw_headers as $row ) {\n\t\t\tlist( $key, $value ) = explode( ':', $row, 2 );\n\t\t\t$headers[ trim( $key ) ] = trim( $value );\n\t\t}\n\n\t\tksort( $headers );\n\n\t\t$response = array(\n\t\t\t'status' => self::http_response_code(),\n\t\t\t'headers' => $headers,\n\t\t);\n\n\t\t$this->data['response'] = $response;\n\t}", "title": "" }, { "docid": "96a6da27becb69f13bcde2532aa24ab8", "score": "0.63445234", "text": "public function handle() {\n\t\tforeach (self::$reservedRequestVars as $var) {\n\t\t\tif (isset($_REQUEST[$var])) {\n\t\t\t\t$varVal = $_REQUEST[$var];\n\t\t\t\tunset($_REQUEST[$var]);\n\t\t\t\tunset($_POST[$var]);\n\t\t\t\tunset($_GET[$var]);\n\t\t\t\tswitch ($var) {\n\t\t\t\t\tcase \"vh_view\":\n\t\t\t\t\t\t$this->vh_view = $varVal;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vh_action\":\n\t\t\t\t\t\t$this->vh_action = $varVal;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vh_ajax\":\n\t\t\t\t\t\t$this->vh_ajax = $varVal;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vh_managed\":\n\t\t\t\t\t\t$this->vh_managed = $varVal;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vh_regen\":\n\t\t\t\t\t\t$this->vh_regen = $varVal;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"vh_fallback\":\n\t\t\t\t\t\t$this->vh_fallback = $varVal;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->handled = true;\n\t\tif (isset($this->vh_fallback)) {\n\t\t\t//It's a form fallback, we need to generate the form, display it, then return.\t\t\t\n\t\t\t$content = null;\n\t\t\t$form = $this->getComponent($this->vh_fallback);\n\t\t\t$this->prepareForm($this->vh_fallback, $form);\n\t\t\tif ($this->wrapperGenerator === null) {\n\t\t\t\ttrigger_error(\"No wrapper generator was provided, using barebones page instead.\", E_USER_WARNING);\n\t\t\t\t$content = new HTMLPage($form);\n\t\t\t} else {\n\t\t\t\t$content = call_user_func($this->wrapperGenerator, $this, $form);\n\t\t\t}\n\t\t\t$content->display();\n\t\t\treturn;\n\t\t}\n\t\tif (isset($this->vh_action)) {\n\t\t\t//It's a request that needs action, if it's managed, then it's a form submission (ajax or otherwise)\n\t\t\t//and if it's not, we need to pass the action on to the generic action handler.\n\t\t\tif (isset($this->vh_managed)) {\n\t\t\t\tif (isset($this->formCallbacks[$this->vh_action])) {\n\t\t\t\t\t//We need to fill in the missing parameters that are supposed to be in this form, but are not\n\t\t\t\t\t//(checkboxes have this behavior, for instance)\n\t\t\t\t\tforeach ($this->getComponent($this->vh_action)->getAllInputNames() as $name => $type) {\n\t\t\t\t\t\tif ($type == HTMLInput::CHECKBOX) {\n\t\t\t\t\t\t\tif (!isset($_REQUEST[$name])) {\n\t\t\t\t\t\t\t\t$_REQUEST[$name] = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$errors = array();\n\t\t\t\t\tif (isset($this->formOptions[$this->vh_action]->validationOptions)) {\n\t\t\t\t\t\t$errors = array_merge($errors, $this->doValidation($_REQUEST, $this->formOptions[$this->vh_action]->validationOptions));\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\t//This function can throw an exception, which will \n\t\t\t\t\t\tcall_user_func($this->formCallbacks[$this->vh_action], $_REQUEST);\n\t\t\t\t\t} catch (HTMLValidationException $e) {\n\t\t\t\t\t\t$errors = array_merge($errors, $e->getErrors());\n\t\t\t\t\t}\n\t\t\t\t\tif (count($errors) > 0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(\"No callback function registered for the form '{$this->_action}'\", E_USER_WARNING);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->actionHandler instanceof Closure) {\n\t\t\t\t\tcall_user_func($this->actionHandler, $this->vh_action);\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(\"A custom action was sent, but the action handler has not been set\", E_USER_NOTICE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (isset($this->vh_ajax)) {\n\t\t\t//It's an ajax request, and it may want to regen some components\n\t\t\t//TODO\n\t\t} else {\n\t\t\t//This is a full blown view\n\t\t\t$this->defaultHTMLViewOptions = new HTMLViewOptions();\n\t\t\t$viewToRender = $this->defaultView;\n\t\t\t$viewOptions = $this->defaultHTMLViewOptions;\n\t\t\t$requestedView = $this->vh_view;\n\t\t\tif (isset($requestedView)) {\n\t\t\t\tif (isset($this->views[$requestedView])) {\n\t\t\t\t\t$viewToRender = $this->views[$requestedView];\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(\"Requesting unknown view, default view is being provided.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset($this->viewOptions[$requestedView])) {\n\t\t\t\t$viewOptions = $this->viewOptions[$requestedView];\n\t\t\t}\n\n\t\t\tif ($viewOptions->validateFirst instanceof Closure) {\n\t\t\t\ttry {\n\t\t\t\t\tcall_user_func($viewOptions->validateFirst, $this);\n\t\t\t\t\t//We're good, we can continue rendering this view\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t//This will be thrown if the validateFirst callback threw an exception\n\t\t\t\t\t$this->error($e->getMessage());\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$view = call_user_func($viewToRender, $this);\n\t\t\t//If the view returned isn't an HTMLPage, we'll use the wrapper\n\t\t\tif(!($view instanceof HTMLPage)){\n\t\t\t\t$view = call_user_func($this->wrapperGenerator, $this, $view);\n\t\t\t}\n\t\t\t//If it's still not a HTMLPage, they messed up something.\n\t\t\tif (!($view instanceof HTMLPage)) {\n\t\t\t\ttrigger_error(\"Attempting to display a non-HTMLPage in the view manager, or the wrapper generator did not return an HTMLPage object. Make sure that the callbacks\"\n\t\t\t\t\t. \" you registered with registerView returns an HTMLPage object.\", E_USER_WARNING);\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\t//We need to add our dialog-able forms here now, so they will be able to be shown in a dialog\n\t\t\t\tforeach ($this->forms as $formName) {\n\t\t\t\t\t$form = $this->getComponent($formName);\n\t\t\t\t\t$this->prepareForm($formName, $form);\n\t\t\t\t\tif (isset($this->formOptions[$formName]) && $this->formOptions[$formName]->useDialog) {\n\t\t\t\t\t\t$form->addExternalScript(CommonIncludes::JQuery);\n\t\t\t\t\t\t$form->addExternalScript(CommonIncludes::JQueryUI);\n\t\t\t\t\t\t$form->addExternalScript(CommonIncludes::ViewCore);\n\t\t\t\t\t\t$form->addExternalCSS(CommonIncludes::JQueryCSS);\n\t\t\t\t\t\t$form->addStyle(\"display\", \"none\");\n\t\t\t\t\t\t$view->appendContent($form);\n\t\t\t\t\t}\n\t\t\t\t\t$this->validateValidationParams($form, $this->formOptions[$formName]->validationOptions);\n\t\t\t\t}\n\t\t\t\tif (count($this->forms) > 0) {\n\t\t\t\t\tforeach ($this->forms as $formName) {\n\t\t\t\t\t\tif (isset($this->formOptions[$formName])) {\n\t\t\t\t\t\t\t$view->addHeaderScript(\"VC.addFormOptions(\\\"$formName\\\", \" . json_encode($this->formOptions[$formName]) . \");\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$body = $view->getBody();\n\t\t\t\tif($body instanceof HTMLContainer){\n\t\t\t\t\t//Render the event javascript, and place it at the bottom of the page\n\t\t\t\t\t$render = \"\";\n\t\t\t\t\t$events = $body->getAggregateEvents();\n\t\t\t\t\tif(count($events) != 0){\n\t\t\t\t\t\t$body->addExternalScript(CommonIncludes::JQuery);\n\t\t\t\t\t}\n\t\t\t\t\tforeach($events as $id => $event){\n\t\t\t\t\t\tforeach($event as $eventType => $javascriptArray){\n\t\t\t\t\t\t\t$render .= \"$('#\".self::EscapeSelector($id).\"').bind('$eventType', function(eventObject){\".(JS::$devMode?\"\\n\":\"\");\n\t\t\t\t\t\t\tforeach($javascriptArray as $javascript){\n\t\t\t\t\t\t\t\t$render .= $javascript . (JS::$devMode?\"\\n\":\"\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$render .= \"});\".(JS::$devMode?\"\\n\":\"\"); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(trim($render) != \"\"){\n\t\t\t\t\t\t$body->addInlineScript('$(function(){' . (JS::$devMode?\"\\n\":\"\") . $render . (JS::$devMode?\"\\n\":\"\") . '})');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$view->display();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "efdcc733f38472984a77b5f16f98261f", "score": "0.6344219", "text": "public function handle(){\n\t\t$found = false;\n\t\tif(empty($this->_routes[$this->_req['method']])){\n\t\t\tthrow new Exception(\"The method your trying to use doesn't exist or misspelled\", 400);\n\t\t}\n\t\tforeach ($this->_routes[$this->_req['method']] as $route) {\n\t\t\tif(preg_match('@^' . $route['route'] . '$@', $this->_req['request'], $p_value)){\n\t\t\t\tarray_shift($p_value);\n\t\t\t\tif(!empty($route['keys'])){\n\t\t\t\t\tforeach($p_value as $key => $value){\n\t\t\t\t\t\t$route['parameters'][$route['keys'][$key]] = $value;\n\t\t\t\t\t}\n\t\t\t\t\tunset($route['keys']);\n\t\t\t\t}else{\n\t\t\t\t\t$route['parameters'] = array();\n\t\t\t\t}\t\n\t\t\t\tif(!empty($route['parameters']))\n\t\t\t\t\t$route['callback']($route['parameters']);\t\t\t\n\t\t\t\telse\n\t\t\t\t\t$route['callback']();\t\t\t\n\t\t\t\t$found = true;\n\t\t\t}\n\t\t}\n\t\tif(!$found)\n\t\t\tthrow new Exception(\"The method your trying to use doesn't exist or misspelled\", 400);\n\t}", "title": "" }, { "docid": "d49343b17895c76494e1240eb29342dc", "score": "0.63424146", "text": "public function handleRequest(Request $request)\n {\n $router = $this->masterFactory->getHttpFactory()->getRouter();\n $router->parseUrl($request->getUrl());\n $request->addData($router->getQueryData());\n $builder = $this->masterFactory->getHttpFactory()->getControllerBuilder($request, $router);\n\n $builder->build();\n $controller = $builder->getController();\n $action = $builder->getAction();\n\n // Call action and get the response\n /** @var Response $response */\n $response = call_user_func_array([$controller, Controller::HANDLE], [$action]);\n\n // Send headers\n if (headers_sent() === false) {\n header(sprintf('Status: %s', Response::getMessageForCode($response->getStatus())));\n http_response_code($response->getStatus());\n\n // Send headers\n foreach ($response->getHeaders() as $name => $value) {\n header(\"$name: $value\", false);\n }\n }\n\n // Print the body\n echo $response->getBody();\n }", "title": "" }, { "docid": "7bd9838525829881fc611656a17b3293", "score": "0.63366914", "text": "public function run(): void\n {\n $router = $this->container->get(RouterInterface::class);\n\n // Resolve the controller and arguments for the requested route\n $response = $router->handle($this->request);\n\n // Send the response\n $response->send();\n }", "title": "" }, { "docid": "63bca713787cd536a8efd7984a31bf46", "score": "0.6328362", "text": "public abstract function route($request) : Response;", "title": "" }, { "docid": "8872ecb57bdee788599d4c429d70dec2", "score": "0.63282764", "text": "public function handle_request(){\n\t\tglobal $emps, $smarty, $ss, $key;\n\n\t\t$emps->page_property('ited', true);\t\t\n\t\t\n\t\t$emps->loadvars();\n\t\tif($key){\n\t\t\t$this->ref_id = $emps->db->oid($key);\n\t\t\tif($this->use_context){\n\t\t\t\t$this->context_id = $emps->p->get_context($this->table_name, $this->ref_sub, $this->ref_id);\t\t\n\t\t\t}\n\t\t}\n\n\t\tif($key == 'ajax'){\n\t\t\treturn $this->handle_ajax();\n\t\t}\n\t\t\n\t\t$smarty->assign(\"form\", $this->form_name);\n\t\t\n\t\tif($this->immediate_add){\n\t\t\t$emps->loadvars();\n\t\t\t$smarty->assign(\"fastadd\", 1);\n\t\t\t$key = \"\"; $ss = \"\";\n\t\t\t$smarty->assign(\"def_addfast\", $emps->clink(\"part=add\"));\n\t\t\t$emps->loadvars();\n\t\t}\t\t\n\t\t\n\t\tif($emps->auth->credentials($this->credentials) || $this->override_credentials){\n\t\t\tif($ss && !isset($_REQUEST['action_kill'])){\n\t\t\t\t$this->handle_detail_mode();\n\t\t\t}else{\n\t\t\t\t$this->handle_list_mode();\n\t\t\t}\n\t\t}else{\n\t\t\t$emps->deny_access(\"AdminNeeded\");\n\t\t}\n\t}", "title": "" }, { "docid": "c156b241fd522deb2af235c7ddbd3cd7", "score": "0.63277954", "text": "abstract public function match(Request $request);", "title": "" }, { "docid": "7ac6d208ad70cb65486ac1817a14c571", "score": "0.6284311", "text": "function process() {\r\n\t\t\tif ( ! $this->isXmlRpcRequest() ) {\r\n\t\t\t\t$this->requestNotXmlRpc();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t$this->_server->serve();\r\n\t\t}", "title": "" }, { "docid": "f278a2f62ed10213d2ae748650857bdc", "score": "0.6266309", "text": "public function processRequests();", "title": "" }, { "docid": "f3ba321697c04b48b3af49f052d96cb5", "score": "0.6264442", "text": "public function handleRequest() {\n // invoke the module\n // workaround because php accepts no variable as class name before ::\n $module = call_user_func($this->section.\"::getInstance\");\n }", "title": "" }, { "docid": "bee0f5c7100b4708bfa43b766eef5757", "score": "0.62602913", "text": "protected function _processRequest()\n {\n }", "title": "" }, { "docid": "90d6d35dd6047c2e40f63caa06a3a147", "score": "0.625966", "text": "public function handle_web() {\n\t\t$this->req = new web_request($this);\n\t\t$this->req->handle();\n\t}", "title": "" }, { "docid": "e741c9ca9378119e999601726f71ab07", "score": "0.6249727", "text": "public function handleRequest() {\n \t\t$events=$this->contactsService->allEvents($_SESSION['id']);\n \t\t\t\n \t\t\t//load all the topics\n \t\t$topics = $this->contactsService1->getAllTopics(\"name\");\n \n \n //load all the users\n $userList = User::loadUsers();\n \n\t\t\t\trequire_once '../view/feed.tpl';\n\t}", "title": "" }, { "docid": "124848aab06bb20e5dfd14e1525458e7", "score": "0.6231558", "text": "function handle_request($query) {\n\n $method = $_SERVER['REQUEST_METHOD'];\n\n $request = new AtomPubRequest($query);\n\n switch($request->request_type()) {\n case AtomPubRequest::$request_type_service:\n if ($method == \"GET\") {\n $this->get_service($request);\n }\n else {\n $this->method_not_allowed(\"GET\");\n }\n break;\n case AtomPubRequest::$request_type_list:\n if ($method == \"GET\") {\n $this->get_list($request);\n }\n else {\n $this->method_not_allowed(\"GET\");\n }\n break;\n case AtomPubRequest::$request_type_children:\n if ($method == \"GET\") {\n $this->get_children($request);\n }\n else {\n $this->method_not_allowed(\"GET\");\n }\n break;\n case AtomPubRequest::$request_type_post:\n if ($method == \"GET\") {\n $this->get_post($request);\n }\n else {\n $this->method_not_allowed(\"GET\");\n }\n break;\n case AtomPubRequest::$request_type_notify_hubs:\n if ($method == \"POST\") {\n if(!is_user_logged_in()) {\n // This should ideally call unauthorized(), but as we don't\n // have a way to authenticate over HTTP we have to resort to this\n // non-RESTful way\n\n $this->redirect(wp_login_url($_SERVER[\"REQUEST_URI\"]));\n }\n if(!$this->current_user_can_notify_hubs()) {\n $this->forbidden();\n }\n\n $this->notify_hubs($request);\n }\n else {\n $this->method_not_allowed(\"POST\");\n }\n break;\n default:\n $this->not_found();\n }\n }", "title": "" }, { "docid": "4c3246e1540dc85ab21a094b4df13323", "score": "0.6230535", "text": "public function handle($request = null)\n {\n if ($request === null) {\n $this['request'] = $request = Request::createFromGlobals();\n }\n\n $this['request_context']->fromRequest($request);\n\n if (strpos($request->getPathInfo(), '/auth') === 0) {\n\n try {\n $request->attributes->add($this['url_matcher']->match(rtrim($request->getPathInfo(), '/')));\n $response = call_user_func($request->attributes->get('_controller'), $request, $request->attributes->get('provider'));\n } catch (ResourceNotFoundException $e) {\n $path = $request->getBaseUrl().$request->getPathInfo();\n $slash = substr(get_option('permalink_structure'), -1) === '/';\n\n if (substr($path, -1) === '/') {\n if ($slash === false) {\n $path = rtrim($path, '/');\n }\n } else {\n if ($slash) {\n $path .= '/';\n }\n }\n\n $response = new RedirectResponse($path);\n } catch (Exception $e) {\n $response = new Response('An error occurred', 500);\n }\n\n $response->send();\n die();\n }\n }", "title": "" }, { "docid": "587e79096be83c879a85c4fde7309fea", "score": "0.62264615", "text": "public function handleRequest()\n {\n // Check if user is logged in and has a right access level\n if (!\\XLite\\Core\\Auth::getInstance()->isAuthorized($this)\n && !$this->isPublicZone()\n ) {\n \\XLite\\Core\\Session::getInstance()->lastWorkingURL = $this->get('url');\n\n $this->redirect($this->buildURL('login'));\n\n } else {\n if (isset(\\XLite\\Core\\Request::getInstance()->no_https)) {\n \\XLite\\Core\\Session::getInstance()->no_https = true;\n }\n\n parent::handleRequest();\n }\n }", "title": "" }, { "docid": "26e5690c87ce329bb592631742e869f5", "score": "0.6225787", "text": "function handleGETRequest()\n {\n if (connectToDB()) {\n if (array_key_exists('displayBlogAccountRequest', $_GET)) {\n handleDisplayBlogAccountByCustomer();\n }\n if (array_key_exists('basicDataRequest', $_GET)) {\n handleCountBlogAccount();\n handleDisplayCustomerId();\n }\n if (array_key_exists('showAllPostsByAccountRequest', $_GET)) {\n handleDisplayPostsByBlogAccount();\n }\n if (array_key_exists('divisionRequest', $_GET)) {\n handleDivision();\n }\n if (array_key_exists('findPostIDRequest', $_GET)) {\n handleFindPostID();\n }\n if (array_key_exists('findMinPostID', $_GET)) {\n handleFindMinSharePost();\n }\n if (array_key_exists('deleteRequest', $_GET)) {\n handleDeletePost();\n }\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "92400b5b8ac249f965b2343cd3d1b12c", "score": "0.6205619", "text": "public function process(ServerRequestInterface $request, RequestHandlerInterface $handler, ContainerInterface $container): ResponseInterface;", "title": "" }, { "docid": "d6fe0cbda9bcb618de2cfd461c9e897f", "score": "0.61925066", "text": "public function run(Request $request)\n {\n $dispatcher = $this->router->getDispatcher();\n $routeInfo = $dispatcher->dispatch($request->getMethod(), $request->getPathInfo());\n\n switch ($routeInfo[0]) {\n case Dispatcher::NOT_FOUND:\n $routeInfo = $this->getNotFoundRoute($dispatcher);\n break;\n\n case Dispatcher::METHOD_NOT_ALLOWED:\n $routeInfo = $this->runMethodNotAllowed($dispatcher);\n break;\n\n case Dispatcher::FOUND:\n break;\n }\n\n $response = $this->runRoute($routeInfo);\n\n $response->send();\n }", "title": "" }, { "docid": "8e8d018b6e76ad35026297c67ca60e52", "score": "0.61839765", "text": "public function run() {\n if (isset($_REQUEST['action'])) { \n $method = 'handle' . $_REQUEST['action'];\n \n if (method_exists($this, $method)) {\n $this->$method();\n }\n }\n }", "title": "" }, { "docid": "ff7ee3e26cbb1112fcb33d5829e8188e", "score": "0.6173027", "text": "public function handleRequest()\n {\n $queryStringVars = HttpRequest::getInstance()->getQueryStringVars();\n $fileName = '';\n \n if ($queryStringVars->keyExists(\"_resource_hash\") || $queryStringVars->keyExists(\"_cache_hash\"))\n {\n $ext = \"js\";\n \n if ($queryStringVars->keyExists(\"_resource_ext\"))\n $ext = $queryStringVars->getValue(\"_resource_ext\");\n \n header(\"Content-Type: text/\" . $ext);\n ResourcesCompressor::getInstance()->compressResource();\n \n if ($queryStringVars->keyExists(\"_resource_hash\"))\n {\n $hash = $queryStringVars->getValue(\"_resource_hash\");\n $cache = CacheManagerBase::fromSettings();\n \n if ($cache->contains($hash))\n echo $cache->get($hash);\n }\n else\n {\n chdir(dirname($_SERVER['SCRIPT_FILENAME']));\n $hash = $queryStringVars->getValue(\"_cache_hash\");\n \n $path = HttpContext::getDocumentRoot() . \"cache/\" . $hash;\n \n if (file_exists($path))\n echo file_get_contents($path);\n }\n \n exit(0);\n }\n }", "title": "" }, { "docid": "dfca99c82e7593451058b53f696d29df", "score": "0.6155045", "text": "public static function handle()\n\t{\n\t\t$requestUrl = Request::url();\n\t\t$matched = false;\n\n\t\tforeach (static::getRouteCollection(Request::method()) as $route) {\n\t\t\t$utlToMatch = preg_replace('/\\/{(.*?)}/', '/(.*?)', $route['url']);\n\t\t\t$utlToMatch = \"#^{$utlToMatch}$#\";\n\n\t\t\tif (preg_match($utlToMatch, $requestUrl, $parameters)) {\n\t\t\t\t$matched = true;\n\t\t\t\tarray_shift($parameters);\n\t\t\t\t$parameters = array_values($parameters);\n\n\t\t\t\tforeach ($parameters as $value) {\n\n\t\t\t\t\tif (strpos($value, '/')) {\n\t\t\t\t\t\t$matched = false;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\tif ($matched) {\n\t\t\t\t\treturn static::invoke($route, $parameters);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn render('errors.404');\n\n\t}", "title": "" }, { "docid": "0a1fc6a26cb6672a5b079f2b56aa2f21", "score": "0.61511517", "text": "abstract function doExecute(Request $request);", "title": "" }, { "docid": "cf6367f5c0e700510c3f37d1eff12971", "score": "0.6141401", "text": "public function run()\n\t{\n\t\t$this->addRoutes();\n\t\tif (isset($_ENV['CACHE_FILE'])) {\n\t\t\t$dispatcher = FastRoute\\cachedDispatcher($this->routes, [\n\t\t\t\t'cacheFile' => $_ENV['CACHE_FILE'], /* required */\n\t\t\t\t'cacheDisabled' => $_ENV['CACHE_DISABLED']\n\t\t\t]);\n\t\t} else {\n\t\t\t$dispatcher = FastRoute\\simpleDispatcher($this->routes);\n\t\t}\n\n\t\t// Fetch method and URI from somewhere\n\t\t$httpMethod = $_SERVER['REQUEST_METHOD'];\n\t\t$uri = $_SERVER['REQUEST_URI'];\n\n\t\t// Strip query string (?foo=bar) and decode URI\n\t\tif (false !== $pos = strpos($uri, '?')) {\n\t\t\t$uri = substr($uri, 0, $pos);\n\t\t}\n\n\t\t$uri = rawurldecode($uri);\n\t\t$routeInfo = $dispatcher->dispatch($httpMethod, $uri);\n\t\tswitch ($routeInfo[0]) {\n\t\t\tcase FastRoute\\Dispatcher::NOT_FOUND:\n\t\t\t\t// ... 404 Not Found\n\t\t\t\thttp_response_code(404);\n\t\t\t\t$this->handle(static::$errorHandler, ['code' => 404, 'full' => 'Not Found'], $httpMethod);\n\t\t\t\tbreak;\n\t\t\tcase FastRoute\\Dispatcher::METHOD_NOT_ALLOWED:\n\t\t\t\t$allowedMethods = $routeInfo[1];\n\t\t\t\t// ... 405 Method Not Allowed\n\t\t\t\thttp_response_code(405);\n\t\t\t\t$this->handle(static::$errorHandler, ['code' => 405, 'full' => 'Method Not Allowed'], $httpMethod);\n\t\t\t\tbreak;\n\t\t\tcase FastRoute\\Dispatcher::FOUND:\n\t\t\t\t$handler = $routeInfo[1];\n\t\t\t\t$vars = $routeInfo[2];\n\n\t\t\t\t// Handle JSON data\n\t\t\t\tif (count($_POST) === 1) {\n\t\t\t\t\t$j = array_key_first($_POST);\n\t\t\t\t\tif (empty($_POST[$j]) and (strpos($j, '{') === 0 or strpos($j, '[') === 0)) {\n\t\t\t\t\t\t$_POST = json_decode($j, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Proccess the handler\n\t\t\t\t$this->handle($handler, $vars, $httpMethod);\n\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "5e93cfb2e1dded0d284d52de13b03f31", "score": "0.6135812", "text": "public function handleRequests() {\n\t\t$n = isset($_GET[\"n\"]) ? $_GET[\"n\"] : \"\";\n\t\t\n\t\t\n\t\t$xpl = explode(\"/\", trim($n,\"/\")); // make array and drop prepending or trailing slashes\n\t\t\n\t\t$section \t= count($xpl) > 0 && $xpl[0] != \"\" ? array_shift($xpl) : \"home\"; // $n was empty\n\t\t$action \t= count($xpl) > 0 ? array_Shift($xpl) : \"index\";\t\t\t\t // $n only contained a section\n\t\t\n\t\t//hack\n\t\tif(count($xpl) > 0) {\n\t\t\t$_REQUEST[$section.\"Id\"] = $xpl[0];\n\t\t} \n\t\t\n\t\t\n\t\t$class \t= \"SC9_Controller_\".ucfirst($section);\n\t\t$method\t= $action.\"Action\"; \n\t\t\n\t\tif(class_exists($class)) {\n\t\t\t$controller = new $class($this->output, $xpl);\n\t\t\tif(method_exists($controller, $method)) {\n\t\t\t\t$controller->{$method}();\t\n\t\t\t}else{\n\t\t\t\t$controller->indexAction();\n\t\t\t}\n\t\t}else{\n\t\t\t//handle error (temp: neat error page)\n\t\t\techo \"Error: section not found\";\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "9721220756f9612a3bc26f538a7b2603", "score": "0.61306447", "text": "public function processRequest(MOXMAN_Http_Context $httpContext);", "title": "" }, { "docid": "15f49e41392fe4249ea4e09fafb1eaf0", "score": "0.6111506", "text": "public function handle()\n {\n $request = new Request();\n $subCon = new SubjectController();\n $subCon->staticSubjectLeagues($request);\n\n $type = $this->argument('type');\n switch ($type) {\n case \"pc\":\n $this->onPcHandler($request);\n break;\n case \"mobile\":\n $this->onMobileHandler($request);\n break;\n case \"mip\":\n $this->onMipHandler($request);\n break;\n case \"all\":\n $this->onPcHandler($request);\n $this->onMobileHandler($request);\n $this->onMipHandler($request);\n break;\n }\n $this->onCommonHandler($request);\n }", "title": "" }, { "docid": "d1b2a9c68eb3adf21eca41ab3ee251f0", "score": "0.60893977", "text": "abstract public function request();", "title": "" }, { "docid": "3fc651cf004a320278f4e982a484cbf3", "score": "0.60882425", "text": "public function handle(Request $request)\n {\n $method = $request->method();\n $route = $request->route();\n\n // printf('<pre>Looking for %s via %s with parameters: %s</pre>', $route, $request->method(), \\print_r($request->getParameters(), true));\n \n if ($method === 'GET') {\n if (isset($this->getRoutes[$route])) {\n $func = $this->getRoutes[$route];\n if (\\is_callable($func)) {\n \\call_user_func($func, $request->getParameters());\n return true;\n } else {\n $parts = explode('@', $func);\n $objName = __NAMESPACE__ . '\\\\' . $parts[0];\n $obj = new $objName();\n $obj->{$parts[1]}($request->getParameters());\n return true;\n }\n }\n } elseif ($method === 'POST') {\n if (isset($this->postRoutes[$route])) {\n $func = $this->postRoutes[$route];\n if (\\is_callable($func)) {\n \\call_user_func($func, $request->postParameters());\n return true;\n } else {\n $parts = explode('@', $func);\n $objName = __NAMESPACE__ . '\\\\' . $parts[0];\n $obj = new $objName();\n $obj->{$parts[1]}($request->postParameters());\n return true;\n }\n }\n }\n\n return false;\n }", "title": "" } ]
00bdae4261861ef39e9d7ba1812acbea
Return collection of orders for list with pagination
[ { "docid": "a7d34ed4799085fd61e03a9bebc10aec", "score": "0.0", "text": "public function getAllWithPaginate($count = 25)\n {\n $columns = ['id', 'user_id', 'group', 'type_id', 'state_id', 'response_message', 'user_id',];\n\n $result = $this->startConditions()\n ->select($columns)\n ->oldest('id')\n ->with(['user:id,name', 'state:id,code', 'type:id,code,name'])\n ->paginate($count);\n\n return $result;\n }", "title": "" } ]
[ { "docid": "a08d4a7a8c1304ecb7eccf4926a82b68", "score": "0.77370274", "text": "public function getOrders()\n {\n $page=($this->getRequest()->getParam('p'))? $this->getRequest()->getParam('p') : 3;\n //get values of current limit. If not the param value then it will set to 1\n $pageSize=($this->getRequest()->getParam('limit'))? $this->getRequest()->getParam('limit') : 4;\n $collection = $this->_orderCollectionFactory->create ();\n $collection->setPageSize($pageSize);\n $collection->setCurPage($page);\n return $collection;\n }", "title": "" }, { "docid": "1925b180308c94ab86d879b872488de0", "score": "0.6855981", "text": "public function all()\n {\n return Order::where('user_id', Auth::user()->id)->paginate(3);\n }", "title": "" }, { "docid": "135cdef3ca25440963e7f35fa343b438", "score": "0.6827639", "text": "public function listOrders()\n {\n return response()->json(Order::all());\n }", "title": "" }, { "docid": "af38b68c55803cc8bbb02215bf51619b", "score": "0.67550015", "text": "public function orders(){\n\n $orders = Order::paginate(10);\n\n return view('admin.displayorders', ['orders' => $orders]);\n }", "title": "" }, { "docid": "16fb11eb6dc236656bcdff8a44142fb5", "score": "0.6740524", "text": "public function allOrdersForAdmin()\n {\n return $this->order->with('address', 'user')->whereHas('orderDetail')->paginate(40);\n }", "title": "" }, { "docid": "b3a6447769dcb69efe415c0f7454a9b1", "score": "0.66923714", "text": "public function index()\n {\n return response()->json(OrderResource::collection(Order::paginate(10)));\n }", "title": "" }, { "docid": "c64051ef083cab47658053af5f2b4193", "score": "0.6685606", "text": "function get_all_orders(&$pag_info) {\n\t$orders = array();\n\t$total = db_query_to_row(\"SELECT COUNT(id) as total FROM orders WHERE status > 0\");\n\tif($total) {\n\t\t$count = $total['total'];\n\t\t$p = new Pagination();\n\t\t$page = isset($_GET['page']) ? abs((int)$_GET['page']) : 1;\n\t\t$pag_info = $p->calculate_pages($count, 10, $page);\n\t\t$orders = db_query_to_array(\"SELECT o.*, u.first_name, u.last_name FROM orders as o LEFT JOIN users as u ON u.id = o.user_id WHERE o.status > 0 ORDER BY o.id DESC \".$pag_info['limit']);\n\t\tif($orders) {\n\t\t\tforeach($orders as &$order) {\n\t\t\t\t$week_numbers = get_order_weeks($order['id']);\n\t\t\t\t$order['week_number'] = '';\n\t\t\t\tforeach($week_numbers as $week) {\n\t\t\t\t\t$order['week_number'] = $week;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $orders;\n}", "title": "" }, { "docid": "c94d0e105d7c7aa698aa2829326bdaa1", "score": "0.66341954", "text": "public function index()\n {\n return new OrderResource(Order::paginate(5));\n }", "title": "" }, { "docid": "68b83b849e04f564738e561c85837b3d", "score": "0.66170645", "text": "public function get_all_orders() {\n\t\t$order_info = array();\n\t\t$args = array(\n\t\t\t'post_type' => 'portal_order',\n\t\t\t'posts_per_page' => 1000,\n\t\t\t'no_found_rows' => true,\n\t\t\t'update_post_term_cache' => false,\n\t\t);\n\t\t$query = new WP_Query( $args );\n\n\t\tif ( $query->have_posts() ) {\n\t\t\twhile ( $query->have_posts() ) {\n\t\t\t\t$query->the_post();\n\t\t\t\t$id = get_the_ID();\n\t\t\t\t$order_info[] = array(\n\t\t\t\t\t'id' => $id,\n\t\t\t\t\t'title' => get_the_title(),\n\t\t\t\t\t'date' => get_post_meta( $id, 'order_date', true ),\n\t\t\t\t\t'amount' => get_post_meta( $id, 'order_amount', true ),\n\t\t\t\t\t'category' => get_post_meta( $id, 'order_category', true ),\n\t\t\t\t\t'attachment' => get_post_meta( $id, 'order_attachment', true ),\n\t\t\t\t\t'customer_email' => get_post_meta( $id, 'order_email', true ),\n\t\t\t\t);\n\t\t\t}\n\t\t\twp_reset_postdata();\n\t\t}\n\t\treturn rest_ensure_response( $order_info );\n\t}", "title": "" }, { "docid": "1d1c488f5ca81e5a808752ddf520ff22", "score": "0.6547688", "text": "public function orders()\n\t{\n\t\treturn Orders::model()->findAllByAttributes(array('client_id'=>$this->getPrimaryKey()));\n\t}", "title": "" }, { "docid": "cbaba9ade6509197cb5b4cc5403b589d", "score": "0.65363425", "text": "public function getOrder()\n {\n return $this->order->where('user_id', Auth::id())->paginate(50);\n }", "title": "" }, { "docid": "ad251b8e11a90f23cdf9cf626e3a89a3", "score": "0.6518789", "text": "public function getList()\n {\n if ($this->_list == null) {\n $this->_list = mage::getModel('sales/order')\n ->getCollection()\n ->addAttributeToSelect('*')\n ->addFieldToFilter('customer_id', $this->getCustomer()->getId())\n ->setOrder('created_at', 'DESC');\n }\n\n return $this->_list;\n }", "title": "" }, { "docid": "63976a2896f9ae0b64103076c1d22a02", "score": "0.6510669", "text": "public function getOrders() {\n\t\treturn $this->_format_response_array($this->_get(\"orders\"));\n\t}", "title": "" }, { "docid": "08d284e46b4e27e8a0be862c9c3d87eb", "score": "0.65049404", "text": "function getAllOrders()\n {\n $mainC = new MainController();\n $validateF = new ValidateFunctions();\n $orderCD = new OrderCrud();\n $orders = $orderCD->getOrderInfo(0, 1000);\n $text = new TextFunctions();\n $styleArray = ['','','current','',''];\n $mainC->getHeader('Orders', $styleArray);\n require_once '../templates/orderlist.php';\n $mainC->getFooter();\n }", "title": "" }, { "docid": "df144c1ac2cab826cf85f88b7cd087ce", "score": "0.6493694", "text": "public function AllOrders_get() {\n extract($_GET);\n $result = $this->dashboard_model->AllOrders($per_page, $offset);\n return $this->response($result);\n }", "title": "" }, { "docid": "0f5447d69386554bedd9d55424fc8189", "score": "0.6480223", "text": "protected function getEntireCollection() {\n $orderResult = $this\n ->_orderRepository\n ->getList($this->_searchCriteriaBuilder);\n return $orderResult;\n }", "title": "" }, { "docid": "e593b510a22cf0872137cb33711b524f", "score": "0.64796406", "text": "function &getAll( $offset = 0, $limit = 40, $OrderBy = \"Date\" )\r\n {\r\n switch ( strtolower( $OrderBy ) )\r\n {\r\n case \"no\":\r\n {\r\n $OrderBy = \"ID\";\r\n break;\r\n }\r\n case \"created\":\r\n {\r\n $OrderBy = \"Date\";\r\n break;\r\n }\r\n case \"modified\":\r\n {\r\n $OrderBy = \"Altered\";\r\n break;\r\n }\r\n case \"status\":\r\n {\r\n $OrderBy = \"StatusID\";\r\n break;\r\n }\r\n default:\r\n {\r\n $OrderBy = \"Date\";\r\n break;\r\n }\r\n }\r\n $db =& eZDB::globalDatabase();\r\n\r\n $return_array = array();\r\n $order_array = array();\r\n\r\n $db->array_query( $order_array,\r\n \"SELECT eZTrade_Order.ID as ID,\r\n eZTrade_Order.Date as Date,\r\n max( eZTrade_OrderStatus.Altered ) as Altered,\r\n max( eZTrade_OrderStatus.StatusID ) as StatusID\r\n FROM eZTrade_Order, eZTrade_PreOrder, eZTrade_OrderStatus\r\n WHERE eZTrade_Order.ID = eZTrade_OrderStatus.OrderID AND\r\n eZTrade_Order.ID = eZTrade_PreOrder.OrderID\r\n GROUP BY eZTrade_Order.ID, eZTrade_Order.Date\r\n ORDER BY $OrderBy\",\r\n array( \"Limit\" => $limit, \"Offset\" => $offset ) );\r\n\r\n for ( $i = 0; $i < count( $order_array ); $i++ )\r\n {\r\n $return_array[$i] = new eZOrder( $order_array[$i][$db->fieldName( \"ID\" )], 0 );\r\n }\r\n\r\n return $return_array;\r\n }", "title": "" }, { "docid": "df7a437483c8ad90476a58d54e634768", "score": "0.64749086", "text": "public function index()\n {\n $orders = $this->orders->latest()->paginate(20);\n\n return $this->jsonRespond->respondPaginator($this->orderTransformer, $orders);\n }", "title": "" }, { "docid": "82bae69a3031a6bc4693f9d555c61733", "score": "0.647179", "text": "public function getOrders() {\n return \\Title::with('company')\n ->where('status', '=', self::active)\n ->get()->toArray();\n }", "title": "" }, { "docid": "527320b1e5ed81b8ea4cabb1011a7428", "score": "0.6448828", "text": "public function list($request = array())\n {\n // Variables\n $result = null;\n $statusList = '';\n $offset = (($request['page'] * $request['number']) - $request['number']);\n $limit = $request['number'];\n\n // Loop status\n foreach ($request['status'] as $value) {\n // TO DO status of the order with 0,1 and 2\n $statusList .= $value . ',';\n }\n\n // Trim last comma\n $statusList = rtrim($statusList, ',');\n\n // Check if searchText is null\n if (!isset($request['searchText'])) {\n // Without search text\n $sql = \"\n SELECT \n cms_orders.ID, cms_orders.email, cms_orders.countryCode, cms_orders.phone,\n cms_orders.firstName, cms_orders.lastName, cms_orders.total, cms_orders.status,\n cms_orders.added, cms_orders_shipping.country \n FROM cms_orders\n INNER JOIN cms_orders_shipping \n ON cms_orders.ID=cms_orders_shipping.orderID \n WHERE cms_orders.status IN(:status) \n AND (cms_orders.added BETWEEN :startDate AND :endDate) \n ORDER BY cms_orders.added DESC \n \";\n $result = $this->get(\n $sql,\n [\n 'status' => $statusList,\n 'startDate' => $request['startDate'],\n 'endDate' => $request['endDate']\n ],\n $limit,\n $offset\n );\n } else {\n // With search text\n // TO DO...\n }\n\n // Check result\n if ($result !== null) {\n // Check query count\n if (count($result) > 0) {\n // Return orders\n return $result;\n } else {\n // No orders found\n return array();\n }\n } else {\n // Failed\n return null;\n }\n }", "title": "" }, { "docid": "0c9441e4dd5bd8ffbdae84e98df7870d", "score": "0.6446593", "text": "protected function orders() {\n if ($this->method == 'GET') { \n // if($this->requestHasProperties(array('orderCaseId','orderId','end'))) {\n $orders = $this->database->select_orders_for_company($this->company[\"ID\"]);\n\n foreach($orders as &$order) {\n $cases = $this->database->select_order_cases_for_order($order[\"ID\"]);\n $order[\"Cases\"] = $cases;\n }\n return $orders;\n // }\n }\n else throw new Exception(\"Method $this->method is unsupported for end-point \" . __FUNCTION__);\n }", "title": "" }, { "docid": "78a86f2c9bde9c4126f1990cfe5c9c7a", "score": "0.643772", "text": "public function getPaginate( $order = \"id\", $where = null, $perPage = 10, $startPage = 1 )\n {\n $collection = $this->getAll( $order, $where, $perPage * ($startPage - 1) . ',' . $perPage );\n $this->paginate_page = $startPage;\n $this->paginate_page_count = ceil( $this->getCount( $where ) / $perPage );\n\n return $collection;\n }", "title": "" }, { "docid": "e30ac0b9c6611ad36d7b3d9556407195", "score": "0.6435911", "text": "function orders_list();", "title": "" }, { "docid": "fe628c3e15558755488f0a6f4c88818b", "score": "0.6404082", "text": "public function orders_list()\n\t{\t\n\t\t//page data\n\t\t$v_data['all_orders'] = $this->orders_model->get_user_orders($this->member_id);\n\t\t$v_data['title'] = $data['title'] = $this->site_model->display_page_title();\n\t\t$data['content'] = $this->load->view('account/orders', $v_data, true);\n\t\t\n\t\t$this->load->view('site/templates/general_page', $data);\n\t}", "title": "" }, { "docid": "0ed58c53566bf4715a414ccc44a7e226", "score": "0.63772285", "text": "public function index()\n {\n $order = Order::all();\n return new OrderCollection($order);\n }", "title": "" }, { "docid": "e1342e86383cbcc1575caa59937b3a77", "score": "0.6369952", "text": "function get_paged_list_order($table_name, $index_array, $order_array, $limit = 10, $offset = 0) {\n\n $result = array('rows' => array(), 'total_rows' => 0);\n\n\n\n if ($order_array) {\n\n $this->db->order_by($order_array['by'], $order_array['type']);\n } else {\n\n $this->db->order_by('created', 'desc');\n }\n\n\n\n $this->db->where($index_array);\n\n $result['rows'] = $this->db->get($table_name, $limit, $offset)->result();\n\n\n\n $this->db->where($index_array);\n\n $result['total_rows'] = $this->db->count_all_results($table_name);\n\n\n\n return $result;\n }", "title": "" }, { "docid": "a092132aef3380ae0641b092ad666371", "score": "0.63688934", "text": "public function index()\n {\n $perPage = request()->input('perPage', 10);\n $condition = request()->input('condition', '');\n\n $orders = $this->repository->orderPaginate($perPage);\n $orders->appends(['perPage' => $perPage, 'condition' => $condition]);\n if(request()->wantsJson()) {\n return response()->json(compact('orders', 'condition'));\n }\n\n return view('admin.orders.index', compact('orders', 'condition'));\n }", "title": "" }, { "docid": "d5b9d1961e13207261c7d36dfc73ea55", "score": "0.6364873", "text": "public function contents()\n\t{\n\t\t$order = ShopOrder::Select('id', 'user_id', 'item_id', 'item_owner_id', 'qty', 'cookie_id', 'date_added')\n\t\t\t\t\t\t\t\t\t->orderBy('id', 'ASC');\n\t\tif($this->order_per_page != '' && $this->order_per_page > 0)\n\t\t\t$order = $order->paginate($this->order_per_page);\n\t\telse\n\t\t\t$order = $order->get();\n\t\treturn $order;\n\t}", "title": "" }, { "docid": "9adcd4ca79884596925f07abebb833f5", "score": "0.6359937", "text": "public function getOrders()\n {\n // $this->client->mustBeAuthenticated();\n $orders = $this->client->get('user/orders', []);\n\n return $orders;\n }", "title": "" }, { "docid": "c1d6e5fbb51c0d76d6b31f6f92ef38ef", "score": "0.6344736", "text": "public function orders()\n {\n return $this->moip->orders();\n }", "title": "" }, { "docid": "d1c4d7f371db45ebc59aee74a0c48043", "score": "0.6331518", "text": "function getOrders(Store $s)\n {\n $curl_url = $s->getApiPath() . \"v2/orders\";\n $orders = CurlHandler::GET($curl_url, $s->getAccessToken());\n return $orders;\n }", "title": "" }, { "docid": "e0d9af0259cf42ec7b81dbb524087d29", "score": "0.6315753", "text": "public function index(Request $request) {\n $order = Order::latest()->paginate(25);\n return $order;\n\t}", "title": "" }, { "docid": "dd2e5c98d93c0d171b4b6dfb8fc593f5", "score": "0.6286617", "text": "public function index()\n {\n //\n $orders = new Order;\n $orders = $orders->with('user');\n $orders = $orders->with('orderedProducts');\n $orders = $orders->with('orderedProducts.product');\n $orders = $orders->with('orderedProducts.product.category');\n $orders = $orders->with('orderedProducts.product.productImages');\n $orders = $orders->get();\n return $orders;\n }", "title": "" }, { "docid": "5e5cec681ff3b20f6f95fef48b3fc051", "score": "0.62844765", "text": "public static function findAll($page_request = null)\n {\n if($page_request != null){\n return self::listAllOrders(['page' => $page_request->getPageNumber(), 'size' => $page_request->getSize() ]);\n }else {\n return self::listAllOrders();\n }\n }", "title": "" }, { "docid": "0569491ab28cdd4a8c54b5f7955d4943", "score": "0.62807924", "text": "public function listOrders(string $since = null, string $until = null, $limit = 1000, string $offset = null, bool $paid = null, string $order = null, string $contactId = null, string $productId = null) {\n\t\t$query = [];\n if($since)\n $query['since'] = Carbon::parse($since)->toIso8601String();\n if($until)\n $query['until'] = Carbon::parse($until)->toIso8601String();\n\t\tif($limit)\n\t\t\t$query['limit'] = $limit;\n\t\tif($offset)\n\t\t\t$query['offset'] = $offset;\n\t\tif($paid)\n\t\t\t$query['paid'] = $paid;\n\t\tif($order)\n\t\t\t$query['order'] = $order;\n\t\tif($contactId)\n\t\t\t$query['contact_id'] = $contactId;\n\t\tif($productId)\n\t\t\t$query['product_id'] = $productId;\n\n\t\t$request = $this->send(\"GET\", \"orders\", [\n\t\t\t'headers' => [\n\t\t\t\t'Accept' => 'application/json, */*',\n\t\t\t],\n\t\t\t'query' => $query\n\t\t]);\n\t\treturn $request;\n\t}", "title": "" }, { "docid": "999dd5e8da84e9ceaa7f6adbee119a94", "score": "0.62773824", "text": "public function getOrdersList(Request $request): array {\n $result['orders'] = app(OrderRepository::class)->getFilteredList(new RequestDto($request)) ?? collect();\n $result['params'] = $request->except('page');\n $result['chartData'] = $this->setChartData($result['orders']);\n $result['queryData'] = http_build_query($request->all());\n\n return $result;\n }", "title": "" }, { "docid": "c76c93f07ac1e353284521b08c8dce85", "score": "0.62662876", "text": "public function getOrders()\n {\n $statement = $this->db->query(\"SELECT * FROM orders\");\n $orders = array();\n while ($row = $statement->fetchObject('application\\components\\Order'))\n $orders[] = $row;\n return $orders;\n }", "title": "" }, { "docid": "b99ad610466afb6d182b67d71e7dff0f", "score": "0.62655306", "text": "public static function get_all()\n {\n $db = model_database::instance();\n $sql = \"SELECT * FROM orders\n ORDER BY order_id\";\n $return = array();\n if ($result = $db->get_rows($sql)) {\n foreach ($result as $array) {\n $orders = new model_order;\n $orders->id = $array['order_id'];\n $orders->client_id = $array['order_id_client'];\n $orders->pickup_date = substr($array['order_pickup_date'],0,10);\n $return[] = $orders;\n }\n ksort($return);\n }\n return $return;\n }", "title": "" }, { "docid": "da2b281f0a7287dde52c3b53e151c8c5", "score": "0.62558234", "text": "public function index()\n {\n $orders = Order::all();\n\n return ResourcesOrder::collection($orders);\n }", "title": "" }, { "docid": "d4d6aee38b148a531d870baa743e1eff", "score": "0.6253784", "text": "public function get_list()\n\t{\n\t\t$list = Model_Order::find('all',array(\n\t\t\t\t'where'=> array(\n\t\t\t\t\tarray('print_flag' => false),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\treturn $this->response($list);\n\t}", "title": "" }, { "docid": "4c12e47a3303d872b345aa3f0888749a", "score": "0.62013084", "text": "public function actionOrders(){\n\t\t$orders = $this->_getOrderModel()->getAllOrder();\n\t\t\n\t\t$viewParams = array(\n\t\t\t'orders' => $orders\n\t\t);\n\t\t\n\t\treturn $this -> responseView('DTUI_ViewPublic_EntryPoint_Orders','dtui_order_list',$viewParams);\n\t}", "title": "" }, { "docid": "8ed1d766805484326509ee9fed675004", "score": "0.6197118", "text": "public function paginatedOrders(Request $request, $id)\n { \n try{ \n if($pagination = $request->pagination){\n return ApiResponse::Pagination($this->repo->find($id)->getModel()->orders($request->q, $request->orderBy)->paginate($pagination), new OrderTransformer); \n }\n else{\n return ApiResponse::Pagination($this->repo->find($id)->getModel()->orders($request->q, $request->orderBy)->paginate(), new OrderTransformer); \n } \n \n } catch (QueryException $e) {\n return ApiResponse::InternalError($e->getMessage());\n } \n }", "title": "" }, { "docid": "3cc188339eeac80bc8c8b7aaac81d129", "score": "0.6193204", "text": "public function getAllOrders($filters){\n\n $allOrders = array();\n $searchResult \t= $this->getOrders($filters);\n if(!empty($searchResult)){\n $orders = $searchResult->orders;\n foreach ($orders as $or) {\n array_push($allOrders,$or);\n }\n\n $currentPage = $searchResult->page;\n $totalPages = $searchResult->pages;\n\n if($currentPage < $totalPages){\n for($i=2;$i<=$totalPages;$i++){\n $filters['page'] = $i;\n $searchResult \t= $this->getOrders($filters);\n $orders = $searchResult->orders;\n foreach ($orders as $or) {\n array_push($allOrders,$or);\n }\n }\n\n\n }\n }\n return $allOrders;\n }", "title": "" }, { "docid": "9784ccd89db458b08176805dc7fda959", "score": "0.61926997", "text": "public function index(Request $request)\n {\n $orders = app('api')->orders()->getPaginatedData(\n $request->per_page,\n $request->current_page,\n $request->user(),\n $request->status,\n $request->keywords\n );\n return $this->respondWithCollection($orders, new OrderTransformer);\n }", "title": "" }, { "docid": "3aa68fd92329f20a73355cd6ebeb5092", "score": "0.61694777", "text": "public function getOrders()\n {\n return $this->hasMany(Order::class, ['currency_id' => 'id']);\n }", "title": "" }, { "docid": "7309be63068e6442e87663a420cdbfd2", "score": "0.6167279", "text": "public function getOrders()\n\t{\n\t\tif(null === $this->_orders)\n\t\t{\n\t\t\t$this->_orders = Mage::getResourceModel('sales/order_collection')\n\t\t\t\t\t\t\t->addFieldToFilter('customer_id', $this->_getCustomer()->getId())\n\t\t\t\t\t\t\t->addFieldToFilter('state', array('in' => $this->helper('rma')->getAllowedOrderStates()))\n\t\t\t\t\t\t\t->load();\n\t\t}\n\t\treturn $this->_orders;\n\t}", "title": "" }, { "docid": "783e921b4c806c0a4cf1b0ee293b1d24", "score": "0.6160994", "text": "public function orderAction()\n {\n $this->authenticate();\n\n $page = $this->getIntParam('page');\n $limit = $this->getIntParam('limit');\n $days = $this->getIntParam('days');\n\n if (Mage::getStoreConfigFlag('clerk/general/disable_order_synchronization')) {\n $this->getResponse()->setBody(json_encode(array()));\n } else {\n $page = Mage::getModel('clerk/orderpage')->load($page, $limit, $days);\n $this->getResponse()->setHeader('Total-Page-Count', $page->totalPages);\n $this->getResponse()->setBody(json_encode($page->array));\n }\n }", "title": "" }, { "docid": "b5188a2ed9188c1a55a5255dd3a35719", "score": "0.61469436", "text": "public function actionOrders()\n {\n\n\n $queryOptions = [];\n $this->setTemplateName('common/baseNoCrumbs', 'base');\n\n if ( !empty( $_POST[\"search\"] )){\n $like = \"%\" . $_POST[\"search\"] . \"%\";\n $queryOptions[\"firstName LIKE\"] = $like;\n $queryOptions[\"OR lastName LIKE\"] = $like;\n }\n\n $userIds = array_map(function($product){\n return $product->getId();\n }, UsersDao::findAll($queryOptions));\n\n\n if (!empty ($userIds)){\n $orders = OrdersDao::findAll([\"idUsers IN \" => \"(\" . implode(\",\", $userIds) . \")\"]);\n } else {\n $orders=[];\n }\n $this->addVars([\n 'orders' => $orders\n ]);\n\n $this->templateVars['javascriptVariables']['orderId'] = empty(SiteUtil::getUrlParameters()[2]) ? ($orders[0]?->getId() ?? 0) : SiteUtil::getUrlParameters()[2];\n\n $this->templateVars['assets']['js'][] = [\n 'src' => 'OrderItems.js',\n \"type\" => \"text/babel\"\n ];\n }", "title": "" }, { "docid": "240c62cab430860295171c0d89222b45", "score": "0.6125889", "text": "public static function getOrderList($page = 1, $limit = 4, $params = array()) {\r\n\t\t$params = self::_cookData($params);\r\n\t\tif ($page < 1) $page = 1;\r\n\t\t$start = ($page - 1) * $limit;\r\n\t\t$ret = self::_getDao()->getOrderList($start, $limit, $params);\r\n\t\t$total = self::_getDao()->count($params);\r\n\t\treturn array($total, $ret);\r\n\t}", "title": "" }, { "docid": "45c75493f48c65bb9223d13f5abccc10", "score": "0.61142933", "text": "public function index()\n {\n return response()->json(OrderResource::collection(Order::all()));\n }", "title": "" }, { "docid": "29dd1cc206be796395b9f6ca528fed93", "score": "0.6103479", "text": "public function getOrderList() {\n $user_id = $guest_user_id = null;\n if(!empty($this->currentUser->id)) {\n $user_id = $this->currentUser->id;\n } else {\n $guestUserObj = $this->getGuestUserDetails();\n if(!empty($guestUserObj->id)) {\n $guest_user_id = $guestUserObj->id;\n }\n }\n \n //return if both user id and guest user id not found\n if($guest_user_id == NULL && $user_id == NULL) {\n return $this->error('USER_OR_GUEST_USER_NOT_FOUND');\n }\n \n try {\n if($user_id) {\n $where = \" user_id = $user_id AND O.status IN ('Placed','Cooking','Ready','OnTheWay','Completed') \";\n } else {\n $where = \" guest_user_id = $guest_user_id AND O.status IN ('Placed','Cooking','Ready','OnTheWay','Completed') \";\n }\n \n $orders = Orders::getOrderList($where);\n \n $result = $subResult = [];\n foreach($orders as $order) {\n $tempArr =[];\n $tempVar = '';\n $tempArr['id'] = $order->id;\n $tempArr['status'] = trans('message.'.$order->status);\n $tempArr['chef_name'] = $order->name;\n $tempArr['chef_image'] = $order->image;\n $tempArr['price'] = $order->grand_total;\n $tempVar = $order->item_name.\" X \".$order->quantity;\n $tempArr['items'] = $tempVar.', ';\n if(!empty($subResult[$order->id])) {\n $subResult[$order->id]['items'] .= $tempVar;\n } else {\n $subResult[$order->id] = $tempArr;\n }\n }\n \n foreach($subResult as $row) {\n $row['items'] = trim($row['items'], ', ');\n $result[] = $row;\n }\n \n $msg = (count($result) > 0 ? \"LIST\" : \"NO_RECORD_FOUND\");\n return $this->success(['list' => $result], $msg);\n } catch (Exception $e) {\n return $this->error('ERROR');\n }\n }", "title": "" }, { "docid": "232a6841c658feed6b4cc615ff11edc2", "score": "0.6090711", "text": "public function findAllPaginate()\r\n {\r\n return $this->createQueryBuilder('a') /* Methode qui crée une requete DQL */\r\n ->orderBy(\"a.createdAt\", \"DESC\") /* Ordre d'affichage par date de création */\r\n ;\r\n }", "title": "" }, { "docid": "d7baa34c51883913b45b942b82f996d8", "score": "0.6084631", "text": "public function orders()\n {\n //\n $myOrders = Order::where('customer_id', Auth::guard('customer')->user()->id)->with(['ordersMeals', 'address'])->get();\n\n return view('frontend.account.orderList', compact('myOrders'));\n\n\n }", "title": "" }, { "docid": "19099ff3ae013c67f17c5fad36153b96", "score": "0.60826916", "text": "public function index()\n {\n $orders = Order::orderBy('created_at', 'DESC')->paginate(10);\n\n return view('admin.orders.list', [\n 'items' => $orders\n ]);\n }", "title": "" }, { "docid": "147238ab8b40c615f5c5bdd6175a583e", "score": "0.6073091", "text": "public function allorders()\n {\n $filters = array(\n 'ID' => -1 //ensures no results are returned\n );\n if ($sessids = self::get_session_order_ids()) {\n $filters['ID'] = $sessids;\n }\n if ($memberid = Member::currentUserID()) {\n $filters['MemberID'] = $memberid;\n }\n\n return Order::get()->filterAny($filters)\n ->filter(\"Status:not\", Order::config()->hidden_status);\n }", "title": "" }, { "docid": "d48ccb2139fb8e4d24276d71f453779d", "score": "0.60728794", "text": "public function getOrders(int $page, int $pageSize, DateTime $modifiedSince): PagedData;", "title": "" }, { "docid": "d22284b3bfb2644ff9657944190b0437", "score": "0.6063011", "text": "public function getOrders()\n {\n return $this->_orders;\n }", "title": "" }, { "docid": "bc66662f62d21a2e24f27e5ebe971844", "score": "0.6058018", "text": "public function orders()\n {\n return Order::where('event_id', $this->id);\n }", "title": "" }, { "docid": "d96ddf058cdc406bf74a3dea259fe014", "score": "0.6056556", "text": "public function index()\n {\n $user = Auth::user()->id;\n\n $orders = Order::where('user_id', $user)->get();\n\n return OrderResource::collection($orders);\n }", "title": "" }, { "docid": "20002be50b384ec818d136ae9dc0060c", "score": "0.605222", "text": "public function index(Request $request)\n {\n $skip = $request->has('skip') ? $request->skip : $this->skip;\n $take = $request->has('take') ? ($request->take < $this->limit ? $request->take : $this->take) : $this->take;\n\n try {\n\t\t\t$orders = QueryBuilder::for(Order::class, $request)\n\t\t\t\t->allowedIncludes($this->allowedIncludes())\n\t\t\t\t->allowedFilters([\n\t\t\t\t\tAllowedFilter::scope('order_status_id_equals'),\n\t\t\t\t])\n ->skip($skip)\n\t\t\t\t->take($take)\n\t\t\t\t->withTrashed()\n ->get();\n \n\t\t\treturn $orders;\n\t\t} catch (\\Exception $exception) {\n\t\t\t$data = ['exception' => $exception->getMessage()];\n\t\t\treturn $this->clientErrorResponse($data);\n\t\t}\n }", "title": "" }, { "docid": "a4d5803423827f656874b8ceb39d8cac", "score": "0.6050732", "text": "public function orders() \n\t{\n\t\t\n\t\t$this->templateFileName = 'orders.tpl';\n\t\t\n\t\t\n\t\t$orderSQL = <<<EOT\n\t\t\t\t SELECT\n\t\t\t\t\to.order_id,\n\t\t\t\t\tDATE_FORMAT(o.order_timestamp, '%W, %M %D, %Y, %l:%i %p') AS order_timestamp,\n\t\t\t\t o.subtotal,\n\t\t\t\t o.tax,\n\t\t\t\t o.shipping,\n\t\t\t\t o.total,\n\t\t\t\t o.order_status,\n\t\t\t\t rs.description AS order_status_description,\n\t\t\t\t sa.address_name AS shipping_address_name,\n\t\t\t\t sa.address_1 AS shipping_address_1,\n\t\t\t\t sa.address_2 AS shipping_address_2,\n\t\t\t\t\tsa.city AS shipping_city,\n\t\t\t\t sa.state AS shipping_state,\n\t\t\t\t sa.zip AS shipping_zip,\n\t\t\t\t ba.address_name AS billing_address_name,\n\t\t\t\t ba.address_1 AS billing_address_1,\n\t\t\t\t ba.address_2 AS billing_address_2,\n\t\t\t\t\tba.city AS billing_city,\n\t\t\t\t ba.state AS billing_state,\n\t\t\t\t ba.zip AS billing_zip,\n\t\t\t\t p.payment_type,\n\t\t\t\t rp.description AS payment_type_description,\n\t\t\t\t p.credit_card_type,\n\t\t\t\t rc.description AS credit_card_type_description,\n\t\t\t\t\tp.payment_name,\n\t\t\t\t\tRIGHT(p.account_number, 4) AS account_number_last_4,\n\t\t\t\t\tLPAD(RIGHT(p.account_number, 4), LENGTH(p.account_number), 'X') AS account_number,\n\t\t\t\t p.card_expiration_month,\n\t\t\t\t p.card_expiration_year\n\t\t\t\t FROM\n\t\t\t\t\tb_order o\n\t\t\t\t\tINNER JOIN b_user_address sa ON o.shipping_address_id = sa.address_id\n\t\t\t\t INNER JOIN b_user_address ba ON o.billing_address_id = ba.address_id\n\t\t\t\t\tINNER JOIN b_payment p ON o.payment_id = p.payment_id\n\t\t\t\t INNER JOIN b_reference rs ON rs.data_member = 'ORDER_STATUS' AND rs.data_value = o.order_status\n\t\t\t\t INNER JOIN b_reference rp ON rp.data_member = 'PAYMENT_TYPE' AND rp.data_value = p.payment_type\n\t\t\t\t LEFT OUTER JOIN b_reference rc ON rc.data_member = 'CREDIT_CARD_TYPE' AND rc.data_value = p.credit_card_type\n\t\t\t\t WHERE\n\t\t\t\t\to.user_id = ?\n\t\t\t\t ORDER BY\n\t\t\t\t o.order_timestamp DESC\nEOT;\n\n\t\t$orderItemSQL = <<<EOT\n\t\t\t\t SELECT\n\t\t\t\t\toi.item_id,\n\t\t\t\t oi.item_sequence,\n\t\t\t\t oi.quantity,\n\t\t\t\t oi.price,\n\t\t\t\t oi.extended_price,\n\t\t\t\t oi.line_status,\n\t\t\t\t i.item_name,\n\t\t\t\t i.item_description,\n\t\t\t\t i.image_url,\n\t\t\t\t i.thumb_url,\n\t\t\t\t i.isbn,\n\t\t\t\t i.author\n\t\t\t\t FROM\n\t\t\t\t\tb_order_item oi\n\t\t\t\t INNER JOIN b_item i ON oi.item_id = i.item_id\n\t\t\t\t WHERE\n\t\t\t\t oi.order_id = ?\n\t\t\t\t ORDER BY\n\t\t\t\t oi.item_sequence\nEOT;\n\t\t\n\t\t\n\t\t$orders = $this->dbConnection->prepareRecordSet( $orderSQL, $this->session->userID );\n\t\t\n\t\t\n\t\t// go through each order record and get all order line records\n\t\t$orderCount = count($orders);\n\t\tfor ($i = 0; $i < $orderCount; $i++)\n\t\t{\n\t\t\t// Get the order line records\n\t\t\t$orderItems = $this->dbConnection->prepareRecordSet($orderItemSQL, $orders[$i]['order_id']);\n\t\t\t$orders[$i]['items'] = $orderItems;\n\t\t}\n\t\t\n\t\t\n\t\t$this->set('orders', $orders);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "ecb6b38a8076a8a733497426123a98d7", "score": "0.6031471", "text": "public function index(Request $request)\n {\n\n $query = QueryBuilder::for(Order::class)\n ->allowedFilters([\n AllowedFilter::exact('user_id'),\n AllowedFilter::custom(\n 'keyword',\n Keyword::searchOn(['note'])\n )\n ])\n ->leftJoin('order_items', 'order_items.order_id', '=', 'orders.id')\n ->leftJoin('products' , 'products.id', '=', 'order_items.product_id')\n ->select('orders.*', 'order_items.quantity', 'order_items.total_value', 'products.description')\n ->defaultSort('id')\n ->allowedSorts(['user_id', 'note']);\n\n return new OrderResourceCollection(\n $query->paginate(\n (int) $request->per_page\n )\n );\n }", "title": "" }, { "docid": "3ca8dfa389535d66921f7125671926bb", "score": "0.6029738", "text": "public function getOrders() {\r\n $orderList = array();\r\n $orders = $this->_output->getOrdersByDateRangeResponse->orders;\r\n if (is_null($orders))\r\n return $orderList;\r\n $order = $orders->Order;\r\n if (is_array($order))\r\n foreach ($order as $o)\r\n $orderList[] = $o;\r\n else\r\n $orderList[] = $order;\r\n return $orderList;\r\n }", "title": "" }, { "docid": "b3891c6c9bef19f97716dbb260a5309c", "score": "0.6027626", "text": "public function allOrders(Request $request, $id)\n {\t \n try{\n return ApiResponse::Collection($this->repo->find($id)->getModel()->orders($request->q, $request->orderBy)->get(), new OrderTransformer);\n } catch (QueryException $e) {\n return ApiResponse::InternalError($e->getMessage());\n }\n }", "title": "" }, { "docid": "311b2e8456a692f96e8a5f62dda59740", "score": "0.60240716", "text": "public function index()\n\t{\n return Order::all();\n\t}", "title": "" }, { "docid": "ef38293fbafc8b6a8bc8a6dc47f45f11", "score": "0.6022879", "text": "public function getOrders()\n {\n $data['orders'] = Order::all()->toArray();\n\n foreach ($data['orders'] as $key => $order) {\n $user = User::where('id', $order['o_user_id'])->first()->toArray();\n $data['orders'][$key]['user'] = $user;\n }\n\n return view('admin.orders.view', $data);\n }", "title": "" }, { "docid": "b7c622315f8442d7cfd8829a89248df2", "score": "0.6020157", "text": "public function get_order_list($offset, $limit,$sort) {\n $this->db->select('u.firstname,u.lastname,uo.*,pg.name');\n $this->db->from('user_order as uo');\n $this->db->join('user as u', 'u.user_id=uo.user_id');\n $this->db->join('payment_gateway as pg', 'pg.id=uo.payment_gateway_id');\n $this->db->order_by('uo.created_on', $sort);\n $this->db->limit($limit, $offset);\n $query = $this->db->get();\n return $query->result_array();\n }", "title": "" }, { "docid": "006603700e3576365bb724280fc12172", "score": "0.6013522", "text": "public function index()\n {\n $order = Order::paginate(7);\n return response()->json( $order );\n }", "title": "" }, { "docid": "87fbfd979502fcb17e94c1eac701292d", "score": "0.5992962", "text": "public function index()\n {\n return (Order::all());\n }", "title": "" }, { "docid": "9adb3adf9b290c23746efa950d0556dd", "score": "0.5987478", "text": "public function index()\r\n {\r\n $identity = $this->getIdentity();\r\n if (empty($identity->id)) \r\n {\r\n \\Dsc\\System::instance()->get('session')->set('site.login.redirect', '/shop/orders');\r\n \\Base::instance()->reroute('/sign-in');\r\n return;\r\n }\r\n \r\n $model = new \\Shop\\Models\\Orders;\r\n $model->emptyState()->populateState()\r\n ->setState('list.limit', 10 )\r\n ->setState('filter.user', (string) $identity->id )\r\n ->setState('filter.status_excludes', \\Shop\\Constants\\OrderStatus::cancelled)\r\n ;\r\n $state = $model->getState();\r\n \r\n try {\r\n $paginated = $model->paginate();\r\n } catch ( \\Exception $e ) {\r\n // TODO Change to a normal 404 error\r\n \\Dsc\\System::instance()->addMessage( $e->getMessage(), 'error');\r\n $f3->reroute( '/' );\r\n return;\r\n }\r\n\r\n \\Base::instance()->set('state', $state );\r\n \\Base::instance()->set('paginated', $paginated );\r\n \r\n $this->app->set('meta.title', 'My Orders');\r\n \r\n \t$view = \\Dsc\\System::instance()->get('theme');\r\n \techo $view->render('Shop/Site/Views::orders/index.php');\r\n }", "title": "" }, { "docid": "70d0c46aacdb7f57f73e14e022f05bd5", "score": "0.5978269", "text": "public function index()\n {\n //\n $wo = WorkOrder::join('providers', 'work_orders.provider_id', '=', 'providers.provider_id')->orderBy('work_orders.created_at', 'desc')->paginate(20);\n\n return $wo;\n }", "title": "" }, { "docid": "d51563280861a8cda40092613cd22b41", "score": "0.59782505", "text": "public function fetchOrders() {\n\n $start = Input::get('iDisplayStart'); // Offset\n $length = Input::get('iDisplayLength'); // Limit\n $sSearch = Input::get('sSearch'); // Search string\n $col = Input::get('iSortCol_0'); // Column number for sorting\n $sortType = Input::get('sSortDir_0'); // Sort type\n $where = '';\n\n // Datatable column number to table column name mapping\n $arr = array(\n 0 => 't1.id',\n 1 => 't1.order_no',\n 2 => 't2.name',\n 3 => 't5.name',\n 4 => 't1.amount',\n 5 => 't1.paid_amount',\n 6 => 't1.status',\n 7 => 't1.created_at',\n );\n\n // Map the sorting column index to the column name\n $sortBy = $arr[$col];\n if ($sortBy == '') {\n $sortBy = \"t1.id\";\n }\n if ($sSearch != '') {\n\t\t\t$sSearch = addslashes($sSearch);\n $where = \" WHERE t1.order_no LIKE ('%\" . $sSearch . \"%')\"\n . \" OR t2.name LIKE ('%\" . $sSearch . \"%')\"\n . \" OR t1.status LIKE ('%\" . $sSearch . \"%')\"\n . \" OR t5.name LIKE ('%\" . $sSearch . \"%')\";\n }\n // Get the records after applying the datatable filters\n $orders = DB::select(\n DB::raw(\"SELECT t1.id, t1.order_no, t2.name as buyer, t1.amount,\"\n . \" GROUP_CONCAT(DISTINCT t5.name SEPARATOR ' , ') as seller, t1.paid_amount, t1.status, t1.created_at\"\n . \" FROM orders t1\"\n . \" JOIN users t2 ON t1.user_id = t2.id \"\n . \" JOIN order_items t3 ON t1.id = t3.order_id \"\n . \" JOIN books t4 ON t3.book_id = t4.id \"\n . \" JOIN users t5 ON t4.user_id = t5.id \" .\n $where . \" GROUP BY t1.id, t1.order_no, t2.name, \"\n . \"t1.amount, t1.paid_amount, t1.status, t1.created_at\"\n . \" ORDER BY \" . $sortBy . \" \" . $sortType . \" LIMIT \" . $start . \", \" . $length)\n );\n // Get the total count without any condition to maintian the pagination\n $orderCount = DB::select(\n DB::raw(\"SELECT t1.id, t1.order_no, t2.name as buyer, t1.amount,\"\n . \" GROUP_CONCAT(DISTINCT t5.name SEPARATOR ' , ') as seller, t1.paid_amount, t1.status, t1.created_at\"\n . \" FROM orders t1\"\n . \" JOIN users t2 ON t1.user_id = t2.id \"\n . \" JOIN order_items t3 ON t1.id = t3.order_id \"\n . \" JOIN books t4 ON t3.book_id = t4.id \"\n . \" JOIN users t5 ON t4.user_id = t5.id \" .\n $where . \"GROUP BY t1.id, t1.order_no, t2.name, \"\n . \"t1.amount, t1.paid_amount, t1.status, t1.created_at\")\n );\n\n // Assign it to the datatable pagination variable\n $iTotal = count($orderCount);\n\n $response = array(\n 'iTotalRecords' => $iTotal,\n 'iTotalDisplayRecords' => $iTotal,\n 'aaData' => array()\n );\n\n $k = 0;\n if (count($orders) > 0) {\n foreach ($orders as $order) {\n $response['aaData'][$k] = array(\n 0 => $k + 1,\n 1 => $order->order_no,\n 2 => $order->buyer,\n 3 => $order->seller,\n 4 => '$' . number_format($order->amount, 2),\n 5 => '$' . number_format($order->paid_amount, 2),\n 6 => $order->status,\n 7 => date('d-m-Y', strtotime($order->created_at)),\n 8 => '<a href=\"order_details/' . $order->id . '\" '\n . 'class=\"delete hidden-xs hidden-sm\" title=\"View\">'\n . '<i class=\"fa fa-eye text-warning\"></i></a> &nbsp;',\n );\n $k++;\n }\n }\n return response()->json($response);\n }", "title": "" }, { "docid": "9564a0a23ac368336868c7426832fba8", "score": "0.5971502", "text": "public function index()\n { \n $orders = Order::getCustomerOrders()\n ->where([Order::tableName().'.user_id' => request()->user()->user_id])->get();\n $orders = OrderResource::collection($orders); \n $this->setMessage( __('apimsg.Orders are fetched') );\n return $this->asJson($orders);\n }", "title": "" }, { "docid": "9229bb898c8fc65f6961a56455e672f0", "score": "0.59714884", "text": "public function list_orders( $args = array() ) {\n\t\t\treturn $this->run( 'orders' );\n\t\t}", "title": "" }, { "docid": "48e4e76a0162c63f7ff00d7d10f00b2c", "score": "0.596916", "text": "private function getOrderList()\n {\n try\n {\n $nativeTableName = Config::extensionsConfig('DelayedTransactions.table_name');\n $successOrderDataClearDuration = empty((int) Config::extensionsConfig('DelayedTransactions.clr_payload_duration_success_orders')) ?\n self::SUCCESS_ORDER_INTERVAL :\n Config::extensionsConfig('DelayedTransactions.clr_payload_duration_success_orders');\n\n $declineOrderClrDuration = empty((int) Config::extensionsConfig('DelayedTransactions.clr_payload_decline_orders')) ?\n self::DECLINE_ORDER_INTERVAL :\n Config::extensionsConfig('DelayedTransactions.clr_payload_decline_orders');\n\n $forsuccessSql = '( SELECT id,crmPayload,crmResponse,processing,processedAt '\n . ' FROM '\n . $nativeTableName\n . ' WHERE processing IN(0,1) AND ROUND((UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(processedAt))/60) >= '\n . $successOrderDataClearDuration\n . ' AND processedAt IS NOT NULL ) ';\n\n $forDeclineSql = '( SELECT id,crmPayload,crmResponse,processing,processedAt '\n . ' FROM '\n . $nativeTableName\n . ' WHERE processing IN(3) AND ROUND((UNIX_TIMESTAMP(now()) - UNIX_TIMESTAMP(processedAt))/60) >= '\n . $declineOrderClrDuration\n . ' AND processedAt IS NOT NULL ) ';\n\n $finalSql = $forsuccessSql . ' UNION ' . $forDeclineSql . ' LIMIT ' . self::FETCH_LIMIT;\n return $this->dbConnection->fetchAll($finalSql);\n } catch (Exception $ex) {\n return false;\n }\n }", "title": "" }, { "docid": "67e54274d562c7c123e0dcbc72552a88", "score": "0.5967633", "text": "public function getOrders($options=[]): array{\n return $this->getRelatedEntities(\"Orders\",$options);\n }", "title": "" }, { "docid": "3824164b09ed1f44cab6442f6570a36a", "score": "0.5966488", "text": "public function getOrders() {\r\n $orderList = array();\r\n $orders = $this->_output->getOrderByOrderIDResponse->orders;\r\n if (is_null($orders))\r\n return $orderList;\r\n $order = $orders->Order;\r\n if (is_array($order))\r\n foreach ($order as $o)\r\n $orderList[] = $o;\r\n else\r\n $orderList[] = $order;\r\n return $orderList;\r\n }", "title": "" }, { "docid": "093b0a13330efae36feaf0e9ca400ff5", "score": "0.5965161", "text": "function addOrders() {\r\n\tglobal $PageSize, $wpdb, $OrderCreatedTime, $LastUpdatedTime, $Page, $Action, $xml;\r\n\t\r\n\t$filters = array(\r\n\t\t'post_status' => 'any',\r\n\t\t'post_type'\t=> 'shop_order',\r\n\t\t'posts_per_page' => $PageSize,\r\n\t\t'paged' => $Page+1,\r\n\t\t'orderby' =>'modified',\r\n\t\t'order' => 'DESC'\r\n\t);\r\n\t\r\n\t$loop = new WP_Query( $filters );\r\n\t\r\n\twhile ( $loop->have_posts() ) {\r\n\t\t$loop->the_post();\r\n\t\t$order = new WC_Order($loop->post->ID);\r\n\t\t\r\n\t\t$lastModified = strtotime($loop->post->post_modified_gmt.'UTC');\r\n\t\t$created = strtotime($loop->post->post_date_gmt.'UTC');\r\n\t\tif ($lastModified<$LastUpdatedTime || $created<$OrderCreatedTime ){\r\n\t\t\tcontinue;\r\n\t\t}\r\n\t\t$order_xml = $xml->addChild(\"Order\");\r\n\t\t$order_xml->addAttribute(\"id\", $order->id);\r\n\t\t$order_xml->addAttribute(\"LastUpdated\", $loop->post->post_modified_gmt);\r\n\t\t$order_xml->OrderNumber = $order->get_order_number();\r\n\t\t$order_xml->Date = $loop->post->post_date_gmt;\r\n\t\t$order_xml->Type = 'Order';\r\n\t\t$order_xml->Status = $order->status;\r\n\t\t$order_xml->OriginalStatus = $order->status;\r\n\t\t$order_xml->CurrencyCode = $order->get_order_currency();\r\n\t\t$note_string = $order->customer_note;\r\n\t\t$order_notes = $order->get_customer_order_notes();\r\n\t\tif (($order_notes != null) && (is_array($order_notes)) &&(sizeof($order_notes)>0)) {\r\n\t\t\t\r\n\t\t\tforeach ($order_notes as $note) {\r\n\t\t\t\t$note_string .= \"; \" . $note->comment_content;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$order_xml->Notes = $note_string;\r\n\t\t$order_xml->Total = $order->get_total();\r\n\t\t$order_xml->Url = admin_url() . 'post.php?post=' . $order->id . '&action=edit';\r\n\t\t\r\n\t\t// Addresses\r\n\t\t$addresses_xml = $order_xml->addChild(\"Addresses\");\r\n\t\t$billing_address = $addresses_xml->addChild('Address');\r\n\t\t$billing_address->addAttribute('type','Billing');\r\n\t\t$billing_address->FirstName = htmlspecialchars($order->billing_first_name);\r\n\t\t$billing_address->LastName = htmlspecialchars($order->billing_last_name);\r\n\t\t$billing_address->OrganizationName = htmlspecialchars($order->billing_company);\t\t\t\r\n\t\t$billing_address->Line1 = htmlspecialchars($order->billing_address_1);\r\n\t\t$billing_address->Line2 = htmlspecialchars($order->billing_address_2);\r\n\t\t$billing_address->City = htmlspecialchars($order->billing_city);\r\n\t\t$billing_address->PostCode = $order->billing_postcode;\r\n\t\t$billing_address->State = htmlspecialchars($order->billing_state);\r\n\t\t$billing_address->CountryCode = htmlspecialchars($order->billing_country);\r\n\t\t$shipping_address = $addresses_xml->addChild('Address');\r\n\t\t$shipping_address->addAttribute('type','Shipping');\r\n\t\t$shipping_address->FirstName = htmlspecialchars($order->shipping_first_name);\r\n\t\t$shipping_address->LastName = htmlspecialchars($order->shipping_last_name);\r\n\t\t$shipping_address->OrganizationName = htmlspecialchars($order->shipping_company);\t\t\r\n\t\t$shipping_address->Line1 = htmlspecialchars($order->shipping_address_1);\r\n\t\t$shipping_address->Line2 = htmlspecialchars($order->shipping_address_2);\r\n\t\t$shipping_address->City = htmlspecialchars($order->shipping_city);\r\n\t\t$shipping_address->PostCode = $order->shipping_postcode;\r\n\t\t$shipping_address->State = htmlspecialchars($order->shipping_state);\r\n\t\t$shipping_address->CountryCode = htmlspecialchars($order->shipping_country);\r\n\t\t\r\n\t\t// Contact\r\n\t\t$contact_xml = $order_xml->addChild(\"Contact\");\r\n\t\tif (($order->customer_user != null) && ($order->customer_user != \"0\")) {\r\n\t\t\t$contact_xml->addAttribute(\"id\", $order->customer_user);\r\n\t\t}\r\n\r\n\t\t// Add contact details\r\n\t\t$contact_xml->FirstName = htmlspecialchars($order->billing_first_name);\r\n\t\t$contact_xml->LastName = htmlspecialchars($order->billing_last_name);\r\n\t\t$contact_xml->Email = $order->billing_email;\r\n\t\t$contact_xml->MobilePhone = $order->billing_phone;\r\n\t\t$contact_xml->OrganizationName = $order->billing_company;\r\n\t\txml_adopt($contact_xml, $addresses_xml);\r\n\t\t\r\n\t\t$lineItems_xml = $order_xml->addChild(\"Items\");\r\n\t\t\r\n\t\tforeach ($order->get_items() as $lineItem) {\r\n\t\t\t$lineItem_xml = $lineItems_xml->addChild(\"Item\");\r\n\t\t\t//$lineItem_xml->Obj = print_r($lineItem,1);\r\n\t\t\t//$lineItem_xml->MetaObj = print_r($order->get_item_meta($lineItem->order_item_id),1);\t\r\n\t\t\tif (array_key_exists ('variation_id', $lineItem) && ($lineItem['variation_id'] != null) && ($lineItem['variation_id'] != \"\") && ($lineItem['variation_id'] != 0)) {\r\n\t\t\t\t$product_id = $lineItem['variation_id'];\r\n\t\t\t} else {\r\n\t\t\t\t$product_id = $lineItem['product_id'];\r\n\t\t\t}\r\n\t\t\t$product = new WC_Product($product_id);\r\n\t\t\t$lineItem_xml->ProductId = $product_id;\r\n\t\t\t$postType = get_post_type($product_id);\r\n\t\t\tif ($product != null) {\t\r\n\t\t\t\t$lineItem_xml->ProductCode = getProductCode($product);\r\n\t\t\t\tif($postType == 'product_variation')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$prod = new WC_Product($product->get_parent());\t\r\n\t\t\t\t\t\t$lineItem_xml->ProductName = $prod->get_title();\t\t\t\r\n\t\t\t\t\t\t$prod_meta = get_post_meta($product->id);\r\n\t\t\t\t\t\t$sanitized_values = array();\r\n\t\t\t\t\t\tforeach($prod_meta as $custom_meta => $custom_meta_value){\r\n\t\t\t\t\t\t\tif($custom_meta[0] != '_')\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$custom_meta_value = implode(',',$custom_meta_value);\r\n\t\t\t\t\t\t\t\t$sanitized_values[] = xml_entities($custom_meta_value);\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t$lineItem_xml->ProductName .= ' ('.implode(',', $sanitized_values).')';\r\n\t\t\t\t\t\t$_variable_description = get_post_meta( $product->id , '_variation_description', true );\r\n\t\t\t\t\t\t$lineItem_xml->ProductDescription = xml_entities(strip_tags($_variable_description));\t\t\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$lineItem_xml->ProductName = htmlspecialchars($product->get_title());\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t$lineItem_xml->ProductCode = $product_id;\r\n\t\t\t\t$lineItem_xml->ProductName = $product_id;\r\n\t\t\t}\r\n\t\t\t$lineItem_xml->Quantity = $lineItem['qty'];\r\n\t\t\t$lineItem_xml->Price = item_subtotal($lineItem, true, true);\r\n\t\t\t$lineItem_xml->UnitPriceExTax = item_subtotal($lineItem, false, true);\r\n\t\t\t$lineItem_xml->Shipping;\r\n\t\t\t$lineItem_xml->Discount = (0.0 + item_subtotal($lineItem, false, true) - item_total($lineItem, false, true));\r\n\t\t\t$lineItem_xml->DiscountName;\r\n\t\t\t$OrderId = $order->id;\r\n\t\t\t$UnitPriceExTax = item_subtotal($lineItem, false, true);\r\n\t\t\t$lineitem_tax_amount = $lineItem['line_tax'];\t\r\n\t\t\t$tax_id_query = \"SELECT order_item_id FROM \" . $wpdb->prefix . \"woocommerce_order_items WHERE order_id = '\" . $OrderId . \"' AND order_item_type = 'tax'\";\r\n\t\t\t$order_item_tax_ids = $wpdb->get_results($tax_id_query);\r\n\t\t\tif($lineItem['line_tax'] != 0)\r\n\t\t\t{\r\n\t\t\t$taxes_xml = $lineItem_xml->addChild(\"Taxes\");\r\n\t\t\t\tforeach($order_item_tax_ids as $order_item_tax_id)\r\n\t\t\t\t{\t\r\n\t\t\t\t\t$tax_xml = $taxes_xml->addChild(\"Tax\");\r\n\t\t\t\t\t$tax_xml->TaxName = wc_get_order_item_meta( $order_item_tax_id->order_item_id, \"label\");\r\n\t\t\t\t\t$TaxRateId = wc_get_order_item_meta( $order_item_tax_id->order_item_id, \"rate_id\");\r\n\t\t\t\t\t$TaxRate = get_rate_percent($TaxRateId);\r\n\t\t\t\t\t$tax_xml->TaxRate = $TaxRate/100;\r\n\t\t\t\t\t$line_tax_data = maybe_unserialize($lineItem['line_tax_data']);\r\n\t\t\t\t\tif(isset($line_tax_data['total']))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tforeach($line_tax_data['total'] as $tax_rate_id => $tax)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($tax_rate_id == $TaxRateId)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$tax_xml->TaxAmount = $tax;\r\n\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t}\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\telse\r\n\t\t\t{\r\n\t\t\t\tif($order_item_tax_ids != NULL)\r\n\t\t\t\t{\r\n\t\t\t\t\t$taxes_xml = $lineItem_xml->addChild(\"Taxes\");\r\n\t\t\t\t\tforeach($order_item_tax_ids as $order_item_tax_id)\r\n\t\t\t\t\t{\t\r\n\t\t\t\t\t\t$tax_xml = $taxes_xml->addChild(\"Tax\");\r\n\t\t\t\t\t\t$tax_xml->TaxName = wc_get_order_item_meta( $order_item_tax_id->order_item_id, \"label\");\r\n\t\t\t\t\t\t$TaxRateId = wc_get_order_item_meta( $order_item_tax_id->order_item_id, \"rate_id\");\r\n\t\t\t\t\t\t$TaxRate = get_rate_percent($TaxRateId);\r\n\t\t\t\t\t\t$tax_xml->TaxRate = $TaxRate/100;\r\n\t\t\t\t\t\t$line_tax_data = maybe_unserialize($lineItem['line_tax_data']);\r\n\t\t\t\t\t\tif(isset($line_tax_data['total']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tforeach($line_tax_data['total'] as $tax_rate_id => $tax)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($tax_rate_id == $TaxRateId)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$tax_xml->TaxAmount = $tax;\r\n\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t}\t\t\t\r\n/*\t\t\t\tforeach ($tax_rate_names as $tax_rate_name) {\r\n\t\t\t\t\t$tax_xml = $taxes_xml->addChild(\"Tax\");\r\n\t\t\t\t\tforeach ($tax_rates as $tax_rate) {\r\n\t\t\t\t\t\t$taxName_country = $tax_rate->tax_rate_country;\r\n\t\t\t\t\t\t$taxName_state = $tax_rate->tax_rate_state;\r\n\t\t\t\t\t\t$taxName_name = $tax_rate->tax_rate_name;\r\n\t\t\t\t\t\tif($taxName_state != \"\")\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$TaxName = $taxName_country .\"-\". $taxName_state .\"-\". $taxName_name;\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$TaxName = $taxName_country .\"-\". $taxName_name;\t\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t$length = strlen($TaxName);\r\n\t\t\t\t\t\tif($TaxName === $tax_rate_name || $TaxName === substr($tax_rate_name, 0, $length))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$TaxRate = $tax_rate->tax_rate;\r\n\t\t\t\t\t\t\t$tax_xml->TaxRate = $TaxRate;\r\n\t\t\t\t\t\t\t$tax_xml->TaxName = $tax_rate->tax_rate_name;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$tax_xml->TaxAmount = $lineitem_tax_amount;\r\n\t\t\t\t}\r\n\t\t\t\t$tax_query = \"SELECT tax_rate_class FROM \" . $wpdb->prefix . \"woocommerce_tax_rates group by tax_rate_class\";\r\n\t\t\t\t$tax_classes = $wpdb->get_results($tax_query);\r\n\t\t\t\t$tax_helper = new WC_Tax();\r\n\t\t\t\t$state_helper = new WC_Countries();\r\n\t\t\t\t$states = $state_helper->get_states($CountryCode);\r\n\t\t\t\tif($states != FALSE)\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach ($states as $key=>$stateName) {\r\n\t\t\t\t\t\tif($stateName == $order->billing_state)\r\n\t\t\t\t\t\t\t{\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$stateCode = $key;\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}\r\n\t\t\t\t}\t\t\t\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$stateCode = $order->billing_state;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t$tax_filter = array(\r\n\t\t\t\t\t'country' => $order->billing_country,\r\n\t\t\t\t\t'state' => $stateCode,\r\n\t\t\t\t\t'city' => $order->billing_city,\r\n\t\t\t\t\t'postcode' => $order->billing_postcode\r\n\t\t\t\t);\r\n\t\t\t\t// Try for each tax_class to determine which one was applied\r\n\t\t\t\tforeach($tax_classes as $tax_class) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t$tax_filter['tax_class'] = $tax_class->tax_rate_class;\r\n\t\t\t\t\t$tax_rates = $tax_helper->find_rates($tax_filter);\r\n\t\t\t\t\t$calculated_tax_amount = 0.0;\r\n\t\t\t\t\t$last_rate = 0.0;\r\n\t\t\t\t\t$last_label = \"\";\r\n\t\t\t\t\tforeach($tax_rates as $tax_rate) {\r\n\t\t\t\t\t\t$last_rate = (0.0+$tax_rate['rate'])/100;\r\n\t\t\t\t\t\t$last_label = $tax_rate['label'];\r\n\t\t\t\t\t\t$calculated_tax_amount += (0.0+$lineItem['line_total'])*(0.0+$tax_rate['rate'])/100;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (abs($calculated_tax_amount - (0.0 +$lineItem['line_tax']))<=0.01 && sizeof($tax_rates)==1) {\r\n\t\t\t\t\t\t$tax_xml->TaxName = $tax_class->tax_rate_class . \"-\" . $last_label;\r\n\t\t\t\t\t\t$tax_xml->TaxRate = $last_rate;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}*/\t\t\t\r\n\t\t\t$lineItem_xml->LineTotalIncTax = item_subtotal($lineItem, true, true)*$lineItem['qty'];\r\n\t\t}\r\n\t\t$order_xml->Discounts; //= $order->get_total_discount();\r\n\t\t//$order_xml->DiscountsIncTax = 'false';\r\n\t\t\r\n\t\t$shipping_xml = $order_xml->addChild(\"Shipping\");\r\n\t\t$shipping_xml->ShippingMethod = $order->get_shipping_method();\r\n\t\t$shipping_xml->Amount = 0.0 + $order->get_total_shipping() + $order->get_shipping_tax();\t\r\n\t\tif($order->get_shipping_tax() > 0)\r\n\t\t{\r\n\t\t$order_shipping_tax_ids = $wpdb->get_results($tax_id_query);\r\n\t\t\t$taxes_xml = $shipping_xml->addChild(\"Taxes\");\r\n\t\t\t\tforeach($order_shipping_tax_ids as $order_shipping_tax_id)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif(wc_get_order_item_meta($order_shipping_tax_id->order_item_id, \"shipping_tax_amount\") > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$tax_xml = $taxes_xml->addChild(\"Tax\");\r\n\t\t\t\t\t\t$tax_xml->TaxName = wc_get_order_item_meta( $order_shipping_tax_id->order_item_id, \"label\");\r\n\t\t\t\t\t\t$TaxRateId = wc_get_order_item_meta( $order_shipping_tax_id->order_item_id, \"rate_id\");\r\n\t\t\t\t\t\t$TaxRate = get_rate_percent($TaxRateId);\r\n\t\t\t\t\t\t$tax_xml->TaxRate = $TaxRate/100;\r\n\t\t\t\t\t\t$tax_xml->TaxAmount = wc_get_order_item_meta($order_shipping_tax_id->order_item_id, \"shipping_tax_amount\");\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Other charges\r\n\t\t$othercharges_xml = $order_xml->addChild(\"OtherCharges\");\r\n\t\tforeach($order->get_fees() as $charge) {\r\n\t\t\t$charge_xml = $othercharges_xml->addChild(\"Charge\");\r\n\t\t\t$charge_xml->addAttribute(\"Name\", $charge['name']);\r\n\t\t\t$charge_xml->Amount = 0.0 + $charge['line_total'] + $charge['line_tax'];\r\n\t\t\t$charge_xml->TaxAmount = $charge['line_tax'];\r\n\t\t}\r\n\t\t\r\n\t\t//Custom Fields\r\n\t\t$order_meta = get_post_custom( $order->id );\r\n\t\t$customfield_xml = $order_xml->addChild(\"CustomFields\");\r\n\t\tforeach($order_meta as $custom_meta => $custom_meta_value){\r\n\t\t\tif($custom_meta[0] != '_' || $custom_meta == '_delivery_date')\r\n\t\t\t{\r\n\t\t\t\t$custom_meta_value = implode(',',$custom_meta_value);\r\n\t\t\t\t$sanitized_value = xml_entities($custom_meta_value);\r\n\t\t\t\t$order_customfield_xml = $customfield_xml->AddChild('CustomField', $sanitized_value);\r\n\t\t\t\t$order_customfield_xml->AddAttribute('Name',$custom_meta);\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//Skip the meta_keys that start with _\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\t\t \r\n\r\n\t\t}\t\t\r\n\t\t\r\n\t\tif ($order->status == \"completed\" || $order->status == \"processing\" ) {\r\n\t\t\tif(isset($order->payment_method_title))\r\n\t\t\t{\r\n\t\t\t$payments_xml = $order_xml->addChild(\"Payments\");\r\n\t\t\t$payment_xml = $payments_xml->addChild(\"PaymentMethod\");\r\n\t\t\t$payment_xml->addAttribute(\"Name\",$order->payment_method_title);\r\n\t\t\t$payment_xml->ReferenceNumber = $order->get_transaction_id();\r\n\t\t\t$payment_xml->Amount = $order->get_total();\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t//no payment method has been found \r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "352f4d428f84c2c811ebf5481e810880", "score": "0.5964791", "text": "public function queryAll(){\r\n\t\t$sql = 'SELECT * FROM orders';\r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "title": "" }, { "docid": "e4a9abd089bd32d53be84a37435370fa", "score": "0.5963505", "text": "public function fetchAllOrders(string $status = 'pending'): Collection\n {\n $result = Order::whereStatus($status)\n ->get();\n\n return $result;\n }", "title": "" }, { "docid": "7d8f9cbec9b011b3f2911b19de49082e", "score": "0.59616816", "text": "public function index() {\n\t\t$this->ItemsPurchaseOrder->recursive = 0;\n\t\t$this->set('itemsPurchaseOrders', $this->paginate()); \n\t}", "title": "" }, { "docid": "09b311b7ad514c9120a2bb662b3a1f4b", "score": "0.5960902", "text": "public function getOrdersAttribute()\n {\n $orders = [];\n\n foreach ($this->quotes as $quote) {\n foreach ($quote->orders as $order) {\n $order->job = $order->quote->job;\n $orders[] = $order;\n }\n }\n\n return Collection::make($orders);\n }", "title": "" }, { "docid": "8e4d6d21505110f724419ef4236743b6", "score": "0.5959737", "text": "public function getOrders()\n {\n $qb = $this->createQueryBuilder('ord')\n ->select(\n 'ord.id,'\n . 'ord.createdTime as orderDate,'\n . 'c.id as cid,'\n . 'u.firstName as userFname,'\n . 'u.lastName as userLname'\n )\n ->join('ord.user', 'u')\n ->where('ord.deleted = false');\n \n return $qb->getQuery()->getScalarResult();\n }", "title": "" }, { "docid": "1c8a1a749f1bac9953f6f6b6441614dc", "score": "0.5948068", "text": "public function getMarketplaceOrderCollection()\n {\n $customerId = $this->customerSession->getCustomerId();\n $orderCollection = $this->objectManager->create(\n 'Webkul\\Marketplace\\Model\\Orders'\n )\n ->getCollection()\n ->addFieldToFilter(\n 'seller_id',\n $customerId\n )->addFieldToFilter(\n 'seller_pending_notification',\n 1\n );\n \n $salesOrder = $this->objectManager->create(\n 'Webkul\\Marketplace\\Model\\ResourceModel\\Product\\Collection'\n )->getTable('sales_order');\n\n $orderCollection->getSelect()->join(\n $salesOrder.' as so',\n 'main_table.order_id = so.entity_id'\n )->where(\n 'so.order_approval_status = 1'\n );\n return $orderCollection;\n }", "title": "" }, { "docid": "20606d87773c91069296c5bceca9b1f2", "score": "0.5942352", "text": "public function paginated(): array;", "title": "" }, { "docid": "79c9fb94e11663adb7d7de7e67e2d0f1", "score": "0.59388536", "text": "public function fetchAll($params = [])\n {\n try {\n return new OrderCollection($this->orderService->getOrders($params), $this->serviceManager);\n } catch (\\Exception $exception) {\n return new ApiProblem($exception->getCode(), $exception->getMessage());\n }\n }", "title": "" }, { "docid": "9864f08118429e64e8eec5a0818fb7c4", "score": "0.59339225", "text": "public function PastOrders($paginated = false)\n {\n $orders = $this->allorders()\n ->filter(\"Status\", Order::config()->placed_status);\n if ($paginated) {\n $orders = PaginatedList::create($orders, $this->owner->getRequest());\n }\n\n return $orders;\n }", "title": "" }, { "docid": "5ccf011377dcb7bd28039db3a9ae87c2", "score": "0.5930489", "text": "public function index()\n {\n $order_details = OrderDetail::get();\n\n return OrderDetailResource::collection($order_details);\n }", "title": "" }, { "docid": "6da1c1deb14a4059fb154512cdc520ee", "score": "0.5924891", "text": "public function loadUserOrders()\n {\n try {\n $limit = 20;\n\n $email = Crypt::decryptString(request()->hash);\n $user = Customer::whereEmail($email)->first();\n if ($user) {\n $orders = Order::with('detail.product')\n ->where('customer_id', $user->id);\n\n $total = $orders->count();\n\n $orders = $orders->orderBy('id', 'desc')\n ->skip(request()->skip)\n ->limit($limit)\n ->get()->each(function($order) {\n $order->date = $order->created_at->toFormattedDateString();\n });\n\n return ['status' => true, 'data' => ['orders' => $orders, 'total' => $total, 'loaded' => request()->skip + $orders->count()]];\n }\n\n return ['status' => false, 'message' => 'User details not found!.'];\n } catch (\\Exception $exception) {\n return ['status' => false, 'message' => 'Internal server error occurred, please try later.'];\n }\n }", "title": "" }, { "docid": "991e19e04f2eb75e48230fcbb65d0590", "score": "0.59220093", "text": "public function index(Request $request)\n {\n $orders = Auth::guard('api')->user()->orders()\n ->with([\n 'shop:id,name,slug',\n 'inventories:id,title,slug,product_id',\n 'inventories.image:path,imageable_id,imageable_type',\n 'dispute:id,order_id'\n ])\n ->paginate(config('mobile_app.view_listing_per_page', 8));\n\n return OrderLightResource::collection($orders);\n }", "title": "" }, { "docid": "74522758ab64731af617dffc66da4431", "score": "0.5917068", "text": "public function getOrders()\n {\n return $this->hasMany(Order::className(), ['category_id' => 'id']);\n }", "title": "" }, { "docid": "6da6b93f4b207b7bf612907954fe789e", "score": "0.5907331", "text": "public function get_order();", "title": "" }, { "docid": "de8561850bbc154b7606402b20dec3c1", "score": "0.5905221", "text": "public function index()\n {\n $orders = Order::orderBy('id','desc')->paginate(5);\n return view('admin.order.list', compact('orders'));\n }", "title": "" }, { "docid": "6c6c670830c3cff8d705f37a0c92d37e", "score": "0.5904314", "text": "public function index()\n\n {\n\n // $data = Order::latest()->paginate(50);\n\n // return view('admin/orderlist', compact('data'))->with('i', (request()->input('page', 1) - 1) * 5); \n\n //$data = RequestOrder::latest()->paginate(10);\n\n $data = DB::table('request_orders')\n\n ->join('users', 'users.id', '=', 'request_orders.user_id')\n\n ->select('request_orders.*','users.name')\n\n ->orderBy('id','DESC')\n\n ->paginate(20);\n\n return view('admin/orderlist', compact('data'))->with('i', (request()->input('page', 1) - 1) * 5);\n\n }", "title": "" }, { "docid": "5092a8cbfb6ceea5458ef2a99cfede0d", "score": "0.59028256", "text": "public function BookList()\n {\n return partner::paginate();\n }", "title": "" }, { "docid": "de6c08bc07f747218803427b6f14ffe8", "score": "0.5891407", "text": "public function getDeliveredOrderListForFeedBack(Request $request)\n { \n try {\n $pageno = 0; $order_status = constants('order_status.delivered_orders');\n \n if(isset($request->pageno)){\n $pageno = intval($request->pageno);\n }\n\n $perpage = 10;\n if(isset($request->perpage)){\n $perpage = (intval($request->perpage)>200) ? 200 : intval($request->perpage);\n }\n\n $orderCount = Order::with(['order_status','order_payment_status','order_payment_type','order_reviews'])\n ->doesntHave('order_reviews')\n ->whereIn('status', $order_status)\n ->where('user_id', $request->get('user_id'))\n ->where('is_active', constants('is_active_yes'))\n ->count();\n\n\n\n $orderData = Order::with(['order_status',\n 'order_payment_status',\n 'order_payment_type',\n 'order_reviews',\n 'orderParcel' => function($qryOrderParcel) {\n $qryOrderParcel->with([\n 'goodsType' => function($qryGoodsType) {\n $qryGoodsType->where('is_active','!=', 2);\n },\n ]);\n $qryOrderParcel->where('is_active', constants('is_active_yes'));\n },\n ])\n ->doesntHave('order_reviews')\n ->whereIn('status', $order_status)\n ->where('is_active', constants('is_active_yes'))\n ->where('user_id', $request->get('user_id'))\n ->offset($pageno*$perpage)\n ->limit($perpage)\n ->orderBy('id','DESC')\n ->get();\n\n\n $orderList = [];\n\n foreach ($orderData as $row) {\n $is_order_reviewed = 0;\n\n if(isset($row->order_reviews->id)){\n $is_order_reviewed = 1;\n }\n\n /*--------------------------*/\n $orderParcelArray = []; \n if(!empty($row->orderParcel)){\n foreach ($row->orderParcel as $key => $value) { \n if(isset($value->goodsType->name)){ $orderParcelArray[] = $value->goodsType->name; }\n }\n }\n $orderParcelString = implode(', ', $orderParcelArray);\n /*---------------------------*/\n\n\n $orderList[] = [\n 'id' => $row->id,\n 'bigdaddy_lr_number' => $row->bigdaddy_lr_number,\n 'pickup_location' => $row->pickup_location,\n 'drop_location' => $row->drop_location,\n 'final_cost' => $row->final_cost,\n 'transporter_lr_number' => $row->transporter_lr_number,\n 'total_no_of_parcel' => $row->total_no_of_parcel,\n 'status' => $row->status,\n 'statusName' => $row->order_status->name,\n 'payment_status' => $row->payment_status,\n 'payment_statusName' => $row->order_payment_status->name,\n 'payment_type' => $row->payment_type,\n 'payment_typeName' => $row->order_payment_type->name,\n 'created_at' => Carbon::parse($row->created_at)->format('Y-m-d H:i:s'),\n 'statusName' => $row->order_status->name,\n 'payment_statusName' => $row->order_payment_status->name,\n 'is_order_reviewed' => $is_order_reviewed,\n 'total_payable_amount' => $row->total_payable_amount,\n 'orderParcelString' => $orderParcelString,\n ];\n }\n\n return response()->json([\n 'success' => constants('validResponse.success'),\n 'message' => \"\",\n 'data' => $orderList,\n 'total_count' => $orderCount,\n 'per_page_count' => $perpage,\n ], constants('validResponse.statusCode'));\n\n } catch(\\Exception $e) {\n Log::error($e);\n return response()->json([\n 'success' => constants('invalidResponse.success'),\n 'message' => \"Error! Something Went Wrong.\",\n 'data' => constants('emptyData'),\n ], constants('invalidResponse.statusCode'));\n } \n }", "title": "" }, { "docid": "ebfcefcdd97188eec2ff8a4e6fffae59", "score": "0.58885556", "text": "public function getAllOrders() {\n\t\t$rs = $this->query(\"SELECT * FROM orders;\");\n\t\t\n\t\t$retArr = array();\n\t\twhile($row = $rs->fetch_array()) {\n\t\t $currentOrder = $this->mapOrder($row);\n\t\t $retArr[$currentOrder->id] = $currentOrder;\n\t\t}\n\t\t\n\t\treturn $retArr;\n\t}", "title": "" }, { "docid": "494e1226e6d991b2bb9ea4764bf84c84", "score": "0.5888482", "text": "public function get_orders($offset = -1, $limits = -1)\n\t{\n\t\t$this->db->select('orders.*, name')->from($this->table);\n\t\tif($offset != -1 and $limits != -1)\n\t\t\t$this->db->limit($limits, $offset);\n\t\t$query = $this->db->join('users', 'users.userID = orders.userID')->order_by('orderTime','DESC')->get();\n\t\t$data = $query->result();\n\t\tfor ($i = 0; $i < count($data); $i++) { \n\t\t\t$data[$i]->ordersbook = $this->get_order_ele_by_id($data[$i]->orderID);\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e961cb948586dfc7e5fd815d5bcbaa2a", "score": "0.58849883", "text": "private function _setOrderList()\n {\n $objOrderResult = $this->_dataResponse['s:Body']['GetOrderListResponse']['GetOrderListResult']['OrderList'];\n \n $arrays = false;\n if (isset($objOrderResult['Order'])) {\n $orderResults = $objOrderResult['Order'];\n if (isset($orderResults['OrderNumber'])){\n $orderResults = array($orderResults);\n }\n foreach ($orderResults as $order) {\n\n if (is_array($order)) {\n $orderObj = new Order($order['OrderNumber']);\n\n if ($order['ArchiveParcelList'] == 'true') {\n $orderObj->setArchiveParcelList(true);\n }\n\n $address = $this->_getAddress($order['BillingAddress']);\n $orderObj->setBillingAddress($address);\n\n if (!SoapTools::isSoapValueNull($order['Corporation'])) {\n $corporation = $this->_getCorporation($order['Corporation']);\n $orderObj->setCorporation($corporation);\n }\n\n $orderObj->setCreationDate($order['CreationDate']);\n\n $customer = $this->_getCustomer($order['Customer']);\n $orderObj->setCustomer($customer);\n\n if ($order['HasClaims'] == 'true') {\n $orderObj->setHasClaims(true);\n }\n\n $orderObj->setInitialTotalAmount(floatval($order['InitialTotalAmount']));\n $orderObj->setInitialTotalShippingChargesAmount(floatval($order['InitialTotalShippingChargesAmount']));\n\n /*\n * is clogistique order\n */\n if ($order['IsCLogistiqueOrder'] == 'true') {\n $orderObj->setIsCLogistiqueOrder(true);\n }\n\n $orderObj->setLastUpdatedDate($order['LastUpdatedDate']);\n $orderObj->setModifiedDate($order['ModifiedDate']);\n\n if (!SoapTools::isSoapValueNull($order['OrderLineList'])) {\n $orderLineList = $this->_getOrderLineList($order['OrderLineList']);\n $orderObj->setOrderLineList($orderLineList);\n }\n //TODO gérer offer\n\n $orderObj->setOrderState($order['OrderState']);\n\n /**\n * PartnerOrderRef\n */\n if(isset($order['PartnerOrderRef']) && !SoapTools::isSoapValueNull($order['PartnerOrderRef'])){\n $orderObj->setPartnerOrderRef($order['PartnerOrderRef']);\n }\n\n /*\n * mod ges log\n */\n if (isset($order['ModGesLog']) && !SoapTools::isSoapValueNull($order['ModGesLog'])) {\n $orderObj->setModGesLog($order['ModGesLog']);\n }\n if(isset($order['ParcelList'])){\n $parcelList = $this->_getParcelList($order['ParcelList']);\n $orderObj->setParcelList($parcelList);\n }\n\n if (isset($order['VoucherList']) && !SoapTools::isSoapValueNull($order['VoucherList'])) {\n $voucherList = $this->_getVoucherList($order['VoucherList']);\n $orderObj->setVoucherList($voucherList);\n }\n \n $orderObj->setShippedTotalAmount(floatval($order['ShippedTotalAmount']));\n\n $orderObj->setShippedTotalShippingCharges(floatval($order['ShippedTotalShippingCharges']));\n\n $address = $this->_getAddress($order['ShippingAddress']);\n $orderObj->setShippingAddress($address);\n\n $orderObj->setSiteCommissionPromisedAmount(floatval($order['SiteCommissionPromisedAmount']));\n $orderObj->setSiteCommissionShippedAmount(floatval($order['SiteCommissionShippedAmount']));\n $orderObj->setSiteCommissionValidatedAmount(floatval($order['SiteCommissionValidatedAmount']));\n\n $orderObj->setStatus($order['Status']);\n\n $orderObj->setValidatedTotalAmount(floatval($order['ValidatedTotalAmount']));\n $orderObj->setValidatedTotalShippingCharges(floatval($order['ValidatedTotalShippingCharges']));\n\n $orderObj->setValidationStatus($order['ValidationStatus']);\n\n $orderObj->setVisaCegid(intval($order['VisaCegid']));\n\n $this->_orderList->addOrder($orderObj);\n }\n }\n }\n\n }", "title": "" }, { "docid": "d11a0988fdd0f93f661804a599c4729a", "score": "0.5882155", "text": "public function orders(Request $request, $page = '') {\n $pageSize = 10;\n $paginatorUrl = explode('/', $request->url());\n if ($page == '') {\n $page = 1;\n } else {\n unset($paginatorUrl[count($paginatorUrl) - 1]);\n }\n\n $paginatorUrl = implode('/', $paginatorUrl);\n\n $orders = Order::select('*')->orderBy('id', 'desc')->paginate($pageSize, ['orders.id'], 'page', $page)->withPath($paginatorUrl);\n return view('admin/orders', [\n 'active' => 'Megrendelések',\n 'orders' => $orders,\n ]);\n }", "title": "" }, { "docid": "c4adcd5607e4b8b769f645ed871facef", "score": "0.5881719", "text": "public function actionXml_list_orders($posStart=0, $count=100, array $filters=array(), array $sort_col=array(), $id=0)\n\t{\t\t\n\t\t$id=(int)$id;\n\n\t\t// get list of product groups\n\t\t$connection=Yii::app()->db; // assuming you have configured a \"db\" connection\n\t\n\t\t$posStart=(int)$posStart;\n\t\t$count=(int)$count;\n\t\t\n\t\t$where=array('orders.id_customer=:id');\n\t\t$params=array(':id'=>$id,':language_code'=>Yii::app()->language);\n\t\t\n\t\t// filters\n\t\t\n\t\t// order_no\n\t\tif (isset($filters['id']) && !empty($filters['id'])) {\n\t\t\t$where[] = 'orders.id LIKE CONCAT(\"%\",:id,\"%\")';\n\t\t\t$params[':id']=$filters['id'];\n\t\t}\n\t\t\n\t\t// date_order start\n\t\tif (isset($filters['date_order_start']) && !empty($filters['date_order_start'])) {\n\t\t\t$where[] = 'orders.date_order >= :date_order_start';\n\t\t\t$params[':date_order_start']=$filters['date_order_start'];\n\t\t}\t\n\t\t\n\t\t// date_order end\n\t\tif (isset($filters['date_order_end']) && !empty($filters['date_order_end'])) {\n\t\t\t$where[] = 'orders.date_order <= :date_order_end';\n\t\t\t$params[':date_order_end']=$filters['date_order_end'];\n\t\t}\t\n\t\t\n\t\t// bill_to\n\t\tif (isset($filters['bill_to']) && !empty($filters['bill_to'])) {\n\t\t\t$where[] = '((CONCAT(orders.billing_firstname,\" \",orders.billing_lastname) LIKE CONCAT(\"%\",:bill_to,\"%\"))\n\t\t\tOR (orders.billing_address LIKE CONCAT(\"%\",:bill_to,\"%\")) \n\t\t\tOR (orders.billing_city LIKE CONCAT(\"%\",:bill_to,\"%\"))\n\t\t\tOR (orders.billing_zip LIKE CONCAT(\"%\",:bill_to,\"%\"))\n\t\t\tOR (orders.billing_telephone LIKE CONCAT(\"%\",:bill_to,\"%\")) \n\t\t\tOR (country_bill_to.name LIKE CONCAT(\"%\",:bill_to,\"%\"))\n\t\t\tOR (state_bill_to.name LIKE CONCAT(\"%\",:bill_to,\"%\")))';\n\t\t\t$params[':bill_to']=$filters['bill_to'];\n\t\t}\t\t\n\t\t\n\t\t// ship_to\n\t\tif (isset($filters['ship_to']) && !empty($filters['ship_to'])) {\n\t\t\t$where[] = '((CONCAT(orders.shipping_firstname,\" \",orders.shipping_lastname) LIKE CONCAT(\"%\",:ship_to,\"%\"))\n\t\t\tOR (orders.shipping_address LIKE CONCAT(\"%\",:ship_to,\"%\")) \n\t\t\tOR (orders.shipping_city LIKE CONCAT(\"%\",:ship_to,\"%\"))\n\t\t\tOR (orders.shipping_zip LIKE CONCAT(\"%\",:ship_to,\"%\"))\n\t\t\tOR (orders.shipping_telephone LIKE CONCAT(\"%\",:ship_to,\"%\")) \n\t\t\tOR (country_ship_to.name LIKE CONCAT(\"%\",:ship_to,\"%\"))\n\t\t\tOR (state_ship_to.name LIKE CONCAT(\"%\",:ship_to,\"%\")))';\n\t\t\t$params[':ship_to']=$filters['ship_to'];\n\t\t}\t\t\t\n\t\t\n\t\t// total\n\t\tif (isset($filters['total']) && !empty($filters['total'])) {\n\t\t\t// <=N\n\t\t\tif (preg_match('/^<=([0-9\\.]+)$/', $filters['total'])) {\n\t\t\t\t$where[] = 'orders.grandtotal <= :total';\n\t\t\t\t$params[':total']=ltrim($filters['total'],'<=');\n\t\t\t// >=N\n\t\t\t} else if (preg_match('/^>=([0-9\\.]+)$/', $filters['total'])) {\n\t\t\t\t$where[] = 'orders.grandtotal >= :total';\n\t\t\t\t$params[':total']=ltrim($filters['total'],'>=');\n\t\t\t// <N\n\t\t\t} else if (preg_match('/^<([0-9\\.]+)$/', $filters['total'])) {\t\t\n\t\t\t\t$where[] = 'orders.grandtotal < :total';\n\t\t\t\t$params[':total']=ltrim($filters['total'],'<');\n\t\t\t// >N\n\t\t\t} else if (preg_match('/^>([0-9\\.]+)$/', $filters['total'])) {\t\t\n\t\t\t\t$where[] = 'orders.grandtotal > :total';\n\t\t\t\t$params[':total']=ltrim($filters['total'],'>');\n\t\t\t// =N\n\t\t\t} else if (preg_match('/^=([0-9\\.]+)$/', $filters['total'])) {\t\t\n\t\t\t\t$where[] = 'orders.grandtotal = :total';\n\t\t\t\t$params[':total']=ltrim($filters['total'],'=');\n\t\t\t// N1..N2\n\t\t\t} else if (preg_match('/^([0-9\\.]+)\\.\\.([0-9\\.]+)$/', $filters['total'])) {\n\t\t\t\t$search = explode('..',$filters['total']);\n\t\t\t\t$where[] = 'orders.grandtotal BETWEEN :total_start AND :total_end';\n\t\t\t\t$params[':total_start']=$search[0];\n\t\t\t\t$params[':total_end']=$search[1];\n\t\t\t// N\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$where[] = 'orders.grandtotal = :total';\n\t\t\t\t$params[':total']=$filters['total'];\n\t\t\t}\n\t\t}\t\t\t\t\t\n\t\t\n\t\t// priority\n\t\tif (isset($filters['priority'])) {\n\t\t\tif (is_numeric($filters['priority'])) {\n\t\t\t\t$where[] = 'orders.priority = :priority';\t\t\t\t\n\t\t\t\t$params[':priority']=$filters['priority'];\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t// status\n\t\tif (isset($filters['status'])) {\n\t\t\tif (is_numeric($filters['status'])) {\n\t\t\t\t$where[] = 'orders.status = :status';\t\t\t\t\n\t\t\t\t$params[':status']=$filters['status'];\n\t\t\t}\n\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\n\t\t$sql = \"SELECT \n\t\tCOUNT(orders.id) AS total \n\t\tFROM \n\t\torders\n\t\tLEFT JOIN\n\t\tcountry_description AS country_bill_to\n\t\tON \n\t\t(orders.billing_country_code = country_bill_to.country_code AND country_bill_to.language_code = :language_code)\t\n\t\tLEFT JOIN\n\t\tstate_description AS state_bill_to\n\t\tON \n\t\t(orders.billing_state_code = state_bill_to.state_code AND state_bill_to.language_code = country_bill_to.language_code)\t\n\t\tLEFT JOIN\n\t\tcountry_description AS country_ship_to\n\t\tON \n\t\t(orders.shipping_country_code = country_ship_to.country_code AND country_ship_to.language_code = country_bill_to.language_code)\t\n\t\tLEFT JOIN\n\t\tstate_description AS state_ship_to\n\t\tON \n\t\t(orders.shipping_state_code = state_ship_to.state_code AND state_ship_to.language_code = country_bill_to.language_code)\t\t\t\t\t\n\t\t\".(sizeof($where) ? ' WHERE '.implode(' AND ',$where):'');\t\n\t\t\n\t\t//if this is the first query - get total number of records in the query result\n\t\tif($posStart==0){\n\t\t\t/* Select queries return a resultset */\n\t\t\t$command=$connection->createCommand($sql);\n\t\t\t$row = $command->queryRow(true, $params);\n\t\t\t$totalCount = $row['total'];\t\t\n\t\t}\n\t\t\n\t\t//create query \n\t\t$sql = \"SELECT \n\t\torders.id,\n\t\torders.date_order,\n\t\torders.billing_firstname,\n\t\torders.billing_lastname,\n\t\torders.billing_company,\n\t\torders.billing_address,\n\t\torders.billing_city,\n\t\tcountry_bill_to.name AS billing_country,\n\t\tstate_bill_to.name AS billing_state,\n\t\torders.billing_zip,\n\t\torders.billing_telephone,\n\t\torders.shipping_firstname,\n\t\torders.shipping_lastname,\n\t\torders.shipping_company,\n\t\torders.shipping_address,\n\t\torders.shipping_city,\n\t\tcountry_ship_to.name AS shipping_country,\n\t\tstate_ship_to.name AS shipping_state,\n\t\torders.shipping_zip,\n\t\torders.shipping_telephone,\t\t\t\n\t\torders.grand_total,\n\t\torders.status,\n\t\torders.priority\n\t\tFROM \n\t\torders\n\t\tLEFT JOIN\n\t\tcountry_description AS country_bill_to\n\t\tON \n\t\t(orders.billing_country_code = country_bill_to.country_code AND country_bill_to.language_code = :language_code)\t\n\t\tLEFT JOIN\n\t\tstate_description AS state_bill_to\n\t\tON \n\t\t(orders.billing_state_code = state_bill_to.state_code AND state_bill_to.language_code = country_bill_to.language_code)\t\n\t\tLEFT JOIN\n\t\tcountry_description AS country_ship_to\n\t\tON \n\t\t(orders.shipping_country_code = country_ship_to.country_code AND country_ship_to.language_code = country_bill_to.language_code)\t\n\t\tLEFT JOIN\n\t\tstate_description AS state_ship_to\n\t\tON \n\t\t(orders.shipping_state_code = state_ship_to.state_code AND state_ship_to.language_code = country_bill_to.language_code)\t\t\t\t\t\n\t\t\".(sizeof($where) ? ' WHERE '.implode(' AND ',$where):'');\t\t\n\t\t\n\t\t// sorting\n\n\t\t// order_no\n\t\tif (isset($sort_col[1]) && !empty($sort_col[1])) {\t\n\t\t\t$direct = $sort_col[1] == 'des' ? 'DESC':'ASC';\n\t\t\t\n\t\t\t$sql.=\" ORDER BY orders.id \".$direct;\n\t\t// date_order\n\t\t} else if (isset($sort_col[2]) && !empty($sort_col[2])) {\n\t\t\t$direct = $sort_col[2] == 'des' ? 'DESC':'ASC';\n\t\t\t\n\t\t\t$sql.=\" ORDER BY orders.date_order \".$direct;\t\n\t\t// total\n\t\t} else if (isset($sort_col[5]) && !empty($sort_col[5])) {\n\t\t\t$direct = $sort_col[5] == 'des' ? 'DESC':'ASC';\n\t\t\t\n\t\t\t$sql.=\" ORDER BY orders.grand_total \".$direct;\t\t\t\t\n\t\t// priority\n\t\t} else if (isset($sort_col[6]) && !empty($sort_col[6])) {\n\t\t\t$direct = $sort_col[6] == 'des' ? 'DESC':'ASC';\n\t\t\t\n\t\t\t$sql.=\" ORDER BY orders.priority \".$direct;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t// status\n\t\t} else if (isset($sort_col[7]) && !empty($sort_col[7])) {\n\t\t\t$direct = $sort_col[7] == 'des' ? 'DESC':'ASC';\n\t\t\t\n\t\t\t$sql.=\" ORDER BY orders.status \".$direct;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t} else {\n\t\t\t$sql.=\" ORDER BY orders.id DESC\";\n\t\t}\t\t\n\t\t\n\t\t//add limits to query to get only rows necessary for the output\n\t\t$sql.= \" LIMIT \".$posStart.\",\".$count;\n\t\t\n\t\t$command=$connection->createCommand($sql);\n\t\t\n\t\t//set content type and xml tag\n\t\theader(\"Content-type:text/xml\");\n\t\t\n\t\t//output data in XML format \n\t\techo '<rows total_count=\"'.$totalCount.'\" pos=\"'.$posStart.'\">';\n\t\t\n\t\t// Cycle through results\n\t\tforeach ($command->queryAll(true, $params) as $row) {\n\t\t\t\t\t\t\n\t\t\techo '<row id=\"'.$row['id'].'\">\n\t\t\t<cell type=\"ro\"><![CDATA['.$row['id'].']]></cell>\n\t\t\t<cell type=\"ro\"><![CDATA['.$row['date_order'].']]></cell>\n\t\t\t<cell type=\"ro\"><![CDATA['.$row['billing_firstname'].' '.$row['billing_lastname'].'<br />'.\"\\r\\n\".\n\t\t\t($row['billing_company'] ? $row['billing_company'].'<br />'.\"\\r\\n\":'').\n\t\t\t$row['billing_address'].'<br />'.\"\\r\\n\".\n\t\t\t$row['billing_city'].($row['billing_state'] ? ' '.$row['billing_state']:'').($row['billing_zip'] ? ' '.$row['billing_zip']:'').'<br />'.\"\\r\\n\".\n\t\t\t$row['billing_country'].'<br />'.\"\\r\\n\".\n\t\t\t($row['billing_telephone']? \"\\r\\n\".'<br /><strong>Telephone:</strong> '.$row['billing_telephone']:'').']]></cell>\t\t\t\n\t\t\t<cell type=\"ro\"><![CDATA['.$row['shipping_firstname'].' '.$row['shipping_lastname'].'<br />'.\"\\r\\n\".\n\t\t\t($row['shipping_company'] ? $row['shipping_company'].'<br />'.\"\\r\\n\":'').\n\t\t\t$row['shipping_address'].'<br />'.\"\\r\\n\".\n\t\t\t$row['shipping_city'].($row['shipping_state'] ? ' '.$row['shipping_state']:'').($row['shipping_zip'] ? ' '.$row['shipping_zip']:'').'<br />'.\"\\r\\n\".\n\t\t\t$row['shipping_country'].'<br />'.\"\\r\\n\".\n\t\t\t($row['shipping_telephone']? \"\\r\\n\".'<br /><strong>Telephone:</strong> '.$row['shipping_telephone']:'').']]></cell>\t\t\n\t\t\t<cell type=\"ro\"><![CDATA['.$row['grand_total'].']]></cell>\n\n\t\t\t<cell type=\"ro\"><![CDATA[';\n\t\t\t\n\t\t\tswitch ($row['status']) {\n\t\t\t\tcase -1:\n\t\t\t\t\techo '<span style=\"color:#F00;\">'.Yii::t('controllers/OrdersController','LABEL_STATUS_CANCELLED').'</span>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_STATUS_INCOMPLETE');\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_STATUS_PENDING');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_STATUS_PAYMENT_REVIEW');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_STATUS_SUSPECTED_FRAUD');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_STATUS_DECLINED');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_STATUS_PROCESSING');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_STATUS_ON_HOLD');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7:\n\t\t\t\t\techo '<span style=\"color:#090;\">'.Yii::t('controllers/OrdersController','LABEL_STATUS_COMPLETED').'</span>';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo ']]></cell>\n\t\t\t\n\t\t\t<cell type=\"ro\"><![CDATA[';\n\t\t\t\n\t\t\tswitch ($row['priority']) {\n\t\t\t\tcase 0:\n\t\t\t\t\techo Yii::t('controllers/OrdersController','LABEL_PRIORITY_NORMAL');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\techo '<span style=\"color:#E839D7;\">'.Yii::t('controllers/OrdersController','LABEL_PRIORITY_ATTENTION').'</span>';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\t\n\t\t\t\t\techo '<span style=\"color:#F00;\">'.Yii::t('controllers/OrdersController','LABEL_PRIORITY_URGENT').'</span>';\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t}\n\n\t\t\techo ']]></cell>\t\t\t\n\t\t\t</row>';\n\t\t}\n\t\t\n\t\techo '</rows>';\n\t}", "title": "" } ]
10c867d858d7282357615f128fcdf06c
filter non field of entity
[ { "docid": "7210801e711fe2c69ed6a7153db216fb", "score": "0.0", "text": "public function getRejectReason($queryBuilder, $alias, $field, $value) {\n\n if (!$value['value']) {\n return;\n }\n $queryBuilder \n ->andWhere($alias.'.body like :reject')\n ->setParameter(':reject', '%reject%' . $value['value'] . '%');\n\n return true;\n }", "title": "" } ]
[ { "docid": "89e0d63e16d43c0038a3a6d5f92eeedc", "score": "0.68327224", "text": "public function getFilterableFields();", "title": "" }, { "docid": "69f0f06dbf1d2b2fac8882535a8c4dbd", "score": "0.64036137", "text": "public function filter($fields);", "title": "" }, { "docid": "cea972ebd121f340a134e408eb60650a", "score": "0.6148746", "text": "public function getEntityFilter()\n {\n return $this->entity_filter;\n }", "title": "" }, { "docid": "8342a58c724cc568cda7605f63c9ade5", "score": "0.602332", "text": "public function toFilter();", "title": "" }, { "docid": "d2a6420c5af7f99d2b7ee7b25ca9767a", "score": "0.5998019", "text": "function filterDiscountByEntity() {\n $this->setEntityDiscounts();\n }", "title": "" }, { "docid": "6b3848bdcd8fd6babde0b92d101b0794", "score": "0.5891783", "text": "public function getTransformableFields($entity);", "title": "" }, { "docid": "9e0205521b1e751b956a959091c96922", "score": "0.57712775", "text": "public function getEntityField();", "title": "" }, { "docid": "eb6c210ff8a8e7f281e5c83cffdbf642", "score": "0.5752277", "text": "public function testFindByWithMustNotEqual()\n {\n $filter = new Filter();\n $filter->mustNot()->equal('name', 'Ken Sugimori');\n\n $fields = new Fields(['name']);\n $results = $this->repository->findBy($filter, null, $fields);\n\n $this->assertEquals(3, count($results));\n foreach ($results as $result) {\n $this->assertFalse(strpos($result->name(), 'Ken'));\n }\n }", "title": "" }, { "docid": "3c1af6d15fcb97819891a6f4ae376de5", "score": "0.57460594", "text": "public function filterByEntity($entity)\n {\n $this->filter[] = $this->field('entity').' = '.$this->quote($entity);\n return $this;\n }", "title": "" }, { "docid": "e051a3ac1e6b29d9224552c757a2d770", "score": "0.56423414", "text": "public function getDefaultFilterField();", "title": "" }, { "docid": "50f75e58430fbf541e57477e97d2d840", "score": "0.5630961", "text": "function &getFilter()\n {\n // override \n }", "title": "" }, { "docid": "3b51d756dbe5502f64b3fff013487d50", "score": "0.5607226", "text": "public function filterExclude($excludedFields = [])\n {\n array_push($excludedFields, 'primary_key_id_name');\n array_push($excludedFields, 'pk');\n array_push($excludedFields, 'session');\n array_push($excludedFields, 'database');\n\n foreach ($this as $field => $value) {\n if (in_array($field, $excludedFields)) {\n unset($this->$field);\n }\n }\n\n// $this->removeStaticFields();\n }", "title": "" }, { "docid": "ac3253a9eef749354be7b5bc5f440e70", "score": "0.55913496", "text": "abstract protected function filterQuery(Query $q);", "title": "" }, { "docid": "f53c8f14aef91b3b63dc48c737b168b9", "score": "0.55892503", "text": "abstract protected function getEditableFields($entity);", "title": "" }, { "docid": "c9192e620a8e4320a6c30ab59c90cb91", "score": "0.55342996", "text": "function filterField(&$item, $key, $field)\n {\n $item = $item->{$field};\n }", "title": "" }, { "docid": "34c139daf49f75607c0fe39aa891c144", "score": "0.5508152", "text": "function test_field_not_equal_to_value_filter() {\n\t\tself::clear_get_values();\n\t\t$dynamic_view = self::get_view_by_key( 'dynamic-view' );\n\n\t\t$filter_args = array(\n\t\t\tarray( 'type' => 'field',\n\t\t\t\t'col' => '493ito',\n\t\t\t\t'op' => '!=',\n\t\t\t\t'val' => 'Jamie',\n\t\t\t),\n\t\t);\n\t\tself::add_filter_to_view( $dynamic_view, $filter_args );\n\n\t\t$d = self::get_default_args( $dynamic_view, array( 'Steve', 'Steph' ), array( 'Jamie' ) );\n\n\t\tself::run_get_display_data_tests( $d, 'field is NOT equal to value filter' );\n\t}", "title": "" }, { "docid": "8a350233444835c9b8dd8a2a3015b8be", "score": "0.55016744", "text": "public function whereNull($field);", "title": "" }, { "docid": "e8fa81de512081948940a272048e9f22", "score": "0.54938895", "text": "public function findAllNotDeleted() { \n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n return $all;\n}", "title": "" }, { "docid": "940ed61ff6253e6e33cfb886259639b3", "score": "0.54815376", "text": "public function dataListHasFilter();", "title": "" }, { "docid": "308702313221f24a5df92659522ee4c9", "score": "0.5455538", "text": "public function getFilterFieldDescriptions();", "title": "" }, { "docid": "4c6eacf8195e1073683e01e3f10e4913", "score": "0.5423124", "text": "public function complexFilter(){\n $mainoffers = Offer::get();\n $offersArr = collect($mainoffers);\n $resultOfFilter = $offersArr->filter(function($key, $value){\n return $key['id'] >= 42;\n });\n return array_values($resultOfFilter->all()); //get only values of array\n }", "title": "" }, { "docid": "b0b54bd71ac4faf7e401e6f3d09a5d5c", "score": "0.5420545", "text": "public function filter(\\Magento\\Framework\\DataObject $params);", "title": "" }, { "docid": "73c196ca227e5bbaef35d1f4028f4717", "score": "0.5399998", "text": "private function filterNonRelationalField(Builder $builder, Field $field, $operator, $value, $conjunction = 'and')\n {\n // apply on custom scope if the field has a scope\n if ($this->modelHasScope($builder, $field->getScopeFunctionName())) {\n return $builder->{$field->getScopeFunctionName()}($field, $operator, $value, $conjunction);\n }\n\n return $builder->{Operator::getFunction($operator)}($field, $value, $conjunction);\n }", "title": "" }, { "docid": "3d9147e6cebf499825ad412dadacb27c", "score": "0.53884757", "text": "public function serializeForFilter()\n {\n return transform($this->jsonSerialize(), function ($field) {\n return Arr::only($field, [\n 'uniqueKey',\n 'name',\n 'attribute',\n 'type',\n 'placeholder',\n 'extraAttributes',\n ]);\n });\n }", "title": "" }, { "docid": "6489c5c39072d1e4c84f962ddc46b1db", "score": "0.5371728", "text": "public function getAvailableFilterFields(): array;", "title": "" }, { "docid": "ba80aad94aecbaaad893f03b8312cfb3", "score": "0.53368473", "text": "public function filterByEntityOf($entity_of)\n {\n $this->filter[] = $this->field('entity_of').' = '.$this->quote($entity_of);\n return $this;\n }", "title": "" }, { "docid": "413fa6c343255420ed737752a4036cb1", "score": "0.5333559", "text": "public function filter(Request $request )\n \n {\n $filter_1=$request->author_id;\n $filter_2=$request->post_category_id ;\n $filter_3=$request->status;\n $filter_date=$request->updated_at;\n //Put $this $Field->value >>> If Field not Use , fill values='none' ! .\n $field_1='author_id'; \n $field_2='post_category_id';\n $field_3='status';\n $field_date='updated_at';\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])->get()\n :false\n :false;\n \n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_1, '=', $filter_1)\n ->get()\n :false\n :false;\n \n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_2, '=', $filter_2)\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->orWhere($field_3, '=', $filter_3)\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3]\n ])\n ->orWhere($field_date, 'like', '%'.$filter_date.'%')\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_2, '=', $filter_2]\n \n ])\n ->orWhere([\n [$field_3, '=', $filter_3],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->get()\n :false\n :false; \n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 !=='none')&&\n ($filter_date =='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_3, '=', $filter_3]\n \n ])\n ->orWhere([\n [$field_2, '=', $filter_2],\n [$field_date, 'like', '%'.$filter_date.'%']\n ])\n ->get()\n :false\n :false;\n\n isset($filter_1)&&isset($filter_2)&&isset($filter_3)&&isset($filter_date)?\n ($filter_1 !=='none')&&\n ($filter_2 =='none')&&\n ($filter_3 =='none')&&\n ($filter_date !=='none')\n ||\n ($filter_1 =='none')&&\n ($filter_2 !=='none')&&\n ($filter_3 !=='none')&&\n ($filter_date !=='none')\n ?\n $post_list=PostList::where([\n [$field_1, '=', $filter_1],\n [$field_date, 'like', '%'.$filter_date.'%']\n \n ])\n ->orWhere([\n [$field_2, '=', $filter_2],\n [$field_3, '=', $filter_3]\n ])\n ->get()\n :false\n :false;\n\n return view('admin.post.list.postList-filter',['post_list'=>$post_list]);\n }", "title": "" }, { "docid": "b592a9929f20c3c0feca3e195b64298b", "score": "0.5314029", "text": "protected function filter(&$query)\n {\n // Concrete class can implement a global filter\n // this can be skipped with params 'filter' => false\n }", "title": "" }, { "docid": "f4e143b0e365725b0bfb87da468633a3", "score": "0.53092235", "text": "public function getSafeFields(){\n //$safe= array_intersect($this->primaryKey();\n $safe=[];\n foreach($this->attributes as $nombre=>$valor){\n if($this->isAttributeSafe($nombre)){\n $safe[]=$nombre; \n }\n }\n \n return $safe; \n \n }", "title": "" }, { "docid": "ebb44eca808c8b6a61fff3df6b0f862c", "score": "0.53089297", "text": "abstract public function getFieldsSearchable(): array;", "title": "" }, { "docid": "03e286812126999db385e460271644dd", "score": "0.5293113", "text": "public function getFilter(): array;", "title": "" }, { "docid": "0ec8b26857faae2186eeeaea7101b17b", "score": "0.529077", "text": "abstract public function filtered(): AbstractElement;", "title": "" }, { "docid": "f28242acf39cbabda24c63315cc96063", "score": "0.5288648", "text": "public function filters();", "title": "" }, { "docid": "46f2d7a2fd1c1709a7dad2b98214cc0c", "score": "0.52831", "text": "public function testFilter()\n {\n $studentRepository = new StudentRepository();\n $response = $studentRepository->filter([\n 'filter' => 'Filter',\n 'age_min' => null,\n 'age_max' => null,\n 'score_min' => 5,\n 'score_max' => null,\n ]);\n $this->assertEquals(Student::all(), $response);\n }", "title": "" }, { "docid": "172d60e549e88322f82f7ab00bb4886d", "score": "0.5281926", "text": "abstract public function filter($value);", "title": "" }, { "docid": "c4bcbdd20b186ca7e4985a8ea54fd197", "score": "0.5277336", "text": "public function getIgnoredFields() {\r\n\t\t$list = array('item_id', 'lang_id', 'fran_id', 'item_status');\r\n\t\treturn $list; //array\r\n\t}", "title": "" }, { "docid": "1898077b49ae4763a6bc26d0d3e015f5", "score": "0.5276886", "text": "public function whereNotNull($field);", "title": "" }, { "docid": "9e5b90b7521b2150902ff19512993f5b", "score": "0.52737945", "text": "protected function queryForListFilter(\\EntityFieldQuery $query) {\n $public_fields = $this->getPublicFields();\n foreach ($this->parseRequestForListFilter() as $filter) {\n // Determine if sorting is by field or property.\n if (empty($public_fields[$filter['public_field']]['column'])) {\n $query->propertyCondition($public_fields[$filter['public_field']]['property'], $filter['value'], $filter['operator']);\n }\n else {\n $query->fieldCondition($public_fields[$filter['public_field']]['property'], $public_fields[$filter['public_field']]['column'], $filter['value'], $filter['operator']);\n }\n }\n }", "title": "" }, { "docid": "a1d26e15c7c1d8a9b44e33da99877df4", "score": "0.52712494", "text": "function doFilter($k){ return !in_array($k, $this->filter); }", "title": "" }, { "docid": "6c4adea0ba1aa2ba23d52f97aedff3d6", "score": "0.52633643", "text": "public function getFilter();", "title": "" }, { "docid": "6b8f1e10109237cd7b8af1ab2037b654", "score": "0.52486104", "text": "public function filterEmptyItems();", "title": "" }, { "docid": "8b253c4bf3da8df9e606a9990864264a", "score": "0.5235908", "text": "public function unknown() {\n if(!is_null($this->unknown)) return $this->unknown;\n return $this->filterBy('type', 'unknown');\n }", "title": "" }, { "docid": "89a9c15e727f78e536b282773cd87de2", "score": "0.5228257", "text": "function _field_filter($table, $arr) {\n $fields = $this->field_names($table);\n foreach ($fields as $k => $f) if (isset($arr[$f])) $brr[$f] = $arr[$f];\n return $brr;\n}", "title": "" }, { "docid": "1ad384acd20a23b215c10c73fea078da", "score": "0.52192044", "text": "public function filter(EventInterface $e)\n {\n $document = $e->getParam('document');\n foreach ($this->fieldFilters as $field => $data) {\n if (!isset($document->{$data['field']})) {\n $document->{$data['field']} = null;\n }\n\n $value = $document->{$data['field']};\n foreach ($data['filters'] as $filter) {\n $value = $filter->filter($value);\n }\n\n $document->{$field} = $value;\n }\n\n return $e;\n }", "title": "" }, { "docid": "a5692c6d0bc3caba912cd35c71d63c70", "score": "0.5215489", "text": "public function filter (){\n\n $this->filter = array();\n\n }", "title": "" }, { "docid": "419f9522ef196bcfdece56b4dcd07b5b", "score": "0.52128655", "text": "public function onlyAllowExactFields(): void\n {\n $fields = [];\n\n foreach ($this->properties as $property) {\n $fields[] = $property->getName();\n }\n\n $this->addRule(new NoOtherFields(...$fields));\n }", "title": "" }, { "docid": "f917f5bd6d9ece4005d6aea9816ec8b5", "score": "0.520006", "text": "protected function normalizeFilter()\n {\n $this->substituteField($this->filter, 'GROUPS', 'GROUPS_ID');\n $this->substituteField($this->filter, 'GROUP_ID', 'GROUPS_ID');\n\n return $this->filter;\n }", "title": "" }, { "docid": "beb405054de6ac970d93cbd0e7931478", "score": "0.51955235", "text": "public function sanitize()\n {\n if (method_exists($this, 'filters')) {\n $filtry = \\Filtry::make($this->all(), $this->filters());\n $this->merge($filtry->getFiltered());\n }\n }", "title": "" }, { "docid": "4d98099d16a36c29910bf692745a06ff", "score": "0.5193137", "text": "public function testFilter() {\n $author = $this->drupalCreateUser();\n $no_author = $this->drupalCreateUser();\n\n $expected_result = array();\n // Create one entity gallery, with the author as the entity gallery author.\n $entity_gallery = $this->drupalCreateEntityGallery(array('uid' => $author->id()));\n $expected_result[] = array('egid' => $entity_gallery->id());\n // Create one entity gallery of which an additional revision author will be\n // the author.\n $entity_gallery = $this->drupalCreateEntityGallery(array('revision_uid' => $no_author->id()));\n $expected_result[] = array('egid' => $entity_gallery->id());\n $revision = clone $entity_gallery;\n // Force to add a new revision.\n $revision->set('vid', NULL);\n $revision->set('revision_uid', $author->id());\n $revision->save();\n\n // Create oneen tity gallery on which the author has neither authorship of\n // revisions or the main entity gallery.\n $this->drupalCreateEntityGallery(array('uid' => $no_author->id()));\n\n $view = Views::getView('test_filter_entity_gallery_uid_revision');\n $view->initHandlers();\n $view->filter['uid_revision']->value = array($author->id());\n\n $this->executeView($view);\n $this->assertIdenticalResultset($view, $expected_result, array('egid' => 'egid'), 'Make sure that the view only returns entity galleries which match either the entity gallery or the revision author.');\n }", "title": "" }, { "docid": "73224cce4be3feef11ac5f9491d2dd20", "score": "0.51929224", "text": "abstract public function acceptsFilterExpression();", "title": "" }, { "docid": "d68e493e98a8c3a8283b51a095ab4abb", "score": "0.51876456", "text": "protected function filters(){\n\n }", "title": "" }, { "docid": "1552ab2db3b0da436a9636addfef8e90", "score": "0.51765025", "text": "public function filterRemoved()\n\t{\n\t\t$owner=$this->getOwner();\n\n\t\t$criteria=$owner->getDbCriteria();\n\t\t\n\t\t$criteria->addCondition($this->trashFlagField.'!='.CDbCriteria::PARAM_PREFIX.CDbCriteria::$paramCount);\n\t\t$criteria->params[CDbCriteria::PARAM_PREFIX.CDbCriteria::$paramCount++]=$this->removedFlag;\t\t\n\t\treturn $owner;\n\t}", "title": "" }, { "docid": "330f2f6331bdc40ffdb2302d7886a04a", "score": "0.5171944", "text": "protected function filterQuery($query)\n {\n }", "title": "" }, { "docid": "c2f7edb2f9f2f54a8619cedf5c5e8bda", "score": "0.5171758", "text": "public function noAssociationData()\n {\n return [\n 'boolean' => [\n 'boolean',\n BooleanFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'datetime' => [\n 'datetime',\n DateTimeFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'datetime_immutable' => [\n 'datetime_immutable',\n DateTimeFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'vardatetime' => [\n 'vardatetime',\n DateTimeFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'datetimetz' => [\n 'datetimetz',\n DateTimeFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'datetimetz_immutable' => [\n 'datetimetz_immutable',\n DateTimeFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'date' => [\n 'date',\n DateFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'date_immutable' => [\n 'date_immutable',\n DateFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'decimal' => [\n 'decimal',\n NumberFilter::class,\n Guess::MEDIUM_CONFIDENCE,\n ],\n 'float' => [\n 'float',\n NumberFilter::class,\n Guess::MEDIUM_CONFIDENCE,\n ],\n 'integer' => [\n 'integer',\n NumberFilter::class,\n Guess::MEDIUM_CONFIDENCE,\n IntegerType::class,\n ],\n 'bigint' => [\n 'bigint',\n NumberFilter::class,\n Guess::MEDIUM_CONFIDENCE,\n IntegerType::class,\n ],\n 'smallint' => [\n 'smallint',\n NumberFilter::class,\n Guess::MEDIUM_CONFIDENCE,\n IntegerType::class,\n ],\n 'string' => [\n 'string',\n StringFilter::class,\n Guess::MEDIUM_CONFIDENCE,\n ],\n 'text' => [\n 'text',\n StringFilter::class,\n Guess::MEDIUM_CONFIDENCE,\n ],\n 'time' => [\n 'time',\n TimeFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'time_immutable' => [\n 'time_immutable',\n TimeFilter::class,\n Guess::HIGH_CONFIDENCE,\n ],\n 'somefake' => [\n 'somefake',\n StringFilter::class,\n Guess::LOW_CONFIDENCE,\n ],\n ];\n }", "title": "" }, { "docid": "567f78a6c5af2c15aab4bb4caa32cc06", "score": "0.5166641", "text": "public function getFieldsSearchable()\n {\n return [];\n }", "title": "" }, { "docid": "988cf4484538c9880c263814dc4f3c39", "score": "0.51639825", "text": "public function getSearchableFields(): array;", "title": "" }, { "docid": "34887959f6a8b4f1b406760ed64008e7", "score": "0.5149298", "text": "public function exceptValuesCanBeSelected()\n {\n $except = $this->dto->except(['myUsername']);\n $this->assertFalse(array_key_exists('myUsername', $except));\n }", "title": "" }, { "docid": "ef25a06c58f1739598ec6b2e5d222e98", "score": "0.51289266", "text": "function filter($data) {\n return $data;\n}", "title": "" }, { "docid": "40303d4089ba8ff38ece0c493608534e", "score": "0.5128753", "text": "public function getFilter()\n {\n return null;\n }", "title": "" }, { "docid": "ccad3ce13a888b9c07e621cecef92dc7", "score": "0.5128447", "text": "public function filter()\n {\n return Composers\\FilterQueryComposer::compose((array) $this->query->get('filter', []));\n }", "title": "" }, { "docid": "1e65570472ddfcac6b4ed3b78cee0f54", "score": "0.5080201", "text": "public function getAllExceptAuth(): Collection;", "title": "" }, { "docid": "2b06a8d2074255bebb0b14c1ec3f034a", "score": "0.50709075", "text": "function restrict_fields( $thing ) {\n\t}", "title": "" }, { "docid": "a1b40fc11544c6d53cc787ab564ffd0f", "score": "0.5064212", "text": "protected function removeFilterByFieldName($field)\n {\n if (isset($this->definition[$field]['filter_type'])) {\n $this->definition[$field]['filter_type'] = false;\n }\n return $this;\n }", "title": "" }, { "docid": "73b6bc448f75fdda391183a8cc2103e5", "score": "0.5063881", "text": "public function get_fields($clazz, $filter = NULL);", "title": "" }, { "docid": "0115708a0f60126771821c7872973892", "score": "0.5061866", "text": "private function _find_fields() {\n\t\t$result = $this->db->fields($this->_table);\n\t\t$this->_fields = array_diff($result, array('id'));\n\t}", "title": "" }, { "docid": "4ae76e80fa9268f794f6b2b9c417c898", "score": "0.5061302", "text": "public function testRequireFieldsOnObjects()\n {\n $query = '\n query HeroNoFieldsQuery {\n hero\n }\n ';\n\n $schema = StarWarsSchema::buildSchema();\n\n $parser = new Parser();\n $validator = new Validator();\n\n $parser->parse($query);\n $document = $parser->getParsedDocument();\n $validator->validate($schema, $document);\n\n self::assertNotEmpty($validator->getErrors());\n }", "title": "" }, { "docid": "a8c37986e9cf5eeb94fc419180a88dfb", "score": "0.5059298", "text": "public function filterByUser(int $id);", "title": "" }, { "docid": "f73e3fec8eddb118ccb2526569f20c85", "score": "0.5052647", "text": "public function getFilterQueries() {}", "title": "" }, { "docid": "4fa98d7568161868c75044a87b3f4162", "score": "0.5041061", "text": "public function filter(array $filter)\n { return $this->model->filter($filter);\n }", "title": "" }, { "docid": "d5d072880c1ff31b56b5bb9f01c96436", "score": "0.50239617", "text": "function filterObject()\n\t{\n\t\t$this->questionsObject();\n\t}", "title": "" }, { "docid": "a40c757a27b0ef0e69f818750c1485bd", "score": "0.5022718", "text": "public function getFilteredValues($app);", "title": "" }, { "docid": "97a7e6a2790c32b205fc798ec0ba1e65", "score": "0.49982882", "text": "public function filters(): iterable;", "title": "" }, { "docid": "fc64bf720e6edc295ee74b9262641ed1", "score": "0.49959353", "text": "public function removeExpandFilterQuery($fq) {}", "title": "" }, { "docid": "29b8e9ae15982cdb1e64eb21959ffc53", "score": "0.49947906", "text": "private function filter()\n {\n $this->builder->where(function ($builder) {\n collect($this->request->get('filter', []))->each(function ($value, $column) use ($builder) {\n $this->guardFilter($column);\n $this->filterColumn($builder, $column, $value);\n });\n });\n }", "title": "" }, { "docid": "4230702a1fef4ad3afe5dc3492dc2b2b", "score": "0.4991331", "text": "function venture_deal_views_handler_not_united_states($op, $filter, $filterinfo, &$query) {\n if ($filter['value'] == 1) {\n $table = $filterinfo['table'];\n $field = $filterinfo['field'];\n $query->add_where(\"$table.$field != 'United States'\");\n }\n}", "title": "" }, { "docid": "5623abd81abe507645175de259335e91", "score": "0.4991199", "text": "protected function create_entity_filter($field_name, $value, $operator = \\Wallee\\Sdk\\Model\\CriteriaOperator::EQUALS){\n\t $filter = new \\Wallee\\Sdk\\Model\\EntityQueryFilter();\n\t $filter->setType(\\Wallee\\Sdk\\Model\\EntityQueryFilterType::LEAF);\n\t\t$filter->setOperator($operator);\n\t\t$filter->setFieldName($field_name);\n\t\t$filter->setValue($value);\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "c93d90f497cfce27d26a740b82a90885", "score": "0.49843684", "text": "public function filter($value);", "title": "" }, { "docid": "0d908164e53e994e21c24f689ddd373f", "score": "0.49767193", "text": "public function getFilterFields()\n {\n return $this->_filterFields;\n }", "title": "" }, { "docid": "76753363b9622e46c8858d512e818c81", "score": "0.49762747", "text": "public function createFilter();", "title": "" }, { "docid": "e8880dc20d398b40909d20ff716a32fd", "score": "0.49743015", "text": "public function filters()\r\n {\r\n\t\t$filters = array(\r\n //'postOnly + delete, slug',\r\n );\r\n return CMap::mergeArray($filters, parent::filters());\r\n }", "title": "" }, { "docid": "e8880dc20d398b40909d20ff716a32fd", "score": "0.49743015", "text": "public function filters()\r\n {\r\n\t\t$filters = array(\r\n //'postOnly + delete, slug',\r\n );\r\n return CMap::mergeArray($filters, parent::filters());\r\n }", "title": "" }, { "docid": "5d010eced0c044958984fabf0cba0685", "score": "0.4967152", "text": "function filters() {\n $aFilters = array();\n foreach ($this->aConfig as $sField => $aData) {\n if ($this->$sField !== false) {\n $aFilters[$sField] = $this->$sField;\n }\n }\n return $aFilters;\n }", "title": "" }, { "docid": "7f554d5b5a09959ec8b92c6143568c04", "score": "0.496657", "text": "public function removeFilterQuery($fq) {}", "title": "" }, { "docid": "18a71438d83a06e5da6c5ecb21c519de", "score": "0.4965114", "text": "function getModelFields() {\n $fields = parent::getModelFields();\n foreach ($fields as $key => &$field) {\n switch ($key){\n case false:break;//needed\n case 'field10':\n case 'field11':\n case 'field12':\n case 'field13':\n case 'field14':\n case 'field15':\n case 'field16':\n case 'field17':\n case 'field18':\n $field['type'] = 'boolean';\n unset($field['useNull']);\n break;\n }\n }\n \n $fields['created'] = array(\n 'name' => 'created',\n 'type' => 'date', \n 'dateFormat' => 'Y-m-d H:i:s',\n 'persist' => 1,\n );\n \n return $fields;\n }", "title": "" }, { "docid": "ec3382d4c67a0fb429e991a3e5ae3bbe", "score": "0.49629912", "text": "public function findNonCompositeInsuranceType(){\r\n $dql = \"SELECT i FROM Settings\\Entity\\InsuranceType i WHERE i.id != 1 ORDER BY i.id DESC \";\r\n $query = $this->getEntityManager()\r\n ->createQuery($dql)\r\n ->getResult();\r\n return $query;\r\n }", "title": "" }, { "docid": "ed341a308186d4bccd9bc4704cd3d19e", "score": "0.49532485", "text": "public function strip()\n {\n return new SimpleFilter(\n (new RowFilter)->setStripValueTransformer(true)\n );\n }", "title": "" }, { "docid": "645a5b0f072e7275990250bd08752e75", "score": "0.494538", "text": "protected function _getIgnored_fields()\n\t{\n\t\t$core_ignore = array(\n\t\t\t'fields',\n\t\t\t'service',\n\t\t\t'model',\n\t\t\t'table',\n\t\t\t'ignored',\n\t\t\t'loaded',\n\t\t\t'primary_key',\n\t\t);\n\t\treturn Arr::merge($this->_ignored, $core_ignore);\n\t}", "title": "" }, { "docid": "2a88303cec2dd3e9c37dec58446f6e76", "score": "0.4944503", "text": "public function fieldAllowedValues($field);", "title": "" }, { "docid": "810237fa75b4438850f889ffc2266b9e", "score": "0.4942618", "text": "abstract protected function filterData(ContainerInterface $container, QueryBuilder $queryBuilder, Request $request);", "title": "" }, { "docid": "446f1b138804553f39d7d46aed96eabf", "score": "0.49392337", "text": "public function getAllEnseignement() {\n $qb = $this->createQueryBuilder('e')\n ->where('e.etatEnseignement != ' . TypeEtat::SUPPRIME);\n // ->orderBy('e.typeEnseignement', 'ASC');\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "2116265c75fb72b83afec4c744210bd5", "score": "0.49324554", "text": "public function filter($fields) {\n\n\t\t$this->query->setFields($fields);\n\n\t\treturn $this;\n\n\t}", "title": "" }, { "docid": "f8a2a17bbeed0c706703c9e9bb3c42a9", "score": "0.49309555", "text": "protected function getUniqueEntityFields()\n {\n\n // NOTE override if unique entity constraint applies\n return array();\n }", "title": "" }, { "docid": "94d1e0036d2091483365f3ae2bdbcd70", "score": "0.49287313", "text": "protected function normalizeFilter()\n {\n $this->filter['IBLOCK_ID'] = $this->iblockId;\n\n return $this->filter;\n }", "title": "" }, { "docid": "f16733d7afb7ee39556e25f6e6815133", "score": "0.49231663", "text": "public function removeAllFacetFields()\n {\n $this->params['facet.field'] = array();\n return $this;\n }", "title": "" }, { "docid": "b40888fa692204ad6bd8e41ce9df6904", "score": "0.49225447", "text": "private function filterColumns(Entity $entity): array\n {\n $columns = $this->getColumns();\n $filteredData = [];\n foreach ($columns as $key => $column) {\n if (!is_null($value = $entity->{Str::camelize($column)}())) {\n $filteredData[$column] = $value;\n }\n }\n return $filteredData;\n }", "title": "" }, { "docid": "b3f2d2fc07c892901f8d49ee6b4b96aa", "score": "0.49166793", "text": "public function filterFields(\n\t\tarray $fields,\n\t\tSchemaInterface $schema,\n\t\t?Table $modelObject = null,\n\t\t$takeFields = 0,\n\t\t$filterTypes = ['binary'],\n\t\t?string $type = null\n\t): array {\n\t\t$fields = parent::filterFields($fields, $schema, $modelObject, $takeFields, $filterTypes);\n\n\t\t$fields = collection($fields);\n\t\tif (isset($modelObject) && $modelObject->behaviors()->has('Tree')) {\n\t\t\t$fields = $fields->reject(function ($field) {\n\t\t\t\treturn $field === 'lft' || $field === 'rght';\n\t\t\t});\n\t\t}\n\n\t\t$skipFields = ['password', 'slug', 'created_by', 'modified_by', 'approved_by', 'deleted_by'];\n\t\t$customProperty = $type ? 'scaffoldSkipFields' . ucfirst($type) : null;\n\t\tif ($type && $modelObject && property_exists($modelObject, $customProperty)) {\n\t\t\t$skipFields = array_merge($skipFields, (array)$modelObject->$customProperty);\n\t\t}\n\t\tif ($modelObject && property_exists($modelObject, 'scaffoldSkipFields')) {\n\t\t\t$skipFields = array_merge($skipFields, (array)$modelObject->scaffoldSkipFields);\n\t\t}\n\n\t\t$fields = $fields->reject(function ($field) use ($skipFields) {\n\t\t\treturn in_array($field, $skipFields, true);\n\t\t});\n\n\t\treturn $fields->toArray();\n\t}", "title": "" }, { "docid": "f4ec81703cab4db9a43708d2c7aa793d", "score": "0.49108928", "text": "public function getBoostQueryFields();", "title": "" }, { "docid": "bc9c251edb02468efa127a1d2c2ea516", "score": "0.4909269", "text": "public function getFilterableFilter();", "title": "" }, { "docid": "6ed55d2306a0d011a8ee9325d9972bca", "score": "0.490892", "text": "public function noFilter()\n {\n $this->filter = null;\n\n return $this;\n }", "title": "" }, { "docid": "40a1e54883c3ff49289926d24836d98b", "score": "0.4907767", "text": "public function testThatGetAllUsersIncludeFieldsIsNotOverwritten()\n {\n $api = new MockManagementApi( [new Response( 200, self::$headers ) ] );\n\n $api->call()->users->getAll( [ 'include_fields' => false ], [ 'field3' ], true );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'fields=field3', $query );\n $this->assertContains( 'include_fields=false', $query );\n }", "title": "" }, { "docid": "c7a7adb12ac80932022bcbb98b603c6d", "score": "0.49025303", "text": "protected function filters()\n {\n }", "title": "" } ]
5495327ab12474735beb81e89cd2ea01
Gets the corresponding route name for the given entity.
[ { "docid": "01ee4ec6025b23f3c03753f9f562bd8c", "score": "0.8005769", "text": "public function getCorrespondingRouteNameForEntity(EntityInterface $entity): ?string;", "title": "" } ]
[ { "docid": "f12d405d4905f9803dc1509d3e18db83", "score": "0.68744326", "text": "function getRouteName();", "title": "" }, { "docid": "741d2f204566fe902d7bd64fb659e5c8", "score": "0.68318397", "text": "abstract protected function getRouteName();", "title": "" }, { "docid": "e2815df19c9a78d5acf4a6526d1ded95", "score": "0.66219294", "text": "public function getRouteKeyName()\n {\n return $this->getResolvableField();\n }", "title": "" }, { "docid": "99950a009607300842ce77bad3054083", "score": "0.65744174", "text": "public function getRouteName(): string\n {\n return $this->routeName;\n }", "title": "" }, { "docid": "d99a77794215ff62384391c25a83bdf7", "score": "0.65706617", "text": "public function getRouteName(): string\n {\n if (!isset($this->route)) {\n return str_replace(\n '\\\\',\n '',\n Str::snake(class_basename($this))\n );\n }\n return $this->route;\n }", "title": "" }, { "docid": "0c00f7652516fb98e4972f39ff8162ba", "score": "0.6425497", "text": "function get_route_name() {\n\t\treturn Handler::getRouteName();\n\t}", "title": "" }, { "docid": "d8b6fa0001edbd3eb7d5cc8ea12ed463", "score": "0.6373104", "text": "abstract protected function getEntityFriendlyName($entity) : string;", "title": "" }, { "docid": "6fd0e98fd14b0e2c5acc5594f6dd57cc", "score": "0.6342252", "text": "public function getCurrentRouteName();", "title": "" }, { "docid": "e1390fd846f976887b5b65cd9015104f", "score": "0.63055706", "text": "public function getRouteKeyName()\n {\n return $this->getQualifiedKeyName();\n }", "title": "" }, { "docid": "ae87e469aabbb880ae4fa052dee55c81", "score": "0.6303467", "text": "public function getRouteName()\n {\n return $this->routeName;\n }", "title": "" }, { "docid": "ae87e469aabbb880ae4fa052dee55c81", "score": "0.6303467", "text": "public function getRouteName()\n {\n return $this->routeName;\n }", "title": "" }, { "docid": "ae87e469aabbb880ae4fa052dee55c81", "score": "0.6303467", "text": "public function getRouteName()\n {\n return $this->routeName;\n }", "title": "" }, { "docid": "c74706f38d4fe8f648c11b2c0119c0bf", "score": "0.62996304", "text": "public function get()\n {\n $route = $this->router->current();\n\n if (is_null($route)) {\n return '';\n }\n\n $name = $route->getName();\n\n if (is_null($name)) {\n $this->routeNotNamed($route);\n }\n\n return $name;\n }", "title": "" }, { "docid": "ef493d385fcdd5e2b3ecad20c933981f", "score": "0.6260005", "text": "public function getRouteKeyName()\n {\n // $channel is refer to Id , so we put this function for point $channel to slug\n return 'slug';\n }", "title": "" }, { "docid": "0146ec9abff5a30178d41b2ee5b9bc7a", "score": "0.625791", "text": "public function getName($entity)\n { \n $fCache = $this->getFilterCache($entity);\n return isset($fCache['name']) ? $fCache['name'] : null;\n }", "title": "" }, { "docid": "2a6790e9a708528bb934ac77754f5788", "score": "0.62464696", "text": "public function routeName() {\n if (!$this->currentRoute) {\n $request = $this->stack->getCurrentRequest();\n\n if ($request instanceof Request) {\n $this->currentRoute = $request->get('_route');\n }\n }\n\n return $this->currentRoute;\n }", "title": "" }, { "docid": "09664930c8a8fd7305898836583b9ed6", "score": "0.62101334", "text": "public function getRouteKeyName()\n {\n //here instead of id we declare name\n return 'name';\n }", "title": "" }, { "docid": "bd9477f23398865ca4064ba8047acecb", "score": "0.62057424", "text": "public function getRouteKeyName(): string\n {\n if (request()->expectsJson()) {\n return 'id';\n }\n\n return 'slug';\n }", "title": "" }, { "docid": "255a89b3d5fdd56205ae0f2cf6dee9e5", "score": "0.6180438", "text": "public function getRouteName() {\n\t\treturn $this->route_name;\n\t}", "title": "" }, { "docid": "07788b6b4f1c59c42478c58e5a06edb2", "score": "0.6161094", "text": "public function getRouteKeyName()\n {\n return $this->getSlugStorageAttribute();\n }", "title": "" }, { "docid": "2a130ef9669131ae5464768f4382ba74", "score": "0.61483806", "text": "public function getRouteKeyName()\n {\n // Campo por el que se quiere encontar el dato del modelo\n return 'url';\n }", "title": "" }, { "docid": "e733253b220ff03904ea08631ed9d41b", "score": "0.61222565", "text": "public function getFirstRouteName();", "title": "" }, { "docid": "3ee7950fc452bc93e2ac226c22143fee", "score": "0.6104616", "text": "public function getUrlFromEntity($entity) {\n return Url::fromRoute('entity.node.canonical', ['node' => $entity->get('nid')->value], ['absolute' => TRUE])->toString();\n }", "title": "" }, { "docid": "6def12d497582499f4c4c218fbefa8d4", "score": "0.60800916", "text": "protected function getIndexRoute() {\n\t\treturn 'admin_' . ClassUtils::getClassName($this->getEntityType());\n\t}", "title": "" }, { "docid": "e20165fc8a51cbaa7cec4cb19251833d", "score": "0.6054638", "text": "public function getName($entity, $format = null, $locale = null)\n {\n if (null === $entity) {\n return null;\n }\n\n $result = null;\n $formats = $this->getFormatConfig($format ?: $this->defaultFormat);\n $providers = $this->getProviders();\n foreach ($formats as $currentFormat) {\n foreach ($providers as $provider) {\n $val = $provider->getName($currentFormat['name'], $locale, $entity);\n if (false !== $val) {\n $result = $val;\n break 2;\n }\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "bd0750a57b3d5b873e5378fc7837f04c", "score": "0.6049679", "text": "protected function lookupPath($entity)\n {\n $lookupField = $this->lookupField;\n if (!$entity->$lookupField) {\n throw new \\Exception('Missing required property: ' . $lookupField);\n }\n return $this->getPath($entity->$lookupField);\n }", "title": "" }, { "docid": "75f9c46dcd2f20321c9be1e26922a4a9", "score": "0.60310507", "text": "public function getRouteKeyName()\n {\n return 'identifier';\n }", "title": "" }, { "docid": "2cb40833ad71bb7317e4ec0f4c9d2438", "score": "0.6015217", "text": "public function getRouteKeyName()\n {\n return 'name';\n }", "title": "" }, { "docid": "2cb40833ad71bb7317e4ec0f4c9d2438", "score": "0.6015217", "text": "public function getRouteKeyName()\n {\n return 'name';\n }", "title": "" }, { "docid": "2cb40833ad71bb7317e4ec0f4c9d2438", "score": "0.6015217", "text": "public function getRouteKeyName()\n {\n return 'name';\n }", "title": "" }, { "docid": "2cb40833ad71bb7317e4ec0f4c9d2438", "score": "0.6015217", "text": "public function getRouteKeyName()\n {\n return 'name';\n }", "title": "" }, { "docid": "b2eb9e80eb7c63411d2dc05fccb2b8d4", "score": "0.6013393", "text": "public function getRouteKeyName()\n {\n return 'uri';\n }", "title": "" }, { "docid": "479df3e17b69a1229cb1c279f8c0eeb3", "score": "0.601303", "text": "public function currentRouteName()\n {\n if (! is_null($route = $this->current())) {\n return $route->getName();\n }\n }", "title": "" }, { "docid": "ea291b0e5d15587f653f1225f180f446", "score": "0.595898", "text": "public function getRouteKeyName()\r\n {\r\n return 'node';\r\n }", "title": "" }, { "docid": "94e4b5ebde17afb8c71193463f1a088b", "score": "0.59517413", "text": "public function getRouteKeyName()\n\t{\n\t\treturn 'name';\n\t}", "title": "" }, { "docid": "94e4b5ebde17afb8c71193463f1a088b", "score": "0.59517413", "text": "public function getRouteKeyName()\n\t{\n\t\treturn 'name';\n\t}", "title": "" }, { "docid": "f12e135ae8dd6f152cd1c61986463096", "score": "0.5939505", "text": "public function entityAlias($entity) {\n $url = '';\n if ($entity) {\n $url = $entity->toUrl()->toString();\n }\n return $url;\n }", "title": "" }, { "docid": "43f7bae5f5512c21b52e507a1d969248", "score": "0.5937824", "text": "public function getRouteKeyName()\n {\n \treturn 'name';\n }", "title": "" }, { "docid": "6d9e1f45f7f189a753785036d7891af2", "score": "0.5922206", "text": "public function entity_identifier($entity) {\n $entity_info = entity_get_info($this->entity_type);\n return t('This @entity', array('@entity' => $entity_info['label']));\n }", "title": "" }, { "docid": "f2a2df1f8cb9f4c0d9fd95ee58cae736", "score": "0.5916938", "text": "protected function getEntityName($entity)\n {\n return get_class($entity);\n }", "title": "" }, { "docid": "07c653d2ff301bbecbdbaff30149f115", "score": "0.59053844", "text": "public function getRouteName($route)\n {\n if (! $this->routePath) {\n // Grab route_prefix config first. If it's not set,\n // grab the resources, and replace `\\` with `.`, and\n // transform it all to lowercase.\n $this->routePath = $this->getConfig('route_prefix')\n ?: str_replace('\\\\', '.', strtolower($this->getConfig('resources')));\n }\n\n return \"{$this->routePath}.v{$this->current}\" . Str::after($route, $this->routePath);\n }", "title": "" }, { "docid": "cd9916577972004656e1aa59884311f4", "score": "0.5905228", "text": "public function getRouteFormattedName()\n {\n return P4Cms_Controller_Router_Route_Module::formatRouteParam(\n $this->getName()\n );\n }", "title": "" }, { "docid": "8c06296b32ad2e6433749f86c795bb2a", "score": "0.5904376", "text": "public function getRoute(): string\n {\n return $this->route;\n }", "title": "" }, { "docid": "b9fc79901881d19d4923f4e42717e3fa", "score": "0.5875308", "text": "protected function getRelationshipMethodName($model, $singular = true)\n {\n $name = camel_case(class_basename($model));\n\n return $singular ? $name : str_plural($name);\n }", "title": "" }, { "docid": "1a00470053e08be1538cbf646904ed3b", "score": "0.5839505", "text": "public function name(): ?string\n {\n return optional($this->route)->getName();\n }", "title": "" }, { "docid": "e58ec2962902ab1a22bfc229030f15e0", "score": "0.58134466", "text": "public function getRouteKeyName()\n {\n return 'post_name';\n }", "title": "" }, { "docid": "3dfb2c116a52248baa11d5ddac6b8469", "score": "0.58118284", "text": "public function getRouteParameterName()\n {\n return $this->parameterName;\n }", "title": "" }, { "docid": "17cb265099a811e0cfb283109bba64df", "score": "0.5809214", "text": "public function getRouteKeyName() // getRouteKeyName() how to find product, to change recherge from id to slug \n {\n return \"slug\";\n }", "title": "" }, { "docid": "23714426fbd85df167a9ff96b311f7cc", "score": "0.58061117", "text": "public function getEntityName();", "title": "" }, { "docid": "bdf49f4908d122ebff8c1e93a128ab41", "score": "0.58030665", "text": "public static function name(Route $route) {\r\n\t\treturn array_search ( $route, Route::$_routes );\r\n\t}", "title": "" }, { "docid": "e4d087e0e4c44e3333340884a5332ace", "score": "0.5768311", "text": "public function getRouteKeyName() : string\n {\n return 'slug';\n }", "title": "" }, { "docid": "74ae90687d76faa97a799079b00a955f", "score": "0.5737478", "text": "public function getRoute()\n\t{\n\t\treturn $this->action !== null ? $this->getUniqueId() . '/' . $this->action->id : $this->getUniqueId();\n\t}", "title": "" }, { "docid": "9877993f1a1dcbfd5082852e2954a03c", "score": "0.57318115", "text": "public function getRouteByEntity($object, $action) {\n\t\t$slug = $this->getAdminSlug($object);\n\t\t$route = $this->getRouteBySlug($slug, $action);\n\n\t\treturn $route;\n\t}", "title": "" }, { "docid": "f52eebdf30abfe4cf044dbb58ccb26f2", "score": "0.5704266", "text": "private function getDisplayName($entity, $columnName)\n {\n try {\n $reflProperty = new \\ReflectionProperty(get_class($entity), $columnName);\n $annotationReader = new AnnotationReader();\n } catch (\\ReflectionException $exception) {\n return $columnName;\n } catch (AnnotationException $exception) {\n return $columnName;\n } catch (\\Exception $exception) {\n return $columnName;\n }\n\n $propertyAnnotations = $annotationReader->getPropertyAnnotations($reflProperty);\n\n foreach ($propertyAnnotations as $index => $propertyAnnotation) {\n if ($propertyAnnotation instanceof HistorizationDisplayName) {\n $chosenDisplayName = $propertyAnnotation->getHistorizationDisplayName();\n\n return $chosenDisplayName;\n }\n }\n\n return $columnName;\n }", "title": "" }, { "docid": "158c101dbc8e3939f000c0849ad634e8", "score": "0.5703497", "text": "public function getEntityName(): string\n {\n return $this->entityName;\n }", "title": "" }, { "docid": "158c101dbc8e3939f000c0849ad634e8", "score": "0.5703497", "text": "public function getEntityName(): string\n {\n return $this->entityName;\n }", "title": "" }, { "docid": "b1375e73a3bb289236264945e0d94a1d", "score": "0.56783086", "text": "public function getIdentifier(): ?string {\r\n return $this -> routeEntity -> getIdentifier();\r\n }", "title": "" }, { "docid": "55b887038ebc23512217a73d55d8c2bd", "score": "0.56681967", "text": "public function get_resource_name()\n\t{\n\t\tif (empty($this->resource_name))\n\t\t{\n\t\t\t$this->resource_name = Rest_Route::parse($this);\n\t\t}\n\t\treturn $this->resource_name;\n\t}", "title": "" }, { "docid": "bc0ab0f261804c36c03c4e15b13a2013", "score": "0.5658218", "text": "public function getRouteKeyName(): string\n {\n return 'slug';\n }", "title": "" }, { "docid": "bc0ab0f261804c36c03c4e15b13a2013", "score": "0.5658218", "text": "public function getRouteKeyName(): string\n {\n return 'slug';\n }", "title": "" }, { "docid": "59f1a3a99584dac3123b42a7896e4c02", "score": "0.56570584", "text": "public function getRouteKeyName()\n {\n\t\treturn 'id';\n\t}", "title": "" }, { "docid": "929033c933b39d8fe57242d8c67010d8", "score": "0.56458086", "text": "public function getTableName($entity)\n\t{\n\t\treturn Mage::getSingleton('core/resource')->getTableName($entity);\n\t}", "title": "" }, { "docid": "221711d01b5449156dd0ae2688d737c6", "score": "0.56427544", "text": "private function getRelationshipKey(string $entityKey): string|null\n\t{\n\t\t$this->normalizeRelationships();\n\n\t\t$key = $this->normalizedRelationships[$entityKey] ?? null;\n\n\t\treturn is_string($key) ? $key : null;\n\t}", "title": "" }, { "docid": "506c4375f9a1b100fc9943717787424c", "score": "0.563666", "text": "protected function getRouteId() {\n $routeId = $this->getTable();\n\n // Replace '_' with '-' for restful routes\n return str_replace(\"_\", \"-\", $routeId);\n }", "title": "" }, { "docid": "c459b394d049dcd249d0af16b2349463", "score": "0.56332994", "text": "public function getRouteKeyName()\n\t{\n\t return 'type';\n\t}", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" }, { "docid": "866c1d5c22c69cfff95b34e48d2ecf31", "score": "0.5612421", "text": "public function getRouteKeyName()\n {\n return 'slug';\n }", "title": "" } ]
3a516e6acb16dfa6cac5e1fce9c59437
Destroy Test Create a record. Call delete request.
[ { "docid": "e9eb0b588311b99e2199e37a1f27dfca", "score": "0.7437457", "text": "public function test_destroy()\n {\n // add a record\n $blog = Blog::factory()->create();\n\n // request\n $response = $this->delete('api/blogs/' . $blog->id);\n\n // assert response\n $response->assertStatus(200);\n\n // assert database with will create data.\n $this->assertSoftDeleted('blogs', $blog->getAttributes());\n }", "title": "" } ]
[ { "docid": "5384f5e850829d7a0b56b51e321b470c", "score": "0.7318502", "text": "public function testDelete() {\n $c = Client::create($this->createData);\n \n $this->assertEquals(null, $c->delete());\n }", "title": "" }, { "docid": "dfcd3d8fcdc15376064f77d1431f1376", "score": "0.7284074", "text": "public function delete() {\n $this->record->delete();\n }", "title": "" }, { "docid": "cf6f7e31ead94d4ca26a020b815153ca", "score": "0.726602", "text": "public function testDelete()\n {\n $model = factory($this->model)->create();\n\n $this->actingAs($this->actingAs, 'api')\n ->deleteJson(route($this->route . '.destroy', [$this->route => $model->id]))\n ->assertNoContent();\n\n $this->assertDeleted($model);\n }", "title": "" }, { "docid": "b10d7f97a2bab43b3be490df31e4101c", "score": "0.6967856", "text": "public function destroy(Record $record){\n //\n }", "title": "" }, { "docid": "6ff30a1679af5d74e8035ce89ddd44d9", "score": "0.6906587", "text": "public function test_delete_user(){\n $user = User::factory()->create();\n $request = Request::create('/users/delete', 'POST',[\n 'id' => $user->id,\n ]);\n $controller = new UserController();\n $response = $controller->destroy($request);\n $this->assertEquals(302, $response->getStatusCode());\n }", "title": "" }, { "docid": "b77af636382f61249555dd575dab9e6c", "score": "0.6906006", "text": "public function testDestroying() {\n $product = factory(Product::class)->create();\n\n $response = $this->delete('/api/product/'.$product->id);\n\n $response->assertStatus(200);\n $response->assertExactJson(['status' => true]);\n }", "title": "" }, { "docid": "620aa4222398a11ff168dd111515a0db", "score": "0.68563515", "text": "public function testDestroySuccess()\n {\n $task = Task::factory()->create();\n\n // Check database\n $this->assertDatabaseHas(app(Task::class)->getTable(), ['id' => $task->id, 'deleted_at' => null]);\n\n // Delete the task\n $this->deleteJson('api/tasks/' . $task->id)\n ->assertStatus(200)\n ->assertJson(['result' => true]);\n\n // Check database\n $this->assertDatabaseMissing(app(Task::class)->getTable(), ['id' => $task->id, 'deleted_at' => null]);\n }", "title": "" }, { "docid": "437737d434bf6307e5015ea61f881635", "score": "0.68195534", "text": "public function destroy(Record $record)\n {\n //\n }", "title": "" }, { "docid": "437737d434bf6307e5015ea61f881635", "score": "0.68195534", "text": "public function destroy(Record $record)\n {\n //\n }", "title": "" }, { "docid": "437737d434bf6307e5015ea61f881635", "score": "0.68195534", "text": "public function destroy(Record $record)\n {\n //\n }", "title": "" }, { "docid": "437737d434bf6307e5015ea61f881635", "score": "0.68195534", "text": "public function destroy(Record $record)\n {\n //\n }", "title": "" }, { "docid": "b9602b386f75901403e7451e32a21242", "score": "0.68176836", "text": "public function testDeleteARecording()\n {\n }", "title": "" }, { "docid": "9d0db665d2bb3ec68e8efdd9953dee98", "score": "0.6740139", "text": "public function delete_destroy() \n\t {\n\t\t\tFixture::find(Input::get('id'))->delete();\n\t\t\treturn Redirect::to_route('fixture_list')->with('flash', 'Fixture was deleted successfully');\n\t }", "title": "" }, { "docid": "f1d5b9d222255038286ab24976b50b4d", "score": "0.6722721", "text": "function testDestroy() {\n $this->assertTrue($this->get(WEBSITE_URL . '/' . $this->aRequest['controller'] . '/1/destroy'));\n $this->assert404();\n }", "title": "" }, { "docid": "47e21ffd3cbae6fec6d58301668750d4", "score": "0.67080873", "text": "public function testDelete()\n {\n $this->deleteTest(3);\n }", "title": "" }, { "docid": "0756098fc46c8184178558eee1a359d1", "score": "0.6707914", "text": "public function actionTestDelete() {\r\n\t\t$ch = curl_init();\r\n\r\n\t\tcurl_setopt($ch, CURLOPT_URL, $_SERVER['HTTP_HOST'].'/api/1/apps/testobjid');\r\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');\r\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, [\r\n\t\t\t'Accept: text/plain',\r\n\t\t]);\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\r\n\t\techo curl_exec($ch);\r\n\t\techo '<br/><br/>';\r\n\t\techo '<pre>'.var_export(curl_getinfo($ch), true).'</pre>';\r\n\r\n\t\tcurl_close($ch);\r\n\t}", "title": "" }, { "docid": "a37f0d386875756b04d5f833a5bee26e", "score": "0.67048186", "text": "public function testDelete()\n\t{\n\t\t$this->be(User::first());\n\t\t$this->runStore($this->input);\n\t\t$receipt = new ReceiptController;\n \t$receipt->delete(1);\n\t\t$receiptDeleted = Receipt::withTrashed()->find(1);\n\t\t$this->assertNotNull($receiptDeleted->deleted_at);\n\t}", "title": "" }, { "docid": "0b1565875dc13854ac2a0a42f2ca6afb", "score": "0.66937107", "text": "public function testDestroy()\n {\n $post = Post::create([\n 'title' => $this->fake->text\n ]);\n\n $res = $this->call('DELETE', '/api/v1/posts/'.$post->id);\n\n $this->assertEquals(Response::HTTP_NO_CONTENT, $res->getStatusCode());\n $this->assertNull(Post::find($post->id));\n }", "title": "" }, { "docid": "a7a4cd87d954ac5ea602e34f2b6690fb", "score": "0.6679791", "text": "public function testDelete()\n {\n }", "title": "" }, { "docid": "37d5fc0f45ff095e0cbcb22bd7d07f5c", "score": "0.6663038", "text": "public function destroy(Test $test)\n {\n\n// $this->authorize('delete',$test);\n $test->delete();\n return redirect('/tests')->with('success','test is deleted');\n }", "title": "" }, { "docid": "a60ca89a206e103d41ef8e6a2e2da937", "score": "0.66628075", "text": "public function testDelete()\n {\n /*$this->routeMatch->setParam('id', '1');\n $this->request->setMethod('delete');\n \n $result = $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n \n $this->assertEquals(200, $response->getStatusCode());*/\n }", "title": "" }, { "docid": "8f680c57c7189b619911fd0c4a9fca95", "score": "0.6632806", "text": "public function testDelete() {\n $recipient = OmiseRecipient::retrieve('recp_test_508a9dytz793gxv9m77');\n $recipient->destroy();\n\n $this->assertTrue($recipient->isDestroyed());\n }", "title": "" }, { "docid": "6f58f6c16dc40c8ed9cbab5d52b736e8", "score": "0.66300017", "text": "public function testDelete()\n {\n $this->deleteTest(2);\n }", "title": "" }, { "docid": "d84c6ee827ba95911f2db9e0df6828b6", "score": "0.66137207", "text": "public function testDeleteTwice()\n {\n $model = factory($this->model)->create();\n\n $this->actingAs($this->actingAs, 'api')\n ->deleteJson(route($this->route . '.destroy', [$this->route => $model->id]))\n ->assertNoContent();\n\n $this->assertDeleted($model);\n\n $this->actingAs($this->actingAs, 'api')\n ->deleteJson(route($this->route . '.destroy', [$this->route => $model->id]))\n ->assertStatus(404);\n }", "title": "" }, { "docid": "881096a106b5873920638d20f04bb33d", "score": "0.6613674", "text": "public function testDelete(): void\n {\n $response = $this->getHandler([\n new Response(204, [], null),\n ])->executeAndRespond(new EntityStub(['entityId' => 'entity-id']), RequestAwareInterface::DELETE, 'api-key');\n\n self::assertNull($response);\n }", "title": "" }, { "docid": "83c1c8de3569a838b6e1fea487429bc3", "score": "0.6592254", "text": "public function destroy($id)\n {\n $obj = Employee::find($id);\n $obj->delete(); \n \n echo 'record delete';\n }", "title": "" }, { "docid": "6c374e394b26478b76cba1e94a9b88da", "score": "0.6578305", "text": "public function destroy($id)\n {\n // test\n }", "title": "" }, { "docid": "2f3d9baea14f1d759e58bb8b7351c8ac", "score": "0.6576869", "text": "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/school/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('School', 'schoolId', self::$objectId);\n }", "title": "" }, { "docid": "889147de50e23036e9fb1a2fc099de73", "score": "0.6552883", "text": "public function testDeleteTransaction(): void {\n Passport::actingAs(self::$user);\n\n $response = $this->delete('/api/transaction/' . self::$createResponse['data']['transactionId'] . '/delete');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "46c58731032b280155d30670a38969bb", "score": "0.6549052", "text": "public function test_delete_apartment()\n {\n //Creates a new instance of an apartment\n $apartment = Apartment::factory()->create();\n\n $this->json('DELETE', 'api/apartment/' . $apartment->ext_id, [], ['Accept' => 'application/json'])\n ->assertStatus(200);\n\n }", "title": "" }, { "docid": "6551eaad6a2c8dc8500b9a2720368d15", "score": "0.6545867", "text": "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/ride/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Ride', 'rideId', self::$objectId);\n }", "title": "" }, { "docid": "ae60ca86a56f6d18b53d11f04a742319", "score": "0.65433836", "text": "public function deleteTestCase(Request $request){\n $request->validate(['id'=>'required']); \n TestCase::find($request->input('id'))->delete(); \n return redirect('/')->with('success','Data deleted.');\n }", "title": "" }, { "docid": "8dc0ec4df1f6dcb82cb2953bd743d1d0", "score": "0.6535501", "text": "public function testDeleteModelUsingDelete()\n {\n }", "title": "" }, { "docid": "cab8d971dc20ff1c0b6bd0baba82c49b", "score": "0.6512369", "text": "public function testDeleteAction()\n \t{\n $id = 10;\n $this->routeMatch->setParam('action', 'delete');\n $this->routeMatch->setParam('id', $id);\n\n $params = array(\n 'id' => $id,\n 'del' => 'Yes',\n );\n $parameters = new Parameters();\n $parameters->fromArray($params);\n $this->request->setMethod('POST')\n ->setPost($parameters);\n\n $this->controller->dispatch($this->request);\n $response = $this->controller->getResponse();\n\n \t\t$this->assertEquals(302, $response->getStatusCode());\n \t}", "title": "" }, { "docid": "4127e7eaa9d1cb82cd2f952608459ecf", "score": "0.6506385", "text": "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/food/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Food', 'foodId', self::$objectId);\n }", "title": "" }, { "docid": "eb0f8d3b98b8e245b1004ad18013290d", "score": "0.65047663", "text": "public function testDelete()\n {\n $author = factory(Author::class)->create();\n\n $response = $this->get('/authors', ['id' => $author->id]);\n $response->assertStatus(200);\n $response->assertSee('Author Deleted!');\n }", "title": "" }, { "docid": "821add1cd7d817beb8ce903d0d6c7a00", "score": "0.6502359", "text": "public function testBasicDestroy()\n {\n $this->asSuper();\n\n $this->delete(\"/api/memberships/1\")->assertStatus(404);\n\n $membershipA = factory(Membership::class)->create();\n $membershipB = factory(Membership::class)->create();\n\n $this->assertDatabaseHas('memberships', ['id' => $membershipA->id]);\n $this->assertDatabaseHas('memberships', ['id' => $membershipB->id]);\n\n $this->delete(\"/api/memberships/{$membershipA->id}\")->assertStatus(200);\n\n $this->assertDatabaseMissing('memberships', ['id' => $membershipA->id]);\n $this->assertDatabaseHas('memberships', ['id' => $membershipB->id]);\n\n $this->delete(\"/api/memberships/{$membershipA->id}\")->assertStatus(404);\n $this->delete(\"/api/memberships/{$membershipB->id}\")->assertStatus(200);\n\n $this->assertDatabaseMissing('memberships', ['id' => $membershipA->id]);\n $this->assertDatabaseMissing('memberships', ['id' => $membershipB->id]);\n\n }", "title": "" }, { "docid": "6d8a16b9794007744ec029669d71d795", "score": "0.6495477", "text": "public function delete(): Result;", "title": "" }, { "docid": "c82dd1b9fb5dbfe2427b8a0867c0822f", "score": "0.64954084", "text": "function delete(Rage4Api $api)\r\n {\r\n $api->deleteRecord($this->id);\r\n }", "title": "" }, { "docid": "d6ceb5558eef2285a75b463ae5829f83", "score": "0.6476362", "text": "public function testDeletePost()\n {\n\n }", "title": "" }, { "docid": "15501fc444860e37f7e68b2279dd0d53", "score": "0.6468554", "text": "public function destroy(Request $request)\n {\n\n $deleted = $this->tadabaseServices->delete_record($request->table_id, $request->record_id);\n\n return back()->with('success','Record deleted successfully');\n }", "title": "" }, { "docid": "d7e59f30ca5592afd870a80709f5d263", "score": "0.64638466", "text": "public function destroy(Inputrecord $inputrecord)\n {\n \n }", "title": "" }, { "docid": "68fce5c3e4bd7d82c1c491cce703b3bc", "score": "0.64626443", "text": "public function testDeleteModelHoldingUsingDelete()\n {\n }", "title": "" }, { "docid": "2045ed1a5379a5b21780bdb0aceaed46", "score": "0.6438199", "text": "function test_UnidadMedida_Delete()\n { \n $this->json('DELETE', 'api/v1/unidadmedida/1', ['Content-Type' =>'application/json', 'Accept' => 'application/json'])\n ->assertStatus(204);\n }", "title": "" }, { "docid": "849372e907a6f62f56e335a3e67083bc", "score": "0.6433058", "text": "public function delete(){}", "title": "" }, { "docid": "849372e907a6f62f56e335a3e67083bc", "score": "0.6433058", "text": "public function delete(){}", "title": "" }, { "docid": "36a08e846730ec8e5f9bd4beb0cf9e97", "score": "0.64248616", "text": "public function testDestroyNote() {\n\n $user = User::inRandomOrder()->first(); \n $record = Note::inRandomOrder()->first(); \n $response = $this->actingAs($user, 'api')->json('delete','/Note/'+$record->id+''); \n$response->assertOk(); \n}", "title": "" }, { "docid": "8f5d2e6dbfa674946b076bcea84877f4", "score": "0.64080757", "text": "public function test_can_delete_an_order()\n { \n Order::factory()->create();\n $order = Order::first();\n \n $response = $this->json('DELETE', 'v1/order/'.$order->id); \n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]); \n }", "title": "" }, { "docid": "b57144dd81c69e73260e34d4bb47bcc6", "score": "0.64043075", "text": "public function testItCanDestroyEntity()\n {\n $entity = factory(User::class)->create();\n\n $response = $this->userService->delete($entity->id);\n\n $this->assertTrue($response);\n }", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" }, { "docid": "af0643a44ddd78a45d8160d1456861e0", "score": "0.6404155", "text": "public function delete() {}", "title": "" } ]
d3fa2858f46a0a39c96ce67f4833182e
ManyToOne (inverse side) Get fkFolhapagamentoEventoComplementarCalculado
[ { "docid": "78ae6145b693d801c4fc1d1012af9da0", "score": "0.76313394", "text": "public function getFkFolhapagamentoEventoComplementarCalculado()\n {\n return $this->fkFolhapagamentoEventoComplementarCalculado;\n }", "title": "" } ]
[ { "docid": "a02983fceb2d460c4e7ac53c1e24929c", "score": "0.7219454", "text": "public function getFkFolhapagamentoEvento()\n {\n return $this->fkFolhapagamentoEvento;\n }", "title": "" }, { "docid": "a02983fceb2d460c4e7ac53c1e24929c", "score": "0.7219454", "text": "public function getFkFolhapagamentoEvento()\n {\n return $this->fkFolhapagamentoEvento;\n }", "title": "" }, { "docid": "a02983fceb2d460c4e7ac53c1e24929c", "score": "0.7219454", "text": "public function getFkFolhapagamentoEvento()\n {\n return $this->fkFolhapagamentoEvento;\n }", "title": "" }, { "docid": "a02983fceb2d460c4e7ac53c1e24929c", "score": "0.7219454", "text": "public function getFkFolhapagamentoEvento()\n {\n return $this->fkFolhapagamentoEvento;\n }", "title": "" }, { "docid": "6c298031c69590e318b01347ab21d8f4", "score": "0.6906995", "text": "public function getFkFolhapagamentoRegistroEvento()\n {\n return $this->fkFolhapagamentoRegistroEvento;\n }", "title": "" }, { "docid": "423880b81fd4a50e4f3d15553e196724", "score": "0.6841217", "text": "public function getFkFolhapagamentoSequenciaCalculo()\n {\n return $this->fkFolhapagamentoSequenciaCalculo;\n }", "title": "" }, { "docid": "aab8c03c885d90a7a9719ef60cf168d8", "score": "0.6725086", "text": "public function getFkFolhapagamentoBasesEventos()\n {\n return $this->fkFolhapagamentoBasesEventos;\n }", "title": "" }, { "docid": "3cbe11e5859959ee8e45cf2fbf41db97", "score": "0.6699166", "text": "public function getFkFolhapagamentoEventoRescisaoCalculado()\n {\n return $this->fkFolhapagamentoEventoRescisaoCalculado;\n }", "title": "" }, { "docid": "821e4cc4169ee3f84544a564f0af3f65", "score": "0.6668429", "text": "public function getFkPessoalDependente()\n {\n return $this->fkPessoalDependente;\n }", "title": "" }, { "docid": "b24a498d5e470ed4aed7a0ef2ae9f854", "score": "0.65861976", "text": "public function getFkCalendarioFeriado()\n {\n return $this->fkCalendarioFeriado;\n }", "title": "" }, { "docid": "d72725bd6a61b6130326f6d373fba10d", "score": "0.6466128", "text": "public function getFkFolhapagamentoBasesEventoCriados()\n {\n return $this->fkFolhapagamentoBasesEventoCriados;\n }", "title": "" }, { "docid": "015cad1caa06a020bdc7d4c4fc66a27d", "score": "0.63845503", "text": "public function getFkFolhapagamentoDeducaoDependentes()\n {\n return $this->fkFolhapagamentoDeducaoDependentes;\n }", "title": "" }, { "docid": "617ca582dbbfab03eb662e55aa52f553", "score": "0.63425756", "text": "public function getFkEconomicoCadastroEconomico()\n {\n return $this->fkEconomicoCadastroEconomico;\n }", "title": "" }, { "docid": "efa58ff2596d224ec94c2f1c83746b7c", "score": "0.6298515", "text": "public function getFkFolhapagamentoSalarioFamiliaEventos()\n {\n return $this->fkFolhapagamentoSalarioFamiliaEventos;\n }", "title": "" }, { "docid": "d6dd66ba7f3cb7a03d2f613231e8dc37", "score": "0.626273", "text": "public function getFkFolhapagamentoTabelaIrrfEventos()\n {\n return $this->fkFolhapagamentoTabelaIrrfEventos;\n }", "title": "" }, { "docid": "3a82d270e252eeb4fe188c1d82004477", "score": "0.62481874", "text": "public function getFkPessoalContrato()\n {\n return $this->fkPessoalContrato;\n }", "title": "" }, { "docid": "3a82d270e252eeb4fe188c1d82004477", "score": "0.62481874", "text": "public function getFkPessoalContrato()\n {\n return $this->fkPessoalContrato;\n }", "title": "" }, { "docid": "78053e03370b2b17d84e7f8bc92fc72b", "score": "0.6242592", "text": "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "title": "" }, { "docid": "78053e03370b2b17d84e7f8bc92fc72b", "score": "0.6242592", "text": "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "title": "" }, { "docid": "0d8e1a6760cba8249f73c0df275ac64a", "score": "0.6216131", "text": "public function dependencia_academico()\n {\n return $this->belongsto(Dependencia::class,'dependencia_academico_id','id');\n }", "title": "" }, { "docid": "932b79cb16444580b6a8e66ee3774abe", "score": "0.6193498", "text": "public function getFkEconomicoModalidadeLancamento()\n {\n return $this->fkEconomicoModalidadeLancamento;\n }", "title": "" }, { "docid": "ddd64eb1f57a2fcec2bcda3320fe59dd", "score": "0.61640173", "text": "public function getFkConcursoEdital()\n {\n return $this->fkConcursoEdital;\n }", "title": "" }, { "docid": "937e7cec1ca1d0c8f63f6ae0fad90a5b", "score": "0.61331886", "text": "public function getFkEmpenhoEmpenho()\n {\n return $this->fkEmpenhoEmpenho;\n }", "title": "" }, { "docid": "937e7cec1ca1d0c8f63f6ae0fad90a5b", "score": "0.61331886", "text": "public function getFkEmpenhoEmpenho()\n {\n return $this->fkEmpenhoEmpenho;\n }", "title": "" }, { "docid": "272e305748e5b8777a232545067e873a", "score": "0.61190367", "text": "public function getFkOrcamentoEntidade()\n {\n return $this->fkOrcamentoEntidade;\n }", "title": "" }, { "docid": "272e305748e5b8777a232545067e873a", "score": "0.61190367", "text": "public function getFkOrcamentoEntidade()\n {\n return $this->fkOrcamentoEntidade;\n }", "title": "" }, { "docid": "272e305748e5b8777a232545067e873a", "score": "0.61190367", "text": "public function getFkOrcamentoEntidade()\n {\n return $this->fkOrcamentoEntidade;\n }", "title": "" }, { "docid": "272e305748e5b8777a232545067e873a", "score": "0.61190367", "text": "public function getFkOrcamentoEntidade()\n {\n return $this->fkOrcamentoEntidade;\n }", "title": "" }, { "docid": "272e305748e5b8777a232545067e873a", "score": "0.61190367", "text": "public function getFkOrcamentoEntidade()\n {\n return $this->fkOrcamentoEntidade;\n }", "title": "" }, { "docid": "213608d62f95fc87d69522f6cebb0116", "score": "0.6117308", "text": "public function getFkFolhapagamentoConcessaoDecimos()\n {\n return $this->fkFolhapagamentoConcessaoDecimos;\n }", "title": "" }, { "docid": "42f5ef1c8a626190432e100d22001dcb", "score": "0.6071834", "text": "public function getFkFolhapagamentoRegistroEventoRescisao()\n {\n return $this->fkFolhapagamentoRegistroEventoRescisao;\n }", "title": "" }, { "docid": "a47b606c945262be2cb4a0999a4254c0", "score": "0.6066757", "text": "public function getFkOrcamentoDespesas()\n {\n return $this->fkOrcamentoDespesas;\n }", "title": "" }, { "docid": "a47b606c945262be2cb4a0999a4254c0", "score": "0.6066757", "text": "public function getFkOrcamentoDespesas()\n {\n return $this->fkOrcamentoDespesas;\n }", "title": "" }, { "docid": "a47b606c945262be2cb4a0999a4254c0", "score": "0.6066757", "text": "public function getFkOrcamentoDespesas()\n {\n return $this->fkOrcamentoDespesas;\n }", "title": "" }, { "docid": "9f6d9594575089d41de52fc93243e268", "score": "0.603529", "text": "public function getFkFolhapagamentoPeriodoMovimentacao()\n {\n return $this->fkFolhapagamentoPeriodoMovimentacao;\n }", "title": "" }, { "docid": "779ec1eb9805f1488222d349f9ae480a", "score": "0.60249954", "text": "public function getFkFolhapagamentoPrevidencia()\n {\n return $this->fkFolhapagamentoPrevidencia;\n }", "title": "" }, { "docid": "c7cd88544e6359b958a35bef968cc56f", "score": "0.60061127", "text": "public function getFkPessoalContratoPensionista()\n {\n return $this->fkPessoalContratoPensionista;\n }", "title": "" }, { "docid": "c287704fc5fa1c4e96d41842c49f8737", "score": "0.5995733", "text": "public function getFkImaConsignacaoEmprestimoBanrisul()\n {\n return $this->fkImaConsignacaoEmprestimoBanrisul;\n }", "title": "" }, { "docid": "ba1960cd51ad5a4a25c73fe8bf9583c2", "score": "0.59690213", "text": "public function getFkFrotaVeiculo()\n {\n return $this->fkFrotaVeiculo;\n }", "title": "" }, { "docid": "ba1960cd51ad5a4a25c73fe8bf9583c2", "score": "0.59690213", "text": "public function getFkFrotaVeiculo()\n {\n return $this->fkFrotaVeiculo;\n }", "title": "" }, { "docid": "ba1960cd51ad5a4a25c73fe8bf9583c2", "score": "0.59690213", "text": "public function getFkFrotaVeiculo()\n {\n return $this->fkFrotaVeiculo;\n }", "title": "" }, { "docid": "b6512592e3f460c8406dd9ac12f1a02c", "score": "0.59577936", "text": "public function getFundo()\n {\n return $this->hasOne(Fundo::className(), ['id' => 'Fundo_id']);\n }", "title": "" }, { "docid": "1c3dbac069f28043835c7ad700dcf1dc", "score": "0.5949512", "text": "public function getFkEconomicoCadastroEconomicoEmpresaDireito()\n {\n return $this->fkEconomicoCadastroEconomicoEmpresaDireito;\n }", "title": "" }, { "docid": "6a5bb6166969ce981fc736dd667801a8", "score": "0.5943268", "text": "public function getFkEmpenhoEmpenhos()\n {\n return $this->fkEmpenhoEmpenhos;\n }", "title": "" }, { "docid": "6048a8c8feff19058cbf968a969a9355", "score": "0.5899439", "text": "public function getFk()\n {\n return $this->_fk;\n }", "title": "" }, { "docid": "19fb3882175a7fddc2531a172bb33720", "score": "0.58943063", "text": "public function relDespesaFinanceira()\n {\n return $this->hasMany('App\\Models\\DespesaFinanceira', 'fk_medico');\n }", "title": "" }, { "docid": "945d0d90646312b508967104d0ced8c5", "score": "0.5892049", "text": "public function getDependenciaId()\n {\n return $this->dependencia_id;\n }", "title": "" }, { "docid": "e4b84bb3f807261548cd834d549c1603", "score": "0.58913845", "text": "public function getFkFolhapagamentoReajuste()\n {\n return $this->fkFolhapagamentoReajuste;\n }", "title": "" }, { "docid": "4777ae1a47ba2d3a732d0fd3fa402eb6", "score": "0.58445746", "text": "public function getFkMonetarioAcrescimo()\n {\n return $this->fkMonetarioAcrescimo;\n }", "title": "" }, { "docid": "b918769e4d9e6f7ba7e53b25b688065b", "score": "0.584103", "text": "public function getFkTesourariaFechamentos()\n {\n return $this->fkTesourariaFechamentos;\n }", "title": "" }, { "docid": "f531be951b54a5a81c9bea5dd54ba704", "score": "0.5839666", "text": "public function getFkMonetarioConvenios()\n {\n return $this->fkMonetarioConvenios;\n }", "title": "" }, { "docid": "86c0a898992a8e73e26bfd9585b8216c", "score": "0.5835873", "text": "public function getFkFrotaManutencao()\n {\n return $this->fkFrotaManutencao;\n }", "title": "" }, { "docid": "e29475947696732dbccfdcb8f747d546", "score": "0.58330697", "text": "public function getFkPatrimonioDepreciacao()\n {\n return $this->fkPatrimonioDepreciacao;\n }", "title": "" }, { "docid": "5a33de48f54fd95f4989265ff67e6ae3", "score": "0.58174366", "text": "public function getFkFolhapagamentoLogErroCalculoRescisao()\n {\n return $this->fkFolhapagamentoLogErroCalculoRescisao;\n }", "title": "" }, { "docid": "be4a433ffd1a6f04e0b35c48dc4b6d6e", "score": "0.5812239", "text": "public function obtenerForeignField($nombrecampo){\n $arreglo=$this->fillRelations();\n $nombrecampoforaneo=null;\n $claseforanea=$this->fieldsLink(false)[$nombrecampo];\n foreach($arreglo[$claseforanea][0] as $campoforaneo=>$campolocal){\n if($nombrecampo===$campolocal){\n $nombrecampoforaneo=$campoforaneo;\n }\n }\n return $nombrecampoforaneo; \n }", "title": "" }, { "docid": "b2cdf139deb7511f0051700beebe013b", "score": "0.58110064", "text": "public function getFkEmpenhoEmpenhoConvenios()\n {\n return $this->fkEmpenhoEmpenhoConvenios;\n }", "title": "" }, { "docid": "ff58bd70d2665ecd3fc985a4202a7ee4", "score": "0.5803916", "text": "public function getFkFolhapagamentoRegistroEventoRescisaoParcela()\n {\n return $this->fkFolhapagamentoRegistroEventoRescisaoParcela;\n }", "title": "" }, { "docid": "304511a952a2878a4df4618528aef664", "score": "0.5802008", "text": "public function getFkPessoalPensao()\n {\n return $this->fkPessoalPensao;\n }", "title": "" }, { "docid": "304511a952a2878a4df4618528aef664", "score": "0.5802008", "text": "public function getFkPessoalPensao()\n {\n return $this->fkPessoalPensao;\n }", "title": "" }, { "docid": "6caa7cf2d87f6ffc0682465e1f8c57bc", "score": "0.5797182", "text": "public function getFkConcursoCandidato()\n {\n return $this->fkConcursoCandidato;\n }", "title": "" }, { "docid": "75286fc1ac4170800ee43565e183f732", "score": "0.57939404", "text": "public function getFkFolhapagamentoConfiguracaoEventoDespesas()\n {\n return $this->fkFolhapagamentoConfiguracaoEventoDespesas;\n }", "title": "" }, { "docid": "f72aa6c62dcf9ac63510407625eb9f94", "score": "0.5788843", "text": "public function getForeignKey()\n {\n }", "title": "" }, { "docid": "f3a1f5a876c9a3b23d1a7284a290eac6", "score": "0.5788358", "text": "public function getIdContratoFinanceiroNota()\n {\n return $this->id_contrato_financeiro_nota;\n }", "title": "" }, { "docid": "829e684d9a38c054d976d9435ba80cab", "score": "0.57879597", "text": "public function getFkPessoalCondicaoAssentamentoExcluido()\n {\n return $this->fkPessoalCondicaoAssentamentoExcluido;\n }", "title": "" }, { "docid": "d91089589193e83562518f86255d83d2", "score": "0.5786101", "text": "function get_rel_part_evento($id) {\n\t\t$this->db->select ( 'usuario.primeiro_nome,\n usuario.ultimo_nome,\n atividade.nome_atividade,\n atividade.tp_atividade,\n evento.id_evento,\n evento.nome_evento,\n participacao.id_participacao' );\n\t\t$this->db->from ( 'participacao' );\n $this->db->join('usuario', 'participacao.id_face = usuario.id_face', 'left');\n $this->db->join('atividade', 'participacao.id_atividade = atividade.id_atividade', 'left');\n $this->db->join('evento', 'participacao.id_evento = evento.id_evento', 'left');\n\t\t$this->db->where ( 'participacao.id_evento = ' . \"'\" . $id . \"'\" );\n\t\t$this->db->order_by('usuario.primeiro_nome','asc');\n \n\t\t$query = $this->db->get ();\n\t\n\t\tif ($query->num_rows () != 0) {\n\t\t\treturn $query->result ();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "65d15a92bcfe8bc262424eba5622b036", "score": "0.5776842", "text": "public function getFkTesourariaBoletimFechados()\n {\n return $this->fkTesourariaBoletimFechados;\n }", "title": "" }, { "docid": "65d15a92bcfe8bc262424eba5622b036", "score": "0.5776842", "text": "public function getFkTesourariaBoletimFechados()\n {\n return $this->fkTesourariaBoletimFechados;\n }", "title": "" }, { "docid": "f615e82381eba3ce729a41de18cb65d4", "score": "0.57717955", "text": "public function getFkEconomicoResponsavelTecnico()\n {\n return $this->fkEconomicoResponsavelTecnico;\n }", "title": "" }, { "docid": "d03c63104ae8d4543b19198b1221fbd1", "score": "0.5758746", "text": "protected function __foreignKey()\n {\n }", "title": "" }, { "docid": "0e600adb7e1ecc7fa9cf944fda8f59fe", "score": "0.5718171", "text": "public function getFkCalendarioCalendarioDiaCompensados()\n {\n return $this->fkCalendarioCalendarioDiaCompensados;\n }", "title": "" }, { "docid": "61c8cbf6148d149bde44e490971cc327", "score": "0.57093364", "text": "public function viagem(){\n\n return $this->belongsTo(Viagem::class, 'fk_solicitacao');\n }", "title": "" }, { "docid": "a7b14f54ebdac23b3838b1211f1a23c2", "score": "0.5703198", "text": "public function getFkMonetarioBanco()\n {\n return $this->fkMonetarioBanco;\n }", "title": "" }, { "docid": "b858b194cf2d1d0bbeba86e7907895ac", "score": "0.5702294", "text": "public function getFkTesourariaTransferencias()\n {\n return $this->fkTesourariaTransferencias;\n }", "title": "" }, { "docid": "c3244425d92d7ee4d094dba9646cf8c3", "score": "0.57014567", "text": "public function getFkOrcamentoUnidade()\n {\n return $this->fkOrcamentoUnidade;\n }", "title": "" }, { "docid": "febd3baea46169fd334166d9614be43d", "score": "0.5685424", "text": "public function getFkDividaParcela()\n {\n return $this->fkDividaParcela;\n }", "title": "" }, { "docid": "febd3baea46169fd334166d9614be43d", "score": "0.5685424", "text": "public function getFkDividaParcela()\n {\n return $this->fkDividaParcela;\n }", "title": "" }, { "docid": "9560fac588f242aeeeb21704fd825ba2", "score": "0.56792396", "text": "public function getFkPessoalCargo()\n {\n return $this->fkPessoalCargo;\n }", "title": "" }, { "docid": "0ed99da4f32a75e2a6d8c13a8bdb7f44", "score": "0.56706697", "text": "public function getFkTesourariaBoletimLiberadoCancelados()\n {\n return $this->fkTesourariaBoletimLiberadoCancelados;\n }", "title": "" }, { "docid": "4d8c9a81c56ac72cf3a0a24a4dc3dd7c", "score": "0.5660213", "text": "public function getFkOrcamentoReceitas()\n {\n return $this->fkOrcamentoReceitas;\n }", "title": "" }, { "docid": "1862abcbdb650df676338c49889ddbb1", "score": "0.5654866", "text": "public function dependencia()\n\t{\n\t\treturn $this->belongsTo('App\\Dependencia', 'dependencia_id');\n\t}", "title": "" }, { "docid": "ecd8cc4a53d1c0356161170c4f5af19f", "score": "0.5647223", "text": "public function dependencia() {\n return $this->belongsTo('App\\Models\\Dependencia');\n }", "title": "" }, { "docid": "70b55ce726aa30fb8d7d728241b31f72", "score": "0.562857", "text": "public function getFkTcepeAgenteEletivos()\n {\n return $this->fkTcepeAgenteEletivos;\n }", "title": "" }, { "docid": "28e37f6c0292ddfbbcc26a38454b8dfd", "score": "0.5628118", "text": "public function getFkTcepeConfiguracaoGestores()\n {\n return $this->fkTcepeConfiguracaoGestores;\n }", "title": "" }, { "docid": "af2a3d61b0810da4cdccba146686ce2c", "score": "0.5627777", "text": "public function getFkCseCidadao()\n {\n return $this->fkCseCidadao;\n }", "title": "" }, { "docid": "fac3871e8736eb8536a466e3b019865b", "score": "0.5624836", "text": "public function getFkPpaPrecisao()\n {\n return $this->fkPpaPrecisao;\n }", "title": "" }, { "docid": "9110e3ac4f86600cd69922ac9791bde8", "score": "0.5622811", "text": "public function getFkSwEmpenhos()\n {\n return $this->fkSwEmpenhos;\n }", "title": "" }, { "docid": "057920122762dfb207de03d12d99f2c4", "score": "0.56213444", "text": "public function getFkFolhapagamentoTipoEventoPrevidencia()\n {\n return $this->fkFolhapagamentoTipoEventoPrevidencia;\n }", "title": "" }, { "docid": "a61300cd657fb07891065dc60715b85b", "score": "0.5612955", "text": "public function getFkFolhapagamentoDescontoExternoPrevidencias()\n {\n return $this->fkFolhapagamentoDescontoExternoPrevidencias;\n }", "title": "" }, { "docid": "43e33249425375b223f4e1413ca0c880", "score": "0.56114393", "text": "public function eventos(){\n return $this->belongsTo('App\\Models\\Eventos', 'idEvento', 'idEvento');\n }", "title": "" }, { "docid": "8d1cd7979b2a4556f8c077bf09385797", "score": "0.56102145", "text": "public function getFkTcepeOrcamentoModalidadeDespesas()\n {\n return $this->fkTcepeOrcamentoModalidadeDespesas;\n }", "title": "" }, { "docid": "c6f90532716f84dbab77c83e1bde3b42", "score": "0.5603475", "text": "public function getFkTcepeDividaFundadaOperacaoCreditos()\n {\n return $this->fkTcepeDividaFundadaOperacaoCreditos;\n }", "title": "" }, { "docid": "1dd9f3a27df8669953027651205bca16", "score": "0.55817693", "text": "public function getFkFrotaEfetivacoes()\n {\n return $this->fkFrotaEfetivacoes;\n }", "title": "" }, { "docid": "cc2517073544ffd1ad8980840953a1b9", "score": "0.5579968", "text": "public function getFkPontoEscalaContratos()\n {\n return $this->fkPontoEscalaContratos;\n }", "title": "" }, { "docid": "a88d39d1515f5e1db43d987059d778d2", "score": "0.5569966", "text": "public function getFkConcursoConcursoCargo()\n {\n return $this->fkConcursoConcursoCargo;\n }", "title": "" }, { "docid": "9cf39df60a38f922501a8ba583b6452f", "score": "0.55660737", "text": "public function getFkEconomicoServicoAtividade()\n {\n return $this->fkEconomicoServicoAtividade;\n }", "title": "" }, { "docid": "b61b862ec31486ff9baa59e75a1f2758", "score": "0.55522853", "text": "public function getFkFolhapagamentoConfiguracaoEmpenhos()\n {\n return $this->fkFolhapagamentoConfiguracaoEmpenhos;\n }", "title": "" }, { "docid": "a8af007ecfdc3edd82f57372a95a26a9", "score": "0.5541924", "text": "public function getFkOrcamentoEntidadeLogotipo()\n {\n return $this->fkOrcamentoEntidadeLogotipo;\n }", "title": "" }, { "docid": "af20379eff243bf042b77694595a1a6a", "score": "0.5532242", "text": "public function getForeignId()\r\n {\r\n return null;\r\n }", "title": "" }, { "docid": "f4e6eb9157ea402b86392a9ef2339c62", "score": "0.55094486", "text": "public function getFkAlmoxarifadoMarca()\n {\n return $this->fkAlmoxarifadoMarca;\n }", "title": "" }, { "docid": "74d2a549670a6566665175eb8cf216ff", "score": "0.5505342", "text": "public function getFkPessoalPensaoIncidencias()\n {\n return $this->fkPessoalPensaoIncidencias;\n }", "title": "" } ]
2e640b2819e0e2483ca2c8015eacce77
Show the application dashboard.
[ { "docid": "d2f1e1ab90526aa90a4d407924a0dde2", "score": "0.0", "text": "public function index()\n {\n $mydate = Carbon::now()->toDateString();\n\n //Progress Bar\n $query_etape = DB::table('r_d_v_s')\n ->select(DB::raw('count(*) as nbr'),'patient_id','valeur','etape')\n ->groupBy('patient_id','valeur','etape')\n ->orderBy('valeur', 'asc')\n ->where('date', '=', $mydate)\n ->get();\n\n\n\n $rdv= RDV::orderBy('time')->where('date', '=', $mydate)->get();//Pour aujourd'hui\n $rdv2= RDV::orderBy('date','desc')->simplePaginate(5);\n\n\n return view('home')->with(\"parameters\",[\"rdv_today\"=>$rdv,\"rdv\"=>$rdv2,\"query\"=>$query_etape]);\n\n }", "title": "" } ]
[ { "docid": "668adb72c054c8a9381a86c50205d18c", "score": "0.77531815", "text": "public function index() {\n $data = $this->superAdminRepository->getDashBoardData();\n return view(\"admin.dashboard\", $data)->with('title', 'Dashboard');\n }", "title": "" }, { "docid": "0e8c5613168ac975937bbd891e100eeb", "score": "0.7602755", "text": "public function dashboard()\n\t{\n\t\tDashboard::setTitle( 'Dashboard' );\n\n\t\treturn view( 'user.dashboard' );\n\t}", "title": "" }, { "docid": "1b59f15f40f9f3d6a411cbf7bd4ced76", "score": "0.7601493", "text": "public function index()\n {\n return view('eav-dashboard::app');\n }", "title": "" }, { "docid": "dad94cd2f30479e694354138f2286509", "score": "0.75333744", "text": "public function dashboard()\n {\n return Inertia::render('Dashboard');\n }", "title": "" }, { "docid": "317db9ebf05424294f808d752476ff27", "score": "0.7505021", "text": "public function dashboard()\n {\n return ViewsController::renderDash('dashboard');\n }", "title": "" }, { "docid": "41f5313edcc9aafd62b29ad7ed5c2ae1", "score": "0.7482379", "text": "public function index()\n {\n return view('manager.dashboard');\n }", "title": "" }, { "docid": "d4af83cb7b031a6bcbfef405f4220400", "score": "0.74681324", "text": "public function admindashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "cd59de311e42ac199279b37a77e12b8c", "score": "0.7464076", "text": "public function index()\n {\n $this->authorize(DashboardPolicy::ability('index'));\n\n $this->setCurrentSidebarItem('foundation::dashboard');\n\n return $this->view('index');\n }", "title": "" }, { "docid": "35b41ec11929bf153f4a7b4d9cc3d551", "score": "0.7453771", "text": "public function dashboard();", "title": "" }, { "docid": "dfa7d1d41b5470555a9bae61bd5fb82b", "score": "0.74161685", "text": "public function dashboard()\n {\n return view(tessa_view('dashboard'));\n }", "title": "" }, { "docid": "f2bc4394388136c3be2f95f327974e05", "score": "0.7410611", "text": "public function dashboardAction() {\n\t\treturn $this->render('SfsAdminBundle:Core:dashboard.html.twig', array(\n\t\t));\n\t}", "title": "" }, { "docid": "af866e90836f66cd0684affa3a8e72b3", "score": "0.7405942", "text": "public function action_dashboard() {\n $data = array(\n 'section' => 'dashboard',\n 'pageTitle' => 'Dashboard',\n );\n\n //Build the view\n return View::make('admin.dashboard', $data);\n\t}", "title": "" }, { "docid": "c3e82325158840553d231773c0d8ebc2", "score": "0.7395499", "text": "public function show()\n {\n return view('auth.dashboard.dashboard');\n }", "title": "" }, { "docid": "b34c50102d6e0fe2584834be5775f7d0", "score": "0.7385664", "text": "public function dashboard()\n {\n return view('luna::admin.dashboard');\n }", "title": "" }, { "docid": "7c1b5dccf160c1b3c89c1795b8edf2a5", "score": "0.7383401", "text": "public function dashboard()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "c74e872590d02b41ca3a87cb277fc24c", "score": "0.7372457", "text": "public function index()\n {\n $data = AtomicPanel::$dashboardData;\n return view('atomic::partials.dashboard')->with('data', $data);\n }", "title": "" }, { "docid": "f4951c28f30b52d1385fa4c903757b87", "score": "0.7359363", "text": "public function index()\n {\n $this->isLoggedIn();\n $this->global['pageTitle'] = 'CodeInsect : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "1a8925153d4fdf57b36c041ec5d7a890", "score": "0.73529834", "text": "public function dashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "3d87d1abc1bf3e10a6969c7610332fd5", "score": "0.73519117", "text": "public function dashboard()\n {\n $title = 'dashboard';\n return view('dashboard')->with('title', $title);\n }", "title": "" }, { "docid": "55066aab12d5a70f9f27cda1b05d77d2", "score": "0.7345707", "text": "public function dashboard()\n {\n return view('dashboard.home');\n }", "title": "" }, { "docid": "82bb186f7255096076c6e127ae0682ab", "score": "0.73215127", "text": "public function index()\n {\n $this->global['pageTitle'] = 'V-kart : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "a3d6f4a639371f70a7db19c5453f7d9f", "score": "0.72918016", "text": "public function index()\n {\n return view('admin.dashboard.dashboard');\n }", "title": "" }, { "docid": "027855c277d46aa3019a72fc4cf097ff", "score": "0.7288014", "text": "public function index()\n {\n return view('dashboard::admin.dashboard');\n }", "title": "" }, { "docid": "74ef64d51095e646fe56a807ca782939", "score": "0.7285213", "text": "public function showDashboard()\n {\n $response = Gate::inspect('view-admin-dashboard');\n\n if ($response->allowed()) {\n $bookings = Booking::whereDate('created_at', Carbon::today())->get();\n\n $matchThese = ['is_materialized' => 1, 'hasMaterializedBookingBefore' => 0];\n $registeredPatientsForTheFirstTime = Booking::whereDate('booking_date', Carbon::today())->where($matchThese)->get();\n \n $users = User::whereDate('created_at', Carbon::today())->get();\n \n return view('admin.dashboard.index')\n ->with('bookings', $bookings)\n ->with('registeredPatientsForTheFirstTime', $registeredPatientsForTheFirstTime)\n ->with('users', $users);\n } else {\n echo $response->message();\n }\n }", "title": "" }, { "docid": "64f6599975d3c18c7635cc3d169fa019", "score": "0.72740126", "text": "public function index()\n {\n $data = array(\n 'm_dash' => 'highlight'\n );\n return View('backend.dashboard', $data);\n //\n }", "title": "" }, { "docid": "c22986938031da03aa0bc8f7c697c03e", "score": "0.72702193", "text": "public function dashboardAction() {\n $this->init( __FUNCTION__ );\n\n try {\n if( !$this->isAuthentified() )\n NavigationManagement::redirect( DOMAIN . 'error/403/' );\n\n if( !$this->getModAuth()->getUser()->can( 'edit_dashboard' ) )\n NavigationManagement::redirect( DOMAIN . 'users/profile/' );\n\n $this->getView()->sitename = _( 'Dashboard' );\n\n $this->render( FALSE, 'Admin' . DS . $this->getAction(), 'Admin' . DS . 'main' );\n } catch( KernelException $e ) {\n throw $e;\n } catch( Exception $e ) {\n throw new KernelException( 'Can not render the <strong>' . $this->getAction() . '</strong> view in <strong>' . $this->getController() . '</strong>', $e->getCode(), $e );\n }\n }", "title": "" }, { "docid": "2c2be7b669906f96f445aba1631bd21a", "score": "0.7257464", "text": "public function index()\n\t{\n\t\treturn view('admin.admin_dashboard');\n\t}", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7253329", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7253329", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "8cd0a13f3368c82f274273b3a5634a62", "score": "0.7253329", "text": "public function index()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "a9c33c49c0a359e710966bcfe1db91e9", "score": "0.7251114", "text": "public function dashboard(){\n $user = $this->get('user');\n \n return $this->display();\n \n }", "title": "" }, { "docid": "728ccff17c407a42064bef99e97b899e", "score": "0.72508174", "text": "public function index()\n {\n return view('backend.admin_dashboard');\n }", "title": "" }, { "docid": "6d88d9206d0adf1485e5393d49782cb5", "score": "0.72328824", "text": "public function dashboard()\n {\n return view('tu.dashboard');\n }", "title": "" }, { "docid": "01cdf1f9d395076a9c741fc6fe056c34", "score": "0.72190267", "text": "public function Dashboard()\n {\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "3f912463736363b254525148581493bf", "score": "0.7212273", "text": "public function index()\n {\n return view('lightBlog::admin.dashboard');\n }", "title": "" }, { "docid": "91f54ef1953cad31657f15ee3aa012b9", "score": "0.7205118", "text": "public function dashboard()\n {\n //return view('admin.dashboard');\n return view('admin.dashboard');\n \n }", "title": "" }, { "docid": "90e39c121581488a4add57e5e54ed19a", "score": "0.72043955", "text": "public function index()\n {\n $breadcrumbs = $this->breadcrumbs;\n $title = '<i class=\"fas fa-tachometer-alt\"></i> Dashboard';\n return view('admin.dashboard.index', array(\n 'breadcrumbs' => $breadcrumbs,\n 'title' => $title,\n ));\n }", "title": "" }, { "docid": "3bfe4393eb7c7854ac225504b89546b2", "score": "0.7202311", "text": "public function index()\n {\n $this->global['pageTitle'] = 'Dashboard';\n \n $this->loadViews(\"backend/dashboard\", $this->global, NULL , NULL);\n }", "title": "" }, { "docid": "39ded056d0190cff9938deb72c1973f9", "score": "0.719243", "text": "public function index()\n\t{\n\t\t//\n\t\treturn view('content\\scadmin\\dashboard');\n\t\t\n\t}", "title": "" }, { "docid": "078066c91854b1c24cdb00c2309dc331", "score": "0.7180661", "text": "public function index()\n\t{\n\t\treturn view('dashboard');\n\t}", "title": "" }, { "docid": "da279daca3ce50aa06b8fdbd15d59293", "score": "0.7173012", "text": "public function index(): View|Factory|Application\n {\n return view('my-space::dashboard.index', ['user' => Auth::user()]);\n }", "title": "" }, { "docid": "768af42c7253f1a6acbd7003bacb44ed", "score": "0.7171266", "text": "public function dashboard_page() {\n echo \"Dashboard!\";\n }", "title": "" }, { "docid": "5924615ba507b8e537e98e0109da37ee", "score": "0.7157595", "text": "public function index()\n {\n $this->super_admin_auth_check();\n $dashboard_home=view('admin.pages.dashboard_home');\n return view('admin.admin_master')\n ->with('admin_main_content', $dashboard_home);\n }", "title": "" }, { "docid": "233ba6234e5447f794f10d97c420b4ef", "score": "0.71575737", "text": "public function index()\n\t{\n\t\t$this->layout->content = View::make('secured.dashboard');\n\t}", "title": "" }, { "docid": "b170006da2231b7ea4ba9a12013b55c8", "score": "0.71543884", "text": "public function dashboard()\n {\n if ($this->isAdmin()) {\n return Redirect::route('admin/dashboard');\n }\n $this->data['meta'] = array(\n 'title' => Lang::get('meta.dashboard_title')\n );\n\n\t$charts = $this->_dashboard_charts();\n\t$selective_css=$this->sel_css('yes');\n\n return View::make('user.dashboard')\n ->with('meta', $this->data['meta'])\n ->with('charts', $charts);\n }", "title": "" }, { "docid": "185d9a7bc7330c0064ee47d31f058885", "score": "0.71540993", "text": "public function index()\n {\n $this->param['pageInfo'] = 'Dashboard';\n return view('pages.dashboard', $this->param);\n }", "title": "" }, { "docid": "14d1db00ca2caec05bb01023941a2a52", "score": "0.71388596", "text": "public function index()\n {\n return view('admin_dashboard');\n }", "title": "" }, { "docid": "dc50af2aef83e99d7a83c50f03b72521", "score": "0.7134049", "text": "public function index()\n {\n return view('admin.dashboard.index');\n }", "title": "" }, { "docid": "f9149559ccd2687be2fd3b1772c6d976", "score": "0.71247613", "text": "public function dashboard()\n {\n \n return view('admin.pages.dashboard');\n }", "title": "" }, { "docid": "ee740197b62e68352b8998b08456a34d", "score": "0.7120797", "text": "public function index()\n {\n return view('dashboard.Main');\n \n }", "title": "" }, { "docid": "a96ab919e285d99634c74449948ea497", "score": "0.7114491", "text": "public function index()\n {\n return view('subadmindashboard'); \n }", "title": "" }, { "docid": "d9c8d2214a1f48bb2e3402f145768e00", "score": "0.7110432", "text": "public function getDashboard()\n {\n \treturn view('admin.dashboard.dashboard');\n }", "title": "" }, { "docid": "f9e41c7299ceb041810a52c641e693e0", "score": "0.7101691", "text": "public function index()\n {\n return view('adminPages.dashboard');\n }", "title": "" }, { "docid": "c144f794c4ef21f55add4b4483ff9d64", "score": "0.7099865", "text": "public function index()\n {\n $this->view->pageTitle = 'Dashboard - ' . Session::get('name') . ' ' . Session::get('surname');\n $this->view->render('dashboard/index');\n }", "title": "" }, { "docid": "d1e9c1f845020877a55b9223350ab423", "score": "0.7089577", "text": "public function dashboard()\n {\n if (Auth::check() && Auth::user()->is('admin')) {\n $title = 'Admin Dashboard';\n }else{\n $title = 'User Dashboard';\n }\n return view('backend/dashboard', compact('title'));\n }", "title": "" }, { "docid": "f862a5fb3ff9095a5a07d0c908fb1d82", "score": "0.7085939", "text": "public function index()\n {\n return view('v_dashboard');\n }", "title": "" }, { "docid": "578e7fd8159762d946ba2930fb7c0382", "score": "0.70817083", "text": "public function index()\n {\n $stats = (new ReportRepository())->getDashboardStats();\n\n $service = new SystemMonitorService();\n\n return Inertia::render('Admin/Dashboard',[\n 'stats' => $stats,\n 'services' => $service->getStatus(),\n 'last' => Setting::get('system-monitor.last_checked', '')\n ]);\n }", "title": "" }, { "docid": "3ffd1e5c74470c5e89b9ca1590a7c0c1", "score": "0.70768285", "text": "public function getDashboard() {\n return view('front.dashboard');\n }", "title": "" }, { "docid": "0e30f449f1fa1e9bdfd1a1ea13f99915", "score": "0.7073211", "text": "public function index()\n\t{\n $this->data['title'] = 'Dashboard';\n $this->data['description'] = 'Dashboard AppClicar';\n\n\t\techo view('templates/principal/header');\n\t\techo view('/administrador/home/index', $this->data);\n\t\techo view('templates/principal/footer');\n\t}", "title": "" }, { "docid": "4aec52123c40cabc53345abb7a68774f", "score": "0.7070898", "text": "public function showAdminPanelPage()\n {\n return view('backend.dashbord');\n }", "title": "" }, { "docid": "39ba6270d06db864d6211be5fd4b543e", "score": "0.70659775", "text": "public function index()\n {\n return view('pages.dashboard.dashboard');\n }", "title": "" }, { "docid": "c25b1ca7a8b9f1266f613df721356c09", "score": "0.70654494", "text": "public function action_index()\n {\n $dashboard = View::factory('dashboard');\n\n $this->template->content = $dashboard;\n }", "title": "" }, { "docid": "69f84f64a50fabfd09a0b8eea268b72b", "score": "0.70621896", "text": "public function index() {\n if ($this->permission->check_admin_permission()) {\n // \t\t\tLoad admin page\n $data['title'] = 'Dashboard';\n $this->view_loader->load($this, 'index', $data);\n }\n }", "title": "" }, { "docid": "b649cdd8032af67add1e09afa9754ca0", "score": "0.7057034", "text": "public function get_index()\n\t{\n\t\t$panes = Widget::make('pane.orchestra')->get();\n\n\t\treturn View::make('orchestra::dashboard.index', compact('panes'));\n\t}", "title": "" }, { "docid": "344019b2701c4353642b2817ff18d185", "score": "0.70553535", "text": "public function dashboard()\n {\n return view('admin-pages.dashboard')->with(compact('admin_notifications'));\n }", "title": "" }, { "docid": "f2cdef0af89c2819e90d54039c4b1084", "score": "0.7053566", "text": "public function index()\n {\n return view('pages.dashboard');\n }", "title": "" }, { "docid": "634255819b46d30bdb510fbb86ba00a5", "score": "0.704396", "text": "public function index()\n\t{\n\t\t$user = Auth::user();\n\t\t\n\t\treturn view(\"dashboard\", [\n\t\t\t\"auth_user\" => $user,\n\t\t]);\n\t}", "title": "" }, { "docid": "aad5858e5f28a4b46bacd6e6bf806757", "score": "0.7032133", "text": "public function index()\n {\n return view('admin.applications.index')->with('page', 'Aplicações');\n }", "title": "" }, { "docid": "b7f1efaed80ed42f23406e01112dbdff", "score": "0.70279163", "text": "public function indexAction()\n {\n // Add information for dashboard\n $this->_toolbar->addHeaderPrimary('m_admin_admin');\n $this->_toolbar->addHeaderSecond($this->config->website->systemName);\n $this->_toolbar->addBreadcrumb('m_admin_admin');\n }", "title": "" }, { "docid": "b08e133569a948c60d45205d75ddd608", "score": "0.7027916", "text": "public function index()\n {\n $data = (new DasboardServices)->getDasboardData();\n\n return view('dashboard', compact('data'));\n }", "title": "" }, { "docid": "927536d4ab2038fff9a8f81a7e817a1f", "score": "0.7025641", "text": "public function index()\n {\n return view ('user.dashboard.index');\n }", "title": "" }, { "docid": "c05561fd18131958ea31ad9e53929316", "score": "0.7023154", "text": "protected function adminDashboard()\n {\n return view('dashboard.admin');\n }", "title": "" }, { "docid": "36df1a26f517921e53fbc5a49462d75b", "score": "0.7014938", "text": "public function index()\n {\n return view('core::admin.'.$this->data['theme_cms']->value.'.content.dashboard', $this->data);\n }", "title": "" }, { "docid": "23bdd413ff544dc381fcd5a787ae2e91", "score": "0.7011527", "text": "public function index()\n {\n \treturn view('admin.dashboard.index');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.7010608", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.7010608", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.7010608", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.7010608", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.7010608", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.7010608", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "2b20a4e25b8ca061cf7d21e2b79bddc2", "score": "0.7010608", "text": "public function index()\n {\n return view('dashboard');\n }", "title": "" }, { "docid": "51f23d45c546c191a4b4db2a5892f94a", "score": "0.7007346", "text": "public function indexAction()\n {\n /* Loading view template */\n View::renderTemplate('Admin/dashboard.twig', [\n 'admin_tab' => 'dashboard', \n 'is_admin_panel' => 1,\n 'php_version' => phpversion(),\n 'app_version' => Config::getValues('app_version'),\n 'answers_number' => Answer::countByTime(0),\n 'answers_today_number' => Answer::countByTime(strtotime('today midnight')),\n 'topics_number' => Topic::count(),\n 'questions_number' => Question::count(),\n 'questions_today_number' => Question::countByTime(strtotime('today midnight')),\n 'users_number' => User::countByTime(0),\n 'users_today_number' => User::countByTime(strtotime('today midnight')),\n 'pages_number' => Page::count(),\n 'new_reports' => Report::count(),\n ]); \n }", "title": "" }, { "docid": "8e1c7e045a96e5123f0f96a93db6bfaa", "score": "0.7002739", "text": "public function index()\n {\n return view('user.dashboard');\n }", "title": "" }, { "docid": "8e1c7e045a96e5123f0f96a93db6bfaa", "score": "0.7002739", "text": "public function index()\n {\n return view('user.dashboard');\n }", "title": "" }, { "docid": "e10baa9a8e4c7db42e7fe0f9680ed977", "score": "0.7001759", "text": "public function dashboard()\n {\n $accounts = Auth::user()->account()->get();\n $notes = Auth::user()->note()->get();\n $groups = Auth::user()->group()->get();\n return view('page.dashboard', compact('accounts', 'notes', 'groups'));\n }", "title": "" }, { "docid": "d3ee6c4452c9a12387a1373432cf07c4", "score": "0.6991875", "text": "public function index()\n {\n return view('pages.dashboard');\n }", "title": "" }, { "docid": "d3ee6c4452c9a12387a1373432cf07c4", "score": "0.6991875", "text": "public function index()\n {\n return view('pages.dashboard');\n }", "title": "" }, { "docid": "d3ee6c4452c9a12387a1373432cf07c4", "score": "0.6991875", "text": "public function index()\n {\n return view('pages.dashboard');\n }", "title": "" }, { "docid": "f1ed91426ed8ead3750247d13b86c32c", "score": "0.69911313", "text": "public function dashboard()\n {\n $aspirasi = Aspiration::orderBy('id', 'DESC')->get();\n return view('admin.dashboard', compact('aspirasi'));\n }", "title": "" }, { "docid": "601e3cefae20bf7a64fb6e988caedeac", "score": "0.69856894", "text": "public function index()\n {\n return view('layouts.dashboard');\n }", "title": "" }, { "docid": "601e3cefae20bf7a64fb6e988caedeac", "score": "0.69856894", "text": "public function index()\n {\n return view('layouts.dashboard');\n }", "title": "" }, { "docid": "14d1b41546685ace4660277e7b7090da", "score": "0.69819444", "text": "public function dashboardAction()\n {\n Streamwide_Web_Log::debug('rendering the dashboard');\n $request = $this->getRequest();\n $viewDatas = array();\n $viewDatas['IsSuperAdmin'] = SwIRS_Web_Request::isSuperAdmin($request);\n if (!SwIRS_Web_Request::isSuperAdmin($request) && !SwIRS_Web_Request::isVisitor($request)) {\n $viewDatas['TreeLists'] = Streamwide_Web_Model::call('Tree.GetLastModified', array(false));\n }\n $this->view->assign($viewDatas);\n }", "title": "" }, { "docid": "c06a515057bb9d169bf3bd519e4ee575", "score": "0.6981055", "text": "public function index()\r\n {\r\n $userInfo = $this->UserRepository->getUserInfoByUserId(Auth::user()->id);\r\n $nameOfPage = 'Dashboard';\r\n $total = $this->OrdersRepository->sumTotalAmount();\r\n $users = $this->UserRepository->getUsersWithLimit();\r\n $stores = $this->StoresRepository->getStoresWithLimit();\r\n $orders = $this->OrdersRepository->getOrdersWithLimit();\r\n\r\n return view('admin.main', compact(self::viewShareVarsAdminPanel));\r\n }", "title": "" }, { "docid": "5943531944e9fe569d2a175246caf680", "score": "0.6979301", "text": "public function index()\n {\n return View::make('hr.hrdashboard', compact(\"notice\"));\n }", "title": "" }, { "docid": "8ea00fe44e7f5aea80f0a7d3d1ec6d1b", "score": "0.69776493", "text": "public function dashboard()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "8c8e9e38c9e6af6e0e038a19e4d5d845", "score": "0.697641", "text": "public function index() {\n $this->template->backend($this->VIEW_PATH.\"/index\", \"Dashboard\");\n }", "title": "" }, { "docid": "d61d8f9b197d6a86f8be02de2ae300a0", "score": "0.69758165", "text": "public function index(){\n return view('admin.dashboard');\n }", "title": "" }, { "docid": "e091e063960fff04362688d82c625bd3", "score": "0.6969163", "text": "public function index()\r\n {\r\n return view('dashboard');\r\n }", "title": "" }, { "docid": "45140d95f28c37b33c1a0e6e9d4e7e74", "score": "0.69626135", "text": "public function show_apps() {\n\n return view('Eleave.userlevel.user_apps');\n }", "title": "" }, { "docid": "62ccf8acb94fcc16569d830463cab704", "score": "0.69587237", "text": "public function index(){\n return view('dashboard.layouts.new_app');\n }", "title": "" }, { "docid": "19244f3a9d54b6c0e10d0e486ee1f65f", "score": "0.69539416", "text": "public function index()\n {\n if (session('admin')) {\n $events = Event::get();\n $users = Users::get();\n return view('admin.dashboard', compact(['events', 'users']));\n } else {\n return redirect('/home');\n }\n\n }", "title": "" } ]
c576fd68550f9b1b62eb775adc040eb3
Get the specified Cookie
[ { "docid": "0cf55dc2c323434725457bb7013fee12", "score": "0.6788162", "text": "public static function get($name)\n {\n return $_COOKIE[$name];\n }", "title": "" } ]
[ { "docid": "f7ddc4cbd49e355cfac8db7d7dcf68a3", "score": "0.811626", "text": "public function getCookie($cookieName);", "title": "" }, { "docid": "508e1b1a847ce8383d5f9c84628b492e", "score": "0.8040663", "text": "public function getCookie($cookiename);", "title": "" }, { "docid": "b9def82e7e55a92bb037ef3b9af2dc69", "score": "0.7665118", "text": "public static function get ($cookie_name) {\n\t\n\t\tif (isset($_COOKIE[$cookie_name]))\n\t\t\treturn $_COOKIE[$cookie_name];\n\t\n\t}", "title": "" }, { "docid": "a2b35540e7956907f6a6bedac8d2ce9c", "score": "0.7661901", "text": "public function getCookie($name = null);", "title": "" }, { "docid": "40a879d1e296b83d9bd89f225269d4d8", "score": "0.76443034", "text": "function getCookie() {\n\t\treturn $this->_cookie;\n\t}", "title": "" }, { "docid": "a2ea9a7b121169b269d8a45f0f63264c", "score": "0.7633298", "text": "public function getCookie()\n {\n return empty(self::$cookie) ? self::$cookie = $this->requestCookie() : self::$cookie;\n }", "title": "" }, { "docid": "1cd5a9240bba16e13e2666a6ed73be4d", "score": "0.7599105", "text": "public function getCookie()\n {\n return $this->cookie;\n }", "title": "" }, { "docid": "dce44391888c94f0b5d01234c0d70203", "score": "0.7499637", "text": "public function getUserFromCookie($cookie);", "title": "" }, { "docid": "c5337b5a7f157e96dd4bb9cfe740f39b", "score": "0.74948347", "text": "public function getCookie($key, $default = null);", "title": "" }, { "docid": "9d7f5aeefab3ac6d6b3a14c1ffcab8fd", "score": "0.7489195", "text": "public function getCookie($name, $default= NULL);", "title": "" }, { "docid": "7df7f881e85156a26ac8835168ae89fa", "score": "0.73891634", "text": "function tiny_api_http_get_cookie($name)\n{\n return tiny_api_Http_Manager::get_instance()->get_cookie($name);\n}", "title": "" }, { "docid": "90ef345d867ca3d62032ce36f50aad9a", "score": "0.73338604", "text": "function getCookie($name) {\n\t\treturn $this->_request() ? $this->_request()->getCookie($name) : null;\n\t}", "title": "" }, { "docid": "9ace4bad1ec9ec5615ab3f476ed27561", "score": "0.73107934", "text": "public function getCookie($cookie)\n {\n if (isset($this->cookies[$cookie])) {\n return $this->cookies[$cookie];\n }\n\n return null;\n }", "title": "" }, { "docid": "940a8b59e0082857e736006142515015", "score": "0.72899544", "text": "function getCookies() {}", "title": "" }, { "docid": "4e0a95aa3aa9fc66dcd62d00da38912d", "score": "0.7231808", "text": "function cookie($key = '') {\n\t\treturn $this->__get_v('cookie', $key);\n\t}", "title": "" }, { "docid": "e6bc727b8a50328f5a51ea71892b6a6e", "score": "0.72196054", "text": "function GetCookie()\r\n\t{\r\n\t\treturn $this->sessionid;\r\n\t}", "title": "" }, { "docid": "1f9a164fd10d9bf7c9b32c0ed7be98a1", "score": "0.7192607", "text": "public function getCookie()\n {\n $name = $this->config['cookie']['name'];\n\n return isset($_COOKIE[$name]) ? $_COOKIE[$name] : null;\n }", "title": "" }, { "docid": "ad69061049eb28d7b514365dfdd30d91", "score": "0.7182268", "text": "function getCookie($name, $else = null) {\r\n\treturn (isset($_COOKIE[$name])) ? $_COOKIE[$name] : $else;\r\n}", "title": "" }, { "docid": "4a1bcb882eec0c9ecc77c3451448e1b1", "score": "0.71779585", "text": "public function getCookie($key){\n return $_COOKIE[$key];\n }", "title": "" }, { "docid": "f5c306014e970a0b80c3beb3971c0f51", "score": "0.7175784", "text": "public static function getCookie($cookie_name)\n {\n return $_COOKIE[$cookie_name];\n }", "title": "" }, { "docid": "4fec7c99f86ea796945a895df4a17182", "score": "0.715382", "text": "public function getCookie(Request $request)\n {\n \techo \"Gia tri cookie cua ban la: \";\n \treturn $request->cookie('khoahoc');\n }", "title": "" }, { "docid": "739045f9db508c8196eb132bffb119a7", "score": "0.7120179", "text": "public function cookie()\n {\n return $this->cookie;\n }", "title": "" }, { "docid": "e941052b0c41eb6b85824ba880cbb6ba", "score": "0.7116391", "text": "public static function get_cookie()\n {\n return Session::get('uzanto');\n }", "title": "" }, { "docid": "274dece9cfec8a7f02626b535e052d24", "score": "0.7105858", "text": "public function getCookie(string $name): ?RequestCookieInterface;", "title": "" }, { "docid": "f1ccf774fa8b65683575d889486c87a7", "score": "0.70795685", "text": "public function getCookie()\n {\n return $this->client->getConfig('cookies');\n }", "title": "" }, { "docid": "fbddbff28eb9e77c72418f5f1cc78007", "score": "0.70786434", "text": "public function getCookies();", "title": "" }, { "docid": "fbddbff28eb9e77c72418f5f1cc78007", "score": "0.70786434", "text": "public function getCookies();", "title": "" }, { "docid": "fbddbff28eb9e77c72418f5f1cc78007", "score": "0.70786434", "text": "public function getCookies();", "title": "" }, { "docid": "fbddbff28eb9e77c72418f5f1cc78007", "score": "0.70786434", "text": "public function getCookies();", "title": "" }, { "docid": "3374ba9855b966ce399d9c6790f04b58", "score": "0.7075105", "text": "public function getCookie($key){\r\n $value = $this->cookies[$key];\r\n\r\n if(empty($value))\r\n //throw new CookieVariableNotFound(\"Key not found in any cookies: $key\");\r\n return null;\r\n else\r\n return $value;\r\n }", "title": "" }, { "docid": "e7c4db5d4f4e9b00ccaf78f8d2a93b7d", "score": "0.7074333", "text": "public function getCookie($key = null, $default = null)\n {/*{{{*/\n if($key === null)\n {\n return $_COOKIE;\n }\n\n return isset($_COOKIE[$key]) ? $_COOKIE[$key] : $default;\n }", "title": "" }, { "docid": "3380df8d6bd6a223e873e0478b143022", "score": "0.7064184", "text": "public function getCookie($name){\n if(!$this->hasCookie($name)){\n return null;\n }\n return $this->cookies[$name];\n }", "title": "" }, { "docid": "1b2ac79fc628f7abcf7a4a0e41f4147d", "score": "0.7027286", "text": "function cr_get_COOKIE($key, $default = null)\n{\n\tif (isset($_COOKIE[$key]) && strlen($_COOKIE[$key]) > 0) {\n\t\treturn $_COOKIE[$key];\n\t}\n\treturn $default;\n}", "title": "" }, { "docid": "15a815092af285e0998c6ebc13d56ac4", "score": "0.70070153", "text": "public static function get($name){\n return $_COOKIE[$name];\n }", "title": "" }, { "docid": "d7ddd8d03df2e32320163619ca199c66", "score": "0.700624", "text": "public function cookie( $cookie ) {\n\t\treturn call_user_func_array( [ $this, 'with_cookie' ], func_get_args() );\n\t}", "title": "" }, { "docid": "c67f586d25e310ce995a13c0a7fd2b83", "score": "0.7000386", "text": "public function get()\n {\n return $this->cookieManager->getCookie(self::COOKIE_NAME);\n }", "title": "" }, { "docid": "b386e1e0778695e3f39d4ea5f2d83383", "score": "0.69966376", "text": "public static function get($name){\n return $_COOKIE[$name];\n }", "title": "" }, { "docid": "02689ee4c77ecb17b23fe5e6a4e8e54d", "score": "0.69932336", "text": "public function getCookie($name){\n\t\tif(isset($_COOKIE[$name])){\n\t\t\t$this->cookie = $_COOKIE[$name];\n\t\t} else {\n\t\t\t$this->cookie = false;\n\t\t}\n\t\treturn $this->cookie;\n\t}", "title": "" }, { "docid": "fc30202930317680d9da24a4edd3baa3", "score": "0.6982774", "text": "public function getCookie($key = null, $default = null) {\n\t\tif (null === $key) {\n\t\t\treturn $_COOKIE;\n\t\t}\n\t\treturn (isset($_COOKIE[$key]))? $_COOKIE[$key]: $default;\n\t}", "title": "" }, { "docid": "12614db171a521fcf1bf3d7bb9c1cc43", "score": "0.6979619", "text": "public function getCookie($name, $default= NULL) {\n return isset($this->cookie[$name]) ? new Cookie($name, $this->cookie[$name]) : $default;\n }", "title": "" }, { "docid": "cf3061925710c7b88b647e8b91a3988c", "score": "0.69780385", "text": "public function getCookie()\n {\n return Mage::getSingleton('core/cookie');\n }", "title": "" }, { "docid": "b4166aadde00ac3f6293241e79f1dd3e", "score": "0.69632536", "text": "public function getCookie($key = null, $default = null)\n {\n if (null === $key) {\n return $_COOKIE;\n }\n return (isset($_COOKIE[$key])) ? $_COOKIE[$key] : $default;\n }", "title": "" }, { "docid": "fe3c86f863f8a1e0156fdd8ba9d7be54", "score": "0.69604963", "text": "public function getUserByCookie()\n {\n $userId = BeMaverick_Cookie::getUserId();\n\n return $this->getUser( $userId );\n }", "title": "" }, { "docid": "81af67126d39867a0f1a0cb2014c5a5d", "score": "0.69419295", "text": "function getCookie($field, $type = false) {\n\t\tif (isset($_COOKIE[$field])) {\n\t\t\treturn $_COOKIE[$field];\n\t\t}\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "362791fca1e937ae2287aa72c1e0e6ad", "score": "0.69052577", "text": "public static function get($name){\n\n\t\treturn ($_COOKIE[$name]);\n\t}", "title": "" }, { "docid": "4c05eb1681f520b3a762f1c62e509e7c", "score": "0.68858904", "text": "public function getCookie($index = null, $default = null)\n {\n return $this->cookieManager->get($index, $default);\n }", "title": "" }, { "docid": "98c363c1a8962babd2b8cbe8ec596513", "score": "0.6874591", "text": "function get($key=null){\n if(empty($key)) return $_COOKIE;\n return isset($_COOKIE[$key])? $_COOKIE[$key]:false;\n }", "title": "" }, { "docid": "1c6b1604699b291f68c7dd1595b58374", "score": "0.68684614", "text": "public function cookie($name) {\n if (isset($this->cookies[$name])) {\n return $this->cookies[$name];\n }\n return null;\n }", "title": "" }, { "docid": "7c4d67fb15d7bb1dd4dd95f2218778ff", "score": "0.68564767", "text": "public function getCookie()\n {\n return Mage::getModel('core/cookie');\n }", "title": "" }, { "docid": "51bd77a5581cdf21d5c3c083069f901e", "score": "0.6853292", "text": "static public function get($name, $default = \"\")\n {\n return (self::exists($name) ? $_COOKIE[COOKIE_PREFIX . $name] : $default);\n }", "title": "" }, { "docid": "c3bcf2ace060ed815769a0ffcc3c605a", "score": "0.6848346", "text": "function getCookieValue($name)\n{\n $token = null;\n if (array_key_exists($name, $_COOKIE) == true)\n {\n $token = $_COOKIE[$name];\n }\n\n return $token;\n}", "title": "" }, { "docid": "dfa18e42a108760bd25a6670d64c9bf9", "score": "0.68459535", "text": "public function get_cookie($name){\n\t\t$this->load->helper('cookie');\n\t\tif ($this->input->cookie($name,true)!=NULL) {\n\t\t\techo $this->input->cookie($name,true);\n\t\t}else{\n\t\t\techo \"no cookie\";\n\t\t}\n\t}", "title": "" }, { "docid": "77cfd270c3d5b7727ad8e15a1b97d277", "score": "0.68434364", "text": "public function getCookie( string $index )\n {\n if( isset( $_COOKIE[$index] ) && !empty( $_COOKIE[$index] ) ) {\n return $_COOKIE[$index];\n }\n \n return NULL;\n }", "title": "" }, { "docid": "0e96cd9ad0463ef9891fb09eabf10ff0", "score": "0.6839824", "text": "public static function get($key)\n { \n return isset($_COOKIE[$key]) ? $_COOKIE[$key] : null;\n }", "title": "" }, { "docid": "d9172123ac239cbb5024db18b3a0a786", "score": "0.681974", "text": "public function get(string $cookieName)\n {\n return $this->cookieManager->getCookie($cookieName);\n }", "title": "" }, { "docid": "77d0167d7b18ba3f7b520cbbce7e63ba", "score": "0.6818634", "text": "function getCookie()\r\n{\r\n\t$codigo = 0;\r\n\tif(isset($_COOKIE['LOGINRE']))\r\n\t{ \r\n\t\t$codigo = $_COOKIE['LOGINRE'];\r\n\t}\r\n\treturn $codigo;\r\n}", "title": "" }, { "docid": "f5872b0539d6dee7f20173f7b1ce9a09", "score": "0.68167686", "text": "public function getCookie($id = false){ \n if($id){\n if(isset($_COOKIE[$id])){\n return $_COOKIE[$id];\n }\n }\n elseif(isset($_COOKIE[$this->_name])){\n return $_COOKIE[$this->_name];\n }\n return false;\n }", "title": "" }, { "docid": "45fae855a1079a58bbe79720aaea013a", "score": "0.6806998", "text": "public static function get($key){\n if( array_key_exists($key, $_COOKIE) && !empty($_COOKIE[$key]) ){\n global $_COOKIES;\n $cookie_value = $_COOKIE[$key];\n $data = @unserialize($cookie_value);\n if ($data !== false) {\n return $data;\n } else {\n return $cookie_value;\n }\n }\n\n return false;\t\t\n\t}", "title": "" }, { "docid": "d16e9e018140cb01e19418c6df57798a", "score": "0.6802864", "text": "public function getCookie($key = null)\n {\n if (null === $key) {\n return $this->cookie;\n } else {\n return (isset($this->cookie[$key])) ? $this->cookie[$key] : null;\n }\n }", "title": "" }, { "docid": "a3a7c87241ddefcfde47eeac4a5ae988", "score": "0.67702746", "text": "protected function fromCookie($cookie){\n\t\treturn;\n\t}", "title": "" }, { "docid": "f6e2b521ede930561625afa1579995c1", "score": "0.6766883", "text": "final public function get_cookie($name)\n {\n return array_key_exists($name, $_COOKIE) ? $_COOKIE[ $name ] : null;\n }", "title": "" }, { "docid": "e31351dc3288d74ad3ed0c33630b0d44", "score": "0.67610496", "text": "public function get($name){\n if(((isset($_COOKIE[$name]))? true : false)) {\n return $_COOKIE[$name];\n }\n else return $this->$cookieErrorReport ;\n}", "title": "" }, { "docid": "77d8c6edc5f0f81493576b9ca27c1883", "score": "0.67505294", "text": "public static function get ($name)\n {\n return Gateway::getInstance()->cookies->get($name);\n }", "title": "" }, { "docid": "5a3312f150f5dc899a4049abcb858c2c", "score": "0.67465526", "text": "private function getCookieElement() {\n if (!request()->hasCookie(config('productcart.cookie_name'))) {\n//create new cookie and assign config file\n $cookie = Str::random(40);\n $parameters = Cookie::make(\n config('productcart.cookie_name'),\n $cookie,\n config('productcart.cookie_lifetime')\n );\n\n Cookie::queue($parameters);\n } else {\n\n $cookie = Cookie::get(config('productcart.cookie_name'));\n }\n\n return $cookie;\n }", "title": "" }, { "docid": "896b925dadf1bf9961a42ef23940fec1", "score": "0.6741469", "text": "public function getCookie($name){\n\n if(array_key_exists($name, $_COOKIE)){\n return $_COOKIE[$name];\n }//if\n\n return false;\n\n }", "title": "" }, { "docid": "84520e7b9fbb3f040644f4dffc9afbc3", "score": "0.6731157", "text": "public function getCookie($name, $default = null)\n {\n return array_key_exists($name, $this->cookies) ? $this->cookies[$name] : $default;\n }", "title": "" }, { "docid": "71d5ca76598e59cf930aab7a016c1656", "score": "0.6716015", "text": "public function getCookie($cookieName) \r\n {\r\n return filter_input(INPUT_COOKIE, $cookieName, FILTER_SANITIZE_STRING);\r\n }", "title": "" }, { "docid": "56709070776d6b1f70a65c89c394dc46", "score": "0.67123103", "text": "public function cookie($key = null){\n if(is_null($key)){\n return (object) $this->cookie;\n } else {\n return isset($this->cookie[$key])?$this->cookie[$key]:null;\n }\n }", "title": "" }, { "docid": "95569915c3d0bfe2b94f0219d711593c", "score": "0.67088515", "text": "public function get_cookies()\n {\n }", "title": "" }, { "docid": "f5e21239329fee1afa18e0f12165f3fe", "score": "0.66947585", "text": "protected function getCookieUser(){\n\t\treturn UCookie::get($this->_getUserSessionKey());\n\t}", "title": "" }, { "docid": "89a24af736a5ebefa4769d98845a58ec", "score": "0.6694478", "text": "function get($name) {\n $val = $_COOKIE[$name];\n if (setting('COOKIE.SECURE')) {\n if (!self::is_secure($val)) {\n return FALSE;\n }\n preg_match(\"/^(.*)\" . setting('COOKIE.SEPARATOR') . \"/\", $val, $values);\n $val = $values[1];\n }\n if (setting('COOKIE.ENCRYPT')) {\n $val = decrypt($val);\n }\n return $val;\n }", "title": "" }, { "docid": "37b8496fffc6ebf52766d31c4d41be0f", "score": "0.6665502", "text": "public function grabCookie($cookie, $params = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('grabCookie', func_get_args()));\n }", "title": "" }, { "docid": "810b86fd8acb2448f22b1a4c38028353", "score": "0.66587305", "text": "function wp_remote_retrieve_cookie_value($response, $name)\n{\n}", "title": "" }, { "docid": "af3a21387c19e33e109b89d7703cf7e1", "score": "0.66433084", "text": "public function getParsedCookie()\n {\n return $this->parseCookie();\n }", "title": "" }, { "docid": "901a91eed9c515434fb1ad73658bb5fd", "score": "0.6641975", "text": "public function getCookie($alias)\n {\n $this->validateCookie($alias);\n\n /** @var Cookie $cookie */\n if ($cookie = \\Yii::$app->getResponse()->getCookies()->get($this->getCookieNameByAlias($alias))) {\n return $cookie ? $cookie->value : null;\n } else {\n $cookie = \\Yii::$app->getRequest()->getCookies()->get($this->getCookieNameByAlias($alias));\n return $cookie ? $cookie->value : null;\n }\n }", "title": "" }, { "docid": "2c2776e045d1b32eb9f4b4767c03e43e", "score": "0.6637398", "text": "public function cookie($var = null)\n {\n $result = null;\n\n if (is_null($var)) {\n $result = $_COOKIE;\n } elseif(isset($_COOKIE[$var])) {\n $result = $_COOKIE[$var];\n }\n\n return $result;\n }", "title": "" }, { "docid": "bc91478fb5f52b0296a5c14bf3123d73", "score": "0.66355383", "text": "public function &cookie()\n {\n return $this->globals[\"cookie\"];\n }", "title": "" }, { "docid": "eb77fe5a4abb839033cbe6004e5f430b", "score": "0.6632763", "text": "public function getCookie($name) {\n if (isset($_COOKIE[$name])) {\n return $_COOKIE[$name];\n } else\n return FALSE;\n }", "title": "" }, { "docid": "4855fe8f1524c238967a783feec51374", "score": "0.6627944", "text": "public function get($name, $default = \"\")\n {\n return Arr::get($_COOKIE, $name, $default);\n }", "title": "" }, { "docid": "5d90b30ab43b650de169c5c4c26e1eaa", "score": "0.66279435", "text": "public function getCookie($varname, $default = false)\n {\n if(isset($this->cookievars[$varname])) {\n return $this->cookievars[$varname];\n } else {\n return $default;\n }\n }", "title": "" }, { "docid": "5d6a7d4daaf24e16227ac870e0ca49e1", "score": "0.66232353", "text": "public function getCookie($name) {\n\t\tif (empty($name)) {\n\t\t\tthrow new InvalidArgumentException('Invalid cookie name specified');\n\t\t}\n\t\t\n\t\t$cookie = null;\n\t\t\n\t\tif (array_key_exists($name, $this->cookies)) {\n\t\t\t$cookie = $this->cookies[$name];\n\t\t}\n\t\t\n\t\treturn $cookie;\n\t}", "title": "" }, { "docid": "f22718ff63fa2c2aae6328a19e53b880", "score": "0.6619078", "text": "private function readCookie() {\n $cipher = new Cipher();\n $auth = $cipher->decrypt($_COOKIE['auth']);\n list($user, $pass) = explode('|', $auth);\n $this->authUser(base64_decode($user), base64_decode($pass));\n }", "title": "" }, { "docid": "ef2c643cb0f3bbca40e54a5d3dfa7b66", "score": "0.66113913", "text": "function getCookie( string $name, $default ) {\n\t$app = appName();\n\tif ( !isset( $_COOKIE[$app] ) ) {\n\t\treturn $default;\n\t}\n\t\n\tif ( !is_array( $_COOKIE[$app]) ) {\n\t\treturn $default;\n\t}\n\t\n\treturn $_COOKIE[$app][$name] ?? $default;\n}", "title": "" }, { "docid": "eb69750812072fe9f219f9e83b217dbf", "score": "0.6610965", "text": "public function cookie();", "title": "" }, { "docid": "a5a1f1374336a40921b0d9a77a55385a", "score": "0.6610354", "text": "public function get($name) {\r\n // or Null if not set\r\n if (!isset($this->Cookies[$name])) {\r\n return null;\r\n }\r\n\r\n return $this->Cookies[$name];\r\n }", "title": "" }, { "docid": "ccf23c02056de168a0a1aaa64c3d4cf9", "score": "0.66011626", "text": "static function get($key)\n\t{\n\t\t$name = md5(EstatsCore::security().$key);\n\n\t\tif (!isset($_COOKIE[$name]))\n\t\t{\n\t\t\treturn NULL;\n\t\t}\n\n\t\tif (isset(self::$cookies[$key]))\n\t\t{\n\t\t\treturn self::$cookies[$key];\n\t\t}\n\n\t\tself::$cookies[$key] = unserialize(stripslashes($_COOKIE[$name]));\n\n\t\treturn self::$cookies[$key];\n\t}", "title": "" }, { "docid": "1e1894285e8739006521f35e2155ce99", "score": "0.6598603", "text": "function getCookie(){\r\n\t$cookie = get_facebook_cookie(FACEBOOK_APP_ID, FACEBOOK_SECRET);\r\n\treturn $cookie;\r\n}", "title": "" }, { "docid": "f530972b226d195633053252fef81b62", "score": "0.6578412", "text": "public function read(Request $request): CookieValueInterface\n {\n if (!$request->cookies || !$request->cookies->has($this->configuration->getName())) {\n throw new CookieNotFoundException();\n }\n $cookie = $request->cookies->get($this->configuration->getName());\n $fingerprint = $this->hashFingerprint($cookie);\n $this->logger->notice(sprintf('Reading a SSO on 2FA cookie with fingerprint %s', $fingerprint));\n return $this->encryptionHelper->decrypt($cookie);\n }", "title": "" }, { "docid": "c9d2a33d09131640958d4341e361e2ac", "score": "0.655691", "text": "function wp_remote_retrieve_cookie($response, $name)\n{\n}", "title": "" }, { "docid": "d43ca285d96dfb8380f505fc75df631b", "score": "0.65553916", "text": "function getcookie()\r\n\t{\r\n\t\tforeach(explode(\"\\r\\n\",$this->getheader()) as $header)\r\n\t\t{\r\n\t\t\tif(preg_match('/set-cookie/i',$header))\r\n\t\t\t{\r\n\t\t\t\t$fequal = strpos($header,'=');\r\n\t\t\t\t$fvirgu = strpos($header,';');\r\n\t\t\t\t\r\n\t\t\t\t// 12=strlen('set-cookie: ')\r\n\t\t\t\t$cname = substr($header,12,$fequal-12);\r\n\t\t\t\t$cvalu = substr($header,$fequal+1,$fvirgu-(strlen($cname)+12+1));\r\n\t\t\t\t\r\n\t\t\t\t$this->cookie[trim($cname)] = trim($cvalu);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6d869f6a69969e511d80190c3bf06a4b", "score": "0.6541218", "text": "public static function get($name, $default = null) {\n return filter_has_var(INPUT_COOKIE, $name) ? filter_input(INPUT_COOKIE, $name) : $default;\n }", "title": "" }, { "docid": "c569b0857c19ead6c1291afb90c88551", "score": "0.6534439", "text": "public static function get($name, $default = null)\n\t{\n\t\treturn array_key_exists($name, $_COOKIE) ? $_COOKIE[$name] : $default;\n\t}", "title": "" }, { "docid": "f5826cc901d13afcf110902ae704a3d0", "score": "0.6524554", "text": "public static function get( $name )\n {\n $name = trim( $name );\n\n return isset( $_COOKIE[ $name ] ) ? new self( $name, $_COOKIE[ $name ] ) : null;\n }", "title": "" }, { "docid": "ba83e92f7afeb7d1352ae3235fa769b5", "score": "0.65064377", "text": "function getCookieVar($key) {\n\t\t$_this =& PKPRequest::_checkThis();\n\n\t\tif (isset($_COOKIE[$key])) {\n\t\t\t$value = $_COOKIE[$key];\n\t\t\t$_this->cleanUserVar($value);\n\t\t\treturn $value;\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "47a1415527798565f047e2c699e5df0a", "score": "0.65002507", "text": "public function getCookie($cookieName)\n {\n return $this->getResponse()->getCookie($cookieName);\n }", "title": "" }, { "docid": "ebe38814bdefa567fdfd7e57217292bc", "score": "0.6499155", "text": "public function getCookies()\n {\n\n }", "title": "" }, { "docid": "848c68f468bea162d142054511ab0dc2", "score": "0.6496003", "text": "public function getCookie($cookieName)\n {\n return $this->getHttpRequest()->getCookie($cookieName);\n }", "title": "" }, { "docid": "654ee0e20fea2ce9a49bc4a86936006e", "score": "0.6494726", "text": "public function cookie($name)\n {\n return isset($_COOKIE[$name]) ? $_COOKIE[$name] : null;\n }", "title": "" }, { "docid": "383570717a4649c714fd69b9d8e9a209", "score": "0.64866924", "text": "public function getCookie()\n {\n if ( ! isset($this->cookie)) {\n throw new RuntimeException('Cookie has not been set.');\n }\n \n return $this->cookie;\n }", "title": "" }, { "docid": "c401b649f505e7c8926b1cb21ad3ee0e", "score": "0.64855677", "text": "public function get($index)\n\t{\n\t\treturn (isset($_COOKIE[$index]) ? $_COOKIE[$index] : null);\n\t}", "title": "" } ]
1c497277c9afb51ee349b0cd9c4be5dc
Sets multiple attributes for the specified column name
[ { "docid": "7b95c8069478ebf5c6bd7df056dcd3e6", "score": "0.6432037", "text": "public function setColumnAttributes($columnName, array $attributes)\n {\n foreach ($attributes as $attribute => $value) {\n $this->setColumnAttribute($columnName, $attribute, $value);\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "dd5086a4de351977ec29924b19f54d8c", "score": "0.64704126", "text": "public function setColumnName($name);", "title": "" }, { "docid": "f1ac61f549d9027229fff2a477946011", "score": "0.63330346", "text": "function setAttributes(array $attrs);", "title": "" }, { "docid": "710a7f190181b4796302fe84b2c75795", "score": "0.63004214", "text": "public function setAttributes($data){\n }", "title": "" }, { "docid": "3f54e5bf39506da0cbb4168b862c132b", "score": "0.6276741", "text": "function setAttributes(array $attributes);", "title": "" }, { "docid": "3f54e5bf39506da0cbb4168b862c132b", "score": "0.6276741", "text": "function setAttributes(array $attributes);", "title": "" }, { "docid": "2735c5dc21574a2ca00d555ff446ab55", "score": "0.6243732", "text": "public function __set($_attribute_name, $data);", "title": "" }, { "docid": "8c1c8a72ca11f93a5a6facdd7cba2014", "score": "0.6216825", "text": "public function set_attributes($data) {\n if (empty($data))\n exit();\n if (is_array($data))\n $this->attributes = esc_sql ($data);\n else\n parse_str($data, $this->attributes);\n foreach ($this->attributes as $name => $value)\n if (property_exists($this, $name))\n $this->$name = $value;\n }", "title": "" }, { "docid": "6e957c08161f2ffb3136ce1cb80acd37", "score": "0.6165293", "text": "public function __set($name, $value) {\n $this->columns[$name] = $value;\n }", "title": "" }, { "docid": "a0778ee4e4afccf18ff92253365e3079", "score": "0.614031", "text": "public function setData($datas) {\n foreach($datas as $attr=>$val) {\n /*if(!isset($this->attribs[$attr]))\n throw new Exception(\"$attr not an attribute of $this->tablename\");*/\n $this->attribs[$attr] = $val;\n }\n }", "title": "" }, { "docid": "508c0f80ee53b5ebb1fa8bdfb6fc3370", "score": "0.61375856", "text": "public function set_attributes(array $attributes) {}", "title": "" }, { "docid": "110358aaba2e1e6e85a09beabbdc0b1a", "score": "0.60995114", "text": "public function setAttr($attr_name, $attr) {\n $this->attrs[$attr_name] = $attr;\n }", "title": "" }, { "docid": "77eb62c96478993e1fef16f54f47c2f6", "score": "0.6071381", "text": "public function setColumnName (Array $column_name)\n {\n foreach ($column_name as $value) {\n $this->sql['column_name'] .= $value . ',';\n }\n $this->sql['column_name'] = substr($this->sql['column_name'], 0, - 1);\n return $this;\n }", "title": "" }, { "docid": "eec3a566ac5cd6a589cdc84bccfec02c", "score": "0.5981786", "text": "public function __set($name, $value)\n\t{\n\t\t$md = $this->getMetaData();\n\t\tif (isset($md->table->columns[$name])) {\n\t\t\t$this->_attributes[$name] = $value;\n\t\t} elseif (isset($md->relations[$name])) {\n\t\t\t$this->_related[$name] = $value;\n\t\t} else {\n\t\t\tparent::__set($name, $value);\n\t\t}\n\t}", "title": "" }, { "docid": "5be093325fec746ffb1f663d750004ff", "score": "0.5970832", "text": "public function setColumns(array $columns = array());", "title": "" }, { "docid": "63b271957fb89027d24baddc22e1e1b1", "score": "0.59522974", "text": "public function setAttributes(array $attributes);", "title": "" }, { "docid": "17439e72a7ede648c7ec77942681eb80", "score": "0.59479946", "text": "protected function setAttribute($attr)\n {\n if (! empty($attr)) {\n foreach ($this->attribute as $props) {\n if (isset($attr[$props])) {\n $this->$props = $attr[$props];\n }\n }\n }\n }", "title": "" }, { "docid": "6abd92a771be7163f9d7ada91c852396", "score": "0.59450287", "text": "public function normaliseColumnAttributes($column);", "title": "" }, { "docid": "f618ac216d6e3c699d81eac23f0fb593", "score": "0.5922776", "text": "function set_attribute($name, $value)\n\t{\n\t\t$this->attributes[$name] = $value;\n\t}", "title": "" }, { "docid": "c83009f6a6c9aa114d37ae895ba366d2", "score": "0.5891258", "text": "public static function columnToAttribute($name)\n\t{\n\t\t$calledClass = get_called_class();\n\t\t\n\t\tif ($calledClass::hasAttributesMapping()) {\n\t\t\t$mapping = array_flip($calledClass::getAttributesMapping());\n\t\t\tif (isset($mapping[$name])) {\n\t\t\t\treturn $mapping[$name];\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "9043d1bc9d9b83f22dd4901b5352be51", "score": "0.58850354", "text": "public function set_attribute( $attr_info )\r\n\t\t{\r\n\t\t\t$this->errno = DB_OK;\r\n\t\t\t$flag = 0;\r\n\t\t\t\r\n\t\t\tif ( $this->attr_id == -1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tSuch attribute hasn't been created\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t{\r\n\t\t\t\t$this->errno = WRONG_ID;\r\n\t\t\t\treturn ;\r\n\t\t\t}\t\r\n\t\r\n\t\t\t$query = \"UPDATE attribute SET\"; \r\n\t\r\n\t\t\tif ( ! is_null( $attr_info->name ) )\r\n\t\t\t{\r\n\t\t\t\t$flag=1;\r\n\t\t\t\t$query .= \" attr_name=\\\"$attr_info->name\\\"\";\t\t\t\t\t\t\t\t\t\t\t\t\t//\tSetting attribute's name\r\n\t\t\t\t$this->name = $attr_info->name;\r\n\t\t\t}\r\n\t\r\n\t\t\tif ( ! is_null( $attr_info->description ) )\t\r\n\t\t\t{\t\t\r\n\t\t\t\tif ( $flag == 1 )\r\n\t\t\t\t\t$query .= \" , \";\r\n\t\t\t\telse\r\n\t\t\t\t\t$flag=1;\r\n\t\t\t\t\t\r\n\t\t\t\t$query .= \" attr_description=\\\"$attr_info->description\\\"\";\t\t\t\t\t\t\t\t\t\t//\tSetting attribute's description\r\n\t\t\t\t$this->description = $attr_info->description;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif ( ! is_null( $attr_info->is_filterable ) )\r\n\t\t\t{\r\n\t\t\t\tif ( $flag == 1 )\r\n\t\t\t\t\t$query .= \" , \";\r\n\t\t\t\telse\r\n\t\t\t\t\t$flag=1;\r\n\t\t\t\t\t\r\n\t\t\t\t$query .= \" filterable=$attr_info->is_filterable\";\t\t\t\t\t\t\t\t\t\t\t\t//\tSetting attribute's filterability\r\n\t\t\t\t$this->is_filterable = $attr_info->is_filterable;\r\n\t\t\t}\r\n\t\t\t\r\n if ( ! is_null( $attr_info->default_weight ) )\r\n\t\t\t{\r\n\t\t\t\tif ( $flag == 1 )\r\n\t\t\t\t\t$query .= \" , \";\r\n\t\t\t\telse\r\n\t\t\t\t\t$flag=1;\r\n\r\n\t\t\t\t$query .= \" default_weight=$attr_info->default_weight\";\t\t\t\t\t\t\t\t\t\t\t//\tSetting attribute's filterability\r\n\t\t\t\t$this->default_weight = $attr_info->default_weight;\r\n\t\t\t}\r\n\r\n\t\t\tif ( $flag != 0 )\r\n\t\t\t{\r\n\t\t\t\t$query .= \" WHERE attr_id=$this->attr_id;\";\r\n\t\r\n\t\t\t\tif( !$this->con->query( $query ) )\t\t\t\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->errno = MYSQL_ERROR;\t\t\t\t\t\r\n\t\t\t\t\treturn ;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tFailed to query\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( $attr_info->comparability == COUNTABLE && ! is_null( $attr_info->type_elements ) )\r\n\t\t\t{\r\n\t\t\t\t$this->set_countable( $attr_info->type_elements );\r\n\t\t\t\r\n\t\t\t\tif ( $this->errno != DB_OK )\r\n\t\t\t\t{\r\n\t\t\t\t\treturn ;\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t\telse if ( $attr_info->comparability == DISTINCT && ! is_null( $attr_info->type_elements ) )\t\t//\tif the attribute is distinct we may have 4 cases\r\n\t\t\t{\r\n\t\t\t\r\n\t\t\t\tfor ( $i = 0; $i < count ( $attr_info->type_elements ); $i++ )\t\t\t\t\t\t\t\t\t//\tfor every attribute in the array\r\n\t\t\t\t{\t\t\t\t\r\n\t\t\t\t\tif ( $attr_info->type_elements[$i][\"Old\"] === NULL && $attr_info->type_elements[$i][\"New\"] === NULL )\t//\tthis is not an edit case just an error input\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$this->errno = WRONG_INPUT;\r\n\t\t\t\t\t\treturn ;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t\telse if ( $attr_info->type_elements[$i][\"Old\"] === NULL )\t\t\t\t\t\t\t\t\t//\tthe first case needs an attribute's distinct value to be added \r\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\talong with its preference\t\t\r\n\t\t\t\t\t\t$this->add_distinct( $attr_info->type_elements[$i] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ( $attr_info->type_elements[$i][\"New\"] === NULL )\t\t\t\t\t\t\t\t\t//\tthe second case needs an attribute's distinct value to be removed \r\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\talong with its preference\r\n\t\t\t\t\t\t$this->remove_distinct( $attr_info->type_elements[$i] );\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tthe third and fourth case needs either an attribute's distinct \r\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tvalue along with its preference or the preference to be edited\r\n\t\t\t\t\t\t$this->set_distinct( $attr_info->type_elements[$i] );\r\n\t\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\t\tif ( $this->errno != DB_OK )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tif any error occurs stop the procedure\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn ;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "ae7ee51e6b92cc5ddb70f3e1802d984f", "score": "0.58570987", "text": "public function setColumns(array $columns);", "title": "" }, { "docid": "a89cfc1ebe16e0aebc8697f53bdd5586", "score": "0.58268833", "text": "function setAttributes($attributes) {\n \t if(is_array($attributes)) {\n \t foreach($attributes as $k => $v) {\n \t if(is_array($this->protect) && (in_array($k, $this->protect) || in_array($k, $this->protect))) {\n \t continue; // field is in list of protected fields\n \t } // if\n \t if(is_array($this->accept) && !(in_array($k, $this->accept) || in_array($k, $this->protect))) {\n \t continue; // not in list of acceptable fields\n \t } // if\n \t if($this->fieldExists($k)) {\n \t $this->setFieldValue($k, $attributes[$k]);\n \t } // if\n \t } // foreach\n \t } // if\n \t}", "title": "" }, { "docid": "7f98c1963ca5524c1abe0a5c19d03a8f", "score": "0.57767594", "text": "private function attrNames()\n {\n $this->attrNames = [\n 'length' => 'length',\n 'width' => 'width',\n 'height' => 'height'\n ];\n }", "title": "" }, { "docid": "87e7f2a611f240e2ce336d711d04fa58", "score": "0.577184", "text": "final public function offsetSet($name, $column)\n\t{\n\t\t$this->addColumn($column, $name);\n\t}", "title": "" }, { "docid": "482a303a719539bc7cd62a2f532630a0", "score": "0.5771165", "text": "public function setAttributes($name, $value = NULL) {\n\t\tJquery_Field_Error::i()\n\t\t\t->argument(1, 'string', 'array')\n\t\t\t->argument(2, 'scalar', 'null');\n\t\t\n\t\tif(is_array($name)) {\n\t\t\t$this->_attributes = $name;\n\t\t\treturn $this;\n\t\t}\n\t\t\n\t\t$this->_attributes[$name] = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7b70b23ffe4baf63ff0836ae71a90c74", "score": "0.5745498", "text": "public function setAttributeItems( array $attributes );", "title": "" }, { "docid": "a025bb9066fc7bd459195f2370e6c1ef", "score": "0.5718496", "text": "function setAttribute($name, $value) {\n\t\t$this->_attributes[$name] = $value;\n\t}", "title": "" }, { "docid": "fcb9dcc0c9c0a2d60186bbb7033051b9", "score": "0.5698154", "text": "protected function createAttribute($params)\r\n {\r\n foreach($params as $key => $value) {\r\n $this->$key = $value;\r\n }\r\n }", "title": "" }, { "docid": "fb12c546f75ae1fda7179dace8900a6a", "score": "0.5691706", "text": "public function setAttributes($values)\n {\n if (is_array($values)) {\n $attributes = array_flip($this->attributes());\n\n foreach ($values as $name => $value) {\n if (isset($attributes[$name])) {\n $this->$name = $value;\n }\n }\n }\n }", "title": "" }, { "docid": "7341eea9e384e8832b067be49c2c1ee0", "score": "0.5690572", "text": "function setAttributes($hash=false)\n {\n foreach ($hash as $name => $value)\n {\n $this->setAttribute($name, $value);\n }\n }", "title": "" }, { "docid": "30c2589f1b6d04e0e9df9c77522239f0", "score": "0.5657621", "text": "public function __set($name, $value)\n {\n $this->attributes[$name] = $value; \n }", "title": "" }, { "docid": "11eab23940c6f4bf186f3c2776de20ca", "score": "0.5652545", "text": "public function __set($name, $value)\n\t{\n\t\t$this->attr[$name] = $value;\n\t}", "title": "" }, { "docid": "c07fe6aff8c6c6441a7fb7d9d699e749", "score": "0.56419533", "text": "public function setAttribute(string $name, $value): Attributes;", "title": "" }, { "docid": "bf41e61a0c7fc9d663c47e707b77f718", "score": "0.56393796", "text": "public function setAttribute($name, $value)\n {\n if (in_array($name, $this->getDates()) && $value) {\n $value = $this->fromDateTime($value);\n }\n\n if (property_exists($this, $name)) {\n $this->$name = $value;\n } elseif (isset($this->getMetaData()->columns[$name])) {\n $this->attributes[$name] = $value;\n } else {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "dfad1b36a07d2e0fe41b71ae46cdaab9", "score": "0.56288075", "text": "function setAttribute($name,$value)\n {\n $this->attributes[$name] = $value;\n return $this;\n }", "title": "" }, { "docid": "304b31ad584945549dd986a07cc1ef22", "score": "0.5628638", "text": "public function setName($name) {\n $this->name = new Attribute('name', $name);\n $this->addAttribute($this->name);\n }", "title": "" }, { "docid": "88f954f2b697bbb8b24bf38d5e0f8ebe", "score": "0.56260884", "text": "public function __set($name, $value)\n { \n //set the attribute with the value\n $this->$name = $value;\n }", "title": "" }, { "docid": "900a63b6bc913722c211139f3bba597f", "score": "0.5612791", "text": "public function setAttrs($attrs)\n {\n $idField = $this->getIdentifierField();\n if ($this->hasAttr($idField)) {\n $oldId = $this->get($idField);\n // throw exception on different ids\n if (array_key_exists($idField, $attrs) && $attrs[$idField] !== $oldId) {\n throw new \\Exception('Trying to modify an existing entity identifier');\n }\n }\n\n $this->attrs = array_merge($this->attrs, $attrs);\n }", "title": "" }, { "docid": "1ff0d6927b4e48967cacf53dd44851d0", "score": "0.56087774", "text": "private function setUpdatableCols()\n\t{\n\t\t$this->baseUpdatableCols = array(\n\t\t\t'nik',\n\t\t\t'agama',\n\t\t\t'foto',\n\t\t\t'status_perkawinan',\n\t\t\t'pekerjaan',\n\t\t\t'pendidikan_terakhir',\n\t\t);\n\t}", "title": "" }, { "docid": "ec575f6c0dbeb9d8cbd7b83b515ee6b1", "score": "0.5602144", "text": "protected function defineAttributes()\n {\n $this->dbAttributes = (object)[\n 'safe' => [\n 'pertenece_nucleo',\n 'nombre',\n 'tipo',\n 'imagen',\n 'etiqueta',\n 'enlace',\n 'cod_padre',\n 'orden'\n ],\n 'date' => []\n ];\n }", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.5602018", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.5602018", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "089c4a56a10807ff9ce7028252badfb9", "score": "0.55979747", "text": "public function setAttributeName(string $name)\n {\n $this->attributeName = $name;\n }", "title": "" }, { "docid": "6c660639b6e6ad59e172094cd4085ac8", "score": "0.5595885", "text": "function setName($name) {\n $this->updateAttributes(array('name' => $name\n ));\n }", "title": "" }, { "docid": "69e9d6ab6470ad60a368718c51ad0972", "score": "0.55919147", "text": "public function setAtributoColumnas($_atributoColumnas)\n {\n $this->atributoColumnas = $_atributoColumnas;\n }", "title": "" }, { "docid": "134274c2520fea21e5ef4eb406bb3523", "score": "0.55894727", "text": "protected function setColumns()\n {\n $this->columns[self::COL_NAME] = $this->model->getNameUser();\n $this->columns[self::COL_GENDER] = $this->model->getGenderUser();\n $this->columns[self::COL_AVATAR] = $this->model->getAvatarUser();\n $this->columns[self::COL_TYPE] = $this->model->getTypeUser();\n $this->columns[self::COL_STATUS] = $this->model->getStatusUser();\n $this->columns[self::COL_EMAIL] = $this->model->getEmailUser();\n //..cria um hash md5 para armazenar a senha\n $this->columns[self::COL_PASSWORD] = \\md5($this->model->getPasswordUser());\n }", "title": "" }, { "docid": "6110bee4269d5c2704cfd6310a8bd7e4", "score": "0.55820507", "text": "public function __set($name, $value) {\n switch ($name) {\n case 'name' :\n $this->_setName($value);\n break;\n case 'mediaId' :\n $this->_setMediaId($value);\n break;\n case 'versionId' :\n $this->_setVersionId($value);\n break;\n case 'mimeType' :\n $this->_setAttributeTrimString($name, $value);\n break;\n default :\n throw new BadMethodCallException(\n sprintf(\n 'Invalid attribute \"%s:$%s.\"',\n __CLASS__,\n $name\n )\n );\n }\n }", "title": "" }, { "docid": "8ff15e8a870a16a731ee17ef977d3cac", "score": "0.5546564", "text": "public function populateAttr()\n {\n $itensIgnore = $this->ignoreAttr;\n $itensIgnore[] = $this->workmodel->namePk;\n $itensIgnore = $this->ignoreAttr;\n $namePk = $this->workmodel->namePk;\n \n $header = Array();\n \n foreach ($this->workmodel as $attr => $val) {\n if (in_array($attr, $itensIgnore)) { continue; } \n $header[] = $attr;\n }\n \n $this->query = \"SELECT \" . implode(', ', $header) . \" \n FROM {$this->workmodel->schema}.{$this->workmodel->table}\n WHERE {$this->workmodel->namePk} = :{$this->workmodel->namePk}\";\n $smtp = $this->request()->prepare($this->query);\n $smtp->bindParam(\":{$this->workmodel->namePk}\", $this->workmodel->$namePk, PDO::PARAM_INT);\n $smtp->execute();\n $row = $smtp->fetch(PDO::FETCH_ASSOC);\n \n if($row){\n \n foreach ($row as $key => $value){\n \n $newKey = 'set' . ucfirst($key);\n $this->$newKey($value);\n \n }\n \n return ReturnService::requestStatus('Populado!', true);\n \n }\n \n \n return ReturnService::requestStatus('Não foi possível localizar o registro!', FALSE, $row);\n }", "title": "" }, { "docid": "69417de55f8aed7523ec623d1d916cd6", "score": "0.5544362", "text": "public function setColumnName($sName)\n {\n $this->aConfigStruct['name'] = $sName;\n \n return $this;\n }", "title": "" }, { "docid": "469c32be5e98044f5c00ef2bba667a8c", "score": "0.55237186", "text": "public function getAttributes(){\n //de aqui agarro los atributos y valores para pasarselos al update\n return $this->columns;\n }", "title": "" }, { "docid": "f14144da98abd85c79b54ad3592094de", "score": "0.55135435", "text": "public function setNameAttribute($name)\n\t\t{\n\t\t\t# code...\n\t\t\treturn $this -> attributes['name'] = strval($name);\n\t\t}", "title": "" }, { "docid": "44b87c4fb66410c6a1826f68cfe1cd18", "score": "0.5500772", "text": "public function setcols($cols)\n {\n \t$this->_cols = $cols;\n }", "title": "" }, { "docid": "99316372cbf89fc7e8949778001bf36c", "score": "0.54714286", "text": "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_log',\n 'campo',\n 'anterior',\n 'nuevo',\n 'descripcion'\n ],\n 'date' => []\n ];\n }", "title": "" }, { "docid": "8cebd06708e92600a59eaeb603b0d70b", "score": "0.546881", "text": "abstract protected function doSetColDef(YMKM_SQL_Iface_SelectAware $c);", "title": "" }, { "docid": "59350fb9fbf10f2287587ddd448b9904", "score": "0.54583186", "text": "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'archivo_idarchivo',\n 'nombre',\n 'destino',\n 'tipo_destino',\n 'fecha',\n 'respuesta',\n 'origen',\n 'tipo_origen',\n 'notas',\n 'transferencia_descripcion',\n 'tipo',\n 'ruta_idruta',\n 'ver_notas',\n 'recibido',\n 'enviado'\n ],\n 'date' => [\n 'fecha',\n 'respuesta'\n ],\n 'primary' => 'idtransferencia'\n ];\n }", "title": "" }, { "docid": "114d1f4dff9b8107615307bffd54c565", "score": "0.5451268", "text": "public function addColumn($name, $attrs)\n {\n if (is_string($attrs)) {\n $attrs = ['type' => $attrs];\n }\n $valid = static::$_columnKeys;\n if (isset(static::$_columnExtras[$attrs['type']])) {\n $valid += static::$_columnExtras[$attrs['type']];\n }\n $attrs = array_intersect_key($attrs, $valid);\n $this->_columns[$name] = $attrs + $valid;\n $this->_typeMap[$name] = $this->_columns[$name]['type'];\n return $this;\n }", "title": "" }, { "docid": "b87fb1474052665736a32c15deae6e4a", "score": "0.5450638", "text": "function setColsFromArray($array)\r\r\n\t{\r\r\n\t\tif (!empty($array))\r\r\n\t\t{\r\r\n\t\t\tforeach ($array as $spalte => $breite)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->cols[$spalte] = $breite;\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "b4fb8e292f1af7e74b92678d5cf1d872", "score": "0.5444749", "text": "protected function fill()\n {\n foreach ($this->attributes as $key => $value) {\n $key = $this->camelCase($key);\n\n $this->{$key} = $value;\n }\n }", "title": "" }, { "docid": "74a1c12d4b1511ca3a416abb5be0bc57", "score": "0.5439779", "text": "public static function attributeToColumn($name)\n\t{\n\t\t$calledClass = get_called_class();\n\t\t\n\t\tif ($calledClass::hasAttributesMapping()) {\n\t\t\t\n\t\t\t$mapping = $calledClass::getAttributesMapping();\n\t\t\t\n\t\t\t$return = array();\n\t\t\t$names = (array) $name;\n\t\t\t\n\t\t\tforeach ($names as $attribute) {\n\t\t\t\tif (isset($mapping[$attribute])) {\n\t\t\t\t\t$return[] = $mapping[$attribute];\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$return[] = $attribute;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (is_array($name)) {\n\t\t\t\treturn $return;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn current($return);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "941ede1d37a7072eaee08e500e0a31de", "score": "0.54314077", "text": "abstract public function alterTableAttributes(Table $table, array $attributes): string|array;", "title": "" }, { "docid": "42a3b64d2023714062ab2113b1d17ce0", "score": "0.54131323", "text": "public function setAttributes(array $values): void;", "title": "" }, { "docid": "ee23f18db31971b2c0b190fa1f357ad2", "score": "0.5413071", "text": "public function setAttributes(string $key, mixed $item): void\n {\n if (is_array($item)) {\n foreach ($item as $itemKey => $element) {\n $this->$itemKey = $element;\n }\n\n return;\n }\n $this->$key = $item;\n }", "title": "" }, { "docid": "13e6721f0daa0358e7227d63beb7d31e", "score": "0.5412338", "text": "public function __set($name,$value)\n\t{\n\t\t$setter='set'.$name;\n\t\tif(method_exists($this,$setter))\n\t\t\t$this->$setter($value);\n\t\telse\n\t\t\t$this->attributes[$name]=$value;\n\t}", "title": "" }, { "docid": "f306019fb00c41408f0160090dd6b203", "score": "0.54115707", "text": "public function __set($name, $value)\n\t{\n\t\t$this->attributes[$name] = $value;\n\t}", "title": "" }, { "docid": "af0931b86cdce178639dec9fa98b8b10", "score": "0.5405934", "text": "public function addAttr(MCL_TABLE_ATTR $attr) {\n $this->attrs[$attr->getName()] = $attr;\n }", "title": "" }, { "docid": "6111628b3a8a743f689d775f17b03244", "score": "0.53990823", "text": "public function __set($name, $value)\n {\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "6111628b3a8a743f689d775f17b03244", "score": "0.53990823", "text": "public function __set($name, $value)\n {\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "e04fa053efa6073c269c4006ced076c4", "score": "0.5392272", "text": "public static function setAttribute(&$options, $attributes){\n\t\tforeach($attributes as $key => $value){\n\t\t\tif(isset($options[$key])) continue;\n\t\t\tif($value !== '') $options[$key] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "3bde803dc8821f065150fa763bf82f7d", "score": "0.53822094", "text": "public function setAttribute($key, $value);", "title": "" }, { "docid": "ad6b75acc3d4b21fd3bff32528f89567", "score": "0.5376224", "text": "function setAll($att, $isUpdate = false) {\n $this->getProp();\n if (!$isUpdate){ \n \n }else{\n $this->editing = true;\n }\n foreach ($this->_prop as $k => $v) {\n if (isset($att[$k])) {\n $this->_prop[$k] = $att[$k];\n //$this->set($k, $att[$k]);\n } else {\n unset($this->_prop[$k]);\n }\n }\n }", "title": "" }, { "docid": "72f6141f920b7220fbcd1922b79fe4e1", "score": "0.5374575", "text": "public function __set($name,$value)\n\t{\n\t\tif(in_array($name,$this->config_other_attributes))\n\t\t\t$this->list_other_attributes[$name]=$value;\n\t\telse \n\t\t\tparent::__set($name,$value);\n\t}", "title": "" }, { "docid": "8d5fb1da4d97ef4e4ded73d8b263062b", "score": "0.5374223", "text": "public function setColumns($columns)\n {\n $this->columns = $columns;\n }", "title": "" }, { "docid": "8d5fb1da4d97ef4e4ded73d8b263062b", "score": "0.5374223", "text": "public function setColumns($columns)\n {\n $this->columns = $columns;\n }", "title": "" }, { "docid": "b9f74cfe0a4bd16715e507921d2c4217", "score": "0.53691334", "text": "protected function mapAttributes()\n {\n foreach( $this->map as $position => $key){\n array_set($this->attributes, $key, array_get($this->raw, $position) );\n }\n }", "title": "" }, { "docid": "685be323b9854fee80b02ec699383f31", "score": "0.5361285", "text": "public function setAttribute($name, $value, $cast = true)\n {\n if ($cast) {\n if(property_exists($this,$name))\n $value = $this->castAttribute($name, $value);\n elseif(isset($this->getMetaData()->columns[$name]))\n $value = $this->castAttribute($name, $value);\n }\n return parent::setAttribute($name, $value);\n }", "title": "" }, { "docid": "2413c6d6b021be50e794b99eacfa027c", "score": "0.5360925", "text": "private function setAttribute ($name, $value) {\n // Not possible when setAttribute is private.\n #if (!is_string($name)) {\n # throw new \\InvalidArgumentException('Attribute name is not a string.');\n #} else\n if (!is_string($value) && !is_int($value)) {\n throw new Exception\\InvalidArgumentException('Attribute value is not a string.');\n } else if ($name === 'name') {\n throw new Exception\\InvalidArgumentException('\"name\" attribute cannot be overwritten.');\n }\n\n $this->attributes[$name] = $value;\n }", "title": "" }, { "docid": "0bb5e2c761532abc687c2d2095b8568d", "score": "0.5356212", "text": "function addAttribute($name, $value);", "title": "" }, { "docid": "0bb5e2c761532abc687c2d2095b8568d", "score": "0.5356212", "text": "function addAttribute($name, $value);", "title": "" }, { "docid": "debc6ab519193f576f3baf725e4641b2", "score": "0.5353578", "text": "public function set_col_property($col_name, $property = array()){\r\n $cust_property = array();\r\n foreach($property as $prop_key=>$prop_value){\r\n if(is_string($prop_value) || is_array($prop_value)){\r\n $prop_value = $this->parse_to_script($prop_value);\r\n }\r\n $cust_property[$prop_key] = $prop_value;\r\n }\r\n\r\n // property merge, so set_col_property multiple times\r\n if(isset($this->cust_col_properties[$col_name])){\r\n $this->cust_col_properties[$col_name] = array_replace_recursive($cust_property, $this->cust_col_properties[$col_name]);\r\n }else{\r\n $this->cust_col_properties[$col_name] = $cust_property;\r\n }\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "6190073f77e3162aeb367ed6104b4b6f", "score": "0.534099", "text": "public function __set($name,$value)\n\t{\n try {\n parent::__set($name,$value);\n } catch (Exception $e) {\n return $this->modelAttributes[$name] = $value;\n }\n\t}", "title": "" }, { "docid": "68cb96de6300896189fa6ab3d360b113", "score": "0.5333556", "text": "function setAll($att) {\n if (!$this->editing)\n $this->getProp();\n\n foreach ($this->_prop as $k => $v) {\n if (isset($att[$k])) {\n $this->_prop[$k] = $att[$k];\n //$this->set($k, $att[$k]);\n } else {\n if (!$this->editing)\n unset($this->_prop[$k]);\n }\n }\n }", "title": "" }, { "docid": "68cb96de6300896189fa6ab3d360b113", "score": "0.5333556", "text": "function setAll($att) {\n if (!$this->editing)\n $this->getProp();\n\n foreach ($this->_prop as $k => $v) {\n if (isset($att[$k])) {\n $this->_prop[$k] = $att[$k];\n //$this->set($k, $att[$k]);\n } else {\n if (!$this->editing)\n unset($this->_prop[$k]);\n }\n }\n }", "title": "" }, { "docid": "d1a1cd315701cd3e8979948874a5c500", "score": "0.5321362", "text": "private function setAttr($arg)\n {\n try{\n if(!isset($arg) || empty($arg)){\n throw new \\Exception('pole je prazdne');\n }\n }catch (\\Exception $err){\n print $err->getMessage();\n die;\n }\n\n if(count($arg) > 1){\n foreach ($arg as $key=>$item){\n $arg[$key]->link = $this->setLink($item);\n $arg[$key]->img = $this->setImg($item);\n $arg[$key]->excerpt = $this->setShort($item);\n $arg[$key]->date = $this->setDate($item);\n }\n }else{\n end($arg)->link = $this->setLink(end($arg));\n end($arg)->img = $this->setImg(end($arg));\n end($arg)->excerpt = $this->setShort(end($arg));\n end($arg)->date = $this->setDate(end($arg));\n }\n }", "title": "" }, { "docid": "7c505e46e4bfbbdbdcd24b5eb2416618", "score": "0.5315983", "text": "protected function defineAttributes()\n {\n $this->dbAttributes = (object) [\n 'safe' => [\n 'fk_funcionario',\n 'fk_tarea',\n 'fecha',\n 'descripcion',\n 'estado',\n 'valor',\n ],\n 'date' => ['fecha'],\n 'labels' => [\n 'estado' => [\n 'label' => 'valor',\n 'values' => [\n '1' => 'Realizada',\n '2' => 'Pendiente',\n '3' => 'En proceso',\n '4' => 'Cancelada'\n ]\n ]\n ]\n ];\n }", "title": "" }, { "docid": "93645da1c9a7c930075ec325ce382904", "score": "0.5315662", "text": "public function setAttribute($name, $value) {\n\t\t$value = trim ( $value );\n\t\t$value = html_entity_decode ( $value, ENT_QUOTES, 'UTF-8' );\n\n\t\tswitch ($name) {\n\t\t\tcase 'birth_date' :\n\t\t\t\tif (strcmp ( $value, '0000-00-00' ) == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->birth_date = $value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'salutation' :\n\t\t\t\t$salutations = array (\n\t\t\t\t\t\t'mr',\n\t\t\t\t\t\t'mme',\n\t\t\t\t\t\t'mlle'\n\t\t\t\t);\n\t\t\t\tif (! (in_array ( $value, $salutations ) || empty ( $value ))) {\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\treturn $this->salutation = $value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'postalCode' :\n\t\t\t\treturn is_numeric ( $value ) ? $this->postalCode = ( int ) $value : null;\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t// après gestion des cas particuliers, règle générale\n\t\t\t\treturn $this->{$name} = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "b6aa88a6f2839ffc2c5180780d2471d8", "score": "0.5312425", "text": "public function setColumnAttribute($columnName, $attribute, $value)\n {\n $this->_dataSource->columns[$columnName][$attribute] = $value;\n return $this;\n }", "title": "" }, { "docid": "46ba39df8b567e34b39e9c80c9a3a4cc", "score": "0.52934766", "text": "public function setAttribute(array $attribute): void\n {\n $this->attributes[key($attribute)] = $attribute[key($attribute)];\n }", "title": "" }, { "docid": "377b973d5bda695913e60d582a9c6d4e", "score": "0.5291703", "text": "public function set(array $data)\n {\n $fieldNames = array();\n $params = $this->params;\n foreach ($data as $column => $value) {\n $fieldNames[\"`{$column}`\"] = \":{$column}\";\n $params[\":{$column}\"] = $value;\n }\n $this->_fieldNames = $fieldNames;\n $this->_params = $params;\n return $this;\n }", "title": "" }, { "docid": "10907cf2527f3f5ce535cabf4f5de3a8", "score": "0.52895933", "text": "function setAttribute($key,$val=null) {\n\n $this->attributes[$key] = $val;\n return $this;\n\n }", "title": "" }, { "docid": "e44f6d0be6e5be462af47b99d06df62c", "score": "0.52881426", "text": "public function setColumns(array $columns): void\n {\n $this->columns = $columns;\n }", "title": "" }, { "docid": "1077868a68d178b4e698666d99efeef7", "score": "0.528343", "text": "function setNameToID(&$attributes)\n {\n if ($attributes)\n {\n if (empty($attributes['name']) && !empty($attributes['id']))\n {\n $attributes['name'] = $attributes['id'];\n }\n }\n }", "title": "" }, { "docid": "ead2d98ed47544e65aa7406b2334314d", "score": "0.5279704", "text": "public function setAttributes($attributes)\n\t{\n\t\t$this->attributes = array_merge($this->attributes, $attributes);\n\t}", "title": "" }, { "docid": "9094272d6346e4d9a2c287d2cab17991", "score": "0.5279096", "text": "function setAttribute($name, $value)\r\n {\r\n $this->arr_config[$name] = $value;\r\n }", "title": "" }, { "docid": "0ea6eb717723f93267bf3b7e74e2a2c6", "score": "0.52749616", "text": "function addColumnConfig($name, $conf) {$this->column_conf[$name]=$conf;}", "title": "" }, { "docid": "3e25a1ba99633b85709cef1aaedb4a0a", "score": "0.5273993", "text": "public function decorate()\n {\n \tif (!isset($this->_options['column'])) {\n \t$this->_options['column'] = array();\n }\telseif ( (isset($this->_options['column']) && ! is_array($this->_options['column']))) {\n $this->_options['column'] = array(\n \n $this->_options['column']\n );\n }\n }", "title": "" }, { "docid": "0addc113b4dac7f3eb2c0272d91c0677", "score": "0.5266312", "text": "public function mapAttributes($attributes = []);", "title": "" }, { "docid": "45d39274964dc6889a575445d6345624", "score": "0.52662146", "text": "function setAttribute($name, $value)\n {\n $this->attributes[$name] = $value;\n \n if ($name == \"id\")\n {\n $renderer = gcHTMLRenderer::Singleton();\n $renderer->registerTagById($this);\n }\n }", "title": "" }, { "docid": "f16d9babd5c7f28a8a8944a0d98204e8", "score": "0.52629656", "text": "public static function modifyColumn(){ }", "title": "" }, { "docid": "8db9adc0bf99ad9483599d7228bbfba7", "score": "0.52623534", "text": "public function setAttributes($modelTransaction)\r\n\t{\r\n\t\t//set attributes\r\n\t\t$attributesArray = $modelTransaction->attributes;\r\n\t\twhile (($value = current($attributesArray)) !== false) {\t\r\n\t\t\t$this->setAttribute(key($attributesArray), $value);\r\n\t\t\tnext($attributesArray);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "38efd8d3117f734b97db228c3de5a514", "score": "0.5256204", "text": "public function setAttribute($name, $value) {\n $this->attributes[$name] = $value;\n }", "title": "" } ]
9173037e88ce4fb5ba8ebc0df96e9d0f
Gets the settings, if they have never been saved, save them.
[ { "docid": "498dd3e7082d5735d67397bec4c3df96", "score": "0.0", "text": "protected function getSettings()\n\t{\n\t\t$this->getConfig();\n\t\t\n\t\tif (file_exists( $this->config['FilePath'] . '/' . $this->config['FileName'])) {\n\t\t\t$data = json_decode(file_get_contents( $this->config['FilePath'] . '/' . $this->config['FileName'] ) );\n return $data;\n }\n\n return false;\t\n\t}", "title": "" } ]
[ { "docid": "194a5e8cdd8178e123f001b6dd632214", "score": "0.76202506", "text": "private function save(){\n\t\treturn file_put_contents($this->_file_settings,serialize($this->_settings));\n\t}", "title": "" }, { "docid": "7c41a6b8ffc70f73f352bf15892f946f", "score": "0.7617539", "text": "public function storeSettings()\n {\n \t// TODO: store settings\n\n \treturn $this->settings();\n }", "title": "" }, { "docid": "7345364ee16ab49bb112875ca1ec94ae", "score": "0.75206524", "text": "public static function saveSettings() {\n\t\tif(self::$settings != null) {\n\t\t\t$settings = Doctrine::getTable('Setting')->findAll();\n\t\t\t\n\t\t\tforeach($settings as $setting) {\n\t\t\t\tif(!isset(self::$settings[$setting->the_key])) {\n\t\t\t\t\t$settings->delete();\n\t\t\t\t} else {\n\t\t\t\t\t$setting->the_value = self::$settings[$setting->the_key];\n\t\t\t\t\t$setting->save();\n\t\t\t\t}\n\t\t\t\tunset(self::$settings[$setting->the_key]);\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array(self::$settings) && count(self::$settings) > 0) {\n\t\t\t\tforeach(self::$settings as $key => $value) {\n\t\t\t\t\t$setting = new Setting();\n\t\t\t\t\t$setting->the_key = $key;\n\t\t\t\t\t$setting->the_value = $value;\n\t\t\t\t\t$setting->save();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tself::$settings = null;\n\t\t}\n\t}", "title": "" }, { "docid": "cad073b0fc67db75d865737a9a562312", "score": "0.7315557", "text": "function saveSettings()\n {\n static $settings = array(\n 'snapshot' => array('run', 'reporturl', 'frequency')\n );\n\n $values = array();\n\n foreach ($settings as $section => $parts) {\n foreach ($parts as $setting) {\n $values[$section][$setting] = $this->trimmed($setting);\n }\n }\n\n // This throws an exception on validation errors\n\n $this->validate($values);\n\n // assert(all values are valid);\n\n $config = new Config();\n\n $config->query('BEGIN');\n\n foreach ($settings as $section => $parts) {\n foreach ($parts as $setting) {\n Config::save($section, $setting, $values[$section][$setting]);\n }\n }\n\n $config->query('COMMIT');\n\n return;\n }", "title": "" }, { "docid": "4adcdf0a04012705d4bb090bef831d7f", "score": "0.71972084", "text": "function saveSettings()\n {\n static $settings = array(\n 'bitly' => array('default_login', 'default_apikey')\n );\n\n $values = array();\n\n foreach ($settings as $section => $parts) {\n foreach ($parts as $setting) {\n $values[$section][$setting]\n = $this->trimmed($setting);\n }\n }\n\n // This throws an exception on validation errors\n\n $this->validate($values);\n\n // assert(all values are valid);\n\n $config = new Config();\n\n $config->query('BEGIN');\n\n foreach ($settings as $section => $parts) {\n foreach ($parts as $setting) {\n Config::save($section, $setting, $values[$section][$setting]);\n }\n }\n\n $config->query('COMMIT');\n\n return;\n }", "title": "" }, { "docid": "ebdebdfda7ecdf2d0046969a7c60a1f3", "score": "0.71148604", "text": "public function save_settings(){\n\t\tglobal $wpdb;\n\t\t\n\t\t$table = ($this->static_slide) ? $wpdb->prefix . RevSliderFront::TABLE_STATIC_SLIDES : $wpdb->prefix . RevSliderFront::TABLE_SLIDES;\n\t\t$this->settings = apply_filters('revslider_slide_save_settings', $this->settings, $this->static_slide, $this);\n\t\t\n\t\t/**\n\t\t * the slide will be saved, so remove the temp attribute if it exists\n\t\t * in order to not have it deleted on the next reload\n\t\t **/\n\t\tif($this->get_val($this->settings, 'temp', false) === true){\n\t\t\tunset($this->settings['temp']);\n\t\t}\n\t\t\n\t\t$wpdb->update($table, array('settings' => json_encode($this->settings)), array('id' => $this->id));\n\t}", "title": "" }, { "docid": "efea79431bd02963f5b2c69b85f7574f", "score": "0.6922615", "text": "public function save_settings()\n {\n global $current_tab, $current_section;\n // We should only save on the settings page.\n if (!is_admin() || !isset($_GET['page']) || 'ox-settings' !== $_GET['page']) {\n return;\n }\n\n // Include settings pages.\n Admin_Settings::init_settings_tabs();\n\n // Get current tab/section.\n $current_tab = !empty($_GET['tab']) ? sanitize_title(wp_unslash($_GET['tab'])) : '';\n $current_section = !isset($_REQUEST['section']) || empty($_REQUEST['section']) ? '' : sanitize_title(wp_unslash($_REQUEST['section']));\n\n\n if (!empty($_POST['save'])) {\n Admin_Settings::save();\n }\n }", "title": "" }, { "docid": "3f23737ea076b12abe25c5e325d3f140", "score": "0.68862873", "text": "private function _saveSettings($settings)\n\t{\n\t\t$this->_saveSettingsToDatabase($settings);\n\t\t$this->_saveSettingsToSession($settings);\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "3b15ad6e1fbc7f59b055c5f3239256f6", "score": "0.6880538", "text": "private function _saveSettings($settings)\r\n\t{\r\n\t\t$this->_saveSettingsToDatabase($settings);\r\n\t\t$this->_saveSettingsToSession($settings);\r\n\t\treturn $settings;\r\n\t}", "title": "" }, { "docid": "a6e99c419dcfd82e6f1226438cf68a7b", "score": "0.6721769", "text": "public function saveSettingsFile()\n\t{\n\t\t$jsondata = json_encode($this->settings);\n\t\tfile_put_contents($this->settingsFilePath, $jsondata) or die(\"Error saving the settings file.\");\n\t}", "title": "" }, { "docid": "be5dc6c22efc8f73f226eab3b3cb016f", "score": "0.6717305", "text": "public function storeSettings()\n {\n \n }", "title": "" }, { "docid": "9df5d4ff8aabe8c162a77c2f41e22b49", "score": "0.6674189", "text": "public function save()\n {\n $this->settings->savePostSettings();\n }", "title": "" }, { "docid": "19da6a6c8ea9a5fb46150527ef5e0e40", "score": "0.6652585", "text": "public function backupSettings() {\n\t\t$data = array();\n\t\t$this->loadSettings($data);\n\t}", "title": "" }, { "docid": "f2eba87ee4201f6b8de3df38737c62d2", "score": "0.6646737", "text": "public function get_settings(){\n\t\t// check if settings exist if not call the tegister settings creting the default\n\t}", "title": "" }, { "docid": "77f9a99051c5088c3ae12c9a5c21a2dd", "score": "0.65324676", "text": "public function save() {\n\t\tupdate_option( self::OPTION_NAME, $this->settings );\n\t}", "title": "" }, { "docid": "eb72f8b9ce5bbef3a413c84aa54eb3f7", "score": "0.65216434", "text": "function save_settings()\n\t{\n\t\tif (empty($_POST))\n\t\t{\n\t\t\tshow_error(lang('unauthorized_access'));\n\t\t}\n\n\t\t$settings = array();\n\t\t\n\t\tif (isset($_POST['fields']))\n\t\t{\n\t\t\t$settings['fields'] = $_POST['fields'];\n\t\t}\n\t\tif (isset($_POST['settings']))\n\t\t{\n\t\t\t$settings['settings'] = $_POST['settings'];\n\t\t}\n\t\tif (isset($_POST['add']['channel']) && !empty($_POST['add']['channel']) && ! isset($settings['fields'][$_POST['add']['channel']]))\n\t\t{\n\t\t\t$settings['fields'][$_POST['add']['channel']] = array($_POST['add']['fields']);\n\t\t}\n\n\t\tee()->db->where('class', __CLASS__);\n\t\tee()->db->update('extensions', array('settings' => serialize($this->_array_filter_recursive($settings))));\n\n\t\tee()->session->set_flashdata(\n\t\t\t'message_success',\n\t\t\tlang('preferences_updated')\n\t\t);\n\t\t\n\t\tee()->functions->redirect($this->_settings_url);\n\t}", "title": "" }, { "docid": "2383d4efaebc2063c6542135e49f0af7", "score": "0.6476144", "text": "public function saveSettings()\n {\n update_option('LbwpNewsletter', $this->settings);\n }", "title": "" }, { "docid": "ae7cf3a945045f4caf64507fc6beca65", "score": "0.6458447", "text": "private function _saveSettingsToSession($settings){\n\t\t$this->cache[SITE_ID]['settings'] = $settings;\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "c125299059cb52404ea2602001a86463", "score": "0.6444517", "text": "private function _saveSettingsToSession($settings){\r\n\t\t$this->cache[SITE_ID]['settings'] = $settings;\r\n\t\treturn $settings;\r\n\t}", "title": "" }, { "docid": "9bd261d8a22773f87ca2556aab78a6bf", "score": "0.6435555", "text": "public function getSettings()\n {\n $data = $this->_plugin->getSettings();\n\n return Commerce_SettingsModel::populateModel($data);\n }", "title": "" }, { "docid": "3d6048299b093e9c8dd3002fb02aed3c", "score": "0.6435342", "text": "function get_settings()\n\t{\n\t\t// if settings are already in session cache, use those\n\t\tif (isset($this->helper->cache['settings'])) return;\n\n\t\t$this->EE->db\n\t\t\t\t\t->select('settings')\n\t\t\t\t\t->from('extensions')\n\t\t\t\t\t->where(array('enabled' => 'y', 'class' => __CLASS__ ))\n\t\t\t\t\t->limit(1);\n\t\t$query = $this->EE->db->get();\n\t\t\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\t$this->settings = $this->_normalize_settings(unserialize($query->row()->settings));\n\t\t}\n\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "b5129796dc463b7ad57c59f786bb093f", "score": "0.6420844", "text": "public function save_settings( $settings ) {\r\n\t\tif ( ! is_array( $settings ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/* @var WP_Hummingbird_Filesystem $wphb_fs */\r\n\t\tglobal $wphb_cache_config, $wphb_fs;\r\n\r\n\t\t$wphb_cache_config = new stdClass();\r\n\t\t$wphb_cache_config->cache_dir = $wphb_fs->cache_dir;\r\n\r\n\t\t$config_file = $wphb_fs->basedir . 'wphb-cache.php';\r\n\r\n\t\tself::log( 'Writing configuration to: ' . $config_file );\r\n\t\t$this->write_file( $config_file, json_encode( $settings ) );\r\n\r\n\t\t$this->clear_cache();\r\n\t}", "title": "" }, { "docid": "f9457749dd173a13dc9c2b2bfb0d739b", "score": "0.6410456", "text": "private function store()\n {\n $settings = [];\n foreach ($this->settings as $key => $value) {\n $settings[$key] = serialize($value);\n }\n file_put_contents($this->cacheFile, json_encode($settings));\n }", "title": "" }, { "docid": "6bfd6f6d9da0a043e1c232041d1cd805", "score": "0.64082295", "text": "public function saveSettings()\n {\n $data = array ();\n\n $save_name = trim($_POST['save_name']);\n\n if (!strlen($save_name)) {\n $data['error'] = 'Save name required to save export settings.';\n return $this->_return($data);\n }\n $force_save = (isset($_POST['force_save']) && $_POST['force_save']);\n $settings_exist = $this->_saveExists($save_name);\n if (!$force_save && $settings_exist) {\n //show confirm box\n $tpl = new geoTemplate(geoTemplate::ADDON, 'exporter');\n\n $tpl->assign('save_name', $save_name);\n\n $data['name_exists'] = $tpl->fetch('addon/exporter/admin/confirm_overwrite.tpl');\n return $this->_return($data);\n }\n\n //settings to save are pretty much the post values.\n $settings = $_POST;\n\n //but minus a few things we don't need to save.\n $dontSave = array ('auto_save', 'save_name', 'exportType',\n 'force_save', 'delete_settings', 'filename');\n foreach ($dontSave as $nosave) {\n unset($settings[$nosave]);\n }\n\n //for now filename and copy_to not implemented\n $filename = $copy_to = '';\n\n $filename = preg_replace('/[^a-zA-Z0-9_]*/', '', $_POST['filename']);\n\n $export_type = $_POST['exportType'];\n //make sure it's valid\n if (!in_array($export_type, array ('xml','csv'))) {\n $data['error'] = 'Invalid export type, must be XML or CSV.';\n return $this->_return($data);\n }\n\n //created time\n $created = geoUtil::time();\n\n //insert into DB\n $db = DataAccess::getInstance();\n\n if ($force_save && $settings_exist) {\n $sql = \"UPDATE \" . self::SETTINGS_TABLE . \" SET `filename`=?, `copy_to`=?,\n\t\t\t\t`export_type`=?, `settings`=?, `last_updated`=? WHERE `name`=?\";\n\n $query_data = array(\n geoString::toDB($filename),\n geoString::toDB($copy_to),\n $export_type,\n geoString::toDB(serialize($settings)),\n $created,\n geoString::toDB($save_name)\n );\n $db->Execute($sql, $query_data);\n $data['message'] = 'Export settings updated!';\n } elseif (!$settings_exist) {\n $sql = \"INSERT INTO \" . self::SETTINGS_TABLE . \" SET `name`=?, `filename`=?, `copy_to`=?,\n\t\t\t\t`export_type`=?, `settings`=?, `created`=?, `last_updated`=?\";\n $query_data = array(\n geoString::toDB($save_name),\n geoString::toDB($filename),\n geoString::toDB($copy_to),\n $export_type,\n geoString::toDB(serialize($settings)),\n $created,\n $created\n );\n $db->Execute($sql, $query_data);\n $data['message'] = 'Export settings saved!';\n }\n $data['load_table'] = $this->_getLoadTable();\n\n\n return $this->_return($data);\n }", "title": "" }, { "docid": "86ebed7c3dddc879d3ceed03d784fe9b", "score": "0.639838", "text": "private function _saveSettingsToDatabase($settings)\n\t{\n\t\t$EE =& get_instance();\n\t\t$data = array(\n\t\t\t'settings'\t=> $EE->javascript->generate_json($settings, true),\n\t\t\t'addon_id'\t=> $this->addon_id,\n\t\t\t'site_id'\t=> SITE_ID\n\t\t);\n\t\t$settings_query = $EE->db->get_where(\n\t\t\t\t\t\t\t'nsm_addon_settings',\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'addon_id' => $this->addon_id,\n\t\t\t\t\t\t\t\t'site_id' => SITE_ID\n\t\t\t\t\t\t\t), 1);\n\n\t\tif ($settings_query->num_rows() == 0)\n\t\t{\n\t\t\t$query = $EE->db->insert('exp_nsm_addon_settings', $data);\n\t\t\tlog_message('info', __METHOD__ . ' Inserting settings: $query => ' . $query);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = $EE->db->update(\n\t\t\t\t\t\t\t'exp_nsm_addon_settings',\n\t\t\t\t\t\t\t$data,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'addon_id' => $this->addon_id,\n\t\t\t\t\t\t\t\t'site_id' => SITE_ID\n\t\t\t\t\t\t\t));\n\t\t\tlog_message('info', __METHOD__ . ' Updating settings: $query => ' . $query);\n\t\t}\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "13e15dc5297794d1302d0805e13f8ab5", "score": "0.63952917", "text": "private function _getSettings($refresh = FALSE)\n\t{\n\t\t$EE =& get_instance();\n\t\t$settings = FALSE;\n\n\t\tif(\n\t\t\t// If the addon is installed\n\t\t\t! isset($EE->extensions->version_numbers[__CLASS__])\n\t\t\t// and we're running the current version\n\t\t\t|| $EE->extensions->version_numbers[__CLASS__] != $this->version\n\t\t)\n\t\treturn $settings;\n\n\t\tif (\n\t\t\t// if there are settings in the settings cache\n\t\t\tisset($this->cache[SITE_ID]['settings']) === TRUE \n\t\t\t// and we are not forcing a refresh\n\t\t\tAND $refresh != TRUE\n\t\t)\n\t\t{\n\t\t\t// get the settings from the session cache\n\t\t\t$settings = $this->cache[SITE_ID]['settings'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$settings_query = $EE->db->get_where(\n\t\t\t\t\t\t\t\t\tself::$settings_table,\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'addon_id' => $this->addon_id,\n\t\t\t\t\t\t\t\t\t\t'site_id' => SITE_ID\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t);\n\t\t\t// there are settings in the DB\n\t\t\tif ($settings_query->num_rows())\n\t\t\t{\n\t\t\t\tif ( ! function_exists('json_decode'))\n\t\t\t\t\t$EE->load->library('Services_json');\n\n\t\t\t\t$settings = json_decode($settings_query->row()->settings, TRUE);\n\t\t\t\t$this->_saveSettingsToSession($settings);\n\t\t\t}\n\t\t\t// no settings for the site\n\t\t\telse\n\t\t\t{\n\t\t\t\t$settings = $this->_buildDefaultSiteSettings(SITE_ID);\n\t\t\t\t$this->_saveSettings($settings);\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// Merge config settings\n\t\tforeach ($settings as $key => $value)\n\t\t{\n\t\t\tif($EE->config->item($this->addon_id . \"_\" . $key))\n\t\t\t\t$settings[$key] = $EE->config->item($this->addon_id . \"_\" . $key);\n\t\t}\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "56794a0583517ed699385b45173f8560", "score": "0.6385897", "text": "private function _saveSettingsToDatabase($settings)\r\n\t{\r\n\t\t$EE =& get_instance();\r\n\t\t$data = array(\r\n\t\t\t'settings'\t=> $EE->javascript->generate_json($settings, true),\r\n\t\t\t'addon_id'\t=> $this->addon_id,\r\n\t\t\t'site_id'\t=> SITE_ID\r\n\t\t);\r\n\t\t$settings_query = $EE->db->get_where(\r\n\t\t\t\t\t\t\t'nsm_addon_settings',\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'addon_id' => $this->addon_id,\r\n\t\t\t\t\t\t\t\t'site_id' => SITE_ID\r\n\t\t\t\t\t\t\t), 1);\r\n\r\n\t\tif ($settings_query->num_rows() == 0) {\r\n\t\t\t$query = $EE->db->insert('exp_nsm_addon_settings', $data);\r\n\t\t\tlog_message('info', __METHOD__ . ' Inserting settings: $query => ' . $query);\r\n\t\t} else {\r\n\t\t\t$query = $EE->db->update(\r\n\t\t\t\t\t\t\t'exp_nsm_addon_settings',\r\n\t\t\t\t\t\t\t$data,\r\n\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t'addon_id' => $this->addon_id,\r\n\t\t\t\t\t\t\t\t'site_id' => SITE_ID\r\n\t\t\t\t\t\t\t));\r\n\t\t\tlog_message('info', __METHOD__ . ' Updating settings: $query => ' . $query);\r\n\t\t}\r\n\t\treturn $settings;\r\n\t}", "title": "" }, { "docid": "08ba8fcc608f3af1f7e430ba09af14ce", "score": "0.6382866", "text": "public function getSettings()\n {\n return $this->settingRepo->getSettings();\n }", "title": "" }, { "docid": "0d39f9ada523ce3ba4fc183d00d22455", "score": "0.6371811", "text": "public function savesettings()\n {\n if ($this->input->is_ajax_request()) {\n \n // Get post data and decode it\n $post = json_decode($this->input->raw_input_stream);\n \n // Validate settings\n $valid = $this->_validateSettings($post);\n \n // If valid, save to DB\n if ($valid) {\n $message = 'good';\n } else {\n $message = 'bad';\n }\n \n // Return message as JSON\n $this->output\n ->set_content_type('application/json')\n ->set_output(json_encode($message));\n } else {\n exit('No direct script access allowed');\n }\n }", "title": "" }, { "docid": "df7614fd954c00b53b6d90ecaedbb8f9", "score": "0.6367375", "text": "public function admin_settings_save_settings() {\r\n\t\tcheck_ajax_referer( 'wphb-fetch', 'nonce' );\r\n\r\n\t\tif ( ! current_user_can( Utils::get_admin_capability() ) || ! isset( $_POST['form_data'] ) ) { // Input var okay.\r\n\t\t\tdie();\r\n\t\t}\r\n\t\tparse_str( sanitize_text_field( wp_unslash( $_POST['form_data'] ) ), $data ); // Input var ok.\r\n\r\n\t\t$settings = Settings::get_settings( 'settings' );\r\n\r\n\t\tforeach ( $data as $setting => $value ) {\r\n\t\t\tif ( ! isset( $settings[ $setting ] ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t$settings[ $setting ] = (bool) $value;\r\n\t\t}\r\n\r\n\t\tSettings::update_settings( $settings, 'settings' );\r\n\r\n\t\twp_send_json_success();\r\n\t}", "title": "" }, { "docid": "a09abd91d6a03688116ca21b243449d0", "score": "0.636191", "text": "public function save()\n\t{\n\t\treturn Yii::app()->config->save('setup');\n\t}", "title": "" }, { "docid": "ca8549fd588019648a0010f21d0e5a0c", "score": "0.6357641", "text": "public function save() {\n\t\tupdate_site_option($this->optionName, $this->settings);\n\t}", "title": "" }, { "docid": "cab2f8657948d9f763b4f0f79797d89f", "score": "0.6344681", "text": "public function wpocore_get_settings() {\n\n\t\t$settings = get_option( 'wpocore_settings' );\n\t\tif( empty( $settings ) ) {\n\t\t\t// Update old settings with new single option\n\t\t\t$general_settings = is_array( get_option( 'wpocore_settings_general' ) ) ? get_option( 'wpocore_settings_general' ) : array();\n\n\t\t\t// add default licenses to the settings\n\t\t\t$defaults = array (\n\t\t\t\t\t'wpo_core_license'\t=> 'b945b2e6a0ef88d5cb4b57e38ae97add',\n\t\t\t\t);\n\n\t\t\t$settings = array_merge( $general_settings, $defaults );\n\t\t\tupdate_option( 'wpocore_settings', $settings );\n\t\t}\n\t\treturn apply_filters( 'wpocore_get_settings', $settings );\n\t}", "title": "" }, { "docid": "617525429d636345f7494c0895a09efd", "score": "0.6324749", "text": "function okra_settings_save() {\n\n\tcheck_admin_referer(\"okra_settings_save\");\n\tglobal $wpdb;\n\t$array = array(\n\t\t\"clientName\" => sanitize_text_field($_POST[\"name\"]),\n\t\t\"env\" => sanitize_text_field($_POST[\"env\"]),\n\t\t\"key\" => sanitize_text_field($_POST[\"key\"]),\n\t\t\"token\" => sanitize_text_field($_POST[\"token\"]),\n\t\t\"callback_url\" => sanitize_text_field($_POST[\"callback_url\"]),\n\t\t\"corporate\" => sanitize_text_field($_POST[\"corporate\"]) == \"corporate\" ? \"corporate\" : \"individual\"\n\t);\n\n\t$count = sizeof($wpdb->get_results(\"SELECT * FROM `\" . $wpdb->prefix . \"okra_settings`\"));\n\n\tif ($count > 0) {\n\t\t$wpdb->update($wpdb->prefix . \"okra_settings\", $array, array(\"id\" => 1));\n\t} else {\n\t\t$wpdb->insert($wpdb->prefix . \"okra_settings\", $array);\n\t}\n\twp_redirect(admin_url() . \"admin.php?page=okra_settings&&settings_add=true\");\n}", "title": "" }, { "docid": "5c49172e9f90267c5e0721bf2c35a7a1", "score": "0.63107044", "text": "public function get_settings() {\r\n\t\t/* @var WP_Hummingbird_Filesystem $wphb_fs */\r\n\t\tglobal $wphb_fs;\r\n\r\n\t\t$config_file = $wphb_fs->basedir . 'wphb-cache.php';\r\n\r\n\t\tif ( file_exists( $config_file ) ) {\r\n\t\t\t$settings = json_decode( file_get_contents( $config_file ), true );\r\n\t\t} else {\r\n\t\t\tself::log( 'Config file not found at: ' . $config_file );\r\n\t\t\t$settings = self::get_default_settings();\r\n\r\n\t\t\t$this->write_file( $config_file, json_encode( $settings ) );\r\n\t\t}\r\n\r\n\t\treturn $settings;\r\n\t}", "title": "" }, { "docid": "142c72f168e764b3cf50e05e5c6c1fda", "score": "0.63005984", "text": "function _get_settings($pre_save = FALSE)\n\t{\n\t\t// Return data if already cached\n\t\tif($this->EE->session->cache('zenbu', 'settings') && $pre_save === FALSE)\n\t\t{\n\t\t\treturn $this->EE->session->cache('zenbu', 'settings');\n\t\t}\n\n\t\t$output = array();\n\t\t\n\t\t$results = $this->EE->db->query(\"/* Zenbu _get_settings */ \\n SELECT zms.show_fields, zms.show_custom_fields, zms.field_order, zms.extra_options, zms.general_settings, z.can_access_settings, z.can_admin, z.can_copy_profile, z.edit_replace, z.can_view_group_searches, z.can_admin_group_searches \n\t\tFROM exp_zenbu_member_settings zms\n\t\tJOIN exp_zenbu z ON z.member_group_id = \" . $this->member_group_id . \"\n\t\tWHERE zms.member_id = \" . $this->member_id . \"\n\t\tAND zms.site_id = \" . $this->site_id . \"\n\t\tAND z.site_id = \" . $this->site_id);\n\n\t\tif($results->num_rows() == 0)\n\t\t{\n\t\t\t$results = $this->EE->db->query(\"/* Zenbu _get_settings - Fallback on member group settings */ \\n SELECT *\n\t\t\tFROM exp_zenbu\n\t\t\tWHERE member_group_id = \" . $this->member_group_id . \"\n\t\t\tAND site_id = \" . $this->site_id);\n\t\t}\n\t\t\t\t\n\t\tif($results->num_rows() > 0)\n\t\t{\n\t\t\tforeach($results->result_array() as $row)\n\t\t\t{\n\t\t\t\t// Fetch results for the settings view\n\t\t\t\t$show_fields_array\t\t\t= unserialize($row['show_fields']);\n\t\t\t\t$show_custom_fields_array\t= unserialize($row['show_custom_fields']);\n\t\t\t\t$field_order_array\t\t\t= unserialize($row['field_order']);\n\t\t\t\t$extra_options_array\t\t= unserialize($row['extra_options']);\n\t\t\t\t\n\t\t\t\t// Use $show_fields_array array to go through channel ids and merge data\n\t\t\t\tif($show_fields_array && $pre_save === FALSE)\n\t\t\t\t{\n\t\t\t\t\tforeach($show_fields_array as $channel_id => $array)\n\t\t\t\t\t{\n\t\t\t\t\t\t$output['setting'][$channel_id] = array_merge($array, $show_custom_fields_array[$channel_id], $field_order_array[$channel_id], $extra_options_array[$channel_id]);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Set up settings in pre-save format. Used for merging with save data.\n\t\t\t\tif($show_fields_array && $pre_save !== FALSE)\n\t\t\t\t{\n\t\t\t\t\tforeach($show_fields_array as $channel_id => $array)\n\t\t\t\t\t{\n\t\t\t\t\t\t$output['setting']['show_fields'][$channel_id]\t\t\t= $array;\n\t\t\t\t\t\t$output['setting']['show_custom_fields'][$channel_id]\t= $show_custom_fields_array[$channel_id];\n\t\t\t\t\t\t$output['setting']['field_order'][$channel_id]\t\t\t= $field_order_array[$channel_id];\n\t\t\t\t\t\t$output['setting']['extra_options'][$channel_id]\t\t= $extra_options_array[$channel_id];\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$output['setting']['general']\t\t\t\t\t= (isset($row['general_settings'])) ? unserialize($row['general_settings']) : array();\n\t\t\t\t\n\t\t\t\tforeach($this->permissions as $permission)\n\t\t\t\t{\n\t\t\t\t\t$output['setting'][$permission]\t= $row[$permission];\t\n\t\t\t\t}\n\n\t\t\t}\n\t\t} else {\n\t\t\t// If the row hasn't been created yet, create it from the default settings (member_group_id = 0).\n\t\t\t// Do not grant admin privileges until Super admin or other allowed group does\n\t\t\t$output['setting'] = $this->EE->zenbu_db->_insert_default_settings($this->member_group_id, '');\n\t\t\t\n\t\t}\n\t\t\n\t\t$results->free_result();\n\t\t\n\t\tif($pre_save === FALSE)\n\t\t{\n\t\t\t$this->EE->session->set_cache('zenbu', 'settings', $output);\n\t\t}\n\n\t\treturn $output;\n\t\t\n\t}", "title": "" }, { "docid": "54926f5fbd798523974452710ec0a5d9", "score": "0.6294424", "text": "private function getSettings()\n {\n $settings = $this->repository->get('purify.settings');\n\n if (count($settings) > 0) {\n // If the serializer path exists, we need to validate that\n // the folder actually exists, and create it if not\n if (array_key_exists('Cache.SerializerPath', $settings)) {\n $this->validateCachePath($settings['Cache.SerializerPath']);\n }\n\n return $settings;\n }\n\n return HTMLPurifier_ConfigSchema::instance()->defaults;\n }", "title": "" }, { "docid": "865995372a9a7f43f58796e74f2bf5cb", "score": "0.62920576", "text": "private function _getSettings($refresh = FALSE)\r\n\t{\r\n\t\t$EE =& get_instance();\r\n\t\t$settings = FALSE;\r\n\r\n\t\tif(\r\n\t\t\t// If the addon is installed\r\n\t\t\t! isset($EE->extensions->version_numbers[__CLASS__])\r\n\t\t\t// and we're not running the current version\r\n\t\t\t|| $EE->extensions->version_numbers[__CLASS__] != $this->version\r\n\t\t) {\r\n\t\t\treturn $settings;\r\n\t\t}\r\n\r\n\t\tif (\r\n\t\t\t// if there are settings in the settings cache\r\n\t\t\tisset($this->cache[SITE_ID]['settings']) === TRUE \r\n\t\t\t// and we are not forcing a refresh\r\n\t\t\tAND $refresh != TRUE\r\n\t\t) {\r\n\t\t\t// get the settings from the session cache\r\n\t\t\t$settings = $this->cache[SITE_ID]['settings'];\r\n\t\t} else {\r\n\t\t\t$settings_query = $EE->db->get_where(\r\n\t\t\t\t\t\t\t\t\tself::$settings_table,\r\n\t\t\t\t\t\t\t\t\tarray(\r\n\t\t\t\t\t\t\t\t\t\t'addon_id' => $this->addon_id,\r\n\t\t\t\t\t\t\t\t\t\t'site_id' => SITE_ID\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t// there are settings in the DB\r\n\t\t\tif ($settings_query->num_rows()) {\r\n\t\t\t\tif ( ! function_exists('json_decode'))\r\n\t\t\t\t\t$EE->load->library('Services_json');\r\n\r\n\t\t\t\t$settings = json_decode($settings_query->row()->settings, TRUE);\r\n\t\t\t\t$this->_saveSettingsToSession($settings);\r\n\t\t\t} else {\r\n\t\t\t\t// no settings for the site\r\n\t\t\t\t$settings = $this->_buildDefaultSiteSettings(SITE_ID);\r\n\t\t\t\t$this->_saveSettings($settings);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Merge config settings\r\n\t\tforeach ($settings as $key => $value) {\r\n\t\t\tif ($EE->config->item($this->addon_id . \"_\" . $key)) {\r\n\t\t\t\t$settings[$key] = $EE->config->item($this->addon_id . \"_\" . $key);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// is the settings path defined? if not make it an array\r\n\t\tif (empty($settings['path'])) {\r\n\t\t\t$settings['path'] = array();\r\n\t\t}\r\n\t\t\r\n\t\t// Check to see if the path is an array.\r\n\t\tif (is_array($settings['path']) == false) {\r\n\t\t\t$EE->lang->loadfile($this->addon_id);\r\n\t\t\t$EE->output->show_user_error(\r\n\t\t\t\t'general',\r\n\t\t\t\tlang('settings_error'),\r\n\t\t\t\t'Settings error'\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\treturn $settings;\r\n\t}", "title": "" }, { "docid": "7b3eef7fa36bd1a970341ce8eb26ea24", "score": "0.6270967", "text": "protected function saveMainSettings()\n {\n $message = 'success';\n\n // Save configuration of unpublished posts\n update_option('newsletterUnpublishedPosts', intval($_POST['newsletterUnpublishedPosts']));\n\n // Use internal mechanic to save\n //$this->set('xxxx', $settingXXXX);\n //$this->set('yyyy', $settingYYYY);\n $this->saveSettings();\n\n // Redirect with a message\n header('Location: ' . get_admin_url() . 'admin.php?page=' . $_GET['page'] . '&msg=' . $message);\n exit;\n }", "title": "" }, { "docid": "8ce951a0d8f68f9a028a2d4d8617f7e3", "score": "0.6267098", "text": "public function settingsSave()\n {\n $config = app('itemconfig');\n $save = $config->save($this->request, app('admin_field_factory')->getEditFields());\n\n if (is_string($save)) {\n return response()->json(array(\n 'success' => false,\n 'errors' => $save,\n ));\n } else {\n //override the config options so that we can get the latest\n app('admin_config_factory')->updateConfigOptions();\n\n return response()->json(array(\n 'success' => true,\n 'data' => $config->getDataModel(),\n 'actions' => app('admin_action_factory')->getActionsOptions(),\n ));\n }\n }", "title": "" }, { "docid": "6af89a1d070700227c815aad36423275", "score": "0.62619454", "text": "public function getSettings() {\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "de23b5d5ada78ab38c512f81fbf34501", "score": "0.62596726", "text": "public function fetch(){\n if( $data = get_option('loco_settings') ){\n $copy = new Loco_data_Settings;\n $copy->setUnserialized($data);\n // preserve any defaults not in previously saved data\n // this will occur if we've added options since setting were saved\n $data = $copy->getArrayCopy() + $this->getArrayCopy();\n // could ensure redundant keys are removed, but no need currently\n // $data = array_intersect_key( $data, self::$defaults );\n $this->exchangeArray( $data );\n $this->clean();\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f04f883896babf46603534f253ee0108", "score": "0.62535715", "text": "public function get_settings()\n\t{\n\t\tif ( ! isset($this->EE->session->cache[__CLASS__]['settings']))\n\t\t{\n\t\t\t$settings = $this->EE->meetup_settings->get_settings();\n\t\t\tforeach($settings AS $key => $value)\n\t\t\t{\n\t\t\t\tif(in_array($key, $this->EE->meetup_settings->_encrypted))\n\t\t\t\t{\n\t\t\t\t\t$settings[$key] = $this->EE->encrypt->decode($settings[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->EE->session->cache[__CLASS__]['settings'] = $settings;\n\t\t}\n\t\n\t\treturn $this->EE->session->cache[__CLASS__]['settings'];\n\t}", "title": "" }, { "docid": "211f245b1239ebf6fe01eadcabe314b7", "score": "0.62456864", "text": "private function saveSettings()\r\n {\r\n /** @var HomePageConfig $homePageConfig */\r\n $homePageConfig = Factory::getSingleton(HomePageConfig::class);\r\n $settings = $homePageConfig->getConfig();\r\n $settings['description'] = trim($this->request->getParam('description'));\r\n\r\n $sliders = $this->request->getParam('sliders');\r\n $filesData = $this->getFormattedFilesData();\r\n foreach ($sliders as $i => $sliderData) {\r\n $settings['sliders'][$i]['txt'] = trim($sliderData['txt']);\r\n $settings['sliders'][$i]['show'] = $sliderData['show'];\r\n if ($filesData[$i]['size'] > 0 && $filesData[$i]['error'] === 0) {\r\n $sliderImgMediaFolder = '/media/img/home-slider';\r\n $destFolder = ROOT_DIR . $sliderImgMediaFolder;\r\n $fileName = $i . '.png';\r\n $fullPath = $destFolder . DIRECTORY_SEPARATOR . $fileName;\r\n try {\r\n unlink($fullPath);\r\n } catch (\\Exception $exception) {\r\n //todo log exception\r\n }\r\n move_uploaded_file($filesData[$i]['tmp_name'], $fullPath);\r\n $settings['sliders'][$i]['img'] = $sliderImgMediaFolder . '/' . $fileName;\r\n }\r\n }\r\n\r\n $homePageConfig->saveSettings($settings);\r\n }", "title": "" }, { "docid": "84176d9eb3d1bbc8875651b335543096", "score": "0.623872", "text": "public function getSettings()\n {\n return isset($this->Settings) ? $this->Settings : null;\n }", "title": "" }, { "docid": "2c8c50a779357621271ec65de209c7cb", "score": "0.6235507", "text": "public function getSettings()\n {\n return $this->settings;\n }", "title": "" }, { "docid": "2c8c50a779357621271ec65de209c7cb", "score": "0.6235507", "text": "public function getSettings()\n {\n return $this->settings;\n }", "title": "" }, { "docid": "f054d4466e9d3a25a57ae43041b60566", "score": "0.6227455", "text": "function saveSetup() {\n\tglobal $Auth, $gSession;\n\tglobal $_POST;\n\n\t## okay we should prepare the data to be stored\n\t## in the config file\n\t\n\t## get the configmanager\n\t$configmanager = new Configmanager();\n\t$configmanager->setConfigPath(MATRIX_BASEDIR.\"settings/modules/settings/\");\n\t$configmanager->setConfigFile(\"prefs\");\n\t$configmanager->setConfigName(\"settings\");\n\t\n\t## now we can add the vars to the configuration\n\t$configmanager->addConfigVar('SMTPHOST',$_POST['SMTPHOST']);\n\t$configmanager->addConfigVar('SMTPUSER',$_POST['SMTPUSER']);\n\t$configmanager->addConfigVar('SMTPPASS',$_POST['SMTPPASS']);\n\n\t$configmanager->addConfigVar('SENDERSEMAIL',$_POST['SENDERSEMAIL']);\n\t$configmanager->addConfigVar('SENDERSNAME',$_POST['SENDERSNAME']);\n\t\n\t## finally flush the config file\n\t$configmanager->writeConfigFile();\n}", "title": "" }, { "docid": "a709467e0adb2971cdfc3d5a8ebc43d9", "score": "0.62167495", "text": "function save_var_settings($settings)\n {\n return $this->save_settings($settings);\n }", "title": "" }, { "docid": "3f0e587f0df8bdea8ba206503a131e0e", "score": "0.6209877", "text": "public function save() {\n\t\tupdate_option( $this->option_name, $this->settings );\n\t}", "title": "" }, { "docid": "013a08622840122014789c8be1a8020b", "score": "0.62074494", "text": "public function get_settings() {\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "fa7ebbbd7ae1e61375cb609948e47a20", "score": "0.62017757", "text": "public function save_settings() {\n\t\t$pkg = Package::getByHandle($this->pkgHandle);\n\t\t$pkg->setConfigSettings($_REQUEST);\n\t\t$this->redirect('/dashboard/attribute_display/categories', 'settings_updated');\n\t}", "title": "" }, { "docid": "df760981167f12c28476b166c3d6b64e", "score": "0.61945236", "text": "function load() {\n\t\t\n\t\tif (($settings = Cache::read('settings', 'day'))===FALSE) {\n\t\t\t$settings=$this->find('list', array('fields'=>array('Setting.name', 'Setting.value')));\n\t\t\tCache::write('settings', $settings, 'day');\n\t\t}\n\t\t\n\t\treturn $settings;\n\t\t\t\n\t}", "title": "" }, { "docid": "d50db738ec0204d377c824191589aafb", "score": "0.61852187", "text": "public function getSettings() {\n return $this->settings;\n }", "title": "" }, { "docid": "41c1ef24ea3882a42d549371e84fab2e", "score": "0.618037", "text": "public function saveSieveSettings()\n {\n $this->reset_error();\n return(TRUE);\n }", "title": "" }, { "docid": "13b838eb04bdb21cf6a6d1b7d783a28e", "score": "0.6166628", "text": "function saveConfig()\n{\n global $SETTINGS;\n $d = getUserDir(TRUE);\n if ($d !== FALSE) {\n $a = Array();\n foreach ($SETTINGS as $s) {\n $a[$s->name] = $s->value;\n }\n saveConfigFile($a, $d . '/config');\n }\n \n}", "title": "" }, { "docid": "609c75fdcf6f577190bd585c684c9a8c", "score": "0.61479527", "text": "public function getSettings() {\n\t\treturn (!empty($this->CustomSettings)) ? unserialize($this->CustomSettings) : [];\n\t}", "title": "" }, { "docid": "5b472ea295f5cf90cbe02ece8067d694", "score": "0.6145613", "text": "function settings() {\n\t\t// Settings Details\n\t\t$settings = Setting::latest()->first();\n\t\tif (!empty($settings)) {\n\t\t\treturn $settings;\n\t\t}\n\t}", "title": "" }, { "docid": "971c6506678bb15f779b87a5e18567ab", "score": "0.61378187", "text": "public function save()\n\t{\n\t\tif (!$this->hasCache)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$serialized = $this->registry->toString('INI');\n\n\t\t\tJFile::write($this->cachePath, $serialized);\n\t\t}\n\t}", "title": "" }, { "docid": "c9b2765ecb398e7c6cd29b6826b4955b", "score": "0.61320066", "text": "protected function storeGlobalSettings()\n {\n foreach ($this->strategies as $setting => &$strategy) {\n\n if ( ! is_string($strategy) || $strategy !== static::SETTING) {\n continue;\n }\n\n $this->settings[ $setting ] = $this->parameterValue($setting);\n }\n }", "title": "" }, { "docid": "3e25bef853ac779e6d00ff024bf33f54", "score": "0.61042196", "text": "protected function getSettings()\n {\n if (is_null($this->settings)) {\n $this->settings = app('setting')->getAll($this->userId, $this->sessionId);\n }\n\n return $this->settings;\n }", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.6068859", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.6068859", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.6068859", "text": "public function getSettings();", "title": "" }, { "docid": "ca6c4491c55582c695cda6bb7f87f1d7", "score": "0.6068859", "text": "public function getSettings();", "title": "" }, { "docid": "f4480ed6ee9fae297a0f50ee2d19bfac", "score": "0.6067978", "text": "public function get_settings()\n\t{\n\t\treturn($this->db->get_settings());\n\t}", "title": "" }, { "docid": "8d38504bbc0d14cd82ef54d7690cc933", "score": "0.6066737", "text": "public function persist(){\n $this->version = loco_plugin_version();\n $this->clean();\n return update_option('loco_settings', $this->getSerializable() );\n }", "title": "" }, { "docid": "ec945337f88c1e1d1870a416e9550f89", "score": "0.6064646", "text": "public static function get_saved_settings( $key = '' ) {\n\n\t\t// First get our overall options.\n\t\t$saved = get_option( MINSHARE_META_OPTIONKEY, array() );\n\n\t\t// Bail if no saved data, or no data for the requested key.\n\t\tif ( empty( $saved ) || ! empty( $key ) && empty( $saved[ $key ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Return one or the other.\n\t\treturn ! empty( $key ) ? $saved[ $key ] : $saved;\n\t}", "title": "" }, { "docid": "83eb3179709c1b518eb5d26d60d308a7", "score": "0.6059444", "text": "public function load_site_settings() {\n\n\t\t// Getting from database (legacy)\n\t\t$this->wpextend_global_settings = get_option( $this->name_option_in_database );\n\t\tif( ! is_array($this->wpextend_global_settings) ) $this->wpextend_global_settings = [];\n\t\t\n\t\t// Getting from JSON file\n\t\tif( file_exists(WPEXTEND_JSON_DIR . self::$json_file_name) ) {\n\t\t\t$site_settings_json_file_content = json_decode(file_get_contents(WPEXTEND_JSON_DIR . self::$json_file_name), true);\n\n\t\t\tif( is_array( $site_settings_json_file_content ) )\n\t\t\t\t$this->wpextend_global_settings = array_merge($this->wpextend_global_settings, $site_settings_json_file_content);\n\t\t}\n\t\telse\n\t\t\tMain::add_notice_json_file_missing();\n\n\t\tif( ! is_array( $this->wpextend_global_settings ) )\n\t\t\t$this->wpextend_global_settings = array();\n\t}", "title": "" }, { "docid": "726c1f84fd9eaa282101d30f36f83981", "score": "0.60590065", "text": "public function get_settings()\n\t{\n\t\t// If the array is not empty we already have them. \n\t\tif ( ! empty ($this->settings))\n\t\t{\n\t\t\treturn $this->settings;\n\t\t}\n\t\t\n\t\t$this->_ci->db->select('option_name,option_value')\n\t\t\t\t\t->from('settings')\n\t\t\t\t\t->where('auto_load', 'yes');\n\t\t\t\t\t\n\t\t$query = $this->_ci->db->get();\n\t\t\n\t\tif ($query->num_rows() == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tforeach ($query->result() as $k=>$row)\n\t\t{\n\t\t\t$this->settings[$row->option_name] = $row->option_value;\n\t\t}\n\t\t\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "a43a57ef8006830d8c56d981245b20a0", "score": "0.60474944", "text": "public function save()\n {\n $this->settingsUtils->updateSettingByName(Setting::NETWORK_LAN_IP, $this->lanIpAddress);\n $this->settingsUtils->updateSettingByName(Setting::NETWORK_LAN_MASK, $this->lanNetworkMask);\n $this->settingsUtils->updateSettingByName(Setting::NETWORK_LAN_INTERFACE, $this->lanNetworkInterface);\n $this->settingsUtils->updateSettingByName(Setting::NETWORK_WAN_INTERFACE, $this->wanNetworkInterface);\n $this->settingsUtils->updateSettingByName(Setting::NETWORK_DNS_SERVERS, $this->dnsServers);\n $this->settingsUtils->updateSettingByName(Setting::NETWORK_BOGUS_NX, $this->bogusNxDomains);\n }", "title": "" }, { "docid": "84dad9c6fd616210aac6a30c18f66879", "score": "0.60248953", "text": "function spWeatherGetSettings(){\n\treturn unserialize(get_option('spWeather'));\n}", "title": "" }, { "docid": "9ed86dfeb95f92a37a0f7fb079073a7f", "score": "0.6004205", "text": "public static function save()\n\t{\n\t\tConfigManager::save('lastcoms', self::load(), 'config');\n\t}", "title": "" }, { "docid": "7f4c49304e6945abb9dba8fc061c8193", "score": "0.59994406", "text": "public function system_save_preference()\n {\n System_helper::save_preference();\n }", "title": "" }, { "docid": "4d81defb4d4b899191990812cba118b1", "score": "0.599685", "text": "public function save_options() {\n\t\tcheck_admin_referer( 'simply-static_settings' );\n\n\t\t// Set destination url type / scheme / host\n\t\t$destination_url_type = $this->fetch_post_value( 'destination_url_type' );\n\n\t\tif ( $destination_url_type == 'offline' ) {\n\t\t\t$destination_scheme = '';\n\t\t\t$destination_host = '.';\n\t\t} else if ( $destination_url_type == 'relative' ) {\n\t\t\t$destination_scheme = '';\n\t\t\t$destination_host = '';\n\t\t} else {\n\t\t\t$destination_scheme = $this->fetch_post_value( 'destination_scheme' );\n\t\t\t$destination_host = untrailingslashit( $this->fetch_post_value( 'destination_host' ) );\n\t\t}\n\n\t\t// Set URLs to exclude\n\t\t$urls_to_exclude = array();\n\t\t$excludables = $this->fetch_post_array_value( 'excludable' );\n\n\t\tforeach ( $excludables as $excludable ) {\n\t\t\t$url = trim( $excludable['url'] );\n\t\t\t// excluding the template row (always has a blank url) and any rows\n\t\t\t// that the user didn't fill in\n\t\t\tif ( $url !== '' ) {\n\t\t\t\tarray_push( $urls_to_exclude, array(\n\t\t\t\t\t'url' => $url,\n\t\t\t\t\t'do_not_save' => $excludable['do_not_save'],\n\t\t\t\t\t'do_not_follow' => $excludable['do_not_follow'],\n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\n\t\t// Set relative path\n\t\t$relative_path = $this->fetch_post_value( 'relative_path' );\n\t\t$relative_path = untrailingslashit( Util::add_leading_slash( $relative_path ) );\n\n\t\t// Set basic auth\n\t\t// Checking $_POST array to see if fields exist. The fields are disabled\n\t\t// if the digest is set, but fetch_post_value() would still return them\n\t\t// as empty strings.\n\t\tif ( isset( $_POST['basic_auth_username'] ) && isset( $_POST['basic_auth_password'] ) ) {\n\t\t\t$basic_auth_user = trim( $this->fetch_post_value( 'basic_auth_username' ) );\n\t\t\t$basic_auth_pass = trim( $this->fetch_post_value( 'basic_auth_password' ) );\n\n\t\t\tif ( $basic_auth_user != '' && $basic_auth_pass != '' ) {\n\t\t\t\t$http_basic_auth_digest = base64_encode( $basic_auth_user . ':' . $basic_auth_pass );\n\t\t\t} else {\n\t\t\t\t$http_basic_auth_digest = null;\n\t\t\t}\n\t\t\t$this->options->set( 'http_basic_auth_digest', $http_basic_auth_digest );\n\t\t}\n\n\t\t// Save settings\n\t\t$this->options\n\t\t\t->set( 'destination_scheme', $destination_scheme )\n\t\t\t->set( 'destination_host', $destination_host )\n\t\t\t->set( 'temp_files_dir', Util::trailingslashit_unless_blank( $this->fetch_post_value( 'temp_files_dir' ) ) )\n\t\t\t->set( 'additional_urls', $this->fetch_post_value( 'additional_urls' ) )\n\t\t\t->set( 'additional_files', $this->fetch_post_value( 'additional_files' ) )\n\t\t\t->set( 'urls_to_exclude', $urls_to_exclude )\n\t\t\t->set( 'delivery_method', $this->fetch_post_value( 'delivery_method' ) )\n\t\t\t->set( 'local_dir', Util::trailingslashit_unless_blank( $this->fetch_post_value( 'local_dir' ) ) )\n\t\t\t->set( 'delete_temp_files', $this->fetch_post_value( 'delete_temp_files' ) )\n\t\t\t->set( 'destination_url_type', $destination_url_type )\n\t\t\t->set( 'relative_path', $relative_path )\n\t\t\t->save();\n\n\t\t$message = __( 'Your changes have been saved.', 'simply-static' );\n\t\t$this->view->add_flash( 'updated', $message );\n\t}", "title": "" }, { "docid": "7ea3029b8c51a349e4e5ee7f62b609d3", "score": "0.59899914", "text": "function save_settings() {\n\n $project_id = $this->input->post('project_id');\n\n //onle team members who can create project, he/she can update settings\n if (!$project_id || !($this->login_user->user_type == \"staff\" && $this->can_create_projects())) {\n redirect(\"forbidden\");\n }\n\n validate_submitted_data(array(\n \"project_id\" => \"required|numeric\"\n ));\n\n $settings = array(\"client_can_view_timesheet\");\n\n foreach ($settings as $setting) {\n $value = $this->input->post($setting);\n if (!$value) {\n $value = \"\";\n }\n\n $this->Project_settings_model->save_setting($project_id, $setting, $value);\n }\n\n echo json_encode(array(\"success\" => true, 'message' => lang('settings_updated')));\n }", "title": "" }, { "docid": "09286facbe752cf53c0a1ec8494a0a1e", "score": "0.5980594", "text": "public static function writeThemeSettingsToDisk()\n\t{\n\t\t$data = array();\n\t\n\t\tforeach (\n\t\t\t\t\\IPS\\Db::i()->select(\n\t\t\t\t\t\t'sv.*, core_theme_settings_fields.*',\n\t\t\t\t\t\t'core_theme_settings_fields',\n\t\t\t\t\t\tarray( 'sc_set_id=?', 1 ),\n\t\t\t\t\t\tNULL,\n\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t'sc_key'\n\t\t\t\t)->join(\n\t\t\t\t\t\tarray('core_theme_settings_values', 'sv'),\n\t\t\t\t\t\t'sv.sv_id=core_theme_settings_fields.sc_id'\n\t\t\t\t) as $row\n\t\t)\n\t\t{\n\t\t\t$row['sc_default'] = ( $row['sv_value'] ) ? $row['sv_value'] : $row['sc_default'];\n\t\t\t\n\t\t\tunset( $row['sc_id'], $row['sc_set_id'], $row['sc_updated'], $row['sv_id'], $row['sv_value'] );\n\n\t\t\t$data[ $row['sc_app'] ][] = $row;\n\t\t}\n\n\t\tforeach( $data as $app => $json )\n\t\t{\n\t\t\t$file = \\IPS\\ROOT_PATH . \"/applications/{$app}/data/themesettings.json\";\n\t\t\t\t\n\t\t\tif( @\\file_put_contents( $file, version_compare( PHP_VERSION, '5.4.0' ) >= 0 ? json_encode( $json, JSON_PRETTY_PRINT ) : json_encode( $json ) ) === FALSE )\n\t\t\t{\n\t\t\t\t\\IPS\\Output::i()->error( 'dev_could_not_write_data', '1C103/4', 403, '' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "db4e111b9b0d05db87441d31c2a3b255", "score": "0.5977322", "text": "private function _saveExtensionSettings(){\n\t\t$this->settings->save($this->extension_settings_file);\n\t\tif(is_file($this->extension_file)){\n\t\t\tunlink($this->extension_file);\n\t\t}\n\t}", "title": "" }, { "docid": "8183e07521a6c0ab617df100150d48ff", "score": "0.5974606", "text": "public function settings(){\n\t\treturn self::$settings;\n\t}", "title": "" }, { "docid": "d8d701b7dfcfb8865e8e63d07493635f", "score": "0.59565574", "text": "function give_is_saving_settings() {\n\tif (\n\t\tempty( $_REQUEST['_give-save-settings'] )\n\t\t|| ! wp_verify_nonce( $_REQUEST['_give-save-settings'], 'give-save-settings' )\n\t) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "9706c81d85f7f8286fb60369edf04712", "score": "0.5948601", "text": "private function store()\n {\n $settings = [];\n foreach ($this->settings as $key => $value) {\n $settings[$key] = serialize($value);\n }\n $this->files->put($this->filepath, json_encode($settings));\n }", "title": "" }, { "docid": "5bde285f8f82608282b103dca675199a", "score": "0.592567", "text": "public static function getSettings(): array\n\t{\n\t\treturn self::getStore()['settings'] ?? [];\n\t}", "title": "" }, { "docid": "d4085f5c789e4c12ce2fd23a31d5f1d4", "score": "0.59212416", "text": "private function getSettings()\n\t{\n\t\tglobal $site;\n\t\treturn array(\n\t\t\t'status'=>'0',\n\t\t\t'message'=>'Settings.',\n\t\t\t'data'=>$site->get()\n\t\t);\n\t}", "title": "" }, { "docid": "95fdeefd1b11ae441f07318d9f39b48d", "score": "0.5913214", "text": "private function settings()\n {\n $this->setRules(array(\n 'method' => 'POST|GET',\n 'vias' => 'mob,ajax',\n 'require_login' => true,\n )\n );\n $current_user = Users::getCurrentUser();\n if ('GET' == $this->method) {\n // to get the settings:\n HTTP::exitJson(array(\n 'success' => true,\n 'audios_privacy' => $current_user->audios_privacy,\n 'favs_privacy' => $current_user->favs_privacy,\n 'date_added' => $current_user->date_added\n )\n );\n }\n\n // to update the settings:\n\n $favs_privacy = HTTP::post('favs_privacy');\n $audios_privacy = HTTP::post('audios_privacy');\n \n\n if (! in_array($favs_privacy, array('public','private'))) {\n throw new \\ValidationException(\n 'favs privacy must be public or private'\n );\n }\n if (! in_array($audios_privacy, array('public','private'))) {\n throw new \\ValidationException(\n 'audios privacy must be public or private'\n );\n }\n $result = $current_user->updateSettings(array(\n 'audios_privacy' => $audios_privacy,\n 'favs_privacy' => $favs_privacy\n )\n );\n\n HTTP::exitJson(array(\n 'success' => true,\n 'response' => 'Settings updated successfully!',\n )\n );\n }", "title": "" }, { "docid": "dd06f1c28c3dba34ec6637b4aab1e4d7", "score": "0.5906758", "text": "public function saveSettings()\n {\n return $this->view('save', [\n 'title' => 'Save RSS Feed Settings'\n ]);\n }", "title": "" }, { "docid": "7a48cb3213a7c2ec4b6344897fb6e282", "score": "0.5905305", "text": "function get_settings() {\n\t\treturn $this->_page->get_settings();\n\t}", "title": "" }, { "docid": "8150056193737ffb0c287b0d3f44b754", "score": "0.5891573", "text": "public static function getSettings()\n {\n \tif (self::$instance == null) {\n \t\tself::$instance = Settings::first();\n\t\t\tif (self::$instance == null) {\n\t\t\t\tself::$instance = new Settings();\n\t\t\t}\n \t}\n \treturn self::$instance;\n }", "title": "" }, { "docid": "6ed68730436c9939e7c7656b8bfd62cb", "score": "0.5875678", "text": "function &getSettings() {\n\t\t$pressSettingsDao =& DAORegistry::getDAO('PressSettingsDAO');\n\t\t$settings =& $pressSettingsDao->getPressSettings($this->getData('pressId'));\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "c709b754b08c278b1f0e512d65f2f18a", "score": "0.58751494", "text": "public function getSettings()\n {\n return $this->pluginSettings;\n }", "title": "" }, { "docid": "3650fd0d08404d7519487b0c426367b4", "score": "0.5854716", "text": "public function save() {\n\t\tif(isset($_SESSION)) {\n\t\t\tunset($_SESSION['GO_SESSION']['newconfig']);\n\t\t}\n\t\t\n\t\t//Make sure URL has trailing slash\n\t\tif(isset($this->URL)) {\n\t\t\t$this->URL = rtrim($this->URL, '/ ').'/';\n\t\t}\n\t\t\n\t\treturn parent::save();\n\t}", "title": "" }, { "docid": "ef9caaa63f7c072bbd2234f69efc8618", "score": "0.5851373", "text": "function savePayMethodSettings() {\n\t\t$journal =& Request::getJournal();\n\t\timport('classes.payment.ojs.form.PayMethodSettingsForm');\n\n\t\t$settingsForm = new PayMethodSettingsForm();\n\t\t$settingsForm->readInputData();\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('helpTopicId', 'journal.managementPages.payments');\n\n\t\tif ($settingsForm->validate()) {\n\t\t\t$settingsForm->execute();\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$settingsForm->display();\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "76e7d86319a36d3aa099462f9e032354", "score": "0.5845551", "text": "public function loadSettings()\r\n {\r\n $this->settings = $this->container->get('gearman.settings')->loadSettings();\r\n\r\n return $this->settings;\r\n }", "title": "" }, { "docid": "6d3ae228fc27c2f0f98e22faad676a9a", "score": "0.58430874", "text": "public static function from_saved()\n\t{\n\t\t$settings = new static();\n\t\t$saved = get_option(self::$_option_key, []);\n\t\tif ( !empty($saved[ 'account_id' ]) ) {\n\t\t\t$settings->set_account_id($saved[ 'account_id' ]);\n\t\t}\n\t\tif ( !empty($saved[ 'apiKeys' ]) ) {\n\t\t\t$keys = keys::fromArray($saved[ 'apiKeys' ]);\n\t\t\t$settings->set_api_keys($keys);\n\t\t}\n\n\t\tif ( isset($saved[ 'enhancedDelivery' ]) ) {\n\t\t\t$settings->set_enhanced_delivery($saved[ 'enhancedDelivery' ]);\n\t\t}\n\n\t\tif ( !empty($saved[ 'logLevel' ]) ) {\n\t\t\t$settings->set_log_level($saved[ 'logLevel' ]);\n\t\t} else {\n\t\t\t$settings->set_log_level(Monolog::NOTICE);\n\t\t}\n\n\t\tif ( !empty($saved[ 'plan' ]) ) {\n\t\t\t$settings->set_plan($saved[ 'plan' ]);\n\t\t} else {\n\t\t\t$settings->set_plan('basic');\n\t\t}\n\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "d1b27171e045ff2afa62ebc6559d5c80", "score": "0.58419824", "text": "public function getSettings( )\n { \n $settings = ( object ) $this->settings;\n return $settings;\n }", "title": "" }, { "docid": "bf978e5d91b6268e4dd6aa9fb9fd854a", "score": "0.5837147", "text": "function loadSystemSettings()\n\t{\n\t\tif ( count($this->settings) == 0 )\n\t\t{\n\t\t\tif ( ($this->settings = $this->cache->get('system_settings')) === NULL )\n\t\t\t{\n\t\t\t\t$this->cache->rebuild('system_settings');\n\t\t\t\t$this->settings = $this->cache->get('system_settings');\n\t\t\t}\n\t\t\t\n\t\t\t$this->settings = $this->notificationsDispatcher->filter($this->settings, PEAR_EVENT_LOAD_SYSTEM_SETTINGS, $this);\n\t\t}\n\t\t\n\t\treturn $this->settings;\n\t}", "title": "" }, { "docid": "9af648cc04fa3e0a396606718df1a1e0", "score": "0.58248353", "text": "public function getSettings(): array\n {\n return $this->settings;\n }", "title": "" }, { "docid": "9af648cc04fa3e0a396606718df1a1e0", "score": "0.58248353", "text": "public function getSettings(): array\n {\n return $this->settings;\n }", "title": "" }, { "docid": "9af648cc04fa3e0a396606718df1a1e0", "score": "0.58248353", "text": "public function getSettings(): array\n {\n return $this->settings;\n }", "title": "" }, { "docid": "1d8b63e2f9d7322024e700ab1c303f7b", "score": "0.58233523", "text": "public function get_settings() {\n return $this->compose_settings();\n }", "title": "" }, { "docid": "a0b0aa31d2f5b3da9e308c58b7dcb500", "score": "0.5803505", "text": "private function get_settings() {\n\t\treturn apply_filters( $this->prefix . '_settings', $this->settings );\n\t}", "title": "" }, { "docid": "0051f0523d164f5e4c384391545c8eab", "score": "0.5800133", "text": "public function save_settings(stdClass $data) {\n $this->set_config('location', $data->location);\n $this->set_config('dayrelease', $data->dayrelease);\n return true;\n }", "title": "" } ]
47dbef0504b5592ec31b4b87f2a08556
get summary items from Cart::instance('shopping')
[ { "docid": "e6fcd3d775edae55740d6e92e49f1845", "score": "0.77788615", "text": "public function getSummaryItems()\n {\n $total = Cart::instance('shopping')->total();\n $total = (int)str_replace(\",\", \"\", $total);\n $shipping_fee = ($total >= 500 || $total == 0) ? 0 : 60;\n $amount = $shipping_fee + $total;\n return compact('total', 'shipping_fee', 'amount');\n }", "title": "" } ]
[ { "docid": "47b55c9de10a7ef837b349922c4b4df1", "score": "0.7127795", "text": "public function getCartItem();", "title": "" }, { "docid": "7e0bb7a3fc7c101a817539331dfbab9d", "score": "0.6819104", "text": "public function listItemInCart()\n {\n // $user = User::find(1);\n $user = Auth::user();\n\n $res = $user->resselections()->get();\n $count = $res->count();\n $sum = 0;\n foreach ($res as $value) {\n $sum += $value->pivot->Price;\n }\n return view('shopCart', ['items' => $res, 'count' => $count, 'sumprice' => $sum]);\n }", "title": "" }, { "docid": "1740e1e5070e930d5a9574d635477ceb", "score": "0.6596158", "text": "public function get() {\n if($this->numItems == 0)\n return \"The cart is empty\";\n\n $products = null;\n foreach($this->items as $item) {\n $products = $products . $item[1] . \" \" . $item[0] . \", \";\n }\n $products = substr($products, 0, strlen($products) - 2);\n return \"The items in the cart: \" . $products;\n }", "title": "" }, { "docid": "cced135f220853c0fe720a978050cebe", "score": "0.65651965", "text": "public function getSummary()\n {\n return $this->renderWith('DMSDocumentCartSummary');\n }", "title": "" }, { "docid": "409110a1654814dd7837638466a07282", "score": "0.6509787", "text": "function show_cart() {\n $output = '';\n $no = 0;\n foreach ($this->cart->contents() as $items) {\n $no++;\n $output .= '\n <tr>\n <td>'.$items['name'].'</td>\n <td>'.number_format($items['price']).'</td>\n <td>'.$items['qty'].'</td>\n <td>'.number_format($items['subtotal']).'</td>\n </tr>\n ';\n }\n $output .= '\n <tr>\n <td colspan=\"3\">Total</td>\n <td colspan=\"2\">'.'Rp '.number_format($this->cart->total()).'</td>\n </tr>\n ';\n return $output;\n }", "title": "" }, { "docid": "26507dc9264370683f5616c31f43a58b", "score": "0.6481623", "text": "public function getCart(){ //method to retrieve items in cart\r\n return $this->cart;\r\n }", "title": "" }, { "docid": "fe35a6e95ca091e2dba6a723c44fd351", "score": "0.64676315", "text": "public function getItemsInCartAttribute(){\n if ( ! $this->relationLoaded('deliveredVariantsCount')) \n $this->load('deliveredVariantsCount');\n \n $delivered_variants_count = $this->getRelation('deliveredVariantsCount');\n $delivered_variants = ($delivered_variants_count) ? (int) $delivered_variants_count->aggregate : 0;\n\n // if deliveredProductsCount is not loaded already, let's do it first\n if ( ! $this->relationLoaded('deliveredProductsCount')) \n $this->load('deliveredProductsCount');\n \n $delivered_products_count = $this->getRelation('deliveredProductsCount');\n $delivered_products = ($delivered_products_count) ? (int) $delivered_products_count->aggregate : 0;\n\n\n return $delivered_variants + $delivered_products;\n }", "title": "" }, { "docid": "427f367e41a64215914e3f61f2bf9589", "score": "0.6424646", "text": "public function getPurchasedItems();", "title": "" }, { "docid": "1b3c2f17199642f7287180f27d66518f", "score": "0.64217377", "text": "function getCartItems(){\n $data = $_SESSION[\"db\"]->getAllCartItems();\n foreach($data as $cartItem){//loops thru the array of objects\n $animal = $_SESSION[\"db\"]->getAnimalByID($cartItem->getAnimalID());\n $html .= \"<div class='cart-item'>\" .\n \"<h5>\".$animal[0]->getName().\"</h5>\" . \n \"<p>Price: $\".$animal[0]->getCost().\"</p>\".\n \"</div>\";\n }\n return $html;\n }", "title": "" }, { "docid": "bd673de61f1c5747c8a8ca29840f8273", "score": "0.6418585", "text": "public function getItems() {\r\n return $this->cartItems;\r\n }", "title": "" }, { "docid": "157185f7b45bf519d712b0cb61bf65e2", "score": "0.6385367", "text": "public function shoppingCart()\n {\n $shopping_cart = Mage::getSingleton('checkout/session')->getQuote()->getAllItems();\n $items_in_cart = array();\n $i = 0;\n\n foreach($shopping_cart as $basket) {\n $product_id = $basket->getProductId();\n $product = Mage::getModel('catalog/product')->load($product_id);\n\n if ($product->isSuper()) continue;\n $this->_getSailthruClient()->log(array(\n 'isSuperGroup' => $product->isSuperGroup(),\n 'isGrouped' => $product->isGrouped(),\n 'isConfigurable' => $product->isConfigurable(),\n 'isSuper' => $product->isSuper(),\n 'isSalable' => $product->isSalable(),\n 'isAvailable' => $product->isAvailable(),\n 'isVirtual' => $product->isVirtual(),\n 'id' => $product->getSku(),\n ),\"PRODUCT\");\n\n $quantity = $basket->getQty();\n $items_in_cart[$i] = array( 'qty' => $quantity,\n 'title' => $product->getName(),\n 'price' => $product->getPrice()*100,\n 'id' => $product->getSku(),\n 'url' => $product->getProductUrl(),\n 'tags' => $product->getMetaKeyword(),\n 'vars' => $this->getProductData($product),\n );\n $i++;\n }\n //$this->_debug($items_in_cart);\n\n return $items_in_cart;\n }", "title": "" }, { "docid": "a14981d540d845bfcefb5f0413fcdb38", "score": "0.63847923", "text": "public function total_items(){ \n return $this->basket_contents['total_items']; \n }", "title": "" }, { "docid": "bb71a8c98d15a7c6bee6c860ac9cd11e", "score": "0.63746506", "text": "public function getQuotationCart();", "title": "" }, { "docid": "889c50b1c290b25d2cbdcd0e4f15bb8a", "score": "0.63708293", "text": "public function getDetail($cart);", "title": "" }, { "docid": "40da464fbb4a431e842b89d4f48f587b", "score": "0.6361819", "text": "function pxl_shop_cart_items() {\n $shopping_cart_items = &pxl_shop_session_data()['cart']['items'];\n return $shopping_cart_items ? $shopping_cart_items : array();\n}", "title": "" }, { "docid": "11bdaf07fd017e555178eb6663d5ec16", "score": "0.63515717", "text": "public function get_cart_items_html(){\n\t\trequire_once(TPL_DIR.'/shop/cart.php');\n\t\twp_die();\n\t}", "title": "" }, { "docid": "bf4841480a71a90833065397712b01dc", "score": "0.6333018", "text": "public function getItemsTotal();", "title": "" }, { "docid": "4ccc2f8a3c079237da7feb787b9aa177", "score": "0.6318073", "text": "public function cartInfo()\n\t\t{\n\t\t\t$search = \"created_user = 1 AND ordered_date = '0000-00-00 00:00:00'\";\n\t\t\treturn $this->_db->SearchCustom('cart', $search);\n\t\t}", "title": "" }, { "docid": "2ee00709f312efbc45e240f48a878762", "score": "0.6296578", "text": "public function getBuyingSummary()\n {\n return $this->buyingSummary;\n }", "title": "" }, { "docid": "20ccffca285026596d7afc4c1b6c3016", "score": "0.62893295", "text": "public function cart();", "title": "" }, { "docid": "7d877beb989e9cd3172b12d490b50d57", "score": "0.62562937", "text": "public function collectCart()\n {\n $products = $this->cartLogic->readCart();\n\n\n $table = $this->productsLogic->printCart($products);\n//\n include \"view/shopping.php\";\n }", "title": "" }, { "docid": "19d21fed6ed5b836a37e02842c1ce6fd", "score": "0.6232215", "text": "public function getCartItems()\n {\n // note: getAllVisibleItems() return only the added items without parents\n // getAllItems() return ALL quota items.\n return Mage::getModel('checkout/cart')->getQuote()->getAllItems();\n }", "title": "" }, { "docid": "eda7c40d0895cbfdb67b0cd36b173fb5", "score": "0.6226903", "text": "public function cart()\n {\n # return all\n return $this->_getCurrentCartItem();\n }", "title": "" }, { "docid": "4571e20e8c3fb398469c7815e6c515ff", "score": "0.62056524", "text": "public function getCartItems(){\n $cart = Cart::where('user_id',auth()->id())->get();\n return $cart;\n }", "title": "" }, { "docid": "a967ae9eefa478ab58c3be4b0b86e5e5", "score": "0.62030786", "text": "public function getCartItemsWithTitle() \n {\n $endTime = time() - $this->cartItemLifeTime;\n\n $obj = self::find()\n ->select(\"cart.id, cart.product_id, cart.user_session_id, cart.quantity, cart.cost, cart.created_at, product.title, product.price\")\n ->joinWith('product', 'cart.product_id = product.id')\n ->where(['product.status' => 1])\n ->andWhere(['cart.user_session_id' => $this->userSessionId]) \n ->andWhere(['>', 'cart.created_at', $endTime]) \n ->orderBy('cart.product_id')\n ->all();\n\n if ($obj !== null && !empty($obj)) {\n return $obj;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "3e38238cceee31b2a88c5f405ac7c97d", "score": "0.61877704", "text": "private function listCartItems(){\n $cart_arr = array();\n $carts = Yii::app()->session['carts'];\n if (!empty($carts)){\n foreach ($carts as $key => $cart){\n $retailer = Retailer::model()->findByPk($cart['id']);\n $cart_arr[$key] = array(\n 'retailer' => $retailer,\n 'qty' => $cart['qty'],\n 'price' => $cart['price'],\n 'total' => $cart['qty'] * $cart['price']\n );\n }\n }\n else $cart_arr = null;\n return $cart_arr;\n }", "title": "" }, { "docid": "30d5dc5b9ddbc7f97cc3bfeac5e6c10c", "score": "0.61815286", "text": "public function cartData(){\n\t\t\t\n\t\t\t\n\t\t\treturn $this->query_shop_db();\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "c1c8fa68dd94f8a21ed48b2039225cf6", "score": "0.6176202", "text": "public function current() {\n $total = Cart::subtotal();\n $count = Cart::count();\n return [\"total\"=>$total,\"count\"=>$count];\n }", "title": "" }, { "docid": "5792256666e95f7ea33d580b96968c52", "score": "0.61717093", "text": "public function getShoppingcart(){\n \treturn Database::start()->get('*', 'shoppingcart', array(\n array('user_id', '=', $_SESSION['_user']['id'])\n ))->results();\n }", "title": "" }, { "docid": "9b8d37b78bfa96c536c6c42074c7b602", "score": "0.61711514", "text": "function getTotal()\n {\n return $this->cart->instance(\\Auth::id())->total();\n }", "title": "" }, { "docid": "0a78752a7cff8db698d216ff8bb9933b", "score": "0.6147612", "text": "function count_cart_top(){\n\t\t$output = '';\n\t\t$no = 0;\n $rows = count($this->cart->contents());\n\t\t\n\t\t$output .= $rows.' items';\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "5008e2b77e1d2766d186b54f3417f436", "score": "0.6143314", "text": "public function getSummaryCount()\n {\n if ($this->getData('summary_qty')) {\n return $this->getData('summary_qty');\n }\n return Mage::getSingleton('checkout/cart')->getSummaryQty();\n }", "title": "" }, { "docid": "f441bae5325c4f581f1f2710d9f70bd3", "score": "0.6130194", "text": "function getTotalCountOfItems() {\n $session = new Session();\n return ($session->has('myCart')) ? array_sum($session->get('myCart')['count']) : 0;\n}", "title": "" }, { "docid": "b37594989e5f2c6894b0944336bfcc6b", "score": "0.61290926", "text": "public function getItemsAll() {\n $items = Sales::select('sales.order_no', 'rl.receipt_no', 'u.first_name', 'p.name as product', 'cr.name as category', 'pd.name as subcategory', 'pd.quantity', 'qtr.acronym', 'pd.price', 'sales.created_at')\n ->join('sales_products as sp', 'sp.sales_id', 'sales.id')\n ->join('product_details as pd', 'pd.id', 'sp.product_detail_id')\n ->join('products as p', 'p.id', 'pd.product_id')\n ->join('categories_ref as cr', 'cr.id', 'p.category_id')\n ->join('quantity_types_ref as qtr', 'qtr.id', 'p.quantity_type_id')\n ->join('users as u', 'u.id', 'sales.user_id')\n ->join('receipt_logs as rl', 'rl.id', 'sales.receipt_id')\n ->get();\n\n $top = Sales::select(DB::raw('count(p.id) as orders , p.name as product'))\n ->join('sales_products as sp', 'sp.sales_id', 'sales.id')\n ->join('product_details as pd', 'pd.id', 'sp.product_detail_id')\n ->join('products as p', 'p.id', 'pd.product_id')\n ->groupBy('p.id')\n ->orderByDesc('orders')\n ->get();\n\n return [\n 'list' => $items,\n 'top' => $top\n ];\n }", "title": "" }, { "docid": "5cee06a9597c1b9b8fadd5006e62fa23", "score": "0.61263365", "text": "public function viewCart(Request $request) {\n Cart::session('user');\n $content = Cart::getContent();\n print(\"<pre>\".($content).\"<pre>\");\n // return $it;\n }", "title": "" }, { "docid": "ee218480a5a68825a334e1609520fbd8", "score": "0.61198366", "text": "protected function fetchCartData()\n {\n return ShoppingCart::fetch();\n }", "title": "" }, { "docid": "27a741e2451ecd15a6722a4c506e0edd", "score": "0.6095481", "text": "public function showCart(){\r\n\t\t$Sql = \"SELECT \r\n\t\t\t\t\tcart_id,\r\n\t\t\t\t\torder_id,\r\n\t\t\t\t\tcustomer_id,\r\n\t\t\t\t\tpackage_id,\r\n\t\t\t\t\tcart_quantity,\r\n\t\t\t\t\tcart_price,\r\n\t\t\t\t\tcart_lng,\r\n\t\t\t\t\tadd_date,\r\n\t\t\t\t\tis_active\r\n\t\t\t\tFROM\r\n\t\t\t\t\trs_tbl_cart\r\n\t\t\t\tWHERE\r\n\t\t\t\t\t1=1 \r\n\t\t\t\t\tAND order_id='\" . $this->getProperty(\"order_id\") . \"'\";\r\n\t\t\r\n\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\r\n\t\t\t$Sql .= \" AND customer_id='\" . $this->getProperty(\"customer_id\") . \"'\";\r\n\t\t}\r\n\t\t\r\n\t\tif($this->isPropertySet(\"package_id\", \"V\")){\r\n\t\t\t$Sql .= \" AND package_id='\" . $this->getProperty(\"package_id\") . \"'\";\r\n\t\t}\r\n\t\t\r\n\t\tif($this->isPropertySet(\"is_active\", \"V\")){\r\n\t\t\t$Sql .= \" AND is_active='\" . $this->getProperty(\"is_active\") . \"'\";\r\n\t\t}\r\n\r\n\t\tif($this->isPropertySet(\"GROUPEDBY\", \"V\")){\r\n\t\t\t$Sql .= \" GROUP BY \" . $this->getProperty(\"GROUPEDBY\");\r\n\t\t}\r\n\t\t\r\n\t\tif($this->isPropertySet(\"ORDERBY\", \"V\")){\r\n\t\t\t$Sql .= \" ORDER BY \" . $this->getProperty(\"ORDERBY\");\r\n\t\t}\r\n\t\treturn $this->dbQuery($Sql);\r\n\t}", "title": "" }, { "docid": "01da1505f9afe4c44acae941c0ea1b9d", "score": "0.60851836", "text": "public function listCart()\n {\n $carts = json_decode(request()->cookie('dw-carts'), true);\n //UBAH ARRAY MENJADI COLLECTION, KEMUDIAN GUNAKAN METHOD SUM UNTUK MENGHITUNG SUBTOTAL\n $subtotal = collect($carts)->sum(function ($q) {\n return $q['qty'] * $q['product_price']; //SUBTOTAL TERDIRI DARI QTY * PRICE\n });\n //LOAD VIEW CART.BLADE.PHP DAN PASSING DATA CARTS DAN SUBTOTAL\n return view('pemesananUser', compact('carts', 'subtotal'));\n }", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.60829663", "text": "public function getSummary();", "title": "" }, { "docid": "03ac671eab692fa1ae41c048ee6ffdb3", "score": "0.60829663", "text": "public function getSummary();", "title": "" }, { "docid": "ec7407209af1f6938db2b83c1cf12fe5", "score": "0.6065923", "text": "public function meta(Cart $cart, Request $request){\n return [\n 'empty' => $cart->isEmpty(),\n 'subtotal' => $cart->subtotal()->formatted(),\n 'total' => $cart->withShipping($request->shipping_method_id)->total()->formatted(),\n 'changed' => $cart->hasChanged()\n ];\n }", "title": "" }, { "docid": "70cd24437d1e3e0763bc3136b798ca81", "score": "0.6051175", "text": "public function get_shoppingCart()\n\t{\n\t\t$layout = View::forge('idaho/layoutfull');\n\n\t\t$content = View::forge('idaho/shoppingCart');\n\n\t\t// will hold the list of quantity selectors for each attraction\n\t\t$attrQuantities = '';\n\n\t\t// create and append a quantity selector for each attraction\n\t\t$attrQuery = Attractions::get_attrs();\n\t\tforeach($attrQuery as $attrRow) {\n\t\t\t$attrQuantity = View::forge('idaho/attrQuantity');\n\t\t\t$attrQuantity->set_safe('attr_name', $attrRow['name']);\n\t\t\t$attrQuantity->set_safe('attr_id', $attrRow['id']);\n\n\t\t\t// Get the session instance, so that we can retrieve the number of brochures\n\t\t\t// for each attraction that the user has added to their cart\n\t\t\t$session = Session::instance();\n\t\t\t// The session stores the number of brochures ordered per attraction via\n\t\t\t// the attraction id, so use the attr_id to index into the session to get the\n\t\t\t// number of brochures the user has order for a specific attraction\n\t\t\t$brochuresOrdered = $session->get($attrRow['id']);\n\t\t\tif (!isset($brochuresOrdered)) {\n\t\t\t\t$attrQuantity->set_safe('init_val', 0);\n\t\t\t} else {\n\t\t\t\t$attrQuantity->set_safe('init_val', $brochuresOrdered);\n\t\t\t}\n\n\t\t\t$attrQuantities .= $attrQuantity;\n\t\t}\n\n\t\t$content->set_safe('attrQuantities', $attrQuantities);\n\n\t\t$login = $this->constructLogin();\n\n\t\t$layout->login = Response::forge($login);\n\n\t\t$layout->content = Response::forge($content);\n\n\t\treturn $layout;\n\t}", "title": "" }, { "docid": "c24761689890424d4d94ad61025ae54d", "score": "0.60323554", "text": "public function get_items()\n {\n $items = $this->order->get_items();\n $itemamt = 0;\n $this->payment['ITEMAMT'] = 0;\n $all_items = array();\n\n foreach ($items as $item) {\n\n $_product = RightPress_WC_Legacy::order_item_get_product($item, $this->order);\n\n $qty = absint($item['qty']);\n\n $meta = RightPress_WC_Legacy::wc_display_item_meta($item, $_product, true, true);\n\n $sku = $_product->get_sku();\n $item['name'] = html_entity_decode($_product->get_title(), ENT_NOQUOTES, 'UTF-8');\n\n if (RightPress_WC_Legacy::product_get_type($_product) == 'variation') {\n if (empty($sku)) {\n $parent_product = RightPress_WC_Legacy::product_variation_get_parent($_product);\n $sku = $parent_product->get_sku();\n }\n if (!empty($meta)) {\n $item['name'] .= ' - ' . str_replace(', \\n', ' - ', $meta);\n }\n }\n\n $Item = array(\n 'NAME' => $item['name'],\n 'QTY' => $qty,\n 'AMT' => Subscriptio_PayPal_EC_Gateway::round($item['line_subtotal'] / $qty),\n 'NUMBER' => $sku,\n );\n\n $all_items[] = $Item;\n\n $itemamt += Subscriptio_PayPal_EC_Gateway::round($item['line_subtotal'] / $qty) * $qty;\n }\n\n // Add cart fees\n $cart_fees = $this->get_cart_fees();\n\n // Get discounts\n $discounts = $this->get_discounts();\n\n // Add them to total and unset it\n $itemamt += $cart_fees['fees_sum'];\n unset($cart_fees['fees_sum']);\n\n // Save total discount\n $discounts_sum = $discounts['discounts_sum'];\n unset($discounts['discounts_sum']);\n\n // Merge all items, fees and discounts\n $all_items = array_merge($all_items, $cart_fees, $discounts);\n\n // Add otder items\n $this->payment['_items'] = $all_items;\n\n // Add the totals\n $this->payment['ITEMAMT'] = ($itemamt === 0) ? ($this->order->get_total() - $this->payment['TAXAMT'] - $this->payment['SHIPPINGAMT']) : Subscriptio_PayPal_EC_Gateway::number_format($itemamt + $discounts_sum);\n\n // Double-check the totals and maybe fix numbers to prevent rounding issues\n if (trim(Subscriptio_PayPal_EC_Gateway::number_format($this->order->get_total())) !== trim(Subscriptio_PayPal_EC_Gateway::number_format($this->payment['ITEMAMT'] + $this->payment['TAXAMT'] + $this->payment['SHIPPINGAMT']))) {\n\n // Count the difference\n $diff = $this->order->get_total() - ($this->payment['ITEMAMT'] + $this->payment['TAXAMT'] + $this->payment['SHIPPINGAMT']);\n\n // Add this either to shipping\n if ($this->payment['SHIPPINGAMT'] > 0) {\n $this->payment['SHIPPINGAMT'] = Subscriptio_PayPal_EC_Gateway::number_format($this->payment['SHIPPINGAMT'] + $diff);\n }\n\n // Or taxes\n elseif ($this->payment['TAXAMT'] > 0) {\n $this->payment['TAXAMT'] = Subscriptio_PayPal_EC_Gateway::number_format($this->payment['TAXAMT'] + $diff);\n }\n\n // Or to the first item\n else {\n $this->payment['ITEMAMT'] = Subscriptio_PayPal_EC_Gateway::number_format($this->payment['ITEMAMT'] + $diff);\n $this->payment['_items'][0]['AMT'] = Subscriptio_PayPal_EC_Gateway::number_format($this->payment['_items'][0]['AMT'] + $diff / $this->payment['_items'][0]['QTY']);\n }\n }\n }", "title": "" }, { "docid": "22824a8207cd5db85294a8e772f18213", "score": "0.6029817", "text": "public function getSummaryProductContents()\n {\n return $this->summaryProductContents;\n }", "title": "" }, { "docid": "3698ab1d3a120db56a1f1f9a99ccb82e", "score": "0.60252655", "text": "function get_catalog_item($request) {\r\n\r\n $item = $request['item'];\r\n\r\n // If this is a product group then get info for group.\r\n if ($item['type'] == 'product group') {\r\n\r\n $item_properties = db_item(\r\n \"SELECT\r\n name,\r\n short_description,\r\n image_name,\r\n address_name,\r\n display_type\r\n FROM product_groups\r\n WHERE id = '\" . e($item['id']) . \"'\");\r\n\r\n // Otherwise this is a product, so get info for product.\r\n } else {\r\n\r\n $item_properties = db_item(\r\n \"SELECT\r\n name,\r\n short_description,\r\n image_name,\r\n price,\r\n selection_type,\r\n address_name\r\n FROM products\r\n WHERE id = '\" . e($item['id']) . \"'\");\r\n }\r\n\r\n if (!$item_properties) {\r\n return error_response('Sorry, that item could not be found.');\r\n }\r\n\r\n $item = array_merge($item, $item_properties);\r\n\r\n if ($item['type'] == 'product group' and $item['display_type'] == 'browse') {\r\n $item['url'] = $request['catalog_url'] . encode_url_path($item['address_name']);\r\n\r\n } else {\r\n $item['url'] = $request['catalog_detail_url'] . encode_url_path($item['address_name']);\r\n }\r\n\r\n $item['image_url'] = '';\r\n\r\n if ($item['image_name'] != '') {\r\n $item['image_url'] = PATH . encode_url_path($item['image_name']);\r\n }\r\n\r\n if (isset($request['discounted_product_prices'])) {\r\n $discounted_product_prices = $request['discounted_product_prices'];\r\n } else {\r\n $discounted_product_prices = get_discounted_product_prices();\r\n }\r\n\r\n if ($item['type'] == 'product group') {\r\n $item['price_range'] = get_price_range($item['id'], $discounted_product_prices);\r\n }\r\n\r\n // Get the price or price range for output.\r\n $item['price_info'] = get_price_info(array(\r\n 'item' => $item,\r\n 'discounted_product_prices' => $discounted_product_prices));\r\n\r\n if ($item['type'] == 'product group') {\r\n $item['price_range']['smallest_price'] = $item['price_range']['smallest_price'] / 100;\r\n $item['price_range']['largest_price'] = $item['price_range']['largest_price'] / 100;\r\n $item['price_range']['original_price'] = $item['price_range']['original_price'] / 100;\r\n\r\n // Otherwise this is a product, so prepare price in dollars.\r\n } else {\r\n $item['price'] = $item['price'] / 100;\r\n }\r\n\r\n return array(\r\n 'status' => 'success',\r\n 'item' => $item);\r\n}", "title": "" }, { "docid": "288004fc8f8ababb7aec9c25c8a8765a", "score": "0.6024079", "text": "function getCartNrQtd(){\n\n $cart = Cart::getFromSession(); //pegar o carrinho que esta na sessao\n\n $totals = $cart->getProductsTotals(); //soma todos os valores do carrinho\n\n return $totals['nrqtd'];\n\n}", "title": "" }, { "docid": "63d29868b07510965e8048f55b809442", "score": "0.6020156", "text": "public function getShoppingCart(Request $request)\n {\n \t$cart = new ShoppingCart($request->session());\n $items = $cart->getItems();\n\n \treturn view('shopping.cart', compact('items')); //['items' => $items, 'totalPrice' => $totalPrice]\n }", "title": "" }, { "docid": "c73ed8e9cba3b8daa4e123872d4c62cd", "score": "0.60009825", "text": "public function buildCartItem();", "title": "" }, { "docid": "6bfabafa17daf1fa71e87c9cc46736a5", "score": "0.5988084", "text": "public function cartAction()\n {\n $this->permissionsCheck();\n\n $this->view->order = $order = $this->orderRepository->getOneById($this->orderId);\n\n // Make sure we have an order and that it's not completed\n $this->requireValidOrder($order);\n\n $this->view->pageTitle = \"Order Summary\";\n $this->view->orderId = $this->orderId;\n $this->view->user = $this->user;\n }", "title": "" }, { "docid": "7ebd8913f8a5e62de7c751f1ded9a838", "score": "0.59856874", "text": "public function getOppoSummary()\r\n {\r\n return $this->get(self::_OPPO_SUMMARY);\r\n }", "title": "" }, { "docid": "70fdee08d1895cbc1eca200fb4c7f9a8", "score": "0.5982097", "text": "public function getCart() {\n return View::make('store.cart')->with('products', Cart::contents());\n }", "title": "" }, { "docid": "e953c7dc1232e95fca7519f3efb75aa4", "score": "0.59820336", "text": "public function calculateItemsTotal();", "title": "" }, { "docid": "90c2df8051f2a9769002b310f2b6e96a", "score": "0.59658146", "text": "public function getMiniCartDetails()\n {\n $cart = cart()->getCart();\n\n if ($cart) {\n $items = $cart->items;\n $cartItems = $items->toArray();\n\n $cartDetails = [];\n $cartDetails['base_grand_total'] = core()->currency($cart->base_grand_total);\n $cartDetails['base_sub_total'] = core()->currency($cart->base_sub_total);\n\n /* needed raw data for comparison */\n $cartDetails['raw']['base_sub_total'] = $cart->base_sub_total;\n\n foreach ($items as $index => $item) {\n $images = $item->product->getTypeInstance()->getBaseImage($item);\n\n $cartItems[$index]['images'] = $images;\n $cartItems[$index]['url_key'] = $item->product->url_key;\n $cartItems[$index]['base_total'] = core()->currency($item->base_total);\n $cartItems[$index]['base_total_with_tax'] = core()->currency($item->base_total + $item->tax_amount);\n }\n\n $response = [\n 'status' => true,\n\n 'mini_cart' => [\n 'cart_items' => $cartItems,\n 'cart_details' => $cartDetails,\n ],\n ];\n } else {\n $response = ['status' => false];\n }\n\n return response()->json($response);\n }", "title": "" }, { "docid": "46e91a6546208a908476d59f3b6c4dc0", "score": "0.5959235", "text": "public function summary()\n {\n $panel = [\n 'left' => ['width' => '2', 'class' => 'user-panel'],\n 'center' => ['width' => '10'],\n ];\n\n $query = Order::auth()->ofType('order')->get();\n $orders = ['closed' => 0, 'open' => 0, 'cancelled' => 0, 'all' => $query->count(), 'total' => 0, 'nopRate' => 0];\n\n foreach ($query as $row) {\n if ($row->status == 'cancelled') {\n $orders['cancelled'] ++;\n } elseif ($row->status == 'closed') {\n $orders['closed'] ++;\n } else {\n $orders['open'] ++;\n }\n foreach ($row->details as $deta) {\n $orders['total'] += ($deta->quantity * $deta->price);\n if ($row->status == 'closed' && !$deta->rate) {\n $orders['nopRate'] ++;\n }\n }\n }\n unset($query);\n $sales = null;\n if (\\Auth::check() && \\Auth::user()->hasRole(['business', 'admin'])) {\n $orders = Order::where('seller_id', \\Auth::user()->id)->ofType('order')->get();\n $sales = ['closed' => 0, 'open' => 0, 'cancelled' => 0, 'all' => $orders->count(), 'total' => 0, 'rate' => 0, 'numRate' => 0, 'totalRate' => 0, 'nopRate' => 0];\n foreach ($orders as $row) {\n if ($row->status == 'cancelled') {\n $sales['cancelled'] ++;\n } elseif ($row->status == 'closed') {\n $sales['closed'] ++;\n } else {\n $sales['open'] ++;\n }\n foreach ($row->details as $deta) {\n $sales['total'] += ($deta->quantity * $deta->price);\n if ($row->status == 'closed' && $deta->rate) {\n $sales['numRate'] ++;\n $sales['totalRate'] = $sales['totalRate'] + $deta->rate;\n }\n if ($row->status == 'closed' && !$deta->rate) {\n $sales['nopRate'] ++;\n }\n }\n }\n if ($sales['numRate']) {\n $sales['rate'] = $sales['totalRate'] / $sales['numRate'];\n }\n }\n\n return view('user.summary', compact('panel', 'orders', 'sales'));\n }", "title": "" }, { "docid": "0b04c67861cbf1ae817e148003e6a47f", "score": "0.5957727", "text": "public function all()\n {\n return $this->getCart();\n }", "title": "" }, { "docid": "8b675d384c64f57abda3449e1d40b799", "score": "0.594993", "text": "public function index()\n { $cartItems = Cart::content();\n $total = Cart::total();\n// $count = Cart::count();\n return view('site.cart.index',compact('cartItems','total'));\n }", "title": "" }, { "docid": "184855f130b16ce62fde369d42ba5a99", "score": "0.5938532", "text": "public function getCartItems($type =\"O\") {\n //$login = (isset($_SESSION['tempCustomer']['login']) ? $_SESSION['tempCustomer']['login'] : $_SESSION['cmd']['login']);\n //echo \"SELECT * FROM `cart` WHERE login = '{$_SESSION['cmd']['login']}' (\".($type ? \"AND type='$type'\" : \"\").\" \".($type == \"O\" ? \"OR type='pay_preorder'\" : \"\").\" \".($type == \"O\" ? \"OR type='pay_quote'\" : \"\").\" \".($type == \"O\" ? \"OR type='warranty'\" : \"\").\" \".($type == \"O\" ? \"OR type='SOR'\" : \"\").\" \".($type == \"O\" ? \"OR type='item'\" : \"\").\") ORDER BY type\";\n $cartItems = db::fetch_array(\"SELECT * FROM `cart` WHERE login = '{$_SESSION['cmd']['login']}' \".($type ? \"AND (type='$type'\" : \"\").\" \".($type == \"O\" ? \"OR type='pay_preorder'\" : \"\").\" \".($type == \"O\" ? \"OR type='pay_quote'\" : \"\").\" \".($type == \"O\" ? \"OR type='warranty'\" : \"\").\" \".($type == \"O\" ? \"OR type='SOR'\" : \"\").\" \".($type == \"O\" ? \"OR type='item'\" : \"\").\"\".($type ? \")\" : \"\").\" ORDER BY type\");\n \n $cartItemsCount = 0;\n \n foreach($cartItems as $item) {\n $cartItemsCount += $item['qty'];\n }\n \n $_SESSION['cart']['itemCount'] = $cartItemsCount;\n $_SESSION['cart']['items'] = $cartItems;\n \n return $cartItems;\n }", "title": "" }, { "docid": "f13767c520f3a06e03d068632bc23c4e", "score": "0.59378093", "text": "function addCartTotal(){\n $total = 0;\n $data = $_SESSION[\"db\"]->getAllCartItems();\n foreach($data as $cartItem){//loops thru the array of objects\n $total += $cartItem->getAnimalCost();\n }\n return $total;\n }", "title": "" }, { "docid": "f369ba416de531b8399e4f7cb1e5dddb", "score": "0.5937376", "text": "public static function total_items()\n {\n return static::$cart_contents['total_items'];\n }", "title": "" }, { "docid": "98f3f3a36d1efa449941f687c7c23b6d", "score": "0.59319615", "text": "public function getItemDetailsList($cartId);", "title": "" }, { "docid": "8a121225e380ff7c5d06b96322c80e6c", "score": "0.593187", "text": "public function summary(Request $request)\n {\n if($request->ajax())\n {\n $voucher_cart = Cart::instance('voucher')->content();\n $items_total = Cart::instance('items')->total();\n $shipping_total = Cart::instance('shipping')->total();\n $voucher_discount = Cart::instance('voucher')->total();\n $points_discount = Cart::instance('points')->total();\n $cart_tax = Cart::taxes();\n $cart_total = Cart::globalTotal();\n\n $items_total = Price::output($items_total);\n $shipping_total = Price::output($shipping_total);\n $voucher_discount = Price::output($voucher_discount);\n $points_discount = Price::output($points_discount);\n $cart_tax = Price::output($cart_tax);\n $cart_total = Price::output($cart_total);\n\n return view(\n 'front.pages.cart.partials.summary',\n compact(\n 'voucher_cart',\n 'items_total',\n 'shipping_total',\n 'voucher_discount',\n 'points_discount',\n 'cart_tax',\n 'cart_total'\n )\n )->render();\n }\n\n return back();\n }", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5929288", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5929288", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5929288", "text": "public function getItems();", "title": "" }, { "docid": "a698b0a9926bdf36cae96603aaa48487", "score": "0.5929288", "text": "public function getItems();", "title": "" }, { "docid": "f6fda01708aa87c98f964b3125fefc9d", "score": "0.5927039", "text": "private function cart(){\n $cart = Cart::session($this->userID());\n return [\n 'items' => $cart->getContent()->toArray(),\n 'count' => $cart->getContent()->count(),\n 'quantity' => $cart->getTotalQuantity(),\n 'total' => $cart->getTotal()\n ];\n }", "title": "" }, { "docid": "b8bb254dcbfcbc2b651c9f522147b7d3", "score": "0.5926147", "text": "public function showCart()\n\t{\n\t\t$output = '';\n\t\t$no = 0;\n\t\tforeach ($this->cart->contents() as $items) {\n\t\t\t$no++;\n\t\t\t$output .= '\n <tr>\n <td colspan=\"3\">' . $items['name'] . '</td>\n <td><button type=\"button\" id=\"' . $items['rowid'] . '\" class=\"hapus_cart btn btn-danger btn-xs\">Batal</button></td>\n </tr>\n ';\n\t\t}\n\t\t// $output .= '\n\t\t// <tr>\n\t\t// <th colspan=\"3\">Total</th>\n\t\t// <th colspan=\"2\">' . 'Rp ' . number_format($this->cart->total()) . '</th>\n\t\t// </tr>\n\t\t// ';\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "654696386f7af3ac7b086c379a788e0d", "score": "0.5925952", "text": "protected function _getItemCount()\n {\n $count = $this->getSummaryQty();\n return $count ? $count : $this->_cartHelper->getSummaryCount();\n }", "title": "" }, { "docid": "a334c01d966871a5796b8223a20fe154", "score": "0.5925494", "text": "public function subtotal(){\n $cart = \\Session::get('cart');\n $subtotal = 0;\n\n foreach($cart as $item){\n $subtotal += $item->quantity * $item->price;\n }\n\n return $subtotal;\n }", "title": "" }, { "docid": "54d55da1d8cc8645df1396b4373714d5", "score": "0.59226185", "text": "public abstract function getCartObjectsInfo($status = \"initial\", $return_total_amount = false);", "title": "" }, { "docid": "ecbe5e6e0589685fd26a130d2d88b01b", "score": "0.59130406", "text": "function communityservice_cart_totals() {\n\t\tif ( is_checkout() ) {\n\t\t\treturn;\n\t\t}\n\t\tcs_get_template( 'cart/cart-totals.php' );\n\t}", "title": "" }, { "docid": "29113136d6a1ad49c268c6070f5b5def", "score": "0.5912352", "text": "function total_items($cart){\n\t\t$items = 0;\n\t\tif(is_array($cart)){\n\t\t\tforeach($cart as $key_id => $qty){\n\t\t\t\t$items += $qty;\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "3e064272c89305f406dd20fb89758b56", "score": "0.59122694", "text": "function getSummary()\n {\n }", "title": "" }, { "docid": "8759205372530bd43f8f4202b036ecb1", "score": "0.59072137", "text": "public function get_contents(){\n return $this->session->get('cart');\n }", "title": "" }, { "docid": "b05a1c29856433513fb93001ce008b25", "score": "0.5906542", "text": "public function total(){ \n return $this->basket_contents['basket_total']; \n }", "title": "" }, { "docid": "3b5e522cf4fbf66179a637f36e53f2c5", "score": "0.589643", "text": "function total_items($cart){\n\t\t$items = 0;\n\t\tif(is_array($cart)){\n\t\t\tforeach($cart as $isbn => $qty){\n\t\t\t\t$items += $qty;\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "d57fc623a6faf775488369bd2f1ab272", "score": "0.58941317", "text": "public function summary(){\r\n\t\t$summary = new Summary();\r\n\t\treturn $summary->getAccounts();\r\n\t}", "title": "" }, { "docid": "3858a87d7f495ab38b32cb6f48745a19", "score": "0.5887468", "text": "function _getData()\r\n {\r\n $state = $this->_getState();\r\n\t\t$model = $this->_getModel();\r\n\r\n\t\t$query = $model->getQuery();\r\n\r\n\t\t // group results by product ID\r\n $query->group('tbl.product_id');\r\n\r\n\t\t// select the total carts\r\n\t\t$field = array();\r\n $field[] = \" COUNT(*) AS total_carts \";\r\n $query->select( $field );\r\n\r\n // order results by the total sales\r\n $query->order('total_carts DESC');\r\n\r\n $model->setQuery( $query );\r\n\t\t$data = $model->getList();\r\n\t\treturn $data;\r\n }", "title": "" }, { "docid": "a30a4a38a6ab61faed4944d09f6a3a64", "score": "0.5885927", "text": "function total_items($cart){\n\t\t$items = 0;\n\t\tif(is_array($cart)){\n\t\t\tforeach($cart as $pid => $qty){\n\t\t\t\t$items += $qty;\n\t\t\t}\n\t\t}\n\t\treturn $items;\n\t}", "title": "" }, { "docid": "81ea3c7b611d947fea7101685818754e", "score": "0.5880247", "text": "public function getShoppingCart()\n\t{\n\t\t$content = (isset($_SESSION['cart'])) ? $_SESSION['cart'] : array();\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "80921c0d43a4b46d970bfe2f1fac1f3f", "score": "0.5879206", "text": "public function index()\n {\n $cart_items = Cart::content();\n $saved_items = Cart::instance('saveForLater')->content();\n $recommended = $cart_items->first()->model->recommended(4)->get();\n\n $totals = $this->calculateTotals();\n return view('cart', compact('recommended', 'cart_items', 'saved_items', 'totals'));\n }", "title": "" }, { "docid": "58e191fa6ed448c6ed6a46fbdf3f9fee", "score": "0.58696043", "text": "function summary()\r\n {\r\n $this->_f3->set('title', 'Summary');\r\n\r\n //Save the cart and orders to the database\r\n $cartId = $GLOBALS['dataLayer']->saveCart($_SESSION['cart']);\r\n $this->_f3->set('cartId', $cartId);\r\n\r\n //Display the second orders form\r\n $view = new Template();\r\n echo $view->render('views/summary.html');\r\n\r\n //This might be problematic\r\n unset($_SESSION['orders']);\r\n }", "title": "" }, { "docid": "450859e5101da0ec3e328decb698a2c1", "score": "0.5862397", "text": "public function getListCart()\n {\n $shoppings = \\Cart::content();\n\n // // // //tra ve view hien thi\n return view ('home.list_cart', [\n 'shoppings' => $shoppings,\n 'nameCart' => $nameCart = 'Trang giỏ hàng của bạn',\n\n ]);\n }", "title": "" }, { "docid": "618b7e4e5dd276272a0eb50507179eba", "score": "0.58618265", "text": "public function cart()\n\t{\n Dolivel::emptyTheCart();\n Dolivel::addToCart('Nouveau produit');\n Dolivel::addToCart('Rideaux', 2);\n Dolivel::addToCart('Rideaux', 3);\n return Dolivel::showCart();\n }", "title": "" }, { "docid": "8221a20cfbccbddd98f23ce375ad12c5", "score": "0.58591545", "text": "public function all(){\r\n return $this->getCart()->items;\r\n return $this;\r\n }", "title": "" }, { "docid": "2ae844144b08294f87bb9d1237382a75", "score": "0.58494943", "text": "public static function info()\n {\n $basket = self::order();\n $count = 0;\n $price = 0;\n foreach ($basket as $elem) {\n if (isset($elem['amount']) && isset($elem['price'])) {\n $count += $elem['amount'];\n $price += $elem['amount'] * $elem['price'];\n }\n }\n\n return [\n 'count' => $count,\n 'price' => $price,\n ];\n }", "title": "" }, { "docid": "598f32cde790061a634747af4500690f", "score": "0.5840306", "text": "public function getCartItems() \n {\n $endTime = time() - $this->cartItemLifeTime;\n $obj = self::find()\n ->where(['user_session_id' => $this->userSessionId]) \n ->andWhere(['>', 'created_at', $endTime]) \n ->all();\n\n if ($obj !== null && !empty($obj)) {\n return $obj;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "8718fddb9386267ef2c3fce0e1af7238", "score": "0.58362716", "text": "public function showCart()\n {\n\n $user = \\Auth::user();\n\n /*\n * $suggest-listed keeps tracking listed products to control the suggestion view\n */\n Session::forget('suggest-listed');\n\n /**\n * $totalAmount saves the shopping cart total amount.\n *\n * @var decimal\n */\n $totalAmount = 0;\n\n /**\n * $totalItems saves the shopping cart total items.\n *\n * @var int\n */\n $totalItems = 0;\n\n if ($user) {\n /**\n * $cart has all the shopping cart information, which comes from an type of order called \"cart\".\n *\n * @var [type]\n */\n $cart = Order::ofType('cart')->where('user_id', $user->id)->with('details')->first();\n\n /**\n * $laterCart has all the shopping cart (saved for later) information, which comes from an type of order called \"later\".\n *\n * @var [type]\n */\n $laterCart = Order::ofType('later')->where('user_id', $user->id)->with('details')->first();\n\n /**\n * $validation_message keeps the message for those items that has a different stock since they were added to a shopping cart.\n *\n * @var array\n */\n $validation_message = [];\n\n if ($cart) {\n foreach ($cart->details as $detail) {\n $totalItems += $detail->quantity;\n $totalAmount += ($detail->quantity * $detail->price);\n\n if ($detail->quantity > $detail->product->stock) {\n $detail->quantity = $detail->product->stock;\n $detail->save();\n $validation_message[] = trans('store.cart_view.item_changed_stock1').' '.$detail->product->name.' '.trans('store.cart_view.item_changed_stock2');\n }\n\n //saving the product listed to not show it on suggestion view\n Session::push('suggest-listed', $detail->product_id);\n }\n\n //saving the changes made to suggest-listed session var\n Session::save();\n }\n\n //if there are validation messages to show, they'll be saved in message session var\n\n if (count($validation_message) > 0) {\n Session::push('message', $validation_message);\n }\n } else {\n /**\n * $session_cart keeps saved all the items added to the shopping cart befor the user ins logged.\n *\n * @var [array]\n */\n $session_cart = Session::get('user.cart');\n\n if (is_array($session_cart)) {\n $session_details = Session::get('user.cart_content');\n\n $cart_details = [];\n\n $validation_message = [];\n\n foreach ($session_details as $id => $quantity) {\n $product = Product::find($id);\n\n $totalAmount += $product->price;\n\n if ($quantity > $product->stock) {\n $quantity = $product->stock;\n\n $validation_message[] = trans('store.cart_view.item_changed_stock1').' '.$product->name.' '.trans('store.cart_view.item_changed_stock2');\n }\n\n $cart_details[] = [\n 'id' => 0,\n 'order_id' => 0,\n 'product_id' => $product->id,\n 'price' => $product->price,\n 'quantity' => $quantity,\n 'product' => [\n 'id' => $product->id,\n 'name' => $product->name,\n 'description' => $product->description,\n 'price' => $product->price,\n 'stock' => $product->stock,\n 'type' => $product->type,\n 'features' => [\n 'images' => [\n $product->FirstImage,\n ],\n ],\n ],\n ];\n\n Session::push('suggest-listed', $product->id);\n }\n\n if (count($validation_message) > 0) {\n Session::push('message', $validation_message);\n }\n\n $cart = [\n 'id' => 0,\n 'user_id' => 0,\n 'details' => $cart_details,\n ];\n\n $totalItems = count($cart_details);\n } else {\n $cart = [\n 'id' => 0,\n 'user_id' => 0,\n 'details' => [],\n ];\n }\n\n $laterCart = [];\n }\n\n $panel = [\n 'center' => ['width' => '12'],\n ];\n\n //suggestions based on cart content\n $suggestions = ProductsController::getSuggestions(['preferences_key' => Session::get('suggest-listed'), 'limit' => 4]);\n\n Session::forget('suggest-listed');\n\n return view('orders.cart', compact('cart', 'user', 'panel', 'laterCart', 'suggestions', 'totalItems', 'totalAmount'));\n }", "title": "" }, { "docid": "818ba393c2a38478d7cd1f5d60ff2f60", "score": "0.58359873", "text": "protected function extractItemsInfo()\n {\n $return = [];\n $quote = $this->getQuote();\n\n foreach ($quote->getAllItems() as $quoteItem) {\n if ($this->shouldSendQuoteItemToKatapult($quoteItem)) {\n $item = $this->convertQuoteItemToKatapultItem($quoteItem);\n array_push($return, $item);\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "f414c0f24596b009d3692b9411494c72", "score": "0.58349437", "text": "private function getCartData()\n\t{\n\t\t$products = [];\n\n\t\tforeach ($this->cartProducts as $cartProduct) {\n\t\t\ttry {\n\t\t\t\t$product = $this->product->getById($cartProduct['id']);\n\t\t\t\t$product['price'] = $this->formatAmount($product['price']);\n\t\t\t\t$product['deleteLink'] = \"?action=clear_cart&id={$cartProduct['id']}\";\n\t\t\t\t$product['quantity'] = $cartProduct['quantity'];\n\t\t\t} catch (Exception $e) {\n\t\t\t\t// Logging error for future analysis\n\t\t\t\t// In case if a product is not found, we skip that error, in case if the product doesn't exist anymore\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$products[] = $product;\n\t\t}\n\n\t\t$combinedCart = [\n\t\t\t'cartList' => $products,\n\t\t\t'cartTotal' => $this->formatAmount($_SESSION['cartTotal'] ?? 0),\n\t\t];\n\n\t\treturn $combinedCart;\n\t}", "title": "" }, { "docid": "bc9c1f77ad9b3d7131683d06b94ac72f", "score": "0.5832573", "text": "public function display_cart()\n {\n $cart = (new CartManager())->getHtmlData();\n }", "title": "" }, { "docid": "fe726e0b87bee9d62b10ca7145522ae4", "score": "0.5828243", "text": "public function Cart()\n {\n return ShoppingCart::current_order();\n }", "title": "" }, { "docid": "c373a82dee04d8c474dddea7998a2c4d", "score": "0.5822865", "text": "public function summarizeGoodsList()\n {\n $amount = 0;\n if (!is_array($this->goodsList)) {\n return $amount;\n }\n foreach ($this->goodsList as $goods) {\n $price = $goods['goods']['price'];\n\n // Add VAT if price is Excluding VAT\n if (($goods['goods']['flags'] & KlarnaFlags::INC_VAT) === 0) {\n $vat = $goods['goods']['vat'] / 100.0;\n $price *= (1.0 + $vat);\n }\n\n // Reduce discounts\n if ($goods['goods']['discount'] > 0) {\n $discount = $goods['goods']['discount'] / 100.0;\n $price *= (1.0 - $discount);\n }\n\n $amount += $price * (int)$goods['qty'];\n }\n return $amount;\n }", "title": "" }, { "docid": "84a9c56d8a1117c55ba1084b071576c6", "score": "0.5815004", "text": "function count_cart(){\n\t\t$output = '';\n\t\t$no = 0;\n $rows = count($this->cart->contents());\n\t\t\n\t\t$output .= '\n\t\t\t\n\t\t\t<h4>You Have ' .$rows. ' Items In Your Cart.</h4>\n\t\t';\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "ae3a8d0c4be2c0918be43bb7d95e5f57", "score": "0.58102304", "text": "public function displayInfoByCart()\n\t\t{\n\t\t\t$order_id = (int)Tools::getValue('id_order');\n\t\t\tif ($order_id == 0)\n\t\t\t\treturn '';\n\n\t\t\t$this->smarty->assign(array(\n\t\t\t\t'order_id' => $order_id,\n\t\t\t\t'products' => BoxdropOrder::getProductsToBeShipped($order_id),\n\t\t\t\t'shipments' => BoxdropOrderShipment::getByOrderId($order_id),\n\t\t\t\t'tpl_path' => _PS_MODULE_DIR_.'boxdropshipment/views/templates/hook/'\n\t\t\t));\n\n\t\t\treturn $this->display(__FILE__, 'adminOrderDetailShipping.tpl');\n\t\t}", "title": "" }, { "docid": "886d73cdca1a4eb44b41122559ece590", "score": "0.58093685", "text": "function show_cart(){\n\t\tif (count($this->cart->contents()) != null) {\n\t\t\t\n\t\t$output = '';\n\t\t$no = 0;\n\t\t\n\t\tforeach ($this->cart->contents() as $items) {\t\t\t\n\t\t\t$no++;\n\t\t\t$output .='\n\t\t\t\t<tr>\n\t\t\t\t\t<th scope=\"row\">'.$no.'</th>\n\t\t\t\t\t<td>'.$items['name'].'</td>\n\t\t\t\t\t<td>'.number_format($items['price']).'</td>\n\t\t\t\t\t<td>x'.$items['qty'].'</td>\n\t\t\t\t\t<td>'.number_format($items['subtotal']).'</td>\n\t\t\t\t\t<td><button type=\"button\" id=\"'.$items['rowid'].'\" class=\"hapus_cart btn btn-danger btn-xs\"><i class=\"fa fa-trash-o\"></i></button></td>\n\t\t\t\t</tr>\n\t\t\t';\n\t\t}\n\t\t$output .= '\n\t\t\t<tr>\n\t\t\t\t<th colspan=\"3\">Total</th>\n\t\t\t\t<th colspan=\"4\">'.'Rp '.number_format($this->cart->total()).'</th>\n\t\t\t\t\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<th colspan=\"3\"></th>\n\t\t\t<th colspan=\"5\">\n\t\t\t<button type=\"button\" class=\"btn btn-success btn-sm\" data-toggle=\"modal\" data-target=\"#CalenderModalNew\">Proses</button>\n\t\t\t</th>\n\t\t\t</tr>\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t';\n\n\t} else {\n\t\t$output = '';\n\t\t$no = 0;\n\t}\n\t\treturn $output;\n\t\n\n\t}", "title": "" }, { "docid": "834856085416a300184275749807b48f", "score": "0.5789822", "text": "public function listProducts()\n {\n // todo: Here I should implement currency conversion logic but I can't be bothered ayy lmao\n // please don't kill me with jet fuel yet\n\n $data = $this->cache->get($this->cacheKey);\n\n $output =\n [\n 'items' => [],\n 'total' => 0,\n ];\n\n $output['items'] += $data->items;\n\n foreach($output['items'] as $item)\n {\n $output['total'] += $item->price;\n }\n\n $this->render($output);\n }", "title": "" }, { "docid": "213dbfaff58ba897107876c60625fc90", "score": "0.5787993", "text": "function getCartVlSubTotal(){\n\n $cart = Cart::getFromSession(); //pegar o carrinho que esta na sessao\n\n $totals = $cart->getProductsTotals(); //soma todos os valores do carrinho\n\n return formatPrice($totals['vlprice']); //retornar o valor ja formatado\n}", "title": "" }, { "docid": "e40c481c8210d13919b80bd64397a9df", "score": "0.57790893", "text": "public function index()\n {\n $carts = Cart::get();\n return $carts;\n }", "title": "" }, { "docid": "0e696bff35338067b03639f59bbcefea", "score": "0.57762253", "text": "public function show_cart(Request $request)\n {\n $carts=$request->session()->get(\"cart\");\n if(!empty($carts)) {\n $products = array();\n for ($i = 0; $i < count($carts); $i++) {\n $product = Product::find($carts[$i][\"pid\"]);\n\n array_push($products, $product);\n }\n $total = array();\n foreach ($carts as $cart) {\n array_push($total, $cart['total']);\n }\n $t = array_sum($total);\n return view(\"cart\",compact('products','t'));\n }\n else\n {\n return view(\"cart\",compact('products','t'));\n }\n\n }", "title": "" } ]
ef779cd55cd884ed96dcfbf8659431c8
Put the webserver host email here.
[ { "docid": "bd93732e9cd8f7dfc9c3a400db6d8b06", "score": "0.0", "text": "function withdrawapplication_mail($username, $jobid)\n {\n date_default_timezone_set('Asia/Singapore');\n $datetime = date('d/m/Y, h:i:sa');\n $sender = $GLOBALS['sender'];\n $conn = $GLOBALS['conn'];\n $usertable = $GLOBALS['usertable'];\n $joblist = $GLOBALS['joblist'];\n\n $query = \"SELECT fullname,email FROM $usertable WHERE username='$username'\";\n $row = mysqli_fetch_assoc($conn->query($query));\n $email = $row['email'];\n $fullname = $row['fullname'];\n $query = \"SELECT company,position FROM $joblist WHERE jobid='$jobid'\";\n $row = mysqli_fetch_assoc($conn->query($query));\n\n $to = $email;\n $subject = 'Job Application Withdrawal';\n $message =\n \"Hi \".$fullname.\",\\r\\n\\r\\n\n You have withdrawn your application from the following job:\\r\\n\n Company: \".$row['company'].\"\\r\\n\n Position: \".$row['position'].\"\\r\\n\n Withdrawal Date: \".$datetime.\" Asia/Singapore\\r\\n\\r\\n\n Thank you for using our service!\\r\\n\\r\\n\n Jobhunters Team\";\n $headers = 'From: ' .$sender. \"\\r\\n\" .\n 'Reply-To: '.$sender. \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n mail($to, $subject, $message, $headers,'-f'.$sender);\n }", "title": "" } ]
[ { "docid": "c219e4655a2b8524ecdb13086234b2ec", "score": "0.6786826", "text": "public function getMailHost()\n {\n return $this->mail_host;\n }", "title": "" }, { "docid": "e86f598271e970f3ddaf3e96fdaf1ffb", "score": "0.6678493", "text": "public function email();", "title": "" }, { "docid": "845e188791466455983fea1b57972039", "score": "0.65604717", "text": "private function mailClient()\n {\n //TODO Send email to client about offer\n }", "title": "" }, { "docid": "5ba21ef6a44ccec89f82909bfd43cc10", "score": "0.6514328", "text": "function admin_email() {\n return apply_filters( 'dokan_email_admin_mail', get_option( 'admin_email' ) );\n }", "title": "" }, { "docid": "dded29b8180faa21446fc9dd31b58539", "score": "0.64719886", "text": "public static function createDefaultEmail()\n {\n $fulldom = Director::absoluteBaseURL();\n $host = parse_url($fulldom, PHP_URL_HOST);\n if (!$host) {\n $host = 'localhost';\n }\n $dom = str_replace('www.', '', $host);\n\n return 'postmaster@' . $dom;\n }", "title": "" }, { "docid": "844488c3a4286f7e0f3b9651ce14a30a", "score": "0.633741", "text": "public function getMailUrl()\n {\n return Mage::getStoreConfig('hsmedia/hsmediashare/webmail');\n }", "title": "" }, { "docid": "0f6a058b4bf38e543706f3ea8e8a7417", "score": "0.6299125", "text": "public function mailTo()\n\t{\n\t\t//TODO \n\t}", "title": "" }, { "docid": "058f79042b6f6a160fb45aaff33cc8e9", "score": "0.6230045", "text": "private function _email(): string\n {\n /* @noinspection PhpMethodParametersCountMismatchInspection */\n return App::environment('local') ?\n '[email protected]' : '[email protected]';\n }", "title": "" }, { "docid": "7f2216f7efea6ef4e644fbe779dfb629", "score": "0.6203114", "text": "function noreply_email($host)\n{\n return \"no-reply@\" . $host;\n}", "title": "" }, { "docid": "4a2568374053a17a5886030b6985af4b", "score": "0.6183554", "text": "function give_email_admin_email() {\n\n\t$admin_email = give_get_option( 'contact_admin_email' );\n\n\tif ( empty( $admin_email ) ) {\n\t\tgive_delete_option( 'contact_admin_email' );\n\t}\n\n\treturn ( ! empty( $admin_email ) )\n\t\t? $admin_email\n\t\t: get_bloginfo( 'admin_email' );\n}", "title": "" }, { "docid": "b3aa7ebe814c19050ffe9e6a37a584fb", "score": "0.61826575", "text": "public function email()\n\t{\n\t\t$this->add('email', 'required', true, 'Email is required.');\n\t\t$this->add('email', 'regexp', '#^[^\\W][a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\@[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)*\\.[a-zA-Z]{2,4}$#', 'Bad Email format.');\n\t\t$this->add('email', 'max', 30, 'Bad Email length, no more than 30 characters.');\n\n\t\t$this->setInformation('email', 'Email format, no more than 30 characters...');\n\t}", "title": "" }, { "docid": "ce9258c62d29e70ef9ce7cc4914aba2e", "score": "0.6167228", "text": "public function sendNotifyHostEmail($data)\n\t{\n\t\t$to = $data['email_address'];\n\t\t$subject = $data['subject'];\n\t\t$details = \"\";\n\t\t\n\t\t// Create Host Notification\n\t\t// Email 18 – To the host: an employee in your WinterFest group is no longer with the company\n\t\tif ($data['email_type'] = 'terminated')\n\t\t{\n\t\t\t$details .= <<<OJAMBO\n\t\t\tAn employee in your WinterFest group is no longer with the company and has been removed from your group by the WinterFest Event team. <br /><br />\n\t\t\tIf you have any questions, please contact us via the WinterFest mailbox [email protected] <br /><br />\n\t\t\tLooking FastForward to seeing you there! <br /><br />\n\t\t\tKPMG WinterFest Crew<br />\nOJAMBO;\n\t\t}\n\t\t\n\t\t// Create Mime Boundry\n\t\t//$mime_boundary = \"Winterfest Waiting List-\".md5(time());\n\t\t \n\t\t// Headers\n\t\t$headers = \"\";\n\t\t$headers .= \"MIME-Version: 1.0\\n\";\n\t\t$headers .= \"Content-Type: text/html; charset=UTF-8\\n\";\n\n\t\t\n\t\t// Email Body\n\t\t$message = \"\";\n\t\t//$message .= \"--{$mime_boundary}\\n\";\n\t\t//$message .= \"Content-Type: text/html; charset=UTF-8\\n\";\n\t\t//$message .= \"Content-Transfer-Encoding: 8bit\\n\\n\";\n\n\t\t$message .= \"<html>\\n\";\n\t\t$message .= \"<body>\\n\";\n\t\t$message .= \"<p>{$details}</p>\\r\\n\";\n\t\t$message .= \"</body>\\r\\n\";\n\t\t$message .= \"</html>\\r\\n\";\n\n\t\t\n\t\tif ( wp_mail($to, $subject, $message, $headers) )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "6c82d40865e3ca78981b650294f9178f", "score": "0.61537373", "text": "function initSendmail() {\n\t\tif (!isset($this->data[\"server\"])) /* Default to localhost. */\n\t\t\t$this->setServer(\"localhost\");\n\t\tif (!isset($this->data[\"port\"])) /* Default to port 25. */\n\t\t\t$this->setPort(25);\n\t\tif (!isset($this->data[\"timeout\"])) /* Default to 45 seconds. */\n\t\t\t$this->setTimeout(45);\n\n\n\t\t/* Setup items 0 - 99 that will be needed to get through SMTP negotiation. */\n\t\t$serverName = $this->data[\"hostname\"];\n\t\tif (!$serverName)\n\t\t\t$serverName = getenv(\"SERVER_NAME\");\n\t\tif (!$serverName)\n\t\t\t$serverName = \"unknown\";\n\t\t$this->data[0] = array(0 => sprintf(\"HELO %s\\r\\n\", $serverName), 1 => 250);\n\n\t\t$this->data[1] = array(0 => sprintf(\"MAIL FROM: %s\\r\\n\", $this->data[103]), 1 => 250);\n\n\t\t$this->data[2] = array(0 => sprintf(\"RCPT TO: %s\\r\\n\", $this->data[104]), 1 => 250);\n\n\t\tif (isset($this->data[105])) {\n\t\t\tif (is_string($this->data[105])) {\n\t\t\t\t$this->data[3] = array(0 => sprintf(\"RCPT TO: %s\\r\\n\", $this->data[105]), 1 => 250);\n\t\t\t} else {\n\t\t\t\treset($this->data[105]);\n\t\t\t\twhile(list(, $cc) = each($this->data[105])) {\n\t\t\t\t\t$ccArray[] = sprintf(\"RCPT TO: %s\\r\\n\", trim($cc));\n\t\t\t\t}\n\t\t\t\t$this->data[3] = array(0 => $ccArray, 1 => 250);\n\t\t\t}\n\t\t}\n\n\t\tif (isset($this->data[\"bcc\"])) {\n\t\t\tif (is_string($this->data[\"bcc\"])) {\n\t\t\t\t$this->data[4] = array(0 => sprintf(\"RCPT TO: %s\\r\\n\", $this->data[\"bcc\"]), 1 => 250);\n\t\t\t} else {\n\t\t\t\treset($this->data[\"bcc\"]);\n\t\t\t\twhile(list(, $bcc) = each($this->data[\"bcc\"])) {\n\t\t\t\t\t$bccArray[] = sprintf(\"RCPT TO: %s\\r\\n\", trim($bcc));\n\t\t\t\t}\n\t\t\t\t$this->data[4] = array(0 => $bccArray, 1 => 250);\n\t\t\t}\n\t\t}\n\n\t\t$this->data[99] = array(0 => \"DATA\\r\\n\", 1 => 354);\n\n\n\t\t/* Setup items 100 - 199 for user data. */\n\t\t$this->data[100] = sprintf(\"Date: %s %d %s\\r\\n\", date(\"D, j M Y G:i:s\"), date(\"Z\") / 36, date(\"(T)\"));\n\n\t\t$this->data[101] = sprintf(\"X-Mailer: %s\\r\\n\", \"DGS SMTP v0.9.1 <http://www.digitalgenesis.com>\");\n\n\t\t$this->data[103] = sprintf(\"From: %s\\r\\n\", $this->data[103]);\n\n\t\t$this->data[104] = sprintf(\"To: %s\\r\\n\", $this->data[104]);\n\n\t\tif (isset($this->data[105])) {\n\t\t\tif (is_string($this->data[105])) {\n\t\t\t\t$cc = $this->data[105];\n\t\t\t} else {\n\t\t\t\t$cc = $this->joinAddresses($this->data[105]);\t\n\t\t\t}\n\t\t\t$this->data[105] = sprintf(\"Cc: %s\\r\\n\", $cc);\n\t\t}\n\n\t\tif (isset($this->data[106])) {\n\t\t\tif (is_string($this->data[106])) {\n\t\t\t\t$replyTo = $this->data[106];\n\t\t\t} else {\n\t\t\t\t$replyTo = $this->joinAddresses($this->data[106]);\t\n\t\t\t}\n\t\t\t$this->data[106] = sprintf(\"Reply-To: %s\\r\\n\", $replyTo);\n\t\t\t$this->data[106] .= \"MIME-Version: 1.0\\r\\nContent-Type: text/html; charset=iso-8859-1\\r\\n\";\n\t\t}\n\n\n /* Setup items 200 - 299 for SMTP close. */\n\t\t$this->data[200] = array(0 => \"\\r\\n.\\r\\n\", 1 => 250);\n\n\t\t$this->data[201] = array(0 => \"QUIT\\r\\n\", 1 => 221);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8c3e23140f6ffef530460a1998907d0b", "score": "0.613234", "text": "public static\r\n\r\n\tfunction bookaroom_admin_email() {\t\t$externals = self::getExternalsAdmin();\r\n\r\n\t\tswitch ( $externals[ 'action' ] ) {\r\n\t\t\tcase 'testEmail':\r\n\t\t\t\tif ( ( $errors = self::checkEmailErrors( $externals ) ) !== FALSE ) {\r\n\t\t\t\t\tself::showEmailAdmin( $externals, $errors );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself::updateEmail( $externals );\r\n\t\t\t\t\tself::testEmail( $externals[ 'bookaroom_alertEmail' ] );\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'updateAlertEmail':\r\n\t\t\t\t# check for valid email\r\n\t\t\t\tif ( ( $errors = self::checkEmailErrors( $externals ) ) !== FALSE ) {\r\n\t\t\t\t\tself::showEmailAdmin( $externals, $errors );\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tself::updateEmail( $externals );\r\n\t\t\t\t\tself::showEmailAdminSuccess();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\tdefault:\r\n\t\t\t\t$externals = self::getDefaults();\r\n\t\t\t\tself::showEmailAdmin( $externals );\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2d585f4d9292925fd0ac596de45bc583", "score": "0.6127012", "text": "function _getEmailTo()\n\t\t{\n\t\t\treturn Configure::read('TD_CONFIG.NOTIFICACIONES.PLATAFORMA.EMAIL.SMTP.to');\n\t\t}", "title": "" }, { "docid": "c5d7195c32e50e2f54a0bc21b014bfc0", "score": "0.61151487", "text": "public function makeEmail()\n {\n $message = \"This is \" . str_replace(\"@\",\"\", $this->mail_postfix) . \", the limited beta service portal to \" . ucwords($this->word) . \".\\r\\n\";\n $message .= \"Only the subject line, any \" . $this->mail_postfix . \" email addresses in the address and the return email address is processed by \" . ucwords($this->word) . \".\\r\\n\";\n\n $message .= 'For a full statement of our privacy policy, please goto to <a href=\"' . $this->web_prefix . 'privacy\">' . $this->web_prefix . 'privacy</a>';\n\n $this->thing_report['email'] = $message;\n\n return;\n }", "title": "" }, { "docid": "885c14ed8fad99e1b2b6f1d7d6c8be72", "score": "0.60900766", "text": "function test_email()\n { \n global $IN, $DB, $REGX, $LANG, $TMPL, $FNS, $PREFS, $LOC;\n\n \n\t\t\t\tif ( ! class_exists('EEmail'))\n\t\t\t\t{\n\t\t\t\t\trequire PATH_CORE.'core.email'.EXT;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$email_msg = 'Cron executed at '. date(\"M d, Y H:i\", ($LOC->server_now) );;\n \n \n\t\t\t\t$email = new EEmail;\n\n\t\t\t\t$email->initialize();\t\n\t\t\t\t$email->wordwrap = true;\n\t\t\t\t$email->from($PREFS->ini('webmaster_email'), $PREFS->ini('webmaster_name'));\t\n\t\t\t\t$email->to('[email protected]');\n\t\t\t\t$email->reply_to($PREFS->ini('webmaster_email'));\t\t\t\t\t \n\t\t\t\t$email->subject('cron works');\t\n\t\t\t\t$email->message($REGX->entities_to_ascii($email_msg));\t\t\n\t\t\t\t$email->Send();\n }", "title": "" }, { "docid": "a6ba2f1b959762166b2b2a9fe8127cf7", "score": "0.60618246", "text": "function email_error() {\n\t\tglobal $strict, $core_settings, $core_error,$db;\n\t\t$serverKeys = array('DOCUMENT_ROOT','HTTP_COOKIE','HTTP_HOST','HTTP_REFERER','HTTP_USER_AGENT','QUERY_STRING','REDIRECT_STATUS','REDIRECT_URL','REMOTE_ADDR','REMOTE_PORT','REQUEST_METHOD','REQUEST_URI','SCRIPT_FILENAME','SCRIPT_NAME','SERVER_ADDR','SERVER_ADMIN','SERVER_NAME','SERVER_PORT','SERVER_SOFTWARE','REQUEST_TIME');\n\t\t$preBox = \"<pre style='display:block;margin:10px auto;border:1px solid #ddd;padding:4px;border-radius:4px;color:#404BD8;background:#e8e8e8'>\";\n\t\t$core_errorMail = \"<html><style>body{font-family:'Verdana';}b{color:#f00;}pre b{color:#111;}h1,h2{font-family:'Gerogia','Book Antiqua';}</style><body><h1>Server error on <b>{$_SERVER['HTTP_HOST']}</b></h1><small>Date: \".date(\"H:m jS M Y\",time()).\"</small><br/>\";\n\t\t\n\t\t$count = 0;\n\t\t$core_errorMail .= \"<b>{$core_error['file']}</b> on line <b>{$core_error['line']}</b>:<br/>\";\n\t\t\n\t\tif($core_settings['last_error_type'] == \"PDO\") {\n\t\t\t$core_errorMail .= \"<br/><b>Last Error:</b> {$db->error}<br/><br/>\n\t\t\t\t\t\t\t\t<b>Error Code:</b> \".nl2br($core_error['message']).\"<br/><br/>\n\t\t\t\t\t\t\t\t<b>SQL query:</b>\n\t\t\t\t\t\t\t\t{$preBox}\".trim(preg_replace('/\\t+/', '', $db->sql)).\"</pre>\";\n\t\t} else {\n\t\t\t$core_errorMail .= \"<b>{$core_error['message']}</b>\";\n\t\t}\n\t\t\n\t\t$core_errorMail .= \"<br/><hr><br/>\";\n\t\t\t\t\t\t\t\t\t\t\t\n\t\tif($_SERVER) {\n\t\t\t$core_errorMail .= \"<h2>Server Variables</h2>{$preBox}\";\n\t\t\tforeach($_SERVER as $key => $val) {\n\t\t\t\tif(in_array($key,$serverKeys)) {$core_errorMail .= \"<b>\".ucwords(strtolower(str_replace(\"_\",\" \",$key))).\":</b>&nbsp;{$val}<br/>\";}\t \n\t\t\t}\n\t\t\t$core_errorMail .= \"</pre>\";\n\t\t}\n\t\tif($_REQUEST) {\n\t\t\t$core_errorMail .= \"<h2>Request Variables</h2>{$preBox}\";\n\t\t\tforeach($_REQUEST as $key => $val) {\n\t\t\t\t$core_errorMail .= \"<b>{$key}:</b>&nbsp;{$val}<br/>\"; \n\t\t\t}\n\t\t\t$core_errorMail .= \"</pre>\";\n\t\t}\n\t\tif(debug_backtrace()) {\n\t\t\t$core_errorMail .= \"<h2>Debug Backtrace</h2>{$preBox}\";\n\t\t\t$count = 0;\n\t\t\tforeach(debug_backtrace() as $bt) {\n\t\t\t\tif(is_array($bt) && ($count > 0)) {\n\t\t\t\t\tif(!isset($bt['file'])) $bt['file'] = \"<unknown>\";\n\t\t\t\t\tif(!isset($bt['line'])) $bt['line'] = \"<unknown>\";\n\t\t\t\t\tif(!isset($bt['function'])) $bt['function'] = \"<unknown>\";\n\t\t\t\t\t$core_errorMail .= \"<b>{$bt['function']}()</b> caused an error in <b>{$bt['file']}</b> on line <b>{$bt['line']}</b>.<br/>\";\n\t\t\t\t}\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t$core_errorMail .= \"</pre>\";\n\t\t}\t\n\t\t$core_errorMail .= \"</body></html>\";\n\t\terror_log($core_errorMail,1,$core_settings['error_email'],\"subject:[{$_SERVER['HTTP_HOST']}]\\nContent-Type: text/html; charset=ISO-8859-1\");\t\n\t}", "title": "" }, { "docid": "25000291cb170b674c8a8b8f2c3c790d", "score": "0.60273284", "text": "private function notify(){\n\t$dt = date(\"Y-m-d H:i:s\");\n $serverMessage = \"Hi,<br/><br/>\".\"Please find below the server details exceeding threshold.\".$this->mailMessage;\n SendMail::send_email(self::EMAIL_TO, $serverMessage,\"Servers exceeding threshold - $dt\"); \n }", "title": "" }, { "docid": "7d56f1023186e032c21f1be51b5631f2", "score": "0.6020238", "text": "function bb2_email() {\n\treturn Settings::pluginGet(\"email\");\n}", "title": "" }, { "docid": "931afd19d89b13f4b2350ec9cd350563", "score": "0.6019479", "text": "function get_notify_email(){\n\t\treturn strlen($this->_notify_email) ? $this->_notify_email : $this->_default_notify_email; \n\t}", "title": "" }, { "docid": "f473c6f26deee6c4727ad4bb4e2ec923", "score": "0.60009325", "text": "function rns_get_daily_report_email() {\n\treturn 'E-mail: [email protected]';\n}", "title": "" }, { "docid": "8d3291f878fe9e892ec5e721d7ed0136", "score": "0.5998581", "text": "abstract protected function _sendmail();", "title": "" }, { "docid": "b3118ad40fea69174761e523eba7bfc1", "score": "0.5998197", "text": "private function sendMailtoAdmin()\n {\n $From = $this->mailData['SubmittedByEmail'] ;\n $To = Config::inst()->get($this->mailData['ExtensionType'], 'ReviewerEmail');\n $Subject = $this->mailData['Subject'];\n $email = new Email($From, $To, $Subject);\n $email->setTemplate('ExtensionSubmitted');\n $email->populateTemplate($this->mailData);\n $email->send();\n }", "title": "" }, { "docid": "7c53e20c2def89730d4c554d5f64d23c", "score": "0.59926665", "text": "public static function get_from_email() {\n\t\t$admin_email = get_option( 'admin_email' );\n\t\t$sitename = strtolower( $_SERVER['SERVER_NAME'] );\n\t\tif ( PirateForms_Util::is_localhost() ) {\n\t\t\treturn $admin_email;\n\t\t}\n\t\tif ( substr( $sitename, 0, 4 ) == 'www.' ) {\n\t\t\t$sitename = substr( $sitename, 4 );\n\t\t}\n\t\tif ( strpbrk( $admin_email, '@' ) == '@' . $sitename ) {\n\t\t\treturn $admin_email;\n\t\t}\n\n\t\treturn 'wordpress@' . $sitename;\n\t}", "title": "" }, { "docid": "1cebfd9ce11e0d93c0f29b57a391f245", "score": "0.598731", "text": "public function getEmail()\n\t{\n\t\t// {implementation code}\n\t}", "title": "" }, { "docid": "4779ddc092da204ce022f71be0a42593", "score": "0.5983099", "text": "function sp_email_configuration_header(){\n echo '<p>Configure e-mail settings below:</p>';\n }", "title": "" }, { "docid": "6c57464697abff956644943a2f50bf64", "score": "0.5982084", "text": "function internal_notify($err) {\r\n global $g_cfg;\r\n $ok = @mail($g_cfg[\"adminmail\"],'Internal notify on '.$_SERVER['HTTP_HOST'].' by '.$_SERVER[\"REMOTE_ADDR\"], $err, 'From: '.$g_cfg[\"supportmail\"]);\r\n return true;\r\n}", "title": "" }, { "docid": "d7be2518cb35044b78f3d213075a5a3d", "score": "0.596604", "text": "public function updateMail()\n { \n // is_cli_request() is provided by default input library of codeigniter\n if($this->input->is_cli_request())\n {\n //send email\n $this->Cron_Model->send_email();\n }\n else\n {\n show_404();\n }\n }", "title": "" }, { "docid": "ec9bbc3004d139abd9e0e2f92abc4437", "score": "0.59591514", "text": "public function sendImmediateEmail();", "title": "" }, { "docid": "e596b19125e1ba01a9a421ac04e12f1f", "score": "0.5950908", "text": "public function contact_email(){\n\t\t\n\t\t$result = $this->reqLib();\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "4cbc5d8ca85655b6611bdad9e774cdbc", "score": "0.5937749", "text": "public static function applySetting() {\n Yii::app()->mail->transportType = self::getItem(Settings::KEY_EMAIL_TRANSPORT_TYPE);\n Yii::app()->mail->transportOptions[DomainConst::KEY_HOST] = self::getItem(\n Settings::KEY_EMAIL_TRANSPORT_HOST);\n Yii::app()->mail->transportOptions[DomainConst::KEY_USERNAME] = self::getItem(\n Settings::KEY_EMAIL_TRANSPORT_USERNAME);\n Yii::app()->mail->transportOptions[DomainConst::KEY_PASSWORD] = self::getItem(\n Settings::KEY_EMAIL_TRANSPORT_PASSWORD);\n Yii::app()->mail->transportOptions[DomainConst::KEY_PORT] = self::getItem(\n Settings::KEY_EMAIL_TRANSPORT_PORT);\n Yii::app()->mail->transportOptions[DomainConst::KEY_ENCRYPTION] = self::getItem(\n Settings::KEY_EMAIL_TRANSPORT_ENCRYPTION);\n Yii::app()->name = self::getWebsiteName();\n }", "title": "" }, { "docid": "099d28ce52e0398990691833215b7ea7", "score": "0.59336346", "text": "protected function validateServerEmailSetting()\n {\n $request = $this->getRequest();\n $username = $this->getConfig('username');\n $password = $this->getConfig('password');\n $auth = strtolower($this->getConfig('auth'));\n \n if (!$request->getParam('store', false)) {\n if ($auth != 'none' && (empty($username) || empty($password))) {\n return $this->error(\n true,\n __('Please enter a valid username/password')\n );\n }\n }\n\n //SMTP server configuration\n $smtpHost = $this->getConfig('host');\n\n $smtpConf = [\n 'name' => 'localhost',\n 'port' => $this->getConfig('port')\n ];\n\n if ($auth != 'none') {\n $smtpConf['auth'] = $auth;\n $smtpConf['username'] = $username;\n $smtpConf['password'] = $password;\n }\n\n $ssl = $this->getConfig('protocol');\n if ($ssl != 'none') {\n $smtpConf['ssl'] = $ssl;\n }\n\n $transport = new Zend_Mail_Transport_Smtp($smtpHost, $smtpConf);\n\n $from = trim($this->getConfig('from_email'));\n $from = Zend_Validate::is($from, 'EmailAddress') ? $from : $username;\n $this->fromAddress = $from;\n\n //Create email\n $name = 'Test from Abzer SMTP';\n $mail = new Zend_Mail();\n $mail->setFrom($this->fromAddress, $name);\n $mail->addTo($this->toAddress, $this->toAddress);\n $mail->setSubject('Hello from Abzer SMTP');\n \n $htmlBody = $this->email->setTemplateVars(['hash' => $this->hash])->getEmailBody();\n\n $mail->setBodyHtml($htmlBody);\n\n $result = $this->error();\n\n try {\n if (!$mail->send($transport) instanceof Zend_Mail) {\n }\n } catch (Exception $e) {\n $result = $this->error(true, __($e->getMessage()));\n }\n\n return $result;\n }", "title": "" }, { "docid": "a65fdec84e6bf74529890ea836004c41", "score": "0.5933093", "text": "public function getEmail() {\n\t\t//\n\t}", "title": "" }, { "docid": "48ee98375681082079762296e41263db", "score": "0.5907768", "text": "public function sendEmail() {\n\t\t\techo \"E-mail to: \" . $this->to . \" Sent!\";\n\t\t}", "title": "" }, { "docid": "f077ddef1ea9cb056c4af435f8155341", "score": "0.59005284", "text": "function sendEmailNotification()\n {\n $link = $this->referer_page;\n $subject = 'Добавлен новый комментарий к ' . $this->referer_page;\n $body = 'Новый комментарий можете отмодерировать по ссылке <a href=\"/admin/index.php?module=71#id' . $this->id . '\"></a>';\n $SysSet = new SysSettings();\n $sett = $SysSet->GetGlobalSettings();\n $mail_admin = new Mail();\n $mail_admin->WordWrap = 500;\n $mail_admin->IsHTML(true);\n $mail_admin->Subject = $subject;\n $mail_admin->Body = $body;\n if (!empty($sett['mail_auto_emails'])) {\n $hosts = explode(\";\", $sett['mail_auto_emails']);\n for ($i = 0; $i < count($hosts); $i++) {\n //$arr_emails[$i]=$hosts[$i];\n $mail_admin->AddAddress($hosts[$i]);\n }\n //end for\n }\n $res_admin = $mail_admin->SendMail();\n return $res_admin;\n }", "title": "" }, { "docid": "576c570ce08ccf6cd1e4465346e8e6e9", "score": "0.589024", "text": "function _send_from() {\n $stored_name = variable_get('easysignup_admin', '');\n $site_name = variable_get('site_name', '');\n $sent_from = ($stored_name !== '') ? $stored_name : $site_name;\n return $sent_from;\n}", "title": "" }, { "docid": "a7f1b216f19e542b693644989bdeedd7", "score": "0.5865319", "text": "public function email()\n\t{\n\t\t$post['password'] = $this->password($this->config->item('min_password_length', 'ion_auth'));\n\t\t\n\t\t$this->email->clear();\n\t\t$this->email->from($this->config->item('noreply_mail'), $this->config->item('mail_name'));\n\t\t$this->email->to('[email protected]');\n\t\t$this->email->subject('Отладка');\n\t\t$this->email->message($post['password']);\n\t\t\n\t\tvar_dump($this->email->send());\n\t\techo $this->email->print_debugger();\n\t}", "title": "" }, { "docid": "e186bf7e766a2c3af11b731248b55338", "score": "0.5846314", "text": "public function setEmail()\n {\n $post = $this->postParams();\n\n $this->email = @$post['email'];\n }", "title": "" }, { "docid": "4458453599ab61ec1b7e183d62b94f8e", "score": "0.58372897", "text": "public function getDefaultEmail()\n {\n return Mage::getStoreConfig('emailtester/settings/default_email');\n }", "title": "" }, { "docid": "b7f07efc3d8824560034e59cbbe721d4", "score": "0.58300287", "text": "function sendemail($site,$from,$n,$auth) {\n $this->auth=$auth;\n $this->sitenumber=$site;\n $this->n=$n;\n $this->home=getenv(\"DOCUMENT_ROOT\");\n $this->from=$from;\n $this->from_dir=dirname($from);\n $this->path=substr($this->from,1,0);\n }", "title": "" }, { "docid": "3c5b392ff9e04c4908c423e004f0e902", "score": "0.5828682", "text": "function Sys_emails()\n {\n $this->mail_model->create_system_email_data();\n //print_r($this->mail_model->get_system_email_data_ex('admin_subscription_started'));\n //print_r($this->mail_model->get_system_email_data_ex('USER_TEMPLATES_NAMES'));\n //print_r($this->mail_model->get_system_email_data_ex('ADMIN_TEMPLATES_NAMES')); \n }", "title": "" }, { "docid": "926d80ee2cbe2866db42616292c44fbf", "score": "0.581882", "text": "function sendEmails()\n {\n global $TYPO3_CONF_VARS, $BE_USER, $LANG;\n $arSendMails\n = $TYPO3_CONF_VARS['SC_OPTIONS']['tx_nreasyworkspace_tcemain']['sendMails'];\n\n if (isset($arSendMails['to']) && is_array($arSendMails['to'])) {\n $emails = $arSendMails['to'];\n $message = sprintf($arSendMails['message'], $arSendMails['toreplace']);\n $message .= \"\\n\" . $LANG->getLL('message_notice');\n $message .= \"\\n\\n\" . $BE_USER->user['realName'];\n $message .= \"\\n\" . (\n $BE_USER->user['email'] != ''\n ? $BE_USER->user['email'] : ''\n );\n\n $returnPath = (\n $BE_USER->user['email'] != ''\n ? $BE_USER->user['realName'] . ' <' . $BE_USER->user['email'] . '>'\n : (\n $TYPO3_CONF_VARS['SYS']['siteemail'] != ''\n ? $TYPO3_CONF_VARS['SYS']['siteemail'] :\n '[email protected]'\n )\n );\n $ret = t3lib_div::plainMailEncoded(\n implode(',',$emails),\n $arSendMails['title'],\n trim($message),\n 'From: '.$returnPath.\"\\n\"\n );\n }\n }", "title": "" }, { "docid": "f00a9096118d13a89bc4e39c3655ea2b", "score": "0.5817185", "text": "function SS_Email_API()\n\t{\n\t\t$this->Email_API();\n\n\t\tif (defined('SENDSTUDIO_APPLICATION_URL')) {\n\t\t\t$url_parts = parse_url(SENDSTUDIO_APPLICATION_URL);\n\t\t\tif (isset($url_parts['host'])) {\n\t\t\t\t$this->message_id_server = $url_parts['host'];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bb555948573247524f66cf2c763c6fc3", "score": "0.5814916", "text": "public function get_host(){\n \t\treturn $this->host;\n \t}", "title": "" }, { "docid": "05f529057938d11cebadf3c9a9c3c81f", "score": "0.58126897", "text": "function _email_addr() {\n $stored_mail = variable_get('easysignup_mail', '');\n $site_mail = variable_get('site_mail', '');\n $email_addr = ($stored_mail !== '') ? $stored_mail : $site_mail;\n return $email_addr;\n}", "title": "" }, { "docid": "8d98aaea7dc5b075ad421339fe2d6a12", "score": "0.5811992", "text": "public function notify()\r\n\t{\r\n\t\techo \"Notifying via Email<br>\";\r\n\t}", "title": "" }, { "docid": "190e439ff9aab6808faecc4f4333b96e", "score": "0.5798931", "text": "public function smtp() {\r\n\t\t$admin_user_info = $this->Auth->User();\r\n\t\tif( $admin_user_info['group_id'] != '9' && $admin_user_info['group_id'] != '1' ){\r\n\t\t\t$this->Session->setFlash(__('You are not authorised to access this page'), 'session_message', array('class' => 'alert-error'));\r\n\t\t\t$this->redirect(array('controller' => 'adminhome', 'action' => 'login'));\r\n\t\t}\r\n\t\t//Check Master or admin user\r\n\r\n\t\t$this->layout = 'admin_default';\r\n\t\t$dealer_id = $this->Auth->User('dealer_id');\r\n\t\t$smtps = $this->Paginate('SmtpServer');\r\n $this->set('smtps', $smtps);\r\n }", "title": "" }, { "docid": "29b4786e2b4bd9e42444001d077988ca", "score": "0.57967883", "text": "public function getMailer();", "title": "" }, { "docid": "e33a78db257554c62daffb256d157f39", "score": "0.57940865", "text": "function getHost() { return $this->_host; }", "title": "" }, { "docid": "50d28564885bab1bd62130ad3d90de58", "score": "0.5777238", "text": "private function _createDefaultAdminEmail()\n {\n return [$this->client['client_prefix'] . '-' . 'admin' . $this->root];\n }", "title": "" }, { "docid": "7345608628bb84d1671091f4fcfa9703", "score": "0.5777202", "text": "public function actionEmail()\n {\n $item = $this->model->getItem($this->model->getSavedVariable('last_stored_visit'));\n $body = $this->getVsisitEmailBody($item);\n $subject = '!MPROVE - Performance Dialog Observations - ' . $item->name . ' / ' . date('d M Y', $item->date_added);\n $this->sendItemEmail($body, $subject);\n }", "title": "" }, { "docid": "0c41f3841c94830c75dcd0f099425fab", "score": "0.5775494", "text": "function __construct() {\n\t\t\t\tparent :: __construct();\n\t\t\t\t$this->adminemail = $this->get_admin_email();\n\t\t\t\t$this->adminmobile = $this->get_admin_mobile();\n\t\t\t\t$siteInfo = $this->get_siteTitleUrl();\n\t\t\t\t$this->sitetitle = $siteInfo['title'];\n\t\t\t\t$this->siteurl = addHttp($siteInfo['url']);\n\n\t\t\t\t$headFootShortcode = array(\"{siteTitle}\",\"{siteUrl}\");\n\t\t\t\t$headFootVals = array($this->sitetitle,$this->siteurl);\n\n\t\t\t\t$mailsettings = $this->get_mailserver();\n\t\t\t\t$this->mailHeader = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_header);\n\t\t\t\t$this->mailFooter = str_replace($headFootShortcode, $headFootVals, $mailsettings[0]->mail_footer);\n\t\t\t\t\n\t\t\t\tif ($mailsettings[0]->mail_default == \"smtp\") {\n\t\t\t\t\t\n\t\t\t\t\tif($mailsettings[0]->mail_secure == \"no\"){\n\t\t\t\t\t\t$secure = \"\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$secure = $mailsettings[0]->mail_secure.\"://\";\n\t\t\t\t\t}\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$config = Array('protocol' => 'smtp', 'charset' => 'utf-8',\n\t\t\t\t\t\t\t'smtp_host' => $secure.$mailsettings[0]->mail_hostname, \n\t\t\t\t\t\t\t'smtp_port' => $mailsettings[0]->mail_port, \n\t\t\t\t\t\t\t'smtp_user' => $mailsettings[0]->mail_username, 'smtp_pass' => $mailsettings[0]->mail_password, 'mailtype' => 'html', 'charset' => 'iso-8859-1', 'wordwrap' => TRUE,'smtp_auth' => TRUE);\n\t\t\t\t\t\t$this->load->library('email', $config);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\t$this->sendfrom = $mailsettings[0]->mail_fromemail;\n\t\t\t\t\t\t$this->load->library('email');\n\t\t\t\t\t\t$this->email->set_mailtype(\"html\");\n\t\t\t\t}\n\t\t\t\t\n\t\t}", "title": "" }, { "docid": "df88f3049b1c285e6fed759921120e73", "score": "0.57743603", "text": "public static function email($email) {\n \n }", "title": "" }, { "docid": "e4d9f99351bb67e5422e1b62c078f386", "score": "0.5767862", "text": "function check_emails(){\n if( version_compare( SP_VERSION, \"2.3.7\" ) >= 0 ){\n error_log( 'SP Emails: Checking e-mail now!' );\n SP_Fetch_Mail::sp_fetch_mail();\n }\n }", "title": "" }, { "docid": "8fae2c2ead004df14da6087823f64748", "score": "0.5767167", "text": "public function mailinfo333()\n {\n }", "title": "" }, { "docid": "1d5d7b01047e6a6edb950747c820a525", "score": "0.57555985", "text": "public function welcome()\n {\n $to = '[email protected]';\n $subject = \"welcome email\";\n $view = 'emails.welcome';\n $this->sendTo($to, $subject, $view);\n }", "title": "" }, { "docid": "13e3a5496757dc0f94b11d56d162921b", "score": "0.5744303", "text": "public function get_host()\n {\n return $this->host;\n }", "title": "" }, { "docid": "6fa2946b37055f615ecb9a6bd02be49c", "score": "0.5729057", "text": "public function emailAction()\r\n\t{\r\n\t\t// not logged in ?\r\n\t\tif (!$this->auth->hasIdentity()) {\r\n\t\t\tPetolio_Service_Util::saveRequest();\r\n\t\t\t$this->msg->messages[] = $this->translate->_(\"Please log in or sign up to access this page.\");\r\n\t\t\treturn $this->_helper->redirector('index', 'site');\r\n\t\t}\r\n\r\n\t\t// no user ?\r\n\t\tif (is_null($this->user->getId())) {\r\n\t\t\t$this->msg->messages[] = $this->translate->_(\"User does not exists.\");\r\n\t\t\treturn $this->_helper->redirector('index', 'site');\r\n\t\t}\r\n\r\n\t\t// init form\r\n\t\t$form = new Petolio_Form_Email();\r\n\t\t$form->populate($this->user->getMapper()->toArray($this->user));\r\n\t\t$this->view->form = $form;\r\n\r\n\t\t// did we submit form ? if not just return here\r\n\t\tif(!($this->request->isPost() && $this->request->getPost('submit')))\r\n\t\t\treturn false;\r\n\r\n\t\t// is the form valid ? if not just return here\r\n\t\tif(!$form->isValid($this->request->getPost()))\r\n\t\t\treturn false;\r\n\r\n\t\t// save new email settings\r\n\t\t$data = $form->getValues();\r\n\t\t$this->user->setOptions($data)->save(true, true);\r\n\r\n\t\t// logout\r\n\t\t$this->msg->messages[] = $this->translate->_(\"You have succesfully changed your email notifications.\");\r\n\t\treturn $this->_redirect('accounts/profile');\r\n\t}", "title": "" }, { "docid": "3c4ab622bd0869570608fa21ea345941", "score": "0.5724461", "text": "function envioMailInstiT(){\n\techo \"Soy envioMailInstiT\";\n}", "title": "" }, { "docid": "cdc8d793c39d50e717020886a59d7e56", "score": "0.5718688", "text": "public function getDummyEmail() {\r\n\t\treturn Yii::$app->formatter->asTimestamp(date('Y-d-m h:i:s')) . $this->username . \"@\" . \r\n\t\t\t\tYii::$app->params['domain'];\r\n\t}", "title": "" }, { "docid": "a03900c3f00c6b569fa12ce43273f2e1", "score": "0.57185316", "text": "static function createMailer()\n {\n $mail = self::createCleanMailer();\n\t\t$mail->setFrom('Rayku Administration <'.sfConfig::get('app_general_admin_email').'>');\n\n return $mail;\n }", "title": "" }, { "docid": "2d73346df15ba479566f19a0ef72f2c4", "score": "0.57114345", "text": "public function emailAction() {\n\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitepage_admin_main', array(), 'sitepage_admin_main_email');\n $this->view->form = $form = new Sitepage_Form_Admin_Settings_Email();\n\n //check if comments should be displayed or not\n $show_comments = Engine_Api::_()->sitepage()->displayCommentInsights();\n\n $taskstable = Engine_Api::_()->getDbtable('tasks', 'core');\n $rtasksName = $taskstable->info('name');\n $taskstable_result = $taskstable->select()\n ->from($rtasksName, array('processes', 'timeout'))\n ->where('title = ?', 'Sitepage Insight Mail')\n ->where('plugin = ?', 'Sitepage_Plugin_Task_InsightNotification')\n ->limit(1);\n $prefields = $taskstable->fetchRow($taskstable_result);\n\n //populate form\n// $form->populate(array(\n// 'sitepage_insightemail' => $prefields->processes,\n// ));\n\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n \n Engine_Api::_()->getApi('settings', 'core')->setSetting('sitepage_insightemail', $values['sitepage_insightemail']);\n \n if(empty($sitemailtemplates)) {\n\t\t\t\tEngine_Api::_()->getApi('settings', 'core')->setSetting('sitepage_bg_color', $values['sitepage_bg_color']);\n }\n include APPLICATION_PATH . '/application/modules/Sitepage/controllers/license/license2.php';\n if ($values['sitepage_demo'] == 1 && $values['sitepage_insightemail'] == 1) {\n\n $view = Zend_Registry::isRegistered('Zend_View') ? Zend_Registry::get('Zend_View') : null;\n\n //check if Sitemailtemplates Plugin is enabled\n $sitemailtemplates = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitemailtemplates');\n $site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.site.title', Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', 1));\n\n $insights_string = '';\n\t\t\t\t$template_header = \"\";\n\t\t\t\t$template_footer = \"\";\n if(!$sitemailtemplates) {\n\t\t\t\t\t$site_title_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.title.color', \"#ffffff\");\n\t\t\t\t\t$site_header_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.header.color', \"#79b4d4\");\n\n\t\t\t\t\t//GET SITE \"Email Body Outer Background\" COLOR\n\t\t\t\t\t$site_bg_color = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepage.bg.color', \"#f7f7f7\");\n\t\t\t\t\t$insights_string.= \"<table cellpadding='2'><tr><td><table cellpadding='2'><tr><td><span style='font-size: 14px; font-weight: bold;'>\" . $view->translate(\"Sample Page\") . \"</span></td></tr>\";\n\n\t\t\t\t\t$template_header.= \"<table width='98%' cellspacing='0' border='0'><tr><td width='100%' bgcolor='$site_bg_color' style='font-family:arial,tahoma,verdana,sans-serif;padding:40px;'><table width='620' cellspacing='0' cellpadding='0' border='0'>\";\n\t\t\t\t\t$template_header.= \"<tr><td style='background:\" . $site_header_color . \"; color:$site_title_color;font-weight:bold;font-family:arial,tahoma,verdana,sans-serif; padding: 4px 8px;vertical-align:middle;font-size:16px;text-align: left;' nowrap='nowrap'>\" . $site_title . \"</td></tr><tr><td valign='top' style='background-color:#fff; border-bottom: 1px solid #ccc; border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; font-family:arial,tahoma,verdana,sans-serif; padding: 15px;padding-top:0;' colspan='2'><table width='100%'><tr><td colspan='2'>\";\n\n $template_footer.= \"</td></tr></table></td></tr></td></table></td></tr></table>\";\n }\n\n if ($values['sitepage_insightmail_options'] == 1) {\n $vals['days_string'] = $view->translate('week');\n } elseif ($values['sitepage_insightmail_options'] == 2) {\n $vals['days_string'] = $view->translate('month');\n }\n $path = 'http://' . $_SERVER['HTTP_HOST'] . $view->baseUrl();\n $insight_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Visit your Insights Page') . \"</a>\";\n $update_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Send an update to people who like this') . \"</a>\";\n\n //check if Communityad Plugin is enabled\n $sitepagecommunityadEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('communityad');\n $adversion = null;\n if ($sitepagecommunityadEnabled) {\n $communityadmodulemodule = Engine_Api::_()->getDbtable('modules', 'core')->getModule('communityad');\n $adversion = $communityadmodulemodule->version;\n if ($adversion >= '4.1.5') {\n $promote_Ad_link = \"<a style='color: rgb(59, 89, 152); text-decoration: none;' href='\" . $path . \"'>\" . $view->translate('Promote with %s Ads', $site_title) . \"</a>\";\n }\n }\n\n $insights_string.= \"<table><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $vals['days_string'] . $view->translate(array('ly active user', 'ly active users', 2), 2) . \"</span></td></tr><tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('person likes this', 'people like this', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n if (!empty($show_comments)) {\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('comment', 'comments', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '2' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr>\";\n }\n $insights_string.= \"<tr><td><span style='font-size: 24px; font-family: arial;'>\" . '10' . \"</span>\\t <span style='color: rgb(85, 85, 85);'>\" . $view->translate(array('visit', 'visits', 2), 2) . \"</span>&nbsp;<span style='font-size: 18px; font-family: arial;' >\" . '5' . \"</span>\\t<span style='color: rgb(85, 85, 85);' >\" . $view->translate('since last') . \"\\t\" . $vals['days_string'] . \"</span></td></tr></table><table><tr><td>\" . \"<ul style=' padding-left: 5px;'><li>\" . $insight_link . \"</li><li>\" . $update_link;\n\n //check if Communityad Plugin is enabled\n if ($sitepagecommunityadEnabled && $adversion >= '4.1.5') {\n $insights_string.= \"</li><li>\" . $promote_Ad_link;\n }\n $insights_string.= \"</li></ul></td></tr></table>\";\n $days_string = ucfirst($vals['days_string']);\n $owner_name = Engine_Api::_()->user()->getViewer()->getTitle();\n $email = Engine_Api::_()->getApi('settings', 'core')->core_mail_from;\n Engine_Api::_()->getApi('mail', 'core')->sendSystem($values['sitepage_admin'], 'SITEPAGE_INSIGHTS_EMAIL_NOTIFICATION', array(\n 'recipient_title' => $owner_name,\n 'template_header' => $template_header,\n 'message' => $insights_string,\n 'template_footer' => $template_footer,\n 'site_title' => $site_title,\n 'days' => $days_string,\n 'email' => $email,\n 'queue' => true));\n }\n }\n }", "title": "" }, { "docid": "8d5787447203703dad92326e05feb106", "score": "0.5710126", "text": "public function get_host() {\n\t\treturn $this->host;\n\t}", "title": "" }, { "docid": "8d5787447203703dad92326e05feb106", "score": "0.5710126", "text": "public function get_host() {\n\t\treturn $this->host;\n\t}", "title": "" }, { "docid": "9e0c9631a4287830e7d0255ecb5b3f92", "score": "0.5693564", "text": "public function index()\n {\n $email='[email protected]';\n $this->send($email);\n }", "title": "" }, { "docid": "33e5bf7aa6e951eb9b2a77a7d4a17361", "score": "0.5692156", "text": "public function email_templates() {\t\n\t\t# Check login status...\n \t\t$this->_is_user_login ();\n\t}", "title": "" }, { "docid": "521cd75d4340d4f9df1c9b1eb957cc04", "score": "0.5684971", "text": "public function EmailHOD() {\n\t\t$obj_ur=new UserReporting;\n\t\t$obj_ur->SetParameters($_SESSION['user_id']);\n\t\t$superior_user_id=$obj_ur->GetInfo(\"superior_user_id\");\n\t\t/* GET THE SUPERIOR EMAIL ADDRESS */\n\t\t$obj_uis=new UserID;\n\t\t$obj_uis->SetParameters($superior_user_id);\n\t\t$superior_email_address=$obj_uis->GetInfo(\"login\"); /* THIS IS THE EMAIL ADDRESS */\n\t\t$superior_full_name=$obj_uis->GetInfo(\"full_name\");\n\n\t\t//echo \"Superior email address:\".$email_address.\"<br>\";\n\t\t$from=$GLOBALS['ui']->GetInfo(\"login\");\n\t\t$to=$superior_email_address;\n\t\t$subject=\"[LAMS] New leave application to approve\";\n\t\t$body=\"Dear \".$superior_full_name.\", There's a new leave application to approve from \".$GLOBALS['ui']->GetInfo(\"full_name\").\".\\n\\n Please login to the leave application system to approve it.\";\n\t\tSendEmail($from,$to,$subject,$body);\n\t}", "title": "" }, { "docid": "85fccd787617d764428f7fb684cb7656", "score": "0.5677561", "text": "function u_SendMail($FromMail,$ToMail,$Data,$Subject)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$headers = \"MIME-Version: 1.0\\n\"; \n\t\t\t\t\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\n\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$headers .= \"From: $FromMail\\n\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(strpos($_SERVER['SERVER_NAME'],\".com\"))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$myresult=mail($ToMail, $Subject , $Data, $headers);\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t}", "title": "" }, { "docid": "3689ba5eb33ed62d13a9f426be39501a", "score": "0.56759965", "text": "function host()\n{\n\treturn 'http://'.$_SERVER['HTTP_HOST'];\n}", "title": "" }, { "docid": "59ca3ff9aed5587f37e1b034e5774472", "score": "0.5674528", "text": "function getPublishEmail() {\n\t\treturn $this->getData('publishEmail');\n\t}", "title": "" }, { "docid": "277f4c2725e460a01164c7a06a4feab1", "score": "0.56726867", "text": "public function setup() {\n $mail = new PHPMailer;\n $mail->isSMTP();\n $mail->Host = 'smtp.gmail.com';\n $mail->SMTPAuth = true;\n $mail->Username = '[email protected]';\n $mail->Password = 'quetza1!';\n $mail->SMTPSecure = 'ssl';\n $mail->Port = 465;\n\n $mail->From = '[email protected]';\n $mail->FromName = \"Envirospec Admin\";\n\n $this->config = SiteConfig::current_site_config();\n $this->systemEmail = $this->config->SystemEmail;\n $this->CCEmail = $this->config->CCEmail;\n\n $mail->isHTML(true);\n\n return $mail;\n }", "title": "" }, { "docid": "62152918a3e81f1556dd1b141281dc3c", "score": "0.56680447", "text": "public function host ()\n {\n $this->assert (isset ($this->_host), '_host is not cached.', 'host', 'ATTACHMENT');\n return $this->_host;\n }", "title": "" }, { "docid": "dc5d9fa52f3a5df1275237a8e3aca387", "score": "0.56632787", "text": "function Install_Msvhost($module) {\n msv_set_config(\"theme_css_path\", CONTENT_URL.\"/css/msvhost.css\", true, \"*\");\n msv_set_config(\"theme_js_path\", CONTENT_URL.\"/js/msvhost.js\", true, \"*\");\n\n msv_set_config(\"theme_bg\", CONTENT_URL.\"/images/bg-5.jpg\", true, \"*\");\n\n msv_set_config(\"jenkins_auth\", \"\", true, \"*\");\n msv_set_config(\"sitograph_image_production\", \"\", true, \"*\");\n msv_set_config(\"sitograph_image_development\", \"\", true, \"*\");\n\n $itemTemplate = array(\n \"name\" => \"website_create_notify_user\",\n \"subject\" => \"{name} is created\",\n \"text\" => msv_load_module_doc($module->pathModule, \"email-notify\"),\n );\n msv_add_mailtemplate($itemTemplate, array(\"lang\" => \"all\"));\n\n $itemTemplate = array(\n \"name\" => \"website_create_notify_admin\",\n \"subject\" => \"{name} is created\",\n \"text\" => msv_load_module_doc($module->pathModule, \"email-admin-notify\"),\n );\n msv_add_mailtemplate($itemTemplate, array(\"lang\" => \"all\"));\n}", "title": "" }, { "docid": "ba81eda06abf5cf37d3b9a3b5219e58d", "score": "0.56600016", "text": "public function emailHarverster() {\n\n $harvesters = $this->getHarverters();\n\n if (!empty($harvesters)) {\n foreach ($harvesters as $harvester) {\n $group_id = $this->registerSubscriberGroup($harvester);\n $this->processHarvesterEmails($harvester, $group_id);\n }\n }\n }", "title": "" }, { "docid": "0ee44f74aa744c168f6f1641aa278ac7", "score": "0.5655968", "text": "private function deliveryEmailAddress()\n {\n return null;\n }", "title": "" }, { "docid": "5bd06acc21dee5cc024d6a3336b5cac7", "score": "0.5648959", "text": "public function email()\n {\n return $this->render('Outside/Reset/resetPassword_email.html.twig');\n }", "title": "" }, { "docid": "1a992325ca9356b86ce644092667b215", "score": "0.56424797", "text": "public function getEmail()\n {\n return $this->getValueByKey($this->response, '_id') . '@fake-steemconnect-email.com';\n }", "title": "" }, { "docid": "7b091034883eead760c1778d9b0b2918", "score": "0.5641543", "text": "public function email() {\n\t\treturn str_replace('@', ' (at) ', $this->email);\n\t}", "title": "" }, { "docid": "ae69ceaac34ac131204fecb6eb4c03b5", "score": "0.5637014", "text": "public function run()\n {\n $mail_host = new Setting();\n $mail_host->key = 'reqruited_mail_host';\n $mail_host->name = 'Reqruited SMTP host';\n $mail_host->value = 'smtp.gmail.com';\n $mail_host->save();\n\n $mail_port = new Setting();\n $mail_port->key = 'reqruited_mail_port';\n $mail_port->name = 'Reqruited SMTP port';\n $mail_port->value = '587';\n $mail_port->save();\n\n $mail_encryption = new Setting();\n $mail_encryption->key = 'reqruited_mail_encryption';\n $mail_encryption->name = 'Reqruited SMTP encryption';\n $mail_encryption->value = 'tls';\n $mail_encryption->save();\n\n $mail_username = new Setting();\n $mail_username->key = 'reqruited_mail_username';\n $mail_username->name = 'Reqruited SMTP username';\n $mail_username->value = '[email protected]';\n $mail_username->save();\n\n $mail_password = new Setting();\n $mail_password->key = 'reqruited_mail_password';\n $mail_password->name = 'Reqruited SMTP password';\n $mail_password->value = '!Jericho@';\n $mail_password->save();\n }", "title": "" }, { "docid": "c8daec0d5b215eb81a9362da9014ece0", "score": "0.5635939", "text": "function welcomeMail()\n {\n $to_email = '[email protected]';\n Mail::to($to_email)->send(new Reminder);\n return \"E-mail has been sent Successfully\"; \n }", "title": "" }, { "docid": "e5f96d140d3645934cb0ef0111aad7ed", "score": "0.5628124", "text": "private function send_signup_mail()\n\t{\n\t\t$link = URL::site(Route::get('user_ops')->uri(array('action' => 'confirm_signup'))\n\t\t\t\t\t\t\t\t\t\t\t\t. '?id=' . $this->id . '&auth_token='\n\t\t\t\t\t\t\t\t\t\t\t\t. Auth::instance()->hash($this->email), 'http');\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t$mailer = new QaminiMailer($this->email, $this->username\n\t\t\t, Kohana::$config->load('config.website_name') . __(' - Signup') \n\t\t\t, Kohana::$config->load('config.website_name') . __(' Website'), 'confirm_signup'\n\t\t\t, array('url' => $link, 'username' => $this->username));\n\t\t\t\n\t\t$mailer->send();\n\t}", "title": "" }, { "docid": "ea127cd7c7d036177550e20efaac4395", "score": "0.56159806", "text": "public function captureEmail()\n {\n $email = Mage::getModel('mp_debug/email');\n $email->setFromEmail($this->getFromEmail());\n $email->setFromName($this->getFromName());\n $email->setToEmail($this->getToEmail());\n $email->setToName($this->getToName());\n $email->setSubject($this->getSubject());\n $email->setIsPlain($this->getType() != 'html');\n $email->setBody($this->getBody());\n $email->setIsSmtpDisabled((bool)Mage::getStoreConfigFlag('system/smtp/disable'));\n $email->setIsAccepted(true); // Assume e-mail is accepted\n\n $requestInfo = Mage::getSingleton('mp_debug/observer')->getRequestInfo();\n $requestInfo->addEmail($email);\n }", "title": "" }, { "docid": "b18f2ba44d4de6eacf0148e1b6c7d4c8", "score": "0.5612933", "text": "public function setupVars()\n {\n $this->domain = (is_multisite()) ? get_current_site()->domain : preg_replace('/^www\\./', '', parse_url(get_bloginfo('url'), PHP_URL_HOST));\n $this->fromName = (is_multisite()) ? get_current_site()->site_name : get_bloginfo('name');\n $this->emailFrom = (!empty($this->emailFrom)) ? $this->emailFrom : $this->username . \"@\" . $this->domain;\n }", "title": "" }, { "docid": "693f50302035d4c9e0620d47b2afdbf3", "score": "0.5612815", "text": "function sendEmail($theEmailAddr, $theTitle, $theMsgBody, $theSenderEmailAddr) {\n\n\t$headers[] = 'MIME-Version: 1.0';\n\t$headers[] = 'Content-type: text/html; charset=iso-8859-1';\n\t$headers[] = 'From: ' . $theSenderEmailAddr;\n\n\t// Email user.\n\t//mail($theEmailAddr, $theTitle, $theMsgBody, \"From: \" . $theSenderEmailAddr . \"\\n\");\n\tmail($theEmailAddr, $theTitle, $theMsgBody, implode(\"\\r\\n\", $headers));\n}", "title": "" }, { "docid": "75082d97e1d35e8668c9e255d3ae4ff6", "score": "0.5612804", "text": "function email($args) {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t\n\t\t$conference =& Request::getConference();\n\t\t$schedConf =& Request::getSchedConf();\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign('helpTopicId', 'conference.users.emailUsers');\n\n\t\t$userDao =& DAORegistry::getDAO('UserDAO');\n\n\t\t$site =& Request::getSite();\n\t\t$user =& Request::getUser();\n\n\t\timport('mail.MailTemplate');\n\t\t$email = new MailTemplate(Request::getUserVar('template'), Request::getUserVar('locale'));\n\n\t\tif (Request::getUserVar('send') && !$email->hasErrors()) {\n\t\t\t$email->send();\n\t\t\tRequest::redirect(null, null, Request::getRequestedPage());\n\t\t} else {\n\t\t\t$email->assignParams(); // FIXME Forces default parameters to be assigned (should do this automatically in MailTemplate?)\n\t\t\tif (!Request::getUserVar('continued')) {\n\t\t\t\tif (($groupId = Request::getUserVar('toGroup')) != '') {\n\t\t\t\t\t// Special case for emailing entire groups:\n\t\t\t\t\t// Check for a group ID and add recipients.\n\t\t\t\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t\t\t\t$group =& $groupDao->getGroup($groupId, ASSOC_TYPE_SCHED_CONF, $schedConf->getId());\n\t\t\t\t\tif ($group) {\n\t\t\t\t\t\t$groupMembershipDao =& DAORegistry::getDAO('GroupMembershipDAO');\n\t\t\t\t\t\t$memberships =& $groupMembershipDao->getMemberships($group->getId());\n\t\t\t\t\t\t$memberships =& $memberships->toArray();\n\t\t\t\t\t\tforeach ($memberships as $membership) {\n\t\t\t\t\t\t\t$user =& $membership->getUser();\n\t\t\t\t\t\t\t$email->addRecipient($user->getEmail(), $user->getFullName());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (count($email->getRecipients())==0) $email->addRecipient($user->getEmail(), $user->getFullName());\n\t\t\t}\n\t\t\t$email->displayEditForm(Request::url(null, null, null, 'email'), array(), 'manager/people/email.tpl');\n\t\t}\n\t}", "title": "" }, { "docid": "7daa5649b7b5934dcb08f2dffd7b8783", "score": "0.56112707", "text": "function inviteEmail() {\n JSession::checkToken('get') or jexit(JText::_('JINVALID_TOKEN'));\n\t $email = JRequest::getVar('email');\n\t $subject = JRequest::getVar('subject');\n\t $body = JRequest::getVar('body');\n $model = $this -> getModel(\"member\");\n\t echo $model->inviteEmail($email, $subject, $body);\n\t}", "title": "" }, { "docid": "8b99a4e432c79d1746d10e8961cbdda2", "score": "0.5601617", "text": "static public function email_sent() {\n\t}", "title": "" }, { "docid": "c024914774f1b0c37e5397c163422968", "score": "0.5598072", "text": "public function getHost()\n {\n return isset($this->host) ? $this->host : '';\n }", "title": "" }, { "docid": "795dcb190dc4b2076392e29122ed9c03", "score": "0.5591855", "text": "public function getAdminEmail(){\n\t\t\tglobal $admin_email;\n\t\t\treturn $admin_email;\n\t\t}", "title": "" }, { "docid": "d7b3b0d96c9c1eccfb3b156c9a1fc25d", "score": "0.55886495", "text": "function canned_email_emails() {\n if(arg(0) == 'node') {\n $node = node_load(arg(1));\n $user = user_load($node->uid);\n }else{\n $user = user_load(arg(1));\n }\n drupal_set_title('<em>Send Canned Email to '.$user->name.'</em>', PASS_THROUGH);\n return drupal_get_form('canned_email_form');\n}", "title": "" }, { "docid": "8d2d171ae280700536f31258f6253397", "score": "0.5587853", "text": "public static function getNotificationEmailAddress(){\n return OptionHelper::getOption('notification_email');\n }", "title": "" }, { "docid": "3af123cca950342157d8e17b32833483", "score": "0.558526", "text": "public function message()\n {\n return 'Please enter email ending with yopmail.com.';\n }", "title": "" }, { "docid": "0cd8895fd10cd697f5174635a484c445", "score": "0.55844796", "text": "public function mail()\n\t{\n\t\t$array = ['foo' => 'bar'];\n\t\tMail::send('emails.welcome',$array, function ($message) {\n \t\t$message->from('[email protected]', 'Laravel');\n\n \t\t$message->to('[email protected]');\n\t});\n\t\t\n\t}", "title": "" }, { "docid": "9b7fee56941accccb3fde5a73312c8f0", "score": "0.558286", "text": "public function getMail();", "title": "" }, { "docid": "9b7fee56941accccb3fde5a73312c8f0", "score": "0.558286", "text": "public function getMail();", "title": "" }, { "docid": "f5ea5f38d6e70f6594d03b61668c1143", "score": "0.55775386", "text": "public function getEmailServiceUrl()\n {\n return Mage::getStoreConfig(self::XML_PATH_EMAIL_SERVICE_URL);\n }", "title": "" }, { "docid": "62c64a102dfac7a87533c4ebb188df16", "score": "0.5573159", "text": "public function __construct() {\r\n $this->host=\"smtp.163.com\";\r\n $this->username=\"[email protected]\";\r\n $this->password=\"LIQIYUAN050600\";\r\n $this->fromUser=\"[email protected]\";\r\n $this->fromName=\"RainStorm\";\r\n }", "title": "" }, { "docid": "4c3ee4879d1e7695d9e9e1d5d7ead75e", "score": "0.55711997", "text": "public function getHost(): string\n {\n return $this->host;\n }", "title": "" }, { "docid": "4c3ee4879d1e7695d9e9e1d5d7ead75e", "score": "0.55711997", "text": "public function getHost(): string\n {\n return $this->host;\n }", "title": "" }, { "docid": "4c3ee4879d1e7695d9e9e1d5d7ead75e", "score": "0.55711997", "text": "public function getHost(): string\n {\n return $this->host;\n }", "title": "" } ]
51fedfd1a8c37ff598aa93728303fb62
Set FALSE if you are using a Self Signed certificate
[ { "docid": "adfde08b7df1078703ef5bfeb80ec635", "score": "0.0", "text": "function credentials()\n\t{\n\t\treturn array($this->get_server(), $_GET[\"username\"], get_password());\n\t}", "title": "" } ]
[ { "docid": "bfe8e99160cbd3fd7c76bb751f489afc", "score": "0.67253727", "text": "public function validateCert(): bool\n {\n return ! $this->novalidatecert;\n }", "title": "" }, { "docid": "48c7ac7afe789a420dfc7579673f78ab", "score": "0.64980835", "text": "public function isSecure ()\n {\n \treturn false;\n }", "title": "" }, { "docid": "dfa4f6b7dcd9bc2e7f3f4b77c6c3a77c", "score": "0.64363974", "text": "public function isSelfSigned()\n {\n $issuer = $this->issuer->getSubject();\n $subject = $this->subject->getSubject();\n\n return ($issuer === $subject);\n }", "title": "" }, { "docid": "43527e9c338b15123e26f9b603238c45", "score": "0.643237", "text": "public function isSecure()\n {\n return false;\n }", "title": "" }, { "docid": "b4ca4213afef0173740ea716881720f2", "score": "0.6256085", "text": "function yourls_needs_ssl() {\n\t\tif ( defined('YOURLS_ADMIN_SSL') && YOURLS_ADMIN_SSL == true )\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2c2e151956cafbc9b4282328e4fd76ec", "score": "0.6254224", "text": "public function enableSSLVerifyPeer();", "title": "" }, { "docid": "be94c57ecfee9beb178ae0843204de7c", "score": "0.6250552", "text": "public function hasCertificate(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "eff16d129cdd6ace247e2ab78dd74cac", "score": "0.6248725", "text": "public function secureSendingOnly($secure = false) {\n\t\tcurl_setopt($this->_handler, CURLOPT_SSL_VERIFYPEER, $secure);\n\t\tcurl_setopt($this->_handler, CURLOPT_SSL_VERIFYHOST, $secure);\n\t}", "title": "" }, { "docid": "e5e502baeda2cebf44bb5f8df9d8659d", "score": "0.6189576", "text": "public function usePHPCerts()\n {\n $this->use_local_certs = false;\n }", "title": "" }, { "docid": "5808a38d3b9955f32ce3841dee4c6060", "score": "0.6164327", "text": "function ds_https_verify()\r\n{\r\n\tadd_filter( 'https_ssl_verify', '__return_false' );\r\n}", "title": "" }, { "docid": "7b78f5132f4cc0251413929bd792f6c2", "score": "0.6162372", "text": "public function getUseCertAuthentication()\n {\n return (bool)$this->_config->getValue('apiAuthentication');\n }", "title": "" }, { "docid": "35e8f53011264cebf9b79e07b0406d45", "score": "0.6137415", "text": "public static function secure()\n {\n return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off';\n }", "title": "" }, { "docid": "1f291422d3896b6f5ed8fe64df9b7cfb", "score": "0.61356115", "text": "public function doNotVerifySsl()\n {\n $this->setCurlOptions(CURLOPT_SSL_VERIFYPEER, false);\n }", "title": "" }, { "docid": "230f036cf28cdd652a4a4f76c031fbc7", "score": "0.61154467", "text": "public function isSecured()\r\n\t{\r\n\t\treturn isset($_SERVER['HTTPS']) && strcasecmp($_SERVER['HTTPS'], 'off');\r\n\t}", "title": "" }, { "docid": "17fc93a23ee7624fee8baeac30f4d183", "score": "0.606076", "text": "public function usingSSL() {\n\t\treturn $this->proto === 'https';\n\t}", "title": "" }, { "docid": "b14a75ed9b8c55e502b15593b01d04c5", "score": "0.6035267", "text": "public function checkSSL() {\n\t\tif(\n\t\t\t// OC15\n\t\t\t$this->config->get( 'config_use_ssl' )\n\t\t\t// OC14\n\t\t\t|| $this->config->get( 'config_ssl' )\n\t\t)\n\t\t{\n\t\t\t$this->_useSSL = true;\n\t\t}\n\t}", "title": "" }, { "docid": "b270923f9a4f017b66a072db795c4f68", "score": "0.6018766", "text": "public function isEnableSSLVerification()\r\n {\r\n return !$this->isSandbox() || $this->_isEnableSSLVerification;\r\n }", "title": "" }, { "docid": "d8dc29be30a7219e5de566a550e43fd5", "score": "0.60086656", "text": "public function trusted()\n {\n $info = $this->info();\n\n return $info['auth'] === 'trusted' ? true : false;\n }", "title": "" }, { "docid": "23674db9e30e1bf5bbcb224dd99bebd3", "score": "0.60058653", "text": "public function RequireInsecure() {\n $this->insecure = TRUE;\n }", "title": "" }, { "docid": "ff581b4cbd85c1a70817b2f4aeb0ce62", "score": "0.593205", "text": "public function isSecured()\n {\n return (isset($this->scheme) && strtolower($this->scheme) == 'https');\n }", "title": "" }, { "docid": "049a46b2a70861bbac818829997844f1", "score": "0.59199905", "text": "public function sslOn()\n {\n switch($this->_environment) {\n case 'integration':\n case 'development':\n $ssl = false;\n break;\n case 'production':\n case 'qa':\n case 'sandbox':\n default:\n $ssl = true;\n break;\n }\n\n return $ssl;\n }", "title": "" }, { "docid": "f8fb0d5ae87b04d94b6c94b895fbddad", "score": "0.5884158", "text": "public function https()\n {\n try {\n $data = SslCertificate::createForHostName($this->name());\n return $data->isValid();\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "2e20ac459ea59a3c94d02f74a2a66739", "score": "0.5873352", "text": "public function isUnsecured(): bool\n {\n return JWA::ALGO_NONE === $this->algorithmName();\n }", "title": "" }, { "docid": "50f1e26ae3ee40bcbc0e04778715ba01", "score": "0.5870465", "text": "public function forceSsl();", "title": "" }, { "docid": "748c931cd2d067b2d92f946239924e17", "score": "0.5869764", "text": "public function do_ssl_check() {\n if( $this->enabled == \"yes\" ) {\n if( get_option( 'woocommerce_force_ssl_checkout' ) == \"no\" ) {\n echo \"<div class=\\\"error\\\"><p>\". sprintf( __( \"<strong>%s</strong> is enabled and WooCommerce is not forcing the SSL certificate on your checkout page. Please ensure that you have a valid SSL certificate and that you are <a href=\\\"%s\\\">forcing the checkout pages to be secured.</a>\" ), $this->method_title, admin_url( 'admin.php?page=wc-settings&tab=checkout' ) ) .\"</p></div>\"; \n }\n } \n }", "title": "" }, { "docid": "44bc614a895a9604f01a820489672a8a", "score": "0.58645064", "text": "private function is_ssl() {\n\t\tif ($this->app->isSSLConnection())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cf3a6a92c7f66a614f81649b1d824446", "score": "0.5856047", "text": "public function isSecure(): bool\n\t{\n\t\treturn (array_key_exists('HTTPS', $this->server)\n\t\t\t&& $this->server['HTTPS'] !== 'off'\n\t\t);\n\t}", "title": "" }, { "docid": "2ee6e1848f7e40586bcd1c9b3e3c37e0", "score": "0.58539027", "text": "protected function ssl()\n {\n return isset($this->options[\"ssl\"]) ? $this->options[\"ssl\"] : true;\n }", "title": "" }, { "docid": "9b15ec0369c678ec2dc7e7d1dddb4ea7", "score": "0.5852412", "text": "public function forceHttps(): bool;", "title": "" }, { "docid": "9e01119a70e851cf957155632f7c8a78", "score": "0.583021", "text": "public function canUseInRealSignature(): bool\n {\n return true;\n }", "title": "" }, { "docid": "c881e780e0935f20fb68936446ccace6", "score": "0.58238864", "text": "public function do_ssl_check()\n {\n if ($this->enabled == \"yes\") {\n if (get_option('woocommerce_force_ssl_checkout') == \"no\") {\n echo \"<div class=\\\"error\\\"><p>\" . sprintf(__(\"<strong>%s</strong> is enabled and WooCommerce is not forcing the SSL certificate on your checkout page. Please ensure that you have a valid SSL certificate and that you are <a href=\\\"%s\\\">forcing the checkout pages to be secured.</a>\"), $this->method_title, admin_url('admin.php?page=wc-settings&tab=checkout')) . \"</p></div>\";\n }\n }\n\n }", "title": "" }, { "docid": "1db7b94d1f69fd78b80a3b034a756010", "score": "0.58223915", "text": "private function isSecure(): bool\n {\n return Request::isSecure();\n }", "title": "" }, { "docid": "c251ff403155d1441fdacc1c2370c99e", "score": "0.5820522", "text": "function is_ssl() {\n return $_SERVER['HTTPS'] != '' and $_SERVER['HTTPS'] != 'off';\n }", "title": "" }, { "docid": "979b81cdf396bddd09ccf333c562604d", "score": "0.58118", "text": "public function disableSSLChecks()\n {\n $this->sslChecks = OAUTH_SSLCHECK_NONE;\n\n return true;\n }", "title": "" }, { "docid": "dc29703872af4e3db4ffcd9e112a491b", "score": "0.5810033", "text": "public function isSslEnabled(): bool\n {\n return isset($this->settings['ssl_cert_file']);\n }", "title": "" }, { "docid": "0e18ccf9736acaeec6382f50a2bc3254", "score": "0.58087975", "text": "public function isSSL()\n {\n return $this->_isSSL;\n }", "title": "" }, { "docid": "444f7fb2ad8423a73a2d82afe01680a9", "score": "0.58055913", "text": "public function disableSSLVerifyPeer();", "title": "" }, { "docid": "2c70a658892be55b0c0d60737a1aa901", "score": "0.5801518", "text": "public function enableSSLChecks()\n {\n $this->sslChecks = OAUTH_SSLCHECK_BOTH;\n\n return true;\n }", "title": "" }, { "docid": "27d61aa7ac14f1427424d24ce6e9a6e2", "score": "0.5788303", "text": "public function setRequireTrustedCertificate($isEnabled) {\n $this->requireTrustedCertificate = $isEnabled;\n }", "title": "" }, { "docid": "2acd269779ba97dd789c7ed0f0f005be", "score": "0.57838863", "text": "public function isSecure()\n {\n return $this->https;\n }", "title": "" }, { "docid": "b7beed16fff12eeb660587bf0e4f5d39", "score": "0.5763767", "text": "public function isOnlyAllowHttps() {\n\t\treturn $this->onlyAllowHttps;\n\t}", "title": "" }, { "docid": "de52ec840871c7155b8a7374e7619b48", "score": "0.57286644", "text": "public function isValidForUse() {\n\t\tif ( $this->isCurrentPageRequiresSsl() && ! is_ssl() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->supported_currency() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $this->public_key ) && empty( $this->public_key_ca ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( empty( $this->private_key ) && empty( $this->private_key_ca ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8bfa461a87fb95516c891b46be3f43a9", "score": "0.570786", "text": "function SSLon() {\n\tif ($_SERVER ['HTTPS'] != 'on') {\n\t\t$url = \"https://\" . $_SERVER ['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\t\tredirect ( $url );\n\t}\n}", "title": "" }, { "docid": "1062749d249415f8acea068f79291938", "score": "0.56958455", "text": "public function hasCertificateFile(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "f16b7442be9a01a88532f87559e856e8", "score": "0.5695714", "text": "public function check_ssl()\n\t{\n\t\tif ( 'yes' != get_option( 'woocommerce_force_ssl_checkout' ) )\n\t\t{\n\t\t\techo '<div class=\"error\"><p>WooCommerce IS NOT BEING FORCED OVER SSL; YOUR CUSTOMER\\'S CREDIT CARD DATA IS AT RISK.</p></div>';\n\t\t}\n\t}", "title": "" }, { "docid": "be9cfd917268fb22406b4972a36b5098", "score": "0.5689664", "text": "public function isSigned(): bool\n {\n return $this->status === static::STATUS_SIGNED;\n }", "title": "" }, { "docid": "55482acf8adf78cccc83b6072a4d4da8", "score": "0.5684884", "text": "public function get_use_ssl()\n {\n return $this->_use_ssl;\n }", "title": "" }, { "docid": "b588c369d264e9cc4f5e11b5c4ec88e7", "score": "0.5684697", "text": "public function isSecure()\n\t{\n\t\treturn ($this->server->get('HTTPS') == true);\n\t}", "title": "" }, { "docid": "85538533caf868ac5a881fd7d57d659e", "score": "0.5678983", "text": "public function exposeSSL() : void\n {\n if (self::isSSL()) {\n $_SERVER['HTTPS'] = 'on';\n }\n }", "title": "" }, { "docid": "8d334ce9e8523633a80eb19f4b5da3f7", "score": "0.56684786", "text": "public function setEnableSingleSignOnWithAlternateCertificate(?bool $value): void {\n $this->getBackingStore()->set('enableSingleSignOnWithAlternateCertificate', $value);\n }", "title": "" }, { "docid": "af96f888fe2c3f1d96d2de31a6d25f23", "score": "0.5641566", "text": "public function isSSL()\n {\n if( !empty( $_SERVER['https'] ) && ($_SERVER['HTTPS'] != 'off') )\n return true;\n\n if( !empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "20a1d87a93aee17a5cf76970a79f14e0", "score": "0.5632477", "text": "public function isSslEnabled(){\n return $this->ssl_enabled;\n }", "title": "" }, { "docid": "aa0a06a61f205384e107d057f6328191", "score": "0.5626531", "text": "function isSecure(): bool {\n return $this->secure;\n }", "title": "" }, { "docid": "f7bb496b65d0e05fd703a41de13ebcec", "score": "0.56176305", "text": "public function setConnectionSecure($connectionSecure = true){\n\t$this->_connectionSecure = $connectionSecure ? true : false;\n\t$this->_curlReset();\n return true;\n}", "title": "" }, { "docid": "d7b8b51311499bd636a5d4e0ce69f38e", "score": "0.5607222", "text": "public function isSSL()\n {\n if( !empty( $_SERVER['HTTPS'] ) )\n return true;\n\n if( !empty( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' )\n return true;\n\n return false;\n }", "title": "" }, { "docid": "ddc6bbbe5429c2be40cfef1ba252c6ae", "score": "0.5603996", "text": "public function isCertificateAuthorityCheckRequired() {\n\t\treturn $this->isCertificateAuthorityCheckRequired;\n\t}", "title": "" }, { "docid": "82e3b5180f8f967a7cff6ec3cc0cb160", "score": "0.56034166", "text": "public function isSecure(): bool\n {\n return $this->secure;\n }", "title": "" }, { "docid": "f110f889debae37461f5bb06e83c8f11", "score": "0.5600983", "text": "function requestCertificateFromAuthority($request) : bool\r\n{\r\n print PHP_EOL . \"***------------ Requesting Certificate ------------***\" . PHP_EOL;\r\n $requestCommand = ACMEPHP_COMMAND . \" request {$request}\";\r\n\r\n // output the command for reference if testing mode is live\r\n if(TESTING) {\r\n print $requestCommand . PHP_EOL;\r\n return true;\r\n }\r\n\r\n $output = shell_exec($requestCommand);\r\n\r\n // the user may or may not have been asked a series of questions for that cert, depending on whether\r\n // it is their first time or not. This actually still works.\r\n\r\n print $output . PHP_EOL;\r\n\r\n return true;\r\n\r\n}", "title": "" }, { "docid": "b6638afc70d5bc7f4a90f007ef667b7f", "score": "0.559145", "text": "public function getSecure()\r\n {\r\n return (bool) $this->options['secure'];\r\n }", "title": "" }, { "docid": "2eb0bf223c342b3901f50069c1a00767", "score": "0.5584141", "text": "public function isSecure(): bool\n {\n return $this->isProtocol('https');\n }", "title": "" }, { "docid": "ffe1af50c146c1fdde6b9aa752afb6b2", "score": "0.55742615", "text": "public function isSecure() : bool\n {\n return $this->secure;\n }", "title": "" }, { "docid": "58d4e7dbef57bdf597ef74b01ef8ff9f", "score": "0.55732054", "text": "private function checkSecureUrl()\n {\n $custom_ssl_var = 0;\n if (isset($_SERVER['HTTPS'])) {\n if ($_SERVER['HTTPS'] == 'on') {\n $custom_ssl_var = 1;\n }\n } else if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n $custom_ssl_var = 1;\n }\n if ((bool) Configuration::get('PS_SSL_ENABLED') && $custom_ssl_var == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "58d4e7dbef57bdf597ef74b01ef8ff9f", "score": "0.55732054", "text": "private function checkSecureUrl()\n {\n $custom_ssl_var = 0;\n if (isset($_SERVER['HTTPS'])) {\n if ($_SERVER['HTTPS'] == 'on') {\n $custom_ssl_var = 1;\n }\n } else if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n $custom_ssl_var = 1;\n }\n if ((bool) Configuration::get('PS_SSL_ENABLED') && $custom_ssl_var == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "58d4e7dbef57bdf597ef74b01ef8ff9f", "score": "0.55732054", "text": "private function checkSecureUrl()\n {\n $custom_ssl_var = 0;\n if (isset($_SERVER['HTTPS'])) {\n if ($_SERVER['HTTPS'] == 'on') {\n $custom_ssl_var = 1;\n }\n } else if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {\n $custom_ssl_var = 1;\n }\n if ((bool) Configuration::get('PS_SSL_ENABLED') && $custom_ssl_var == 1) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "da1c444134ffa43da507d698885b7e5a", "score": "0.557047", "text": "public function getSecure() : bool{\n return $this->secure;\n }", "title": "" }, { "docid": "3d71d52efa8accb2e5c20ed0d8e9c512", "score": "0.5552438", "text": "public function getConfigurationSignatureRequired()\n {\n return (bool) Mage::getStoreConfig('expeditorinet/export/signature_required');\n }", "title": "" }, { "docid": "857251fe3bd4f47c40e195cd6051f987", "score": "0.55522096", "text": "public function isSigned()\n {\n return $this->signature !== null;\n }", "title": "" }, { "docid": "fb893a24e7c95816e43dba9c3492bfb1", "score": "0.5548988", "text": "function usingHTTPS () {\r\n\treturn isset($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] != \"off\");\r\n}", "title": "" }, { "docid": "3f7db3d8b5ffab7361efbf38008c9501", "score": "0.5546317", "text": "function SSLon(){\r\n\tif($_SERVER['HTTPS'] != 'on'){\r\n\t\t$url = \"https://\".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];\r\n\t\tredirect($url);\r\n\t}\r\n}", "title": "" }, { "docid": "278039ab2dc1779bc484074e3b63e51f", "score": "0.55410933", "text": "public final function validateHttpsOnly()\n\t{\n\t\tif (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS']!='on'){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9178968806006c6581129b4177d79fdb", "score": "0.55341154", "text": "function forceNoSSL() {\n if (Gdn::request()->scheme() != 'http') {\n redirectTo(Gdn::request()->url('', true, false));\n }\n }", "title": "" }, { "docid": "6fdbee053e32348f7163fe5cd8b4551c", "score": "0.5531758", "text": "public function isConnectionSecure(){\n\treturn $this->_connectionSecure ? true : false;\n}", "title": "" }, { "docid": "9c30e5ebc23e5c69e40cb6f3a229c084", "score": "0.5526058", "text": "public function hasSignWithTestSignature()\n {\n return $this->SignWithTestSignature !== null;\n }", "title": "" }, { "docid": "1538d6ea9ec55dfded1465f0ec8a73ae", "score": "0.55095977", "text": "public function isRequestSecure(): bool\n {\n if ($proto = $this->headers->get('http-x-forwarded-proto')) {\n return in_array(strtolower($proto), ['https', 'on', 'ssl', '1'], true);\n }\n\n $https = strtolower($this->headers->get('https', '')) ;\n\n return (($https && $https !== 'off') || $this->headers->get('server-port') === self::HTTPS_PORT);\n }", "title": "" }, { "docid": "f80cef0d0bb2659cc00339a71e5d4d85", "score": "0.5499898", "text": "public function isSsl(): bool\n {\n return $this->ssl;\n }", "title": "" }, { "docid": "fd011b1d80421f0b3ab41cc909ee7fd5", "score": "0.54989", "text": "public function getAllowInsecure()\n {\n return $this->allow_insecure;\n }", "title": "" }, { "docid": "74afcb0013e1b8e1d25b4e68d0254968", "score": "0.5496964", "text": "public function isSsl();", "title": "" }, { "docid": "74afcb0013e1b8e1d25b4e68d0254968", "score": "0.5496964", "text": "public function isSsl();", "title": "" }, { "docid": "0e34c9089bc0c87b4dbb0c33c9caafce", "score": "0.54959375", "text": "function yourls_is_ssl() {\n\t\tif ( isset($_SERVER['HTTPS']) ) {\n\t\t\tif ( 'on' == strtolower($_SERVER['HTTPS']) )\n\t\t\t\treturn true;\n\t\t\tif ( '1' == $_SERVER['HTTPS'] )\n\t\t\t\treturn true;\n\t\t} elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a5d5b2aeb6cbbcc33321d83d1b220443", "score": "0.5495352", "text": "public function getBForceAcceptSSLCertificate()\r\n {\r\n return $this->bForceAcceptSSLCertificate;\r\n }", "title": "" }, { "docid": "141fcab354fa702d121cad160e946491", "score": "0.5489476", "text": "public function maybe_download_private_certificate() {\n\t\tif ( filter_has_var( INPUT_POST, 'download_private_certificate' ) ) {\n\t\t\t$post_id = filter_input( INPUT_POST, 'post_ID', FILTER_SANITIZE_STRING );\n\n\t\t\t$filename = sprintf( 'ideal-private-certificate-%s.cer', $post_id );\n\n\t\t\theader( 'Content-Description: File Transfer' );\n\t\t\theader( 'Content-Disposition: attachment; filename=' . $filename );\n\t\t\theader( 'Content-Type: application/x-x509-ca-cert; charset=' . get_option( 'blog_charset' ), true );\n\n\t\t\techo get_post_meta( $post_id, '_pronamic_gateway_ideal_private_certificate', true ); //xss ok\n\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "b837759dcfe4eea887220293f66dcab0", "score": "0.54805934", "text": "public function isSecure();", "title": "" }, { "docid": "14d87e065593f01db48ad246a874cf21", "score": "0.547884", "text": "public function isSigned(): bool\n {\n return $this->proofs !== [];\n }", "title": "" }, { "docid": "78ac1c0d663b56c60c9a2555bb6e9f70", "score": "0.54722345", "text": "private function isSSLConnection() {\n\t\tif($this->getUrl()->getPort() == 443 || $this->getUrl()->getScheme() == 'https') {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "84a9abe2dcc8436a0c7183ed35644446", "score": "0.54705054", "text": "function alwaysdata_ssl()\n{\n if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https')\n {\n $_SERVER['HTTPS'] = 'on';\n $_SERVER['SERVER_PORT'] = 443;\n }\n}", "title": "" }, { "docid": "3e94fe36041562381b374dc959deda81", "score": "0.5463385", "text": "public function hasValidCert()\n {\n if (!isset($_SERVER['SSL_CLIENT_M_SERIAL'])\n || !isset($_SERVER['SSL_CLIENT_V_END'])\n || !isset($_SERVER['SSL_CLIENT_VERIFY'])\n || $_SERVER['SSL_CLIENT_VERIFY'] !== 'SUCCESS'\n || !isset($_SERVER['SSL_CLIENT_I_DN'])\n ) {\n return false;\n }\n\n if ($_SERVER['SSL_CLIENT_V_REMAIN'] <= 0) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "411ee2a3cecbd43e19cda85cf43185bf", "score": "0.5454235", "text": "public function isSecureOnly() {\n\t\treturn $this->secureOnly;\n\t}", "title": "" }, { "docid": "97ae3bdeb4f784044b42973e161ad162", "score": "0.5451641", "text": "public function set_use_ssl($_use_ssl)\n {\n $this->_use_ssl = $_use_ssl;\n }", "title": "" }, { "docid": "fffc761cb80318a1ddf385b7d224ac12", "score": "0.54483294", "text": "public function isSecure()\r\n\t{\r\n\t\treturn $this->secure;\r\n\t}", "title": "" }, { "docid": "28fed7c5da1ec682835f081588e6a644", "score": "0.5435185", "text": "function oa_loudvoice_is_https_on()\n{\n if (!empty($_SERVER['SERVER_PORT']))\n {\n if (trim($_SERVER['SERVER_PORT']) == '443')\n {\n return true;\n }\n }\n\n if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']))\n {\n if (strtolower(trim($_SERVER['HTTP_X_FORWARDED_PROTO'])) == 'https')\n {\n return true;\n }\n }\n\n if (!empty($_SERVER['HTTPS']))\n {\n if (strtolower(trim($_SERVER['HTTPS'])) == 'on' or trim($_SERVER['HTTPS']) == '1')\n {\n return true;\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "305bbd62b02f2d1489cf5f6f71c79c86", "score": "0.543349", "text": "public function setStrictSSL($enable = true);", "title": "" }, { "docid": "e81c807be473923b2a301bb99718f184", "score": "0.54317003", "text": "public function isConfidential()\n {\n return $this->confidential ?? false;\n }", "title": "" }, { "docid": "dd89021c0853f8d32b91a611281173f1", "score": "0.54311526", "text": "public function trustCA($pem);", "title": "" }, { "docid": "40fdf79e07ff5257f3440980111932ee", "score": "0.5427743", "text": "function valid_cert($jsonRequest) \n\t{\n\n\t\t$data = json_decode($jsonRequest,true);\n\t\t$ECHO_CERT_CACHE = FCPATH . 'application/cache/';\n\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t // Determine if we need to download a new Signature Certificate Chain from Amazon\n \t$md5pem = $ECHO_CERT_CACHE . md5($_SERVER['HTTP_SIGNATURECERTCHAINURL']) . '.pem';\n\t\t$echoServiceDomain = 'echo-api.amazon.com';\n\n\t // If we haven't received a certificate with this URL before,\n \t// store it as a cached copy\n\t if (!file_exists($md5pem))\n\t {\n \tfile_put_contents($md5pem, file_get_contents($_SERVER['HTTP_SIGNATURECERTCHAINURL']));\n \t}\n\n\t // Validate certificate chain and signature\n \t$pem = file_get_contents($md5pem);\n\t\t$ssl_check = openssl_verify( $jsonRequest, base64_decode($_SERVER['HTTP_SIGNATURE']), $pem, 'sha1' );\n\t\tif ($ssl_check != 1) \n\t\t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: ' . openssl_error_string(),'NOTICE');\n\t\t\treturn false;\n \t}\n\n\t\t// Parse certificate for validations below\n \t$parsedCertificate = openssl_x509_parse($pem);\n \tif (!$parsedCertificate) \n \t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: x509 Parsing Failure','NOTICE');\n\t\t\treturn false;\n \t}\n\n\t\t// Check that the domain echo-api.amazon.com is present in\n \t// the Subject Alternative Names (SANs) section of the signing certificate\n \tif(strpos( $parsedCertificate['extensions']['subjectAltName'],$echoServiceDomain) === false) \n \t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: subjectAltName Check Failed','NOTICE');\n\t\t\treturn false;\n \t}\n\n\t // Check that the signing certificate has not expired\n \t// (examine both the Not Before and Not After dates)\n\t $validFrom = $parsedCertificate['validFrom_time_t'];\n \t$validTo = $parsedCertificate['validTo_time_t'];\n\t\t$time = time();\n\t\t\n\t\tif (!($validFrom <= $time && $time <= $validTo)) \n\t\t{\n\t\t\t$this->LoggerModel->alexaRequestEntry('Certificate Verification Failed: Expiration Check Failed','NOTICE');\n\t\t\treturn false;\n \t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "908cd8dbdb2793fbeb46aa5749b7f5e0", "score": "0.5426834", "text": "public static function isSecure()\n {\n return (isset($_SERVER['HTTPS']) && $_SERVER['https'] == 'on') ||\n (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) &&\n (\n $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ||\n $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'on'\n )\n );\n }", "title": "" }, { "docid": "fdcb45205cf278a7cbd037d0936d6a32", "score": "0.5423621", "text": "public function isCurrentPageRequiresSsl() {\n\t\tif ( $this->testmode ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn is_checkout();\n\t}", "title": "" }, { "docid": "c8855e758e77090c46e3767e27ffd545", "score": "0.5410739", "text": "protected function isSecure() : bool\n {\n if (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') {\n return true;\n }\n\n if (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] === 443) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "9284ab3874d5dc72c9ca7163afd5c976", "score": "0.5408222", "text": "public function secure()\n\t{\n\t\treturn $this->isSecure();\n\t}", "title": "" }, { "docid": "1bdf716837ae2524d5f4c853314984d5", "score": "0.54046285", "text": "function is_secure() {\n if (getenv('NYMPH_PRODUCTION')) {\n return true;\n }\n if (isset($_SERVER['HTTPS'])) {\n return (strtolower($_SERVER['HTTPS']) == 'on' || $_SERVER['HTTPS'] == '1');\n }\n return (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == '443');\n}", "title": "" }, { "docid": "60498e7b96a8d2d3821444f36cd8141c", "score": "0.5395757", "text": "public function isDisableSSLValidation()\n {\n return $this->disableSSLValidation;\n }", "title": "" }, { "docid": "de5e1aa4caf8307ea4ebbe4b5648e8fa", "score": "0.5395475", "text": "public function isSecure()\n {\n if (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off') {\n return true;\n } elseif (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO']) {\n return true;\n } elseif (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off') {\n return true;\n }\n\n return false;\n }", "title": "" } ]
ee6de95170a40df2d2822cc6a1174263
Adds $break after $character (or replaces it if $fullReplace is TRUE (defaults to FALSE))
[ { "docid": "eb1c4d2379cc30cefbdfef95405b439d", "score": "0.73598576", "text": "public function render($character = '&', $break = 'PHP_EOL', $fullReplace = FALSE) {\n\t\t$content = $this->renderChildren();\n\t\tif ($break == 'PHP_EOL') {\n\t\t\t$break = PHP_EOL;\n\t\t}\n\t\t$break = $fullReplace === FALSE ? $break . $character : $break;\n\t\t$content = str_ireplace($character, $break, $content);\n\n\t\treturn $content;\n\t}", "title": "" } ]
[ { "docid": "c69dcbf9f57d11f6bb08f7fbb99656b2", "score": "0.5336104", "text": "function zen_break_string($string, $len, $break_char = '-') {\n $l = 0;\n $output = '';\n for ($i=0, $n=strlen($string); $i<$n; $i++) {\n $char = substr($string, $i, 1);\n if ($char != ' ') {\n $l++;\n } else {\n $l = 0;\n }\n if ($l > $len) {\n $l = 1;\n $output .= $break_char;\n }\n $output .= $char;\n }\n\n return $output;\n }", "title": "" }, { "docid": "947c3e9c853ee0b99c837c59ea878046", "score": "0.5230823", "text": "function tep_break_string($string, $len, $break_char = '-') {\n $l = 0;\n $output = '';\n for ($i=0, $n=strlen($string); $i<$n; $i++) {\n $char = substr($string, $i, 1);\n if ($char != ' ') {\n $l++;\n } else {\n $l = 0;\n }\n if ($l > $len) {\n $l = 1;\n $output .= $break_char;\n }\n $output .= $char;\n }\n\n return $output;\n }", "title": "" }, { "docid": "553188b348d3915d963b81b5134dbcf3", "score": "0.5184453", "text": "private static function finish(&$word)\n {\n $word = self::str_replace(['a~', 'o~'], ['ã', 'õ'], $word);\n }", "title": "" }, { "docid": "a5fa0c8eba92cfd742eb1dfea291454f", "score": "0.51728904", "text": "protected function append_prepend(&$string, $char){\n\t\t$string = $char . $string . $char;\n\t}", "title": "" }, { "docid": "91edbcd62f4103ef3d9a916cf4328aff", "score": "0.5091181", "text": "private static function isSurroundedBy($argument, $character)\n {\n return 2 < strlen($argument) && $character === $argument[0] && $character === $argument[strlen($argument) - 1];\n }", "title": "" }, { "docid": "13d6069b5995845790857f7d8f1ab0cb", "score": "0.50902456", "text": "public static function before($string, $break) {\n\t\t$break = strpos($string, $break);\n\n\t\tif($break !== false) {\n\t\t\treturn substr($string, 0, $break);\n\t\t} else {\n\t\t\treturn $string;\n\t\t}\n\t}", "title": "" }, { "docid": "ada49a33e50c214f0b87bac3ab7681f2", "score": "0.50817627", "text": "function wrapWith($wrapCharacter)\n{\n return function($x) use ($wrapCharacter) {\n return \"${wrapCharacter}${x}${wrapCharacter}\";\n };\n}", "title": "" }, { "docid": "9503e7c43ff35f2cf996ca11244d03ff", "score": "0.5013329", "text": "public function setEscapeCharacter($char)\n {\n return $this->setControlCharacter(\"escapeCharacter\", $char);\n }", "title": "" }, { "docid": "d720069f99bf6b8cd0841441f60f0d23", "score": "0.49187157", "text": "function linebreak() {\n\t\t$this->appendContent(\" \\\\\\\\ \");\n }", "title": "" }, { "docid": "f62c898d1fc8c0f56cf4f81061934ac6", "score": "0.4888837", "text": "private function escape(string $content, string $character = \"'\"): string {\r\n\r\n $length = strlen($content);\r\n $output = '';\r\n\r\n for($i = 0; $i < $length; $i++) {\r\n\r\n if($content[$i] === $character) {\r\n\r\n $escaped = false;\r\n\r\n for($a = $i; $a >= 0; $a--) {\r\n\r\n if($content[$a] === '\\\\') {\r\n $escaped = !$escaped;\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n\r\n if(false === $escaped) {\r\n $output .= '\\\\';\r\n }\r\n }\r\n\r\n $output .= $content[$i];\r\n }\r\n\r\n return $output;\r\n }", "title": "" }, { "docid": "570bdb49c97ac50ec725d5ef09b0dfb9", "score": "0.48372546", "text": "public static function breakText($string, $replace = '<br/>') {\n\t\treturn str_replace(PHP_EOL, $replace, $string);\n\t}", "title": "" }, { "docid": "e630850b1e620a46d0b12a691c9c5da4", "score": "0.47992617", "text": "function makeNonBreaking( $str )\n{\n\treturn preg_replace( \"/ /\", \"&nbsp;\", preg_replace( \"/-/\", \"&#8209;\", $str ) );\n}", "title": "" }, { "docid": "ef70f9f8b4a3b3de5cebd06a8d185b66", "score": "0.47710907", "text": "protected function printChar($char)\n {\n $this->write($char);\n ++$this->currentPos;\n ++$this->currentTest;\n\n // Print progress and start new line\n if ($this->currentPos >= $this->maxWidth) {\n $this->write($this->getProgress($this->currentTest));\n $this->writeln('');\n\n $this->currentPos = 0;\n\n return;\n }\n }", "title": "" }, { "docid": "afb1c70caefba72b3c01b022fb8e90e2", "score": "0.47519168", "text": "public function resetLineBreakingCharacters()\n {\n $this->sLineBreakingChars = self::SEPARATOR;\n }", "title": "" }, { "docid": "f3b4e8b9efcb6e28ba0eb7a237b87069", "score": "0.4703129", "text": "public function replaceHtmlchar($string){\n\n $avoid=preg_replace(\"/</\",\"&lt;\",$string);\n\n $avoid=preg_replace(\"/>/\",\"&gt;\",$avoid);\n\n return $avoid;\n\n}", "title": "" }, { "docid": "0074b8a58cd3dec6ae2cb1703bb419d8", "score": "0.46958855", "text": "function give_hide_char( $str, $show_char_count, $replace = '*' ) {\n\treturn str_repeat(\n\t\t$replace,\n\t\tstrlen( $str ) - $show_char_count ) . substr( $str, - $show_char_count, $show_char_count\n\t);\n}", "title": "" }, { "docid": "3c50052e7d9e8fcfbdb9ee5bd5f6be74", "score": "0.46896487", "text": "function replaceChar($string)\n{\n return preg_replace('~&([a-z]{1,2})(acute|cedil|circ|grave|lig|orn|ring|slash|th|tilde|uml);~i', '$1', htmlentities($string, ENT_QUOTES, 'UTF-8'));\n}", "title": "" }, { "docid": "0fd04f9361534991f65129a34697e801", "score": "0.4679494", "text": "function replace_r($a) {\n\treturn str_replace(\"\\r\",\"<br>\",$a);\n}", "title": "" }, { "docid": "e58fc83da304dfcfed6574958c5c99f7", "score": "0.46675882", "text": "public function replace($search, $replacement) {\n\t\t\t\tarray_push($this->stack[0], '/'.$search.'/D');\n\t\t\t\tarray_push($this->stack[1], $replacement);\n\t\t}", "title": "" }, { "docid": "3b1d7ebf6d41dba44451f4e26a4f9216", "score": "0.4666562", "text": "public function setSeparator($character) {\r\n\t\t$this->rulesSeparator = $character;\r\n\t}", "title": "" }, { "docid": "e5e5979c8b2b7791604f6b13b03e29d5", "score": "0.46461135", "text": "protected function compileBreak($expression)\n {\n if ($expression) {\n preg_match('/\\(\\s*(-?\\d+)\\s*\\)$/', $expression, $matches);\n\n return $matches ? '<?php break ' . max(1, $matches[1]) . '; ?>' : \"<?php if{$expression} break; ?>\";\n }\n\n return '<?php break; ?>';\n }", "title": "" }, { "docid": "a92831c7d5cceb0293f4e1e114a7bff5", "score": "0.4641448", "text": "function my_wordwrap($t = \"\", $chrs = 0, $replace = \"<br>\")\r\n\t{\r\n\t\tif (!$t or $chrs < 1)\r\n\t\t{\r\n\t\t\treturn $t;\r\n\t\t}\r\n\r\n\t\t$t = preg_replace(\"#([^\\s<>'\\\"/\\.\\\\-\\?&\\n\\r\\%\\\\]\\\\[]{\" . $chrs . \"})#iU\", \" \\\\1\" . $replace, $t);\r\n\r\n\t\treturn $t;\r\n\r\n\t}", "title": "" }, { "docid": "1934e5363103f9820f8c38112c33f044", "score": "0.46261784", "text": "public function wordwrap($string, $width = 75, $break = \"\\n\")\n {\n if ($string) {\n $pattern = '/(.{' . $width . '})/u';\n $string = trim(preg_replace($pattern, \"\\${1}\" . $break, $string));\n }\n\n return $string;\n }", "title": "" }, { "docid": "421391483b301b3161008c1ec924a0ea", "score": "0.46068737", "text": "private function render(string $search, string $replace, string $subject, bool $autoEscape = true) : string\n {\n $textToInsert = $autoEscape ? htmlspecialchars($replace) : $replace;\n return str_replace($search, $textToInsert, $subject);\n }", "title": "" }, { "docid": "f96689d7d777f5209a9c58f88abdc58e", "score": "0.46067038", "text": "function set_escape_characters_highlighting ( $flag = true )\n\t{\n\t\t$this->lexic_permissions['ESCAPE_CHAR'] = ( $flag ) ? true : false;\n\t}", "title": "" }, { "docid": "abdb01b4dc1b85b383ec67fbbe181aee", "score": "0.45848188", "text": "function str_finish($value, $cap)\n {\n return Str::finish($value, $cap);\n }", "title": "" }, { "docid": "a07d163a9373625fd5175ff24cb26467", "score": "0.45173946", "text": "public function setComponentSeparator($char)\n {\n return $this->setControlCharacter(\"componentSeparator\", $char);\n }", "title": "" }, { "docid": "f76316dc7ac7854b3cecbfc937caa5c8", "score": "0.45133868", "text": "public function removeBreak()\r\n {\r\n $this->break = false;\r\n }", "title": "" }, { "docid": "9d799c5ab6049944efe3f23257f0cf63", "score": "0.4506035", "text": "function eolreplace($string, $replacement)\n {\n if (!is_null($replacement))\n {\n $string = str_replace(\"\\r\\n\", $replacement, $string); // prevent double replacement in the next lines!\n $string = str_replace(\"\\n\", $replacement, $string);\n $string = str_replace(\"\\r\", $replacement, $string);\n }\n\n return $string;\n }", "title": "" }, { "docid": "14232558bcfdeaaf21b65b4c6f6ca1cf", "score": "0.45014772", "text": "public function setBreakOnFailure($break);", "title": "" }, { "docid": "731287f8d0ee2883c1e077b2098a67c6", "score": "0.44913092", "text": "public function setMaskingCharacter($var)\n {\n GPBUtil::checkString($var, True);\n $this->masking_character = $var;\n\n return $this;\n }", "title": "" }, { "docid": "f025a8b5993f5252a5f66d20b2a44e15", "score": "0.44862714", "text": "function br2nl2($string) {\n $string = str_ireplace(array(\"<br />\",\"<br>\",\"<br/>\"), \"\\r\\n\", $string);\n return $string;\n}", "title": "" }, { "docid": "7d960e27263c7b3ec2b8b70a19cbe5f5", "score": "0.446472", "text": "public static function tnij($string, $limit, $break=\".\", $pad=\"...\")\n \t{\n \t\tif(strlen($string) <= $limit) return $string;\n \t\n \t\t// is $break present between $limit and the end of the string?\n \t\tif(false !== ($breakpoint = strpos($string, $break, $limit))) {\n \t\t\tif($breakpoint < strlen($string) - 1) {\n \t\t\t\t$string = substr($string, 0, $breakpoint) . $pad;\n \t\t\t}\n \t\t}\n \t\n \t\treturn $string;\n \t}", "title": "" }, { "docid": "29aa037fd14cf14ef758d358733d72d6", "score": "0.44549373", "text": "function singlequoteclosing() {\n\t\t$this->cdata(\"´\");\n }", "title": "" }, { "docid": "ca378d0f3d522700514cca8e1cf6d694", "score": "0.44517338", "text": "public static function wordwrap_cut(string &$str) {\n\t\t// If the string has no length, we're done!\n\t\tif (!$str) {\n\t\t\t$str = '';\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the length is less than our line cap, we don't have to\n\t\t// think too hard about it.\n\t\tif (static::print_length($str) <= static::WRAP) {\n\t\t\t$line = $str;\n\t\t\t$str = '';\n\t\t\treturn $line;\n\t\t}\n\n\t\t$in_marker = false;\t// We are in a formatting rule.\n\t\t$printed = false;\t// We've seen a non-breakable char.\n\t\t$break_num = 0;\t\t// True position of last breakable char.\n\t\t$char_num = 0;\t\t// True position of current char.\n\t\t$line_num = 0;\t\t// Line length (minus markers, etc.).\n\t\t$line = '';\t\t\t// The in-progress line to return.\n\n\t\t// Use a multi-byte-safe split to break out the \"chars\".\n\t\t$chars = v_mb::str_split($str);\n\n\t\tforeach ($chars as $k=>$v) {\n\t\t\t$char_num = $k;\n\n\t\t\t// We are in marker.\n\t\t\tif ($in_marker) {\n\t\t\t\t// We've reached the end of the marker!\n\t\t\t\tif (static::MARKER_END === $v) {\n\t\t\t\t\t$in_marker = false;\n\t\t\t\t}\n\n\t\t\t\t// Always append.\n\t\t\t\t$line .= $v;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// We are entering a new marker?\n\t\t\telseif (static::MARKER_START === $v) {\n\t\t\t\t$in_marker = true;\n\t\t\t\t$line .= $v;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If we've reached a line break, we're done.\n\t\t\tif (preg_match('/\\v/u', $v)) {\n\t\t\t\t--$char_num;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Is this a breakable space?\n\t\t\t$breakable = static::is_breakable($v);\n\t\t\tif ($printed && $breakable) {\n\t\t\t\t$break_num = $k;\n\t\t\t}\n\t\t\telseif (!$printed && !$breakable) {\n\t\t\t\t$printed = true;\n\t\t\t}\n\n\t\t\t// Add to the line.\n\t\t\t$line .= $v;\n\t\t\t++$line_num;\n\n\t\t\t// Are we done?\n\t\t\tif (static::WRAP === $line_num) {\n\t\t\t\t// We might want to peek ahead to see what's there.\n\t\t\t\t$key = $k + 1;\n\t\t\t\tif (isset($chars[$key])) {\n\t\t\t\t\t// If the next character is a marker sequence, let's\n\t\t\t\t\t// finish it.\n\t\t\t\t\tif (static::MARKER_START === $chars[$key]) {\n\t\t\t\t\t\twhile (isset($chars[$key])) {\n\t\t\t\t\t\t\t$line .= $chars[$key];\n\t\t\t\t\t\t\t$char_num = $key;\n\t\t\t\t\t\t\tif (static::MARKER_END === $chars[$key]) {\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t++$key;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// If the next character isn't breakable, rewind.\n\t\t\t\t\telseif ($break_num && !static::is_breakable($chars[$key])) {\n\t\t\t\t\t\t$line = v_mb::substr($str, 0, $break_num + 1);\n\t\t\t\t\t\t$char_num = $break_num;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Chop the string.\n\t\t$str = v_mb::substr($str, $char_num + 1);\n\t\t$str = ltrim($str);\n\n\t\t// Return the line.\n\t\treturn $line;\n\t}", "title": "" }, { "docid": "28a45c699807eef5b08b657c8a849e63", "score": "0.44417408", "text": "function changeToSymbols ($word) {\n //the symbol array for translation\n $letter_symbol_array = Array('@'=>'a', '3'=>'e', '$'=>'s', '!'=>'l');\n $new_word = '';\n\n for($i=0; $i<strlen($word); $i++) {\n\n $symbol = array_search(substr($word, $i, 1), $letter_symbol_array);\n if ($symbol) {\n //if a symbol was found it is added to the new word in place of letter\n $new_word .= $symbol;\n }\n else {\n //else keep the original letter when no symbol found\n $new_word .= substr($word, $i, 1);\n }\n }\n return $new_word;\n}", "title": "" }, { "docid": "9dc112a41be315f1c8bf21d077075cf5", "score": "0.4437633", "text": "public function setWildcardCharacter($wildcardCharacter);", "title": "" }, { "docid": "3f85bd8fad9fc3d8acb612440bcdee34", "score": "0.44292858", "text": "function encoding_set_char($encoding, $slot, $glyphname, $uv) {}", "title": "" }, { "docid": "22206eec005d6a2b02f39f4e4955c65a", "score": "0.44050047", "text": "private function increment()\n {\n $this->currentChar = mb_strtolower(mb_substr($this->content, $this->charIndex, 1));\n $this->currentWord .= $this->currentChar;\n if (!$this->isDirectiveCleanParam()) {\n $this->currentWord = trim($this->currentWord);\n }\n $this->charIndex++;\n }", "title": "" }, { "docid": "b567548f65b02542e243c1fe7ce45df1", "score": "0.439902", "text": "abstract public function replace($buffer, $length);", "title": "" }, { "docid": "0576619ae8d4c3a88e3aefa06dd631b8", "score": "0.43937954", "text": "public function replaceControlChars( $replacement = '' ){\n\t\t$this->string = preg_replace( '/' . self::controlChars . '/u', $replacement, $this->string);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a4571f3a64642beeb361dd8036c93e33", "score": "0.43716288", "text": "function tru_tags_do_wrap($list, $wraptag, $break, $class, $breakclass) {\n\tif (!$wraptag && !preg_match('/^\\w+$/', $break)) {\n\t\treturn join($break.n, $list);\n\t} else {\n\t\treturn doWrap($list, $wraptag, $break, $class, $breakclass);\n\t}\n}", "title": "" }, { "docid": "320407bb8c7429d530f9e97a064af083", "score": "0.43694156", "text": "function lineBreaksDecode($string) {\r\n $tags = array(\"<br>\", \"<p>\", \"</p>\", \"<strong>\", \"</strong>\", \"<em>\", \"</em>\");\r\n $replacement = array(\"LINE_BREAK\", \"P_START\", \"P_END\", \"B_START\", \"B_END\", \"I_START\", \"I_END\");\r\n $newstring = $string;\r\n \r\n for($i=0; $i<7; $i++){\r\n if (strpos($string, $replacement[$i]) !== false) {\r\n $newstring = str_replace($replacement[$i], $tags[$i], $newstring);\r\n }\r\n }\r\n return $newstring;\r\n}", "title": "" }, { "docid": "68b1f475a1bf75590e61e494214612cf", "score": "0.4367533", "text": "function breaker($text){\r\r\n if (!is_string($text)) exit (\"breaker() was not sent a string\");\r\r\n if (!$GLOBALS[\"core\"]->text->add_breaks) return $text;\r\r\n\r\r\n $text_array = PHPWS_Text::sentence($text);\r\r\n $lines = count($text_array);\r\r\n $endings = array (\"<br \\/>\",\r\r\n\t\t \"<br>\",\r\r\n\t\t \"<img .*>\",\r\r\n\t\t \"<\\/?p.*>\",\r\r\n\t\t \"<\\/?area.*>\",\r\r\n\t\t \"<\\/?map.*>\",\r\r\n\t\t \"<\\/?li.*>\",\r\r\n\t\t \"<\\/?ol.*>\",\r\r\n\t\t \"<\\/?ul.*>\",\r\r\n\t\t \"<\\/?dl.*>\",\r\r\n\t\t \"<\\/?dt.*>\",\r\r\n\t\t \"<\\/?dd.*>\",\r\r\n\t\t \"<\\/?table.*>\",\r\r\n\t\t \"<\\/?th.*>\",\r\r\n\t\t \"<\\/?tr.*>\",\r\r\n\t\t \"<\\/?td.*>\",\r\r\n\t\t \"<\\/?h..*>\");\r\r\n\r\r\n $loop = 0;\r\r\n $search_string = NULL;\r\r\n foreach ($endings as $tag){\r\r\n if ($loop) $search_string .= \"|\";\r\r\n $search_string .= $tag.\"\\$\";\r\r\n $loop = 1;\r\r\n }\r\r\n\r\r\n $count = 0;\r\r\n $content = NULL;\r\r\n $preFlag = false;\r\r\n foreach ($text_array as $sentence){\r\r\n $count++;\r\r\n if ($count < $lines){\r\r\n\tif(!$preFlag) {\r\r\n\t if(preg_match(\"/<pre>\\$/iU\", trim($sentence))) {\r\r\n\t $preFlag = true;\r\r\n\t $content .= $sentence.\"\\n\";\r\r\n\t continue;\r\r\n\t }\r\r\n\t if (!preg_match(\"/\".$search_string.\"/iU\" , trim($sentence))) $content .= $sentence.\"<br />\\n\";\r\r\n\t else $content .= $sentence.\"\\n\";\r\r\n\t} else if(preg_match(\"/<\\/pre>\\$/iU\", trim($sentence))) {\r\r\n\t $preFlag = false;\r\r\n\t $content .= $sentence.\"\\n\";\r\r\n\t continue;\r\r\n\t} else {\r\r\n\t $content .= $sentence.\"\\n\";\r\r\n\t}\r\r\n } else \r\r\n\t$content .= $sentence;\r\r\n }\r\r\n return $content;\r\r\n }", "title": "" }, { "docid": "142975e1759e92fa2ab93440819a2807", "score": "0.4366098", "text": "function bb_remove_hard_word_wrap( $content ) {\n\t$replacement = \"{{ DOUBLE LINE BREAK }}\";\n\t$content = preg_replace( \"#\\n\\n#\", $replacement, $content );\n\t$content = preg_replace( \"#\\n#\", ' ', $content );\n\t$content = preg_replace( \"#{$replacement}#\", \"\\n\\n\", $content );\n\t\n\treturn $content;\n}", "title": "" }, { "docid": "89b65b7ad9abe74360bc394700dadd0e", "score": "0.4350666", "text": "public static function GlobalWordWrap($string, $width = 75, $break = \"\\n\")\n {\n $pattern = sprintf('/([^ ]{%d,})/', $width);\n $output = '';\n $words = preg_split($pattern, $string, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\n foreach ($words as $word) {\n if (false !== strpos($word, ' ')) {\n // normal behaviour, rebuild the string\n $output .= $word;\n } else {\n // work out how many characters would be on the current line\n $wrapped = explode($break, wordwrap($output, $width, $break));\n $count = $width - (strlen(end($wrapped)) % $width);\n\n // fill the current line and add a break\n $output .= substr($word, 0, $count) . $break;\n\n // wrap any remaining characters from the problem word\n $output .= wordwrap(substr($word, $count), $width, $break, true);\n }\n }\n\n // wrap the final output\n return wordwrap($output, $width, $break);\n\t}", "title": "" }, { "docid": "46ebf297837b01920bc1123f45129566", "score": "0.43434277", "text": "function doublequoteclosing() {\n\t\t$this->cdata(\"”\");\n }", "title": "" }, { "docid": "a58f71deebc85a5a7a027bcec87a63d1", "score": "0.4339285", "text": "function substituteSubpart($template, $marker, $replacement) {\r\n\t\t$info = $this->getSubpartInfo($template, $marker);\r\n\t\tif ($info) {\r\n\t\t\treturn substr($template, 0, $info['subpartIndex']).$replacement.substr($template, $info['subpartIndex'] + $info['subpartLength']);\r\n\t\t}\r\n\t\treturn $template;\r\n\t}", "title": "" }, { "docid": "0780c681343d76c08d86f6e29d501689", "score": "0.4335034", "text": "public function implode(string $character = '') {\n return $this->reduce(function ($current, $value) use ($character) {\n return $current === null ? strval($value) : $current.$character.strval($value);\n }, null);\n }", "title": "" }, { "docid": "06edf407a996cddb8a40ad4ce690fe56", "score": "0.4332466", "text": "function replaceHTMLChar($val) {\n $val = str_replace(\"&#39;\", \"'\", $val);\n $val = str_replace(\"&nbsp;\", \" \", $val);\n $val = str_replace(\"&amp;\", \"&\", $val);\n $val = str_replace(\"&quot;\", \"\\\"\", $val);\n $val = str_replace(\"&lt;\", \"<\", $val);\n $val = str_replace(\"&gt;\", \">\", $val);\n \n return $val;\n }", "title": "" }, { "docid": "f503b67d39f2423a7d65b731b4607291", "score": "0.43212512", "text": "function interceptChar($str, $num= 500, $isMore = true, &$hasMore=false)\n{\n\t$strResult = \"\";\n\n\tif (strlen($str)>0) {\n\n\t\t$pattern = array(\n\t\t\"/&nbsp;/is\",\n\t\t\"/&gt;/is\",\n\t\t\"/&lt;/is\",\n\t\t\"/(<[^]*?)([^>]*?)(>)/is\"\n\t\t);\n\t\t$replace = array(\n\t\t\"\\t\",\n\t\t\"\\t\",\n\t\t\"\\t\",\n\t\t\"\"\n\t\t);\n\t\t$strTemp = preg_replace($pattern, $replace, $str);\n\t\t$intLen = strlen($strTemp);\n\n\t\tif ($intLen > $num) {\n\t\t\t$strTemp = __cutstr($strTemp,$num);\n\t\t\t$strTemp = str_replace(\"\\t\",\"\",$strTemp);\n\n\t\t\t$arrayStr = preg_split(\"/(&nbsp;)|(&gt;)|(&lt;)|(<[^]*?)([^>]*?)(>)/is\", $str);\n\t\t\tif (is_array($arrayStr)) {\n\t\t\t\tpreg_match_all(\"/(&nbsp;)|(&gt;)|(&lt;)|(<[^]*?[^>]*?>)/is\", $str,$targetArr, PREG_PATTERN_ORDER);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($arrayStr as $temp)\n\t\t\t\t{\n\t\t\t\t\tif ($temp == \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($i>0) {\n\t\t\t\t\t\t\t$strResult .= $targetArr[0][($i-1)];\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$strResult .= ereg_replace(\"/[\\s]/is\",\"&nbsp;\",$temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif (substr(\"$strTemp\",0,strlen($temp)) == $temp) {\n\t\t\t\t\t\tif ($i>0) {\n\t\t\t\t\t\t\t$strResult .= $targetArr[0][($i-1)] . ereg_replace(\"/[\\s]/is\",\"&nbsp;\",$temp);\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$strResult .= ereg_replace(\"/[\\s]/is\",\"&nbsp;\",$temp);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$strTemp = substr($strTemp, (strlen($temp)));\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$strResult .= $targetArr[0][($i-1)] . ereg_replace(\"/[\\s]/is\",\"&nbsp;\",$strTemp);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\n\t\t\t\tfor ($j = $i ; $j < count($targetArr[0]) ; $j ++)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($targetArr[0][($j)]) && substr_count($targetArr[0][$j],'</')) {\n\t\t\t\t\t\t$strResult .= $targetArr[0][($j)];\n\t\t\t\t\t}\n\t\t\t\t\telse\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\n\t\t\t\tif ($isMore && $intLen > $num) {\n\t\t\t\t\t$strResult .= '...';\n\t\t\t\t\t$hasMore\t=\ttrue;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$strResult = $strTemp;\n\t\t\t\tif ($isMore && $intLen > $num) {\n\t\t\t\t\t$strResult .= '...';\n\t\t\t\t\t$hasMore\t=\ttrue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$strResult = $str;\n\t\t}\n\t}\n\t//echo print_r($arrayStr).\"<br>\".print_r($targetArr) .\"<br><br>\";\n\treturn $strResult;\n}", "title": "" }, { "docid": "558a6b9880ae5a4609792bf2b1d48ed3", "score": "0.4321225", "text": "function clearSpecialChar() {\n\n$varReplace= \" Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(Replace(CFSSNO, '.',''),'/',''),'-',''),'*',''),'\\',''),' ',''),'+',''),';',''),':','') \";\nreturn $varReplace;\n\n}", "title": "" }, { "docid": "4729ae09a213a87d19b14d5b1cf46aa5", "score": "0.4308209", "text": "function leadingslashit($string) {\n\t return '/' . unleadingslashit($string);\n\t}", "title": "" }, { "docid": "a7d01c8a3d116d4d1d09c7f76141824f", "score": "0.43042", "text": "function lineBreaksEncode($string) {\r\n $tags = array(\"<br>\", \"<p>\", \"</p>\", \"<strong>\", \"</strong>\", \"<em>\", \"</em>\");\r\n $replacement = array(\"LINE_BREAK\", \"P_START\", \"P_END\", \"B_START\", \"B_END\", \"I_START\", \"I_END\");\r\n $newstring = $string;\r\n \r\n for($i=0; $i<7; $i++){\r\n if (strpos($string, $tags[$i]) !== false) {\r\n $newstring = str_replace($tags[$i], $replacement[$i], $newstring);\r\n }\r\n }\r\n return $newstring;\r\n}", "title": "" }, { "docid": "72c79624bf237ed5e39d77aea470d809", "score": "0.4300029", "text": "private static function _wrapWord($word, $numChar)\n {\n //Split string\n $aGiatri = str_split($word);\n preg_match_all('/./u', $word, $aGiatri);\n\n //Cut string using span and wbr\n $dem = 0;\n $strNew = \"\";\n $strSpan = \"\";\n $aGiatriLength = count($aGiatri);\n\n //Loop data\n for($i=0; $i<$aGiatriLength; $i++)\n {\n $aSubGiatriLength = count($aGiatri[$i]);\n \n for($j=0; $j< $aSubGiatriLength; $j++)\n {\n if($dem == $numChar)\n {\n $strSpan .= sprintf(\"<span>%s</span><wbr/>\", $strNew);\n $strNew = \"\";\n $dem = 0;\n }\n $strNew .= $aGiatri[$i][$j];\n $dem = $dem + 1;\n }\n\n if($dem <= $numChar && $strNew != \"\")\n {\n $strSpan .= $strNew;\n $strNew = \"\";\n $dem = 0;\n }\n }\n\n //Unset all temp variable\n unset($strNew, $word, $dem);\n\n //Return data\n return $strSpan;\n }", "title": "" }, { "docid": "9bca10f59f975db2c3faa2a4cd6df79b", "score": "0.42972413", "text": "function jem_sf_preg_escape_back($string) {\r\n // Replace $ with \\$ and \\ with \\\\\r\n $string = preg_replace('#(?<!\\\\\\\\)(\\\\$|\\\\\\\\)#', '\\\\\\\\$1', $string);\r\n return $string;\r\n}", "title": "" }, { "docid": "816c6aca81f6624e5b0598c3096d69c4", "score": "0.4292371", "text": "function renderBold($word) \n {\n return '<b>'.substr($word, 2, -2).'</b>';\n }", "title": "" }, { "docid": "722ea8a3239ca55b690e67086dbea59f", "score": "0.4290044", "text": "protected function fontify($char) {\n $rv = $char;\n if (array_key_exists($char, $this->charMap)) {\n $rv = $this->charMap[$char];\n }\n return $rv;\n }", "title": "" }, { "docid": "cfe509982e1325b357e8b49cef6ba71f", "score": "0.42809734", "text": "function ncurses_echochar($character)\n{\n}", "title": "" }, { "docid": "f39830faa2b0f6025a55cf6d4d75b4d7", "score": "0.42690077", "text": "public function getWildcardCharacter();", "title": "" }, { "docid": "905a82a5f1255b83b6dccf96ecb717e2", "score": "0.42448437", "text": "function utf8_substr_replace($original, $replacement, $position, $length) {\n\t\t$startString = mb_substr($original, 0, $position, \"UTF-8\");\n\t\t$endString = mb_substr($original, $position + $length, mb_strlen($original), \"UTF-8\");\n\t\t$out = $startString . $replacement . $endString;\n\t\treturn $out;\n }", "title": "" }, { "docid": "013bc419f445e40ae91b7a73343b8008", "score": "0.42447942", "text": "FUNCTION br2nl($string){\r\nRETURN PREG_REPLACE('#<br\\s*?/?>#i', \"\\n\", $string); \r\n}", "title": "" }, { "docid": "f3f52aa3796d21d1660711d9440ce795", "score": "0.4235884", "text": "public function replaceWordPressBreaks($copy)\n {\n return str_replace(\"\\r\\n\", \"<br />\", $copy);\n }", "title": "" }, { "docid": "7956c08beca3df85dbd8fee3fb0f9995", "score": "0.42325923", "text": "function charChanger( $chr )\n{\n $modChr = \"\";\n $asciCode = ord($chr);\n if($asciCode > 64 && $asciCode < 91)\n {\n //ASCI switch (13 +) for ABC..Z\n $asciCode = $asciCode + 13;\n if($asciCode > 90)\n {\n $asciCode = $asciCode - 91 + 65;\n }\n $modChr = chr($asciCode);\n return $modChr;\n } elseif($asciCode > 96 && $asciCode < 123)\n {\n //ASCI switch (13 +) for abc..z\n $asciCode = $asciCode + 13;\n if($asciCode > 122)\n {\n $asciCode = $asciCode - 123 + 97;\n }\n $modChr = chr($asciCode);\n return $modChr;\n }\n elseif ($asciCode > 47 && $asciCode < 58)\n {\n //ASCI switch (5 +) for 0123..9\n $asciCode = $asciCode + 5;\n if($asciCode > 57)\n {\n $asciCode = $asciCode - 58 + 48;\n }\n $modChr = chr($asciCode);\n return $modChr;\n\n }\n\t//return original char if this code block is reached\n return $chr;\n}", "title": "" }, { "docid": "71d460ba1df2ffec13d8278e354096aa", "score": "0.4231785", "text": "public function removeCharacter(string $character): self\n {\n $this->string = (new Actions\\Manipulation($this->string))->remove_character_from_string($character);\n return $this;\n }", "title": "" }, { "docid": "c119041f08a8a0a167345df5fc0b9b9e", "score": "0.42300633", "text": "public function asMask(string $char = '*'): string {\n\t\t\treturn \\str_repeat($char, $this->length());\n\t\t}", "title": "" }, { "docid": "42a12b62af3fdd10dbde6941be9f19d1", "score": "0.42260838", "text": "function wp_pluginner_str_finish($value, $cap)\n {\n return Str::finish($value, $cap);\n }", "title": "" }, { "docid": "899f1e350d6617deb8b1e8cf8cdbe37a", "score": "0.4211739", "text": "function wordbreak($text, $wordsize) \n{\n\nif (strlen($text) <= $wordsize) { return $text; } # No breaking necessary, return original text.\n\n$text = str_replace(\"\\n\", \"\", $text); # Strip linefeeds\n$done = \"false\";\n$newtext = \"\";\n$start = 0; # Initialize starting position\n$segment = substr($text, $start, $wordsize + 1); # Initialize first segment\n\nwhile ($done == \"false\") { # Parse text\n\n\t$lastspace = strrpos($segment, \" \");\n\t$lastbreak = strrpos($segment, \"\\r\");\n\n\tif ( $lastspace == \"\" AND $lastbreak == \"\" ) { # Break segment\n\t\t$newtext .= substr($text, $start, $wordsize) . \" \";\n\t\t$start = $start + $wordsize; }\n\telse { # Move start to last space or break\n\t\t$last = max($lastspace, $lastbreak);\n\t\t$newtext .= substr($segment, 0, $last + 1);\n\t\t$start = $start + $last + 1;\n\t} # End If - Break segment\n\n\t$segment = substr($text, $start, $wordsize + 1);\n\n\tif ( strlen($segment) <= $wordsize ) { # Final segment is smaller than word size.\n\t\t$newtext .= $segment;\n\t\t$done = \"true\";\n\t} # End If - Final segment is smaller than word size.\n\n} # End While - Parse text\n\n$newtext = str_replace(\"\\r\", \"\\r\\n\", $newtext); # Replace linefeeds\n\nreturn $newtext;\n\n}", "title": "" }, { "docid": "43383cbe3e21e18f44b3a5eb2e1367da", "score": "0.42105335", "text": "function utf8_substr_replace($string, $replacement, $start , $length=0 ){\n $ret = '';\n if($start>0) $ret .= utf8_substr($string, 0, $start);\n $ret .= $replacement;\n $ret .= utf8_substr($string, $start+$length);\n return $ret;\n}", "title": "" }, { "docid": "da9b73a54fdc559df50ec4f9979c815d", "score": "0.42103806", "text": "function charAt($i);", "title": "" }, { "docid": "52481bf2b3f2fe020085c87b4c83532a", "score": "0.42047954", "text": "function str_finish($value, $cap) {\n\treturn rtrim($value, $cap).$cap;\n}", "title": "" }, { "docid": "37e374ed254362be9374ac06ba650e4f", "score": "0.42042524", "text": "public function setSegmentTerminator($char)\n {\n return $this->setControlCharacter(\"segmentTerminator\", $char);\n }", "title": "" }, { "docid": "c80e8a065addaaedf60423cb1938c077", "score": "0.42001283", "text": "public function callBreak()\r\n {\r\n $this->break = true;\r\n }", "title": "" }, { "docid": "c6eead04c37b157555f5f17cd62aa0fc", "score": "0.4198332", "text": "public function maskString($char = 'X') {\n $middle = '';\n for ($i = 0; $i < strlen($this->password); $i++) {\n $middle .= $char;\n }\n return $middle;\n }", "title": "" }, { "docid": "3686eb6fa16a048908e1ffed6451a195", "score": "0.41950428", "text": "function replaceSomething($string) : string\n{\n // Comment\n /* Comment */\n return str_replace('something', 'somebody', $string);\n}", "title": "" }, { "docid": "7eac2708ec983f3511d9ca8675b726fe", "score": "0.41811454", "text": "private function replaceBloc($blockTag, $data, $content)\n {\n $scan = array();\n $blockContent = \"\";\n\n $blockTag = PLACE_HOLDER_START . strtoupper($blockTag) . PLACE_HOLDER_END;\n\n $regExp = '/' . $blockTag . '(.*)' . $blockTag . '/s';\n preg_match($regExp, $content, $scan);\n if (isset($scan[0]) && isset($scan[1]))\n {\n $blockTemplate = $scan[1];\n $blockTag = $scan[0];\n\n $blockCount = count($data);\n if (!$blockCount)\n {\n preg_replace($regExp, '', $blockTemplate);\n }\n for ($i = 0; $i < $blockCount; $i++)\n {\n $partBplockConetnt = $blockTemplate;\n foreach ($data[$i] as $tag => $val)\n {\n \tif (!is_array($val))\n \t{\n \t $tag = PLACE_HOLDER_START.strtoupper($tag).PLACE_HOLDER_END;\n \t $partBplockConetnt = str_replace($tag, htmlspecialchars_decode($val), $partBplockConetnt);\n \t}\n \telse\n \t{\n \t $partBplockConetnt = $this->replaceBloc($tag, $val, $partBplockConetnt);\n \t}\n }\n $blockContent .= $partBplockConetnt;\n }\n }\n\n return str_replace($blockTag, $blockContent, $content);\n }", "title": "" }, { "docid": "4458c599c8908e0f7a251ebca52d8598", "score": "0.41803035", "text": "function special_char($str,$lang,$type)\n{\n\t$tag_open = (((($type == 'a' && $str != C_BOT_NAME) || $type == 't' || $type == 'm') && C_ITALICIZE_POWERS) ? \"<I>\":\"\");\n\t$tag_close = ($tag_open != \"\" ? \"</I>\":\"\");\n\treturn $tag_open.($lang ? htmlentities($str) : htmlspecialchars($str)).$tag_close;\n}", "title": "" }, { "docid": "7981da1bfd985a0bdb07a65f9984b24c", "score": "0.41702825", "text": "function outline__replace($str, $search = '', $replace = '') { return str_replace($search, $replace, $str); }", "title": "" }, { "docid": "5aba520fe8d72d84fc3e0d28a5757451", "score": "0.41622663", "text": "function replace($replace, $for, $string){\n return Ctx::getInstance()->app->view->replace($replace, $for, $string);\n}", "title": "" }, { "docid": "bdcc660be7998ac92b6e22ee2390cf96", "score": "0.41617712", "text": "function replace($data, &$element, $c)\r\n \t{\r\n \t\t$params = $this->getParams();\r\n\t\t$domatch = $params->get('php-match');\r\n\t\t$domatch = $domatch[$c];\r\n\t\tif (!$domatch) {\r\n\t\t\t$php_code = $params->get('php-code');\r\n\t\t\treturn eval($php_code[$c]);\r\n\t\t}\r\n\t\treturn $data;\r\n \t}", "title": "" }, { "docid": "869e217b26eb7fe4c6edb580be5abb2d", "score": "0.4158838", "text": "private static function edit_end()\r\n {\r\n self::$skeleton .= Str::SubPosReplace(self::$instance->end, self::$tag, self::$NEEDLE);\r\n }", "title": "" }, { "docid": "1170eaa1d66a03e211eb3d02a6e412ea", "score": "0.41502288", "text": "public function setDataSeparator($char)\n {\n return $this->setControlCharacter(\"dataSeparator\", $char);\n }", "title": "" }, { "docid": "53101b95575e3c8dbe31fd1e95dd119a", "score": "0.41496176", "text": "function fix_code($buffer) {\n return (preg_replace(\"!\\s*/>!\", \">\", $buffer));\n }", "title": "" }, { "docid": "fe41f1bcb89abf57af91553da0771e0c", "score": "0.4144667", "text": "public function anyCharacter(): static\n {\n $this->addToRegex('.');\n\n return $this;\n }", "title": "" }, { "docid": "f31c392a57b5e272d39d0e26ff3152a7", "score": "0.41437614", "text": "public function nl2brReplace($string, $replacement = '<br />') {\n\t\treturn str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), $replacement, $string);\n\t}", "title": "" }, { "docid": "33d8c06e4278da9b38e461afbaf75482", "score": "0.4139406", "text": "function shapeSpace_truncate_string_at_word($string, $limit, $break = \" \", $pad = \"...\") { \n\t\n\tif (strlen($string) <= $limit) return $string;\n\t\n\tif (false !== ($max = strpos($string, $break, $limit))) {\n\n\t\tif ($max < strlen($string) - 1) {\n\t\t\t\n\t\t\t$string = substr($string, 0, $max) . $pad;\n\t\t}\n\t\t\n\t}\n\treturn $string;\n}", "title": "" }, { "docid": "83b9ecb31f613211ca559ad6f872a9ab", "score": "0.4138021", "text": "function mgReplaceExactString($i, $r, $s) {\n\t\tif(strpos(sprintf(\"%s \", $i), $s)!==false) {\n\t\t\treturn str_replace($i, $r, $s);\n\t\t} else if ($i == $s) {\n\t\t\treturn $r;\n\t\t}\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "91b0bfc925da54b9e0225f5db9e69233", "score": "0.41278693", "text": "function j($var)\n{\n echo strtr($var, array(\"'\" => \"\\\\'\", '\\\\' => '\\\\\\\\', '\"' => '\\\\\"', \"\\r\" => '\\\\r', '</' => '<\\/', \"\\n\" => '\\\\n'));\n}", "title": "" }, { "docid": "622d7359bb69e5521a06489aed2c8cef", "score": "0.41246918", "text": "function shapeSpace_truncate_string_at_word($string, $limit, $break = \" \", $pad = \"...\") { \n\t\n\tif (strlen($string) <= $limit) return $string;\n\t\n\tif (false !== ($max = strpos($string, $break, $limit))) {\n\n\t\tif ($max < strlen($string) - 1) {\n\t\t\t\n\t\t\t$string = substr($string, 0, $max) . $pad;\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\treturn $string;\n\t\n}", "title": "" }, { "docid": "bf948a66fd4765a8625d588c2769f4d9", "score": "0.4123159", "text": "public function replace(string $keyword, string $replacement){\r\n\r\n $this->_text = str_replace($keyword, $replacement, $this->_text);\r\n }", "title": "" }, { "docid": "533fc66d2c988e6461fd0351d701f2d2", "score": "0.41227102", "text": "function sd_wordwrap($string, $width = 75, $break = '<br />', $cut = true)\n{\n if(!isset($string) || !strlen($string) || empty($width) || !isset($break) || !strlen($break))\n {\n return $string;\n }\n else\n {\n $string = unhtmlspecialchars($string); // first decode the html\n $string = @wordwrap($string, $width, $break, !empty($cut)); // now wrap the string\n $string = htmlspecialchars($string, ENT_QUOTES); // switch back to htmlspecialchars\n return str_replace(htmlspecialchars($break, ENT_QUOTES), $break, $string); // fix the line break and return string\n }\n\n}", "title": "" }, { "docid": "905e2d7ceea14a8d344b16d9a6717da5", "score": "0.41211814", "text": "function replaceHTMLtag($string)\n\t{\n\t\t\n\t\t$replaced = str_replace(\"<br />\",\"!br!\",$string) ;\n\t\t$replaced = str_replace(\"<br/>\",\"!br!\",$replaced) ;\n\t\t$replaced = str_replace(\"<br>\",\"!br!\",$replaced) ;\n\t\t$replaced = str_replace(\"<BR>\",\"!br!\",$replaced) ;\n\t\t$replaced = str_replace(\"<BR/>\",\"!br!\",$replaced) ;\n\t\t$replaced = str_replace(\"<BR />\",\"!br!\",$replaced) ;\n\t\t$replaced = ereg_replace(\"<[^>]*>\",\"\",$replaced); \n\t\t$replaced = str_replace(\"!br!\",\"<br />\",$replaced) ;\n\t\t\n\t\treturn $replaced ;\n\t}", "title": "" }, { "docid": "9c3132bd6b7356d54aac19a2a0cae988", "score": "0.4117989", "text": "function nlReplace($string,$replace=' ')\n\t\t\t{\n\t\t\t\treturn preg_replace('/\\r\\n|\\r|\\n/iS', $replace, $string);\n\t\t\t}", "title": "" }, { "docid": "d8cdf6b9419c886a87bc906832d75e5a", "score": "0.41175416", "text": "function add_backslashes($advanced_search)\n{\n debug_msg(\"200604260032: function add_backslashes(\\\"$advanced_search\\\") START:\",500);\n debug_msg(\"200604260030: \\$advanced_search = \\\"$advanced_search\\\"\",500);\n $new_adv_search = '(';\n\n $slashed_adv_search = str_replace('\"','\\\"',$advanced_search);\n debug_msg(\"200694260040: \\$slashed_adv_search = \\\"$slashed_adv_search\\\"\",500);\n\n $new_adv_search.= $slashed_adv_search;\n\n\n $new_adv_search.= ')';\n debug_msg(\"200604260031: \\$new_adv_search = \\\"$new_adv_search\\\",500\");\n return $new_adv_search;\n}", "title": "" }, { "docid": "2899cb483a5df0c5d2e47a481f1418a9", "score": "0.41137877", "text": "function stringreplace($input, $search, $replace) {\r\n\treturn str_replace($search, $replace, $input);\r\n/*\twhile(($pos = strpos($input, $search)) > -1) {\r\n\t\t$begin = substr($input, 0, $pos);\r\n\t\t$end = substr($input, $pos + strlen($search));\r\n\t\t$input = $begin . $replace . $end;\r\n\t}\r\n\treturn $input;\r\n*/\r\n}", "title": "" }, { "docid": "3df6f15bdaabc6042793e3b77e26aa2b", "score": "0.41058752", "text": "function insert_display( $name, $replace )\n\t{\n\t\t$name = rtrim( $name, '}' );\n\t\t$this->display['@' . $name . '_BEGIN}(.*?)' . $name . '_END}@s'] = ( ( (bool) $replace ) ? '$1' : NULL );\n\t}", "title": "" }, { "docid": "d18a1a9addf7b311c9a7b6cd4e5eb88d", "score": "0.4104207", "text": "function str_insert($str, $search, $insert)\n {\n $index = strpos($str, $search);\n if ($index === false) {\n return $str;\n }\n return substr_replace($str, $search . $insert, $index, strlen($search));\n }", "title": "" }, { "docid": "445c1b8341ac8bd24b274008482cf822", "score": "0.4102372", "text": "public static function truncate($string, $limit, $break=\".\", $pad=\"...\") {\n if(strlen($string) <= $limit) return $string; \n if(false !== ($breakpoint = strpos($string, $break, $limit))) { \n if($breakpoint < strlen($string) - 1) { \n $string = substr($string, 0, $breakpoint) . $pad; } \n } return $string; \n}", "title": "" }, { "docid": "88dbe412f7d7b884550192ab71bf5f82", "score": "0.4100693", "text": "function mb_string_print($string) {\r\n // every character more than 1 byte should be bolded.\r\n $split_string = preg_split('//u', nl2br($string), -1, PREG_SPLIT_NO_EMPTY);\r\n\r\n foreach ($split_string as $character) {\r\n if (strlen($character) > 1)\r\n echo '<strong>' . $character . '</strong>';\r\n else\r\n echo $character;\r\n }\r\n }", "title": "" }, { "docid": "99bb0fdd93e8491187e1daf45eb65fda", "score": "0.4091335", "text": "function special_char2($str,$lang)\n{\n\treturn ($lang ? htmlentities(addslashes($str)) : htmlspecialchars(addslashes($str)));\n}", "title": "" } ]
484b4a3a996f79d05dc66d9d2f766c3c
Operation allHomepageSectionsAsync Get All Homepage sections
[ { "docid": "1028d7e39130f6c41f7ea3b266fda81c", "score": "0.69806635", "text": "public function allHomepageSectionsAsync($fields = null, $sorts = null)\n {\n return $this->allHomepageSectionsAsyncWithHttpInfo($fields, $sorts)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" } ]
[ { "docid": "3f77d472c7aaef6b47bef61accb40d64", "score": "0.67852515", "text": "public function getAllSections() :array {\n $query='SELECT * FROM section;';\n $this->connection->executeQuery($query);\n \n return $this->connection->getResults();\n }", "title": "" }, { "docid": "835a760e8abac758e90bf624022a1bac", "score": "0.6424431", "text": "public function testAllHomepageSections()\n {\n }", "title": "" }, { "docid": "05b1a25d679e459b9830e3439ca02f8b", "score": "0.6302945", "text": "public function index() {\n $this->addLog(array(\n \"log_type_id\" => LogType::INFO,\n \"message\" => \"Get All Sections\",\n \"status_code\" => Response::HTTP_OK\n ));\n\n return Section::all();\n }", "title": "" }, { "docid": "d4f89b6b1d81a4a6cc1bc0d9fa633bcd", "score": "0.627568", "text": "public static function GetAllSchoolSections()\n {\n \t$ret = array();\n \t$result = &get_instance()->db->order_by('section', 'ASC')->get_where(\"SchoolSections\");\n \t$result = $result->result();\n \tforeach($result as $r){\n \t\t$ret[] = SchoolSections_model::LoadWithData($r);\n \t}\n \treturn $ret;\n }", "title": "" }, { "docid": "f99761d61d8b05f4ffe6a4d9a2ad34bd", "score": "0.6178209", "text": "public function getAllSections()\n {\n $sql = sprintf('select * \n from DanhSachMatCat as mc\n ');\n return $this->_o_DB->fetchAll($sql);\n }", "title": "" }, { "docid": "525fa5472c80be8b80693a659d7dd33d", "score": "0.61447567", "text": "public function allHomepageSectionsAsyncWithHttpInfo($fields = null, $sorts = null)\n {\n $returnType = '\\Funeralzone\\LookerClient\\Model\\HomepageSection[]';\n $request = $this->allHomepageSectionsRequest($fields, $sorts);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "673289022b400031014025fb2369a2c3", "score": "0.6144159", "text": "public function allHomepageSections($fields = null, $sorts = null)\n {\n list($response) = $this->allHomepageSectionsWithHttpInfo($fields, $sorts);\n return $response;\n }", "title": "" }, { "docid": "9acad40d5076e7b51e5e75d8088536de", "score": "0.6134392", "text": "public function getSections()\n {\n return $this->getItems()->getItems()->andWhere(['type' => 'section']);\n\n }", "title": "" }, { "docid": "2e732f755093b7f7a75ea925f0a060e1", "score": "0.60743004", "text": "public function sections() {}", "title": "" }, { "docid": "3a9c6dcfc785d371d0d34f0f5ad5f49f", "score": "0.6069973", "text": "public function getSiteSections()\n\t{\n\t\treturn $this->_config->SiteSections->toArray();\n\t}", "title": "" }, { "docid": "e094baf74d6f0931e0e3955779443fca", "score": "0.60271937", "text": "public function getSections(): array\n {\n return $this->sections;\n }", "title": "" }, { "docid": "e094baf74d6f0931e0e3955779443fca", "score": "0.60271937", "text": "public function getSections(): array\n {\n return $this->sections;\n }", "title": "" }, { "docid": "e094baf74d6f0931e0e3955779443fca", "score": "0.60271937", "text": "public function getSections(): array\n {\n return $this->sections;\n }", "title": "" }, { "docid": "beed9fc650abf312804fee884529bb06", "score": "0.60031843", "text": "function get_all_sections_with_query($conn, $query) {\n\t\treturn get_all_x_with_query($conn, \"Section\", $query);\n\t}", "title": "" }, { "docid": "5fcb990bd82a789447417af3f58122b9", "score": "0.5986731", "text": "public function allHomepageItemsAsync($fields = null, $sorts = null, $homepage_section_id = null)\n {\n return $this->allHomepageItemsAsyncWithHttpInfo($fields, $sorts, $homepage_section_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "bbdc2e7de548ff50fa74a3634a53e7d1", "score": "0.59252346", "text": "public function getSections() {\n return $this->sections;\n }", "title": "" }, { "docid": "cd51a6e22e3b5ef5193242911bfa3b89", "score": "0.59198344", "text": "public function allHomepageSectionsWithHttpInfo($fields = null, $sorts = null)\n {\n $returnType = '\\Funeralzone\\LookerClient\\Model\\HomepageSection[]';\n $request = $this->allHomepageSectionsRequest($fields, $sorts);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Funeralzone\\LookerClient\\Model\\HomepageSection[]',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 400:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Funeralzone\\LookerClient\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n case 404:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Funeralzone\\LookerClient\\Model\\Error',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "002e3f57d5ca88800198e342d86d15f3", "score": "0.5908957", "text": "protected function allHomepageSectionsRequest($fields = null, $sorts = null)\n {\n\n $resourcePath = '/homepage_sections';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n // query params\n if ($sorts !== null) {\n $queryParams['sorts'] = ObjectSerializer::toQueryValue($sorts);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "abf33af1076580778d66abc0d4b02ad6", "score": "0.5901671", "text": "private function getSections() {\n\t\t$sections = array();\n\t\tforeach (craft()->sections->getAllSections() as $section) {\n\t\t\t$sections[$section->id] = $section->name;\n\t\t}\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "ba65dd03d75d850346a01ca1d32abbee", "score": "0.5879167", "text": "public function index()\n {\n return Section::all();\n }", "title": "" }, { "docid": "0e30cf5a63cbc7d8bde4f7be8d844ccb", "score": "0.5877028", "text": "public function index()\n {\n $list = $this->sectionRepo->rootSections('created_at', 'desc');\n\n return view('admin.sections.list', [\n 'sections' => $this->sectionRepo->paginateArrayResults($list->all())\n ]);\n }", "title": "" }, { "docid": "3cf9ea44ace222b113585916945f412f", "score": "0.58567417", "text": "public function renderSections() {\n $render = $this->renderer;\n\n return $this->render(function ($view) use ($render) {\n return $render->getSections();\n });\n }", "title": "" }, { "docid": "6733a2f48bbc2472fb63a2d756e56368", "score": "0.58366483", "text": "public function index()\n {\n return view('admin.pages.section_page.sections');\n }", "title": "" }, { "docid": "e866a126d031ce5705c7717a1343c8db", "score": "0.58129865", "text": "public function getSections()\n\t{\n\t\treturn $this->sections;\n\t}", "title": "" }, { "docid": "d792ee33b91ce333d0d35f0a9b99b2ba", "score": "0.58022124", "text": "public function sections()\n {\n }", "title": "" }, { "docid": "63a43cdef9f2e7830f4e28bc0f44660e", "score": "0.5786153", "text": "protected function get_sections() {\r\n return $this->sections;\r\n }", "title": "" }, { "docid": "5ca557edc77dc86391bfeedcdfcf8df5", "score": "0.5778438", "text": "public function allHomepagesAsync($fields = null)\n {\n return $this->allHomepagesAsyncWithHttpInfo($fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "bf45973b592555e2ffc5d5809ff6938b", "score": "0.576716", "text": "public function getSections()\n {\n return $this->getProperty('sections');\n }", "title": "" }, { "docid": "a44f17ebd7e1bf90d4a9a1b0c76b891e", "score": "0.573472", "text": "protected function get_sections() {\n return $this->get_modinfo()->get_sections();\n }", "title": "" }, { "docid": "1f587c0da45d121605398355a96d5abb", "score": "0.5708073", "text": "private function getSections(): array {\n\t\t$sections = array();\n\t\tforeach (Craft::$app->getSections()->getEditableSections() as $section) {\n\t\t\t$sections[$section->id] = Craft::t('site', $section->name);\n\t\t}\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "5002ab86b3cab5e4836bdaeaeffea2aa", "score": "0.5693498", "text": "public function getSections() {\n if (Request::ajax()) {\n $sections = $this->user->sections()->get();\n $section_selector = array();\n // $section_selector['0'] = 'Choose a section';\n $section_selector[] = array('id'=>'0', 'name'=>'Choose a section');\n foreach ($sections as $section) {\n // $section_selector[$section->id] = $section->customizedName();\n $section_selector[] = array('id'=>$section->id, 'name'=>$section->customizedName());\n }\n \n return array(\n 'code' => 1,\n 'message' => 'Secions has been fetched successfully',\n 'data' => $section_selector\n );\n //return var_dump($section_selector);\n }\n }", "title": "" }, { "docid": "4833deb35cfab705564d88c37dce97fd", "score": "0.5671294", "text": "abstract public function GetChildSections();", "title": "" }, { "docid": "e8b29f852b0f2d80087ffa9ec8849094", "score": "0.564052", "text": "function DisplayAllSectionPages()\n {\n \tif (count($this->menuItems) < 1)\n {\n // menu should be initialized before this gets called.\n // TODO: try to do initialization.\n // Problem: current page selection, url, etc?\n return -1;\n }\n foreach ($this->menuItems as $thisSection=>$menuItem)\n {\n if ($menuItem['parent'] != -1)\n \t{\n \tcontinue;\n \t}\n if (! $menuItem['show_in_menu'])\n {\n continue;\n }\n echo \"<div class=\\\"MainMenuItem\\\">\\n\";\n echo \"<a href=\\\"\".$menuItem['url'].\"\\\"\";\n\t\t\tif (array_key_exists('target', $menuItem))\n\t\t\t\t{\n\t\t\t\techo \" target=\" . $menuItem['target'];\n\t\t\t\t}\n\t\t\tif ($menuItem['selected'])\n\t\t\t\t{\n\t\t\t\techo \" class=\\\"selected\\\"\";\n\t\t\t\t}\n echo \">\".$menuItem['title'].\"</a>\\n\";\n echo \"<span class=\\\"description\\\">\";\n if (isset($menuItem['description']) && strlen($menuItem['description']) > 0)\n {\n echo $menuItem['description'];\n }\n $this->ListSectionPages($thisSection);\n echo \"</span>\\n\";\n echo \"</div>\\n\";\n }\n }", "title": "" }, { "docid": "10324fad1082a5de0ed3181ff8c368b2", "score": "0.56324893", "text": "public static function getSections()\n {\n /** @var \\Illuminate\\View\\Factory $instance */\n return $instance->getSections();\n }", "title": "" }, { "docid": "68b119c07c74451b96b90add4d5f5e40", "score": "0.5627429", "text": "public static function getSections()\n\t{\n\t\t$sections = ForumSection::all();\n\t\tforeach ($sections as $section) {\n\t\t\t$section->latest_post = $section->getLatestPost();\n\t\t}\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "abea7c631eadcf5aa1aa6771d51a5147", "score": "0.5618929", "text": "public function index()\n {\n\n $data = $this->sectionRepository->all();\n return $this->respondWithMessage('payload', $data);\n }", "title": "" }, { "docid": "9833604a4e8cc548c1be230d0e8d0a57", "score": "0.5579679", "text": "public function homepageSectionAsync($homepage_section_id, $fields = null)\n {\n return $this->homepageSectionAsyncWithHttpInfo($homepage_section_id, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "e2e1be2e0ea3b80a63e0fd30be34153c", "score": "0.55606854", "text": "public function index(Request $request)\n {\n $sections = $this->sectionRepository->all(\n $request->except(['skip', 'limit']),\n $request->get('skip'),\n $request->get('limit')\n );\n\n return $this->sendResponse($sections->toArray(), 'Sections retrieved successfully');\n }", "title": "" }, { "docid": "13ecff1b8aec899dc2c6bbdb586f7b8f", "score": "0.554041", "text": "public function index()\n {\n $homeSections = Home::with('secciones')->get();\n\n $homeSectionsIncludes = [\n 'layouts.partials.home-banner',\n 'layouts.partials.home-products',\n 'layouts.partials.home-new',\n ];\n\n return view('home')->\n with([\n 'homeSections' => $homeSections,\n 'homeSectionsIncludes' => $homeSectionsIncludes,\n ]);\n }", "title": "" }, { "docid": "6c4fe9ae71affdac792886891cb2e267", "score": "0.5529964", "text": "public function getArticles(){\n\t\t$articles = DB::table('home-page')->get();\n\t\treturn $articles;\n\t}", "title": "" }, { "docid": "57973d410605799d9d34f747865952a3", "score": "0.55180734", "text": "public function index()\n {\n $sections = Section::all();\n return view('admin.dashboard.section.sections')->with('sections',$sections);\n }", "title": "" }, { "docid": "8152fa4582ec72398c3e38bc8aa86dcd", "score": "0.54797137", "text": "function &getSections() {\n\t\treturn $this->sections;\n\t}", "title": "" }, { "docid": "ba520c4a918e5b1e721a4d3f61228416", "score": "0.5477376", "text": "protected function get_sections_info() {\n return $this->get_modinfo()->get_section_info_all();\n }", "title": "" }, { "docid": "a6c0e00f04f3da0d929ac16d369f4e99", "score": "0.5472391", "text": "public function getSubSections()\n {\n $guid=null;\n if(!$this->isNewRecord){\n $guid=$this->id;\n }\n return $this::find()->andWhere(['__id'=>$guid])->all();\n }", "title": "" }, { "docid": "57a0d027efad7060136e93eb42d6e547", "score": "0.5470464", "text": "public function index()\n {\n $sections = Golongan::paginate();\n return view('admin.section.index',compact('sections'));\n }", "title": "" }, { "docid": "50beb93c51e336671168ce7645db2623", "score": "0.54386497", "text": "public function get_homepage_nodes($page = null) {\r\n return $this->latest_homepage_nodes($page);\r\n }", "title": "" }, { "docid": "1af910f1c128c64c940b9aaf6b87e301", "score": "0.542045", "text": "public function index()\n {\n $section = Cache::remember('sections', 60, function () {\n return Section::orderBy('created_at','desc')->get();\n });\n\n return SectionResource::collection($section);\n }", "title": "" }, { "docid": "f3d36a4af626207025eaaa0342bcf8e3", "score": "0.5409509", "text": "public function sections()\n {\n return $this->hasMany(Section::class);\n }", "title": "" }, { "docid": "8fe5e89a6d941ed06acbf3d6513b3b4b", "score": "0.537865", "text": "public function getSections($directory = NULL);", "title": "" }, { "docid": "7148798712bdf317733f3462486167f9", "score": "0.5361611", "text": "public function index()\n {\n return Sections::with('class', 'staff.user')->paginate(1);\n }", "title": "" }, { "docid": "b3e80242e10f3dcdddbd54df525b02b9", "score": "0.53534925", "text": "public static function getSiteHomePages()\r\n {\r\n // To avoid doing duplicate database queries.\r\n static $multilangSiteHomePages = null;\r\n\r\n if (!isset($multilangSiteHomePages)) {\r\n // Check for Home pages languages.\r\n $db = \\JFactory::getDbo();\r\n $query = $db->getQuery(true)\r\n ->select('language')\r\n ->select('id')\r\n ->from($db->quoteName('#__menu'))\r\n ->where('home = 1')\r\n ->where('published = 1')\r\n ->where('client_id = 0');\r\n $db->setQuery($query);\r\n\r\n $multilangSiteHomePages = $db->loadObjectList('language');\r\n }\r\n\r\n return $multilangSiteHomePages;\r\n }", "title": "" }, { "docid": "5c37d4fa664ef153dfea7a42f2a61de1", "score": "0.535206", "text": "public function getSections( $pageName )\n\t{\n\t\t$context = $this->container->get('aimeos_context')->get();\n\t\t$pagesConfig = $this->container->getParameter( 'aimeos_shop.page' );\n\t\t$result = array( 'aibody' => array(), 'aiheader' => array() );\n\n\t\t$langid = $context->getLocale()->getLanguageId();\n\t\t$tmplPaths = $this->container->get('aimeos')->get()->getCustomPaths( 'client/html' );\n\t\t$view = $this->container->get('aimeos_view')->create( $context->getConfig(), $tmplPaths, $langid );\n\n\t\tif( isset( $pagesConfig[$pageName] ) )\n\t\t{\n\t\t\tforeach( (array) $pagesConfig[$pageName] as $clientName )\n\t\t\t{\n\t\t\t\t$client = \\Client_Html_Factory::createClient( $context, $tmplPaths, $clientName );\n\t\t\t\t$client->setView( clone $view );\n\t\t\t\t$client->process();\n\n\t\t\t\t$result['aibody'][$clientName] = $client->getBody();\n\t\t\t\t$result['aiheader'][$clientName] = $client->getHeader();\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c7eff8903d650e6a87df83a160ed87a1", "score": "0.53271616", "text": "public function index()\n {\n $sections = Section::paginate(10);\n return view('backend.sections.index' , compact('sections'));\n }", "title": "" }, { "docid": "de7fb208dcf8106add9d15872aa2956a", "score": "0.53268623", "text": "public function index()\n {\n $sections = $this->section->getAll();\n return view('sections.index', compact('sections'));\n }", "title": "" }, { "docid": "842251f8d236f781b1ad7e4596f34acd", "score": "0.5309278", "text": "public function index()\n {\n $sections = Section::orderBy('order')->orderBy('created_at')->get();\n\n return View::make('dashboard.sections.index')\n ->withPageTitle(trans('dashboard.sections.sections').' - '.trans('dashboard.dashboard'))\n ->withSections($sections);\n }", "title": "" }, { "docid": "09be59d2b9516fc47ac438dabfde8984", "score": "0.5290571", "text": "public function allHomepageItems($fields = null, $sorts = null, $homepage_section_id = null)\n {\n list($response) = $this->allHomepageItemsWithHttpInfo($fields, $sorts, $homepage_section_id);\n return $response;\n }", "title": "" }, { "docid": "0978ba52ec9e2e57d27bcfb73fabdefa", "score": "0.52854526", "text": "private function _setSections( $show_all = false ){\n\t\tif( $show_all ){\n\t\t\t$sql = \"SELECT * from classified_category order by classified_category_title\";\n\t\t} else {\n\t\t\t$sql = \"SELECT cc.*, count(ci.classified_item_id) as item_count from classified_category as cc left join classified_item as ci on ( ci.classified_item_category_id=cc.classified_category_id ) group by cc.classified_category_title\";\n\t\t}\n\t\t$res = $this->ExecuteArray($sql);\n\t\tif( is_array( $res ) ) {\n\t\t\t$this->data['classified_sections'] = $res;\n\t\t}\n\t}", "title": "" }, { "docid": "4e0cfbd72926925a12f2ca0fb10a46dc", "score": "0.52790594", "text": "public function createHomepageSectionAsync($body = null, $fields = null)\n {\n return $this->createHomepageSectionAsyncWithHttpInfo($body, $fields)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "e01712c171637f6984a2327592bc3b66", "score": "0.5259086", "text": "public function getSections()\n {\n return $this->getQuote()->getSections();\n }", "title": "" }, { "docid": "ea498cf82f5a0d594f6dd8c7e528193f", "score": "0.5256657", "text": "public function sections() {\n\n\t\t$sth = $this->dbh->prepare('select SectionID from Section where EventID = ?');\n\t\t$sth->execute([$this->id]);\n\t\t$rows = $sth->fetchAll(PDO::FETCH_NUM);\n\n\t\t$results = array();\n\t\tforeach($rows as $row) {\n\t\t\tarray_push($results, new CafeSection($this->dbh, $row[0]));\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "1c35957d3412fc61c8e2930a6605706f", "score": "0.52515346", "text": "public function index()\n {\n $sections = Section::latest()->paginate(10);\n\n // return $sections;\n\n return view('sections.index', compact('sections'));\n }", "title": "" }, { "docid": "8725c0f95b45a5f259e3c3487866f1e3", "score": "0.5246163", "text": "public function index()\n {\n //\n $sections=Section::all();\n\n return view('Sections/index',compact('sections'));\n }", "title": "" }, { "docid": "339ab4393eb9433892b94c4d411cdf25", "score": "0.5243471", "text": "public function getPageSectionNames()\n\t{\n\t\t$sections = Config::inst()->get($this->owner->ClassName, \"page_sections\", Config::EXCLUDE_EXTRA_SOURCES);\n\t\tif (!$sections) {\n\t\t\t$sections = [\"Main\"];\n\t\t}\n\t\treturn $sections;\n\t}", "title": "" }, { "docid": "52f008bba6fda596bc51c41cba9f249d", "score": "0.52253056", "text": "public function index()\n {\n $sections = sections::all();\n return view('sections.index',compact('sections'));\n }", "title": "" }, { "docid": "522149591ee3265655832cf55b68a969", "score": "0.5223689", "text": "public function index()\n {\n //$homepages = $this->Homepages->find('all');\n //$this->set('homepages', $homepages);\n }", "title": "" }, { "docid": "db6afbcc92f4d4d524c29cf3e02de8db", "score": "0.5194672", "text": "public function testCreateHomepageSection()\n {\n }", "title": "" }, { "docid": "100b35663e3e11003849ab01e4eff7e4", "score": "0.5177838", "text": "public function listSections(Request $request)\n {\n\t\t$user = Auth::user();\n\t\t\n\t\tif($user){\t\n\t\t\ttry{\n\t\t\t\t$sections = Product::distinct()->get(['product_for']);\n\t\t\t\t$allSections = array();\n\t\t\t\tif (!$sections->isEmpty()) {\n\t\t\t\t\tforeach($sections as $value){\n\t\t\t\t\t\t$allSections[] = $value->product_for;\n\t\t\t\t\t}\n\t\t\t\t\treturn response()->json(['success' => 1, 'statuscode' => 200, 'data' => $allSections], 200);\n\t\t\t\t} else {\n\t\t\t\t\treturn response()->json(['success' => 1, 'statuscode' => 200, 'data' => \"No records found\"], 200);\n\t\t\t\t}\n\t\t\t} catch(\\Exception $e){\n\t\t\t\treturn Response(array('success'=>0,'statuscode'=>500,'error'=>$e->getmessage()),500);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a853ab726733db71c4225a477cb21010", "score": "0.51747125", "text": "public function explore()\n {\n $data = [\n 'aux_fields' => [],\n 'offset' => 180,\n ];\n\n return $this->get(UrlBuilder::RESOURCE_EXPLORE_SECTIONS, $data);\n }", "title": "" }, { "docid": "435597ea5ca0aca7a3d10bae1dd0b0bf", "score": "0.51629525", "text": "public function set_sections()\r\n\t{\t\r\n\t\t// Make sure the accessory only runs on the publish page by updating the \r\n\t\t// database.\r\n\t\t$this->EE->db->where('class', 'Pagehelper_acc');\r\n\t\t$this->EE->db->update('accessories', array('controllers' => 'content_publish|content_edit'));\r\n\t\t\r\n\t\t// Store the CSS for the accessory in $css.\r\n\t\t$css = '\r\n\t\t<style type=\"text/css\">\r\n\t\t\t/* Styles for Page Helper Accessory */\r\n\t\t\t#pages_dropdown {\r\n\t\t\t\tmargin-right: 15px;\r\n\t\t\t}\r\n\r\n\t\t\t#page_url_title {\r\n\t\t\t\twidth: 300px;\r\n\t\t\t\tmargin-left: 15px;\r\n\t\t\t}\r\n\r\n\t\t\t#generate_uri {\r\n\t\t\t\theight: 100%;\r\n\t\t\t\twidth: auto;\r\n\t\t\t\tmargin-left: 15px;\r\n\r\n\t\t\t}\t\r\n\t\t</style>\r\n\t\t';\r\n\t\t\r\n\t\t// Add the CSS to the <head> of the page.\r\n\t\t$this->EE->cp->add_to_head($css);\r\n\t\t\r\n\t\t// Load the Page Helper JavaScript file.\r\n\t\t$this->EE->cp->load_package_js('pagehelper');\r\n\t\t\r\n\t\t// Get the list of pages and output it to the accessory tab\r\n\t\t$this->sections['Pages'] = $this->_page_select(); \r\n\t\r\n\t}", "title": "" }, { "docid": "c91959e79ba432c862d4bc67e53708be", "score": "0.5141255", "text": "public function removeAllSections()\n {\n $this->sections = array();\n }", "title": "" }, { "docid": "20832dc31173bb5809d99ac88a760fd0", "score": "0.51407593", "text": "protected function createHomepageSectionRequest($body = null, $fields = null)\n {\n\n $resourcePath = '/homepage_sections';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "7bed08ba3f67c58b537f4b633f6e0bb2", "score": "0.5134811", "text": "public function getItemsOfAllPages(): array;", "title": "" }, { "docid": "65523774e94dd3b4333148e65b2def23", "score": "0.5132478", "text": "public function index()\n {\n $sections=sections::all();\n return view('sections.sections',compact('sections'));\n \n }", "title": "" }, { "docid": "3a20bd1871191780e86ee37a96eeb91c", "score": "0.51262313", "text": "public function home(Request $request)\n {\n $homePage = getStoreSettings('home_page');\n\n $homePage = (int) $homePage;\n\n if (__isEmpty(getStoreSettings('home_page')) || $homePage === 1) {\n $details = $this->pagesEngine->getDetails(1); // home page id is 1\n\n return $this->loadPublicView('pages.display-details', $details['data']);\n } elseif ($homePage === 2) {\n return $this->getProductsList($request, $categoryID = null, 'products');\n } elseif ($homePage === 3) {\n return $this->getProductsList($request, $categoryID = null, 'products.featured');\n } elseif ($homePage === 4) {\n return $this->getBrandList();\n }\n\n $details = $this->pagesEngine->getDetails(1); // home page id is 1\n\n return $this->loadPublicView('pages.display-details', $details['data']);\n }", "title": "" }, { "docid": "04df15477c25b868d7f6442388ff7f8f", "score": "0.5122731", "text": "public function testHomepageSection()\n {\n }", "title": "" }, { "docid": "f49ee36a2e212b15593422483efd139f", "score": "0.51149094", "text": "public function index()\n {\n $areas = Areas::paginate(20);\n return $areas;\n }", "title": "" }, { "docid": "d1ba3fbd91fe681ba49917c8ad95f8ba", "score": "0.5101773", "text": "public function index()\n {\n $sections = Section::with('teachers','students','assignments')->get();\n\n //dd($sections);\n\n return view('section.index')->with('sections', $sections);\n }", "title": "" }, { "docid": "f50e163de7d42720813809a03413bf77", "score": "0.50983405", "text": "public function getAllEventsInHomePage() {\n $avaiList = $this->getAllAvailableEvents();\n $eventIds = $this->getEventIds();\n $now = Mage::app()->getLocale()->date(Mage::getModel('core/date')->date(), Varien_Date::DATETIME_INTERNAL_FORMAT, null, FALSE);\n $eventIdsArray = explode(',', $eventIds);\n $eventsArray = array();\n foreach ($avaiList as $item) {\n $endTime = Mage::app()->getLocale()->date($item['end_date'], Varien_Date::DATETIME_INTERNAL_FORMAT, null, FALSE);\n if (in_array($item['event_id'], $eventIdsArray)) {\n if ($endTime->compare($now) >= 0) {\n array_push($eventsArray, $item);\n }\n\n }\n }\n return $eventsArray;\n }", "title": "" }, { "docid": "e8f513da34c2f9cc2e29a4f992ee9df6", "score": "0.50925976", "text": "protected function findEntities()\n\t{\n\t\treturn blx()->sections->findSections($this);\n\t}", "title": "" }, { "docid": "04311d92c1f500209f45f568e1825e69", "score": "0.50684977", "text": "public function getSections()\n\t{\n\t\tglobal $wp_settings_fields;\n\n\t\treturn isset( $wp_settings_fields[ $this->slug ] )\n\t\t\t? array_keys( $wp_settings_fields[ $this->slug ] )\n\t\t\t: [];\n\t}", "title": "" }, { "docid": "4e2d8049dbc5728293668e0e1a082e65", "score": "0.50578547", "text": "public function getSubSectionsRecursively()\n {\n $sections_result=[];\n $sub_sections=$this->getSubSections();\n \n foreach ($sub_sections as $section){\n $sections_result[]=$section;\n $arr=$section->getSubSectionsRecursively();\n $sections_result=array_merge($sections_result,$arr);\n }\n return $sections_result;\n }", "title": "" }, { "docid": "6b99cd78a043260eb2cf106f872859d4", "score": "0.5051689", "text": "public function index(){\n Auth::checkAdminLogin();\n\n\t\t// Set the Page Title ('pageName', 'pageSection', 'areaName')\n\t\t$this->_view->pageTitle = array('Homepage');\n\t\t// Set Page Description\n\t\t$this->_view->pageDescription = 'Homepage Index';\n\t\t// Set Page Section\n\t\t$this->_view->pageSection = 'Homepage';\n\t\t// Set Page Sub Section\n\t\t$this->_view->pageSubSection = 'Homepage Index';\n\n\t\t###### PAGINATION ######\n //sanitise or set keywords to false\n if(isset($_GET['keywords']) && !empty($_GET['keywords'])){\n $_GET['keywords'] = FormInput::checkKeywords($_GET['keywords']);\n }else{\n $_GET['keywords'] = false;\n }\n\n $totalItems = $this->_model->countAllData($_GET['keywords']);\n $pages = new Pagination(20,'keywords='.$_GET['keywords'].'&page', $totalItems[0]['total']);\n $this->_view->getAllData = $this->_model->getAllData($pages->get_limit(), $_GET['keywords']);\n $this->_view->countData = $this->_model->countAllData();\n\n\t\t// Create the pagination nav menu\n\t\t$this->_view->page_links = $pages->page_links();\n\n\t\t// Render the view ($renderBody, $layout, $area)\n\t\t$this->_view->render('homepages/index', 'layout', 'backoffice');\n\t}", "title": "" }, { "docid": "611b9235c512f3e36762af58b6c52689", "score": "0.5048861", "text": "public function home() {\n\t\t$context = [\n\t\t\t'url' => aioseo()->helpers->getUrl(),\n\t\t\t'breadcrumb' => $this->breadcrumb->home(),\n\t\t\t'name' => aioseo()->meta->title->getTitle(),\n\t\t\t'description' => aioseo()->meta->description->getDescription()\n\t\t];\n\n\t\t// Homepage set to show latest posts.\n\t\tif ( 'posts' === get_option( 'show_on_front' ) && is_home() ) {\n\t\t\treturn $context;\n\t\t}\n\n\t\t// Homepage set to static page.\n\t\t$post = aioseo()->helpers->getPost();\n\t\tif ( ! $post ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t$context['object'] = $post;\n\t\treturn $context;\n\t}", "title": "" }, { "docid": "37be0689160deb4e9ae9780776eef857", "score": "0.5043286", "text": "protected function getIndexableHomePageBuilderService()\n {\n }", "title": "" }, { "docid": "80bf112c322ce8c9212ea650216257d7", "score": "0.5037917", "text": "public function getSectionList()\n\t{\n\t\treturn $this->sectionList;\n\t}", "title": "" }, { "docid": "28a36788a9921c7f74f8cbfea27cb45b", "score": "0.5032348", "text": "public function getLevelSections()\r\n\t{\r\n\t\t$db = $this->path_session->get_db();\r\n\t\t$query = \"SELECT `section_num`,`section_name` FROM `{$this->pathway_name}_sections{$this->path_qualifier}` WHERE `level_num`='$this->level_order' ORDER BY `section_num`\";\r\n\t\t$db->execute($query);\r\n\t\tif($db->success())\r\n\t\t{\r\n\t\t\t$ret_string = '{\"sections\":[';\r\n\t\t\twhile($row = $db->fetch_assoc2())\r\n\t\t\t{\r\n\t\t\t\t$ret_string.= \"{\";\r\n\t\t\t\t$ret_string .='\"snum\":\"'.$row['section_num'].'\",';\r\n\t\t\t\t$ret_string .='\"sname\":\"'.$row['section_name'].'\"';\r\n\t\t\t\t$ret_string.= \"},\";\r\n\t\t\t}\r\n\t\t\t$s_length = strlen($ret_string);\r\n\t\t\tif($ret_string[$s_length-1]==',')\r\n\t\t\t{\r\n\t\t\t\t$ret_string = substr($ret_string,0,$s_length-1);\t\r\n\t\t\t}\r\n\t\t\t$ret_string .='],\"err\":false}';\r\n\t\t\treturn $ret_string;\r\n\t\t}else{\r\n\t\t\t//return '{\"err\":true,\"query\":\"'.$query.'\"}';\r\n\t\t\treturn $this->errorReport('true',$query,$db->get_error_text(),__METHOD__,__LINE__,\"There was a problem getting the level section list.\");\r\n\t\t}\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "b839b831691a7eb7b89b490ad0f6ca8a", "score": "0.50281", "text": "public function index()\n {\n $homepagecategories = HomePageCategory::all();\n\n return view('backend.homepagecategories.index', compact('homepagecategories'));\n }", "title": "" }, { "docid": "dd159aeb57111d3ff2a0db393fd02f45", "score": "0.50193506", "text": "public function index()\n {\n //$routeCollection = \\Route::getRoutes()->getRoutes();\n //dd($routeCollection);\n //var_dump($routeCollection);\n $names = ['no_admin', 'admin'];\n $routeCollection = \\Route::getRoutes(); // RouteCollection object\n $routes = $routeCollection->getRoutes(); // array of route objects\n $grouped_routes = array_filter($routes, function($route) use ($names) {\n $action = $route->getAction();\n if (isset($action['group'])) {\n // for the first level groups, $action['group_name'] will be a string\n // for nested groups, $action['group_name'] will be an array\n foreach($names as $name) {\n if (is_array($action['group'])) {\n return in_array($name, $action['group']);\n } else {\n return $action['group'] == $name;\n }\n }\n }\n return false;\n });\n\n// array containing the route objects in the 'pages' group\n //dd($routes);\n\n return view('home');\n }", "title": "" }, { "docid": "37578c74ac427ebfbba9bfd40071dd9e", "score": "0.501122", "text": "public function getCareHomesAction()\n {\n $careHomes = new Object\\CareHomes\\Listing();\n $careHomes->load();\n\n foreach ($careHomes->objects as $home) {\n $data[] = [\n 'id' => $home->getId(),\n 'title' => $home->getTitle(),\n 'lat' => $home->getLat(),\n 'lon' => $home->getLon(),\n ];\n }\n\n $this->getHelper('json')\n ->sendJson($data);\n }", "title": "" }, { "docid": "20e6fcb871af5cf2ca4318d9a58158a7", "score": "0.50030243", "text": "function learn_press_get_course_sections() {\n\treturn apply_filters(\n\t\t'learn_press_get_course_sections',\n\t\tarray(\n\t\t\t'lp_lesson',\n\t\t\t'lp_quiz',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "15b5b993bbc3eb643b33183a0f763786", "score": "0.49948964", "text": "public function sections(){\n\t\tif( $this->Get_URL_Element( VAR_1 )){\n\t\t\t$this->_setSection( $this->Get_URL_Element( VAR_1 ) );\n\t\t\t$this->_setSectionItems( $this->Get_URL_Element( VAR_1 ) );\n\t\t\t$this->Set_Template('output', 'classifieds/section_items.php' );\t\n\t\t} else {\n\t\t\t$this->_setSections();\n\t\t\t$this->Set_Template('output', 'classifieds/sections.php' );\n\t\t}\n\t\t$this->_setClassifiedHeaders();\n\t\t$this->Output_Page();\t\n\t}", "title": "" }, { "docid": "6788f9280b1f331dcc4e4021668c8d64", "score": "0.49930808", "text": "function ListSectionPages($section)\n {\n if (! isset($this->menuItems[$section]['children']) || count($this->menuItems[$section]['children']) < 1)\n {\n return;\n }\n\n if ($this->HasDisplayableChildren($section))\n {\n echo \" \".lang('subitems').\": \";\n $count = 0;\n foreach($this->menuItems[$section]['children'] as $thisChild)\n {\n $thisItem = $this->menuItems[$thisChild];\n if (! $thisItem['show_in_menu'] || strlen($thisItem['url']) < 1)\n {\n continue;\n }\n if ($count++ > 0)\n {\n echo \", \";\n }\n echo \"<a href=\\\"\".$thisItem['url'];\n echo \"\\\">\".$thisItem['title'].\"</a>\";\n }\n }\n }", "title": "" }, { "docid": "1a6665015aa346a69ff2ca964337f285", "score": "0.4962161", "text": "public function getSectionsTree() {\n\t\treturn array(\n\t\t\t'name' => 'root',\n\t\t\t'id' => 0,\n\t\t\t'childs' => $this->getSubSections_loop(0)\n\t\t);\n\t}", "title": "" }, { "docid": "eaa98cfe46cc3780414d761d1f3a0ef8", "score": "0.49537873", "text": "function getSections($startrow)\n\t{\n\t\t$qry=\"SELECT * FROM f0 LIMIT $startrow,1\";\n\t\treturn $this->get_all_rows($qry);\n\t}", "title": "" }, { "docid": "537315c01a626f9226c3abd21dd2046a", "score": "0.49479035", "text": "public function getAllSections($user = null) \n \t{\n $sections = $this->_sections;\n\t\tif($user)\n\t\t{\n\t\t\t// check private contact\n\t\t\t$private_contact = $user -> private_contact;\n\t\t\t$viewer = Engine_Api::_()->user()->getViewer();\n\t\t\tif($private_contact == 1)\n\t\t\t{\n\t\t\t\tif($viewer -> getIdentity())\n\t\t\t\t{\n\t\t\t\t\t$subjectRow = $user->membership()->getRow($viewer);\n\t\t\t\t\tif($subjectRow === null && $viewer -> level_id != 6)\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($sections['contact']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tunset($sections['contact']);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if($private_contact == 2)\n\t\t\t{\n\t\t\t\tif($viewer -> getIdentity())\n\t\t\t\t{\n\t\t\t\t\tif($viewer -> level_id != 6)\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($sections['contact']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tunset($sections['contact']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $sections;\n }", "title": "" }, { "docid": "956120076aa8183c8fb3b0931d34c5b6", "score": "0.494536", "text": "public function index()\n {\n // $sections = $this->CourseSection->all();\n // return view('admin.course_sections.index',compact('sections'));\n }", "title": "" }, { "docid": "a297fdf3787a1f53003a33fad7a38c88", "score": "0.49440008", "text": "public function listData($page = NULL){\n try{\n\t\t\t$session = $this->request->session();\n\t\t\tif( (empty($session->read('permissions.'.strtolower('BannerSections'))) || (!array_key_exists('list-data',$session->read('permissions.'.strtolower('BannerSections')))) || $session->read('permissions.'.strtolower('BannerSections').'.'.strtolower('list-data'))!=1) ){\n\t\t\t\t$this->Flash->error(__(\"You don't have permission to access this page\"));\n\t\t\t\treturn $this->redirect(['plugin' => 'admin', 'controller' => 'admin-details', 'action' => 'dashboard']);\n\t\t\t}\n $options = array();\n // ************** start search filter **************** //\n if($this->request->query('search') !== null && $this->request->query('search_by') !== null){\n\t\t\t\t$options['conditions'] = array('title LIKE' => '%'.$this->request->query('search').'%');\n\t\t\t}\n // *********** end of search filter *********************** //\n $options['order'] = array('id asc');\n $options['limit'] = $this->paginationLimit;\n $bannerSectionDetails = $this->paginate($this->BannerSections, $options);\n $this->set(compact('bannerSectionDetails'));\n $this->set('_serialize', ['bannerSectionDetails']);\n }catch (NotFoundException $e) {\n throw new NotFoundException(__('There is an unexpected error'));\n }\n }", "title": "" }, { "docid": "8b30852ea3e2e0e505791657cc1ec931", "score": "0.49435478", "text": "protected function allHomepageItemsRequest($fields = null, $sorts = null, $homepage_section_id = null)\n {\n\n $resourcePath = '/homepage_items';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n // query params\n if ($fields !== null) {\n $queryParams['fields'] = ObjectSerializer::toQueryValue($fields);\n }\n // query params\n if ($sorts !== null) {\n $queryParams['sorts'] = ObjectSerializer::toQueryValue($sorts);\n }\n // query params\n if ($homepage_section_id !== null) {\n $queryParams['homepage_section_id'] = ObjectSerializer::toQueryValue($homepage_section_id);\n }\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "e7f27dcb613446a6a6bf2f4f7c442e2e", "score": "0.49420998", "text": "protected function getPublicSections() {\n return array(\n self::MM_MODULES,\n self::MM_FIELDS,\n self::MM_VIEWS,\n self::MM_LAYOUTS,\n self::MM_LABELS,\n self::MM_ORDEREDLABELS,\n self::MM_CONFIG,\n self::MM_JSSOURCE,\n self::MM_LOGOURL,\n self::MM_OVERRIDEVALUES,\n );\n }", "title": "" }, { "docid": "c5b2e20b615312b8c711efcd225bf3f4", "score": "0.4936081", "text": "public function index()\n {\n $records = Section::orderBy('id', 'ASC')->get();\n\n return view('admin.sections.index')->with('records',$records);\n }", "title": "" } ]
e417d97ae34882924beb6b8b7d11e07b
Get the DBMS object to which this database belongs.
[ { "docid": "29fbd6ff428fe2f75e3374346fe3d18e", "score": "0.72230154", "text": "public function get_dbms()\n\t{\n\t\treturn $this->_dbms;\n\t}", "title": "" } ]
[ { "docid": "7e28b27ba7b761d5778311c4d90182ba", "score": "0.74768716", "text": "protected function getDB(){\n\t\tif (!($this->db instanceof DB)){\n\t\t\t$this->db = DBItem::getDBCLASS($this->parentClassSpecifier);\n\t\t}\n\t\t\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "184bd10e70cc203aa80af1d20b8b6d3e", "score": "0.7308107", "text": "public function getDBObj()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "020084c6d1007927183c9e54f1a1932d", "score": "0.72822416", "text": "public function getDatabase() {\n\t\treturn $this->oDatabase;\n\t}", "title": "" }, { "docid": "0de1340cb9f8f1101f0ea98370911875", "score": "0.72486097", "text": "public function getDatabase() {\n return $this->db;\n }", "title": "" }, { "docid": "0de1340cb9f8f1101f0ea98370911875", "score": "0.72486097", "text": "public function getDatabase() {\n return $this->db;\n }", "title": "" }, { "docid": "eb13ba66bb37fa2043012c55ad377e2d", "score": "0.7195215", "text": "public function getDatabase() {\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "a2eb1ed3a42365739cb58e034b49988d", "score": "0.71905345", "text": "public function get_db()\n\t{\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "5f79bf773629823fe359fb41d7699a0e", "score": "0.71895105", "text": "public function getDB()\n {\n // set the database resource\n return $this->_db;\n }", "title": "" }, { "docid": "64d11a19aef59fd3933ac0438be9eeed", "score": "0.7177375", "text": "public function getDb()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "a30565c5c201e9b61951d3abe8617fb6", "score": "0.7155602", "text": "function getDatabase() {\n\t\treturn getDatabase($this->dbLink);\n\t}", "title": "" }, { "docid": "46694e3e79182bd49859d6bc8ddd9c7e", "score": "0.7144072", "text": "protected function getDbInstance()\n\t{\n\t\treturn $this->getConfig()->olp_db;\n\t}", "title": "" }, { "docid": "46694e3e79182bd49859d6bc8ddd9c7e", "score": "0.7144072", "text": "protected function getDbInstance()\n\t{\n\t\treturn $this->getConfig()->olp_db;\n\t}", "title": "" }, { "docid": "29f41bfd9ddaac6806d11fd6ed578416", "score": "0.7137217", "text": "public static function getDatabase()\n {\n return \\QCubed\\Database\\Service::getDatabase(self::getDatabaseIndex());\n }", "title": "" }, { "docid": "29f41bfd9ddaac6806d11fd6ed578416", "score": "0.7137217", "text": "public static function getDatabase()\n {\n return \\QCubed\\Database\\Service::getDatabase(self::getDatabaseIndex());\n }", "title": "" }, { "docid": "40f6166e7cc1182afeda1a3d217d267c", "score": "0.7128012", "text": "public function getDatabase() {\r\n\t\treturn ($this->DB);\r\n\t}", "title": "" }, { "docid": "bde3ad17cadb521d279ad56b96e9eb34", "score": "0.71248406", "text": "public function getDB()\n {\n return $this->db;\n }", "title": "" }, { "docid": "a809e28110ad2715c4651153f3538eb3", "score": "0.7121243", "text": "public function getDb() {\n return $this->_db;\n }", "title": "" }, { "docid": "52a3b2be26db4dc96a5c65cbe4ebec11", "score": "0.71078926", "text": "public function getDb()\n\t{\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "1a3a77b8ed6d9b8d6be07495085d2249", "score": "0.7102078", "text": "public function getDb() {\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "1a28061b7ea23ae8cb435a2a08dc15e3", "score": "0.7079686", "text": "public function getDb()\r\n {\r\n return $this->db;\r\n }", "title": "" }, { "docid": "1349b3c442416ec3c4f6ca7295cba00f", "score": "0.70748854", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "5b3e635b76d3badb852c7960dd7e4e2a", "score": "0.7072988", "text": "public function getDb() {\n return $this->db;\n }", "title": "" }, { "docid": "7e6dbf4cd7526c328135efdcc48ce17d", "score": "0.7067395", "text": "public function get_db() {\n return $this->db;\n }", "title": "" }, { "docid": "c4d590a3c73d418c8bed1e867fb487b0", "score": "0.7067369", "text": "public function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "c4d590a3c73d418c8bed1e867fb487b0", "score": "0.7067369", "text": "public function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "5af97ec4e6a281ff198cab847bc3c62a", "score": "0.7041235", "text": "private function _get_db()\n\t{\n\t\treturn DB::connection($this->_db_connection);\n\t}", "title": "" }, { "docid": "9db1c448c3f218123618b5ac82d0e932", "score": "0.7039687", "text": "public function getDb() {\n return $this->db;\n }", "title": "" }, { "docid": "d5be7ce694d3ebc98da5a8ae145bd6cc", "score": "0.7027815", "text": "public function getDb() {\n\t\t\treturn $this->db;\n\t\t}", "title": "" }, { "docid": "bbcde67b686fd63b9ddfbd399a27a5ff", "score": "0.70250255", "text": "protected function getDatabase()\n {\n return $this->database;\n }", "title": "" }, { "docid": "4f2eaa9cf946e103ec1668d19097dd74", "score": "0.70064104", "text": "public function getDb()\n {\n return $this->returnComponent('db');\n }", "title": "" }, { "docid": "e9dc45f0c655d23505d9842b13047ef3", "score": "0.7001349", "text": "public function getDatabase() {\n return $this->database;\n }", "title": "" }, { "docid": "04b0d684160330ac71fa9a5a9343cf34", "score": "0.6992252", "text": "public function getDb()\n {\n if (!$this->database) {\n $this->database = \\Dexter\\Db\\Factory::getInstance()->getDb();\n }\n return $this->database;\n }", "title": "" }, { "docid": "36ad5fbecb29c1805ac01e95722c1dcc", "score": "0.6964945", "text": "public static function get(){\r\n\t\tstatic $db = null;\r\n\t\tif ( $db == null )\r\n\t\t\t$db = new DatabaseConnection();\r\n\t\treturn $db;\r\n\t}", "title": "" }, { "docid": "281ea0430bd70d7cb5c1fed9755a55a5", "score": "0.69489807", "text": "public static function db()\r\n {\r\n if(\r\n !isset(Base::$objects['db'])\r\n || !is_object(Base::$objects['db'])\r\n || !Base::$objects['db'] instanceof \\CAT\\Helper\\DB\r\n ) {\r\n if(!DB::connectionFailed()) {\r\n self::storeObject('db',DB::getInstance());\r\n }\r\n }\r\n return Base::$objects['db'];\r\n }", "title": "" }, { "docid": "855f20ac77b07a3c4c61fed4bff6d43d", "score": "0.6939688", "text": "function db() \n\t{\n\t\treturn Database::instance($this->database);\n\t}", "title": "" }, { "docid": "143e9c68414b5b40063b92096b272137", "score": "0.6926259", "text": "protected function getDb() {\n return $this->db;\n }", "title": "" }, { "docid": "143e9c68414b5b40063b92096b272137", "score": "0.6926259", "text": "protected function getDb() {\n return $this->db;\n }", "title": "" }, { "docid": "143e9c68414b5b40063b92096b272137", "score": "0.6926259", "text": "protected function getDb() {\n return $this->db;\n }", "title": "" }, { "docid": "84d5175e1329bfc27d1d5853789c2f15", "score": "0.69102466", "text": "public function getDB ()\n {\n return $this->db;\n }", "title": "" }, { "docid": "e2f492b75e80eb21f0d7837ae7bb25e3", "score": "0.6874696", "text": "public function getDb()\n\t{\n\t\treturn self::$db;\n\t}", "title": "" }, { "docid": "3d86f791c61d9baabb2a8d798ed1e4e4", "score": "0.6869488", "text": "protected function getDBObject() {\n return $this->dbinstance;\n }", "title": "" }, { "docid": "5e9ee9e8edfe8db4ffd0d88a5ed3dc4a", "score": "0.68593055", "text": "protected static function getDB()\n {\n return DB::getInstance()->getConnection();\n }", "title": "" }, { "docid": "49e351e6481ec7c5f60b1513c0fe8275", "score": "0.68531173", "text": "public function getDB() {\n return $this->instControl->getDB();\n }", "title": "" }, { "docid": "d162f02b67175da609532409341e562e", "score": "0.68491113", "text": "public function getDb()\n {\n return $this->db;\n }", "title": "" }, { "docid": "e518dfd867ff821665fc4068587925b7", "score": "0.6835999", "text": "public function getDbPlatform() {\r\n \ttry {\r\n\t if (!is_a($this->dbPlatform, \"DbPlatform\")) {\r\n\t try {\r\n\t $dbSelector = new DbSelector();\r\n\t $this->setDbPlatform($dbSelector->getPlatform($this->getTask(), $this));\r\n\t }\r\n\t catch(DbControlException $e) {\r\n\t throw $e;\r\n\t }\r\n\t }\r\n\t return $this->dbPlatform;\r\n \t}\r\n \tcatch (Exception $e) {\r\n \t\tthrow $e;\r\n \t}\r\n }", "title": "" }, { "docid": "4b06cd9a1c3fff2350e77744220b6056", "score": "0.68357027", "text": "public function database() {\n\t\t\treturn $this->_database;\n\t\t}", "title": "" }, { "docid": "35511b29ede6a10b6c4541cdeb7a0256", "score": "0.6825584", "text": "protected function getDatabase()\n {\n if (isset($this->db)) {\n return $this->db;\n }\n return str_replace('\\\\', '', Str::snake(Str::plural(class_basename($this))));\n }", "title": "" }, { "docid": "f7619e3c30937c5abe8b8776ba803fe2", "score": "0.6822742", "text": "protected function __get_db()\n\t{\n\t\treturn $this->connections['primary'];\n\t}", "title": "" }, { "docid": "fe83a016910045b628bd1cff37a6c69e", "score": "0.6821847", "text": "public function getDatabase()\n\t{\n\t\treturn $this->_dbname;\n\t}", "title": "" }, { "docid": "313bdea7a29fc93771abb898e26cbeff", "score": "0.6821278", "text": "function getDB() {\r\n return $this->db;\r\n }", "title": "" }, { "docid": "b487024ca0d30c74147220b24aca54e0", "score": "0.68206346", "text": "public function getDatabase() { return $this->database; }", "title": "" }, { "docid": "ff12caa260a4d0db75d9ce8d82e5f653", "score": "0.6797392", "text": "function getDatabase() {\n return $this->database;\n }", "title": "" }, { "docid": "211bdacccaed2fa94a6ac5b52315c4d7", "score": "0.6790175", "text": "public function getDb() {\n return \\r\\db($this->settings['database']);\n }", "title": "" }, { "docid": "186fbad0ed4538e5bad0a61d339279e3", "score": "0.67724437", "text": "public static function getDb()\n {\n return static::model()->getDbConnection();\n }", "title": "" }, { "docid": "79e9c794fb1e73ae05c7b029e7ee3e07", "score": "0.6755998", "text": "function getDatabase(){\r\n\t\t\treturn $this->__base;\r\n\t\t}", "title": "" }, { "docid": "5619b468a5f77a57db9900527c84d5a0", "score": "0.67524856", "text": "public function db()\n {\n return $this->db;\n }", "title": "" }, { "docid": "620ccca9929fa863b2004a2dc23556c4", "score": "0.6744221", "text": "public function getDatabaseConnection() {\r\n return $this->db;\r\n }", "title": "" }, { "docid": "98b4329243e8ee18a6badbd2cda715a5", "score": "0.67405516", "text": "public static function GetDB(){\n\t\treturn static::$mInstance;\n\t}", "title": "" }, { "docid": "eb967a31fc40fc31683a533773a371cc", "score": "0.6728584", "text": "protected function getConnection()\n {\n static $_db;\n\n return $_db ?: $_db = $this->instance->instanceConnection();\n }", "title": "" }, { "docid": "34fbaa568f3c110dbd6bde40f58bc550", "score": "0.671879", "text": "public function getDatabaseConnection()\n {\n $connection = self::getActiveRecord()->getDatabase();\n $this->setDatabaseConnection($connection);\n\n return is_object($this->pdo[$connection]) ? $this->pdo[$connection] : null;\n }", "title": "" }, { "docid": "781ec83d56a2aa3f364e55fe8526760b", "score": "0.6715365", "text": "protected static function getDatabase() {\n return Application::getApp()->getDatabase();\n }", "title": "" }, { "docid": "9a56b7a61a1905d4d0f008ff1dd70290", "score": "0.67107534", "text": "public function getAdapter()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "2e262feec4c98553e6b176074c7ab005", "score": "0.6710478", "text": "public function db()\n\t{\n\t\treturn $this->db;\n\t}", "title": "" }, { "docid": "30b72361555ec8b3ec3047cc66b76513", "score": "0.6708562", "text": "public function getDB(){\n return $this->db;\n }", "title": "" }, { "docid": "b5d2e96a948b6ba5b6804d8b92847ca6", "score": "0.6699424", "text": "private function db()\n\t{\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "b5d2e96a948b6ba5b6804d8b92847ca6", "score": "0.6699424", "text": "private function db()\n\t{\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "bf2ee5c7409c7611e96ae668d00d6ed8", "score": "0.66985965", "text": "static function getDb() {\n return self::instance()->connection;\n }", "title": "" }, { "docid": "7403be5943c349442de04521ca36ac6b", "score": "0.6697824", "text": "public function _getDb() {\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "21c6346f76782bb7216b49ec10baf5f9", "score": "0.66971666", "text": "public static function getDb()\n {\n return Yii::$app->db2;\n }", "title": "" }, { "docid": "44d2441d7fa59dd47a699447e33a899f", "score": "0.66788137", "text": "public function getDb()\n {\n return $this->db->getDb();\n }", "title": "" }, { "docid": "4720af3c12a2d6e5be2a9a14790a41f9", "score": "0.66755944", "text": "public static function getDb()\n {\n static $db;\n if ($db === null) {\n $class = StringHelper::dirname(StringHelper::dirname(static::class)) . '\\Module';\n foreach (Yii::$app->getModules() as $module) {\n if ($module instanceof $class) {\n if (is_array($module->db)) {\n if (!array_key_exists('class', $module->db)) {\n $module->db['class'] = Connection::class;\n }\n $db = Yii::createObject($module->db);\n } else {\n $db = is_string($module->db) ? Yii::$app->get($module->db) : $module->db;\n }\n break;\n }\n }\n if ($db === null) {\n // did not find the module, using the default connection\n $db = Yii::$app->get('db');\n }\n }\n return $db;\n }", "title": "" }, { "docid": "52046f82ed030e5a405a13913abe909d", "score": "0.6673019", "text": "public function getConexao()\n {\n return $this->db;\n }", "title": "" }, { "docid": "f0069cec342ff333522186b5da8197c6", "score": "0.66608256", "text": "protected function _getDb()\n {\n return $this->_db;\n }", "title": "" }, { "docid": "bc0d2a922b86857c7cf1798d2b8f4cfd", "score": "0.6658748", "text": "public static function get_db() {\n self::setup_db();\n return self::$db;\n }", "title": "" }, { "docid": "7b75c107292154d15b769696eaa71480", "score": "0.66531205", "text": "public function db()\n {\n return self::$database;\n }", "title": "" }, { "docid": "c17abf885403f785f872ccc47da06e4d", "score": "0.6650634", "text": "protected function getDb() {\n return $this->db::getInstance()->getDb();\n }", "title": "" }, { "docid": "690d5739abedeef32132eb906f39ffce", "score": "0.6647478", "text": "public function getDBManager()\n {\n return $this->getComponent('DB');\n }", "title": "" }, { "docid": "1e48af12d43337f77e71744cb5f3265f", "score": "0.6628266", "text": "public function getDatabase()\n {\n $connectionParams = $this->connections[$this->activeShardId];\n return $connectionParams['dbname'] ?? null;\n }", "title": "" }, { "docid": "b3229051450770d4553374d5be588e42", "score": "0.66236144", "text": "public function getCurrentDatabase() {\n\n return $this->currentDatabase;\n\n }", "title": "" }, { "docid": "494c3f23cdf7ed2b9cd17c42e792bb8b", "score": "0.66213787", "text": "public static function getDb()\n\t{\n//\t\tstatic::init(); // calling the wrong one\n\t\treturn self::$db;\n\t}", "title": "" }, { "docid": "82ebcd583605c104e775423eff745339", "score": "0.66206485", "text": "public static function getDatabase(): DatabaseInterface\n {\n return self::$database;\n }", "title": "" }, { "docid": "49ddce725c9051da2b318e116a92e0bd", "score": "0.66193515", "text": "public function getDb(): PDO\n {\n return $this->_objDb;\n }", "title": "" }, { "docid": "fa5b09c1643830f5acddfa733de1300c", "score": "0.6617892", "text": "public function getDatabase(){\r\n \r\n return $this->database;\r\n \r\n }", "title": "" }, { "docid": "306c76167babf843c936a8457b1265f4", "score": "0.6595055", "text": "public function getDbms(): string;", "title": "" }, { "docid": "52105dae7a3804f70cfc2570b76efa51", "score": "0.65831196", "text": "public function db(){\n\t\treturn $this->_db;\n\t}", "title": "" }, { "docid": "ea3b79e9b9b038088d5a1f73bbec7c28", "score": "0.6581013", "text": "public static function getDb()\n\t{\n\t\treturn self::get(self::SERVICE_DB, self::DEFAULT_NAME);\n\t}", "title": "" }, { "docid": "03f84dd5bdbe7ce4950b6f979ef8818e", "score": "0.65714264", "text": "public function getDatabase(): \\Yana\\Db\\IsConnection\n {\n return $this->_db;\n }", "title": "" }, { "docid": "5780d459c430e81993f61c07760814ff", "score": "0.65681046", "text": "public static function getDB() {\r\n\r\n if (empty(self::$databaseConnection) ||\r\n !is_object(self::$databaseConnection) ||\r\n self::$databaseConnection instanceof \\PDO === false) {\r\n throw new ObjectModelException(\"databaseConnection has a wrong or \" .\r\n \"non-PDO value. Please define database connection via setDB method \" .\r\n \"(see README.md)\");\r\n }\r\n\r\n return self::$databaseConnection;\r\n }", "title": "" }, { "docid": "79fc9a3d94ac2e1a7c36a4c3dd2c103b", "score": "0.6565438", "text": "final protected function db()\n {\n return $this->db;\n }", "title": "" }, { "docid": "59f0cf2cf65450603050f86a438ad164", "score": "0.6558832", "text": "private static function getDatabase() {\n return Config\\Database::getInstance();\n }", "title": "" }, { "docid": "1a4d909f4a839229bd4de7aa4382f3ad", "score": "0.6558427", "text": "public static function getDatabase()\n {\n self::setupDatabase(); // required in case this is called before Idiorm is instantiated\n return self::$database;\n }", "title": "" }, { "docid": "ec5076e9e6d95c69aa33459e08195ade", "score": "0.6545271", "text": "public function getDb() {\n\t\treturn $this->_config['db'];\n\t}", "title": "" }, { "docid": "c78947c9fbdaf937450411fe831981b1", "score": "0.653733", "text": "public function getDb(){\n\t\tif(Config::get()->read('production')){\n\t\t\t$config = require(ROOT.'/app/config/database.php');\n\t\t}else{\n\t\t\t$config = require(ROOT.'/app/config/local/database.php');\n\t\t}\n\t\tif(is_null($this->db_instance)){\n\t\t\t$this->db_instance = new Database($config);\n\t\t}\n\t\t\n\t\treturn $this->db_instance;\n\t}", "title": "" }, { "docid": "8f3fa70ae4ca0863548f9d614f3655b2", "score": "0.65272254", "text": "public static function GetDatabase() {\r\n \r\n return (new AppCore)->getDatabaseConnection(); \r\n \r\n }", "title": "" }, { "docid": "bab112e7e24615390da9d075a5bdb2fb", "score": "0.652541", "text": "public static function getDb() {\n return Yii::$app->get('db_simak');\n }", "title": "" }, { "docid": "6210e9c660fd87feca4323e64ae4250f", "score": "0.651838", "text": "public function getDefaultDatabase()\r\n\t{\r\n\t\treturn $this->db;\r\n\t}", "title": "" }, { "docid": "091b3a88eec58a51e217258f1f3ff97a", "score": "0.65057516", "text": "protected function getConDB()\n\t{\n\t\treturn $this->conDB;\n\t}", "title": "" }, { "docid": "5f88d7188a0cebecb7b24a96eb1dff18", "score": "0.6491828", "text": "public static function database() {\n if (!self::$database) {\n self::$database = new pdoMap_Database_Manager(); \n }\n return self::$database;\n }", "title": "" }, { "docid": "51fead8a2a56e31285cc5b515180ede8", "score": "0.6491007", "text": "public static function getInstance() {\n return self::getDatabase();\n }", "title": "" }, { "docid": "437825411d01125a92b832b7bc057a5a", "score": "0.6481991", "text": "public static function getDb()\r\n\t\t{\r\n\t\t\treturn Yii::$app->db;\r\n\t\t}", "title": "" } ]
23f9b03af28b2003b15c432f5f725c08
Get the [optionally formatted] temporal [processdate] column value.
[ { "docid": "1ae3227b5516bf167e9cf3d1773eff11", "score": "0.6618826", "text": "public function getProcessdate($format = 'Y-m-d H:i:s')\n\t{\n\t\tif ($this->processdate === null) {\n\t\t\treturn null;\n\t\t}\n\n\n\t\tif ($this->processdate === '0000-00-00 00:00:00') {\n\t\t\t// while technically this is not a default value of NULL,\n\t\t\t// this seems to be closest in meaning.\n\t\t\treturn null;\n\t\t} else {\n\t\t\ttry {\n\t\t\t\t$dt = new DateTime($this->processdate);\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException(\"Internally stored date/time/timestamp value could not be converted to DateTime: \" . var_export($this->processdate, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ($format === null) {\n\t\t\t// Because propel.useDateTimeClass is TRUE, we return a DateTime object.\n\t\t\treturn $dt;\n\t\t} elseif (strpos($format, '%') !== false) {\n\t\t\treturn strftime($format, $dt->format('U'));\n\t\t} else {\n\t\t\treturn $dt->format($format);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "18ada3cf4ad3e9f009fec0d3a5322c56", "score": "0.6206568", "text": "private function Fetch_Last_Process_Date( $process = null )\n\t{\n\t\tif( empty($process) )\n\t\t{\n\t\t\tif( empty($this->process) )\n\t\t\t\t$process = self::STEP_RETURN;\n\t\t\telse\n\t\t\t\t$process = $this->process;\n\t\t}\n\n\t\t$process = $this->db->quote($process);\n\n\t\t$last_run_query = \"\n\t\t\tSELECT\n\t\t\t\tDATE_FORMAT(MAX(business_day),'%Y%m%d') AS last_run_date\n\t\t\t FROM\n\t\t\t \tprocess_log\n\t\t\t WHERE\n\t\t\t \tstep = '{$process}'\n\t\t\t AND\tstate = 'completed'\n\t\t\t AND\tcompany_id = {$this->company_id}\n\t\t\t\";\n\n\t\t$last_run_result = $this->db->query($last_run_query);\n\t\t$row = $last_run_result->fetch(PDO::FETCH_ASSOC);\n\n\t\tif( ! empty($row['last_run_date']) )\n\t\t\treturn $row['last_run_date'];\n\t\telse\n\t\t\treturn '19700101';\n\t}", "title": "" }, { "docid": "5ce15fcd680f3cdfc0a57c756ba0e71d", "score": "0.56955934", "text": "function col_scheduleddate($row) {\n return userdate($row->scheduleddate);\n }", "title": "" }, { "docid": "b91f1d6ed0f42709718e5e24c4ac5599", "score": "0.56583875", "text": "public function getValue()\n {\n $value = parent::getValue();\n\n //trimovani kvuli tomu ze by time_format mohl byt prazdny\n return DateFormat::getUserDate($value, arr::get($this->config, 'php_date_format'));\n }", "title": "" }, { "docid": "08e0f0dc05347174ae18f66ea17698f2", "score": "0.563815", "text": "public function column_date($item)\n {\n return $item['date'];\n }", "title": "" }, { "docid": "7f7905fe459b0e4ef31f9d3d74a1e5c9", "score": "0.5617115", "text": "public function getPackageFormatCustomExecDateParameter()\n {\n return $this->packageFormatCustomExecDateParameter;\n }", "title": "" }, { "docid": "12d65a1ae232cb968d5e3b89d455573d", "score": "0.5602283", "text": "public function setProcessdate($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->processdate !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->processdate !== null && $tmpDt = new DateTime($this->processdate)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->processdate = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = AmendmentsubmissionqcSearchPeer::PROCESSDATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8186cf12c285044381729f17d933a26b", "score": "0.5578254", "text": "public function setProcessdate($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->processdate !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->processdate !== null && $tmpDt = new DateTime($this->processdate)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->processdate = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = QcSearchPeer::PROCESSDATE;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1c41b7fbd540edf0e25b9233f789d9a2", "score": "0.5543114", "text": "public function getValue()\n {\n return $this->format('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "9fc4917ed6a5cf1c318dbf1de50f8bc2", "score": "0.55033255", "text": "public function getDateOfEntry(){\n return (String)$this->dateOfEntry;\n }", "title": "" }, { "docid": "2b53b8a3a1eafce016b0941efdd8333e", "score": "0.5481553", "text": "public function getPodtexptdate()\n {\n return $this->podtexptdate;\n }", "title": "" }, { "docid": "591e31c8efc0f2059c8d2e87d74b5040", "score": "0.5462971", "text": "public function getProcessedAt () : DateTime\n\t{ return $this->processedAt; }", "title": "" }, { "docid": "f41fee57391574b1473a3de8c2c6b80e", "score": "0.54254997", "text": "protected function evaluateDatestamp()\n\t{\n\t\tif ($this->datestamp instanceof Expression) {\n\t\t\treturn $this->datestamp;\n\t\t} elseif ($this->datestamp !== null) {\n\t\t\treturn call_user_func($this->datestamp);\n\t\t} else {\n\t\t\treturn date(Tools::DATETIME_DATABASE);\n\t\t}\n\t}", "title": "" }, { "docid": "4218b3c72300b9d88cab1686e9ec78f2", "score": "0.5422076", "text": "public function getProgramDateAttribute()\n {\n return excel_date($this->registration->program->start_date);\n }", "title": "" }, { "docid": "ee5c0355c9759edb27ff3f3488504847", "score": "0.54094195", "text": "public function getFieldValue()\n {\n return $this->getDate();\n }", "title": "" }, { "docid": "1ece6ffc6b51a2a036deec81b1b9bec1", "score": "0.54091454", "text": "public function getDate()\n {\n return isset($this->date) ? $this->date : '';\n }", "title": "" }, { "docid": "e326072184dd9a15c9668e1a1dea0a84", "score": "0.5381284", "text": "public function dateT()\n\t{\n\t\treturn $this -> dateT;\n\t}", "title": "" }, { "docid": "573230e63525531b717d1146651d8f0a", "score": "0.5377815", "text": "public function getSourceForecastIssueDate()\n {\n return $this->sourceForecastIssueDate;\n }", "title": "" }, { "docid": "45ae9d63ae21670e9496c94734eca01a", "score": "0.53428185", "text": "public function getSystemDate()\n\t{\n\t\t$result = $this->doCall('systemdate');\n\n\t\treturn $result['SystemDate'];\n\t}", "title": "" }, { "docid": "6e380d0677b7a63199588f38c8155a47", "score": "0.5336959", "text": "public function getDate()\n {\n $value = $this->get(self::DATE);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "39b627ac369d7f06ae993ec7a49e0797", "score": "0.531353", "text": "public function getDateWorked(): string\n {\n //TODO: Use constant for format string\n return $this->start_time->format('Y-m-d');\n }", "title": "" }, { "docid": "a7ca6ecd4e727ceedd1f597469578494", "score": "0.53055555", "text": "protected function getTimeStamp(){\n\t\t$result = $this->file->getProperty('tstamp');\n\t\tif ($this->processedFile) {\n\t\t\t$result = $this->processedFile->getProperty('tstamp');\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c655728d60fbb5557b5235e3b6269c0e", "score": "0.5298241", "text": "function col_originaldate($row) {\n return userdate($row->originaldate);\n }", "title": "" }, { "docid": "92e97725c08895385b9f30131b88a609", "score": "0.5289155", "text": "public function export_value() {\n $value = $this->get_value();\n\n if ($this->is_empty($value)) {\n return null;\n }\n\n // Check if time needs to be included.\n if ($this->get_field()->get_configdata_property('includetime')) {\n $format = get_string('strftimedaydatetime', 'langconfig');\n } else {\n $format = get_string('strftimedate', 'langconfig');\n }\n\n return userdate($value, $format);\n }", "title": "" }, { "docid": "a2231339a087fcd1e51d4cc1bec1bace", "score": "0.5273019", "text": "public function getDateArgument() {\n return $this->dateArgument;\n }", "title": "" }, { "docid": "3b09f769fb1188976a14eea08f5bfbf7", "score": "0.5264573", "text": "static function prepare_date_value_for_email( $p_value ) {\n\t\tif( $p_value != null ) {\n\t\t\treturn date( \\Core\\Config::mantis_get( 'short_date_format' ), $p_value ) ;\n\t\t}\n\t}", "title": "" }, { "docid": "8148beae9cc68ab988566dff0390bbe5", "score": "0.52592534", "text": "public function column_date($record)\n\t\t{\n\t\t\techo date('d-M-Y H:i:s', $record->created_at);\n\t\t}", "title": "" }, { "docid": "7640556feb3bc0d65e3dc41b73bb25f6", "score": "0.5248829", "text": "protected function currentDateFormatted(): string\n {\n return $this->currentDate->format('Y_m_d__His');\n }", "title": "" }, { "docid": "8d26a2f30474ec4106150b89b1cdbf91", "score": "0.52144855", "text": "public function getDate(){\n\t\treturn $this->_formatedDate;\n\t}", "title": "" }, { "docid": "6b3ea5b69ea045d273ba7331cb9e1fde", "score": "0.51957387", "text": "public function format()\n {\n if( ctype_digit((string)$this->value) )\n {\n $dateTime = date($this->format, $this->value);\n }\n else\n {\n $dateTime = date($this->format, strtotime($this->value));\n }\n\n if( $this->supHtmlSuffix )\n {\n return preg_replace('/(st|nd|rd|th)/', '<sup>\\\\1</sup>', $dateTime);\n }\n\n return $dateTime;\n }", "title": "" }, { "docid": "3e61fbe3e263d0c02b55da92720cfd5c", "score": "0.51943815", "text": "public function getReturnDate()\n {\n return parent::getValue('return_date');\n }", "title": "" }, { "docid": "4281c828a323b7b0c2b274a2b7a68a2b", "score": "0.51860756", "text": "public function col_timesubmitted($row) {\n return userdate($row->timesubmitted);\n }", "title": "" }, { "docid": "40bdfa3e7bf39a9ad88308cbd04794bb", "score": "0.51694566", "text": "public function value()\n\t{\n\t\treturn $this->getTimeOnSite();\n }", "title": "" }, { "docid": "d59b7e7aafa1ad25563f5d7073d520d8", "score": "0.5165404", "text": "public function getDbDate()\n\t{\n\t\treturn $this->dbdateformat;\n\t}", "title": "" }, { "docid": "4160224f15e37c4971f3b4da225e8074", "score": "0.51442635", "text": "function col_updateddate($row) {\n return userdate($row->updateddate);\n }", "title": "" }, { "docid": "58947db47ec953fc04938d7da8877878", "score": "0.51319295", "text": "public function getEffectiveDate()\n {\n $value = $this->get(self::EFFECTIVEDATE);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "2101f7edaffb33f3a998bc5e26b61f73", "score": "0.51167977", "text": "public function getPostDate(): string\n {\n return $this->postDate;\n }", "title": "" }, { "docid": "2d17cbf9e50b36ff79f5fb2687d19ba5", "score": "0.50990874", "text": "public function getDTTM() {\n\t\treturn date(self::DATE_FORMAT);\n\t}", "title": "" }, { "docid": "45b7aa29449f9edf05654ded1825af66", "score": "0.50989705", "text": "function sysdate()\n\t\t{\n\t\t\treturn \"SYSDATE\";\n\t\t}", "title": "" }, { "docid": "161e8460d26e17a4763e9cdc8338ea94", "score": "0.5092591", "text": "public function getUserDate()\n\t{\n\t\treturn $this->userdateformat;\n\t}", "title": "" }, { "docid": "64ef9822b4a9bc751a56747b811d64bd", "score": "0.50884867", "text": "protected function processReqDate(string $column, $value)\n {\n if ('datetime' === $this->getColumnCast($column) && $this->isDate($value)) {\n return $value . ' 23:59:59';\n }\n return $value;\n }", "title": "" }, { "docid": "e5178debe2f2b48b1aa0d8340e6248da", "score": "0.50758463", "text": "private function getDate(){\n\n\t\treturn Date::get( $this->date );\n\n\t}", "title": "" }, { "docid": "098ad211b1a09b50b4e7b94ef087119f", "score": "0.507256", "text": "public function getResultDatetime()\n {\n return $this->resultDatetime;\n }", "title": "" }, { "docid": "9fa142fe2e7802d773bbab99362f1eea", "score": "0.50583756", "text": "public function getDateNotimeAttribute()\n {\n return explode(' ', $this->date)[0];\n }", "title": "" }, { "docid": "d7fd1693964ae4df15f69cd6b92b25d3", "score": "0.50538653", "text": "public function getSpecialToDate()\n {\n return $this->_getData('special_to_date');\n }", "title": "" }, { "docid": "2bf2dc1a363a0a7ef3fce0021e13c9ad", "score": "0.505356", "text": "public function getDateString()\n {\n return $this->date_string;\n }", "title": "" }, { "docid": "2d53abfca3420042d3904fd1d3e91e18", "score": "0.50489837", "text": "public function getCurrentDt()\r\n {\r\n return gmdate('Y-m-d H:i:s');\r\n }", "title": "" }, { "docid": "8f248517c77f14b912c6c0babc408cd7", "score": "0.5044217", "text": "public function getDate(): string\n {\n return $this->date;\n }", "title": "" }, { "docid": "27c092897afa32e67bd28711e06b7660", "score": "0.50430846", "text": "function wpmanual_get_the_date() {\r\n\t\tglobal $wpmanual_template;\r\n\r\n\t\t$date = $wpmanual_template->query->post->post_modified_gmt;\r\n\t\t\r\n\t\t$dateformatted = mysql2date(get_option('date_format'), $date );\r\n\t\t\r\n\t\treturn apply_filters( 'wpmanual_get_the_date', $dateformatted );\r\n\t}", "title": "" }, { "docid": "ce57edb581ed6e3dbf63a9ae4e2c99cc", "score": "0.50381804", "text": "public function getIssueDate()\n {\n if (array_key_exists(\"issueDate\", $this->_propDict)) {\n if (is_a($this->_propDict[\"issueDate\"], \"\\DateTime\") || is_null($this->_propDict[\"issueDate\"])) {\n return $this->_propDict[\"issueDate\"];\n } else {\n $this->_propDict[\"issueDate\"] = new \\DateTime($this->_propDict[\"issueDate\"]);\n return $this->_propDict[\"issueDate\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "54063f5db5825e00c9d8fcf54cb202d1", "score": "0.5037111", "text": "public function getDate($column, $format = '%x');", "title": "" }, { "docid": "0be3b837b5458654aa59f9a3923ba135", "score": "0.503581", "text": "public function getTaskDate(): \\DateTime {\n\t\treturn ($this->taskDate);\n\t}", "title": "" }, { "docid": "50246ee3cca1681a371c0c554236c5ec", "score": "0.5033396", "text": "public function getPrisonTime(){\n if($this->dateOfImprisonment && $this->dateOfRelease){\n return $this->dateOfImprisonment.\"-\".$this->dateOfRelease;\n }else if($this->dateOfImprisonment){\n return $this->dateOfImprisonment;\n }else if($this->dateOfRelease) {\n return $this->dateOfRelease;\n }\n return \"\";\n }", "title": "" }, { "docid": "4cce2321101773f8156ea2829745d938", "score": "0.5032665", "text": "public function date() {\n\t\treturn $this->post->post_date;\n\t}", "title": "" }, { "docid": "7537bf27e87df8f92bc0890c6307c7d3", "score": "0.50271904", "text": "public function getValue() {\n\t\t$date = parent::getValue();\n\n\t\tif (is_object($date)) {\n\t\t\tif ($date instanceof \\DateTime) return $date;\n\t\t\telse throw new RenderableConfigurationException(sprintf('Wrong configured value for field [%s]', $this->getAttribute()));\n\t\t}\n\n\t\tif ($date === 0 || strpos($date, '0000-00-00') !== false) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (is_numeric($date)) {\n\t\t\treturn (new \\DateTime())->setTimestamp($date);\n\t\t} else {\n\t\t\treturn new \\DateTime($date);\n\t\t}\n\t}", "title": "" }, { "docid": "7622489a8307146aa71f201eee7b47f2", "score": "0.5025815", "text": "public function current() {\n $parentKey = parent::key();\n $parentValue = parent::current();\n $returnValue = \"\";\n if (($parentKey == \"IssuedDate\" || $parentKey == \"ReturnDueDate\") && (!empty($parentValue))) {\n // For Non-Empty Date Fields modify date format\n $returnValue = date(\"d/m/Y\", strtotime($parentValue));\n } else {\n // For all others output original value\n $returnValue = $parentValue;\n }\n return \"<td>{$returnValue}</td>\";\n }", "title": "" }, { "docid": "f95a283508c370b900083f57a3302fea", "score": "0.5019603", "text": "function getDateExtract($fieldname, $format='%Y-%m-%d') { /* {{{ */\n\t\tswitch($this->_driver) {\n\t\t\tcase 'mysql':\n\t\t\t\treturn \"from_unixtime(`\".$fieldname.\"`, \".$this->qstr($format).\")\";\n\t\t\t\tbreak;\n\t\t\tcase 'sqlite':\n\t\t\t\treturn \"strftime(\".$this->qstr($format).\", `\".$fieldname.\"`, 'unixepoch')\";\n\t\t\t\tbreak;\n\t\t\tcase 'pgsql':\n\t\t\t\tswitch($format) {\n\t\t\t\tcase '%Y-%m':\n\t\t\t\t\treturn \"to_char(to_timestamp(`\".$fieldname.\"`), 'YYYY-MM')\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn \"to_char(to_timestamp(`\".$fieldname.\"`), 'YYYY-MM-DD')\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "cd6c6efae650081b9222d2f1e568d2e8", "score": "0.5015311", "text": "public function getCurrentDateFunction()\n\t{\n\t\treturn \"TRUNC(SYSDATE)\";\n\t}", "title": "" }, { "docid": "16a0c143c1bd42c09ca033704d6c57d9", "score": "0.50120753", "text": "public function getSourceForecastIssueTime()\n {\n return $this->sourceForecastIssueTime;\n }", "title": "" }, { "docid": "766bf311cf59a39dce4744b741a75146", "score": "0.49984622", "text": "public function getDate()\n {\n return isset($this->date) ? $this->date : null;\n }", "title": "" }, { "docid": "766bf311cf59a39dce4744b741a75146", "score": "0.49984622", "text": "public function getDate()\n {\n return isset($this->date) ? $this->date : null;\n }", "title": "" }, { "docid": "238c68a606b60a8d138dd676af1b783c", "score": "0.49711695", "text": "function extractTimestamp($restData){\n $retval = '';\n if(!empty($restData['currentMeasurement']['timestamp'])){\n $timestamp = strtotime($restData['currentMeasurement']['timestamp']);\n if($timestamp){\n $retval = strftime(DATE_FORMAT, $timestamp);\n }\n }\n return $retval;\n}", "title": "" }, { "docid": "91e6d9aac061a0db00ad0c4d4478cad5", "score": "0.4971127", "text": "function getTime() {\r\n\t\t$res = '';\r\n\t\t\r\n\t\tif ($this->timestamp != null)\r\n\t\t\t$res .= date($this->dateFmt, $this->timestamp);\r\n\t\telse\r\n\t\t\t$res .= $this->date;\r\n\t\t\r\n\t\treturn $res;\r\n\t}", "title": "" }, { "docid": "e270e6b850c9c5fcb58f68d196dc702e", "score": "0.49594915", "text": "public function getCommentDate() : string {\n\t\treturn ($this->commentDate);\n\t}", "title": "" }, { "docid": "09f20e3017356d65c1e5b68c3bda4177", "score": "0.4956305", "text": "function hm_events_render_admin_col( $column_name, $post_id ) { \n if ( 'event_date' != $column_name ) {\n return; \n }\n \n if( get_post_meta( $post_id, 'hm-events_date', true ) ) { \n $value = date( get_option( 'date_format' ) . ' ' . get_option( 'time_format' ), get_post_meta( $post_id, 'hm-events_date', true ) ); \n echo $value;\n } else {\n _e( 'None', 'hm-events' );\n }\n\n}", "title": "" }, { "docid": "759c845672960ba7b20d4cc7ac373629", "score": "0.49530026", "text": "public function getFormattedDate()\n {\n $date = new DBDate();\n $date->setValue($this->LastEdited);\n return Convert::raw2xml($date->Nice());\n }", "title": "" }, { "docid": "c0e2bced10136ea96a84a93d454f3b0f", "score": "0.49499452", "text": "public function getTime()\n {\n return $this->data['transaction']['processing']['timestamp'];\n }", "title": "" }, { "docid": "899eb8165d7c86e70141f6e85589db58", "score": "0.49492857", "text": "private function read() {\n\t\t$key = $this->get_current_key();\n\n\t\t// Default return value\n\t\t$retval = null;\n\n\t\t// Bail if derived, and no longer read\n\t\tif ( false === $key['read'] ) {\n\t\t\treturn $retval;\n\t\t}\n\n\t\t// Bail if column is undefined\n\t\tif ( empty( $key['column'] ) ) {\n\t\t\treturn $retval;\n\t\t}\n\n\t\t// Get the column\n\t\t$column = $key['column'];\n\n\t\t// If null, use the raw value\n\t\tif ( is_null( $key['read'] ) ) {\n\t\t\t$retval = $this->event->{$column};\n\n\t\t// Format of column is a valid datetime value\n\t\t} elseif ( ! $this->is_datetime_empty( $this->event->{$column} ) ) {\n\t\t\t$date = strtotime( $this->event->{$column} );\n\t\t\t$retval = date( $key['read'], $date );\n\n\t\t// Otherwise false\n\t\t} else {\n\t\t\t$retval = false;\n\t\t}\n\n\t\t// Return the formatted value\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "f6bbf35af497017e18ca1cbc46ca2800", "score": "0.49482897", "text": "private function getDateObject()\n {\n return $this->value;\n }", "title": "" }, { "docid": "4e4c2138b4c063b25aa0dba31fb45556", "score": "0.49469557", "text": "public function getTransactionDate() {\n return isset($this->container['TransactionDate']) ? $this->container['TransactionDate'] : null;\n\t}", "title": "" }, { "docid": "d7e233ab8f78525874b448e0383e7008", "score": "0.494523", "text": "public function getDate() \n {\n return $this->_fields['Date']['FieldValue'];\n }", "title": "" }, { "docid": "fa329e83e08ed115ba2dd0339deab17b", "score": "0.49450377", "text": "function getLastProcessTime(DB_Database_1 $db, $step, $state = NULL)\n{\n\t$step = $db->quote($step);\n\n\t$company_id = ECash::getCompany()->company_id;\n\n\t$query = \"\n\t\t\tSELECT\n\t\t\t MAX(date_started) as last_process_time\n\t\t\tFROM process_log\n\t\t\tWHERE step = {$step}\n\t\t\tAND company_id = {$company_id}\n\t\t\t\";\n\n\tif (NULL !== $state)\n\t{\n\t\t$state = $db->quote($state);\n\t\t$query .= \"AND state = {$state}\";\n\t}\n\n\t$st = $db->query($query);\n\t$row = $st->fetch(PDO::FETCH_OBJ);\n\n\tif (NULL !== $row->last_process_time)\n\t{\n\t\treturn date('YmdHis', strtotime($row->last_process_time) );\n\t}\n\n\treturn NULL;\n}", "title": "" }, { "docid": "dd6bda95921b5eb44b20ba48b1165da7", "score": "0.4942323", "text": "private function formatDate($column)\n {\n return \"DATE_FORMAT({$column}, '{$this->dateFormat}') AS {$column}\";\n }", "title": "" }, { "docid": "37e376403f23b25e5bf9b61c8e2ea837", "score": "0.49418333", "text": "function get_data() {\n $dt=DateTime::createFromFormat($this->date_format(), $this->data, $this->timezone());\n if(!$dt) {\n $dt=DateTime::createFromFormat($this->value_format(), $this->data, $this->timezone());\n if(!$dt)\n\treturn null;\n }\n\n return $dt->format($this->value_format());\n }", "title": "" }, { "docid": "c670f2f8aed4cb2af6e6066e31a89df5", "score": "0.4939431", "text": "public function getFormattedDate () {\n\t\treturn date(\"j F Y H:i:s\", strtotime($this->postDate));\n\t}", "title": "" }, { "docid": "6b20e1d087b605d99a1f230bc641cfab", "score": "0.49376398", "text": "public function getDate()\n {\n return $this->getHeaderFieldModel('Date');\n }", "title": "" }, { "docid": "fa2b1042f5a910425571edba659e9969", "score": "0.49315235", "text": "public static function generateCurrentTime() {\n\t\treturn date(Billrun_Base::base_dateformat);\n\t}", "title": "" }, { "docid": "dc42500ba0771d5016036bd4900666c5", "score": "0.49248573", "text": "public function convert_result_column( $column) {\r\n\t\t\tif( $column == 'event_date' ) {\r\n\t\t\t\treturn 'e.date';\r\n\t\t\t}\n\t\t\tif( $column == 'result_date' ) {\r\n\t\t\t\treturn 'r.date_created';\r\n\t\t\t}\r\n\t\t\treturn $column;\r\n\t\t}", "title": "" }, { "docid": "071c81406f47ca5a0d848c6f4410fd70", "score": "0.49229062", "text": "public function Date()\n {\n return $this->data['message']['date'];\n }", "title": "" }, { "docid": "00777d5e211d3de66d1fe1eec09b576a", "score": "0.49211618", "text": "protected function getDateFormatForColumn($column) {\n if (in_array($column['DATA_TYPE'], array('datetime', 'timestamp'))) {\n return 'Y-m-d H:i:s';\n } else if ($column['DATA_TYPE'] == 'date') {\n return 'Y-m-d';\n } else if ($column['DATA_TYPE'] == 'time') {\n return 'H:i:s';\n } else if ($column['DATA_TYPE'] == 'year') {\n return 'Y';\n }\n\n return 'Y-m-d H:i:s';\n }", "title": "" }, { "docid": "e5a1de446dea6d090c70bb2c17c9acc0", "score": "0.49178767", "text": "public function getDate(): ?string\n {\n return $this->date;\n }", "title": "" }, { "docid": "e5a1de446dea6d090c70bb2c17c9acc0", "score": "0.49178767", "text": "public function getDate(): ?string\n {\n return $this->date;\n }", "title": "" }, { "docid": "8b6d0d8d79cca517dfa95b0fb58dd4f9", "score": "0.49176434", "text": "public function getDatePosted()\n\t{\n\t\t$date = new Precurio_Date($this->date_posted);\n\t\t\t\t\n\t\treturn $date->get(Precurio_Date::DATE_SHORT).' '.$date->get(Precurio_Date::TIME_SHORT);\n\t}", "title": "" }, { "docid": "4cb15a270029e03e6018a794da9faf8c", "score": "0.49125165", "text": "public function getIssueDate()\n {\n return $this->issueDate;\n }", "title": "" }, { "docid": "4cb15a270029e03e6018a794da9faf8c", "score": "0.49125165", "text": "public function getIssueDate()\n {\n return $this->issueDate;\n }", "title": "" }, { "docid": "4cb15a270029e03e6018a794da9faf8c", "score": "0.49125165", "text": "public function getIssueDate()\n {\n return $this->issueDate;\n }", "title": "" }, { "docid": "f0bcc6e17018ce7710e40c0a88661e62", "score": "0.4903154", "text": "private function getDateMark()\n { return date('Y_m_d', time() ); }", "title": "" }, { "docid": "d4828370d0ff921a6493a943cd12d887", "score": "0.48992822", "text": "public function getMetaDate()\n {\n return $this->dbObject('Date');\n }", "title": "" }, { "docid": "e6ecb9fac20c9209dfd788f142c19cbd", "score": "0.48990825", "text": "function parseCurrentDate1($Pdate)\n {\n\t\t$r[0]=$Pdate;\n\t\tif($Pdate==\"\")\n\t\t{\n\t\t$r = mysql_query(\"select sysdate() a\");\n\t\t$r = mysql_fetch_array($r);\n\t\t$r= $r['a'];\n\t\t}\n\t\t\n\t\t\t\t \t\t\n \treturn $r.\"<input type=hidden name=dte value='$r'>\";\n }", "title": "" }, { "docid": "e6ecb9fac20c9209dfd788f142c19cbd", "score": "0.48990825", "text": "function parseCurrentDate1($Pdate)\n {\n\t\t$r[0]=$Pdate;\n\t\tif($Pdate==\"\")\n\t\t{\n\t\t$r = mysql_query(\"select sysdate() a\");\n\t\t$r = mysql_fetch_array($r);\n\t\t$r= $r['a'];\n\t\t}\n\t\t\n\t\t\t\t \t\t\n \treturn $r.\"<input type=hidden name=dte value='$r'>\";\n }", "title": "" }, { "docid": "e6ecb9fac20c9209dfd788f142c19cbd", "score": "0.48990825", "text": "function parseCurrentDate1($Pdate)\n {\n\t\t$r[0]=$Pdate;\n\t\tif($Pdate==\"\")\n\t\t{\n\t\t$r = mysql_query(\"select sysdate() a\");\n\t\t$r = mysql_fetch_array($r);\n\t\t$r= $r['a'];\n\t\t}\n\t\t\n\t\t\t\t \t\t\n \treturn $r.\"<input type=hidden name=dte value='$r'>\";\n }", "title": "" }, { "docid": "7b705efff1502d195d5d4873fae9d7e9", "score": "0.4896117", "text": "static function datetime_value($pset)\n {\n $out = '';\n if (isset($pset['label'])) {\n $out .= '<label>' . $pset['label'] . '</label>';\n }\n $value = isset($pset['value']) ? $pset['value'] : false;\n $fmt = isset($pset['format']) ? $pset['format'] : null;\n if ($fmt) {\n if (!is_numeric($value))\n $time = strtotime($value); // convert string dates to unix timestamps\n $value = date($fmt, $value);\n }\n if ($value) {\n $out .= \"&nbsp;\" . $value . \"&nbsp;\";\n } else {\n $out .= \"&nbsp;&#x2205;&nbsp;\";\n }\n return $out;\n }", "title": "" }, { "docid": "c39ae462fbc6639d2180cb91c25a2b6a", "score": "0.48928824", "text": "protected function getCurrentLogTimestamp()\n {\n return date('c') . ' - ';\n }", "title": "" }, { "docid": "7743b48200b6017a7bd9941cd3dea37c", "score": "0.48915", "text": "public function datetext()\r\n\t{\r\n\t\t// Don't continue without a to format\r\n\t\tif (empty($this->to))\r\n\t\t{\r\n\t\t\tthrow new \\Exception('Cannot convert date without a supplied \"to\" format.');\r\n\t\t}\r\n\r\n\t\treturn $this->datetime()->format($this->to);\r\n\t}", "title": "" }, { "docid": "b456dc31fd518a4bea57990bd3d19738", "score": "0.48852736", "text": "public function getDatePTBR()\n {\n return $this->format('d/m/Y');\n }", "title": "" }, { "docid": "ac2c9569e751a52ff262c26e25c326df", "score": "0.48852375", "text": "public function getLatestDateForPhysicalReturns()\n {\n return $this->latestDateForPhysicalReturns;\n }", "title": "" }, { "docid": "8074ec2078e1a5353085dd50da9d6000", "score": "0.48818052", "text": "public function getParsedDate(): ?string\n {\n return $this->message->getHeaderValue('date');\n }", "title": "" }, { "docid": "09085d2d1531abbcc05b9a81e9753c54", "score": "0.48789772", "text": "public function getDateformatDd() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(4, $this->_result)) return (string) $this->_result[4];\n\t\t\telse parent::throwGetColException('Not set DictionaryDetailsModel::getDateformatDd', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From DictionaryDetailsModel::getDateformatDd', __LINE__, __FILE__);\n\t}", "title": "" }, { "docid": "3632adfee4951fe7d47324561b5ab3a4", "score": "0.48770395", "text": "public function getJobDueDate(): ?string;", "title": "" }, { "docid": "5c96298217f82bf028f1b6a22eee7d3b", "score": "0.48732403", "text": "public function getTransactionDateAttribute(){\n return $this->format_date($this->attributes['transaction_date']);\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "6ec6f3819fc78747009e88cf269f3fed", "score": "0.0", "text": "public function edit(Job $job)\n {\n //\n }", "title": "" } ]
[ { "docid": "d7ce48ce019e0bea04d049b9105b5e4d", "score": "0.7734901", "text": "public function edit(Resource $resource)\n {\n return view('dashboard.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "84ff2076d8b6fd70c23777380e8adaff", "score": "0.71830827", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "69c216f7c250a093fe39e8866f35d42b", "score": "0.7131727", "text": "public function editAction()\n\t{\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t// Check to see if they specified id in the url and its a valid id\n\t\tif($id == null || !intval($id)) {\n\t\t\t// Redirect because to view a project, they have to specify one in the url\n\t\t\t$this->_redirect($this->view->baseUrl('/resources/'));\n\t\t\texit();\n\t\t}\n\n\t\t$resource = Application_Model_Document_Resource::find($id);\n\n\t\t// Define the form\n\t\t$form = new Application_Form_Resource(\n\t\t\t\tarray(\n\t\t\t\t\t\t'action' => $this->view->baseUrl('/resources/edit/id/'.$id),\n\t\t\t\t\t\t'submitLabel' => 'Update'\n\t\t));\n\n\t\t//Check to see if the user has submited the form or just requesting it\n\t\tif ($this->_request->getPost()) { // Form is submited, now we populate proper database object to reflect changes\n\t\t\t// Check if form is valid\n\t\t\tif ($form->isValid($this->_request->getPost())) {\n\t\t\t\t// Assign all the form values to our updateProject to save\n\t\t\t\t$resource->name->first = $form->getValue('first_name');\n\t\t\t\t$resource->name->middle = $form->getValue('middle_name');\n\t\t\t\t$resource->name->last = $form->getValue('last_name');\n\t\t\t\t$resource->phone->capgemini = $form->getValue('phone_number');\n\t\t\t\t$resource->email->capgemini = $form->getValue('email');\n\n\t\t\t\t$resource->address = new Shanty_Mongo_Document();\n\t\t\t\t$resource->address->line1 = $form->getValue('address1');\n\t\t\t\t$resource->address->line2 = $form->getValue('address2');\n\t\t\t\t$resource->address->city = $form->getValue('city');\n\t\t\t\t$resource->address->state = $form->getValue('state');\n\t\t\t\t$resource->address->country = $form->getValue('country');\n\n\t\t\t\t$resource->office_base = Application_Model_Document_OfficeBase::find($form->getValue('office_base'));\n\n\t\t\t\t$resource->resource_type= Application_Model_Document_ResourceType::find($form->getValue('resource_type'));\n\t\t\t\t$resource->title = Application_Model_Document_ResourceTitle::find($form->getValue('title'));\n\t\t\t\t$resource->save();\n\t\t\t\t// Redirect to the resource profile\n\t\t\t\t//$this->_redirect($this->view->baseUrl('/resources/view/id/'.$id));\n\t\t\t\t$this->_redirect('/resources/view/id/'.$id);\n\t\t\t\texit();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$form->populate($formData);\n\t\t\t}\n\t\t}\n\n\t\t$formData = array(\n\t\t\t\t'first_name' => $resource->name->first,\n\t\t\t\t'middle_name' => $resource->name->middle,\n\t\t\t\t'last_name' => $resource->name->last,\n\t\t\t\t'phone_number' => $resource->phone_number,\n\t\t\t\t'email' => $resource->email->capgemini,\n\t\t\t\t'resource_type' => $resource->resource_type->_id,\n\t\t\t\t'title' => $resource->title->_id,\n\t\t\t\t'address1' => $resource->address->line1,\n\t\t\t\t'address2' => $resource->address->line2,\n\t\t\t\t'city' => $resource->address->city,\n\t\t\t\t'state' => $resource->address->state,\n\t\t\t\t'country' => $resource->address->country,\n\t\t\t\t'office_base' => $resource->office_base->_id\n\t\t);\n\t\t$form->populate($formData);\n\t\t$this->view->form = $form;\n\t}", "title": "" }, { "docid": "522c839636c7afd00a2fe6a013af3288", "score": "0.7100264", "text": "public function editAction()\r\n {\r\n $id = (int) $this->params()->fromRoute('id', 0);\r\n if (!$id) {\r\n return $this->redirect()->toRoute('resources', array(\r\n 'action' => 'add'\r\n ));\r\n }\r\n $resources = $this->getResourcesTable()->getResources($id);\r\n\r\n $form = new ResourcesForm();\r\n $form->bind($resources);\r\n\r\n $request = $this->getRequest();\r\n if ($request->isPost()) {\r\n $form->setInputFilter($resources->getInputFilter());\r\n $form->setData($request->getPost());\r\n\r\n if ($form->isValid()) {\r\n $confirm = $this->getResourcesTable()->saveResources($form->getData());\r\n\r\n $redirect = false;\r\n if (!empty($confirm['status'])) {\r\n switch ($confirm['status']) {\r\n case '1':\r\n $redirect = true;\r\n $this->flashMessenger()->addMessage(array('success' => $this->message->success));\r\n break;\r\n default:\r\n $this->flashMessenger()->addMessage(array('error' => $this->message->error));\r\n break;\r\n }\r\n }\r\n\r\n if ($redirect) {\r\n // Redirect to list of resourcess\r\n return $this->redirect()->toRoute('resources');\r\n }\r\n }\r\n }\r\n $this->vm->setVariables(array(\r\n 'flashMessages' => $this->flashMessenger()->getMessages(),\r\n 'id' => $id,\r\n 'form' => $form,\r\n ));\r\n\r\n return $this->vm;\r\n }", "title": "" }, { "docid": "da99e35334c7018154ed595f09e0337d", "score": "0.7089427", "text": "public function edit()\n {\n $this->form_data = ['route' => [self::$prefixRoute.'update', $this->company->id], 'method' => 'PUT', 'files' => true];\n\n return $this->getFormView();\n }", "title": "" }, { "docid": "787234d6f7dee1b56f411f3e6e54bcfb", "score": "0.7033331", "text": "public function editForm() {\n\t\t$data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$this->parent->urlPathParts[2]));\n\t\n\t\t$this->getView(\"editform\", $data);\n\t}", "title": "" }, { "docid": "e465503e79b8b4032e36d093e233408b", "score": "0.70309556", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('HarmonyVisualizerMainBundle: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('HarmonyVisualizerMainBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a096f3cd2e5784ea3a48675da26784cc", "score": "0.70097554", "text": "public function edit()\n {\n $parameters = func_get_args();\n $id = end($parameters);\n\n $this->getPermissionClass()->canEditOrFail();\n $entry = $this->getEntry($id);\n\n $urlBuilder = $this->getUrlBuilderClass($parameters);\n\n /** @var HorizontalFormBuilder $form */\n $form = app('bootform.horizontal');\n $form->setColumnSizes($this->getColumnSizes());\n $form->bind($entry);\n\n /** @var FormOpen $formStart */\n $formStart = $form->open();\n $formStart->action($urlBuilder->getUrlUpdate($entry->getKey()));\n $formStart->put();\n\n $formFields = $this->getForm($form, $entry);\n\n /** @var FormBuilder $formClose */\n $formClose = $form->close();\n $title = $this->getUrlEditText();\n SEO::setTitle($title);\n\n return view($this->getViewEdit(), compact('title', 'formStart', 'formClose', 'formFields'));\n }", "title": "" }, { "docid": "55e536ea6ad0a0b81445c206780c630d", "score": "0.69938177", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->administration_route->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['administration_route' => $this->administration_route]);\n\t}", "title": "" }, { "docid": "b663c6d8125fb6314c3a0e4886cb4291", "score": "0.6975116", "text": "public function edit($id)\n {\n if (Input::get('ajax')) {\n return $this->_resourcePersistence->get($id);\n }\n\n return view('admin.' . $this->resource . '.edit')\n ->with('resource', $this->resource)\n ->with('id', $id);\n }", "title": "" }, { "docid": "a0cf5deb0843bc2a9372021f983bd7df", "score": "0.69728345", "text": "public function edit(Form $form)\n\t{\n\t\t$form->load('customer');\n\t\treturn view('forms.edit', compact('form'));\n\t}", "title": "" }, { "docid": "73dff086054dea68e61138da96c78b9d", "score": "0.69669014", "text": "public function edit(Form $form)\n {\n //\n return view('edit', compact('form'));\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "d8d18a53a00c5863abebafd6f478f9af", "score": "0.6936903", "text": "public function edit($id)\n {\n // $data = array_merge([\n // // 'tabs' => TabManager::get($this->getModel()->getTable()),\n // $this->getResourceName() => $this->getEntity($id),\n // ], $this->getFormData('edit', $id));\n\n $data = $this->getFormData('edit', $id);\n return view(\"{$this->viewPath}.edit\", $data);\n }", "title": "" }, { "docid": "af7e0ad74f788224046bea8997ba82fd", "score": "0.691101", "text": "function edit(Form $form);", "title": "" }, { "docid": "ddb6541ea87bc5a805d84b200c4d3330", "score": "0.6900641", "text": "private function editForm()\n {\n $m = $this->getViewModel();\n\n $blog = $m->blog;\n\n $m->isApprover = true; // isApprover()\n\n $stylelist = BlogView::getStyleList();\n\n $id = $blog->id;\n \n \n if ($m->revid === 0) {\n $m->revid = intval($blog->revision);\n }\n\n $m->revision = BlogRevision::findFirst('blog_id='.$id.' and revision='.$m->revid);\n \n // submit choices\n $m->rev_list = [\n 'Save' => 'Save',\n 'Revision' => 'Save as new revision',\n ];\n\n $m->title = '#' . $id;\n $m->stylelist = $stylelist;\n $m->catset = BlogView::getCategorySet($id);\n $m->events = BlogView::getEvents($id);\n $m->metatags = BlogView::getMetaTags($id);\n $m->content = $m->url = $this->url;\n\n return $this->render('blog', 'edit');\n }", "title": "" }, { "docid": "d71dc82427564ebcbc73816305ddda53", "score": "0.68749857", "text": "public function edit()\n {\n preg_match('/form\\/(.+?)\\//', \\request()->getPathInfo(), $result);\n $form = Form::find($result[1]);\n $questions = Question::all()->where(\"form_id\", $form->id);\n return view('forms.edit', ['form'=>$form, 'questions'=>$questions]);\n }", "title": "" }, { "docid": "96961bd907d99d27e65861299053bb83", "score": "0.6873502", "text": "public function edit($id)\n {\n $id = Crypt::decrypt($id);\n $form = Preenrolment::find($id);\n\n return view('form.edit', compact('form'));\n }", "title": "" }, { "docid": "111fd948639561f549e94ea39624e591", "score": "0.686892", "text": "function edit()\n\t{\n\t\t$data['title'] = 'Offer.com || Restaurant Edit Form';\n\t\t$data['user_id']\t= $this->tank_auth->get_user_id();\n\t\t$data['username']\t= $this->tank_auth->get_username();\n\t\t\n\t\t// view page data\n\t\t$data['extrastyle'] = 'inc/_vuestyle';\n\t\t$data['extrascript'] = 'inc/_vuescript';\n\t\t$data['vuecomponent'] = 'components/restaurant/edit';\n\n\t\t$data['content'] = 'admin/restaurant/edit';\n\t\t$this->load->view('layouts/master', $data);\n\t}", "title": "" }, { "docid": "2cba2dba9adbc964e4cb8e1c1f507bf7", "score": "0.6857282", "text": "public function edit()\n\t{\n $this->auth->restrict('Capacity_Building.Content.Create');\n\n\t\t$id = $this->uri->segment(5);\n\n\t\tif(empty($id)) {\n // New record\n\t\t\tTemplate::set('formView', $this->showEditor());\n\t\t} else {\n // Existing record\n Template::set('formView', $this->showEditor($id));\n }\n\n\t\tTemplate::set('toolbar_title', lang('capacity_building_edit') .' Capacity Building');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "325f44881b3255ac6dd832a42a816449", "score": "0.6856997", "text": "public function edit($id)\n\t{\n\t\t//Para ver el formulario\n\t}", "title": "" }, { "docid": "a70140d47a90876608810916289f5eaa", "score": "0.68449825", "text": "public function edit(){\n $employee = Employee::find($_GET['id']);\n view('employees/edit', compact('employee'));\n }", "title": "" }, { "docid": "2ac287f33a0b22cd658add9d932bfb54", "score": "0.68442357", "text": "public function edit(Product $product)\n {\n // not gonna use it since it need to show edit form\n }", "title": "" }, { "docid": "0debc65108a59def3fde6af05e845c8c", "score": "0.6840725", "text": "public function edit($id)\n {\n // get the employee\n $employees = Employee::find($id);\n $titles = Title::pluck('name', 'id');\n\n\n // show the edit form and pass the resource\n return view('employees.edit', compact('employees','titles'))\n ->with('returnUrl', $this->getReturnUrl());\n }", "title": "" }, { "docid": "62e42345b14e64136dff3140e21a14fa", "score": "0.6817548", "text": "public function edit($id)\n {\n $categories = Category::all('id', 'name');\n return view('resource.form',\n [\n 'resource' => Resources::where('id', $id)->first(),\n 'categories' => $categories\n ]);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "541d1f2618e436d250647dd398cc2808", "score": "0.67858773", "text": "public function edit($id)\n {\n // return view('layouts.backend.rm.edit');\n }", "title": "" }, { "docid": "a6c265fe7d46510a444ee3ca44d074cb", "score": "0.6784809", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n $formTitle = 'Edit employee';\n return View('employees.form', compact('employee', 'formTitle'));\n }", "title": "" }, { "docid": "0eb0be7ab668a0fb1d38349f0f9700b4", "score": "0.67784214", "text": "public function edit($id) {\r\n\t\t$data['professor'] = Professor::findOrFail ( $id );\r\n\t\t$data['page_title'] = 'Editar professor';\r\n\t\treturn view ( 'paginas.cadastro.professor.create-edit' )->with($data); \r\n\t}", "title": "" }, { "docid": "02d61c145821a4db89ebb2edb8182595", "score": "0.67633945", "text": "public function edit($resource, $id)\n {\n $model = ConfigHelper::getModel($resource);\n $isColor = $model->isColor || false;\n $lists = $model->all();\n $data = $model->find($id);\n return view('config::config.index', compact('resource', 'lists', 'data', 'isColor'));\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "14e65bd23934edb208798714d1293877", "score": "0.6752648", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = Ticket::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "38affe6ba77ce934dc4daf49e3046892", "score": "0.67456263", "text": "public function edit($entityId)\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n $model = $this->getModel($resource);\n $entity = $model::find($entityId);\n $hasWysiwyg = false;\n\n foreach($resource->fields as $field)\n {\n if($field['type'] == 'wysiwyg') $hasWysiwyg = true;\n\n if($field->type == 'relational')\n {\n $model = $field->data('model');\n $options[$field->slug] = $model::all()->lists($field->data('title'), $field->data('key'));\n }\n }\n\n return view('laramanager::resource.edit', compact('resource', 'hasWysiwyg', 'entity', 'options'));\n }", "title": "" }, { "docid": "5ad58678a9066ea479d1b7c0fa455bba", "score": "0.673845", "text": "public function edit()\n {\n return view('parking::edit');\n }", "title": "" }, { "docid": "98a958a2e5d3e8b986777a8e2b310e63", "score": "0.67342156", "text": "public function editAction()\n {\n $id = $this->getRequest()->getParam('id',null);\n $this->view->formResponse = '';\n $this->view->assign('title', 'Edit Address');\n $mapper = new Application_Model_AddressbookMapper();\n $form = $mapper->getEditEntryForm($this->getRequest()->getPost(),$id);\n // Did the form get submitted?\n if ($form === true) {\n $this->view->formResponse = 'Address Updated!';\n $this->_forward('index');\n }\n $this->view->form = $form;\n }", "title": "" }, { "docid": "271f2dc8be841343df336c673a3822d9", "score": "0.6727125", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SigFichasocialBundle:Persona')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se pudo encontrar la entidad Persona.');\n }\n\n $editForm = $this->createEditForm($entity);\n// $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SigFichasocialBundle:Persona:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n// 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.67227334", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "3db1f9e1d14b74d354375731730e7d9f", "score": "0.6711498", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\t \n\t \n\t\treturn view('admin.employee.edit', compact('employee'));\n\t}", "title": "" }, { "docid": "200c93ae2e89a33f61e6a8e125e532c6", "score": "0.67104954", "text": "public function edit()\n {\n return view('userfi::edit');\n }", "title": "" }, { "docid": "1985c1d26ba692cc0ae1082412ed00f6", "score": "0.6703955", "text": "public function edit($id)\n {\n $this->isEditing = true;\n $this->user = User::find($id);\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "25a6a14192997386614057ef4361e13a", "score": "0.6697028", "text": "public function edit(Question $question)\n {\n \tif ($this->authorize('update', $question)) {\n\t\t return view('questions.edit', compact('question'));\n\t }\n }", "title": "" }, { "docid": "7f1157c2e01c887c017258c8594e0eb2", "score": "0.66793597", "text": "public function edit ($id) {\n $data = Opf::findOrFail($id);\n\n return view('administrator.opf.edit', compact('data'));\n }", "title": "" }, { "docid": "64638440e568f9ca6de0639b2af35fe2", "score": "0.6676964", "text": "public function edit($id)\n\t{\n\t\t$settingInformation = SettingInformation::find($id);\n \n return view('settingInformation.form')->with('settingInformation', $settingInformation);\n\t}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "348ffa202eb8b306feb83bea05fd6cb2", "score": "0.66630423", "text": "public function edit($id)\n\t{\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, array('route' => $this->resource, 'options' => $this->options));\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, array('route' => $this->resource, 'options' => $this->options))->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "ac13bda5ea80a720996d3ec33ec2cd6e", "score": "0.66462505", "text": "public function edit($id)\n {\n $professor = Professor::find($id);\n return view('professor.formulario', compact('professor'));\n }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6642529", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "b602a98dc36a4b6f42a161024a5f0dfa", "score": "0.66383743", "text": "public function edit()\n {\n return view('account::edit');\n }", "title": "" }, { "docid": "d0628008c21c857e6203f02c16d81776", "score": "0.6632226", "text": "public function edit(Request $request, $id)\n {\n $form = Form::find($id);\n \n return view('Admin.Form.edit',compact('form'));\n }", "title": "" }, { "docid": "ef5915c02eeea16e51e99a01379267fe", "score": "0.6629325", "text": "public function editAction()\n\t{\n\t\t$param = $this->data->getParams();\n\t\t$param = $this->valid->numCheck($param['id']);\n\t\t$this->event->setData($param);\n\t\t$this->event->userRole($this->userRole);\n\t\t$arrayToDetails = $this->event->detailsEvent();\n\t\t$this->view->addToReplace($arrayToDetails);\n\t\t$this->view->addToReplace($this->langArr);\n\t\t$this->view->setTemplateFile('details')->templateRender();\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "7ea6d483a420134aa1b6a3947a002693", "score": "0.66259205", "text": "public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }", "title": "" }, { "docid": "d8a01a21dfccea9d724a478283a065e0", "score": "0.6622511", "text": "public function editForm(){\n\n return $this->newForm();\n }", "title": "" }, { "docid": "93d69beeb626332ef3ec9ff66c8a0e6f", "score": "0.6616668", "text": "public function edit()\n {\n return view('project/edit');\n }", "title": "" }, { "docid": "70adb5a3151ff0ad7f56b3e02f53ecfb", "score": "0.6613304", "text": "public function edit($id)\n {\n return view('module::edit');\n }", "title": "" }, { "docid": "99e23749f00156a5b49244d4edd09993", "score": "0.66091233", "text": "public function edit(Person $person)\n {\n return $this->form_ele('Edit', $person);\n }", "title": "" }, { "docid": "6feec614262027cb92d91e0b34bc1b6e", "score": "0.6608389", "text": "public function edit($id)\n {\n abort_unless($this->property('editable'), 404);\n $model = $this->property('model');\n $item = $model::where('id', $id);\n // customize query by query scope\n $this->queryScope($item);\n $item = $item->firstOrFail();\n // authorization\n $this->authorize('update'.static::property('permissionsKey'), $item);\n $this->initCrud('edit', $item);\n // convert item to response object.\n $item = $this->itemResponse($item);\n\n return view(\n 'sanjab::crud.form',\n [\n 'widgets' => $this->widgets,\n 'properties' => $this->properties(),\n 'item' => $item,\n ]\n );\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "7bbd86e4602ee9db03f7cc35a32da3d8", "score": "0.6600377", "text": "public function edit()\n {\n $property = Property::find(1);\n\n return view('property.edit')\n ->with('property', $property);\n }", "title": "" }, { "docid": "da4ddf957e485a3b006cdf1e4bcbe98c", "score": "0.65984637", "text": "public function edit($id)\n { \n $item = $this->model->findOrFail($id);\n $products = $this->product::all();\n $companies = $this->company::all();\n return view($this->path_view.'.form',compact('item','products','companies'));\n }", "title": "" }, { "docid": "a9d3eb00cc0697100005ac0145dc0796", "score": "0.65982985", "text": "public function edit($id)\n {\n\n \t$decode = Hashids::decode($id)[0];\n $role = Role::find($decode);\n $permission = Permission::all();\n $formAction = action('RoleController@update', $id);\n return view(\"roles/form\", compact('role', 'formAction','permission'));\n\n }", "title": "" }, { "docid": "ed9a6010eb59e900fbfaa0474bf6d261", "score": "0.6596132", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('BackendBundle:Requerimiento')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No existe el requerimiento solicitado.');\n }\n\n $editForm = $this->createForm(new RequerimientoType(), $entity);\n\n return $this->render('BackendBundle:Requerimiento:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "b7036cf9285e9d8affd3f7710b3215e1", "score": "0.65944123", "text": "public function edit($id)\n {\n return view($this->entity.'.frm', [\n 'id' => $id, # id registro\n 'entity' => $this->entity, # Entidade\n 'title' => 'Alterar perfil', # título página\n 'method' => 'put', # método frm principal\n 'route_list' => route('role.datajson',[$id]), # endereço requisição ajax principal\n ]);\n }", "title": "" }, { "docid": "83316aa545e5b62d61cc26508009018d", "score": "0.65920705", "text": "public function edit($id)\n {\n $job = $this->job_model->findOrFail($id);\n $companies = $this->company_model->all();\n $data = [\n 'title' => \"Job Form\",\n 'job' => $job,\n 'companies' => $companies,\n 'method' => \"PUT\",\n ];\n return view('job.job_form', $data);\n }", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "b2eaacc677a317a7edc60ecfa33f9345", "score": "0.6585427", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MyAppUserBundle:CarteEdinar')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CarteEdinar entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MyAppUserBundle:CarteEdinar:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f191333894e0ca371f3ae777ad938dd1", "score": "0.65830725", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_atleta\n\t\t$fbf_atleta = FbfAtleta::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_atleta\n\t\t$this->layout->content = View::make('fbf_atleta.edit')\n->with('fbf_atleta', $fbf_atleta);\n\t}", "title": "" }, { "docid": "39bf69fa126c43f7e7a9b30980f6a80f", "score": "0.6581154", "text": "public function editAction()\n {\n // Get incident id from url.\n \t$id = $this->_request->getParam('id');\n \t\n\t\tif ($this->getRequest()->isPost()) {\n\t $form = $this->getForm();\n\t \n \t// If validation failed, redisplay form. Also the isValid() method is needed to repopulate $form with posted values.\n\t if (!$form->isValid($_POST)) {\n\t $this->view->form = $form;\n\t return $this->render('edit');\n\t }\n\t \n\t // Get the model.\n\t $mapper = new Application_Model_UserMapper();\n\t $model = $mapper->find($id);\n\t \n\t // Put values from form in the model.\n\t $values = $form->getValues();\n\t $model->setValuesFromArray($values);\n\t \t\n\t // Save the model.\n\t $mapper->save($model);\n\t \n\t // Flash and redirect\n\t $this->_helper->flashMessenger()->addMessage('Details Saved');\n $this->_helper->redirector->gotoUrlAndExit('user/view/id/' . $id);\n\t \n\t\t}\n\t\t\n\t\t// Fetch data for form\n\t\t$mapper = new Application_Model_UserMapper();\n\t\t$model = $mapper->find($id);\n\t\t$model_array = Application_Model_UserMapper::createArrayFromModel($model);\n\t\t\n\t\t// Create, populate and remove password from, form\n\t\t$this->view->form = $this->getForm();\n\t\tunset($model_array['password']);\n\t\t$this->view->form->populate($model_array);\n\t\t\n\t\t// Signal to javascript component about which map to display\n $this->view->jsInitParameters = \"'edit'\";\n }", "title": "" }, { "docid": "c107060b4dbba94b41a5c4077a7c279f", "score": "0.6580328", "text": "public function edit() {\n\n \t\tif (!$this->user || !$_POST)\n \t\tRouter::redirect('/venues/index');\n\n \t$venue_id = $_POST['venue_id'];\n\n\t\t# Transfer POST data to Venue object\n\t\t$venue = new Venue();\n\t\t$venue->findInDb ($venue_id);\n\n # Setup view\n\t\t$this->template->content = View::instance('v_venues_edit');\n\t\t$this->template->title = \"Edit Venue\";\n\t\t$this->template->client_files_body = \"<script src='/js/hide-category-navigation.js' type='text/javascript'></script>\";\n\n\t\t$this->template->content->venue = $venue;\n\n \techo $this->template;\n }", "title": "" }, { "docid": "7c4a03ced51aa8433c83f3f04c571b16", "score": "0.6579726", "text": "public function editAction() {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "777cf215463e622ffb776eb0f22dcc71", "score": "0.6578481", "text": "public function actionEdit()\n {\n if(!in_array('edit',$this->crudActions))\n throw new CHttpException('404 Not Found');\n\n if (isset($_POST['ajax']))\n $this->validateAjax($this->getModel(),strtolower($this->modelName).'-form');\n\n if (isset($_POST[$this->modelName]))\n {\n $model = $this->getModel();\n $model->attributes = $_POST[$this->modelName];\n if ($model->save())\n {\n $key = $this->modelName.($model->isNewRecord ? '-created' : '-updated');\n Yii::app()->user->setFlash($key,true);\n $this->redirect($this->returnUrl);\n }\n }\n $this->render($this->formView);\n }", "title": "" }, { "docid": "daf481e79a69ad0bc7a9ba48b4d825bc", "score": "0.6572825", "text": "public function edit($id)\n {\n $paraferme = Paraferme::find($id);\n\n $elements = $this->editForm(model: $paraferme, json: 'formParaferme.json');\n\n return view('admin.editCreateForm', [\n 'elements' => $elements,\n 'id' => $id,\n 'routeAnnule' => route('paraferme.index'),\n ]);\n\n }", "title": "" }, { "docid": "6a9e1e18ba5587525f99a19b50b90a0e", "score": "0.65684664", "text": "public function edit($id)\n\t{\n\n\t\t$form = DB::collection('form')->where('data.objectId',$id);\n\t\t$form = $form->pluck('data');\n\n\t\treturn view('forms.edit',compact('form'));\n\n\t}", "title": "" }, { "docid": "bd3e6096136eae4b4640e64c781e5215", "score": "0.65683043", "text": "public function edit($id)\n {\n return view('projectmanagement::edit');\n }", "title": "" }, { "docid": "7b12a5aa4591ae1d2710a1496c517b58", "score": "0.6567222", "text": "public function edit($id)\n {\n $offre = \\App\\Offre::find($id);\n return view('edit-professor',compact('offre','id'));\n }", "title": "" }, { "docid": "c7e85eff7c1947945cf5348933eb83fd", "score": "0.6566555", "text": "public function edit($id)\n\t{\n $formateur = Formateur::find($id);\n\n return View::make('admin/formateurs/edit')\n ->with('formateur', $formateur);\n\t}", "title": "" }, { "docid": "4c1baaf4b5d21ff53cd15c1fdbd7a93f", "score": "0.6560379", "text": "public function editAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$viewId = $this->_request->getParam('viewid'); \n\t\t$this->view->objView = $model->getView($viewId);\n\t }", "title": "" }, { "docid": "ea156ffc25feb0e2e685c6a8f7557c15", "score": "0.65479046", "text": "public function edit($id)\n {\n $model = AdminSystemPermission::with([\"permissionGroup\"])->find($id);\n\n if($model)\n {\n $record = $model;\n $formMode = \"edit\";\n $formSubmitUrl = \"/\".request()->path();\n\n return view('academic::admin_system_permission.create', compact('formMode', 'formSubmitUrl', 'record'));\n }\n else\n {\n abort(404, \"Requested record does not exist.\");\n }\n }", "title": "" }, { "docid": "829ba9227d293e46ba684b3f0cd579db", "score": "0.65453607", "text": "public function edit($id)\n\t\t\t{\n\t\t\t\tif(Auth::User()->hasSysRole('Admin') || Auth::User()->hasSysRole('Resource Provider'))\n\t\t\t\t{\n\t\t\t\t\t$venue = Venue::find($id);\n\t\t\t\t\t// show the edit form and pass the venue\n\t\t\t\t\treturn View::make('venue.edit')\n\t\t\t\t\t->with('venue', $venue);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::to('/dashboard')->with('message', 'You do not have access to this page!');\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "2c16bdeb3085fda5a688682fae7140dc", "score": "0.6544247", "text": "public function edit($id)\n\t{\n\t\treturn $this->show($id);\n\t}", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "1945103cf79b00401e4a1d1b2f762101", "score": "0.65411687", "text": "public function editAction( $id ) {\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$entity = $em->getRepository( 'PersonasBundle:Persona' )->find( $id );\n\n\t\tif ( ! $entity ) {\n\t\t\tthrow $this->createNotFoundException( 'Unable to find Persona entity.' );\n\t\t}\n\n\t\t$editForm = $this->createEditForm( $entity );\n\n\n\t\treturn $this->render( 'PersonasBundle:Persona:edit.html.twig',\n\t\t\tarray(\n\t\t\t\t'entity' => $entity,\n\t\t\t\t'form' => $editForm->createView(),\n\t\t\t) );\n\t}", "title": "" }, { "docid": "0bd14cbe814fbc55e43aec513633b5bc", "score": "0.65401965", "text": "public function edit($id)\n\t{\n\t\t$agente = Agente::find($id);\n if (is_null($id))\n {\n App::abort(404);\n }\n\n return View::make('agente.form')\n \t->with('agente', $agente);\n\t}", "title": "" }, { "docid": "cd0e818bdd7ade4dd0c44de0dd0c1d8e", "score": "0.65400016", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('user', array('action' => 'new')));\n\t\t} // if\n\n\t\tif ($id != $this->auth->get_user()->id && ! in_array('admin', $this->user_roles))\n\t\t{\n\t\t\tthrow new HTTP_Exception_403('You are not allowed to view the page \":page\"', array(':page' => __('User')));\n\t\t} // if\n\n\t\t$model = ORM::factory('user')->where('id', '=', $id)->find();\n\t\t$is_admin = in_array('admin', $this->user_roles);\n\n\t\t$this->content = View::factory('user/form', array(\n\t\t\t'title' => __('Update user \":username\"', array(':username' => $model->username)),\n\t\t\t'user_model' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'is_admin' => $is_admin,\n\t\t\t'copy_n_paste' => $this->config->get('password_prevent_copynpaste', true),\n\t\t\t'ajax_url' => Route::url('user', array('action' => 'save', 'id' => $id))\n\t\t));\n\n\t\tif ($is_admin)\n\t\t{\n\t\t\t$this->content->roles = ORM::factory('role')->find_all();\n\t\t} // if\n\t}", "title": "" }, { "docid": "2161eaa538e430e31556a81d74eca198", "score": "0.65394217", "text": "public function edit($id)\n {\n $Option = Option::find($id);\n return view('backend.options.form', [\n 'item' => $Option,\n\n 'nameAction' => $Option->name,\n 'idEntity' => $Option->id,\n 'controllerPathList' => '/home/options/',\n 'controllerAction' => 'edit',\n 'controllerEntity' => new Option(),\n ]);\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": "4ee65564ca132744616bf10c0755fe98", "score": "0.65375626", "text": "public function edit($id)\n {\n return view('employees::edit');\n }", "title": "" }, { "docid": "53fd61f8c77c49fa57d89bd9839407c2", "score": "0.65345657", "text": "public function edit($id)\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "ecd32fc705283cc0e1ddec209c43aec8", "score": "0.6532995", "text": "public function displayResourceForm($resource)\n {\n $childServices = new Setting('child_services');\n\n ob_start();\n include(VIEW_PATH . '/child-resources-edit.phtml');\n $resource_content = ob_get_contents();\n ob_end_clean();\n\n print $resource_content;\n }", "title": "" }, { "docid": "07ed8b37e3defd0062904a7718865626", "score": "0.65308374", "text": "public function edit(Employee $employee)\n {\n //\n return view('employee.form', [\n 'action' => '/employees/' . $employee->id,\n 'method' => 'PUT',\n 'firstName' => $employee->firstName,\n 'lastName' => $employee->lastName,\n 'lastName' => $employee->lastName,\n 'email' => $employee->email,\n 'phone' => $employee->phone,\n 'companyName' => $employee->company->name,\n ]);\n }", "title": "" }, { "docid": "0ce9853ad8530923530976f2391d2510", "score": "0.65294826", "text": "public function edit($id)\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "e48aa4e6edf769dcff5f1f1cdaddcf9f", "score": "0.65233994", "text": "public function showEdit($id)\n {\n //\n }", "title": "" }, { "docid": "41a790dfedf55c0319d312ab7845572c", "score": "0.6520173", "text": "public function edit($id)\n\t{\n\t\t$entity = CustomerHire::find($id);\n\t\treturn view('partner.customer-hire.edit', ['entity' => $entity]);\n\t}", "title": "" }, { "docid": "8dbb90d7fff91cd25d058baa2b103486", "score": "0.6517904", "text": "public function edit($id)\n {\n $soforModel = SoforModel::with('company')->findOrFail($id);\n return view('Sofor.edit', compact('soforModel'));\n }", "title": "" }, { "docid": "be7e6c271a5b5cd1f1e4af5e5ba8ba3d", "score": "0.65162235", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\n\t\treturn View::make('admin.employees.edit', compact('employee'));\n\t}", "title": "" }, { "docid": "9ba959cf41c08e6925661954de22eacc", "score": "0.65150225", "text": "public function edit(Entity $entity)\n {\n return view('entities.edit', compact('entity'));\n }", "title": "" } ]
f3b67e231c1e771659ec63e9db582a69
Function to check permission for a Module/Action.
[ { "docid": "f7f805f9011f202692c924da21c23353", "score": "0.7246656", "text": "public static function isPermitted($module, $action)\n\t{\n\t\tif (!\\App\\Session::has('modulePermissions')) {\n\t\t\t\\App\\Session::set('modulePermissions', []);\n\t\t}\n\t\t$data = \\App\\Session::get('modulePermissions');\n\t\tif (!isset($data[$module])) {\n\t\t\t$permissions = \\App\\Api::getInstance()->call($module . '/Privileges');\n\t\t\t$data[$module] = $permissions['standardActions'];\n\t\t\t\\App\\Session::set('modulePermissions', $data);\n\t\t}\n\t\tif (isset($data[$module][$action]) && !empty($data[$module][$action])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "74e606b792735d40e24f95f6bc219d50", "score": "0.82563585", "text": "public function checkPermission($action);", "title": "" }, { "docid": "8973734016e9e5393ab8e1464bd1dc57", "score": "0.7941206", "text": "public function checkpermission($action)\n {\n $flag = false;\n $session = $this->request->session();\n\n if($session->check('Auth.User'))\n {\n $user = $session->read('Auth.User');\n \n $permissions = json_decode($user['permissions']);\n //$this->debugprint($permissions);\n if($permissions->access=='all')\n {\n $flag=true;/*You have all access like administrator*/\n }\n else if($permissions->access=='part')\n {\n $area = $permissions->area;\n if(isset($area->$action) and $area->$action)\n {\n $flag = true;\n }\n }\n }\n\n if(!$flag)\n {\n echo 'You do not have permission. Contact with support.';\n exit;\n // $flag =false;\n // return $flag;\n }\n }", "title": "" }, { "docid": "686810d57e38c43d7fc98423b0bee03e", "score": "0.78233004", "text": "protected function _checkPermission($action){\n\t\t\n\t\t$allowGuests = $this->allowGuests();\n\t\t\n\t\tif(!in_array($action, $allowGuests) && !in_array('*', $allowGuests)){\t\t\t\n\t\t\t//check for logged in user\n\t\t\tif(!GO::user()){\t\t\t\t\t\n\t\t\t\treturn false;\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->checkSecurityToken();\n\t\t\t\n\t\t\t//check module permission\n\t\t\t$allowWithoutModuleAccess = $this->allowWithoutModuleAccess();\n\t\t\tif(!in_array($action, $allowWithoutModuleAccess) && !in_array('*', $allowWithoutModuleAccess))\t\t\n\t\t\t{\n\t\t\t\t$module = $this->getModule();\t\t\n\t\t\t\tif($module && !$module->permissionLevel)\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_checkRequiredPermissionLevels($action);\n\t\t\n\t}", "title": "" }, { "docid": "35140d15a23dc07e1b45fab5790d0625", "score": "0.7674246", "text": "function forge_check_perm ($section, $reference, $action = NULL) {\n\t$engine = RBACEngine::getInstance() ;\n\n\treturn $engine->isActionAllowed($section, $reference, $action) ;\n}", "title": "" }, { "docid": "003caffee26434aab3bfb4591ce3ed66", "score": "0.75879335", "text": "function checkAccess($module = '', $action = ''){\r\n\r\n // $is_super_admin = $this->Session->read('Admin.is_super_admin');\r\n // if('Y' == $is_super_admin){\r\n // return true;\r\n // }else {\r\n\r\n // $this->loadModel('Admin');\r\n // $admin_id = $this->Session->read('Admin.id');\r\n // $admin_data = $this->Admin->find('count', array('conditions' => array('Admin.id' => $admin_id, 'Admin.status' => 'A'), 'limit' => 1));\r\n\r\n // if(0 == $admin_data){\r\n // $this->redirect(array('plugin' => false, 'controller' => 'admins', 'action' => 'logout', 'admin' => true));\r\n // }\r\n\r\n // $data = $this->getAdminPrivilageData();\r\n // if(!empty($data)){\r\n // foreach ($data as $d){\r\n // if($d['AdminPrivilage']['module'] == $module && 'Y' == $d['AdminPrivilage'][$action]){\r\n // return true;\r\n // }\r\n // }\r\n\r\n // }\r\n // $this->Session->setFlash('Access Denied !', 'error');\r\n // $this->redirect(array('plugin' => false, 'controller' => 'admins', 'action' => 'dashboard', 'admin' => true));\r\n // }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "3bd41c29f39cbbf77a36f13bed8b1151", "score": "0.7322234", "text": "private function checkAccess()\n\t{\n\t\t$result = false;\n\t\t\n\t\t$permission['module'] = $this->getModuleName();\n\t\t$permission['controller'] = $this->getControllerName();\n\t\t$permission['action'] = $this->getActionName();\n\t\t\n\t\t// Para garantir que nao vai chegar na acao de logar e dar redirecionamento infinito.\n\t\t// Ou que o usuario tente deslogar e nao tenha permissao\n\t\tif ($permission['controller'] == 'auth' && in_array($permission['action'], array('login', 'logout'))) {\n\t\t\t$result = true;\n\n\t\t// Todo usuario que conseguiu fazer login no admin merece acessar seu Dashboard\n\t\t} else if (\n\t\t\t$this->getLogin() &&\n\t\t\t$permission['module'] == 'clientes' &&\n\t\t\t$permission['controller'] == 'index' &&\n\t\t\t(in_array ($permission['action'], array('index', 'dashboard')))\n\t\t) {\n\t\t\t$result = true;\n\t\t\t\n\t\t} else {\n\t\t\t// Quando a acao nao existir na tabela action\n\t\t\t// assumimos que ela eh uma acao de leitura (read)\n\t\t\t$actionBoClass = Config::getZf2libConfig('actionBusinessClass', $this->getModuleName());\n\t\t\t$actionBO = new $actionBoClass();\n\t\t\t$action = $actionBO->get($permission['action']);\n\t\t\tif (!$action) {\n\t\t\t\t$permission['action'] = Config::getZf2libConfig('actionRead');\n\t\t\t}\n\t\t\t\n\t\t\t// Se nao tiver acesso redireciona para login\n\t\t\tif (AccessControl::allowed(implode('.', $permission))) {\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "29c9596bf3589d6e4a7e899fccc18bc0", "score": "0.72920954", "text": "function MyApp_Handle_Module_Action_Allowed()\n {\n $this->ModuleName=$this->CGI_GET(\"ModuleName\");\n\n //Test Module access\n $res=$this->MyApp_Module_Access_Has($this->ModuleName);\n\n if (!$res) { return FALSE; }\n \n //Load module, if necessary\n if (!$this->Module)\n {\n $this->MyApp_Module_Load($this->ModuleName);\n }\n \n $action=$this->MyApp_Handle_Action_CGI();\n if ($this->Module)\n {\n $res=$this->Module->MyAction_Allowed($action);\n }\n\n if (!$res)\n {\n if (!empty($this->Module->Actions[ $action ][ \"AltAction\" ]))\n {\n $action=$this->Module->Actions[ $action ][ \"AltAction\" ];\n $res=$this->Module->MyAction_Allowed($action);\n }\n }\n\n if ($res) { return $action; }\n \n return False;\n \n }", "title": "" }, { "docid": "02484d6940f3b79d03debb38cf6cde34", "score": "0.7275893", "text": "function permissions_has_permission($rol, $controller, $action) {\n // verificar si existe el rol\n // verificar si existe la acction \n \n \n $p = permissions_permission($rol, $controller); \n \n switch ($action) {\n case \"create\":\n return ( $p[0] == 1 )? TRUE : false ;\n \n \n case \"read\":\n return ( $p[1] == 1 )? TRUE : false ; // this control the securyty in site, take care \n \n \n case \"update\":\n return ( $p[2] == 1 )? TRUE : false ;\n \n \n case \"delete\":\n return ( $p[3] == 1 )? TRUE : false ;\n \n\n default:\n return false;\n \n }\n}", "title": "" }, { "docid": "ff0f21ae8f917d7480c6f91a0c88f53d", "score": "0.72721666", "text": "private function needPrivilege($module='default', $action='default') {/*{{{*/\n if ( $this->action_map[$module][$action]['validate'] ) {\n return 1;\n } else {\n return 0;\n }\n }", "title": "" }, { "docid": "3e09f2e75e8d7c4944d6427f12f17920", "score": "0.726434", "text": "public function hasPermission($action)\n {\n $permissionName = '';\n if (isset($action['as'])) {\n $permissionName = $action['as'];\n $permissionName = str_replace(\".show\", '.index', $permissionName);\n $permissionName = str_replace(\".store\", '.create', $permissionName);\n } else {\n $permissionName = $action['permission'];\n }\n if (strpos($action['controller'], '@update')) {\n $permissionName .= '.edit';\n }\n if ($permissionName == '') {\n return false;\n }\n if(\\Session::get('expiresAt') == 0){\n \\Cache::forget('permissions');\n $permissions = $this->role->permissions()->get();\n } else {\n if(\\Cache::has('permissions')) {\n $permissions = \\Cache::get('permissions');\n } else {\n $permissions = $this->role->permissions()->get();\n \\Cache::put('permissions', $permissions, \\Session::get('expiresAt', 10));\n }\n }\n foreach ($permissions as $permission) {\n if ($permission->name == $permissionName) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "f1de7619b962b49a8dc47949a01e2c45", "score": "0.72631073", "text": "function check_access_right($module_name, $check_permission = 'view'){\n $ci = & get_instance();\n $Allowed = FALSE;\n if($ci->session->userdata('user_type_id') == 1){\n $Allowed = TRUE;\n } else {\n $permitted_features_urls\t= $ci->session->userdata('permitted_features_urls');\n $user_access_features\t = $ci->session->userdata('user_access_features');\n if(!empty($permitted_features_urls) && in_array($module_name, $permitted_features_urls)){\n foreach($user_access_features AS $row) {\n if($row['permission_url'] == $check_permission && $row['feature_url'] == $module_name) {\n switch ($check_permission) { \n case 'add':\n case 'edit':\n case 'update':\n case \"delete\":\n $Allowed = TRUE;\n break;\n default:\n break;\n }\n }\n }\n }\n }\n return $Allowed;\n }", "title": "" }, { "docid": "ad0fe111cbea9bde6254fb7a88097389", "score": "0.7248278", "text": "public function checkPermissions() { return true;}", "title": "" }, { "docid": "6eb69f0d5f54641431fdaf8e27035124", "score": "0.7235674", "text": "abstract public function HasPermission();", "title": "" }, { "docid": "966b6b71af13fe1c7beb6d83b67dc50d", "score": "0.7214696", "text": "function isPermitted($module, $actionname, $record_id = '') {\n// \tglobal $current_user, $adb;\n// \t$lastModified = '';\n// \tif (!empty($record_id)) {\n// \t\tif (strpos($record_id, 'x')>0) { // is webserviceid\n// \t\t\tlist($void,$record_id) = explode('x', $record_id);\n// \t\t}\n// \t\t$rs = $adb->pquery(\"select date_format(modifiedtime,'%Y%m%d%H%i%s') from vtiger_crmentity where crmid=?\", array($record_id));\n// \t\t$lastModified = $adb->query_result($rs, 0, 0);\n// \t}\n// \t$key = \"ispt:$module%$actionname%$record_id%\" . $current_user->id . \"%$lastModified\";\n// \tif (!coreBOS_Settings::settingExists($key)) {\n// \t\tcoreBOS_Settings::delSettingStartsWith(\"ispt:$module%$actionname%$record_id%\" . $current_user->id);\n\t\t$permission = _vtisPermitted($module, $actionname, $record_id);\n\t\tlist($permission, $unused1, $unused2, $unused3) = cbEventHandler::do_filter('corebos.permissions.ispermitted', array($permission,$module,$actionname,$record_id));\n// \t\tcoreBOS_Settings::setSetting($key, $permission);\n// \t}\n// \treturn coreBOS_Settings::getSetting($key, 'no');\n\treturn $permission;\n}", "title": "" }, { "docid": "5319b8e74077a53573c7e2ac7c716a3b", "score": "0.71379447", "text": "public static function check_permission($type, $module, $node, $action, $id = NULL) {\n $return = 'none';\n if($node->name=='temp-file'){\n if($type=='list'){\n $return = 'true';\n }\n }\n return $return;\n }", "title": "" }, { "docid": "09e33ace88bc77de734f9b296b711b2c", "score": "0.71371514", "text": "function forge_check_global_perm ($section, $action = NULL) {\n\t$engine = RBACEngine::getInstance() ;\n\n\treturn $engine->isGlobalActionAllowed($section, $action) ;\n}", "title": "" }, { "docid": "e3d41a918cb746ac8ad8712050e5ca67", "score": "0.710988", "text": "public static function hasAccess($action)\n {\n return Yii::$app->user->identity->canI($action->id . ucfirst($action->controller->id));\n }", "title": "" }, { "docid": "504f7b677fd6604f46eb476e88042c5e", "score": "0.7079269", "text": "function check_permissions()\n\t\t{\n\t\t\treturn 1;\n\t\t}", "title": "" }, { "docid": "e3ca4fd278f9a5d7ff4818cabf71de71", "score": "0.70558643", "text": "public function checkPermission(App\\Request $request)\n\t{\n\t\t$currentUserPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();\n\t\tif (!$currentUserPrivilegesModel->hasModulePermission($request->getModule())) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermitted('LBL_PERMISSION_DENIED', 406);\n\t\t}\n\t}", "title": "" }, { "docid": "ef0f3435db083ee30fd04dc750969f99", "score": "0.7026086", "text": "function checkPermission($module = '', $action = '', $adminTypeID = 0) {\n\n global $con;\n $status = '';\n $strPermission = '';\n\n if ($module != \"\" AND $action != \"\" AND $adminTypeID > 0) {\n $strPermission = $module . ',' . $action;\n\n if (isset($_SESSION['ADMIN_PERMISSION']) AND count($_SESSION['ADMIN_PERMISSION']) > 0) {\n if (in_array($strPermission, $_SESSION['ADMIN_PERMISSION'])) {\n $status = TRUE;\n } else {\n $status = FALSE;\n }\n } else {\n $arrExistPermission = array();\n $sqlGetPermission = \"SELECT * FROM admin_permission WHERE AP_AT_id=$adminTypeID\";\n $resultGetPermission = mysqli_query($con, $sqlGetPermission);\n if ($resultGetPermission) {\n while ($resultGetPermissionObj = mysqli_fetch_object($resultGetPermission)) {\n $arrExistPermission[] = $resultGetPermissionObj->AP_module_name . \",\" . $resultGetPermissionObj->AP_action_name;\n $_SESSION['ADMIN_PERMISSION'] = $arrExistPermission;\n if (in_array($strPermission, $_SESSION['ADMIN_PERMISSION'])) {\n $status = TRUE;\n } else {\n $status = FALSE;\n }\n }\n } else {\n if (DEBUG) {\n $status = \"resultGetPermission error: \" . mysqli_error($con);\n } else {\n $status = \"resultGetPermission query failed.\";\n }\n }\n }\n return $status;\n } else {\n return $status = \"Incorrect parameters\";\n }\n}", "title": "" }, { "docid": "4bb1cba2db74f84f62d78c0392a2c24d", "score": "0.69485015", "text": "public function checkPermission(App\\Request $request)\n\t{\n\t\t$this->moduelName = $request->getModule();\n\t\t$userPrivilegesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();\n\t\tif (!$userPrivilegesModel->hasModuleActionPermission($this->moduelName, 'Export')) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermitted('LBL_PERMISSION_DENIED', 406);\n\t\t}\n\t}", "title": "" }, { "docid": "a7b466eda14bc3f58e3ec9d5d2b23680", "score": "0.6934477", "text": "function _vtisPermitted($module, $actionname, $record_id = '') {\n\tglobal $log, $adb, $current_user;\n\tif ($module=='com_vtiger_workflow') {\n\t\t$module='CronTasks';\n\t}\n\t$log->debug('> isPermitted '.$module.','.$actionname.','.$record_id);\n\tif (strpos($record_id, 'x')>0) { // is webserviceid\n\t\tlist($void,$record_id) = explode('x', $record_id);\n\t}\n\tif (!empty($record_id) && $module != getSalesEntityType($record_id)) {\n\t\t$record_id = '';\n\t}\n\t$userprivs = $current_user->getPrivileges();\n\t$is_admin = is_admin($current_user);\n\tif ($is_admin) {\n\t\t$log->debug('< isPermitted administrator yes');\n\t\treturn 'yes';\n\t}\n\t$permission = 'no';\n\tif ($module == 'Users' || $module == 'Home' || $module == 'Utilities') {\n\t\t//These modules dont have security right now\n\t\t$log->debug('< isPermitted module access yes');\n\t\treturn 'yes';\n\t}\n\n\t//Checking the Access for the Settings Module\n\tif ($module == 'Settings') {\n\t\tif (!$is_admin) {\n\t\t\t$permission = 'no';\n\t\t} else {\n\t\t\t$permission = 'yes';\n\t\t}\n\t\t$log->debug('< isPermitted Settings '.$permission);\n\t\treturn $permission;\n\t}\n\n\t$tabid = getTabid($module);\n\t$actionid=getActionid($actionname);\n\t// If no actionid, then allow action if tab permission is available\n\tif ($actionid === '') {\n\t\tif ($userprivs->hasModuleAccess($tabid)) {\n\t\t\t$permission = 'yes';\n\t\t} else {\n\t\t\t$permission ='no';\n\t\t}\n\t\t$log->debug('< isPermitted no actionid '.$permission);\n\t\treturn $permission;\n\t}\n\n\t//Checking for view all permission\n\tif ($userprivs->hasGlobalReadPermission() && ($actionid == 3 || $actionid == 4)) {\n\t\t$log->debug('< isPermitted view all permission yes');\n\t\treturn 'yes';\n\t}\n\t//Checking for edit all permission\n\tif ($userprivs->hasGlobalWritePermission() && ($actionid == 3 || $actionid == 4 || $actionid ==0 || $actionid ==1)) {\n\t\t$log->debug('< isPermitted edit all permission yes');\n\t\treturn 'yes';\n\t}\n\t//Checking for tab permission\n\tif (!is_null($tabid) && !$userprivs->hasModuleAccess($tabid)) {\n\t\t$log->debug('< isPermitted tab permission no');\n\t\treturn 'no';\n\t}\n\t//Checking for Action Permission\n\t$action = getActionname($actionid);\n\t$ternary = $userprivs->getModulePermission($tabid, $actionid);\n\tif (is_null($ternary) && ($action == 'Export' || $action == 'Import')) {\n\t\t// if permission is not defined we do not permit export/import\n\t\t$log->debug('< isPermitted profile action permission Export/Import');\n\t\treturn 'no';\n\t}\n\tif (is_null($ternary) || $ternary === '') {\n\t\tif ($action=='DuplicatesHandling' && in_array($module, getInventoryModules())) {\n\t\t\t$permission = 'no';\n\t\t} else {\n\t\t\t$permission = 'yes';\n\t\t}\n\t\t$log->debug('< isPermitted profile action permission not set '.$permission);\n\t\treturn $permission;\n\t}\n\n\tif ($ternary != 0 && $ternary != '') {\n\t\t$log->debug('< isPermitted profile action permission no');\n\t\treturn 'no';\n\t}\n\t//Checking and returning true if recorid is null\n\tif ($record_id == '') {\n\t\t$log->debug('< isPermitted has permission on module and record is not set yes');\n\t\treturn 'yes';\n\t}\n\n\t//If module is not shareable, everyone has access. Faq, PriceBook, among others\n\tif ($record_id != '' && getTabOwnedBy($module) == 1) {\n\t\t$log->debug('< isPermitted TabOwnedBy sharing disabled yes');\n\t\treturn 'yes';\n\t}\n\n\t// has access to module, now let's check the record\n\t$recOwnType='';\n\t$recOwnId='';\n\t$recordOwnerArr=getRecordOwnerId($record_id);\n\tforeach ($recordOwnerArr as $type => $id) {\n\t\t$recOwnType=$type;\n\t\t$recOwnId=$id;\n\t}\n\t$CPUserLogin = $CPRecordRelatedToAC = false;\n\tif (!empty(coreBOS_Session::get('authenticatedUserIsPortalUser', false))) {\n\t\t$CPUserLogin = true;\n\t\tif (in_array($module, ['Products', 'Services', 'Faq', 'cbQuestion', 'cbMap'])) {\n\t\t\t$CPRecordRelatedToAC = true; // not related so we accept whatever the normal permission system says\n\t\t} else {\n\t\t\t$contactId = coreBOS_Session::get('authenticatedUserPortalContact', 0);\n\t\t\tif (!empty($contactId)) {\n\t\t\t\tif ($contactId!=getRelatedAccountContact($record_id, 'Contacts')) {\n\t\t\t\t\t$accountId = getSingleFieldValue('vtiger_contactdetails', 'accountid', 'contactid', $contactId);\n\t\t\t\t\tif (!empty($accountId) && $accountId==getRelatedAccountContact($record_id, 'Accounts')) {\n\t\t\t\t\t\t$CPRecordRelatedToAC = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$CPRecordRelatedToAC = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tif ($recOwnType == 'Users') {\n\t\t$wfs = new VTWorkflowManager($adb);\n\t\t$racbr = $wfs->getRACRuleForRecord($module, $record_id);\n\t\t//Checking if the Record Owner is the current User\n\t\tif ($current_user->id == $recOwnId) {\n\t\t\tif (($actionname!='EditView' && $actionname!='Delete' && $actionname!='DetailView' && $actionname!='CreateView')\n\t\t\t\t|| (!$racbr || $racbr->hasDetailViewPermissionTo($actionname, true))\n\t\t\t) {\n\t\t\t\t$permission = 'yes';\n\t\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t\t$permission = 'no';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted is owner of record '.$permission);\n\t\t\treturn $permission;\n\t\t}\n\t\t//Checking if the Record Owner is the Subordinate User\n\t\tforeach ($userprivs->getSubordinateRoles2Users() as $userids) {\n\t\t\tif (in_array($recOwnId, $userids)) {\n\t\t\t\tif (($actionname!='EditView' && $actionname!='Delete' && $actionname!='DetailView' && $actionname!='CreateView')\n\t\t\t\t\t|| (!$racbr || $racbr->hasDetailViewPermissionTo($actionname, true))\n\t\t\t\t) {\n\t\t\t\t\t$permission = 'yes';\n\t\t\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t\t\t$permission = 'no';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$permission = 'no';\n\t\t\t\t}\n\t\t\t\t$log->debug('< isPermitted owner is subordinate '.$permission);\n\t\t\t\treturn $permission;\n\t\t\t}\n\t\t}\n\t\tif ($racbr!==false && $racbr->hasDetailViewPermissionTo($actionname, false)) {\n\t\t\t$log->debug('< isPermitted RAC User yes');\n\t\t\treturn 'yes';\n\t\t}\n\t} elseif ($recOwnType == 'Groups') {\n\t\t//Checking if the record owner is the current user's group\n\t\tif (in_array($recOwnId, $userprivs->getGroups())) {\n\t\t\t$wfs = new VTWorkflowManager($adb);\n\t\t\t$racbr = $wfs->getRACRuleForRecord($module, $record_id);\n\t\t\tif (($actionname!='EditView' && $actionname!='Delete' && $actionname!='DetailView' && $actionname!='CreateView')\n\t\t\t\t|| (!$racbr || $racbr->hasDetailViewPermissionTo($actionname))\n\t\t\t) {\n\t\t\t\t$permission = 'yes';\n\t\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t\t$permission = 'no';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted current user in assigned group '.$permission);\n\t\t\treturn $permission;\n\t\t}\n\t}\n\n\t//Checking for Default Org Sharing permission\n\t$others_permission_id = $userprivs->getModuleSharingPermission($tabid);\n\tif ($others_permission_id == UserPrivileges::SHARING_READONLY) {\n\t\tif ($actionid == 1 || $actionid == 0) {\n\t\t\tif ($module == 'cbCalendar') {\n\t\t\t\tif ($recOwnType == 'Users') {\n\t\t\t\t\t$permission = isCalendarPermittedBySharing($record_id);\n\t\t\t\t} else {\n\t\t\t\t\t$permission='no';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$permission = isReadWritePermittedBySharing($module, $tabid, $actionid, $record_id);\n\t\t\t}\n\t\t\tif ($permission=='yes' && $CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted sharing readonly: save and edit no, but special sharing permission are calculated '.$permission);\n\t\t\treturn $permission;\n\t\t} elseif ($actionid == 2) {\n\t\t\t$log->debug('< isPermitted sharing readonly: delete no');\n\t\t\treturn 'no';\n\t\t} else {\n\t\t\t$permission = 'yes';\n\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted sharing readonly: all other actions '.$permission);\n\t\t\treturn $permission;\n\t\t}\n\t} elseif ($others_permission_id == UserPrivileges::SHARING_READWRITE) {\n\t\tif ($actionid == 2) {\n\t\t\t$log->debug('< isPermitted sharing readwrite: delete no');\n\t\t\treturn 'no';\n\t\t} else {\n\t\t\t$permission = 'yes';\n\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted sharing readwrite: all other actions '.$permission);\n\t\t\treturn $permission;\n\t\t}\n\t} elseif ($others_permission_id == UserPrivileges::SHARING_READWRITEDELETE) {\n\t\t$wfs = new VTWorkflowManager($adb);\n\t\t$racbr = $wfs->getRACRuleForRecord($module, $record_id);\n\t\tif (($actionname!='EditView' && $actionname!='Delete' && $actionname!='DetailView' && $actionname!='CreateView')\n\t\t\t|| (!$racbr || $racbr->hasDetailViewPermissionTo($actionname))\n\t\t) {\n\t\t\t$permission = 'yes';\n\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted sharing readwritedelete: all actions yes if RAC permits '.$permission);\n\t\t\treturn $permission;\n\t\t}\n\t} elseif ($others_permission_id == UserPrivileges::SHARING_PRIVATE) {\n\t\tif ($actionid == 3 || $actionid == 4) {\n\t\t\tif ($module == 'cbCalendar') {\n\t\t\t\tif ($recOwnType == 'Users') {\n\t\t\t\t\t$permission = isCalendarPermittedBySharing($record_id);\n\t\t\t\t} else {\n\t\t\t\t\t$permission='no';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$wfs = new VTWorkflowManager($adb);\n\t\t\t\t$racbr = $wfs->getRACRuleForRecord($module, $record_id);\n\t\t\t\tif ($racbr) {\n\t\t\t\t\tif ($actionid == 3 && !$racbr->hasListViewPermissionTo('retrieve')) {\n\t\t\t\t\t\t$log->debug('< isPermitted sharing private: list view RAC no');\n\t\t\t\t\t\treturn 'no';\n\t\t\t\t\t} elseif ($actionid == 4 && !$racbr->hasDetailViewPermissionTo('retrieve')) {\n\t\t\t\t\t\t$log->debug('< isPermitted sharing private: detail view RAC no');\n\t\t\t\t\t\treturn 'no';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$permission = isReadPermittedBySharing($module, $tabid, $actionid, $record_id);\n\t\t\t}\n\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted sharing private: view no, but special sharing permission are calculated '.$permission);\n\t\t\treturn $permission;\n\t\t} elseif ($actionid ==0 || $actionid ==1) {\n\t\t\t$wfs = new VTWorkflowManager($adb);\n\t\t\t$racbr = $wfs->getRACRuleForRecord($module, $record_id);\n\t\t\tif ($racbr) {\n\t\t\t\tif ($actionid == 0 && !$racbr->hasDetailViewPermissionTo('create')) {\n\t\t\t\t\t$log->debug('< isPermitted sharing private: create RAC no');\n\t\t\t\t\treturn 'no';\n\t\t\t\t} elseif ($actionid == 1 && !$racbr->hasDetailViewPermissionTo('update')) {\n\t\t\t\t\t$log->debug('< isPermitted sharing private: update RAC no');\n\t\t\t\t\treturn 'no';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$permission = isReadWritePermittedBySharing($module, $tabid, $actionid, $record_id);\n\t\t\tif ($permission=='yes' && $CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted sharing private: save and edit no, but special sharing permission are calculated '.$permission);\n\t\t\treturn $permission;\n\t\t} elseif ($actionid ==2) {\n\t\t\t$log->debug('< isPermitted sharing private: delete no');\n\t\t\treturn 'no';\n\t\t} else {\n\t\t\t$permission = 'yes';\n\t\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t\t$log->debug('< isPermitted sharing private: all other actions '.$permission);\n\t\t\treturn $permission;\n\t\t}\n\t} else {\n\t\t$permission = 'yes';\n\t\tif ($CPUserLogin && !$CPRecordRelatedToAC) {\n\t\t\t$permission = 'no';\n\t\t}\n\t}\n\n\t$log->debug('< isPermitted end '.$permission);\n\treturn $permission;\n}", "title": "" }, { "docid": "cc0ca54b418c06fad46fb6498df5f281", "score": "0.6905447", "text": "public static function hasAccess($moduleKey, $actionKey) {\n $actionID = Core::getActionRecord($moduleKey, $actionKey);\n if ($_SESSION['user_login']['access_level'] == 'all') {\n return 1;\n } else if ($_SESSION['user_login']['access_type'] == 'selected') {\n if (in_array($actionID, $_SESSION['user_login']['action']) == false) {\n return 0;\n } else {\n return 1;\n }\n } else if ($_SESSION['user_login']['access_type'] == 'exclude') {\n if (in_array($actionID, $_SESSION['user_login']['action']) == true) {\n return 0;\n } else {\n return 1;\n }\n }\n }", "title": "" }, { "docid": "0ce878313bb227f4337c6fac06b455bc", "score": "0.6899254", "text": "public function check_permission($module = '', $permission = '', $id_user = 0)\r\n\t{\r\n\t\t$this->CI->load->model('libraries/access_model');\r\n\t\t\r\n\t\t// Resolve iduser\r\n\t\t$id_user = ($id_user != 0) ? $id_user : $this->CI->session->userdata('id_user');\r\n\t\t\r\n\t\t// Checks permission on database\r\n\t\t$count_permission = $this->CI->access_model->get_user_permission($module, $permission, $id_user);\r\n\t\t\r\n\t\t// Adjusts return\r\n\t\treturn ($count_permission > 0) ? true : false;\r\n\t}", "title": "" }, { "docid": "a72fc98fc4d843d8ebc1b8a132b8c028", "score": "0.68751025", "text": "function account_can( $action )\n{\n\tglobal $_shop_account;\n\treturn isset( $_shop_account[$action] ) ? $_shop_account[ $action ] : False;\n}", "title": "" }, { "docid": "0b91b0a46df43f85df688dcdd49d83ed", "score": "0.6847726", "text": "public function hasPermission($name);", "title": "" }, { "docid": "2381a74921dd09cef1aa749f585871dd", "score": "0.6816867", "text": "private function _checkRequiredPermissionLevels($action){\n\t\t//check action permission\n\t\tif(isset($this->requiredPermissionLevels[$action])){\n\t\t\t$permLevel = Acl::getUserPermissionLevel($this->requiredPermissionLevels[$action]['aclId']);\n\t\t\treturn Acl::getUserPermissionLevel($permLevel,$this->requiredPermissionLevels[$action]['requiredPermissionLevel']);\n\t\t}elseif($action!='*'){\n\t\t\treturn $this->_checkRequiredPermissionLevels('*');\n\t\t}else\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "817e45b4285959f84eae81965a13cb6d", "score": "0.68005073", "text": "public function check_allowed_action()\n {\n $arr_action = $this->get_m_arr_selected_action();\n \n //IF YOU WANT TO CHECK THE ACTION REQUESTED IS ALLOWED FOR THIS USER\n //UNCOMMENT THE FOLLOWING LINES\n \n /*\n //IF ACTION LOGIN\n if(isset($arr_action[\"NAME\"]) && $arr_action[\"NAME\"]==\"LOGIN\")\n {\n return true;\n }\n //ELSE IF USER IS LOGGED\n else if( isset($_SESSION[\"user\"][\"id\"]) && $_SESSION[\"user\"][\"id\"]>0 )\n {\n return true;\n }\n else\n {\n return false;\n }*/\n \n //COMMENT IF YOU UNCOMMENT PREVIOUS LINES\n return true;\n }", "title": "" }, { "docid": "9b79de8f968813646a8481cec2705a87", "score": "0.67957586", "text": "function ca_allowedTo($action_perms = array())\n{\n\tglobal $user_info;\n\t\n\t// You're never allowed to do something if your data hasn't been loaded yet!\n\tif (empty($user_info))\n\t\treturn false;\n\t//Something went wrong if this triggers...\n\tif (empty($action_perms))\n\t\treturn false;\n\t//If the action is for everyone, go for it. Or are we superman?\n\tif (in_array('-2', $action_perms) || $user_info['is_admin'])\n\t\treturn true;\n\n\t//Finally, are we allowed?\n\tif (count(array_intersect($action_perms, $user_info['groups'])) > 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "58f96ee10c5d368a32281f1bc56a85a5", "score": "0.67812806", "text": "function checkPermission(Vtiger_Request $request) {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "8ff151af59b208ef3062cdbe86dc17f3", "score": "0.67700124", "text": "public static function manage_modules_permission_check() {\n\t\tif ( current_user_can( 'jetpack_manage_modules' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn new WP_Error( 'invalid_user_permission_manage_modules', self::$user_permissions_error_msg, array( 'status' => self::rest_authorization_required_code() ) );\n\t}", "title": "" }, { "docid": "f5b31e54886469d5c727ef82a4e8f17d", "score": "0.67620194", "text": "public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Show only own undo steps\n\t\t$objSteps = $this->Database->prepare(\"SELECT id FROM tl_undo WHERE pid=?\")\n\t\t\t\t\t\t\t\t ->execute($this->User->id);\n\n\t\t// Restrict the list\n\t\t$GLOBALS['TL_DCA']['tl_undo']['list']['sorting']['root'] = $objSteps->numRows ? $objSteps->fetchEach('id') : array(0);\n\n\t\t// Redirect if there is an error\n\t\tif (Input::get('act') && !in_array(Input::get('id'), $GLOBALS['TL_DCA']['tl_undo']['list']['sorting']['root']))\n\t\t{\n\t\t\t$this->log('Not enough permissions to '. Input::get('act') .' undo step ID '. Input::get('id'), __METHOD__, TL_ERROR);\n\t\t\t$this->redirect('contao/main.php?act=error');\n\t\t}\n\t}", "title": "" }, { "docid": "0639e6d1793a8a23725c01f5202e76e2", "score": "0.67573386", "text": "public function can(string $action, string $where): bool;", "title": "" }, { "docid": "06c25428a31312b3900e059ea4584a3a", "score": "0.675441", "text": "function module_can_access($module)\n {\n\n static $can_access = array();\n // Neu khong get duoc thong tin admin hien tai\n if (isset($can_access[$module])) {\n return $can_access[$module];\n }\n\n // neu module da cai dat thi moi kiem tra (vi ko check voi module ko dc cai dat)\n if (module_install($module)) {\n // neu module da cai ma chua kick hoat\n if (!module_active($module)) {\n $can_access[$module]= false;\n return false;\n }\n }\n $can_access[$module]= true;\n return true;\n }", "title": "" }, { "docid": "efcda238fd97470dc05a87633a5c8b3a", "score": "0.6742676", "text": "private function checkPermissions() {\n\t\tif (VCDUtils::isOwner($this->itemObj)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn VCDUtils::getCurrentUser()->isAdmin();\n\t\t}\n\t}", "title": "" }, { "docid": "9b1a43b09670caa930d8213fd52875bd", "score": "0.6739789", "text": "function check_permission()\n\t{\n\t\t$CFG = $this->config->item('theme_configure');\n\t\tif( ! addPermission( $CFG[\"sector\"][\"add\"] ) )\n\t\t{\n\t\t\t$this->form_validation->set_message('check_permission', _e('access denied'));\n\t\t\treturn false;\t\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "85c84beded0ba37bf1adb8b015e275df", "score": "0.67375135", "text": "function does_user_has_access($uid,$uri,$action){\n $user_groups = get_user_groups($uid);\n $permission_sets = get_permission_sets($uri, $action);\n $permission_set_groups = get_permission_set_groups($permission_sets);\n\n foreach($user_groups as $id) {\n\n if(in_array($id,$permission_set_groups)) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "54498eb62ef9fd29df4782780c33aef0", "score": "0.67153424", "text": "function checkAccess() {\n $args = func_get_args();\n $privilege = $args[0];\n switch(count($args)) {\n case 2:\n $resource=GangliaAcl::ALL;\n $conf = $args[1];\n break;\n case 3:\n $resource = $args[1];\n $conf = $args[2];\n break;\n default:\n trigger_error('checkAccess requires 2 or 3 arguments.',E_USER_ERROR);\n break;\n }\n \n // if auth system is disabled, everything is allowed.\n if(!$conf['auth_system']) {\n return true;\n }\n \n $acl = GangliaAcl::getInstance();\n $auth = GangliaAuth::getInstance();\n \n if(!$auth->isAuthenticated()) {\n $user = GangliaAcl::GUEST;\n } else {\n $user = $auth->getUser();\n }\n \n if(!$acl->has($resource)) {\n throw new Exception(\"Unknown resource '$resource'.\");\n }\n if($acl->hasRole($user)) {\n return (bool) $acl->isAllowed($user, $resource, $privilege);\n }\n return false;\n}", "title": "" }, { "docid": "fe7f193b4c169e13f5fcc8b77558f6bc", "score": "0.6708221", "text": "public function hasPermission($name) { }", "title": "" }, { "docid": "21ba2ecd14fe0b5f50435e9ae1ea4067", "score": "0.6705007", "text": "private function CanAccess($action = \"\") {\n if ($action == 'index') {\n \n } else if ($action == 'create') {\n \n } else if ($action == 'view') {\n \n }\n\n\n return true;\n }", "title": "" }, { "docid": "60e94effe3170beec448a7b7231c8857", "score": "0.6699453", "text": "public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4a54e0e78ad7333c1daf9a9916257e5f", "score": "0.6698224", "text": "public static function __checkPermission($path = '') {\n if(auth('admin')->user()->acl_role_id == 1){\n return true;\n }\n $actualPath = \\Request::route()->uri();\n if(trim($path) != '' ) {\n $actualPath = $path;\n }\n $permissionData = auth('admin')->user()->load('aclRole')->aclRole->load('aclRolePermissions')->aclRolePermissions->load('moduleRoute')->toArray();\n $data = array_column(array_column($permissionData,'module_route'),'route');\n if(in_array($actualPath,$data)){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a7930cc1d450cba6e24e6eea4d23c216", "score": "0.6691391", "text": "public function checkPermissions() {\n return $this->modx->hasPermission('dashboards');\n }", "title": "" }, { "docid": "5bfb5d31dd99db53884fc4556cd3078c", "score": "0.6688284", "text": "protected function checkAccessAction($action){\n\t\tif($action == 'handleAction') return true;\n\n\t\t//Save original action\n\t\t$action = strtolower($action);\n\t\t$allowedActions = $this->getAllowedActions();\n\t\tif(!empty($allowedActions)){\n\t\t\t//Check for specific action rules first, and fall back to global rules defined by asterisk!\n\t\t\tforeach(array($action, '*') as $actionOrAll){\n\t\t\t\t//Check if specific action is set:\n\t\t\t\tif(isset($allowedActions[$actionOrAll])){\n\t\t\t\t\t$test = $allowedActions[$actionOrAll];\n\t\t\t\t\tif($test === true){\n\t\t\t\t\t\t//Case 1: TRUE should always allow access\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else if(substr($test, 0 , 2) == '->'){\n\t\t\t\t\t\t//Fire a custom method to determine if access is allowed\n\t\t\t\t\t\treturn $this->{substr($test, 2)}();\n\t\t\t\t\t} else if($test == '::isAuthenticated'){\n\t\t\t\t\t\treturn Auth::isAuthenticated();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//Case 4: Check if user has permission\n\t\t\t\t\t\treturn Auth::isAuthenticated() && Auth::currentUser()->can($test);\n\t\t\t\t\t}\n\t\t\t\t} else if((($key = array_search($actionOrAll, $allowedActions, true)) !== false) && is_numeric($key)){\n\t\t\t\t\t//Case 5: Allow numeric array notation (search for array value as action instead of key)\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "da7641cef20116c312233d1530ef59b6", "score": "0.6688175", "text": "function can($permission, $accessType) {\n\n $userPermissions = app('request')->user()->getAllPermissionsFormAllRoles();\n if ($userPermissions->get($permission) != $accessType && $userPermissions->get($permission) != \"full_access\") {\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "d94d5b42c3cab7cca13ee38033af2ab7", "score": "0.6678452", "text": "public function checkAccess()\n\t{\n\t\treturn Yii::app()->user->checkAccess('Cms.Page.*');\n\t}", "title": "" }, { "docid": "d85ee74d73cd4cbc9a62b117abe45241", "score": "0.6678418", "text": "protected function can($action)\n {\n return $this->form_request->user()->can($action, $this->model);\n }", "title": "" }, { "docid": "2fa1b0ca4fd9369ae6ffb076a91533fe", "score": "0.66743", "text": "public function checkPermission()\n\t{\n\t\t$this->checkIaoModulePermission('tl_iao_projects');\n\t}", "title": "" }, { "docid": "eea0bb43e9b4574182a9057649da5f8a", "score": "0.6659258", "text": "public function hasPermissionTo($permission);", "title": "" }, { "docid": "9b05ee967d7cfc542338feb27b2a7ee3", "score": "0.6657193", "text": "private function check_permissions() {\r\n\t\tcheck_ajax_referer( 'wphb-fetch', 'nonce' );\r\n\r\n\t\tif ( ! current_user_can( WP_Hummingbird_Utils::get_admin_capability() ) ) {\r\n\t\t\tdie();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7280e0fbef0031c37fc0cc6938dc9e03", "score": "0.66554123", "text": "function checkAccessRights($module_id)\n\t\t{\t\t\t\t\n\t\t\tif(isset($this->mUserIdentity) && !empty($this->mUserIdentity)) {\t\t\t\t\n\t\t\t\t$privileges = $this->mUserIdentity->getPrivileges();\n\t\t\t\t//print_r( $privileges[$module_id]);\t\t\t\t\n\t\t\t\tif($priv = $privileges[$module_id]) {\n\t\t\t\t\t//echo \"<PRE>\";\n\t\t\t\t\t//print_r($priv);\n\t\t\t\t\t//echo \"</PRE>\";\n\t\t\t\t\t//$load = microtime();\n\t\t\t\t\t//print_r (\"this page load <b>\".number_format($load,2).\"</b> seconds<br>\"); \t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif($priv[\"read\"] && $priv[\"add\"] && $priv[\"update\"] && $priv[\"delete\"])$access_rights = true;\t\t\t\t\t\n\t\t\t\t\t$_SESSION['last_module'] =$module_id;\n\t\t\t\t\t//print_r($_SESSION['last_module']);\t\t\t\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$satpam = new GateKeeper($cfg, $sess);\n\t\t\t\t\t$satpam->executeUpdateQuery();\t\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b5bac991952669d4d0aca6b4c35d8751", "score": "0.6651128", "text": "public function checkUserActionPermission($action, $type)\n {\n if (!$this->evaluatePermissions) {\n return true;\n }\n\n $allow = false;\n if (!empty($this->userPermissions[strtolower($action) . ucfirst(strtolower($type))])) {\n $allow = true;\n }\n\n return $allow;\n }", "title": "" }, { "docid": "6170c1c71fe85d00001dbe9ffdfac68d", "score": "0.6649311", "text": "public function hasPermission(int $permission);", "title": "" }, { "docid": "4f6280ca4dc203425613be5b8aa7fb85", "score": "0.66446793", "text": "function isAllowed_Outlook($module, $action, $user_id, $record_id) {\n\tglobal $log;\n\t$log->debug('> isAllowed_Outlook '.$module.','.$action.','.$user_id.','.$record_id);\n\n\t$permission = 'no';\n\tif ($module == 'Users' || $module == 'Home' || $module == 'Settings') {\n\t\t//These modules do not have security\n\t\t$permission = 'yes';\n\t} else {\n\t\tglobal $current_user;\n\t\t$tabid = getTabid($module);\n\t\t$actionid = getActionid($action);\n\t\t$profile_id = getUserProfile($user_id);\n\t\t$profile_id = $profile_id[0];\n\t\t$tab_per_Data = getAllTabsPermission($profile_id);\n\n\t\t$permissionData = getTabsActionPermission($profile_id);\n\t\t$defSharingPermissionData = getDefaultSharingAction();\n\t\t$others_permission_id = $defSharingPermissionData[$tabid];\n\n\t\t//Checking if this tab is allowed\n\t\tif ($tab_per_Data[$tabid] == 0) {\n\t\t\t$permission = 'yes';\n\t\t\t//Checking whether this action is allowed\n\t\t\tif ($permissionData[$tabid][$actionid] == 0) {\n\t\t\t\t$permission = 'yes';\n\t\t\t\t$rec_owner_id = '';\n\t\t\t\tif ($record_id != '' && $module != 'Faq') {\n\t\t\t\t\t$rec_owner_id = getUserId($record_id);\n\t\t\t\t}\n\n\t\t\t\tif ($record_id != '' && $others_permission_id != '' && $module != 'Faq' && $rec_owner_id != 0) {\n\t\t\t\t\tif ($rec_owner_id != $current_user->id) {\n\t\t\t\t\t\tif ($others_permission_id == UserPrivileges::SHARING_READONLY) {\n\t\t\t\t\t\t\tif ($action == 'EditView' || $action == 'CreateView' || $action == 'Delete') {\n\t\t\t\t\t\t\t\t$permission = 'no';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$permission = 'yes';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($others_permission_id == UserPrivileges::SHARING_READWRITE) {\n\t\t\t\t\t\t\tif ($action == 'Delete') {\n\t\t\t\t\t\t\t\t$permission = 'no';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$permission = 'yes';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} elseif ($others_permission_id == UserPrivileges::SHARING_READWRITEDELETE) {\n\t\t\t\t\t\t\t$permission = 'yes';\n\t\t\t\t\t\t} elseif ($others_permission_id == UserPrivileges::SHARING_PRIVATE) {\n\t\t\t\t\t\t\tif ($action == 'DetailView' || $action == 'EditView' || $action == 'CreateView' || $action == 'Delete') {\n\t\t\t\t\t\t\t\t$permission = 'no';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$permission = 'yes';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$permission = 'yes';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$permission = 'no';\n\t\t\t}\n\t\t} else {\n\t\t\t$permission = 'no';\n\t\t}\n\t}\n\t$log->debug('< isAllowed_Outlook');\n\treturn $permission;\n}", "title": "" }, { "docid": "6d178db3d9df6d03d6dc07e6e5611596", "score": "0.66445833", "text": "public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Set root IDs\n\t\tif (!is_array($this->User->newsletters) || count($this->User->newsletters) < 1)\n\t\t{\n\t\t\t$root = array(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$root = $this->User->newsletters;\n\t\t}\n\n\t\t$id = strlen($this->Input->get('id')) ? $this->Input->get('id') : CURRENT_ID;\n\n\t\t// Check current action\n\t\tswitch ($this->Input->get('act'))\n\t\t{\n\t\t\tcase 'paste':\n\t\t\tcase 'select':\n\t\t\t\t// Allow\n\t\t\t\tbreak;\n\n\t\t\tcase 'create':\n\t\t\t\tif (!strlen($this->Input->get('pid')) || !in_array($this->Input->get('pid'), $root))\n\t\t\t\t{\n\t\t\t\t\t$this->log('Not enough permissions to create newsletters in channel ID \"'.$this->Input->get('pid').'\"', 'tl_search_and_replace_rules checkPermission', TL_ERROR);\n\t\t\t\t\t$this->redirect('contao/main.php?act=error');\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'cut':\n\t\t\tcase 'copy':\n\t\t\t\tif (!in_array($this->Input->get('pid'), $root))\n\t\t\t\t{\n\t\t\t\t\t$this->log('Not enough permissions to '.$this->Input->get('act').' wordlist ID \"'.$id.'\" to channel ID \"'.$this->Input->get('pid').'\"', 'tl_search_and_replace_rules checkPermission', TL_ERROR);\n\t\t\t\t\t$this->redirect('contao/main.php?act=error');\n\t\t\t\t}\n\t\t\t\t// NO BREAK STATEMENT HERE\n\n\t\t\tcase 'edit':\n\t\t\tcase 'show':\n\t\t\tcase 'delete':\n\t\t\t\tif (!in_array($this->Input->get('pid'), $root))\n\t\t\t\t{\n\t\t\t\t\t$this->log('Not enough permissions to '.$this->Input->get('act').' wordlist ID \"'.$id.'\" to channel ID \"'.$this->Input->get('pid').'\"', 'tl_search_and_replace_rules checkPermission', TL_ERROR);\n\t\t\t\t\t$this->redirect('contao/main.php?act=error');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'editAll':\n\t\t\tcase 'deleteAll':\n\t\t\tcase 'overrideAll':\n\t\t\tcase 'cutAll':\n\t\t\tcase 'copyAll':\n\n\t\t\tdefault:\n\t\t\t\tif (strlen($this->Input->get('act')))\n\t\t\t\t{\n\t\t\t\t\t$this->log('Invalid command \"'.$this->Input->get('act').'\"', 'tl_search_and_replace_rules checkPermission', TL_ERROR);\n\t\t\t\t\t$this->redirect('contao/main.php?act=error');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "601976e5588325ecd1084178b94ca54a", "score": "0.6644377", "text": "function accessGranted() {\n\t\t$gperm_handler = icms::handler('icms_member_groupperm');\n\t\t$groups = is_object(icms::$user) ? icms::$user->getGroups() : array(ICMS_GROUP_ANONYMOUS);\n\n\t\t$module = icms::handler('icms_module')->getByDirname(basename(dirname(dirname(__FILE__))));\n\n\t\t$agroups = $gperm_handler->getGroupIds('module_admin', $module->getVar(\"mid\"));\n\t\t$allowed_groups = array_intersect($groups, $agroups);\n\n\t\t$viewperm = $gperm_handler->checkRight('content_read', $this->getVar('content_id', 'e'), $groups, $module->getVar(\"mid\"));\n\n\t\tif (is_object(icms::$user) && icms::$user->getVar(\"uid\") == $this->getVar('content_uid', 'e')) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($viewperm && $this->getVar('content_status', 'e') == CONTENT_CONTENT_STATUS_PUBLISHED) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($viewperm && count($allowed_groups) > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "29533152d792bc36ce0ac910a80c1431", "score": "0.66363555", "text": "public function hasAccessTo($module) {\n\t\t\t\n\t\t\treturn in_array($module, $this->companyInfo['modules']);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "cb0f0478ac2b8ee15687dfedca625a13", "score": "0.6631211", "text": "public function checkPermission(App\\Request $request)\n\t{\n\t\t$currentUserPriviligesModel = Users_Privileges_Model::getCurrentUserPrivilegesModel();\n\t\tif (!$currentUserPriviligesModel->hasModuleActionPermission($request->getModule(), 'QuickExportToExcel')) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermitted('LBL_PERMISSION_DENIED', 406);\n\t\t}\n\t}", "title": "" }, { "docid": "9d73b6453814c8744860e2f6f3f3f443", "score": "0.66270214", "text": "public function hasAccess($level,$sitePart,$action) {\r\n $pdo = Logger::connect();\r\n $SQL = \"Select rp.role_perm_id, Level, M.label Menu, p.permission \"\r\n . \"from role_perm rp \"\r\n . \"join Menu m on rp.menu_id = m.Menu_id \"\r\n . \"join permissions p on rp.perm_id = p.perm_id \"\r\n . \"where rp.level =:level and m.label =:part and p.permission = :action\";\r\n $q = $pdo->prepare($SQL);\r\n $q->bindParam(':level',$level);\r\n $q->bindParam(':part',$sitePart);\r\n $q->bindParam(':action',$action);\r\n $q->execute();\r\n// $row = $q->fetchAll(PDO::FETCH_ASSOC);\r\n// print $SQL.\"<br>\";\r\n// print \"Level: \".$level.\" Site: \".$sitePart.\" Action: \".$action.\"<br>\";\r\n// print_r($row);\r\n// print \"<br>\";\r\n if ($q->rowCount()>0){\r\n return TRUE;\r\n } else {\r\n return FALSE;\r\n// return TRUE;\r\n }\r\n Logger::disconnect();\r\n }", "title": "" }, { "docid": "41c0752f648c5b0690d5e98a39a946d5", "score": "0.661188", "text": "public function checkPermission()\n\t{\n\n\t\tif ($this->User->isAdmin)\n\t\t{\n\t\t\t// allow admins\n\t\t\treturn;\n\t\t}\n\n\t\t// find tl_news4archiv.id\n\t\tif(!$this->Input->get('act') || in_array($this->Input->get('act'),array('create','select','editAll','overrideAll')))\n\t\t{\n\t\t\t$news4wardID = $this->Input->get('id');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$objArticle = $this->Database->prepare('SELECT pid FROM tl_news4ward_article WHERE id=?')->execute($this->Input->get('id'));\n\t\t\t$news4wardID = $objArticle->pid;\n\t\t}\n\n\t\tif(is_array($this->User->news4ward) && count($this->User->news4ward) > 0 && in_array($news4wardID,$this->User->news4ward)) return;\n\n\t\t$this->log('Not enough permissions to '.$this->Input->get('act').' news4ward archive ID \"'.$news4wardID.'\"', 'tl_news4ward checkPermission', TL_ERROR);\n\t\t$this->redirect('contao/main.php?act=error');\n\t}", "title": "" }, { "docid": "1366f739f2f6af7693b72c24a146b581", "score": "0.66032034", "text": "function has_permission()\n {\n require_status(Statuses::$LOGGED_IN);\n\n echo has_permission($this->input->post(\"permission_name\")) ? \"true\" : \"false\";\n }", "title": "" }, { "docid": "d53bd1208ed410666dee7aa530a8a908", "score": "0.660106", "text": "function checkPermission($need=array('2','3')) {\n\tglobal $userInfo;\n\t$level = $userInfo->getType();\n\tif(is_array($need)) {\n\t\tif(!in_array($level,$need)) {\n\t\t\theader(\"location: /admin.php?op=accessdenied\");\n\t\t\texit;\n\t\t}\n\t} else {\n\t\tif($level != $need) {\n\t\t\theader(\"location: /admin.php?op=accessdenied\");\n\t\t\texit;\t\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f1f93348db9211deab9e08cf4da9ccaa", "score": "0.6599691", "text": "public function checkAccess() {\n\n }", "title": "" }, { "docid": "b0d63264f5422d3ef727ca15793bae0d", "score": "0.65993506", "text": "function hasRestriction($perm)\n{\n if (hasPermission($perm)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "35b5a873c475c118321a9ccf3a77deda", "score": "0.6586733", "text": "public function has_access_to($action, $context_id = NULL, $instance_id = NULL)\r\n {\r\n\t\treturn true;\r\n // No login, no access.\r\n if (!$this->is_logged_in()) {\r\n return FALSE;\r\n }\r\n \r\n // This permission isn't set on any level.\r\n if (!isset($this->permissions[$action])) {\r\n return FALSE;\r\n }\r\n \r\n if (empty($context_id)) {\r\n // No context level check is required.\r\n return TRUE;\r\n } else {\r\n if (empty($instance_id)) {\r\n return $this->permissions[$action] == $context_id;\r\n } else {\r\n // TODO check the parent company access\r\n return $this->permissions[$action] == $context_id;\r\n }\r\n }\r\n \r\n return FALSE;\r\n }", "title": "" }, { "docid": "351937ecc89efe13f8015134df103068", "score": "0.6570543", "text": "static function access(){\n $return = onapp_has_permission(array('roles'));\n onapp_debug('return => ' . $return);\n return $return;\n }", "title": "" }, { "docid": "e9ef08e17f152208c1baed4ad8059217", "score": "0.6569864", "text": "private function checkPermission()\r\n {\r\n $result = array();\r\n // get article status and its node status\r\n $valide = $this->model->action('article','getStatus',\r\n array('id_article' => (int)$this->current_id_article,\r\n 'result' => & $result));\r\n\r\n // check if the article is accessible\r\n if( ($valide == false) ||\r\n ($result['nodeStatus'] < $this->node_status) ||\r\n ($result['articleStatus'] < $this->article_status))\r\n {\r\n // switch to the index page\r\n $this->router->redirect();\r\n }\r\n\r\n if( $this->viewVar['isUserLogged'] == false )\r\n {\r\n // the requested article is only available for registered users\r\n if( ($result['nodeStatus'] == 3) ||\r\n ($result['articleStatus'] == 5) )\r\n {\r\n // set url vars to come back to this page after login\r\n $this->model->session->set('url','id_article/'.$this->current_id_article);\r\n // switch to the login page\r\n $this->router->redirect( 'cntr/login' );\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e0b17a0ff0667aa1f8f7079b9e453550", "score": "0.6562871", "text": "function module_permission_status() {\n\t\tif (func_num_args()) {\n\t\t\t$this->arg_list = func_get_args();\n\t\t\t$module = $this->arg_list[0];\n\t\t\t$user_id = $this->arg_list[1];\n\t\t}\n\t\t$sql = \"select module_id from module_permissions \".\n\t\t\t \"where module_id = '\".$module.\"' and user_id = '\".$user_id.\"'\";\n\t\tif ($result = mysql_query($sql)) {\n\t\t\tif (mysql_num_rows($result)) {\n\t\t\t\tif (list($module_id) = mysql_fetch_array($result)) {\n\t\t\t\t\treturn $module_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "abc435d3f375bc2f1c7f3a1202f942f5", "score": "0.65607977", "text": "public function hasPermission($permission);", "title": "" }, { "docid": "abc435d3f375bc2f1c7f3a1202f942f5", "score": "0.65607977", "text": "public function hasPermission($permission);", "title": "" }, { "docid": "42385467a7799d036898d77e505f3c1a", "score": "0.65602756", "text": "abstract public function checkAccess();", "title": "" }, { "docid": "2b6f0395d46026faab74faf27004907e", "score": "0.6545733", "text": "protected function can($action)\n {\n return $this->formRequest->user($this->guard)->can($action, $this->model);\n }", "title": "" }, { "docid": "bc1f15f1e17e4301df8549c1a8118655", "score": "0.65416515", "text": "function user_can(string $action = null)\n\t{\n\t\treturn vars_exists($action)\n\t\t\tand vars_exists($_SESSION['USER_TYPE'])\n\t\t\tand vars_exists($_SESSION['USER_ROLE'])\n\t\t\tand vars_exists($_SESSION['USER_POWER'])\n\t\t\tand in_array($action, $_SESSION['USER_POWER']);\n\t}", "title": "" }, { "docid": "23096065c1804ed0361272c30cace01d", "score": "0.65321505", "text": "public static function checkPermission(){\n\t\tif(!self::checkLoggedin())\n\t\t\tHeaderUtil::redirect(\"/login\");\n\t\telse\n\t\t{\n\t\t\t// check if banned\n\t\t}\n\t}", "title": "" }, { "docid": "c01df9166ec9632645438fd6b4dcacc2", "score": "0.65312123", "text": "public function checkPermissions()\n {\n return $this->modx->context->checkPolicy('contentblocks_categories_export');\n }", "title": "" }, { "docid": "51ac586ee9a1081b7f3e5b09a0569d14", "score": "0.6524213", "text": "function checkPermission($permissionKey) {\n\treturn (in_array($permissionKey, $_SESSION['user_roles']));\n}", "title": "" }, { "docid": "85b9ab5aa211069df8f6d97568eb2bc9", "score": "0.6522699", "text": "public static function isAllowed($controller, $action) {\n //Get Current user role\n $auth = Zend_Auth::getInstance();\n $role = Application_Model_Role::getById($auth->getIdentity()->role_id);\n $acl = Zend_Registry::get('acl');\n return ($acl->isAllowed($role[0]->role, $controller, $action)) ? true : false; \n }", "title": "" }, { "docid": "1b7f761bd775cb5e539a82f3ba45e251", "score": "0.65156215", "text": "function isAuthorized(){\r\n\t\treturn $this->__permitted($this->name,$this->action);\r\n\t}", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.6512464", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.6512464", "text": "public function permissions();", "title": "" }, { "docid": "84c2009b600dcd0aa4c6cfdb9dc46b24", "score": "0.6512464", "text": "public function permissions();", "title": "" }, { "docid": "9e3437a8dbea2c2da0907b23c785fad2", "score": "0.6481819", "text": "public function can(string $permission, ...$arguments) : bool;", "title": "" }, { "docid": "d80a790c85c2794a2bbfb29d3d334841", "score": "0.6468299", "text": "public function checkPermissions() {\n return $this->modx->hasPermission('customize_forms');\n }", "title": "" }, { "docid": "d92cfd9392c7a2509c6fe16418329030", "score": "0.64582807", "text": "function __checkPermitted()\n {\n // Read configured facebook permissions.\n $permsissionsNeeded = Configure::read('fbPermissionsArray');\n\n // Get user's permissions from Facebook.\n $facebook = getFbInstance();\n try {\n $permissionsList = $facebook->api(\n '/me/permissions',\n 'GET',\n array('access_token' => $this->Session->read('Auth.User.access_token'))\n );\n } catch(FacebookApiException $e) {\n $result = $e->getResult();\n CakeLog::write('info', \"Facebook Api Error : {$result['error']['message']}\");\n return false;\n }\n\n // Checks if application have access to required user permissions.\n foreach ($permsissionsNeeded as $perm) {\n if (!isset($permissionsList['data'][0][$perm]) || $permissionsList['data'][0][$perm] != 1 ) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "8574bf8c043854afd61734cfadbcef74", "score": "0.6456287", "text": "public function mayAccess(): bool\n\t{\n\t\t// If role filtering is not set up then allow through\n\t\tif (! function_exists('has_permission'))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// Anyone can run user actions\n\t\tif (empty($this->attributes['role']) || $this->attributes['role'] === 'user')\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// Otherwise check for Action role permission\n\t\treturn has_permission($this->attributes['role']);\n\t}", "title": "" }, { "docid": "a1b97bc09e5754afeefc69310339c11d", "score": "0.6453892", "text": "private function _checkAccessPetition()\n {\n\n if (!in_array($this->_module, $this->config->get('_public_modules_'))) {\n // run ACL , only if is activated in conf file (_acl_active_)\n ($this->config->get('_acl_active_')) ?\n (\\kerana\\Auth::checkAuthentication()) ?\n New \\kerana\\acl\\Acl($this->_module, $this->_controller, $this->_action) : '' :\n \\kerana\\Auth::checkAuthentication();\n }\n }", "title": "" }, { "docid": "ec1788752fd6a20be3b221280ec7a51b", "score": "0.6451489", "text": "public function checkPermissions( $modulo, $accion ){\n\t \n\t $persona = $this->Cookie->read('persona');\n\t $modulos = $this->Cookie->read('modulos');\n\t //verificar si el modulo esta entre los permitidos para el usuario\n\t if( in_array($modulo, $modulos) ){\n\t\t return TRUE;\n\t\t}/*else{\n\t\t\t// verificar si el usuario tiene acceso a reportes y la accion es un reporte.\n\t\t\tif( in_array('reporte', $modulos) && ($accion == 'ver' || $accion == 'imprimir') ):\n\t\t\t\treturn TRUE;\n\t\t\tendif;\t \n\t }// fin de in array modulo*/\n\t return FALSE;\n\t \n }", "title": "" }, { "docid": "4199b2942944fe744c07a9798abdb110", "score": "0.64462864", "text": "function check_permissions()\n\t\t{\n\t\t\tif (user_permissions_get(\"namedadmins\"))\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlog_write(\"error\", \"page_output\", \"You do not have permissions to access this interface, request your administrator to assign you to the namedadmins group\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c042183126d9d64fa574c95fc34d270d", "score": "0.6445245", "text": "abstract public function hasPermission($permission);", "title": "" }, { "docid": "a73d3260affa32e8147fb2a826f2aecf", "score": "0.6441027", "text": "public function isActionAllowed($action)\n {\n return Mage::getSingleton('admin/session')->isAllowed('events/manage/' . $action);\n }", "title": "" }, { "docid": "1314aa7643ff059b780feafa60ad12d6", "score": "0.6438811", "text": "protected function _isAllowed()\n {\n \n $actionName = $this->getRequest()->getActionName();\n switch ($actionName) {\n case 'index':\n case 'createbatch':\n case 'print':\n // intentionally no break\n default:\n $adminSession = Mage::getSingleton('admin/session');\n $isAllowed = $adminSession\n ->isAllowed('compandsave_functions/packagelist');\n break;\n }\n\n return $isAllowed;\n }", "title": "" }, { "docid": "f52d00ab83938efdbc0dc4e5a61ac058", "score": "0.6430435", "text": "public function checkPermission($action, $station_id = null)\n {\n if (!$this->isAllowed($action, $station_id)) {\n if (!$this->_auth->isLoggedIn()) {\n throw new \\App\\Exception\\NotLoggedIn();\n } else {\n throw new \\App\\Exception\\PermissionDenied();\n }\n }\n }", "title": "" }, { "docid": "8d8c5cdc664da8bf9381f7270a22dc9c", "score": "0.6430183", "text": "public function checkAccess($module, $view, $context)\n {\n if ($view == 'team_security') {\n // Let the other modules decide\n return true;\n }\n\n if (!empty($this->aclModule)) {\n $module = $this->aclModule;\n }\n\n $currentUser = $this->getCurrentUser($context);\n\n if (!$currentUser) {\n return false;\n }\n\n if($currentUser->isAdminForModule($module) || $currentUser->isDeveloperForModule($module)) {\n return true;\n } \n else {\n if ($this->allowUserRead && !$this->isWriteOperation($view, $context)) {\n return true;\n } \n else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "07c65cc0691744a34a0d579515c229cc", "score": "0.6428217", "text": "public function permission() {\n return true;\n }", "title": "" }, { "docid": "68194ca7e8d4ce68144c870e684c5acf", "score": "0.64164144", "text": "function CheckAccess($perm = 'Use FEUsignUp')\n {\n return $this->CheckPermission($perm);\n }", "title": "" }, { "docid": "2198b003e4db9e2262ac4be818e013db", "score": "0.6414641", "text": "public static function configure_modules_permission_check() {\n\t\tif ( current_user_can( 'jetpack_configure_modules' ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn new WP_Error( 'invalid_user_permission_configure_modules', self::$user_permissions_error_msg, array( 'status' => self::rest_authorization_required_code() ) );\n\t}", "title": "" }, { "docid": "64b748f9f6aa79980e76ab8e26dd34b7", "score": "0.64029413", "text": "function userCan($action, $objects = null, $user = null)\n\t{\n\t\t// TODO: UNCOMMENT THIS WHEN HAVE PERMISSIONS SYSTEM UP AND RUNNING\n\t\t//trigger_error(_t(\"The permissions function userCan() has not been overridden in the $this->name controller. You must define this function, or alternatively use the \\$allow and \\$allowIfLoggedIn arrays in the controller\", true), E_USER_WARNING);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2b3e0741b324da4c74fde553502c09dc", "score": "0.6398196", "text": "abstract public function permissions();", "title": "" }, { "docid": "87e0aafb8304c284d70d864de60f99f9", "score": "0.6397469", "text": "function _can_do($info, $action)\n\t{\n\t\tswitch ($action) {\n\t\t\tcase 'view':\n\t\t\tcase 'del': {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "60057cf800b7730934aa11c20d934dbb", "score": "0.6389022", "text": "public function authorize()\n {\n return with(new Permission($this, $this->moduleRef, $this->actionRef))\n ->verify()\n ->log()\n ->result();\n }", "title": "" } ]
53312f0cf33d8c9e7783fc8c6be2a388
Create rules using this function
[ { "docid": "11bbbe3b5df4bb7317a36f97e0f08181", "score": "0.0", "text": "public function ruleCreation($json)\n {\n try{\n $ch = curl_init();\n $this->url=$this->config['twitter_gnip_rules_url'];\n curl_setopt($ch, CURLOPT_URL, $this->url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch,CURLOPT_USERPWD,$this->login.':'.$this->pass);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $json);\n curl_setopt($ch, CURLOPT_POST, 1);\n\n $headers = array();\n $headers[] = 'Content-Type: application/x-www-form-urlencoded';\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($ch);\n if (curl_errno($ch)) {\n echo 'Error:' . curl_error($ch);\n }\n curl_close($ch);\n return $result;\n }\n catch(Exception $e)\n {\n Log::error($e->getMessage());\n return $e->getMessage();\n }\n }", "title": "" } ]
[ { "docid": "991b05a4e6db7f1ab9e561202a69759c", "score": "0.7869259", "text": "protected abstract function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.78306067", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.78306067", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.78306067", "text": "abstract public function rules();", "title": "" }, { "docid": "f6eb192776cfc93327bb87174388b369", "score": "0.78306067", "text": "abstract public function rules();", "title": "" }, { "docid": "db164b94f2460112473d3c95e1461d6d", "score": "0.7789525", "text": "protected function _generateRules()\n {\n }", "title": "" }, { "docid": "42f2a781bededf91ac60c705e36a093e", "score": "0.77052444", "text": "abstract function rules();", "title": "" }, { "docid": "e1a3a1abe407168f5aefef0c8e011b23", "score": "0.7675802", "text": "public function rules();", "title": "" }, { "docid": "e1a3a1abe407168f5aefef0c8e011b23", "score": "0.7675802", "text": "public function rules();", "title": "" }, { "docid": "e1a3a1abe407168f5aefef0c8e011b23", "score": "0.7675802", "text": "public function rules();", "title": "" }, { "docid": "9acd75a0cf558d5e282df6610157957e", "score": "0.7612121", "text": "public function createRules()\n {\n return [];\n }", "title": "" }, { "docid": "71e4e4b4bacf2f0cdabad512b2a3b9e0", "score": "0.75126535", "text": "public function buildRules(): void\n {\n }", "title": "" }, { "docid": "38344b0ed5645492b86a9675fac6dc0d", "score": "0.74100447", "text": "abstract protected function getRules();", "title": "" }, { "docid": "043bfa2c50d84270faae6c575e7a9152", "score": "0.7252635", "text": "public function makeRules()\n {\n $this->rules = [];\n preg_match_all(\"/([.#a-z0-9-]*)\\s?({[^}]*})/i\", $this->contents(), $comands);\n foreach ($comands[1] as $k => $selector) {\n preg_match_all(\"/([a-z0-9-]*):([^;]*);/i\", $comands[2][$k], $declarations);\n $this->rules[$selector] = [];\n foreach ($declarations[1] as $i => $property) {\n $this->rules[$selector][$property] = $declarations[2][$i];\n }\n }\n }", "title": "" }, { "docid": "c202884cd1a4b740fba6eab44b7a078a", "score": "0.7195975", "text": "abstract public function rules(): array;", "title": "" }, { "docid": "c202884cd1a4b740fba6eab44b7a078a", "score": "0.7195975", "text": "abstract public function rules(): array;", "title": "" }, { "docid": "c202884cd1a4b740fba6eab44b7a078a", "score": "0.7195975", "text": "abstract public function rules(): array;", "title": "" }, { "docid": "f4ba65b2aa3ca5715c2078475c53dbb6", "score": "0.70527023", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['product_code']));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n $rules->add($rules->existsIn(['brand_id'], 'Brands'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n // $rules->add($rules->existsIn(['image_id'], 'Images'));\n\n return $rules;\n }", "title": "" }, { "docid": "1b76906b1bc74108461ac86b65cf6acf", "score": "0.70143217", "text": "protected function createRules(): array\n {\n return [];\n }", "title": "" }, { "docid": "7ee6fa2cf08d4e2a68c551151d1d88df", "score": "0.6964295", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n // $rules->add($rules->existsIn(['genre_id'], 'Genres'));\n\n return $rules;\n }", "title": "" }, { "docid": "a7c5bed27aca7a6395cbc1e27f0407f9", "score": "0.6958931", "text": "abstract public function rules() : array;", "title": "" }, { "docid": "b616391bf7cd02058be0e53f259d31a4", "score": "0.69432724", "text": "public function buildRules(RulesChecker $rules)\n {\n //$rules->add($rules->existsIn(['softland_id'], 'Softlands'));\n return $rules;\n }", "title": "" }, { "docid": "b43fb635d9fbec1cecc52b7df21246a9", "score": "0.69010496", "text": "public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['post_id'], 'Posts'));\n $rules->add($rules->existsIn(['group_id'], 'Groups'));\n\n return $rules;\n }", "title": "" }, { "docid": "e78fa552686cab44ab9f0d4c202e05c4", "score": "0.68985623", "text": "abstract public function parseRules();", "title": "" }, { "docid": "d840bf76a8be2ed6533c52b567ac8e7c", "score": "0.6894043", "text": "public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->existsIn(['committee_id'], 'Committees'));\r\n $rules->add($rules->existsIn(['user_id'], 'Users'));\r\n $rules->add($rules->existsIn(['item_category_id'], 'ItemCategories'));\r\n return $rules;\r\n }", "title": "" }, { "docid": "cf86a3a34f685eee429ac36ef32687e4", "score": "0.68843794", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['rola_id'], 'Rola'));\n\t\t$rules->add($rules->isUnique(['login_konto']));\n return $rules;\n }", "title": "" }, { "docid": "a832d7fd9289996756f6f4aa28f6b4bd", "score": "0.6883756", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['categoria_id'], 'Categorias'));\n $rules->add($rules->existsIn(['usuario_id'], 'Usuarios'));\n// $rules->add($rules->existsIn(['empresa_id'], 'Empresas'));\n return $rules;\n }", "title": "" }, { "docid": "baa37e9b6191985baf28419ee3cb2539", "score": "0.6879138", "text": "public function buildRules(RulesChecker $rules) {\n\t\t//$rules->add($rules->existsIn(['navigation_tree_id'], 'NavigationTrees'));\n\t\t//$rules->add($rules->existsIn(['parent_id'], 'ParentNavigationItems'));\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "46f27d2e8b8f06f13e2ff97e3c0d2a35", "score": "0.6863581", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['secteur_id'], 'Secteurs'));\n //$rules->add($rules->existsIn(['town_id'], 'Towns'));\n $rules->add($rules->existsIn(['dpe_id'], 'Dpes'));\n //$rules->add($rules->existsIn(['agent_id'], 'Agents'));\n\n return $rules;\n }", "title": "" }, { "docid": "9aaeeb548fc7b0ab1ccde2483797c80e", "score": "0.6851315", "text": "public function rules($data);", "title": "" }, { "docid": "9dde7b49040580a3d65dec6e09e41bcc", "score": "0.6848766", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n $rules->add($rules->existsIn(['meeting_id'], 'Meetings'));\n return $rules;\n }", "title": "" }, { "docid": "71dce1efc9280be72c88aa2e36cde137", "score": "0.68136936", "text": "public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->isUnique(['email']));\r\n $rules->add($rules->existsIn(['parent_id'], 'ParentOffices'));\r\n $rules->add($rules->existsIn(['office_level_id'], 'OfficeLevels'));\r\n $rules->add($rules->existsIn(['area_division_id'], 'AreaDivisions'));\r\n $rules->add($rules->existsIn(['area_district_id'], 'AreaDistricts'));\r\n return $rules;\r\n }", "title": "" }, { "docid": "35c478a65742e9e129b477847158ae43", "score": "0.68054223", "text": "public function getRules() {}", "title": "" }, { "docid": "637f6708f3f7a0850d044e07715e6082", "score": "0.6794895", "text": "abstract public function getRules(): array;", "title": "" }, { "docid": "9954330f141c40e7d316db12f2ea771a", "score": "0.6792904", "text": "public function buildRules(RulesChecker $rules)\n {\n //$rules->add($rules->isUnique(['email']));\n //$rules->add($rules->existsIn(['state_id'], 'States'));\n\n return $rules;\n }", "title": "" }, { "docid": "3668a2affe3ad191c543cce7d7338898", "score": "0.6790786", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['course_id'], 'Courses'));\n $rules->add($rules->existsIn(['professor_id'], 'Professors'));\n $rules->add($rules->existsIn(['semester_id'], 'Semesters'));\n return $rules;\n }", "title": "" }, { "docid": "a16c93635af98624222ae303693f1750", "score": "0.67893416", "text": "public function buildRules(RulesChecker $rules) {\n\t\t$rules->add($rules->existsIn(['enterprise_id'], 'Enterprises'));\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "9785081aaf700f5bffac76b49ead120e", "score": "0.67887145", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['aliment_id'], 'Aliments'));\n $rules->add($rules->existsIn(['regime_special_id'], 'RegimeSpecials'));\n\n return $rules;\n }", "title": "" }, { "docid": "ffd449253919428e93bfb658f3544fab", "score": "0.67844456", "text": "protected function buildRules()\n {\n $this->rules = [\n 'title' => 'required|min:5|max:255',\n 'category_id' => 'required',\n 'condition_id' => 'required',\n 'description' => 'required|min:5|max:255',\n 'request' => 'required|min:5|max:255',\n ];\n\n $this->messages = [\n 'required' => 'Este campo es requerido.',\n 'title.max' => 'No debe ser mayor a :max caracteres.',\n 'title.min' => 'No debe ser menor a :min caracteres.',\n 'request.min' => 'No debe ser menor a :min caracteres.',\n ];\n\n // El request trae imagenes nuevas o va a remover imagenes\n $image_files = $this->file('image');\n $remove_images = $this->input('remove_images', []);\n\n $validate_images = true;\n $article_id = $this->route()->getParameter('article_id');\n\n if ($article_id) {\n $article = Article::findOrFail($article_id);\n $validate_images = $article->images->count() < count($remove_images);\n }\n\n if ($validate_images) {\n foreach (range(0, count($image_files) - 1) as $index) {\n $this->rules['image.' . $index] = 'required|image';\n $this->messages['image.' . $index . '.image'] = 'Una de las imagenes no es válida.';\n }\n }\n }", "title": "" }, { "docid": "7fa09a82ebf286d203e87c90f9b7fa95", "score": "0.6770036", "text": "public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->existsIn(['asset_property_id'], 'AssetProperties'));\r\n $rules->add($rules->existsIn(['bridge_id'], 'Bridges'));\r\n $rules->add($rules->existsIn(['asset_id'], 'Assets'));\r\n return $rules;\r\n }", "title": "" }, { "docid": "ea8b1be655ad3c1e556be156fe520284", "score": "0.6766569", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['test_run_id'], 'TestRuns'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parameter_id'], 'Parameters'));\n return $rules;\n }", "title": "" }, { "docid": "67166ceeb22b4106953b8eacc8f84812", "score": "0.67623633", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['patient_id'], 'Patients'));\n $rules->add($rules->existsIn(['hospital_id'], 'Hospitals'));\n $rules->add($rules->existsIn(['employee_id'], 'Employees'));\n \n return $rules;\n }", "title": "" }, { "docid": "0e812424169d345ca183b44dd497aab6", "score": "0.6761903", "text": "public function rules(): array;", "title": "" }, { "docid": "0e812424169d345ca183b44dd497aab6", "score": "0.6761903", "text": "public function rules(): array;", "title": "" }, { "docid": "773cbd5d50d178832653001979de2594", "score": "0.6759909", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['n_sem', 'annee']));\n\n return $rules;\n }", "title": "" }, { "docid": "d06d9b46ca0754ca1263dbc323a90c1a", "score": "0.67569727", "text": "public function buildRules(RulesChecker $rules)\n\t{\n\t\t$rules->add($rules->existsIn(['category_id'], 'Categories'));\n\t\t$rules->add($rules->existsIn(['user_id'], 'Users'));\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "d83680a5a97551633e915a994c1529e1", "score": "0.6756193", "text": "protected function _buildRules() {\n\t\tforeach ($this->_ruleNames as $rule) {\n\t\t\t$className = $rule . 'DocBlockRule';\n\t\t\tif (!class_exists($className, false)) {\n\t\t\t\ttrigger_error('Missing Rule Class ' . $className, E_USER_WARNING);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$ruleObj = new $className();\n\t\t\tif ($ruleObj instanceof DocBlockRule) {\n\t\t\t\t$this->rules[$rule] = $ruleObj;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3f1f1f42d93ef45f5c2e7b4982acd777", "score": "0.6753781", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['material_type_id'], 'MaterialTypes'));\n $rules->add($rules->existsIn(['professor_id'], 'Professors'));\n $rules->add($rules->existsIn(['course_id'], 'Courses'));\n return $rules;\n }", "title": "" }, { "docid": "b72bf8c7d5b18f2a7b3bb1dadf7a5e06", "score": "0.675098", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n $rules->add($rules->existsIn(['series_id'], 'EventSeries'));\n\n return $rules;\n }", "title": "" }, { "docid": "35a2e723073efdb68978791f2456a18b", "score": "0.67430085", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['bhakta_id'], 'Bhaktas'));\n $rules->add($rules->existsIn(['department_id'], 'Departments'));\n\n return $rules;\n }", "title": "" }, { "docid": "b77ed7c6642c3e5b5fa53b7c226d57c7", "score": "0.67395544", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['template_id'], 'Templates'));\n $rules->add($rules->existsIn(['creator_id'], 'Creators'));\n\n return $rules;\n }", "title": "" }, { "docid": "7fa4ee5c506aeb3687e587ee6213d2d6", "score": "0.67327046", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['conjuge_id'], 'Pessoas'));\n $rules->add($rules->existsIn(['empresa_id'], 'Empresas'));\n $rules->add($rules->existsIn(['u_id'], 'users'));\n\n return $rules;\n }", "title": "" }, { "docid": "3395aceec25b209921339d716b0013bf", "score": "0.6732418", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['cidade_id'], 'Cidades'));\n $rules->add($rules->existsIn(['cliente_id'], 'Clientes'));\n $rules->add($rules->existsIn(['funcionario_id'], 'Funcionarios'));\n\n return $rules;\n }", "title": "" }, { "docid": "78c45443fc1dc11027ef63a962a5cd49", "score": "0.67297655", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['trip_id'], 'Trips'));\n $rules->add($rules->existsIn(['stop_id'], 'Stops'));\n\n return $rules;\n }", "title": "" }, { "docid": "4ecea9e46c4c96a5651ccc45e510d07f", "score": "0.67237777", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['request_id'], 'Requests'));\n $rules->add($rules->existsIn(['resource_id'], 'Resources'));\n $rules->add($rules->existsIn(['service_id'], 'Services'));\n $rules->add($rules->isUnique(['request_id', 'resource_id', 'service_id']));\n return $rules;\n }", "title": "" }, { "docid": "0f0dcf8105841dc5b91702f8b3f894ea", "score": "0.67220426", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['tema_id'], 'Temas'));\n\n return $rules;\n }", "title": "" }, { "docid": "e484f743fb0843dc208d308c95fbd3d9", "score": "0.67215896", "text": "public function buildRules(RulesChecker $rules)\n\t\t\t\t{\n\t\t\t\t\t\t$rules->add($rules->existsIn(['parent_id'], 'ParentAcos'));\n\t\t\t\t\t\treturn $rules;\n\t\t\t\t}", "title": "" }, { "docid": "6135abdfdb18f0098079f1bf560823cc", "score": "0.6721351", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['product_id'], 'Products'));\n $rules->add($rules->existsIn(['voucher_id'], 'Vouchers'));\n\n return $rules;\n }", "title": "" }, { "docid": "769ea4ee02a2e2004ad620d4f4d0a224", "score": "0.67204", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['patient_id'], 'Patients'));\n $rules->add($rules->existsIn(['visit_speciality_id'], 'VisitSpecialities'));\n $rules->add($rules->existsIn(['manager_operator_id'], 'ManagerOperators'));\n return $rules;\n }", "title": "" }, { "docid": "736ced64fbd71b9ac52111d858c6728e", "score": "0.6719269", "text": "public function getRules();", "title": "" }, { "docid": "c0c7aadd0ee537369e31c3a950838a99", "score": "0.67130774", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['public_post_id'], 'PublicPosts'));\n\n return $rules;\n }", "title": "" }, { "docid": "e9f0dc4abe542c55eb94a2ca5167b8cb", "score": "0.6712977", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['name']));\n $rules->add($rules->existsIn(['expense_type_id'], 'ExpensesTypes'));\n $rules->add($rules->existsIn(['vendor_id'], 'Vendors'));\n return $rules;\n }", "title": "" }, { "docid": "100cce9466a801938b5d9b331d9faf1b", "score": "0.6710739", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['organization_id'], 'Organizations'));\n $rules->add($rules->existsIn(['prod_gas_promotion_id'], 'ProdGasPromotions'));\n $rules->add($rules->existsIn(['organization_id', 'article_id'], 'Articles'));\n\n return $rules;\n }", "title": "" }, { "docid": "23e64e823b8cb79445247078f6e3dfe5", "score": "0.6703287", "text": "public function buildRules(RulesChecker $rules)\n\t{\n\t\t$rules->add($rules->isUnique(['svid']));\n\t\t$rules->add($rules->existsIn(['user_id'], 'Users'));\n\t\t$rules->add($rules->existsIn(['server_id'], 'Servers'));\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "6c5e2459460187cb6befd83cda79d990", "score": "0.6702176", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['praticien_id'], 'Praticiens'));\n $rules->add($rules->existsIn(['visiteur_id'], 'Visiteurs'));\n $rules->add($rules->existsIn(['motif_id'], 'Motifs'));\n\n return $rules;\n }", "title": "" }, { "docid": "bd36712f25dd5fe2e0b1548f7f1e02d2", "score": "0.6695504", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['asset_number']));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }", "title": "" }, { "docid": "c14fc3458e9a59aff57aefb32895dabb", "score": "0.66921127", "text": "public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['bank_account_id'], 'BankAccounts'));\n $rules->add($rules->existsIn(['org_id'], 'Orgs'));\n $rules->add($rules->existsIn(['branch_id'], 'Branches'));\n $rules->add($rules->existsIn(['bpartner_id'], 'Bpartners'));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }", "title": "" }, { "docid": "bad6e735498e7d9f5709b2af2c3cc6af", "score": "0.6687945", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['sport_param_type_id'], 'SportParamTypes'));\n $rules->add($rules->existsIn(['sport_id'], 'Sports'));\n\n return $rules;\n }", "title": "" }, { "docid": "4f4009f301254c0e0f798c3ef244333d", "score": "0.6681703", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['country_id'], 'Countries'));\n $rules->add($rules->existsIn(['price_master_id'], 'PriceMasters'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "title": "" }, { "docid": "36bd0011ae9e582f3a8a4eb1a5fabf6d", "score": "0.6673142", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['yearly_sample_id'], 'YearlySamples'));\n $rules->add($rules->existsIn(['monthly_sample_id'], 'MonthlySamples'));\n $rules->add($rules->existsIn(['state_id'], 'States'));\n $rules->add($rules->existsIn(['district_id'], 'Districts'));\n $rules->add($rules->existsIn(['dispatch_id'], 'Dispatches'));\n\n return $rules;\n }", "title": "" }, { "docid": "049f68f42ab33d5e71a0ab074251f742", "score": "0.66698843", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['cus_id'], 'Khachhang'));\n\n return $rules;\n }", "title": "" }, { "docid": "a1e4a0116a8ec533ae49be85dedc3465", "score": "0.66679895", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['visit_act_id'], 'VisitActs'));\n $rules->add($rules->existsIn(['visit_invoice_item_id'], 'VisitInvoiceItems'));\n\n return $rules;\n }", "title": "" }, { "docid": "ca49d22b371d48732f72856011a4b348", "score": "0.6662923", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['company_id'], 'Companies'));\n $rules->add($rules->existsIn(['company_member_type_id'], 'CompanyMemberTypes'));\n $rules->add($rules->existsIn(['master_financial_year_id'], 'MasterFinancialYears'));\n\n return $rules;\n }", "title": "" }, { "docid": "f64d7ec9e5524f7bdaa1501865933f7c", "score": "0.666264", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['id']));\n $rules->add($rules->existsIn(['category_id'], 'Categories'));\n return $rules;\n }", "title": "" }, { "docid": "47e7d902eab6ab054c8f494441813e46", "score": "0.6661219", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['product_category_id'], 'ProductCategories'));\n $rules->add($rules->existsIn(['picture_id'], 'Pictures'));\n\n //Limit de qte////////////////////////////////////////\n $rules->add(function($entity, $options){\n return ($entity->quantity_min_limit <= $entity->quantity_max_limit);\n }, 'ValidateQuantities', ['errorField'=>'quantity_min_limit', 'message'=>__('Minimum quantity can\\'t be higher than maximum')]);\n\n\n return $rules;\n }", "title": "" }, { "docid": "fbfc253f3a8946df47ab8d2ae3cb83a1", "score": "0.66609675", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['item_sku']));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['external_product_id'], 'ExternalProducts'));\n $rules->add($rules->existsIn(['fulfillment_center_id'], 'FulfillmentCenters'));\n\n return $rules;\n }", "title": "" }, { "docid": "af86de0d166f994834d87af28b1b87c8", "score": "0.6660396", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['reseller_id'], 'Resellers'));\n $rules->add($rules->existsIn(['reseller_program_type_id'], 'ResellerProgramTypes'));\n\n return $rules;\n }", "title": "" }, { "docid": "1f1e7f7f2a5e00709d322392921079f5", "score": "0.6658164", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['decret_id'], 'Decrets'));\n $rules->add($rules->existsIn(['team_id'], 'Teams'));\n $rules->add($rules->existsIn(['expert_id'], 'Experts'));\n\n return $rules;\n }", "title": "" }, { "docid": "4f7e1abf06079e209a2e2c2125180495", "score": "0.66568154", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['equipment_type_id'], 'EquipmentTypes'));\n $rules->add($rules->existsIn(['department_id'], 'Departments'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "title": "" }, { "docid": "b36cf30baa9b5b620f180d609d82d276", "score": "0.66564786", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['username']));\n //$rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['role_id'], 'Roles'));\n $rules->add($rules->existsIn(['shop_id'], 'Shops'));\n\n return $rules;\n }", "title": "" }, { "docid": "21ad9c7591ad31e936a1c046a1ec3b9f", "score": "0.6653762", "text": "public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['member_id'], 'Members'));\n $rules->add($rules->existsIn(['customer_profile_id'], 'CustomerProfiles'));\n\n return $rules;\n }", "title": "" }, { "docid": "e11aac27f106f497e67d31b6b8c56102", "score": "0.6653366", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['item_id'], 'Items'));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['borrowed_status_id'], 'BorrowedStatus'));\n\n return $rules;\n }", "title": "" }, { "docid": "fb1fe16c0d86c49bb32fbcaf7f792108", "score": "0.6650358", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['job_astatus_id'], 'JobAstatuses'));\n $rules->add($rules->existsIn(['job_bstatus_id'], 'JobBstatuses'));\n return $rules;\n }", "title": "" }, { "docid": "e83ec865a760b8d06bda9945a8b61b7a", "score": "0.6642761", "text": "public function buildRules(RulesChecker $rules)\n {\n // $rules->add($rules->existsIn(['recipient_id'], 'Recipients'));\n // $rules->add($rules->existsIn(['collector_id'], 'Collectors'));\n // $rules->add($rules->existsIn(['origin_id'], 'Origins'));\n // $rules->add($rules->existsIn(['origin_survey_id'], 'OriginSurveys'));\n\n return $rules;\n }", "title": "" }, { "docid": "91a21351a11b5244222ab77a1597007f", "score": "0.66418946", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['evenement_id'], 'Evenements'));\n\n return $rules;\n }", "title": "" }, { "docid": "7efcb1d3be733aea56d5a3518101defd", "score": "0.66409844", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['budget_item_id'], 'BudgetItems'));\n $rules->add($rules->existsIn(['schedule_id'], 'Schedules'));\n $rules->add($rules->existsIn(['payment_statement_id'], 'PaymentStatements'));\n $rules->add($rules->existsIn(['user_created_id'], 'Users'));\n return $rules;\n }", "title": "" }, { "docid": "33416a8cc83ff3220bdaa14f4def45c0", "score": "0.6639978", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['designation_id'], 'Designations'));\n\n return $rules;\n }", "title": "" }, { "docid": "2db270e0639b2a85dc79998aeb0119a5", "score": "0.6639697", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['student_id'], 'Students'));\n return $rules;\n }", "title": "" }, { "docid": "7a09beed1ffc8cc007aade5d5b4a797b", "score": "0.6638085", "text": "protected function processRules() {\n $this->rules = array(\n 'dang-ky' => 'auth/register',\n 'lay-lai-mat-khau' => 'auth/forgotpassword',\n 'tim-kiem-san-pham' => 'product/search',\n 'tin-tuc/gioi-thieu' => 'site/about',\n 'doi-tac' => 'partner/index',\n 'tuyen-dung' => 'recruitment/list',\n 'dai-ly' => 'agency/list',\n 'tin-tuc/<title>-<id:\\d+>' => 'news/list',\n 'tin-tuc' => 'news/list',\n 'tin-tuc/chi-tiet/<title>-<id:\\d+>' => 'news/detail',\n 'lien-he' => 'site/contact',\n 'danh-muc-san-pham/<title>-<id:\\d+>-<sort>' => 'product/catalog',\n 'danh-muc-san-pham/<title>-<id:\\d+>' => 'product/catalog',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>-<sort>' => 'product/manufacture',\n 'nhan-hang/<name>-<id:\\d+>-<mid:\\d+>' => 'product/manufacture',\n 'san-pham/<title>-<id:\\d+>' => 'product/detail',\n 'gio-hang' => 'shoppingcart/order',\n 'gio-hang/them-<id:\\d+>' => 'shoppingcart/add',\n \n '<controller:\\w+>/<id:\\d+>' => '<controller>/view',\n '<controller:\\w+>/<action:\\w+>/<id:\\d+>' => '<controller>/<action>',\n '<controller:\\w+>/<action:\\w+>' => '<controller>/<action>',\n );\n // Run parent\n parent::processRules();\n }", "title": "" }, { "docid": "bf5c09c699afef8a66b17092365ad991", "score": "0.66205966", "text": "public function buildRules(RulesChecker $rules)\r\n {\r\n $rules->add($rules->existsIn(['office_id'], 'Offices'));\r\n $rules->add($rules->existsIn(['office_building_id'], 'OfficeBuildings'));\r\n $rules->add($rules->existsIn(['office_room_id'], 'OfficeRooms'));\r\n $rules->add($rules->existsIn(['office_warehouse_id'], 'OfficeWarehouses'));\r\n $rules->add($rules->existsIn(['office_unit_id'], 'OfficeUnits'));\r\n $rules->add($rules->existsIn(['designation_id'], 'Designations'));\r\n $rules->add($rules->existsIn(['designated_user_id'], 'DesignatedUsers'));\r\n $rules->add($rules->existsIn(['item_id'], 'Items'));\r\n return $rules;\r\n }", "title": "" }, { "docid": "992111e0f0c9ec668b52cb22d0eb32b2", "score": "0.66191065", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['local_id'], 'Locals'));\n $rules->add($rules->existsIn(['visitor_id'], 'Visitors'));\n $rules->add($rules->existsIn(['football_day_id'], 'FootballDays'));\n return $rules;\n }", "title": "" }, { "docid": "54d6b9877f4a0f3ffbd0a9c2cc20b9c4", "score": "0.6615133", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['turn_id'], 'Turns'));\n $rules->add($rules->existsIn(['steptype_id'], 'Steptypes'));\n return $rules;\n }", "title": "" }, { "docid": "5cdaca2231ffc1ef6898e0efb64d0dbc", "score": "0.6613882", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n $rules->add($rules->existsIn(['story_id'], 'Stories'));\n\n return $rules;\n }", "title": "" }, { "docid": "cb1c717231b3bd12995d902f4c45853c", "score": "0.66130877", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['email']));\n $rules->add($rules->existsIn(['empresa_id'], 'Empresas'));\n\n return $rules;\n }", "title": "" }, { "docid": "8a7deab0cb5b48d4388862b327a12c6e", "score": "0.6610382", "text": "public function getCreateRules()\n {\n return [];\n }", "title": "" }, { "docid": "b5cf678dbe718b0d2f17b77c457f26b4", "score": "0.6600582", "text": "public function buildRules(RulesChecker $rules) {\n $rules->add($rules->existsIn(['module_id'], 'Modules'));\n $rules->add($rules->existsIn(['module_action_group_id'], 'ModuleActionGroups'));\n\n return $rules;\n }", "title": "" }, { "docid": "b49045aa310b52ff50cb9cdfbefa6383", "score": "0.6598641", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['session_year_id'], 'SessionYears'));\n $rules->add($rules->existsIn(['student_class_id'], 'StudentClasses'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parent_id'], 'ParentExamMasters'));\n\n return $rules;\n }", "title": "" }, { "docid": "f3ca39776e7808358553767b6212d86e", "score": "0.65940976", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['domain_id'], 'Domains'));\n $rules->add($rules->existsIn(['theme_id'], 'Themes'));\n\n return $rules;\n }", "title": "" }, { "docid": "0a92257768ccfce9a608a39eea098d2a", "score": "0.65921366", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['event_id'], 'Events'));\n $rules->add($rules->existsIn(['sub_event_id'], 'SubEvents'));\n $rules->add($rules->existsIn(['occurrence_type_id'], 'TypeOccurrences'));\n $rules->add($rules->existsIn(['local_id'], 'Locals'));\n $rules->add($rules->existsIn(['cinema_id'], 'Cinemas'));\n\n return $rules;\n }", "title": "" }, { "docid": "431d9ced69086e38206b844410870bcf", "score": "0.6590649", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['trackingobject_id'], 'Trackingobjects'));\n $rules->add($rules->existsIn(['customer_id'], 'Customers'));\n $rules->add($rules->existsIn(['device_id'], 'Devices'));\n $rules->add($rules->existsIn(['eventtype_id'], 'Eventtypes'));\n\n return $rules;\n }", "title": "" }, { "docid": "8a2691367ff4a1a7804c74eec2e1ad1e", "score": "0.65904975", "text": "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['listing_id'], 'Listings'));\n\n return $rules;\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "72bf74d23e54b2152e9529537cd24bb2", "score": "0.0", "text": "public function destroy($id)\n {\n $result = $this->result->find($id);\n $message = '<div class=\"alert alert-danger\">Result removed !</div>';\n if($result->delete()) {\n return redirect('results')->with('status', $message);\n }\n }", "title": "" } ]
[ { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "6ffd51684d27200dd20bb77ae5392465", "score": "0.65282005", "text": "public function dispatchOnPostRemoveResource($resource);", "title": "" }, { "docid": "20340ae69f46965449dc508b639c84e9", "score": "0.6511765", "text": "public function remove_storage()\n\t{\n\t\t$this->_storage->destroy_storage();\n\t}", "title": "" }, { "docid": "052edc379f178da3bc9936ef223b6ef8", "score": "0.64856714", "text": "public function remove() {\n Storage::disk('public')->delete($this->getPath());\n $this->delete(); //Remove db record\n }", "title": "" }, { "docid": "8566de5772ba8f11471da580f8907d09", "score": "0.64848197", "text": "public static function remove(string $resourcePath): void\n {\n $file = self::generatePath(\n self::generateHash($resourcePath)\n );\n\n if (\\is_file($file)) {\n \\unlink($file);\n }\n }", "title": "" }, { "docid": "b9b85ab47af2f085664ea4fb3f54b26d", "score": "0.6444909", "text": "public function dispatchOnPreRemoveResource($resource);", "title": "" }, { "docid": "7c8424d31eaa624067dc5241abfb9372", "score": "0.6257354", "text": "public function deleteStorage($storageId);", "title": "" }, { "docid": "5881486a94aded91c41895b5d1b51444", "score": "0.6238561", "text": "public function delete($resource) {\r\n\t\t\t\r\n\t\t$url = $this->_path . '/api/v2' . $resource;\r\n\t\t\r\n\t\t$curl = curl_init();\r\n\t\tcurl_setopt($curl, CURLOPT_URL, $url);\r\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $this->_headers);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\r\n\t\tcurl_setopt($curl, CURLOPT_VERBOSE, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_HEADER, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\r\n\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\r\n\t\t$response = curl_exec($curl);\r\n\t\t$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);\r\n\t\t$header_size = curl_getinfo($curl, CURLINFO_HEADER_SIZE);\r\n\t\t$headers = substr($response, 0, $header_size);\r\n\t\t$body = substr($response, $header_size);\r\n\t\tself::http_parse_headers($headers);\t \r\n\t\tcurl_close ($curl);\r\n\t\tif ($http_status == 204) {\r\n\t \treturn $http_status . ' DELETED';\r\n\t\t } else {\r\n\t\t \t$this->error($body, $url, null, 'DELETE');\r\n\t\t }\r\n\t}", "title": "" }, { "docid": "71cdf2c8771b0884ed0346cbff1672a0", "score": "0.62021154", "text": "abstract protected function destroyResource(): void;", "title": "" }, { "docid": "8c0ed41f8673fd843b7ffdb22bce5eb0", "score": "0.611688", "text": "public function afterDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "77d39170a9748d8eca11f292068832c6", "score": "0.6077847", "text": "public function delete($storageName, $key);", "title": "" }, { "docid": "ece2955e505228c5979763b54ea0ee46", "score": "0.6066214", "text": "public function remove(\n int $right,\n $resource,\n IUser $user,\n ?IResource $parentResource = null\n ): void\n {\n $hash = $this->hash($right, $resource, $user, $parentResource);\n $this->storage->remove($hash);\n }", "title": "" }, { "docid": "43dc6df10818b4435103bc0ee31fc8d1", "score": "0.6045101", "text": "public function destroy($id)\n {\n $record = Resource::where('id', $id)->get();\n\n if (!empty($record[0])) {\n DB::beginTransaction();\n\n $isRemoved = self::remove($record);\n }\n }", "title": "" }, { "docid": "db4382353b96e87cb5a70c801383930a", "score": "0.603214", "text": "public function delete($resourceId = null, $options = []);", "title": "" }, { "docid": "1a7799a3edae94b9a12c008d1d703c57", "score": "0.59831214", "text": "public function deleteStorageService($name);", "title": "" }, { "docid": "a2014b07fec4eb27432905d903e64664", "score": "0.59784347", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n if($storage->item())\n {\n $storage->item()->detach();\n if( $storage->delete() )\n {\n return response('Deleted.',200);\n }\n }\n return response('Error.',400);\n }", "title": "" }, { "docid": "f23ad90184663348cc9db3cf44d0b0a5", "score": "0.595982", "text": "public function destroy(Resource $resource)\n {\n //\n\t\t\t\treturn response()->json([\n\t\t\t\t\t'destroyed'=>$resource->delete()\n\t\t\t\t]);\n }", "title": "" }, { "docid": "462a710c39c75c675bfe433bce80e2fe", "score": "0.5951811", "text": "public function destroy()\n {\n if ($this->instance instanceof Storage) {\n $this->instance->destroy();\n }\n $this->instance = null;\n }", "title": "" }, { "docid": "c39bd1cfb71eb924026011c0e976a9d4", "score": "0.5933563", "text": "public function delete(string $resourceType, $modelOrResourceId): void;", "title": "" }, { "docid": "31f350f911a74d37fb3a78e6981becb5", "score": "0.5921418", "text": "public function removeStorage()\n\t{\n\t\t$this->taskExec('docker rm chrome-print-storage')->run();\n\t}", "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": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "e03265a289855852afd2372dcb1d8daa", "score": "0.58933157", "text": "public function remove($path, $hard = false);", "title": "" }, { "docid": "7a7d76b4d53301e7ae6922b772849358", "score": "0.5886972", "text": "public function destroy($file)\n {\n $file = File::where('id', $file)->first();\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', 'ok');\n }", "title": "" }, { "docid": "3f6a8794d81fc01347d2f3307ac44d78", "score": "0.58504206", "text": "public function destroy($id)\n {\n //\n\n $contratista= contratistas::findOrFail($id);\n\n if (Storage::delete('public/'.$contratista->Foto)){\n Contratistas::destroy($id);\n\n }\n\n \n \n return redirect('contratistas')->with('Mensaje','Contratista eliminado');\n }", "title": "" }, { "docid": "a85763dd50ac74b8d2b8124b1c0e3e7b", "score": "0.5850285", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return back()->with('info', 'Resource deleted');\n }", "title": "" }, { "docid": "02a5bc50f3aa8ecd04834387832bc77c", "score": "0.5844418", "text": "public function destroy($id)\n {\n // $this->authorize('haveaccess','producto.destroy');\n $producto= Producto::findOrFail($id);\n\n if(Storage::delete('public/'.$producto->imagen)){\n\n Producto::destroy($id); \n }\n\n return redirect('producto');\n }", "title": "" }, { "docid": "8f406917023a0110d93d6350033a3ab5", "score": "0.58313775", "text": "public function removeItem($id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "title": "" }, { "docid": "a193f7ebf258b5fb63b8919a07678081", "score": "0.5821789", "text": "public function removeAll ($storage) {}", "title": "" }, { "docid": "dc36a581460d40a22ac889b4e61a4ab9", "score": "0.58165264", "text": "public function removeResource($resourceID)\n {\n $resourceID = db::escapechars($resourceID);\n $sql = \"DELETE FROM kidschurchresources WHERE resourceID='$resourceID' LIMIT 1\";\n $result = db::execute($sql);\n if($result){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.5812055", "text": "public function del($path);", "title": "" }, { "docid": "c603e0ea04551111c5de9c6585b2815e", "score": "0.5802033", "text": "public function delete()\n {\n $this->repository->git('rm %s', escapeshellarg($this->getRelativePathname())\n );\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.5800284", "text": "public function unlink();", "title": "" }, { "docid": "818914cdd28df643181e6a2330bc11c4", "score": "0.5789049", "text": "public function destroy($id)\n {\n $supplier=Supplier::find($id);\n $photo=$supplier->photo;\n if($photo){\n unlink($photo);\n }\n $supplier->delete();\n }", "title": "" }, { "docid": "8f1b5736b25701e2b67e4f655f581689", "score": "0.57634306", "text": "public function testResourceRemoveOne()\n {\n $resourceArea = new Zend_Acl_Resource('area');\n $this->_acl->add($resourceArea)\n ->remove($resourceArea);\n $this->assertFalse($this->_acl->has($resourceArea));\n }", "title": "" }, { "docid": "5cc9f2ec9efb9c5303b848052688e6c4", "score": "0.5744329", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n $filename = $product->image;\n $product->delete();\n Storage::delete($filename);\n }", "title": "" }, { "docid": "d1f7c96fed94f01bef33d5bc03b96940", "score": "0.5735748", "text": "public function hardDelete();", "title": "" }, { "docid": "fec8d4881ffc82e41c0642f366a1a75a", "score": "0.5726655", "text": "public function delete($resource)\n {\n return DB::transaction(function () use ($resource) {\n $resource = $this->beforeDelete($resource);\n\n $resource->delete();\n\n return $this->afterDelete($resource);\n });\n }", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.5718601", "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": "8c0c11de31899ddf1bbfd6c29f1c19a7", "score": "0.571522", "text": "public function deleteImage(){\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "40f1e1a14810f5eceacb200ffe7aeb20", "score": "0.5696079", "text": "public function destroy(Request $request)\n {\n $slider=Slider::where('id', '=', $request->id)->first();\n if($slider!=null){\n $mi_imagen = public_path().'/'.$slider->url;\n unlink($mi_imagen);\n $slider->delete();\n return 1;\n }else{\n return 0;\n }\n// Lo eliminamos de la base de datos\n\n\n\n }", "title": "" }, { "docid": "60a2181c36b7592447d90a90fcadbe74", "score": "0.5695835", "text": "public function delete($record) {\n $this->fileDataSource->delete($this->resourceName, $record->id);\n $this->afterDelete($record);\n }", "title": "" }, { "docid": "7ef5024136aac86c4c004ee1e7edea43", "score": "0.56815386", "text": "public function drop(): void {\n $disk = Storage::disk($this->scope);\n if ($disk->exists($this->filepath)) {\n $disk->delete($this->filepath);\n }\n }", "title": "" }, { "docid": "c4f845a8d7bbb2425211bda284218817", "score": "0.56762695", "text": "function destroy() {\n\t\tunlink($this->get_file_name());\n\t\tself::remove_from_cache($this);\n\t}", "title": "" }, { "docid": "af7a37a01e344ca75b406caaaa916b45", "score": "0.56741655", "text": "private function removeOldIcon($resource)\n {\n $icon = $resource->getIcon();\n\n if ($icon->getIconType()->getIconType() == IconType::CUSTOM_ICON) {\n $pathName = $this->container->getParameter('claroline.param.thumbnails_directory')\n . DIRECTORY_SEPARATOR . $icon->getIconLocation();\n if (file_exists($pathName)) {\n unlink($pathName);\n }\n }\n }", "title": "" }, { "docid": "cb1740d372b49263432bcc5cf39f97d8", "score": "0.56595594", "text": "public function destroy($id)\n {\n $emp = Employee::where('id',$id)->first();\n $photo = $emp->image;\n if($photo){\n unlink($photo);\n $emp->delete();\n }else{\n $emp->delete();\n }\n\n }", "title": "" }, { "docid": "7567af40a4901dd5dd42113b0bbccb95", "score": "0.56567484", "text": "public function removeResource($name)\n {\n unset($this->resources[$name]);\n if ($name === 'file') {\n $this->resources['file'] = array(\n 'class' => 'Dwoo\\Template\\File',\n 'compiler' => null\n );\n }\n }", "title": "" }, { "docid": "d261281fcf3d7ca08f9b610eb6c3b1f0", "score": "0.56346554", "text": "public function destroy($id)\n {\n $photo = Photo::findOrFail($id);\n unlink(public_path() . $photo->image_url);\n $photo->delete();\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "5e46d09ef2d1d9f143d6831260992e3f", "score": "0.56248415", "text": "public function destroy($id)\n {\n $pres=Prescription::find($id);\n $fileName=$pres->item;\n unlink(storage_path().'/'.'app'.'/'.'public' .'/'.'prescriptions'.'/'. $fileName);\n $pres->delete();\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": "81b2a149b82ad070a8fc5640c23cb4c5", "score": "0.56235874", "text": "public function deleteResource($resourceId)\n {\n $req = new RESTRequest();\n $data = $req->adminGet('LearningObject/delete/' . $resourceId)->getData();\n return $data;\n }", "title": "" }, { "docid": "1ed1ac142686a23f0827e755ecbc86db", "score": "0.5618705", "text": "public function delete($resource, array $args = [], array $options = []) {\n return $this->do('DELETE', $resource, $args, $options);\n\n }", "title": "" }, { "docid": "c0ac500c5b367ee589c3c33143eb832b", "score": "0.5617002", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['success' => 'borrado correctamente']);\n }", "title": "" }, { "docid": "a9c212129736f6a4e7fd4eddbccc6f2f", "score": "0.56163317", "text": "public function destroy($id)\n {\n $delete = Supplier::where(\"id\", $id)->first();\n $img = $delete->photo;\n if($img){\n unlink('backend/assets/images/supplier/'.$img);\n $delete->delete();\n toast('Supplier Information Delete Successfully','success');\n return redirect()->route('index.supplier');\n }else{\n toast('Supplier Not Deleted','success');\n return redirect()->route('index.supplier');\n }\n }", "title": "" }, { "docid": "6b5dbac631e37705e1c7cf319db2d7e6", "score": "0.56112254", "text": "public function deleteFromDisk()\n {\n return Storage::disk($this->getLocalDiskName())->delete($this->getStoragePath(true));\n }", "title": "" }, { "docid": "14d4df02668a2d07f51666ab31e093b8", "score": "0.5609148", "text": "public function destroy($id)\n {\n $store = Store::findorFail($id);\n $product = Product::firstorfail()->where('store_id', $id);\n // unlink(public_path() . '/img/' . $product->image);\n $product->delete();\n unlink(public_path() . '/str_img/' . $store->image);\n $store->delete();\n return redirect()->back()->withDelete(\"Store Deleted Succesfully\");\n\n\n \n }", "title": "" }, { "docid": "ea306158775b698c5435960d49c257ab", "score": "0.56042147", "text": "public function delete()\n {\n $this->remote->delete($this->file);\n }", "title": "" }, { "docid": "f7e25a0f3411ba82d9ef10dbdff68bb4", "score": "0.5600532", "text": "public function beforeDelete($resource)\n {\n return $resource;\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "5f7b880d9042e6af83f1343c11f66a8e", "score": "0.5595085", "text": "public function destroy($record);", "title": "" }, { "docid": "eb90c146961dd680727f52741dd87d78", "score": "0.55930966", "text": "public function delete($key) {\n $this->assertKey($key);\n \n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "13866f5828119bb8aae429440b86e949", "score": "0.55884856", "text": "public function destroy($id)\n {\n\n $imga = Image::find($id);\n Storage::disk('public')->delete('img/' . $imga->src);\n $imga->delete();\n\n\n return redirect()->back();\n }", "title": "" }, { "docid": "24ef05d1335abf0bd48387e294875133", "score": "0.5576293", "text": "public function delete($fireStorageEvents = true);", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "268c30c6782025503083fc7ba52c1d0a", "score": "0.557298", "text": "public function delete() {\n $this->dataStoreAdapter->deleteObject($this->getUuid());\n }", "title": "" }, { "docid": "2d72bcdac1bcdd14301b9a6ad301fae7", "score": "0.5572793", "text": "public function actionPatientremove() {\n\n $id = $_POST['id'];\n $name = $_POST['name'];\n\n $root_path = Yii::$app->basePath . '/../uploads/patient';\n $path = $root_path . '/' . $id . '/' . $name;\n\n\n if (file_exists($path)) {\n\n if (unlink($path)) {\n\n }\n }\n }", "title": "" }, { "docid": "65ec7f8ef3c165ae2d123008792c4d10", "score": "0.55707175", "text": "public function delete()\n {\n \\File::delete([\n $this->path,\n $this->thumbnail_path,\n\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.5570384", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "ead6a9412215d17945f8769860e1b262", "score": "0.5569038", "text": "public function remove($file) {\n\t\t$this->emitCache('put', $file);\n\t\tparent::remove($file);\n\t}", "title": "" }, { "docid": "4aff284263b8a4a2b80b972accc89eb6", "score": "0.55585116", "text": "public function removeFile($file_obj)\n\t{\n\t\t$fs = new Filesystem();\n\t\tif($fs->exists($file_obj->getUrlStorage()))\n\t\t{\n\t\t\t$fs->remove($file_obj->getUrlStorage());\n\t\t}\n\t}", "title": "" }, { "docid": "ec1b691c67eb4c9111f82f370bc46ab2", "score": "0.55521524", "text": "public function removeAction ()\n { \n if (!empty ($this->params ['file']) AND file_exists (UPLOAD_PATH.$this->params ['file']))\n unlink (UPLOAD_PATH.$this->params ['file']); \n if (!empty ($this->params ['media_id']))\n {\n $model = new Model_DbTable_MediaData ();\n $model->delete_media ($this->params ['media_id']);\n } \n }", "title": "" }, { "docid": "cf67810bc53f9cd6c02a127c0ee780e0", "score": "0.55445576", "text": "public function remove()\n\t{\n\t\tFile::remove($this->tempName);\n\t}", "title": "" }, { "docid": "94cb51fff63ea161e1d8f04215cfe7bf", "score": "0.55422723", "text": "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "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": "9ac57f5d74d74f050136ae1e642ec949", "score": "0.5532133", "text": "public function delete($path) {\n $absPath = $this->_getAbsPath($path);\n $status = @unlink($absPath);\n\n if (!$status) {\n if (file_exists($absPath)) {\n throw new Scalar_Storage_Exception('Unable to delete file.');\n } else {\n $this->_log(\"Scalar_Storage_Adapter_Filesystem: Tried to delete missing file '$path'.\");\n }\n }\n }", "title": "" }, { "docid": "584dea86c95ee49398418c499126a231", "score": "0.55317944", "text": "public function forgetUsed()\n {\n if ($this->app['files']->exists($this->getUsedStoragePath())) {\n $this->app['files']->delete($this->getUsedStoragePath());\n }\n }", "title": "" }, { "docid": "52c48eff326d035cdfe9e0df0c79a23f", "score": "0.55300117", "text": "public function removeFromStorage()\n {\n if ( ! $this->is_raw ) {\n return MediaStorage::adapterByDisk($this->disk)->delete($this->path);\n }\n\n return true;\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": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
cef4689296e1666d11271d77d78220d6
if is not empty and is not an absolute path, prepend project dir
[ { "docid": "30e9c6750b746e82bf27443417b80536", "score": "0.0", "text": "public function path(string $path): string\n {\n if ('' !== $path && ! in_array(substr($path, 0, 1), ['/', '\\\\'], true)) {\n $path = dirname(__DIR__, 2) . '/' . $path;\n }\n return $path;\n }", "title": "" } ]
[ { "docid": "62631dfc59bba492d6f1dac40f35c3a8", "score": "0.636124", "text": "function i_path($path = null)\n{\n $path = trim($path, '/');\n return dirname(__DIR__, 1) . ($path ? \"/$path\" : '');\n}", "title": "" }, { "docid": "2541a7e01026d87cdf5efa93f4ad2cb7", "score": "0.63357764", "text": "function base_path($path = '')\n {\n return rtrim(rtrim(realpath(__DIR__ . '/..'), '/') . '/' . $path, '/');\n }", "title": "" }, { "docid": "6d79c6d409920bc6fb6ff5fba1b12821", "score": "0.63277155", "text": "function base_path($path = '')\n {\n return dirname(dirname(__DIR__)).($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "6dbe4085db4fa4864c533dce60db9214", "score": "0.628082", "text": "function pathToAppRoot($file=NULL)\n{\n\tsetIfEmpty($file, \"include/config.php\");\n\tif(file_exists($file)) return \"\";\n\tif(file_exists(\"../$file\")) return \"..\";\n\tif(file_exists(\"../../$file\")) return \"../..\";\n\treturn false;\n}", "title": "" }, { "docid": "bf50a9eb8278dbc65c0017f17e2f058a", "score": "0.62800044", "text": "function base_path($path = '') {\n if (strpos($path, '/') !== 0) {\n $path = '/'.$path;\n }\n\n return __DIR__.($path ?? '');\n}", "title": "" }, { "docid": "f29c5fc5e3ba2f8a461a975dfa99e78c", "score": "0.62716424", "text": "function project_path() {\n return dirname( __FILE__ );\n}", "title": "" }, { "docid": "5e8916cd7adf863f8716cf71184a04f5", "score": "0.6261944", "text": "protected function _get_absolute_path()\n\t{\n\t\treturn Helpers::include_trailing_forward_slash($this->_config['output_absolute_path']);\n\t}", "title": "" }, { "docid": "071a35ee4e0157a4cb0f9d4888666236", "score": "0.6261579", "text": "private function _setPath() {\n\t\tif(!defined('_PROJECT_RELATIVE_PATH_')) {\n\t\t\t$docRoot = (isset($_SERVER['PHP_DOCUMENT_ROOT'])) ?$_SERVER['PHP_DOCUMENT_ROOT'] :$_SERVER['DOCUMENT_ROOT'];\n\t\t\t$folder = str_replace(realpath($docRoot), '/', realpath(_PROJECT_PATH_)).'/';\n\t\t\t$folder = preg_replace('@(\\\\\\|/{2,}|\\/\\\\\\\\)@', '/', $folder);\n\t\t\t\n\t\t\tdefine('_PROJECT_RELATIVE_PATH_', $folder);\n\t\t}\n\t}", "title": "" }, { "docid": "ffce60f69dee2c53d41f1970173f47b5", "score": "0.6215304", "text": "function icao_path($path = null)\n{\n $path = trim($path, '/');\n return __DIR__ . ($path ? \"/$path\" : '');\n}", "title": "" }, { "docid": "b8d432c6c339610a1e7c02bd09b8d079", "score": "0.6209233", "text": "function app_relative_url($path = '')\n {\n\n if ( ! empty( $path )) {\n $path = '/' . $path;\n }\n\n return wp_make_link_relative(get_template_directory_uri() . $path);\n\n }", "title": "" }, { "docid": "5259d8d7c3119930176dffc329783d55", "score": "0.6206005", "text": "function base_path($path = null){\n\tif(isset($path))\n\t{\n\t\treturn getcwd() . '/' . trim($path, '/');\n\t}\n\treturn getcwd();\n}", "title": "" }, { "docid": "df4459e058f61d7ee48dfe2348465146", "score": "0.6135414", "text": "public static function getAppPath($raw = false): string\n {\n self::initPath();\n return self::$_app_path . ($raw ? '' : 'src/');\n }", "title": "" }, { "docid": "e84a0c4be499f4d37bda6a36c7300834", "score": "0.60752666", "text": "function dirPath() {return (\"../../../../\"); }", "title": "" }, { "docid": "80c721a29c733bb286cff4b632dfbc8c", "score": "0.6071747", "text": "function abs2rel(string $path): string\n{\n return str_replace(SITE_ROOT, '', $path);\n}", "title": "" }, { "docid": "64e18a3bf520d7e9b5658226e0d8ecd3", "score": "0.60504967", "text": "function base_path($path = '') {\n\t\treturn app()->basePath() . ($path ? '/' . $path : $path);\n\t}", "title": "" }, { "docid": "de37ce38b57c759fdda4c298f4d36519", "score": "0.59963953", "text": "function app_path($path = '')\n {\n\n if ( ! empty( $path )) {\n $path = '/' . $path;\n }\n\n return get_template_directory() . $path;\n\n }", "title": "" }, { "docid": "0ebb9a3a3da758926ab57040a61c3b0b", "score": "0.59892786", "text": "public function getLocalPath() \n {\n if(is_null($this->project_local_path)) {\n $author = $this->hyphen_author_name;\n $module = $this->hyphen_module_name;\n $local_path = new Directory($this->config->getLocalPath());\n \n $this->project_local_path = $local_path->getChild($author)->getChild($module);\n \n }\n \n return $this->project_local_path;\n }", "title": "" }, { "docid": "e222903fe971ae5692af53ca96516d8c", "score": "0.597631", "text": "function app_path($path = '')\n{\n return __DIR__ . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n}", "title": "" }, { "docid": "c1d3cfdb89c83fb91b6ad06739958390", "score": "0.5964588", "text": "function appPath(string $path = '') : string\n {\n $currentDir = basePath() . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n\n /**\n * since we are calling this file from the different path we have to verify if its cli.\n *\n * @todo look for a better solution , hate this\n */\n if (php_sapi_name() == 'cli') {\n $currentDir = getcwd() . DIRECTORY_SEPARATOR . $path;\n }\n\n return $currentDir;\n }", "title": "" }, { "docid": "b7023c169d9382fd65682fd5e7e293b4", "score": "0.5936838", "text": "protected function prepareBasePath()\n {\n $baseUrl = $this->getBaseUrl();\n if (empty($baseUrl)) {\n return '';\n }\n\n $filename = \\basename($this->server->get('SCRIPT_FILENAME'));\n if (\\basename($baseUrl) === $filename) {\n $basePath = \\dirname($baseUrl);\n } else {\n $basePath = $baseUrl;\n }\n\n if ('\\\\' === \\DIRECTORY_SEPARATOR) {\n $basePath = str_replace('\\\\', '/', $basePath);\n }\n\n return \\rtrim($basePath, '/');\n }", "title": "" }, { "docid": "6a489e3a624a21e76d4561fc4a478c00", "score": "0.5933988", "text": "function return_project_path()\n {\n return PROJ_PATH;\n }", "title": "" }, { "docid": "37a53db6ec665bf670558cef609e8398", "score": "0.5915423", "text": "private function __relativePath($path) {\n\t\treturn 'todo';\n\t}", "title": "" }, { "docid": "3b21a9d52e1e160780ec4e1f39a07b5c", "score": "0.59118575", "text": "function base_path($path = '')\n {\n\n if ( ! empty( $path )) {\n $path = '/' . $path;\n }\n\n return get_home_path() . $path;\n\n }", "title": "" }, { "docid": "7bde9495bf9387c61904ff9da1f3a018", "score": "0.59104705", "text": "function base_path($path = '')\n {\n return app()->basePath().($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "3e8ed5e84e7d1e765c674ff243cd824a", "score": "0.59098417", "text": "public function relative_dir()\n {\n return implode('/', $this->subDirs);\n }", "title": "" }, { "docid": "b905f0336a3a91119eac7472a805518f", "score": "0.5909198", "text": "function dirPath() {return (\"../../../\"); }", "title": "" }, { "docid": "8db3e19fa638baebc762b759c6be8454", "score": "0.5901157", "text": "public function buildFullPath();", "title": "" }, { "docid": "5cdbe1c3b591e8d7e2d8a62f0dee0632", "score": "0.58969927", "text": "public function getProjectPath();", "title": "" }, { "docid": "b7acd2b206312b57c781444b703ebba1", "score": "0.5872427", "text": "function getRelativeFolderPath()\n {\n $dirname = pathinfo($this->fullPath, PATHINFO_DIRNAME);\n return ensureTrailingSlash(\n str_replace($this->videoSourcePath, \"\", $dirname)\n );\n }", "title": "" }, { "docid": "39923813e85063e49188e5e7278115ae", "score": "0.58583283", "text": "function rel2abs(string $path): string\n{\n if ($path[0] != '/') {\n $path = '/' . $path;\n }\n\n return SITE_ROOT . $path;\n}", "title": "" }, { "docid": "7e4cb26d6e05a8fba7df7e9b997eefdc", "score": "0.58554083", "text": "private function get_project_dir(): string {\n\t\tif (empty($this->project)) {\n\t\t\tCLI::display_error(\"Failed to get project directory: project is empty.\");\n\t\t\texit;\n\t\t}\n\n\t\treturn dirname(__DIR__, 2) . \"/{$this->project}\";\n\t}", "title": "" }, { "docid": "95ab13a71e84d1ddf5896430c1592dd5", "score": "0.5841575", "text": "public function __getRelativeFilePath(){\n return empty($_GET['dir']) ? \n \".\".DIRECTORY_SEPARATOR : \n \".\".DIRECTORY_SEPARATOR.$_GET['dir'].DIRECTORY_SEPARATOR;\n }", "title": "" }, { "docid": "4ef961d3fc199df8ac4634ec136e5f6d", "score": "0.58340734", "text": "function relative_include_path() {\n\t$pathSep = \":\";\n\t$newIncludePath = \"\";\n\tif(substr(PHP_OS, 0, 3) == 'WIN' ) {\n\t $pathSep = \";\";\n\t}\n\tforeach(ZendGoodExtStandardTestsFileFopenIncludePathInc::reldirs() as $newdir) {\n\t mkdir($newdir);\n\t $newIncludePath .= $newdir.$pathSep;\n\t}\n\treturn $newIncludePath;\n}", "title": "" }, { "docid": "299b9cec0383999db8e03ab78e33f79d", "score": "0.5819255", "text": "function public_path($appends = ''){\n\t\treturn pathUpLevels(__DIR__, 7).'/'.$appends;\n\t}", "title": "" }, { "docid": "3c88895ff7cbf28edfa8088e7462effb", "score": "0.57959044", "text": "private function getProjectRoot()\n {\n if (static::DEFAULT_CONFIG_FILE === $this->configFile) {\n return '';\n }\n return str_replace('/' . static::DEFAULT_CONFIG_FILE, '', $this->configFile);\n }", "title": "" }, { "docid": "6a83cfda9743c166fe059eb4fc8f1f07", "score": "0.57957083", "text": "private function getRelativePath(){\n\n if (is_null($this->relative_path)) {\n $basedir = array(DOKU_INC);\n\n // during testing, files may be found relative to a second base dir, TMP_DIR\n if (defined('DOKU_UNITTEST')) {\n $basedir[] = realpath(TMP_DIR);\n }\n\n $basedir = array_map('preg_quote_cb', $basedir);\n $regex = '/^('.join('|',$basedir).')/';\n $this->relative_path = preg_replace($regex, '', dirname($this->filepath));\n }\n\n return $this->relative_path;\n }", "title": "" }, { "docid": "94c0ed84e507143e5152cbfb5e73c397", "score": "0.5795349", "text": "public function getRelativeProjectPath(string $path): string\n {\n $realPath = $this->getAbsolutePath($path);\n $gitPath = $this->getAbsolutePath($this->getGitDir());\n\n if (0 !== strpos($realPath, $gitPath)) {\n return $realPath;\n }\n\n return rtrim($this->getRelativePath($realPath), '\\\\/');\n }", "title": "" }, { "docid": "53a9fd83349ec469f9dae201658313a7", "score": "0.5760905", "text": "static function baseDir($path) {\n\t\t\t$dir = dirname(__FILE__);\n\t\t\t$ret = \"{$dir}{$path}\";\n\t\t\treturn $ret;\n\t\t}", "title": "" }, { "docid": "6bd744dfeb90ee0a22cb663e57e9c6e9", "score": "0.57567006", "text": "protected function _get_path()\n\t{\n\t\treturn Helpers::include_trailing_forward_slash($this->_config['output_path']);\n\t}", "title": "" }, { "docid": "ca1db445dd5e92c1b2f6e8b042fadc1e", "score": "0.57521427", "text": "protected function storeRelativePath()\n\t{\n\t\tif (TL_PATH === null)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tif (file_exists(TL_ROOT . '/system/config/pathconfig.php'))\n\t\t{\n\t\t\t$strPath = include TL_ROOT . '/system/config/pathconfig.php';\n\n\t\t\tif (TL_PATH == $strPath)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t\\File::putContent('system/config/pathconfig.php', '<?php' . \"\\n\\n// Relative path to the installation\\nreturn \" . var_export(TL_PATH, true) . \";\\n\");\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\tlog_message($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "688310b32603e9c6022b1211dfbe5e5b", "score": "0.5745026", "text": "function image_relative_path($path = '')\n{\n return config('image_folder') . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n}", "title": "" }, { "docid": "51a3a96b32077bd0c992b7714517e093", "score": "0.57344437", "text": "function app_path($path = '')\n {\n return app('path') . ($path ? DIRECTORY_SEPARATOR . $path : $path);\n }", "title": "" }, { "docid": "68fec9ab8eb46007df2370a3befbe910", "score": "0.5723682", "text": "private static function absolutize( &$path, $base ) {\n\t\tif ( ! empty( $path ) && ! Utils\\is_path_absolute( $path ) ) {\n\t\t\t$path = $base . DIRECTORY_SEPARATOR . $path;\n\t\t}\n\t}", "title": "" }, { "docid": "df947a8ee7ed31e0777531294a95a98d", "score": "0.57193017", "text": "function urlPath($script_path) {\n // Add the leading / if not present\n if($script_path[0] != '/') {\n $script_path = '/' . $script_path;\n }\n\n return WWW_ROOT . $script_path;\n }", "title": "" }, { "docid": "0f8a93ef499f1d77feb4299238b53968", "score": "0.5713247", "text": "protected function resolveProjectPath($relative_path)\n\t{\n\t\treturn realpath($this->projectPath . DIRECTORY_SEPARATOR . $relative_path);\n\t}", "title": "" }, { "docid": "b2a8b52c98f1511b4c02122ffb8a4c85", "score": "0.57061726", "text": "function basePath($path = '')\n{\n $rootPath = dirname(__DIR__);\n if ($path == \"\") {\n return $rootPath;\n }\n return $rootPath . '/' . ltrim($path, '/');\n}", "title": "" }, { "docid": "6ca10207dc0c6a71eed8ac61a4c8d71e", "score": "0.5698779", "text": "public function getRelativePath(): string;", "title": "" }, { "docid": "d6fcd02e74ec827cff57810d696c1568", "score": "0.5683755", "text": "function relative_path($path)\n {\n $full_path = INCLUDE_PATH.$path;\n return $full_path;\n }", "title": "" }, { "docid": "ab9df6b4150c5114ec900fec770a1d0e", "score": "0.5667152", "text": "function public_relative_url($path = '')\n {\n\n return wp_make_link_relative(get_bloginfo('template_directory') . '/public/' . $path);\n\n }", "title": "" }, { "docid": "cb426a8377fef42a1fdfc672ea492fe9", "score": "0.565919", "text": "function fixpath($path) {\n\treturn (substr($path, -1, 1) !== '/') ? $path.'/' : $path;\n}", "title": "" }, { "docid": "8f7ee9ff86e1578617393adcd1961545", "score": "0.5652136", "text": "function get_root_path()\n{\n $pos = strrpos(dirname(__FILE__), DIRECTORY_SEPARATOR . 'web-framework/src');\n $adm = substr(dirname(__FILE__), 0, $pos);\n $pos2 = strrpos($adm, DIRECTORY_SEPARATOR);\n return tsl(substr(__FILE__, 0, $pos2));\n}", "title": "" }, { "docid": "fad03e3718ded85bc119b444659d6549", "score": "0.5643685", "text": "function upstream_get_project_base()\n{\n return upstream_get_permalink_base('projects');\n}", "title": "" }, { "docid": "e2db57cd52d5069876b145ee2da9ce2e", "score": "0.5643225", "text": "function app_path($path = '')\n {\n return app('path').($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "e2db57cd52d5069876b145ee2da9ce2e", "score": "0.5643225", "text": "function app_path($path = '')\n {\n return app('path').($path ? DIRECTORY_SEPARATOR.$path : $path);\n }", "title": "" }, { "docid": "d14fd6b689148a4f58b43ee9a6b530c3", "score": "0.56421584", "text": "private function makeRelativePath($base, $path)\n {\n if (strpos($path, dirname($base)) === 0) {\n return './' . substr($path, strlen(dirname($base) . '/'));\n }\n\n return $path;\n }", "title": "" }, { "docid": "7a60df12cf033c596b328d100c238a8a", "score": "0.56368154", "text": "function public_path($path = '')\n {\n return app()->basePath() . '/public' . ($path? '/' . $path : $path);\n }", "title": "" }, { "docid": "a0cf16a6c50cd276bf77240ff255109a", "score": "0.56368035", "text": "function public_path($path = '')\n {\n return rtrim(app()->basePath('public/' . $path), '/');\n\n// return app()->make('path.public') . ($path ? DIRECTORY_SEPARATOR . ltrim($path, DIRECTORY_SEPARATOR) : $path);\n }", "title": "" }, { "docid": "7bc4ccd5aef0fe9dc4754bbababfb945", "score": "0.5632442", "text": "function url($path)\n{\n //add leading '/' if not present\n if ($path[0] != '/') {\n $path = '/' . $path;\n }\n\n return WWW_ROOT . $path;\n}", "title": "" }, { "docid": "ca55f4786dc50d95af5569b25f4958b8", "score": "0.56298125", "text": "function public_path($path = '')\n {\n $default = env('PUBLIC_PATH', 'public');\n return base_path($default) . ($path ? '/' . $path : $path);\n }", "title": "" }, { "docid": "e5ab9a6c84c14059e04835e3262bb5e7", "score": "0.56284446", "text": "private static function formatPathWithEmptyBaseQuery(string $path): string\n {\n $target_segments = self::getSegments($path);\n /** @var string $basename */\n $basename = end($target_segments);\n\n return '' === $basename ? './' : $basename;\n }", "title": "" }, { "docid": "b2b8223397720131050125adbe3463bc", "score": "0.56251866", "text": "public function base_path($file = NULL){\n return __DIR__.'/../'.$file;\n }", "title": "" }, { "docid": "54775935a4ecbb2d05ca0f3994e63e10", "score": "0.56166047", "text": "private function getProjectDir()\n {\n return $this->projectDir ?: getcwd();\n }", "title": "" }, { "docid": "bf0188ea9c659b279462b19468aa1722", "score": "0.5612514", "text": "function fixPath($path)\n {\n //append a slash to the path if it doesn't exists.\n if(!(substr($path,-1) == '/'))\n $path .= '/';\n Return $path;\n }", "title": "" }, { "docid": "2d4a098fb891f47f7841f8d73eb32cd3", "score": "0.56111366", "text": "protected function _setBaseDir()\r\n {\r\n $this->_base_dir = str_replace('\\\\', '/', dirname(dirname(dirname(__FILE__))));\r\n }", "title": "" }, { "docid": "04083aaa2646c2ccfa166351499a914b", "score": "0.56058264", "text": "private function _findRelativeImageDirectoryURL() { $thisDir = realpath(dirname(__FILE__)) . '/';\r\n $callingDir = realpath(dirname($_SERVER['SCRIPT_FILENAME'])) . '/';\r\n $dirPrefix = '';\r\n if ($callingDir != $thisDir) {\r\n // Cut of the common prefix part\r\n while (strlen($callingDir) > 0 && strlen($thisDir) > 0 && $callingDir[0] == $thisDir[0]) {\r\n $callingDir = substr($callingDir, 1);\r\n $thisDir = substr($thisDir, 1);\r\n }\r\n \r\n if (strlen($callingDir) == 0) {\r\n // This script was called from a parent directory\r\n if ($thisDir[0] == '/') {\r\n $thisDir = substr($thisDir, 1);\r\n }\r\n $dirPrefix = $thisDir;\r\n } else {\r\n // This script was called by an 'brother' directory (same ancestor)\r\n // -> go one directeory up for each '/' found in remaining $callingDir\r\n for ($i = 0; $i < substr_count($callingDir, '/'); $i++) {\r\n $dirPrefix .= '../';\r\n }\r\n // -> and then go down\r\n $dirPrefix .= $thisDir;\r\n }\r\n }\r\n return $dirPrefix . 'styles/' . Configuration::getStyle() . '/';\r\n }", "title": "" }, { "docid": "b7720a950c90828cce425e7fb70bd9d5", "score": "0.5605746", "text": "function path($str=null)\n{\n return sprintf(\"%s/%s\", BASE_PATH, ltrim($str, \"/\"));\n}", "title": "" }, { "docid": "5bcac18c0cb237792ff827e2d97da0c5", "score": "0.5600402", "text": "public function prependPath($path);", "title": "" }, { "docid": "99af08fe5eef3d15fe5b678d2fd9d528", "score": "0.5573954", "text": "function mbRelativePath($absPath) {\n global $dPconfig;\n $mbPath = $dPconfig[\"root_dir\"];\n \n $absPath = strtr($absPath, \"\\\\\", \"/\");\n $mbPath = strtr($mbPath, \"\\\\\", \"/\");\n \n // Hack for MS Windows server\n \n $relPath = strpos($absPath, $mbPath) === 0 ? \n substr($absPath, strlen($mbPath) + 1) :\n $absPath;\n \n return $relPath;\n}", "title": "" }, { "docid": "ab70436901994caeaa43fff6c37f971a", "score": "0.55708706", "text": "function baseUrl($path = '')\n{\n $url = \\Sinevia\\Registry::get(\"URL_BASE\");\n return $url . '/' . ltrim($path, '/');\n}", "title": "" }, { "docid": "4122a8e1943d1d6b7a4b017c2058d940", "score": "0.5567866", "text": "public function testRealpathIsGeneratedProperly(){\r\n\r\n\t\t$this->assertEquals(__DIR__, Fs::realpath(__DIR__, -1, 'System'));\r\n\r\n\t}", "title": "" }, { "docid": "f70319540de896f05d5caa67ecc7f53c", "score": "0.5563945", "text": "function public_path($path = null)\n {\n return rtrim(app()->basePath('public/' . $path), '/');\n }", "title": "" }, { "docid": "f70319540de896f05d5caa67ecc7f53c", "score": "0.5563945", "text": "function public_path($path = null)\n {\n return rtrim(app()->basePath('public/' . $path), '/');\n }", "title": "" }, { "docid": "20e224bab0f78251e66367b0668796ef", "score": "0.55596656", "text": "protected function packageBasePath(string $path = ''): string\n {\n return __DIR__ . \"/../{$path}\";\n }", "title": "" }, { "docid": "2b7f6bc052f097b0d9d001209b98b9ec", "score": "0.5554813", "text": "public static function projectCopyPath($path = '')\n {\n $directory = config('fake-better.copy-path', database_path('faker/copy'));\n\n return rtrim($directory, '/') . '/' . ltrim($path, '/');\n }", "title": "" }, { "docid": "161d6a5a18b48fdbaa555b5d58a2ccca", "score": "0.55493057", "text": "function pathTo($path = null) {\n return realpath(dirname(__FILE__).\"/../\".$path);\n }", "title": "" }, { "docid": "82727ccf7db70535aa0fd4abb0db5850", "score": "0.55471337", "text": "private function relativizePaths($path)\n {\n if (!$this->basePath) {\n return $path;\n }\n\n return str_replace($this->basePath . DIRECTORY_SEPARATOR, '', $path);\n }", "title": "" }, { "docid": "46b0c86852f9b87465f9c1cc393eb5a9", "score": "0.55468076", "text": "protected function base($path)\n {\n return __DIR__ . \"/../../{$path}\";\n }", "title": "" }, { "docid": "cd8737197904cef3848625ba6f5a0e6e", "score": "0.5545655", "text": "function config_path(string $path = null): string\n {\n return CONFIG . ($path ? DIRECTORY_SEPARATOR . $path : '');\n }", "title": "" }, { "docid": "a1aa5e062ab2e3d8feac14aa3417f6c8", "score": "0.55382127", "text": "function getRelativePath();", "title": "" }, { "docid": "77cf3b865ac98e1f91672f0499ba7f05", "score": "0.5532848", "text": "public function AppPath($path = '')\n {\n return $this->_AppPath . ( $path ? Path::Normalize($path, false, null) : '' );\n }", "title": "" }, { "docid": "ed21cfdccd853d208bd6f0d80b0bd332", "score": "0.5527101", "text": "public function getProjectRootDir(Env $env): string;", "title": "" }, { "docid": "2cdd227c37b43774cc0659033b019687", "score": "0.552452", "text": "function config_path($path = '')\n {\n return base_path('config').($path ? '/'.$path : $path);\n }", "title": "" }, { "docid": "2cdd227c37b43774cc0659033b019687", "score": "0.552452", "text": "function config_path($path = '')\n {\n return base_path('config').($path ? '/'.$path : $path);\n }", "title": "" }, { "docid": "0c9bcd5781ba4ef9b1cde175e25aeddd", "score": "0.551519", "text": "function exhibition_realpath($path) {\r\n global $ex_root_path, $php_ext;\r\n\r\n return (!@function_exists('realpath') || !@realpath($ex_root_path . 'includes/config_inc.' . $php_ext)) ? $path : @realpath($path);\r\n}", "title": "" }, { "docid": "a0a282941faa708b0f680adfdc74ae3b", "score": "0.5497714", "text": "private static function relativizePath($absolutePath)\n\t{\n\t\t// Make the path relative\n\t\t$relativePath = str_replace(getcwd(), '.', $absolutePath);\n\n\t\t// Return the path, append slash to directories\n\t\treturn is_dir($absolutePath) ? rtrim($relativePath, '/') . '/' : $relativePath;\n\t}", "title": "" }, { "docid": "b00ea821be54c88368007835f2377cf7", "score": "0.5494954", "text": "function absolute_to_relative($filepath) {\n\t\treturn str_replace(G_ROOT_PATH, G_ROOT_PATH_RELATIVE, forward_slash($filepath));\n\t}", "title": "" }, { "docid": "44e81020e654cc82798eb40da051bbed", "score": "0.5486016", "text": "function app_url($path = '')\n {\n\n if ( ! empty( $path )) {\n $path = '/' . $path;\n }\n\n return get_template_directory_uri() . $path;\n\n }", "title": "" }, { "docid": "6e3424e8e06f6ee1288bbebd1bbe53d0", "score": "0.5484704", "text": "protected static function getBaseDirectory(){\n\t\treturn str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname(__FILE__).DIRECTORY_SEPARATOR.'..'));\t\t\n\t}", "title": "" }, { "docid": "962e198de07e73b2bfab3a1baba2e0ce", "score": "0.54808944", "text": "function relative_url($path = '')\n {\n\n return wp_make_link_relative(get_site_url(null, $path, null));\n\n }", "title": "" }, { "docid": "fc386833f0fd6efc3a146402f6128152", "score": "0.5469052", "text": "private function makeAbsolutPath($path)\n {\n // Note, if file/folder don't exists, realpath will return false\n return realpath($this->docrootpath.$path);\n }", "title": "" }, { "docid": "f5a74f1fffcbea234f8b0854d930c331", "score": "0.5468278", "text": "static function toRelative($path) {\n $return = new LiriopeString($path);\n return $return->minus(c::get('root.web', 'web'))->get();\n }", "title": "" }, { "docid": "df6b4a653be21a51cb44dfaed24e1c0f", "score": "0.5466534", "text": "public function getAppBasePath(){\r\n\t\treturn dirname(__DIR__, 4);\r\n\t}", "title": "" }, { "docid": "f956af871cb2c606460b8cb4de62c9cc", "score": "0.54611015", "text": "private function getDefaultRootPath()\n\t{\n\t\treturn dirname(dirname(dirname(__FILE__))) . '/';\n\t}", "title": "" }, { "docid": "d4ffac0b58af4777e784d2ff003b9c17", "score": "0.5457265", "text": "public function SetSourceDir ($fullOrRelativePath = '') {\n\t\treturn parent::SetSourceDir($fullOrRelativePath);\n\t}", "title": "" }, { "docid": "4551856eec16874bf216d7afab1c2525", "score": "0.54569507", "text": "function relative_to_absolute($filepath) {\n\t\treturn str_replace(G_ROOT_PATH_RELATIVE, G_ROOT_PATH, forward_slash($filepath));\n\t}", "title": "" }, { "docid": "b232647d7b69598926fcab62928c5cc4", "score": "0.54565656", "text": "protected static function root($path='') {\n if (PHP_SAPI != 'cli'){\n $script_filename = str_replace('\\\\', '/', $_SERVER['SCRIPT_FILENAME']);\n $script_filename = explode(\"/\", $script_filename);\n $script_filename = $script_filename[count($script_filename)-1];\n\n $script_folder = trim(preg_replace('/' . $script_filename . '/', '/', $_SERVER['SCRIPT_FILENAME'], 1), '/');\n\n $path = $script_folder . DIRECTORY_SEPARATOR . trim($path, '/');\n $path = str_replace(['/', '\\\\'], DIRECTORY_SEPARATOR, $path);\n return $path;\n }else{\n $path = getcwd() . DIRECTORY_SEPARATOR . trim($path, '/');\n $path = str_replace(['/', '\\\\'], DIRECTORY_SEPARATOR, $path);\n return $path;\n }\n }", "title": "" }, { "docid": "2562955981d9a1979ea7dd33b3b8a274", "score": "0.54542416", "text": "function getFullPath(){\nreturn getcwd();\n}", "title": "" }, { "docid": "f43d800233d074c27b76df6a35fe1dbc", "score": "0.545088", "text": "protected function removeProjectPath($absolute_path)\n\t{\n\t\treturn preg_replace($this->projectPathRegExp, '', $absolute_path, 1);\n\t}", "title": "" }, { "docid": "abc602e73c9aeb46ecce875d0bf1f549", "score": "0.54491794", "text": "public function getInstallPath()\n {\n return ProjectX::projectRoot() . static::INSTALL_ROOT;\n }", "title": "" }, { "docid": "7de4b0a7276a39e7ed905bd8fa4ffe30", "score": "0.5448372", "text": "public static function getAppPath() {\n return __DIR__ . '/../..';\n }", "title": "" }, { "docid": "2f395e7fb2d4fd0a0236c284db338d5d", "score": "0.54313767", "text": "public static function base_path()\n {\n if (!self::$basedir) {\n return null;\n }\n return ASSETS_PATH . '/' . self::$basedir;\n }", "title": "" } ]
47e7b0e1eac527691ca3fc68049b2def
Instruction from AxonServer to Release a specific segment in a Tracking Event Processor Generated from protobuf field .io.axoniq.axonserver.grpc.control.EventProcessorSegmentReference release_segment = 6;
[ { "docid": "019a531940dcb0be0651a266a27b4e42", "score": "0.5485419", "text": "public function getReleaseSegment()\n {\n return $this->readOneof(6);\n }", "title": "" } ]
[ { "docid": "d907a1d3b500b59fbf76697fe16ec885", "score": "0.65753907", "text": "public function setReleaseSegment($var)\n {\n GPBUtil::checkMessage($var, \\Io\\Axoniq\\Axonserver\\Grpc\\Control\\EventProcessorSegmentReference::class);\n $this->writeOneof(6, $var);\n\n return $this;\n }", "title": "" }, { "docid": "db5d3849b9d272f5eb69687caf3be186", "score": "0.5295888", "text": "public function detachSegment($segment);", "title": "" }, { "docid": "7ea97be72d3ff227b2f5b4c4fa192b6f", "score": "0.5034306", "text": "public function setSplitEventProcessorSegment($var)\n {\n GPBUtil::checkMessage($var, \\Io\\Axoniq\\Axonserver\\Grpc\\Control\\EventProcessorSegmentReference::class);\n $this->writeOneof(8, $var);\n\n return $this;\n }", "title": "" }, { "docid": "6733e8253305b8245096e9c0c54ed148", "score": "0.50070995", "text": "public function setMergeEventProcessorSegment($var)\n {\n GPBUtil::checkMessage($var, \\Io\\Axoniq\\Axonserver\\Grpc\\Control\\EventProcessorSegmentReference::class);\n $this->writeOneof(9, $var);\n\n return $this;\n }", "title": "" }, { "docid": "3941ec7bd9440abad205862868f43da6", "score": "0.4987485", "text": "function release(string $resourcId, TaskParam $param);", "title": "" }, { "docid": "374786523c69dd1ae37a591abf9547bb", "score": "0.49654752", "text": "private function discardSegment(ExecutionSegmentInterface $segment): void\n {\n if ($segment->hasEnded()) {\n return;\n }\n\n $segment->discard();\n }", "title": "" }, { "docid": "87b80bb69ac07151d07fe8cc6cd059f4", "score": "0.48593038", "text": "private function endSegment(ExecutionSegmentInterface $segment): void\n {\n if ($segment->hasEnded()) {\n return;\n }\n\n $segment->end();\n }", "title": "" }, { "docid": "284b1cfeffb41984c62e1e225012ae6f", "score": "0.4799194", "text": "public function segmentCutFrom($no) {\r\n\t\tif (!is_int($no)) {\r\n\t\t\tthrow UFra::factory('UFex_Core_NoParameter', 'number');\r\n\t\t}\r\n\t\t$no += $this->offset;\r\n\t\t$count = $this->segmentsCount();\r\n\t\tfor ($no; $no<=$count; $no++) {\r\n\t\t\tunset ($this->segments[$no]);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d41e82694393fd7738315b7472a52ec7", "score": "0.47739723", "text": "public function delete($segment_one = '', $segment_two = ''){\n return;\n }", "title": "" }, { "docid": "04fee093ac4579a9afd3fa9daa792e05", "score": "0.4562984", "text": "public function commitSegment( $not_used = null, $lookupOnly = false ) {\n\t\t// with MacPractice we are expecting our mrn in msg_pid and their id in alt_pid if originating in OT, otherwise their id in both msg_pid and alt_pid\n\t\t$cpi = $this->alt_pid;\n\t\tif( isset( $this->msg_pid ) && false === strpos( $this->msg_pid, '-' )) {\n\t\t\t$mrn = intval( $this->msg_pid );\n\t\t} else {\n\t\t\t$mn = 'PatientDemographic';\n\t\t\t$m \t= ClassRegistry::init( $mn );\n\t\t\t$conditions = array( $mn . '.custom_patient_identifier' => $cpi );\n\t\t\t$get = $m->find( 'first', array( 'conditions' => $conditions ));\n\t\t\tif( $get !== false )\n\t\t\t\t$mrn = $get[$mn]['mrn'];\n\t\t\telse \n\t\t\t\t$mrn = null;\t// new patient, use generated mrn\t\t\t\n\t\t}\n\t\treturn self::commitSegmentP( $lookupOnly, $mrn, $cpi );\n\t}", "title": "" }, { "docid": "bdb7b214baf255a040ef2ea9cbbacdca", "score": "0.45167312", "text": "function mailsubscribers_actualise_segment($id_mailsubscriber, $id_mailsubscribinglist, $id_segment, $segments = null){\n\tif (is_null($segments)) {\n\t\tif ($segments = sql_getfetsel('segments','spip_mailsubscribinglists','id_mailsubscribinglist='.intval($id_mailsubscribinglist))){\n\t\t\t$segments = unserialize($segments);\n\t\t}\n\t}\n\n\tif ($segments and isset($segments[$id_segment])){\n\t\t$need = mailsubscribers_teste_segment($id_mailsubscriber,$segments[$id_segment]);\n\t\t$where = 'id_mailsubscriber='.intval($id_mailsubscriber).' AND id_mailsubscribinglist='.intval($id_mailsubscribinglist).' AND id_segment=';\n\t\t$is = sql_countsel('spip_mailsubscriptions', $where . intval($id_segment));\n\t\tif ($is and !$need) {\n\t\t\tsql_delete('spip_mailsubscriptions', $where . intval($id_segment));\n\t\t}\n\t\tif ($need and !$is) {\n\t\t\tif ($sub = sql_fetsel('*','spip_mailsubscriptions', $where . intval(0))){\n\t\t\t\t$sub['id_segment'] = $id_segment;\n\t\t\t\tsql_insertq('spip_mailsubscriptions', $sub);\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "1d789e42a8cf9c96f3d9649ae7cdb175", "score": "0.4509811", "text": "function pop_segment($escape = 0){\n\t\tif(count($this->segments) > 1){\n\t\t\t$parts = $this->segments;\n\t\t\tfor($i = 0; $i < $escape; $i++){\n\t\t\t\tarray_pop($parts);\n\t\t\t}\n\t\t}\n\t\treturn implode('/', $parts);\n\t}", "title": "" }, { "docid": "3a5e07223abaca7b49fa3bf8fb4e6ad5", "score": "0.44983122", "text": "public function increment(?int $segment = null): VersionNumber {\n\n\t\t$segment = $segment ?? $this->getLeastSignificantIdentifier();\n\n\t\tif ($this->hasSegment($segment)) {\n\t\t\t$this->adjust($segment, 1);\n\n\t\t\t# Zero out any lesser segments, but never a pre-release segment\n\t\t\tif ($segment < $this::PRE) {\n\t\t\t\twhile ($segment < $this::AUX) {\n\t\t\t\t\t$segment *= 2;\n\t\t\t\t\tif (!$this->hasSegment($segment)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$this->setSegment($segment, 0);\n\t\t\t\t\t} catch (InvalidNumberException $e) {\n\t\t\t\t\t\tthrow new Error('Internal error. This is a bug.', 0, $e);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t# Remove any pre-release segment when the specified segment is major, minor, patch or aux\n\t\t\t\t$this->preReleaseNumber = null;\n\t\t\t\t$this->preReleaseType = null;\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\n\t}", "title": "" }, { "docid": "4a81efee078e7322161f980f76aeb20e", "score": "0.44793993", "text": "public function adminReleaseIpAddress()\n {\n $dateTime = new \\DateTime($this->dtString);\n $timeLimit = new \\DateTime(\"$this->dtString - $this->blockIpAddressesFor\");\n $this->requestCountsManager->releaseCountsForIpAddress($this->ipAddress, $dateTime, $timeLimit);\n }", "title": "" }, { "docid": "564e972a2f2192b3fa9daf8f7be9d5e9", "score": "0.4454197", "text": "public function removeReservation($reservation)\n {\n }", "title": "" }, { "docid": "cd15cadc99fc927b50fc0b556e87d870", "score": "0.44450614", "text": "public function getSplitEventProcessorSegment()\n {\n return $this->readOneof(8);\n }", "title": "" }, { "docid": "d5805a00e106c0f33c09a6296bf46e17", "score": "0.43971163", "text": "function GETSEGMENT($segment){\n\t\treturn \\Request::segment($segment);\n\t}", "title": "" }, { "docid": "14a617713633ee0ec9d59fa27fa47a00", "score": "0.4394908", "text": "public function attachSegment($segment);", "title": "" }, { "docid": "5764e07cd0e7c2203cee122b6cf0835b", "score": "0.43706706", "text": "public function getSegment($track,$segment){\n\t\treturn $this->journey->journeys->$track->segments->$segment;\n\t}", "title": "" }, { "docid": "19cc700b984244ea7e935945e6126777", "score": "0.43043548", "text": "public function UPSEdiFooter($res_br,$segmentcount){\n\n\t\t$SegmentIdentifierSA = \"*SA\";\n\n\t\t//$TotalSegmentsInShipment = \"000006\";\n\n\t\tif($segmentcount>0){\n\n\t\t $TotalSegmentsInShipment = commonfunction::paddingleft((6+$segmentcount), 6, '0');\n\n\t\t}else{\n\n\t\t $TotalSegmentsInShipment = \"000006\";\n\n\t\t}\n\n\n\n\t\t // Total Length of SHIPMENT FOOTER SEGMENT should be 9\n\n\t\t $AllSegment = '';\n\n\t\t $AllSegment .= $SegmentIdentifierSA.$TotalSegmentsInShipment;\n\n\t\t return $AllSegment;\n\n }", "title": "" }, { "docid": "ab5b8aa9f3dbba207cd720e2f9c110ed", "score": "0.4280005", "text": "function getSegment($cred, $metrics, $segmentId)\n{\n $method = 'POST';\n $uri = $cred[\"host\"];\n $command = '/api/integration/ext/v1/segments/search';\n $payload = [\n 'payload' => [\n 'offset' => 0,\n 'count' => $metrics->maxBatchSize,\n 'identifierType' => 'SEGMENT_ID',\n 'identifiers' => array($segmentId),\n 'includeMemberCounts' => 'true'\n ],\n ];\n $client = getClient($cred);\n try {\n $response = $client->request($method, $command, [\n 'json' => $payload,\n ]);\n $data = json_decode($response->getBody());\n $payload = $data->payload;\n $count = $payload->count;\n if ($count == 0) {\n return null;\n }\n return $payload->segments[0];\n } catch (Exception $e) {\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n // var_dump($e);\n return null;\n }\n\n}", "title": "" }, { "docid": "dbda265d44445ff2a23723dc11188177", "score": "0.42492452", "text": "public function getMergeEventProcessorSegment()\n {\n return $this->readOneof(9);\n }", "title": "" }, { "docid": "1c528759be226b576b0d1c30e3d7fca5", "score": "0.4235894", "text": "private function popSegment($needPop)\n {\n $this->getStack()->popSegment($needPop);\n }", "title": "" }, { "docid": "5a388d22d5bef6a41d77e35f0d4d400f", "score": "0.42344263", "text": "public function getSegment(): string\n {\n return $this->segment;\n }", "title": "" }, { "docid": "38902a99dde57f63df389f2f0ef6991b", "score": "0.42286587", "text": "function image_segmentation_add_generate_extracted_segments_page_handler($form, &$form_state) {\n $object = islandora_ingest_form_get_object($form_state);\n variable_set($object->id.\":segment_on_ingest\",\n $form_state['values']['generate_extracted_segments']);\n}", "title": "" }, { "docid": "a8e73c01946bb59645e95a681cce1862", "score": "0.42205906", "text": "public function removeBus($name);", "title": "" }, { "docid": "d73b3d26ba65c7c84550a79441f7c807", "score": "0.4212927", "text": "public function release(): void\n {\n $this->forceFill(['reserved_at' => null])->save();\n }", "title": "" }, { "docid": "46a6f70f78a00111858ab8c17e8c0b56", "score": "0.4201714", "text": "#[Deployment(resources: [ \"tests/Resources/Bpmn/Event/Signal/SignalEventTest.testSignalBoundaryOnSubProcess.bpmn20.xml\"])]\n public function testSignalBoundaryOnSubProcess(): void\n {\n $pi = $this->runtimeService->startProcessInstanceByKey(\"signalEventOnSubprocess\");\n $this->runtimeService->signalEventReceived(\"stopSignal\");\n $this->testRule->assertProcessEnded($pi->getProcessInstanceId());\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "0bce875dd3f90c6db80cacd125337b27", "score": "0.41961905", "text": "public function remove(Reservation $reservation): void\n {\n }", "title": "" }, { "docid": "d8f9a6f4909e5c341e8a1f1afac8fc46", "score": "0.4181203", "text": "public function releaseOne()\n {\n $this->release(1);\n }", "title": "" }, { "docid": "8fd0a21cd315c80dee975b243a64d7ed", "score": "0.41702488", "text": "public function releaseSavepoint($name) {}", "title": "" }, { "docid": "9bb8528856dd04b47b80e344756a8fab", "score": "0.41637433", "text": "public function offsetUnset($offset)\n\t{\n\t\tunset($this->segments[$offset]);\n\t}", "title": "" }, { "docid": "1e39053f15c6c4623530d6873ca67928", "score": "0.41438493", "text": "public function deregister(Subscriber $subscriber) : Emitter;", "title": "" }, { "docid": "15c388f076b21f200267cd5132c24b60", "score": "0.4130879", "text": "public function segment($no) {\r\n\t\tif (!is_int($no)) {\r\n\t\t\tthrow UFra::factory('UFex_Core_NoParameter', 'number');\r\n\t\t}\r\n\t\t$no += $this->offset;\r\n\t\tif (!isset($this->segments[$no])) {\r\n\t\t\tthrow UFra::factory('UFex_Core_DataNotFound', 'segment '.$no);\r\n\t\t}\r\n\t\treturn $this->segments[$no];\r\n\t}", "title": "" }, { "docid": "dc1d9b1592cbd7d140d2756a222516d6", "score": "0.41297174", "text": "abstract public function release ();", "title": "" }, { "docid": "75b3006a0bf26110fcf70623704149cb", "score": "0.41231003", "text": "function supervised_course_deleted($event) {\n cleanup($event->objectid);\n}", "title": "" }, { "docid": "8e619492b63edfec0922ec67d7aa6807", "score": "0.41219494", "text": "#[Deployment(resources: [ \"tests/Resources/Bpmn/Event/Compensate/CompensateEventTest.testSubprocessCompensationHandler.bpmn20.xml\"])]\n public function testSubprocessCompensationHandlerDeleteProcessInstance(): void\n {\n $processInstance = $this->runtimeService->startProcessInstanceByKey(\"subProcessCompensationHandler\");\n $beforeCompensationTask = $this->taskService->createTaskQuery()->processInstanceId($processInstance->getId())->singleResult();\n $this->taskService->complete($beforeCompensationTask->getId());\n\n // when deleting the process instance\n $this->runtimeService->deleteProcessInstance($processInstance->getId(), null);\n\n // then the process instance is ended\n $this->testRule->assertProcessEnded($processInstance->getId());\n\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "c1b09b07e33415977491daaade3ec6bf", "score": "0.4120745", "text": "public function release_claim( ActionScheduler_ActionClaim $claim ) {\n\t\t/** @var \\wpdb $wpdb */\n\t\tglobal $wpdb;\n\t\t$wpdb->update( $wpdb->actionscheduler_actions, [ 'claim_id' => 0 ], [ 'claim_id' => $claim->get_id() ], [ '%d' ], [ '%d' ] );\n\t\t$wpdb->delete( $wpdb->actionscheduler_claims, [ 'claim_id' => $claim->get_id() ], [ '%d' ] );\n\t}", "title": "" }, { "docid": "2c26944651c994c6f5b448a3ad19eb19", "score": "0.41081515", "text": "function shift_segment($escape = 0){\n\t\tif(count($this->segments) > 1){\n\t\t\t$parts = $this->segments;\n\t\t\tfor($i = 0; $i < $escape; $i++){\n\t\t\t\tarray_shift($parts);\n\t\t\t}\n\t\t}\n\t\treturn implode('/', $parts);\n\t}", "title": "" }, { "docid": "138e47107bda4c90b161c9b008c16bad", "score": "0.40974694", "text": "function segment($index){\n $index = $index - 1;\n $segment = \"\";\n if(isset($this->segments[$index])){\n $segment = $this->segments[$index];\n }\n return $segment;\n }", "title": "" }, { "docid": "ef29020b81a86706fef6a595ee1ca35d", "score": "0.40950212", "text": "function unacknowledge_guest_comment() {\n $reservationId = $_POST['reservation_id'];\n if(isset($_SESSION['GUEST_COMMENTS_CONTROLLER'])) {\n $commentPage = $_SESSION['GUEST_COMMENTS_CONTROLLER'];\n $commentPage->unacknowledgeComment( $reservationId );\n }\n }", "title": "" }, { "docid": "6010aae21035f1cbbc52cb037e1b8b46", "score": "0.4092645", "text": "public function run(Segment $segment)\n {\n if ($segment->getType()->getName() !== SegmentType::TYPE_STATIC) {\n throw new \\LogicException('Only static segments could have snapshots.');\n }\n\n $this->em->getRepository('OroSegmentBundle:SegmentSnapshot')->removeBySegment($segment);\n\n $qb = $this->dynamicSegmentQB->build($segment);\n $iterator = new BufferedQueryResultIterator($qb);\n\n $writeCount = 0;\n try {\n $this->em->beginTransaction();\n foreach ($iterator as $data) {\n // only not composite identifiers are supported\n $id = reset($data);\n\n $writeCount++;\n $snapshot = new SegmentSnapshot($segment);\n $snapshot->setEntityId($id);\n $this->toWrite[] = $snapshot;\n if (0 === $writeCount % $this->batchSize) {\n $this->write($this->toWrite);\n\n $this->toWrite = [];\n }\n }\n\n if (count($this->toWrite) > 0) {\n $this->write($this->toWrite);\n }\n\n $this->em->commit();\n } catch (\\Exception $exception) {\n $this->em->rollback();\n\n throw $exception;\n }\n\n $segment = $this->em->merge($segment);\n $segment->setLastRun(new \\DateTime('now', new \\DateTimeZone('UTC')));\n $this->em->persist($segment);\n $this->em->flush();\n }", "title": "" }, { "docid": "45e5583d31fc02999f338460e1baaf7c", "score": "0.40884405", "text": "public static function getSegmentSnippet(): string\n {\n return self::getSegmentDestinationSelectorScript() . '\n <script>\n var loadSegment = function loadSegment(integrations) {\n !function(){var analytics=window.analytics=window.analytics||[];if(!analytics.initialize)if(analytics.invoked)window.console&&console.error&&console.error(\"Segment snippet included twice.\");else{analytics.invoked=!0;analytics.methods=[\"trackSubmit\",\"trackClick\",\"trackLink\",\"trackForm\",\"pageview\",\"identify\",\"reset\",\"group\",\"track\",\"ready\",\"alias\",\"debug\",\"page\",\"once\",\"off\",\"on\"];analytics.factory=function(t){return function(){var e=Array.prototype.slice.call(arguments);e.unshift(t);analytics.push(e);return analytics}};for(var t=0;t<analytics.methods.length;t++){var e=analytics.methods[t];analytics[e]=analytics.factory(e)}analytics.load=function(t,e){var n=document.createElement(\"script\");n.type=\"text/javascript\";n.async=!0;n.src=\"https://cdn.segment.com/analytics.js/v1/\"+t+\"/analytics.min.js\";var a=document.getElementsByTagName(\"script\")[0];a.parentNode.insertBefore(n,a);analytics._loadOptions=e};analytics.SNIPPET_VERSION=\"4.1.0\";\n analytics.load(\"' . self::SEGMENT_ID . '\", {\n integrations: integrations\n });\n analytics.page();\n \n }}();\n }\n </script>';\n }", "title": "" }, { "docid": "2ddd823826a9c3c43623da3c5cc0420b", "score": "0.40798467", "text": "public function release(){ }", "title": "" }, { "docid": "db6aea5160c848f8fc43a6b966f5ecf6", "score": "0.4076806", "text": "function image_segmentation_add_generate_extracted_segments_issue_handler($form, &$form_state) {\n module_load_include('inc', 'image_segmentation', 'includes/utilities');\n $object = islandora_ingest_form_get_object($form_state);\n\n $results = get_pages_from_issue($object->id);\n\n forEach($results['response']['docs'] as $page){\n variable_set($page[\"PID\"].\":segment_on_ingest\", \n $form_state['values']['generate_extracted_segments']);\n }\n}", "title": "" }, { "docid": "965fbc5429858551666e54f4909e551a", "score": "0.40675095", "text": "public function cleanToPay($segment_id)\n {\n $offers = Model::Offerout()\n ->where(['updated_at', '<', time() - 900])\n ->where(['segment_id', '=', (int) $segment_id])\n ->where(['status_id', '=', (int) lib('status')->getId('offerout', 'TO_PAY')])\n ->cursor();\n\n foreach ($offers as $offer) {\n lib('offerout')->erase((int) $offer['id']);\n }\n }", "title": "" }, { "docid": "ce7dee4eb9bfde81ef4a49603c4ed379", "score": "0.40565258", "text": "public function release();", "title": "" }, { "docid": "ef600aa8afddf5db6afe7d17d869b184", "score": "0.4054408", "text": "public function releaseSavepoint($name);", "title": "" }, { "docid": "bb2849c7ce69356e5e8429a0f7667ef9", "score": "0.40537915", "text": "public function invoiceVoid($observer)\n {\n $invoice = $observer->getInvoice();\n $order = $invoice->getOrder();\n\n $isXpc = Mage::helper('settings_xpc')->isXpcMethod(\n $order->getPayment()->getMethodInstance()->getCode()\n );\n\n if ($isXpc) {\n\n // Cancel payment in X-Payments\n Mage::helper('api_xpc')->requestPaymentVoid(\n $order->getData('xpc_txnid'),\n $invoice->getGrandTotal()\n );\n }\n }", "title": "" }, { "docid": "bb1b363aaea7cc84bbd107f793792df3", "score": "0.4043411", "text": "function handle_remove($handle, $signal)\n{\n return \\prggmr::instance()->handle_remove($handle, $signal); \n}", "title": "" }, { "docid": "bc107cce58aba463f667b7353744a981", "score": "0.40418354", "text": "public function remove($key){\n $this->segment->remove($key);\n }", "title": "" }, { "docid": "293dd55c255996210f267938331ea233", "score": "0.4036212", "text": "protected function reformat_intervals_segments($segments_db_result, $segment_dimension)\n {\n }", "title": "" }, { "docid": "1db72748952b6435cbe9cfeee03c88a9", "score": "0.4018252", "text": "public static function releaseServer(Server $server): void {\n\t\t$application = $server->application;\n\t\t$query = $application->entityManager()->createQuery('UPDATE ' . Lock::class . ' SET server=NULL, pid=NULL WHERE server=:server');\n\t\t$server = Server::singleton($application);\n\t\t$result = $query->execute(['server' => $server]);\n\t\tif ($result > 0) {\n\t\t\t$application->notice(__METHOD__ . 'Deleted {result} {locks} associated with server {name} (#{id})', [\n\t\t\t\t'method' => __METHOD__, 'result' => $result, 'name' => $server->name, 'id' => $server->id,\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "a2da7810789f1d0e7d4107011bdfd4a9", "score": "0.40155366", "text": "public function setPathSegment($pathSegment)\n {\n $this->pathSegment = $this->castValueToSimpleType('string', $pathSegment, true);\n }", "title": "" }, { "docid": "61be4bc39bc71c0b4578d6135c513130", "score": "0.40037495", "text": "public function saveCoCReleased(CocParameterRelease $cocParameterRelease): void\n {\n $beforeCocParameter = $this->manager->getRepository(CocParameterRelease::class)\n ->find($cocParameterRelease->getCprSubVehicleConfiguration());\n\n try {\n $this->cocParameterService->saveCoCReleased($cocParameterRelease);\n } catch(\\Exception $exception) {\n throw $exception;\n }\n\n $afterCocParameter = $this->manager->getRepository(CocParameterRelease::class)\n ->find($cocParameterRelease->getCprSubVehicleConfiguration());\n\n\n if (is_null($beforeCocParameter)) {\n $beforeCocParameter = new CocParameterRelease();\n }\n\n try {\n $this->history->init();\n $this->history->save($beforeCocParameter, $afterCocParameter, HistoryEvents::UPDATE);\n } catch(\\Exception $exception) {\n throw $exception;\n }\n }", "title": "" }, { "docid": "c6df59a12bea45152596a1948bfdb703", "score": "0.39968902", "text": "public function save(ResourceSegmentBehavior $document);", "title": "" }, { "docid": "5ba7ce8e9df84fa33a2b945bbbb17444", "score": "0.39964437", "text": "protected function reformat_totals_segments($segments_db_result, $segment_dimension)\n {\n }", "title": "" }, { "docid": "88730311e6c54539a2144173271d3953", "score": "0.39925626", "text": "function delete($uuid){\n $beacon =$this->api_instance->beaconsBeaconIdDelete($uuid); \n echo \"Beacon with id: $uuid deleted\";\n }", "title": "" }, { "docid": "268b571be1544eec5222fe1c679153de", "score": "0.3982093", "text": "public function decrementPendingsportevents(string $batchId, string $sporteventId);", "title": "" }, { "docid": "49337926a57fc13f3b7ddfe4785652fa", "score": "0.39810592", "text": "public function __construct(SegmentService $segment)\n {\n $this->segment = $segment;\n }", "title": "" }, { "docid": "8e8e07dea8e8841d654c51eafd68b1ba", "score": "0.39592394", "text": "public function destroy(VocerPoint $vocerPoint)\n {\n //\n }", "title": "" }, { "docid": "bb279334ff1c6da85152e17d8e6bd38f", "score": "0.39582115", "text": "public function deleteReleasePath(string $uuid, string $fetch = self::FETCH_OBJECT)\n {\n return $this->executeEndpoint(new \\MauticInc\\MEGA\\OpenAPI\\Generated\\Endpoint\\DeleteReleasePath($uuid), $fetch);\n }", "title": "" }, { "docid": "1bddf26787d4bb0c52532083ca472def", "score": "0.3952141", "text": "function semRemove( $inKey ) {\n return semaphoreOp( $inKey, \"remove\" );\n }", "title": "" }, { "docid": "aac5bc63d0d63a36871baf8defd5a3fa", "score": "0.394579", "text": "public function releaseSavepoint($savepoint = null)\n\t{\n\t\tif ( ! $savepoint)\n\t\t{\n\t\t\t$savepoint = 'CABINET_SP_LEVEL_'. $this->savepoint;\n\t\t\t$this->savepoint--;\n\t\t}\n\n\t\t$this->connection->query('RELEASE SAVEPOINT '.$savepoint);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9e16fac60bd75b43a964262c08eb5c96", "score": "0.39403772", "text": "function howtoServerStop($event){\n\tglobal $_debug;\n\tif($_debug>0) console(\"howto.Event[$event]\");\n}", "title": "" }, { "docid": "a0f7074e48c2f9db3d70cb38e61103e3", "score": "0.39378625", "text": "private function segment() {\n //Explode the URI string into segments\n $segments = explode('/', $this->fullString);\n \n //loop trough the segments\n foreach($segments as $key => $segment) {\n\n //Replace the not permitted chars\n $segment = preg_replace('/[^'. $this->mono['permittedURIChars']. ']+/i', $this->mono['replaceURIChars'], $segment);\n \n //Store the segment if it holds a value\n if(!empty($segment)){\n $this->segments[$key] = $segment;\n }\n }\n }", "title": "" }, { "docid": "694ae3f11728d62967d43c921b99b504", "score": "0.39336675", "text": "public function DecrementLink();", "title": "" }, { "docid": "04be81a4e63408cf06028f0d786ebf72", "score": "0.39324042", "text": "public function isRelease();", "title": "" }, { "docid": "cf183972f6ac6ab6dbdca022b5fbf331", "score": "0.39305812", "text": "public function destroy(ConveyancingInstruction $convInstruction)\n {\n //\n }", "title": "" }, { "docid": "d2b60fb2e318fc7f1dbb55c8c68b2c92", "score": "0.39205527", "text": "public static function renderSegmentSnippet()\n {\n echo self::getSegmentSnippet();\n }", "title": "" }, { "docid": "d31bdd5a00a679ee65990f86c6a3cfe8", "score": "0.39170462", "text": "function sem_release($semaphore): void\n{\n error_clear_last();\n $safeResult = \\sem_release($semaphore);\n if ($safeResult === false) {\n throw SemException::createFromPhpError();\n }\n}", "title": "" }, { "docid": "32cd580fa600dd0e84f3ace4cd02e302", "score": "0.3916369", "text": "function event_del($event)\n{\n}", "title": "" }, { "docid": "96fff74110b5b31de411860ebda958dd", "score": "0.39153573", "text": "public function delete($project, $zone, $autoscaler, $optParams = array())\n {\n $params = array('project' => $project, 'zone' => $zone, 'autoscaler' => $autoscaler);\n $params = array_merge($params, $optParams);\n return $this->call('delete', array($params), \"Appointments_Google_Service_Compute_Operation\");\n }", "title": "" }, { "docid": "2bf17dd0fe474f3c050d0c0888951e51", "score": "0.39079052", "text": "public function processRequest(SegmentationCounterRequest $request)\n {\n ini_set('memory_limit', '4G');\n set_time_limit(0);\n $this->tablePostFix = config('api-crm.table_val_postfix');\n $this->objRequest = $request;\n $a = $request['request'];\n $this->originalRequest = json_decode($request['request'], true);\n $this->uuid = $request['uuid_token'];\n\n $this->createTemporaryTable();\n $this->calculateOutput();\n dd($request);\n //blablabla\n $this->dropTemporaryTable();\n// $this->createTemporaryTable($this->uuid);\n// $return = $this->calculateOutput();\n// return $return;\n //Schema::connection('temp')->dropIfExists($this->uuid);\n\n }", "title": "" }, { "docid": "3ea333a5239c9f3df1c83c3aff26ad86", "score": "0.3887495", "text": "public function __construct(\n Segment $segment\n ) {\n $this->segment = $segment;\n }", "title": "" }, { "docid": "553fd310664d03fb0f4ee75b7fd1a995", "score": "0.3884379", "text": "public function deleteShipmentDD() {\n\n }", "title": "" }, { "docid": "632c8768b11c1bc8e3080d3fdbdc0544", "score": "0.38821456", "text": "function deleteEventForSeminar($course_id, $resource_id, $date_id)\n {\n $event_data = OCModel::checkScheduled($course_id, $resource_id, $date_id);\n $event = $event_data[0];\n\n $rest_end_point = \"/api/events/\" . $event['event_id'];\n $uri = $rest_end_point;\n\n // setting up a curl-handler\n $location = parse_url($this->matterhorn_base_url);\n\n curl_setopt($this->ochandler, CURLOPT_URL, $location['scheme'] .'://'. $location['host'] . $uri);\n curl_setopt($this->ochandler, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n\n //TODO Über REST Klasse laufen lassen, getXML, getJSON...\n\n $response = curl_exec($this->ochandler);\n $httpCode = curl_getinfo($this->ochandler, CURLINFO_HTTP_CODE);\n\n // remove scheduled event from studip even though it isn't available on opencast\n if ($httpCode == 200 || $httpCode == 204 || $httpCode == 404) {\n $event_id = $event['event_id'];\n OCModel::unscheduleRecording($event_id);\n\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "fb74f1f863cf3b5c1c138534ede4bea7", "score": "0.3881107", "text": "protected function trimmedPathSegment($segment)\n {\n return trim($segment, \"  \\t\\n\\r\\0\\x0B\\/\");\n }", "title": "" }, { "docid": "8aba246bd7d153d384358547f51b7948", "score": "0.3876503", "text": "function removeVenue($venueID){\n $success = False;\n\n try {\n //get linked events \n if ($stmt = $this->conn->prepare(\"SELECT idevent FROM event WHERE venue= :venueID\")){\n //Executing\n $stmt->execute(array(\":venueID\"=>$venueID));\n\n while ($row = $stmt->fetch()){\n //Removing each event that has the venue being removed\n $this->removeEvent($row['idevent']); //POTENITAL ISSUE\n } \n }\n\n //remove venue\n if ($stmt2 = $this->conn->prepare(\"DELETE FROM venue WHERE idvenue= :venueID2\")){\n //Executing\n $stmt2->execute(array(\":venueID2\"=>$venueID));\n\n $success = True;\n }\n return $success;\n } catch (PDOException $e) {\n //can log message\n echo $e->getMessage();\n return array();\n }\n }", "title": "" }, { "docid": "15add480d0ec9c47ab861fbc6259d1cd", "score": "0.38634887", "text": "public static function removeInstanceFromPool($value)\n\t{\n\t\tif (Propel::isInstancePoolingEnabled() && $value !== null) {\n\t\t\tif (is_object($value) && $value instanceof SponsorCode) {\n\t\t\t\t$key = (string) $value->getSponsorCodeId();\n\t\t\t} elseif (is_scalar($value)) {\n\t\t\t\t// assume we've been passed a primary key\n\t\t\t\t$key = (string) $value;\n\t\t\t} else {\n\t\t\t\t$e = new PropelException(\"Invalid value passed to removeInstanceFromPool(). Expected primary key or SponsorCode object; got \" . (is_object($value) ? get_class($value) . ' object.' : var_export($value,true)));\n\t\t\t\tthrow $e;\n\t\t\t}\n\n\t\t\tunset(self::$instances[$key]);\n\t\t}\n\t}", "title": "" }, { "docid": "65506d2c29983ccc76570f470fa2a24c", "score": "0.38531372", "text": "public function setNextRelease($release)\n {\n $this->nextRelease = $release;\n }", "title": "" }, { "docid": "811354e8392561689055459e6762d4d1", "score": "0.3851374", "text": "public function destroy(admission $admission)\n {\n //\n }", "title": "" }, { "docid": "57c831b21dc11ee1ec96fbd50909028d", "score": "0.38451448", "text": "public function deletePageVersion(Varien_Event_Observer $observer ) {\n \n $page = $observer->getEvent()->getObject();\n\n\t\t$pageCollection = Mage::getModel('Hhennes_CmsVersions/page')->getCollection()\n\t\t\t\t ->addFieldToFilter('page_version_id',$page->getPageId());\n\t\t\n\t\t$pageCollection->walk('delete');\t\n \n }", "title": "" }, { "docid": "60949c198ef8a34346dd1b36ac8aa8c0", "score": "0.38323483", "text": "public function ReleaseAddress($ip_address)\r\n\t\t{\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\t$stdClass = new stdClass();\r\n\t\t\t\t$stdClass->publicIp = $ip_address;\r\n\t\t\t\t\r\n\t\t\t\t$response = $this->EC2SoapClient->ReleaseAddress($stdClass);\r\n\t\t\t\t\r\n\t\t\t\tif ($response instanceof SoapFault)\r\n\t\t\t\t\tthrow new Exception($response->faultstring, E_ERROR);\r\n\t\t\t} \r\n\t\t\tcatch (SoapFault $e) \r\n\t\t\t{\r\n\t\t\t throw new Exception($e->getMessage(), E_ERROR);\r\n\t\t\t}\r\n\t\r\n\t\t\treturn $response;\r\n\t\t}", "title": "" }, { "docid": "c4308ac90332cf25dab3e6100388db4d", "score": "0.38307416", "text": "public function deleteBlockVersion(Varien_Event_Observer $observer ) {\n \n //Récupération de l'objet page\n $block = $observer->getEvent()->getObject();\n \n //Récupération des sauvegarde de ce block\n\t\t$blockCollection = Mage::getModel('Hhennes_CmsVersions/block')->getCollection()\n\t\t\t\t ->addFieldToFilter('block_id',$block->getBlockId());\n\t\t\n\t\t//Suppression\n\t\t$blockCollection->walk('delete');\t\t \n\t\t\t \n }", "title": "" }, { "docid": "366e226aa620a0eb677e7e1c9dbde1cb", "score": "0.38275215", "text": "public function deleteSportsVenue($sportsVenue);", "title": "" }, { "docid": "1dc4bfe5681b9ba71ef5ad1cb86ed71a", "score": "0.3824793", "text": "function updateMarketSegment($segment,$hotel)\n\t{\n \n\t\t//if($student == NULL or $hotel == NULL){return false; exit;}\n\t\t\n\t\t$result = \"\";\n if (!$this->conn) \n {\n\t\t\tdie(\"Connection failed: \" . mysqli_connect_error());\n\t\t\t$result = \"fail\";\n }\n\n\t\t$sql = sprintf(\"UPDATE hotel SET type='%s' WHERE id='%s'\",$segment,$hotel);\n\n\t\t//return $sql;\n\t\t//exit;\n if (mysqli_query($this->conn, $sql)) \n {\n\t\t\t$result = true;\n } \n else \n {\n\t\t\t$result = false;\n }\n\n\t\treturn $result;\n \n\t}", "title": "" }, { "docid": "da814676022fcb61bcfa58eccbb4cb1c", "score": "0.38243583", "text": "function decrement($server, $port, $key, $value);", "title": "" }, { "docid": "df737432d74835c44a233d28bf95b009", "score": "0.38230574", "text": "function isReservedRSVP(int $status): bool\n{\n return BC_RSVP_ATTENDING == $status || BC_RSVP_MAYBE == $status;\n}", "title": "" }, { "docid": "990bdfd37d0e9920b5a3f431ec69bcbd", "score": "0.381892", "text": "function del_discussion_response($discussion_response_id,$user_id,$conn){\r\n $sel_result=$conn->query(\"SELECT * FROM sns_course_discussion_response WHERE\r\n\t \t\t\t\tdiscussion_response_id=$discussion_response_id\r\n\t\t\t\t\t AND user_id = $user_id\");\r\n\tif($sel_result->num_rows > 0) {\r\n\t $sel_element=$sel_result->fetch_assoc();\r\n\t $release_id=$sel_element['discussion_release_id'];\r\n\t}\r\n\telse return false;\r\n \t$conn->query(\"DELETE FROM sns_course_discussion_response WHERE\r\n\t \t\t\t\tdiscussion_response_id=$discussion_response_id\r\n\t\t\t\t\t AND user_id = $user_id\");\r\n if($conn->affected_rows == 1) {\r\n\t $sel_result=$conn->query(\"SELECT * FROM sns_course_discussion_release WHERE discussion_release_id=$release_id\");\t\r\n\t\t$sel_element=$sel_result->fetch_assoc();\r\n\t\t$num=$sel_element['discussion_response_num'];\r\n\t\t$conn->query(\"UPDATE sns_course_discussion_release SET discussion_response_num=$num-1 WHERE discussion_release_id=$release_id\");\r\n\t\treturn true;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n }", "title": "" }, { "docid": "ca31ae13d6c97e8dec221d25dcc12269", "score": "0.380888", "text": "public function onPaymentDone(PaymentOrderDoneEvent $paymentOrderDoneEvent)\n{\n $test = 'test';\n/*\n* Your code for this event\n*/\n}", "title": "" }, { "docid": "fa84e2a9f8d69e0a6200aef06fbcc495", "score": "0.380838", "text": "public function offsetSet($offset, $segment)\n\t{\n\t\tif (is_null($offset)) {\n\t\t\t$this->segments[] = (string) $segment;\n\t\t} else {\n\t\t\t$this->segments[$offset] = (string) $segment;\n\t\t}\n\t}", "title": "" }, { "docid": "99f3c7ac04e15340c29de608116a829e", "score": "0.38035104", "text": "public function deleteByPath($path, $webspaceKey, $languageCode, $segmentKey = null)\n {\n $this->mapper->deleteByPath($path, $webspaceKey, $languageCode, $segmentKey);\n }", "title": "" }, { "docid": "7b15afbda933cd769b6da300e5abeb3d", "score": "0.38015443", "text": "function socket_wsaprotocol_info_release($info_id) {}", "title": "" }, { "docid": "0858dd21497f24c5d688d035b055fe2d", "score": "0.38005605", "text": "public function delete($project, $region, $subnetwork, $optParams = array())\n {\n $params = array('project' => $project, 'region' => $region, 'subnetwork' => $subnetwork);\n $params = array_merge($params, $optParams);\n return $this->call('delete', array($params), \"Appointments_Google_Service_Compute_Operation\");\n }", "title": "" }, { "docid": "974d2e462619a805e4734d26f9e42031", "score": "0.3798915", "text": "function notifyrop()\n {\n # echo \"reached\";\n $segment = $this->uri->segment(3);\n # echo($segment);\n if(!empty($segment)){\n\n $bidinvitation = $segment;\n if(!empty($bidinvitation ))\n {\n\n notifyropp($bidinvitation);\n }\n }\n\n\n }", "title": "" }, { "docid": "92467e797572dda7324d9b8c74aef8ae", "score": "0.37925112", "text": "public function curl_write_callback($curlHandle, $incoming_segment) {\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t$source_segment = null;\n\t\t\t$last_segment = false;\n\t\t\t$next_segment = null;\n\t\t\t$last_end_element_offset = 0;\n\t\t\t\n\t\t\t// Concat incoming segment to any previous remaining segment\n\t\t\t$this->xml_segment .= $incoming_segment;\n\t\t\t\n\t\t\t$xmlseg_len = strlen($this->xml_segment);\n\t\t\t\n\t\t\t// Flag for last segment (containing </soap:Envelope> element)\n\t\t\tif ($xmlseg_len >= 16) {\n\t\t\t\t$last_segment = strrpos($this->xml_segment, '</soap:Envelope>', -15) !== false;\n\t\t\t} else {\n\t\t\t\t$last_segment = false;\n\t\t\t}\n\t\t\t\n\t\t\t// Check for the last encoded </ ('&lt;/')in the segment, and keep\n\t\t\t// everything from that point on for the next segment. This is a safe way\n\t\t\t// of processing segments, by breaking at XML end element boundaries.\n\t\t\tif ($xmlseg_len >= 5) {\n\t\t\t\t$last_end_element_offset = strrpos($this->xml_segment, '&lt;/', -4);\n\t\t\t} else {\n\t\t\t\t$last_end_element_offset = false;\n\t\t\t}\n\t\t\t\n\t\t\t// DEBUG\n\t\t\t/*\n\t\t\tprintln('incoming_segment size: ' . strlen($incoming_segment));\n\t\t\tprintln('incoming_segment:' . PHP_EOL . $incoming_segment);\n\t\t\tprintln('xml_segment:' . PHP_EOL . $this->xml_segment);\n\t\t\tprintln('last_segment = ' . $last_segment);\n\t\t\tprintln('last_end_element_offset = ' . $last_end_element_offset);\n\t\t\t*/\n\n\t\t\t\n\t\t\t/* FAULTY LOGIC! REPLACED WITH SECTION BELOW.\n\t\t\tif (!$last_segment && $last_end_element_offset !== false) {\n\t\t\t\t// Get length of string that terminates just before last '&lt;/'\n\t\t\t\t$seglen = $last_end_element_offset;\n\t\t\t\t$next_segment = substr($this->xml_segment, $seglen);\n\t\t\t\t$source_segment = substr($this->xml_segment, 0, $seglen);\n\t\t\t} else {\n\t\t\t\t$source_segment = $this->xml_segment;\n\t\t\t\t$next_segment = '';\n\t\t\t}\n\t\t\t*/\n\t\t\t\n\t\t\t// Check if last segment, take appropriate action\n\t\t\tif ($last_segment) {\n\t\t\t\t// Last segment, take the whole thing for decode\n\t\t\t\t$source_segment = $this->xml_segment;\n\t\t\t\t$next_segment = '';\n\t\t\t} else {\n\t\t\t\t// Check for start of end element (use to break segment)\n\t\t\t\tif ($last_end_element_offset !== false) {\n\t\t\t\t\t// Get length of string that terminates just before last '&lt;/'\n\t\t\t\t\t$seglen = $last_end_element_offset;\n\t\t\t\t\t$next_segment = substr($this->xml_segment, $seglen);\n\t\t\t\t\t$source_segment = substr($this->xml_segment, 0, $seglen);\n\t\t\t\t} else {\n\t\t\t\t\t// No end of element for break, so don't decode, just keep for next round\n\t\t\t\t\t$next_segment = $source_segment;\n\t\t\t\t\t$source_segment = null;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Decode if appropriate\n\t\t\tif ($source_segment) {\n\t\t\t\t// Decode XML entities and add results to output buffer\n\t\t\t\t$this->output_buffer = htmlspecialchars_decode($source_segment);\n\t\t\t\t\n\t\t\t\t// Write output buffer to file\n\t\t\t\t$byte_count = fwrite($this->filep, $this->output_buffer);\n\t\t\t\tif ($byte_count === false) {\n\t\t\t\t\tthrow new Exception(\"Error! Could not write soap XML output to file: $this->soap_filename\");\n\t\t\t\t} else if ($byte_count < strlen($this->output_buffer)) {\n\t\t\t\t\tthrow new Exception(\"Error! Incomplete write to soap XML output file: $this->soap_filename\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Set up for next callback\n\t\t\t$this->xml_segment = $next_segment;\n\t\t\t$this->output_buffer = '';\n\t\t\n\t\t} catch (Exception $e) {\n\t\t\t\n\t\t\t$errmsg = 'Error! Problem in callback: ' . $e->getMessage() . PHP_EOL;\n\t\t\t$errmsg .= 'INCOMING SEGMENT: ' . PHP_EOL . $incoming_segment . PHP_EOL;\n\t\t\t$errmsg .= 'CURRENT SEGMENT: ' . PHP_EOL . $this->xml_segment . PHP_EOL;\n\t\t\tthrow new Exception ($errmsg);\n\t\t}\n\t\t\n\t\t// Must always return length of incoming segment, otherwise\n\t\t// curl will exit with error!\n\t\treturn strlen($incoming_segment);\n\t}", "title": "" }, { "docid": "8921a2c92f31d1d873900b80fd0b7dc7", "score": "0.3788476", "text": "public function releaseLease(\n $container,\n $blob,\n $leaseId,\n Models\\BlobServiceOptions $options = null\n ) {\n $this->releaseLeaseAsync($container, $blob, $leaseId, $options)->wait();\n }", "title": "" }, { "docid": "056de88f4930cd9ba8207642ad15ffe1", "score": "0.3788053", "text": "public function cancel( $pspReference );", "title": "" }, { "docid": "f30edb0e8b5d10ded968e40479cebf10", "score": "0.37875605", "text": "function sem_remove($semaphore): void\n{\n error_clear_last();\n $safeResult = \\sem_remove($semaphore);\n if ($safeResult === false) {\n throw SemException::createFromPhpError();\n }\n}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "659848bac73cd2c21fd0ca1f3956bfb3", "score": "0.0", "text": "public function voire($id)\n {\n $produit = Produit::find($id);\n $familles = Famille::where('statut', 'activé')->get();\n return view('produits.voire', ['produit' => $produit,'fournisseurs' => Fournisseur::all(), 'familles' => $familles]);\n }", "title": "" } ]
[ { "docid": "ef853768d92b1224dd8eb732814ce3fa", "score": "0.7318632", "text": "public function deleteResource(Resource $resource);", "title": "" }, { "docid": "32d3ed9a4be9d6f498e2af6e1cf76b70", "score": "0.6830789", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "c3b6a958d3ad1b729bfd6e4353c3feba", "score": "0.6540415", "text": "public function deleteFile(ResourceObjectInterface $resource);", "title": "" }, { "docid": "00aa681a78c0d452ad0b13bfb8d908dd", "score": "0.64851683", "text": "public function removeResource(IResource $resource): void {\n\t\t$this->resources = array_filter($this->getResources(), function (IResource $r) use ($resource) {\n\t\t\treturn !$this->isSameResource($r, $resource);\n\t\t});\n\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query->delete(Manager::TABLE_RESOURCES)\n\t\t\t->where($query->expr()->eq('collection_id', $query->createNamedParameter($this->id, IQueryBuilder::PARAM_INT)))\n\t\t\t->andWhere($query->expr()->eq('resource_type', $query->createNamedParameter($resource->getType())))\n\t\t\t->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($resource->getId())));\n\t\t$query->execute();\n\n\t\tif (empty($this->resources)) {\n\t\t\t$this->removeCollection();\n\t\t} else {\n\t\t\t$this->manager->invalidateAccessCacheForCollection($this);\n\t\t}\n\t}", "title": "" }, { "docid": "e63877a9259e2bac051cf6c3de5eca30", "score": "0.6431514", "text": "public function deleteResource(Resource $resource) {\n\t\t$pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n\t\ttry {\n\t\t\t$result = $this->filesystem->delete($pathAndFilename);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "680170dae622eedce573be6ddf82f8db", "score": "0.6371304", "text": "public function removeStorage($imgName,$storageName);", "title": "" }, { "docid": "95caa506b86f6d24869dcb0b83d598e5", "score": "0.63126063", "text": "public function unlink(IEntity $source, IEntity $target, string $relation): IStorage;", "title": "" }, { "docid": "2f5ddf194cad1d408d416d31cae16f05", "score": "0.6301321", "text": "public function delete()\n {\n Storage:: delete();\n }", "title": "" }, { "docid": "b907271045dec6299e819d6cb076ced8", "score": "0.6288393", "text": "abstract protected function doRemove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "90bf57c42b6c381768022b254ea3b8e9", "score": "0.62784326", "text": "public static function remove ($resource, $data) {\n // Retrieve resource.\n $list = self::retriveJson($resource);\n // If resource is not availabe.\n if ($list == 1) return 1;\n\n // Iterate through list.\n foreach($list as $i => $object) {\n // If an object with the given id exists, remove it.\n if ($object['id'] == $data['id']) {\n array_splice($list, $i, 1);\n return 0;\n }\n }\n\n // If object does not exists.\n return 2;\n }", "title": "" }, { "docid": "5eda1f28deed9cc179d6350748fe7164", "score": "0.62480205", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n activity()\n ->performedOn(Auth::user())\n ->causedBy($resource)\n ->withProperties(['remove user' => 'customValue'])\n ->log('Resource Deleted successfully');\n $notification = array(\n 'message' => 'Resource Deleted successfully', \n 'alert-type' => 'success'\n );\n \n return back()->with($notification); \n }", "title": "" }, { "docid": "42a9b004cc56ed1225f545039f158828", "score": "0.6130072", "text": "function delete_resource($ref)\n\t{\n\t\n\tif ($ref<0) {return false;} # Can't delete the template\n\n\t$resource=get_resource_data($ref);\n\tif (!$resource) {return false;} # Resource not found in database\n\t\n\t$current_state=$resource['archive'];\n\t\n\tglobal $resource_deletion_state, $staticsync_allow_syncdir_deletion, $storagedir;\n\tif (isset($resource_deletion_state) && $current_state!=$resource_deletion_state) # Really delete if already in the 'deleted' state.\n\t\t{\n\t\t# $resource_deletion_state is set. Do not delete this resource, instead move it to the specified state.\n\t\tsql_query(\"update resource set archive='\" . $resource_deletion_state . \"' where ref='\" . $ref . \"'\");\n\n # log this so that administrator can tell who requested deletion\n resource_log($ref,'x','');\n\t\t\n\t\t# Remove the resource from any collections\n\t\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\t\t\t\n\t\treturn true;\n\t\t}\n\t\n\t# Get info\n\t\n\t# Is transcoding\n\tif ($resource['is_transcoding']==1) {return false;} # Can't delete when transcoding\n\n\t# Delete files first\n\t$extensions = array();\n\t$extensions[]=$resource['file_extension']?$resource['file_extension']:\"jpg\";\n\t$extensions[]=$resource['preview_extension']?$resource['preview_extension']:\"jpg\";\n\t$extensions[]=$GLOBALS['ffmpeg_preview_extension'];\n\t$extensions[]='icc'; // also remove any extracted icc profiles\n\t$extensions=array_unique($extensions);\n\t\n\tforeach ($extensions as $extension)\n\t\t{\n\t\t$sizes=get_image_sizes($ref,true,$extension);\n\t\tforeach ($sizes as $size)\n\t\t\t{\n\t\t\tif (file_exists($size['path']) && ($staticsync_allow_syncdir_deletion || false !== strpos ($size['path'],$storagedir))) // Only delete if file is in filestore\n\t\t\t\t {unlink($size['path']);}\n\t\t\t}\n\t\t}\n\t\n\t# Delete any alternative files\n\t$alternatives=get_alternative_files($ref);\n\tfor ($n=0;$n<count($alternatives);$n++)\n\t\t{\n\t\tdelete_alternative_file($ref,$alternatives[$n]['ref']);\n\t\t}\n\n\t\n\t// remove metadump file, and attempt to remove directory\n\t$dirpath = dirname(get_resource_path($ref, true, \"\", true));\n\tif (file_exists(\"$dirpath/metadump.xml\")){\n\t\tunlink(\"$dirpath/metadump.xml\");\n\t}\n\t@rmdir($dirpath); // try to delete directory, but if it has stuff in it fail silently for now\n\t\t\t // fixme - should we try to handle if there are other random files still there?\n\t\n\t# Log the deletion of this resource for any collection it was in. \n\t$in_collections=sql_query(\"select * from collection_resource where resource = '$ref'\");\n\tif (count($in_collections)>0){\n\t\tif (!function_exists(\"collection_log\")){include (\"collections_functions.php\");}\n\t\tfor($n=0;$n<count($in_collections);$n++)\n\t\t\t{\n\t\t\tcollection_log($in_collections[$n]['collection'],'d',$in_collections[$n]['resource']);\n\t\t\t}\n\t\t}\n\n\thook(\"beforedeleteresourcefromdb\",\"\",array($ref));\n\n\t# Delete all database entries\n\tsql_query(\"delete from resource where ref='$ref'\");\n\tsql_query(\"delete from resource_data where resource='$ref'\");\n\tsql_query(\"delete from resource_dimensions where resource='$ref'\");\n\tsql_query(\"delete from resource_keyword where resource='$ref'\");\n\tsql_query(\"delete from resource_related where resource='$ref' or related='$ref'\");\n\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\tsql_query(\"delete from resource_custom_access where resource='$ref'\");\n\tsql_query(\"delete from external_access_keys where resource='$ref'\");\n\tsql_query(\"delete from resource_alt_files where resource='$ref'\");\n\t\t\n\thook(\"afterdeleteresource\");\n\t\n\treturn true;\n\t}", "title": "" }, { "docid": "d9b3f9cbdf088b174df39b489f05872c", "score": "0.6087595", "text": "public function delete(UriInterface $uri, \\stdClass $resource)\n {\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n\n if(!property_exists($resource, '_links')) {\n return;\n }\n\n $links = $resource->_links;\n\n if($links) {\n foreach ($links as $link) {\n if(is_object($link) && property_exists($link, 'href')) {\n $uri = Client::getInstance()\n ->getDataStore()\n ->getUriFactory()\n ->createUri($link->href);\n }\n\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n }\n }\n\n }", "title": "" }, { "docid": "9b39cbd70aa1aa97e5e5907676b3271e", "score": "0.60398406", "text": "public function removeResource ($name)\n\t{\n\t\t\n\t\tif (isset ($this->resources[$name]))\n\t\t{\n\t\t\t\n\t\t\tunset ($this->resources[$name]);\n\t\t\t\n\t\t\tif (isset ($this->$name))\n\t\t\t{\n\t\t\t\tunset ($this->$name);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "21644a433a62c5fd1c528ea36afc90b8", "score": "0.6036098", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "ba57ef5b5809e7e9dff4ab48e18b343a", "score": "0.603003", "text": "public function delete()\n\t{\n\t\t$this->fs->remove($this->file);\n\t}", "title": "" }, { "docid": "d0b2a4440bb64c6f1cf160d3a82d7633", "score": "0.60045654", "text": "public function destroy($id)\n {\n $student=Student::find($id);\n //delete related file from storage\n $student->delete();\n return redirect()->route('student.index');\n }", "title": "" }, { "docid": "73c704a80ae4a82903ee86a2b821245a", "score": "0.5944851", "text": "public function delete()\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "b4847ad1cd8f89953ef38552f8cdddbe", "score": "0.5935105", "text": "public function remove($identifier)\n {\n $resource = $this->repository->findOneByIdentifier($identifier);\n $this->repository->remove($resource);\n }", "title": "" }, { "docid": "b3d5aa085167568cd1836dd269d2e8dc", "score": "0.59211266", "text": "public function delete(User $user, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b1845194ffa32f9bcc26cc1bed8ee573", "score": "0.5896058", "text": "public function destroy()\n {\n $item = Item::find(request('id'));\n if ($item) {\n if ($item->image_url != '' && file_exists(public_path().'/uploads/item/'.$item->image_url)) {\n unlink(public_path().'/uploads/item/'.$item->image_url);\n }\n $item->delete();\n return response()->json(['success'=>'Record is successfully deleted']);\n }\n}", "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": "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": "53eee40f2e33c1c3b53b819bb59d254d", "score": "0.58634996", "text": "public function delete()\n {\n Storage::delete($this->path);\n return parent::delete();\n }", "title": "" }, { "docid": "28f192e8f4063c3aaceba80a5680f10b", "score": "0.5845638", "text": "public function deleteResource(Resource $resource)\n {\n $whitelist = ['id'];\n $reflObj = new \\ReflectionClass($resource);\n\n //null out all fields not in the whitelist\n foreach ($reflObj->getProperties() as $prop) {\n if (!in_array($prop->getName(), $whitelist)) {\n $prop->setAccessible(true);\n $prop->setValue($resource, null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "90ed2fbe159714429baa05a4796e3ed0", "score": "0.58285666", "text": "public function destroy() { return $this->rm_storage_dir(); }", "title": "" }, { "docid": "62415c40499505a9895f5a25b8230002", "score": "0.58192986", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n $storage->delete();\n return redirect()->route('storage.index')->with('success', 'Data Deleted');\n }", "title": "" }, { "docid": "a2754488896ea090fe5191a49d9d85b9", "score": "0.58119655", "text": "public function deleteFile()\n { \n StorageService::deleteFile($this);\n }", "title": "" }, { "docid": "368230bb080f8f6c51f1832974a498e2", "score": "0.58056664", "text": "public function destroy($id)\n {\n $product = Product::where('id',$id)->first();\n $photo = $product->image;\n if($photo){\n unlink($photo);\n $product->delete();\n }else{\n $product->delete();\n }\n\n }", "title": "" }, { "docid": "31e5cc4a0b6af59482a96519deaba446", "score": "0.5797684", "text": "public function delete()\r\n {\r\n $directory = rtrim(config('infinite.upload_path'), \"/\");\r\n\r\n Storage::delete($directory . '/' . $this->file_name . '.' . $this->extension);\r\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "c473e5d9c679fa421932f0d830432589", "score": "0.5770938", "text": "abstract public function destroyResource(\n DrydockBlueprint $blueprint,\n DrydockResource $resource);", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "22ecee59028ed62aa46bfb196c94d320", "score": "0.5745101", "text": "function remove_from_set($setID, $resource) {\n\tglobal $wpdb;\n\t$resource_table = $wpdb->prefix . 'savedsets_resources';\n\t\n\t$wpdb->delete( $resource_table, array( 'set_id' => $setID, 'resource_id' => $resource ), array( '%d','%d' ) );\n\t\n}", "title": "" }, { "docid": "80279a1597fc869ef294d03bcd1a6632", "score": "0.5721846", "text": "public function rm($id)\n {\n }", "title": "" }, { "docid": "f1357ea9bb8630aa33594f5035e30b53", "score": "0.57217026", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // if the stash file is not referenced any more, delete it\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "45fc5fca7261f9ee05d7a7cfb701d0c1", "score": "0.5717582", "text": "public function destroy($id)\n {\n $del = File::find($id);\n\n if ($del->user_id == Auth::id()) {\n Storage::delete($del->path);\n $del->delete();\n return redirect('/file');\n } else {\n echo \"Its not your file!\";\n }\n }", "title": "" }, { "docid": "19b2a562afcef7db10ce9b75c7e6a8dc", "score": "0.57099277", "text": "public function deleteFromDisk(): void\n {\n Storage::cloud()->delete($this->path());\n }", "title": "" }, { "docid": "493060cb88b9700b90b0bdc650fc0c62", "score": "0.5700126", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // If the stash file is not referenced any more, delete it.\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "a85f5bb361425e120c2b1c92b82b2fe9", "score": "0.56977797", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n Storage::disk('public')->delete(str_replace('/storage/','',$file->path));\n $file->delete();\n return redirect('/admin/media');\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "c553ef667073b35a27db9e6a3bae3be3", "score": "0.56575704", "text": "public function unlink() {\n\t\t$return = unlink($this->fullpath);\n\t\t// destroy object ...testing :)\n\t\tunset($this);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "0532947b7106b0e9285319a9eaf76b8e", "score": "0.56488144", "text": "public function destroy($id)\n\t{\n $entry = Fileentry::find($id);\n Storage::disk('local')->delete($entry->filename);\n $entry->delete();\n\n return redirect()->back();\n\t}", "title": "" }, { "docid": "c29cf340a7685b50d4992018f03a1a37", "score": "0.5645965", "text": "public function destroy() {\n return $this->resource->destroy();\n }", "title": "" }, { "docid": "0b78e5e9a8d5d2a166659b0988261da1", "score": "0.5633292", "text": "public function destroy($id)\n {\n //\n //\n $slider = Slider::findOrFail($id);\n// if(Storage::exists($slider->image_path))\n// {\n// Storage::delete($slider->image_path);\n// }\n $slider->delete();\n return redirect()->back()->with('success', 'Slider was deleted successfully!');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "f0bca51252baaca5a816eef1c2c06fc0", "score": "0.56296647", "text": "public function detach()\n {\n $oldResource=$this->resource;\n fclose($this->resource);\n $this->resource=NULL;\n return $oldResource;\n }", "title": "" }, { "docid": "41660f6084f57c1f6d52218d45380858", "score": "0.5612277", "text": "public function destroy($id)\n {\n $destroy = File::find($id);\n Storage::delete('public/img/'.$destroy->src);\n $destroy->delete();\n return redirect('/files');\n }", "title": "" }, { "docid": "b6093338d60ff2644649eac3d576e7d9", "score": "0.5606613", "text": "public function delete($resource, array $options = [])\n {\n return $this->request('DELETE', $resource, $options);\n }", "title": "" }, { "docid": "59de27765b5cb766d8d7c06e25831e55", "score": "0.5604046", "text": "function delete() {\n\n return unlink($this->path);\n\n }", "title": "" }, { "docid": "547eb07f41c94e071fb1daf6da02654d", "score": "0.55980563", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n unlink(public_path() .'/images/'.$product->file->file);\n session(['Delete'=>$product->title]);\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2b68a0dafbed1898fb849c8102af4ac1", "score": "0.55952084", "text": "public function destroy($id){\n $book = Book::withTrashed()->where('id', $id)->firstOrFail(); \n\n if ($book->trashed()) {\n session()->flash('success', 'El libro se a eliminado exitosamente');\n Storage::delete($book->image); \n $book->forceDelete();\n }else{\n session()->flash('success', 'El libro se envio a la papelera exitosamente');\n $book->delete();\n }\n return redirect(route('books.index'));\n }", "title": "" }, { "docid": "0354eb11a59ab56fb4c68c1ca1a34f9e", "score": "0.55922675", "text": "public function removeUpload(){\n if($file = $this->getAbsolutePath()){\n unlink($file);\n }\n \n }", "title": "" }, { "docid": "8a2965e7fd915ac119635055a709e09f", "score": "0.5591116", "text": "public function destroy($id, Request $request)\n {\n $imagePath = DB::table('game')->select('image')->where('id', $id)->first();\n\n $filePath = $imagePath->image;\n\n if (file_exists($filePath)) {\n\n unlink($filePath);\n\n DB::table('game')->where('id',$id)->delete();\n\n }else{\n\n DB::table('game')->where('id',$id)->delete();\n }\n\n return redirect()->route('admin.game.index');\n }", "title": "" }, { "docid": "954abc5126ecf3e25d5e32fc21b567ff", "score": "0.55901456", "text": "public function remove( $resourceId )\n {\n unset( $this->resourceList[ $resourceId ] );\n \n $this->database->exec( \"\n DELETE FROM\n `{$this->tbl['library_collection']}`\n WHERE\n collection_type = \" . $this->database->quote( $this->type ) . \"\n AND\n ref_id = \" . $this->database->quote( $this->refId ) . \"\n AND\n resource_id = \" . $this->database->escape( $resourceId ) );\n \n return $this->database->affectedRows();\n }", "title": "" }, { "docid": "f7194357aa4e137cfa50acffda93fc27", "score": "0.55829436", "text": "public static function delete($path){}", "title": "" }, { "docid": "a22fc9d493bea356070527d5c377a089", "score": "0.5578515", "text": "public function remove($name) { return IO_FS::rm($this->full_path_for($name)); }", "title": "" }, { "docid": "8a6c54307038aeccb488677b49209dac", "score": "0.5574026", "text": "public function destroy($id)\n {\n //\n //\n $resource = Resource::find($id);\n $resource->delete();\n return redirect()->back();\n\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": "fa9a2e384d55e25ff7893069c00561f7", "score": "0.5568524", "text": "public function destroy($id)\n {\n $data = Crud::find($id);\n $image_name = $data->image;\n unlink(public_path('images'.'/'.$image_name));\n $data->delete();\n return redirect('crud')->with('success','record deleted successfully!');\n\n\n }", "title": "" }, { "docid": "9e4e139799275c6ed9f200c63b6d4a6d", "score": "0.55617994", "text": "public function delete($resource)\n {\n // Make DELETE Http request\n $status = $this->call('DELETE', $resource)['Status-Code'];\n if ($status) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2160551c2833f1a763a1634fee961123", "score": "0.5560052", "text": "public function deleteItem($path, $options = null)\n {\n $this->_rackspace->deleteObject($this->_container,$path);\n if (!$this->_rackspace->isSuccessful()) {\n throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$this->_rackspace->getErrorMsg());\n }\n }", "title": "" }, { "docid": "684ee86436e720744df6668b707a5ac0", "score": "0.5557478", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "1bc9bf0c3a8c77c07fcaf9de0c876d86", "score": "0.5555183", "text": "public function destroy($id)\n { \n $record = Post::findOrFail($id); \n\n if($record->thumbnail !== 'default.png'){\n Storage::delete('Post/'.$record->thumbnail); \n } \n \n $done = Post::destroy($id); \n\n return back()->with('success' , 'Record Deleted');\n }", "title": "" }, { "docid": "9e9a9d9363b0ac3e68a1243a8083cd0b", "score": "0.55495435", "text": "public function destroy($id)\n {\n \n $pro=Product::find($id);\n $one=$pro->image_one;\n \n $two=$pro->image_two;\n $three=$pro->image_three;\n $four=$pro->image_four;\n $five=$pro->image_five;\n $six=$pro->image_six;\n $path=\"media/products/\";\n Storage::disk('public')->delete([$path.$one,$path.$two,$path.$three,$path.$four,$path.$five,$path.$six]);\n\n\n\n $pro->delete();\n Toastr()->success('Product Deleted successfully');\n return redirect()->back();\n \n }", "title": "" }, { "docid": "2c6776be63eac31e1729852dfa8745a9", "score": "0.5548924", "text": "public function destroy($id)\n {\n $partner = Partner::findOrFail($id);\n\n if($partner->cover && file_exists(storage_path('app/public/' . $partner->cover))){\n \\Storage::delete('public/'. $partner->cover);\n }\n \n $partner->delete();\n \n return redirect()->route('admin.partner')->with('success', 'Data deleted successfully');\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": "fb75e67696c980503f7ebd09ae729fe9", "score": "0.5538126", "text": "final public function delete() {}", "title": "" }, { "docid": "aa31cbc566ad4ff78241eb4b0f49fe1e", "score": "0.5536226", "text": "public function destroy($id)\n\t{\n\t\t$this->resource->find($id)->delete();\n\n\t\treturn Redirect::route('backend.resources.index');\n\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": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "b896244b5af3e4822537d0d1d7ab8fdf", "score": "0.5519644", "text": "public function destroy($id)\n {\n $input = $request->all();\n \t$url = parse_url($input['src']);\n \t$splitPath = explode(\"/\", $url[\"path\"]);\n \t$splitPathLength = count($splitPath);\n \tImageUploads::where('path', 'LIKE', '%' . $splitPath[$splitPathLength-1] . '%')->delete();\n }", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "ceab6acdbc23ed7a9a41503580c0a747", "score": "0.55148435", "text": "public function delete()\n {\n $this->value = null;\n $this->hit = false;\n $this->loaded = false;\n $this->exec('del', [$this->key]);\n }", "title": "" }, { "docid": "28797da9ff018d2e75ab89e4bc5cd50d", "score": "0.5511856", "text": "public function destroy($id)\n {\n $user= Auth::user();\n\n $delete = $user->profileimage;\n $user->profileimage=\"\";\n $user->save();\n $image_small=public_path().'/Store_Erp/books/profile/'.$delete ;\n unlink($image_small);\n Session::flash('success',' Profile Image Deleted Succesfully!');\n return redirect()->route('user.profile'); \n \n }", "title": "" }, { "docid": "a92d57f4ccac431a9299e4ad1f0d1618", "score": "0.54956895", "text": "public function destroy($id)\n {\n //\n\n $personaje=Personaje::findOrFail($id);\n\n if(Storage::delete('public/'.$personaje->Foto)){\n \n Personaje::destroy($id);\n }\n\n\n\n\n\n return redirect('personaje')->with('mensaje','Personaje Borrado');\n }", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "df0b2bf2ed8277a4cd77f933418a9cd1", "score": "0.5491558", "text": "public function deleteFile()\n\t{\n\t\tif($this->id)\n\t\t{\n\t\t\t$path = $this->getFileFullPath();\n\t\t\tif($path)\n\t\t\t{\t\t\t\n\t\t\t\t@unlink($path);\n\t\t\t\t$this->setFile(null);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
969e847a65b278b47a389e62ca7520a5
Specifies that the google drive manager will authenticate to google drive api with a service account credentials
[ { "docid": "a131dbf4c3a6323799f92bb885504401", "score": "0.4856175", "text": "public function setServiceAccountCredentials($serviceAccountCredentials){\n\n if(!is_file($serviceAccountCredentials)){\n\n throw new UnexpectedValueException('Could not find serviceAccountCredentials file. Make sure you download the generated service account key json file and specify it here');\n }\n\n $this->_serviceAccountCredentials = $serviceAccountCredentials;\n }", "title": "" } ]
[ { "docid": "281dd69eb96f1ea74537ffe9f2564dac", "score": "0.6717437", "text": "private function authenticate(){\n\n if($this->_isAuthenticated){\n\n return;\n }\n\n // Check if authentication must be performed with service account credentials\n if($this->_serviceAccountCredentials !== ''){\n\n $this->_client = new \\Google_Client();\n $this->_client->setScopes(['https://www.googleapis.com/auth/drive']);\n $this->_client->setAuthConfig($this->_serviceAccountCredentials);\n $this->_client->useApplicationDefaultCredentials();\n\n $this->_service = new \\Google_Service_Drive($this->_client);\n\n $this->_isAuthenticated = true;\n }\n\n if(!$this->_isAuthenticated){\n\n throw new UnexpectedValueException('Could not perform google drive authentication');\n }\n }", "title": "" }, { "docid": "26a4dfbded1e33f37ce4ec9bf332e42d", "score": "0.64119345", "text": "function buildService() {\nglobal $DRIVE_SCOPE, $SERVICE_ACCOUNT_EMAIL, $SERVICE_ACCOUNT_PKCS12_FILE_PATH;\n\n $key = file_get_contents($SERVICE_ACCOUNT_PKCS12_FILE_PATH);\n $auth = new Google_AssertionCredentials(\n $SERVICE_ACCOUNT_EMAIL,\n array($DRIVE_SCOPE),\n $key);\n $client = new Google_Client();\n $client->setUseObjects(true);\n $client->setAssertionCredentials($auth);\n return new Google_DriveService($client);\n}", "title": "" }, { "docid": "dbf3939a9df251ae5b13a4c43f7069b5", "score": "0.6302541", "text": "private static function authenticate() {\n $user = GOOGLE_USER;\n $pass = GOOGLE_PASS;\n $service = Zend_Gdata_Calendar::AUTH_SERVICE_NAME;\n\n return Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);\n }", "title": "" }, { "docid": "5b1bb80f8daf04f19204903f7df502b6", "score": "0.62992173", "text": "protected function getGoogleClient(array $options = []) :Google_Client\n {\n $client = new Google_Client();\n\n $client->setHttpClient(new \\GuzzleHttp\\Client([\n \\GuzzleHttp\\RequestOptions::VERIFY => \\Composer\\CaBundle\\CaBundle::getSystemCaRootBundlePath()\n ]));\n\n $client->setApplicationName('Practice Google Drive');\n $client->setScopes(Google_Service_Drive::DRIVE_FILE);\n $client->setAuthConfig(dirname(__FILE__) . '/../config/credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n // The file token.json stores the user's access and refresh tokens, and is\n // created automatically when the authorization flow completes for the first\n // time.\n $tokenPath = dirname(__FILE__) .'/../config/token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n \n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n }", "title": "" }, { "docid": "0fb78fc021494d185bbe4ff7cb762b3e", "score": "0.62651736", "text": "private function __construct() {\n $this->client = new Google_Client();\n\n // do OAuth2.0 via service account file.\n // See https://developers.google.com/api-client-library/php/auth/service-accounts#authorizingrequests\n putenv('GOOGLE_APPLICATION_CREDENTIALS=' . SERVICE_ACCOUNT_FILE); // for Google_Client() initialization for server-to-server\n $this->client->useApplicationDefaultCredentials();\n // Set application name.\n $this->client->setApplicationName(APPLICATION_NAME);\n // Set Api scopes.\n $this->client->setScopes(array(SCOPES));\n }", "title": "" }, { "docid": "ff1e4898c7efd911316c2823e2d8ed81", "score": "0.62530196", "text": "function buildService() {\n global $DRIVE_SCOPE, $SERVICE_ACCOUNT_EMAIL, $SERVICE_ACCOUNT_PKCS12_FILE_PATH;\n $key = file_get_contents($SERVICE_ACCOUNT_PKCS12_FILE_PATH);\n $auth = new Google_AssertionCredentials(\n $SERVICE_ACCOUNT_EMAIL,\n array($DRIVE_SCOPE),\n $key);\n $client = new Google_Client();\n $client->setUseObjects(true);\n $client->setAssertionCredentials($auth);\n return new Google_DriveService($client);\n}", "title": "" }, { "docid": "020aef50929b9cd667b46dc78ac02f77", "score": "0.6076048", "text": "function getClient()\n{\n\t$client = new Google_Client();\n\t$client->setApplicationName('Google Drive API PHP Quickstart');\n\t$client->addScope(Google_Service_Drive::DRIVE);// DRIVE,DRIVE_FILE(このアプリで作った情報のみ),DRIVE_METADATA_READONLY\n\t$client->addScope(Google_Service_Tasks::TASKS);\n\t$client->setAuthConfig('credentials.json');\n\t$client->setAccessType('offline');\n\t$client->setPrompt('select_account consent');\n\n\t// Load previously authorized token from a file, if it exists.\n\t$tokenPath = 'token.json';\n\tif (file_exists($tokenPath)) {\n\t\t$accessToken = json_decode(file_get_contents($tokenPath), true);\n\t\t$client->setAccessToken($accessToken);\n\t}\n\n\t// If there is no previous token or it's expired.\n\tif ($client->isAccessTokenExpired()) {\n\t\t// Refresh the token if possible, else fetch a new one.\n\t\tif ($client->getRefreshToken()) {\n\t\t\t$client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n\t\t} else {\n\t\t\t// Request authorization from the user.\n\t\t\t$authUrl = $client->createAuthUrl();\n\t\t\tprintf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n\t\t\tprint 'Enter verification code: ';\n\t\t\t$authCode = trim(fgets(STDIN));\n\n\t\t\t// Exchange authorization code for an access token.\n\t\t\t$accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\t\t\t$client->setAccessToken($accessToken);\n\n\t\t\t// Check to see if there was an error.\n\t\t\tif (array_key_exists('error', $accessToken)) {\n\t\t\t\t\tthrow new Exception(join(', ', $accessToken));\n\t\t\t}\n\t\t}\n\t\t// Save the token to a file.\n\t\tif (!file_exists(dirname($tokenPath))) {\n\t\t\tmkdir(dirname($tokenPath), 0700, true);\n\t\t}\n\t\tfile_put_contents($tokenPath, json_encode($client->getAccessToken()));\n\t}\n\treturn $client;\n}", "title": "" }, { "docid": "6821b65b64669b0ff591997bdedfd508", "score": "0.60655636", "text": "function __construct() {\n\t\t$this->client = new Google_Client();\n\t\t$this->client->setAuthConfig( ROOT_PATH . '/client_id.json' );\n\n\t\t// Next two lines needed to obtain refresh_token.\n\t\t// The offline access type allows NiftyFolder to access Google Drive when the owner is not present.\n\t\t$this->client->setAccessType('offline');\n\t\t$this->client->setApprovalPrompt('force');\n\n\t\t// The access scope to the Google Drive.\n\t\t// https://www.googleapis.com/auth/drive.readonly allows read-only access to file metadata and file content\n\t\t$this->client->addScope('https://www.googleapis.com/auth/drive.readonly');\n\t}", "title": "" }, { "docid": "9d1c91a9cc74899148c37da752a06093", "score": "0.58932275", "text": "function __construct() {\n $client_id = Config::get('google.client_id');\n $service_account_name = Config::get('google.service_account_name');\n $key = Config::get('google.api_key');//you can use later\n\n $this->client = new Google_Client();\n \n }", "title": "" }, { "docid": "9c2036eabdce16f6bed62062f1dbb38a", "score": "0.58599645", "text": "function getClient() {\n \n $client = new \\Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setAuthConfig($this->expandHomeDirectory(CLIENT_SECRET_PATH));\n \n $client->addScope(\\Google_Service_Drive::DRIVE_METADATA_READONLY);\n $client->addScope(\\Google_Service_Drive::DRIVE_READONLY);\n $client->addScope(\\Google_Service_Storage::DEVSTORAGE_FULL_CONTROL);\n \n if(isset($_SERVER['HTTP_HOST'])){\n $client->setRedirectUri('http://' . $_SERVER['HTTP_HOST'] . '/tests/oauth2callback');\n }\n $client->setApprovalPrompt(\"force\");\n $client->setAccessType(\"offline\");\n \n if(isset($_GET['code'])){\n return $client;\n }\n \n // Load previously authorized credentials from a file.\n $credentialsPath = $this->expandHomeDirectory($this->expandHomeDirectory(CREDENTIALS_PATH));\n \n // print_r($credentialsPath);\n // exit;\n \n if (file_exists($credentialsPath)) {\n $accessToken = file_get_contents($credentialsPath);\n } else {\n // Request authorization from the user.\n $auth_url = $client->createAuthUrl();\n return $this->_registry->getController()->redirect(filter_var($auth_url, FILTER_SANITIZE_URL));\n }\n $client->setAccessToken($accessToken);\n \n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $refreshTokenPath = $this->expandHomeDirectory($this->expandHomeDirectory(REFRESH_TOKEN_PATH));\n $refreshToken = file_get_contents($refreshTokenPath);\n $client->refreshToken($refreshToken);\n file_put_contents($credentialsPath, $client->getAccessToken());\n }\n \n return $client;\n }", "title": "" }, { "docid": "9b0b5661f2decbc428b4478f45598492", "score": "0.5740822", "text": "protected function getGoogleDriveClient()\n {\n $configPath = $this->get('kernel')->getRootDir() . '/../config/';\n\n // Create Google Drive Client\n $client = new \\Google_Client();\n $client->setApplicationName('Google Drive API PHP Quickstart');\n $client->setScopes(\\Google_Service_Drive::DRIVE_METADATA_READONLY);\n $client->setAuthConfig($configPath . 'google_client_secret.json');\n $client->setAccessType('offline');\n\n // Get user credentials\n $credentialsPath = $configPath . 'credentials.json';\n $accessToken = @json_decode($_ENV['GOOGLE_CREDENTIALS'], true);\n $client->setAccessToken($accessToken);\n\n // Refresh token if expired\n if ($client->isAccessTokenExpired()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n file_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n }\n return $client;\n }", "title": "" }, { "docid": "931e7a7378d257743f327806cad5aff2", "score": "0.5729904", "text": "private function authenticate() {\n\n // Get Google Auth class\n $ga_auth = Auth::get_instance();\n\n // Check if api authenticated succesfully\n if ( ! $ga_auth->success ) return false;\n\n // Set authenticated as true\n $this->authenticated = true;\n\n // Return auth client\n return $ga_auth->client;\n }", "title": "" }, { "docid": "79672242940c6ff5f99d6489e7b3d8c3", "score": "0.563822", "text": "function get_system_google_client(){\n $myGoogleClient = new MyGoogleClient();\n $data = $myGoogleClient->loadCredentials(\"system\");\n\n if($data[\"success\"]){\n return $myGoogleClient;\n }else{\n return null;\n }\n}", "title": "" }, { "docid": "6bcf4e1ec5856413ab2ce0247bd4f3d0", "score": "0.5605946", "text": "function getClient() {\n \n $client = new \\Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setAuthConfig($this->NekoUtil->expandHomeDirectory(CLIENT_SECRET_PATH));\n \n $client->addScope(\\Google_Service_Drive::DRIVE_METADATA_READONLY);\n $client->addScope(\\Google_Service_Drive::DRIVE_READONLY);\n $client->addScope(\\Google_Service_Storage::DEVSTORAGE_FULL_CONTROL);\n $client->addScope(\\Google_Service_Sheets::SPREADSHEETS);\n \n if(isset($_SERVER['HTTP_HOST'])){\n $client->setRedirectUri('http://' . $_SERVER['HTTP_HOST'] . '/admin/tests/oauth2callback');\n }\n $client->setApprovalPrompt(\"force\");\n $client->setAccessType(\"offline\");\n \n if(isset($_GET['code'])){\n return $client;\n }\n \n // Load previously authorized credentials from a file.\n $credentialsPath = $this->NekoUtil->expandHomeDirectory(AUTH_TOKEN_PATH);\n \n if (file_exists($credentialsPath)) {\n $accessToken = file_get_contents($credentialsPath);\n } else {\n // Request authorization from the user.\n $auth_url = $client->createAuthUrl();\n // debug($auth_url);\n return $this->_registry->getController()->redirect(filter_var($auth_url, FILTER_SANITIZE_URL));\n }\n $client->setAccessToken($accessToken);\n \n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $refreshTokenPath = $this->NekoUtil->expandHomeDirectory(REFRESH_TOKEN_PATH);\n $refreshToken = file_get_contents($refreshTokenPath);\n $client->refreshToken($refreshToken);\n file_put_contents($credentialsPath, $client->getAccessToken());\n }\n \n return $client;\n }", "title": "" }, { "docid": "6560de89cde8d1f4c501c0c0ed4d0627", "score": "0.5603736", "text": "private function getClient() {\n $client = new Google_Client();\n $client->setApplicationName('Google Calendar API PHP Quickstart');\n $client->setScopes(Google_Service_Calendar::CALENDAR);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n // The file token.json stores the user's access and refresh tokens, and is\n // created automatically when the authorization flow completes for the first\n // time.\n $tokenPath = 'token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n\n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n }", "title": "" }, { "docid": "d9b814e4e95e14ab69c340573c5caec7", "score": "0.55806005", "text": "public function __construct($role, $access_token=null) {\n $this->client = new Google_Client();\n $this->client->setAuthConfig($_ENV['GOOGLE_APPLICATION_CREDENTIALS']);\n $this->client->setRedirectUri('http://gethired.com/auth/google/'.$role);\n $this->client->addScope(Google_Service_Oauth2::USERINFO_EMAIL);\n $this->client->addScope(Google_Service_Oauth2::USERINFO_PROFILE);\n if($access_token) {\n $this->client->authenticate($access_token);\n }\n }", "title": "" }, { "docid": "69a0803a945077a948a6a7cb1e2113df", "score": "0.5574734", "text": "public function auth()\n {\n // Authenticate the Google Client and set the TOKEN in session\n $this->google_client->authenticate();\n $_SESSION['token'] = $this->google_client->getAccessToken();\n\n // Gets the (new) Google Account\n $google_account = $this->getGoogleAccount();\n\n // Return the account\n return $google_account;\n }", "title": "" }, { "docid": "99383d79b27aaa6f4853725ac8e59689", "score": "0.5574177", "text": "function auth_cloud_explicit($projectId, $serviceAccountPath)\n{\n # file.\n $config = [\n 'keyFilePath' => './key',\n 'projectId' => 'contact-stored',\n ];\n $storage = new StorageClient($config);\n\n # Make an authenticated API request (listing storage buckets)\n foreach ($storage->buckets() as $bucket) {\n printf('Bucket: %s' . PHP_EOL, $bucket->name());\n }\n}", "title": "" }, { "docid": "10a336b1ae135e3ad03a4fb2f0396bc6", "score": "0.5562172", "text": "public function setAuthConfig($json)\n {\n $data = json_decode($json);\n $key = isset($data->installed) ? 'installed' : 'web';\n if (!isset($data->$key)) {\n throw new Google_Exception(\"Invalid client secret JSON file.\");\n }\n $this->setClientId($data->$key->client_id);\n $this->setClientSecret($data->$key->client_secret);\n if (isset($data->$key->redirect_uris)) {\n $this->setRedirectUri($data->$key->redirect_uris[0]);\n }\n }", "title": "" }, { "docid": "0da126d2167635ec94206d319e74c448", "score": "0.55367756", "text": "public function setCredential()\n {\n global $config;\n $akey = $config['TTS']['API-key'];\n $asecret = $config['TTS']['secret-key'];\n\n $this->key = $akey;\n $this->secret = $asecret;\n }", "title": "" }, { "docid": "c850d7e414883b0a0da022e8cb1556b3", "score": "0.5520822", "text": "public function setOptions($scope)\n {\n $this->client->setApplicationName(Yii::$app->name);\n $this->client->setScopes($scope);\n $this->client->setAuthConfig($this->credintionalsPath);\n $this->client->setAccessType('offline');\n $this->client->setPrompt('select_account consent');\n $this->client->setIncludeGrantedScopes(true);\n }", "title": "" }, { "docid": "798ec5d65dfba10a1801d6cba8ec9b9d", "score": "0.55171186", "text": "private function getClient()\n {\n $client = new Google_Client();\n $client->setApplicationName(self::APPLICATION_NAME);\n\n $client->addScope(array(Google_Service_Drive::DRIVE, Google_Service_Drive::DRIVE_FILE, Google_Service_Drive::DRIVE_METADATA_READONLY ));\n $client->setAuthConfigFile(self::CLIENT_SECRET_PATH);\n $client->setRedirectUri(self::REDIRECT_URL);\n $client->setClassConfig('Google_Http_Request', 'disable_gzip', true);\n\n return $client;\n\n }", "title": "" }, { "docid": "0b3413571b01afd3c57f03c40c722e83", "score": "0.55130893", "text": "public function getClient()\n {\n //service account\n $client = new Google_Client();\n $client->useApplicationDefaultCredentials();\n\n return $client;\n }", "title": "" }, { "docid": "1eae7bc83819c7ec21f94fdfe90f2ec3", "score": "0.55060554", "text": "function __construct() {\n $client_id = Config::get('google.client_id');\n\n $service_account_name = Config::get('google.service_account_name');\n\n $key_file_location = base_path() . Config::get('google.key_file_location');\n\n $this->client = new \\Google_Client();\n\n $this->client->setApplicationName(\"Kesato Manager\");\n\n //$this->client->setScopes('https://www.googleapis.com/auth/analytics');\n\n $this->service = new \\Google_Service_Analytics($this->client);\n\n /* If we have an access token */\n if (Cache::has('service_token')) {\n\n $this->client->setAccessToken(Cache::get('service_token'));\n }\n\n $key = file_get_contents($key_file_location);\n\n /* Add the scopes you need */\n $scopes = array('https://www.googleapis.com/auth/analytics');\n\n $cred = new \\Google_Auth_AssertionCredentials(\n $service_account_name,\n $scopes,\n $key\n );\n\n $this->client->setAssertionCredentials($cred);\n\n if ($this->client->getAuth()->isAccessTokenExpired()) {\n $this->client->getAuth()->refreshTokenWithAssertion($cred);\n }\n\n Cache::forever('service_token', $this->client->getAccessToken());\n }", "title": "" }, { "docid": "c41c42c8401dc5be31d844e19128f1fc", "score": "0.54833794", "text": "function getClient() {\n if ($debug) { echo \"get client <br/>\\n\";}\n $client = new Google_Client();\n if ($debug) { echo \"set a client <br/>\\n\"; }\n $client->setApplicationName(APPLICATION_NAME);\n if ($debug) { echo \"set application name <br/>\\n\";}\n $client->setScopes(SCOPES);\n if ($debug) { echo \"set scopes <br/>\\n\";}\n $client->setAuthConfigFile(CLIENT_SECRET_PATH);\n if ($debug) { echo \"set client secret <br/>\\n\";}\n $client->setAccessType('offline');\n if ($debug) { echo \"set access type <br/>\\n\";}\n\n // Load previously authorized credentials from a file.\n $accessToken = getenv(\"ODI_DRIVE_TOKEN\");\n if ($debug) { echo \"got access token : \" . $accessToken . \"<br/>\\n\";}\n if ($accessToken != \"\") {\n } else {\n echo \"No access token, please speak to a site admin!\";\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n \n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->authenticate($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, $accessToken);\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n $client->setAccessToken($accessToken);\n if ($debug) { echo \"set access token <br/>\\n\";}\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n if ($debug) { echo \"need refresh token <br/>\\n\";}\n $client->refreshToken($client->getRefreshToken());\n if ($debug) { echo \"got refrest token <br/>\\n\";}\n putenv(\"ODI_DRIVE_TOKEN=\".$client->getAccessToken());\n if ($debug) { echo \"set access token<br/>\\n\";}\n }\n return $client;\n}", "title": "" }, { "docid": "1673dc722bd820fbbba8834803b28fa3", "score": "0.5463686", "text": "function getClient()\n{\n $client = new Google_Client();\n $client->setApplicationName('Google Calendar API PHP Quickstart');\n $client->setScopes(Google_Service_Calendar::CALENDAR_READONLY);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setIncludeGrantedScopes(true); // incremental auth\n \n if (isset($_SESSION['access_token']) && $_SESSION['access_token']) {\n $client->setAccessToken($_SESSION['access_token']);\n } else {\n $redirect_uri = 'http://' . $_SERVER['HTTP_HOST'] . '/oauth2callback.php';\n header('Location: ' . filter_var($redirect_uri, FILTER_SANITIZE_URL));\n }\n return $client;\n}", "title": "" }, { "docid": "dc9daf21d5e1c8ff4bfcd194dc768e7a", "score": "0.546168", "text": "private function initService()\n {\n $credentials = new Credentials(\n self::$CLIENT_ID,\n self::$CLIENT_SECRET,\n $this->getBaseUrl() . \"/connect\" // Callback URL\n );\n // Create the service\n $serviceFactory = new ServiceFactory();\n $serviceFactory->setHttpClient(new GuzzleClient());\n $this->sleepcloudService = $serviceFactory->createService(\n 'Google',\n $credentials,\n $this->credentialsManager->tokenCredentials,\n array(Google::SCOPE_USERINFO_EMAIL)\n );\n }", "title": "" }, { "docid": "f21d86a0c119f79b62d21e2c4cb575e2", "score": "0.54582846", "text": "function getClient()\n {\n $client = new Google_Client();\n $client->setApplicationName('Google Calendar API PHP Quickstart');\n $client->setScopes(Google_Service_Calendar::CALENDAR_READONLY);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n // The file token.json stores the user's access and refresh tokens, and is\n // created automatically when the authorization flow completes for the first\n // time.\n $tokenPath = 'token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n\n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n }", "title": "" }, { "docid": "2c1677c49aa7eb20c878f527077d6b92", "score": "0.5395878", "text": "function getGoogleClient() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfig(expandHomeDirectory(CLIENT_SECRET_PATH));\n $client->setAccessType('offline');\n\n // Load previously authorized credentials from a file.\n $credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);\n if (file_exists($credentialsPath)) {\n $accessToken = json_decode(file_get_contents($credentialsPath), true);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n $client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n file_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "af1c463112d48f2ed2af5f146b52213e", "score": "0.53793925", "text": "public function init() {\n\n parent::init();\n\n try{\n\n $this->client = new \\Google_Client();\n $this->client->setClientId($this->clientId);\n $this->client->setClientSecret($this->clientSecret);\n $this->client->setAccessType('offline');\n if(call_user_func($this->getAccessTokenFunction)){\n $this->client->setAccessToken(($this->getAccessTokenFunction)());\n if($this->client->isAccessTokenExpired()) {\n $newToken = $this->client->getAccessToken();\n $this->client->refreshToken($newToken['refresh_token']);\n ($this->setAccessTokenFunction)($this->client);\n }\n }\n\n foreach ($this->scopes as $scope) {\n $this->client->setScopes($scope);\n }\n\n } catch (Exception $ex) {\n throw new Exception(\"Error al conectar con google\");\n }\n }", "title": "" }, { "docid": "4648bdc55334bdc14df1520e5dd698f0", "score": "0.5346058", "text": "private function authenticate()\n {\n $authUrl = $this->google_client->createAuthUrl();\n header('Location: ' . $authUrl);\n die;\n }", "title": "" }, { "docid": "4aab7b3c33d14ebbc178af12ecf453a3", "score": "0.5337171", "text": "function getClient()\n{\n $client = new Google_Client();\n $client->setApplicationName('Google Calendar API PHP Quickstart');\n $client->setScopes(Google_Service_Calendar::CALENDAR_READONLY);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n // The file token.json stores the user's access and refresh tokens, and is\n // created automatically when the authorization flow completes for the first\n // time.\n $tokenPath = 'token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n\n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n //file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "f51282b6a859d50a5b634ec92bcf2da2", "score": "0.5332722", "text": "public function googleAuthenticate($username = NULL, $password = NULL) {\n\t\t\t\n\t\t\tif($username) $this->username = $username;\n\t\t\tif($password) $this->password = $password;\n\t\n\t\t\t// Initialize the curl object\n\t\t\t$curl = curl_init();\n\t\n\t\t\tcurl_setopt($curl, CURLOPT_URL, \"https://www.google.com/accounts/ClientLogin\");\n\t\t\tcurl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);\n\t\n\t\t\t$data = array(\n\t\t\t\t'Email' => $this->username,\n\t\t\t\t'Passwd' => $this->password,\n\t\t\t\t'accountType' => 'HOSTED_OR_GOOGLE',\n\t\t\t\t'source' => $this->source,\n\t\t\t\t'service' => 'ac2dm'\n\t\t\t);\n\t\n\t\t\tcurl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\tcurl_setopt($curl, CURLOPT_POST, true);\n\t\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $data);\n\t\n\t\t\t$response = curl_exec($curl);\n\t\t\tcurl_close($curl);\n\t\n\t\t\t// Get the Auth string\n\t\t\tpreg_match(\"/Auth=([a-z0-9_\\-]+)/i\", $response, $matches);\n\t\t\t$this->authToken = $matches[1];\n\t\t\t\n\t\t\treturn $this->authToken;\n\t\t}", "title": "" }, { "docid": "c50c2b9ee9b8acd102852172a76bf29a", "score": "0.53170514", "text": "function getClient()\n{\n $client = new Google_Client();\n $client->setApplicationName('Google Calendar API PHP Quickstart');\n $client->setScopes(Google_Service_Calendar::CALENDAR_READONLY);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n $tokenPath = 'token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n\n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "2846b7cb7c0531e27bdd8c1e8fd9f43e", "score": "0.52800894", "text": "function createAuthorizedClient()\n{\n $client = new Google_Client();\n $client->useApplicationDefaultCredentials();\n $client->addScope(Google_Service_Bigquery::BIGQUERY);\n\n $service = new Google_Service_Bigquery($client);\n\n return $service;\n}", "title": "" }, { "docid": "6a2f3632144389b4eee1443266d0eb63", "score": "0.5274474", "text": "function getClient() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfig(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n\n // Load previously authorized credentials from a file.\n $credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);\n if (file_exists($credentialsPath)) {\n $accessToken = json_decode(file_get_contents($credentialsPath), true);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n $client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n file_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "c40df7737adb4a6de56242121f77491b", "score": "0.5270512", "text": "function getClient()\n {\n $client = new Google_Client();\n $client->setApplicationName('Google Calendar API PHP Quickstart');\n $client->setScopes(Google_Service_Calendar::CALENDAR);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setIncludeGrantedScopes(true); // incremental auth\n \n if (isset($_SESSION['access_token']) && $_SESSION['access_token']) {\n $client->setAccessToken($_SESSION['access_token']);\n } else {\n $redirect_uri = 'http://' . $_SERVER['HTTP_HOST'] . '/oauth2callback.php';\n header('Location: ' . filter_var($redirect_uri, FILTER_SANITIZE_URL));\n }\n return $client;\n }", "title": "" }, { "docid": "c2ae05198b916b6ee0b236b138c10fd6", "score": "0.52412987", "text": "public function acquireAccessToken()\n {\n $request = new Google_Http_Request(\n self::METADATA_AUTH_URL,\n 'GET',\n array(\n 'Metadata-Flavor' => 'Google'\n )\n );\n $request->disableGzip();\n $response = $this->client->getIo()->makeRequest($request);\n\n if ($response->getResponseHttpCode() == 200) {\n $this->setAccessToken($response->getResponseBody());\n $this->token['created'] = time();\n return $this->getAccessToken();\n } else {\n throw new Google_Auth_Exception(\n sprintf(\n \"Error fetching service account access token, message: '%s'\",\n $response->getResponseBody()\n ),\n $response->getResponseHttpCode()\n );\n }\n }", "title": "" }, { "docid": "622b3d6e6be1dd50215baec5179e7fdb", "score": "0.5219445", "text": "function init_sync()\r\n {\r\n global $sugar_config;\r\n $this->google_client = new Google_Client();\r\n $this->auth_handler = new GoogleOauthHandler();\r\n $this->google_client->setClientId($sugar_config['GOOGLE']['CLIENT_ID']);\r\n $this->google_client->setClientSecret($sugar_config['GOOGLE']['CLIENT_SECRET']);\r\n $this->google_client->setRedirectUri($sugar_config['GOOGLE']['REDIRECT_URI']);\r\n $this->google_client->setScopes($sugar_config['GOOGLE']['SCOPES']);\r\n }", "title": "" }, { "docid": "ece5e5cb72e33ffc086f0032107ab6a5", "score": "0.521016", "text": "public function __construct() {\n parent::__construct();\n\n $client = new Google_Client();\n $client->setAccessType('offline');\n $client->setApprovalPrompt('force');\n $client->setAuthConfig('client_secret.json');\n $client->addScope(Google_Service_Calendar::CALENDAR);\n\n $guzzleClient = new \\GuzzleHttp\\Client(array('curl' => array(CURLOPT_SSL_VERIFYPEER => false)));\n $client->setHttpClient($guzzleClient);\n $this->client = $client;\n }", "title": "" }, { "docid": "7da71e2b282a22d6732c253b0271d299", "score": "0.5192849", "text": "function getClient()\n{\n $client = new Google_Client();\n $client->setApplicationName('Gmail API PHP Quickstart');\n $client->setScopes(Google_Service_Gmail::GMAIL_READONLY);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n // The file token.json stores the user's access and refresh tokens, and is\n // created automatically when the authorization flow completes for the first\n // time.\n $tokenPath = 'token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n\n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "a3c65e0cc57f0ca87bc98a9658721224", "score": "0.5175008", "text": "public function withClientCredentials();", "title": "" }, { "docid": "60848af2051fb7824bc1417beb878872", "score": "0.5166307", "text": "public function getClient() {\n \n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfig(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n \n // Load previously authorized credentials from a file.\n $accessToken = false;\n $credentialsPath = $this->expandHomeDirectory(CREDENTIALS_PATH);\n if (file_exists($credentialsPath)) {\n $accessToken = json_decode(file_get_contents($credentialsPath), true);\n }\n \n if($accessToken){\n $client->setAccessToken($accessToken);\n return $client;\n \n } else {\n \n if(isset($_POST['authcodegoogle']) && $_POST['authcodegoogle']!=\"\"){\n echo \"<div>COPY THAT CODE INTO A FILE HERE : \".$credentialsPath.\"</div>\";\n $accessToken = $client->fetchAccessTokenWithAuthCode($_POST['authcodegoogle']); \n echo \"<pre>\", print_r($accessToken, 1), \"</pre>\";\n }\n \n// $array_data = array(\n// 'access_token' => 'ya29.GlvGBCcPZ08dF13ryrL-vTxsQP0v91ErzlU2nFH-xVI0RUJ06BM1P2ssAyx7DOMipO_KwdSTST4y5E73_vfap6AYnIEzj0dkghq-Skb8H4YV5EaAObEdo_S1fUoe',\n// 'token_type' => 'Bearer',\n// 'expires_in' => 3600,\n// 'refresh_token' => '1/CKPBHRcqGvg-T3w8HioT-EDPEJlBVPb38bVDDx3sDjA',\n// 'created' => 1505394862\n// );\n \n \n /* Array(\n [access_token] => ya29.GlvGBCcPZ08dF13ryrL-vTxsQP0v91ErzlU2nFH-xVI0RUJ06BM1P2ssAyx7DOMipO_KwdSTST4y5E73_vfap6AYnIEzj0dkghq-Skb8H4YV5EaAObEdo_S1fUoe\n [token_type] => Bearer\n [expires_in] => 3600\n [refresh_token] => 1/CKPBHRcqGvg-T3w8HioT-EDPEJlBVPb38bVDDx3sDjA\n [created] => 1505394862) */\n \n//$json_data = json_encode($array_data);\n//var_dump($json_data);\n \n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n echo 'Enter verification code: ';\n echo '<form action=\"\" method=\"POST\">';\n echo '<br><input type=\"text\" name=\"authcodegoogle\">';\n echo '<br><input type=\"submit\" value=\"Get the token data\">';\n echo '</form>';\n \n //$authCode = trim(fgets(STDIN));\n //enter here the code given by the browser, normally just once\n //$authCode = '4/QMGGre4azer0WJ7zN1iPonwx3bvBGpc1Y9jJKSpvth8';\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n \n // Store the credentials to disk.\n// if(!file_exists(dirname($credentialsPath))) {\n// mkdir(dirname($credentialsPath), 0700, true);\n// }\n \n file_put_contents($credentialsPath, json_encode($accessToken));\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n return false;\n }\n \n }", "title": "" }, { "docid": "37ba00161edebce4aad3170ea5fefea6", "score": "0.51579106", "text": "function getClient() {\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfig(CLIENT_SECRET_PATH);\n $client->setAccessType('offline');\n\n // Load previously authorized credentials from a file.\n $credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);\n if (file_exists($credentialsPath)) {\n $accessToken = json_decode(file_get_contents($credentialsPath), true);\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk.\n if(!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }\n $client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired.\n if ($client->isAccessTokenExpired()) {\n // save refresh token to some variable\n $refreshTokenSaved = $client->getRefreshToken();\n\n // update access token\n $client->fetchAccessTokenWithRefreshToken($refreshTokenSaved);\n\n // pass access token to some variable\n $accessTokenUpdated = $client->getAccessToken();\n\n // append refresh token\n $accessTokenUpdated['refresh_token'] = $refreshTokenSaved;\n\n // save to file\n file_put_contents($credentialsPath, json_encode($accessTokenUpdated));\n }\n\n return $client;\n}", "title": "" }, { "docid": "b31519a9db7e84d8847ad1166d8ef2d8", "score": "0.5148789", "text": "public function getService()\n {\n\n if (!$this->_service) {\n\n $httpAdapter = new CurlHttpAdapter();\n\n // Client contains the access token\n $client = new Client($this->clientEmail, $this->privateKeyFile, $httpAdapter, 'https://www.googleapis.com/oauth2/v3/token');\n $this->_service = new Service($client);\n\n }\n\n return $this->_service;\n\n }", "title": "" }, { "docid": "053aad6f188c5ca58b5e67b73124439c", "score": "0.51186466", "text": "public function getGoogleServiceDirectory() {\n return new ServiceDirectory($this->getGoogleClient(), $this->serviceAccountPath);\n }", "title": "" }, { "docid": "79d3aa5e5f90cfb450898227e7c23cc4", "score": "0.50773525", "text": "public function __construct(Google_Client $client)\n {\n parent::__construct($client);\n $this->servicePath = '';\n $this->version = 'v2';\n $this->serviceName = 'oauth2';\n\n $this->userinfo = new Google_Service_Oauth2_Userinfo_Resource(\n $this,\n $this->serviceName,\n 'userinfo',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'oauth2/v2/userinfo',\n 'httpMethod' => 'GET',\n 'parameters' => array(),\n ),\n )\n )\n );\n $this->userinfo_v2_me = new Google_Service_Oauth2_UserinfoV2Me_Resource(\n $this,\n $this->serviceName,\n 'me',\n array(\n 'methods' => array(\n 'get' => array(\n 'path' => 'userinfo/v2/me',\n 'httpMethod' => 'GET',\n 'parameters' => array(),\n ),\n )\n )\n );\n $this->base_methods = new Google_Service_Resource(\n $this,\n $this->serviceName,\n '',\n array(\n 'methods' => array(\n 'getCertForOpenIdConnect' => array(\n 'path' => 'oauth2/v2/certs',\n 'httpMethod' => 'GET',\n 'parameters' => array(),\n ),'tokeninfo' => array(\n 'path' => 'oauth2/v2/tokeninfo',\n 'httpMethod' => 'POST',\n 'parameters' => array(\n 'access_token' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n 'id_token' => array(\n 'location' => 'query',\n 'type' => 'string',\n ),\n ),\n ),\n )\n )\n );\n }", "title": "" }, { "docid": "0737d14aa67ca6473def4eaa78e8ec09", "score": "0.50715756", "text": "function auth_service($arg = NULL) {\n if (isset($arg)) $this->auth_service = $arg;\n return $this->auth_service;\n }", "title": "" }, { "docid": "096628c8d434b45c74a748d3f83dc0c2", "score": "0.507049", "text": "public function __construct(AuthService $auth_service)\n {\n $this->auth_service = $auth_service;\n }", "title": "" }, { "docid": "b3c730bf2b454aaa4c1a21d8e3f94759", "score": "0.50579804", "text": "function getClient() {\n\t$client = new Google_Client();\n\t$client->setApplicationName(APPLICATION_NAME);\n\t$client->setScopes(SCOPES);\n\t$client->setAuthConfig(CLIENT_SECRET_PATH);\n\t$client->setAccessType('offline');\n\n\t// Load previously authorized credentials from a file.\n\t$credentialsPath = expandHomeDirectory(CREDENTIALS_PATH);\n\tif (file_exists($credentialsPath)) {\n\t\t$accessToken = json_decode(file_get_contents($credentialsPath), true);\n\t} else {\n\t\t// Request authorization from the user.\n\t\t$authUrl = $client->createAuthUrl();\n\t\tprintf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n\t\tprint 'Enter verification code: ';\n\t\t$authCode = trim(fgets(STDIN));\n\n\t\t// Exchange authorization code for an access token.\n\t\t$accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n\n\t\t// Store the credentials to disk.\n\t\tif(!file_exists(dirname($credentialsPath))) {\n\t\t\tmkdir(dirname($credentialsPath), 0700, true);\n\t\t}\n\t\tfile_put_contents($credentialsPath, json_encode($accessToken));\n\t\tprintf(\"Credentials saved to %s\\n\", $credentialsPath);\n\t}\n\t$client->setAccessToken($accessToken);\n\n\t// Refresh the token if it's expired.\n\tif ($client->isAccessTokenExpired()) {\n\t\t$client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n\t\tfile_put_contents($credentialsPath, json_encode($client->getAccessToken()));\n\t}\n\treturn $client;\n}", "title": "" }, { "docid": "998c12b2c1a70be6b66a12988d36cbc9", "score": "0.5021446", "text": "private function setObjCredential()\n {\n $email = Configuration::get('PAGSEGURO_EMAIL');\n $token = Configuration::get('PAGSEGURO_TOKEN');\n if (!empty($email) && !empty($token)) {\n $this->obj_credential = new PagSeguroAccountCredentials($email, $token);\n } else {\n $this->errorMsg = true;\n }\n }", "title": "" }, { "docid": "5c3f1d7c917d7e90ad5e0136e5b9d511", "score": "0.49887303", "text": "function getClient()\n{\n session_start();\n\n $client = new Google_Client();\n $client->setApplicationName(APPLICATION_NAME);\n $client->setScopes(SCOPES);\n $client->setAuthConfigFile(CLIENT_SECRET_PATH);\n $client->setIncludeGrantedScopes(true);\n $client->setAccessType('offline');\n\n if (isset($_GET['code'])) {\n echo \"<br>I got a code from Google = \" . $_GET['code'];\n $client->authenticate($_GET['code']);\n $_SESSION['token'] = $client->getAccessToken();\n header('Location: http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF']);\n echo \"<br>I got the token = \" . $_SESSION['token'];\n }\n\n if (isset($_SESSION['token'])) {\n echo \"<br/>Getting access<br/>\";\n $client->setAccessToken($_SESSION['token']);\n }\n\n if ($client->getAccessToken()) {\n $calendar = new Google_Service_Calendar($client);\n return $calendar;\n } else {\n $authUrl = $client->createAuthUrl();\n header(\"Location: $authUrl\");\n print \"<hr><br><font size=+2><a href='$authUrl'>Connect Me!</a></font>\";\n }\n}", "title": "" }, { "docid": "70a2cb2e44fff1bb06503c57017bf7f9", "score": "0.4985207", "text": "function __construct() {\n\n // Get config instance\n $this->config = new Config();\n\n // New options instance\n $this->options = new Options();\n\n // Get auth client\n $client = $this->authenticate();\n\n // Create service if authentication is ok\n if ( $client ) {\n \n // Create new google service from authenticated client \n $this->service = new Google_AnalyticsService ( $client );\n\n // Update accounts\n $this->update_accounts();\n\n // Update and get current user's profiles\n $this->update_profiles(); \n }\n }", "title": "" }, { "docid": "69dc3ed002803cdad693c3819780cf34", "score": "0.49790287", "text": "public function setGoogleKey($key)\n {\n $this->setProperty(self::$nameClientLogin, $key);\n }", "title": "" }, { "docid": "6b750eca494f2c35e4ff7860b3bd6972", "score": "0.49702248", "text": "public function get_api_client() {\n\n\t\tif ( $this->api_client ) {\n\t\t\treturn $this->api_client;\n\t\t}\n\n\t\t$settings = $this->get_plugin_settings();\n\n\t\t$redirect_uri = admin_url( 'admin.php' );\n\t\t$redirect_uri = add_query_arg( array(\n\t\t\t'page' => 'gf_settings',\n\t\t\t'subview' => 'gravityformsgooglesheets'\n\t\t), $redirect_uri );\n\n\t\t$client = new Google_Client();\n\t\t$client->setClientId( rgar( $settings, 'clientID' ) );\n\t\t$client->setClientSecret( rgar( $settings, 'clientSecret' ) );\n\t\t$client->setRedirectUri( $redirect_uri );\n\t\t$client->addScope( Google_Service_Sheets::DRIVE );\n\t\t$client->addScope( 'email' );\n\t\t$client->setAccessType( 'offline' );\n\n\t\t$this->api_client = $client;\n\n\t\treturn $client;\n\t}", "title": "" }, { "docid": "97610ce257e3ab20331745e33ef51de2", "score": "0.49562395", "text": "public function google_oauth_init() {\n\t\t$this->googleoauth_page_init();\n\n\t\tregister_setting( 'google_oauth_option_group', 'array_key', array( $this, 'check_option' ) );\n\n\t\tadd_settings_section( 'setting_section_id', 'Google API Settings', array(\n\t\t\t\t$this,\n\t\t\t\t'google_oauth_section_info'\n\t\t\t), 'google-oauth-setting-admin');\n\n\t\tadd_settings_field( 'autologin_active', 'Activate auto-login',\tarray(\n\t\t\t\t$this,\n\t\t\t\t'create_autologin_active_field'\n\t\t\t),\n\t\t\t'google-oauth-setting-admin', 'setting_section_id');\n\n\n\t\tadd_settings_field( 'client_id', 'Client ID',\tarray(\n\t\t\t\t$this,\n\t\t\t\t'create_client_id_field'\n\t\t\t),\n\t\t\t'google-oauth-setting-admin', 'setting_section_id');\n\n\t\tadd_settings_field( 'client_secret', 'Secret Key', array(\n\t\t\t\t$this,\n\t\t\t\t'create_client_secret_field'\n\t\t\t),\n\t\t\t'google-oauth-setting-admin', 'setting_section_id');\n\n\t\tadd_settings_field( 'redirect_url', 'Redirect URL', array(\n\t\t\t\t$this,\n\t\t\t\t'create_redirect_url_field'\n\t\t\t),\n\t\t\t'google-oauth-setting-admin', 'setting_section_id');\n\n\t\tadd_settings_section( 'app_setting_section_id', 'Authentication Settings', array(\n\t\t\t\t$this,\n\t\t\t\t'google_oauth_app_settings_section_info'\n\t\t\t), 'google-oauth-setting-admin');\n\n\t\tadd_settings_field( 'allowed_domains', 'Allowed domain', array(\n\t\t\t\t$this,\n\t\t\t\t'create_allowed_domains'\n\t\t\t),\n\t\t\t'google-oauth-setting-admin', 'app_setting_section_id');\n\t}", "title": "" }, { "docid": "46e446c8fe938747da5b44f57e31a7b4", "score": "0.4953068", "text": "public function getClient()\n\t{\n\t\t$client = new Google_Client();\n\t\t$client->setApplicationName('REMODEL');\n\t\t$client->setScopes(Google_Service_Sheets::DRIVE);\n\t\t$client->addScope(Google_Service_Sheets::DRIVE_FILE);\n\t\t$client->addScope(Google_Service_Sheets::SPREADSHEETS);\n\t\t$client->setAuthConfig('/usr/local/webs/remodel.anesthesiology/htdocs/REMODEL-0dfb917af5de.json');\n\n\t\t// Load previously authorized token from a file, if it exists.\n\t\t$tokenPath = '/htdocs/token.json';\n\t\tif (file_exists($tokenPath)) {\n\t\t\t$accessToken = json_decode(file_get_contents($tokenPath), true);\n\t\t\t$client->setAccessToken($accessToken);\n\t\t}\n\t\treturn $client;\n\t}", "title": "" }, { "docid": "357fa67579d1f1f0929d919e5c003254", "score": "0.49495977", "text": "public static function get_auth_service() {\n\t\t$service = self::get_service();\n\t\t$token = self::get_token();\n\n\t\tif ( $token ) {\n\t\t\t$service->set_token( $token );\n\t\t\treturn $service;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1a451730efd9c4120f1c49fffd005424", "score": "0.49459046", "text": "public function __construct(){\n $this->gClient = new Google_Client();\n\n \n //Setting credentials\n $this->gClient->setClientId(G_CLIENT_ID);\n $this->gClient->setClientSecret(G_CLIENT_SECRET);\n\n\n //scopes defined\n $this->gClient->addScope(\"email\");\n $this->gClient->addScope(\"profile\");\n }", "title": "" }, { "docid": "c2f4d6eb3c0708644bc206e5e0c48720", "score": "0.49429414", "text": "public function __construct(array $options = array())\n\t{\n\t\t// Instantiate the utilities class.\n\t\t$this->util = new $this->utilities_class();\n\n\t\t// Determine the current service.\n\t\t$this->service = get_class($this);\n\n\t\t// Create credentials based on the options\n\t\t$runtime_credentials = new CFCredential($options);\n\t\t$credentials_provided = false;\n\n\t\t// Retrieve a credential set from config.inc.php if it exists\n\t\tif (isset($options['credentials']))\n\t\t{\n\t\t\t// Use a specific credential set and merge with the runtime credentials\n\t\t\t$this->credentials = CFCredentials::get($options['credentials'])\n\t\t\t\t->merge($runtime_credentials);\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Use the default credential set and merge with the runtime credentials\n\t\t\t\t$this->credentials = CFCredentials::get(CFCredentials::DEFAULT_KEY)\n\t\t\t\t\t->merge($runtime_credentials);\n\t\t\t}\n\t\t\tcatch (CFCredentials_Exception $e)\n\t\t\t{\n\t\t\t\t// Only the runtime credentials were provided\n\t\t\t\t$this->credentials = $runtime_credentials;\n\t\t\t}\n\t\t}\n\n\t\t// Check if keys were actually provided\n\t\tif (isset($this->credentials['key']) && isset($this->credentials['secret']))\n\t\t{\n\t\t\t$credentials_provided = true;\n\t\t}\n\n\t\t// Check for an instance profile credentials override\n\t\tif (isset($this->credentials['use_instance_profile_credentials']) && $this->credentials['use_instance_profile_credentials'])\n\t\t{\n\t\t\t$credentials_provided = false;\n\t\t}\n\n\t\t// Automatically enable whichever caching mechanism is set to default.\n\t\t$this->set_cache_config($this->credentials->default_cache_config);\n\n\t\t// If no credentials were provided, try to get them from the EC2 instance profile\n\t\tif (!$credentials_provided)\n\t\t{\n\t\t\t// Default caching mechanism is required\n\t\t\tif (!$this->credentials->default_cache_config)\n\t\t\t{\n\t\t\t\t// @codeCoverageIgnoreStart\n\t\t\t\tthrow new CFCredentials_Exception('No credentials were provided. The SDK attempts to retrieve Instance '\n\t\t\t\t\t. 'Profile credentials from the EC2 Instance Metadata Service, but doing this requires the '\n\t\t\t\t\t. '\"default_cache_config\" option to be set in the config.inc.php file or constructor. In order to '\n\t\t\t\t\t. 'cache the retrieved credentials.');\n\t\t\t\t// @codeCoverageIgnoreEnd\n\t\t\t}\n\n\t\t\t// Instantiate and invoke the cache for instance profile credentials\n\t\t\t$cache = new $this->cache_class('instance_profile_credentials', $this->cache_location, 0, $this->cache_compress);\n\t\t\tif ($data = $cache->read())\n\t\t\t{\n\t\t\t\t$cache->expire_in((strtotime($data['expires']) - time()) * 0.85);\n\t\t\t}\n\t\t\t$instance_profile_credentials = $cache->response_manager(array($this, 'cache_instance_profile_credentials'), array($cache, $options));\n\n\t\t\t$this->credentials->key = $instance_profile_credentials['key'];\n\t\t\t$this->credentials->secret = $instance_profile_credentials['secret'];\n\t\t\t$this->credentials->token = $instance_profile_credentials['token'];\n\t\t}\n\n\t\t// Set internal credentials after they are resolved\n\t\t$this->key = $this->credentials->key;\n\t\t$this->secret_key = $this->credentials->secret;\n\t\t$this->auth_token = $this->credentials->token;\n\t}", "title": "" }, { "docid": "0d14a51e90a38d123eabfa52dbdbf7fa", "score": "0.49298152", "text": "public function getApiClient() {\n if (!$this->api_client) {\n if (!CliOps::getApiKey()) {\n throw new \\Exception(\"API Key is not defined, update configuration file\");\n }\n $this->api_client = new \\Google_Client();\n $this->api_client->setDeveloperKey(CliOps::getApiKey());\n if (CliOps::isNoVerify()) {\n // add special HTTP client which does not require verify of SSL certificates if requested.\n $this->api_client->setHttpClient(new \\GuzzleHttp\\Client(['curl' => [CURLOPT_SSL_VERIFYPEER => FALSE]]));\n }\n }\n return $this->api_client;\n }", "title": "" }, { "docid": "14ff27f7aede47e504389b1d2aa9740d", "score": "0.49118817", "text": "protected function getAuthService()\n {\n return $this->authService;\n }", "title": "" }, { "docid": "06d85776d366d2adfad6b986c6397d3a", "score": "0.4908124", "text": "public function checkAuthentication() {\n if(isset($_SESSION['token'])) {\n $this->google_client->setAccessToken($_SESSION['token']);\n return $google_account = $this->getGoogleAccount();\n } else if(isset($_COOKIE['refresh_token']) && !empty($_COOKIE['refresh_token'])) {\n $refresh_token = $_COOKIE['refresh_token'];\n $this->google_client->refreshToken($refresh_token);\n return $this->getGoogleAccount();\n } else {\n $this->authenticate();\n }\n }", "title": "" }, { "docid": "5c5004c67b894fee5a87393ce9376697", "score": "0.48967585", "text": "public function cloudTasksClient(): CloudTasksClient\n {\n putenv('GOOGLE_APPLICATION_CREDENTIALS='.$this->_keyFilePath);\n\n return new CloudTasksClient();\n }", "title": "" }, { "docid": "a035fbc8085d242b09b2e8659ee2a9c1", "score": "0.48932707", "text": "public function setCredentials(CredentialsInterface $credentials);", "title": "" }, { "docid": "5293dd635fad19a073a548b2db73c125", "score": "0.48854795", "text": "protected function givenIAmNotAuthenticatedAsAdministrator()\n {\n $this->client = $this->createAuthenticatedClient('user', 'secret456');\n }", "title": "" }, { "docid": "bf033a0dfdf4a77eccf136701c3583ca", "score": "0.48833376", "text": "public function initCredentials()\n {\n $this->payeverApi->setUpCredentials(\n $this->encryptor->decrypt($this->config->getClientId()),\n $this->encryptor->decrypt($this->config->getClientSecret()),\n $this->config->getEnvironment(),\n $this->config->getCustomApiUrl()\n );\n }", "title": "" }, { "docid": "95cf1c1f1028f19f0a211c4903a1fb0a", "score": "0.48710567", "text": "abstract public function authenticatedRequest(Google_Http_Request $request);", "title": "" }, { "docid": "d3d62459efe18522d28d5806ef3cd3c7", "score": "0.48679873", "text": "function cs_google_login_action() {\r\n\t\r\n\t\r\n global $wp, $wpdb, $cs_google_settings;\r\n \r\n // include_once plugin_dir_url( __FILE__ ) . '/sdk/init.php';\r\n \r\n \tinclude_once 'sdk/apiClient.php';\r\n\t//echo 'abcdefghijklmnopqrstuvwxyz';\r\n\tinclude_once 'sdk/contrib/apiOauth2Service.php';\r\n\t\r\n\t\r\n\tglobal $cs_theme_options;\r\n\t//$cs_theme_options = get_option('cs_theme_options');\r\n\t\r\n\t$client = new apiClient();\r\n\t$client->setClientId($cs_theme_options['cs_google_client_id']);\r\n\t$client->setClientSecret($cs_theme_options['cs_google_client_secret']);\r\n\t$client->setDeveloperKey($cs_theme_options['cs_google_api_key']);\r\n\t$client->setRedirectUri(cs_google_login_url());\r\n\t$client->setApprovalPrompt('auto');\r\n\t\r\n\t$oauth2 = new apiOauth2Service($client);\r\n \r\n if (isset($_GET['code'])) {\r\n if (isset($cs_google_settings['cs_google_login_redirect_url']) && $cs_google_settings['cs_google_login_redirect_url'] != '' && $cs_google_settings['cs_google_login_redirect_url'] != 'auto') {\r\n $_GET['redirect'] = $cs_google_settings['cs_google_login_redirect_url'];\r\n } else {\r\n\t\t$_GET['redirect'] = cs_google_login_url();\r\n\t}\r\n set_site_transient( cs_google_uniqid().'_google_r', $_GET['redirect'], 3600);\r\n $client->authenticate();\r\n $access_token = $client->getAccessToken();\r\n set_site_transient( cs_google_uniqid().'_google_at', $access_token, 3600);\r\n header('Location: ' . filter_var(cs_google_login_url() , FILTER_SANITIZE_URL));\r\n exit;\r\n }\r\n \r\n $access_token = get_site_transient( cs_google_uniqid().'_google_at');\r\n\r\n if ($access_token !== false) {\r\n $client->setAccessToken($access_token);\r\n }\r\n if (isset($_REQUEST['logout'])) {\r\n delete_site_transient( cs_google_uniqid().'_google_at');\r\n $client->revokeToken();\r\n }\r\n if ($client->getAccessToken()) {\r\n $u = $oauth2->userinfo->get();\r\n\t//var_dump($u);\r\n // The access token may have been updated lazily.\r\n set_site_transient( cs_google_uniqid().'_google_at', $client->getAccessToken(), 3600);\r\n\r\n $email = filter_var($u['email'], FILTER_SANITIZE_EMAIL);\r\n if (!is_user_logged_in()) {\r\n\t\r\n\t $ID = email_exists($email);\t\r\n\t\t\r\n if ($ID == NULL) { // Register\r\n\r\n \r\n if ($ID == false) { // Real register\r\n\r\n //require_once get_template_directory() . WPINC . '/registration.php';\r\n $random_password = wp_generate_password($length = 12, $include_standard_special_chars = false);\r\n if (!isset($cs_google_settings['google_user_prefix'])) $cs_google_settings['google_user_prefix'] = 'Google - ';\r\n $sanitized_user_login = sanitize_user($cs_google_settings['google_user_prefix'] . $u['name']);\r\n if (!validate_username($sanitized_user_login)) {\r\n $sanitized_user_login = sanitize_user('google' . $user_profile['id']);\r\n }\r\n $defaul_user_name = $sanitized_user_login;\r\n $i = 1;\r\n while (username_exists($sanitized_user_login)) {\r\n $sanitized_user_login = $defaul_user_name . $i;\r\n $i++;\r\n }\r\n $ID = wp_create_user($sanitized_user_login, $random_password, $email);\r\n if (!is_wp_error($ID)) {\r\n\t\t\t# Add Role\r\n\t\t\t$new_user = new WP_User( $ID );\r\n\t\t\t$new_user->set_role( 'subscriber' );\t\r\n \r\n\t\t\t# Notification\r\n\t\t\twp_new_user_notification($ID, $random_password);\r\n $user_info = get_userdata($ID);\r\n \r\n\t\t\twp_update_user(array(\r\n 'ID' => $ID,\r\n 'display_name' \t=> $u['name'],\r\n 'first_name' \t=> $u['given_name'],\r\n 'last_name' \t\t=> $u['family_name'],\r\n 'googleplus' \t\t=> $u['link']\r\n ));\r\n \tupdate_user_meta($ID, 'cs_google_default_password', $user_info->user_pass);\r\n \tdo_action('cs_google_user_registered', $ID, $u, $oauth2);\r\n\t\t\t\tupdate_user_meta($ID, 'cs_user_registered', 'google');\r\n } else {\r\n return;\r\n }\r\n }\r\n \r\n if (isset($cs_google_settings['google_redirect_reg']) && $cs_google_settings['google_redirect_reg'] != '' && $cs_google_settings['google_redirect_reg'] != 'auto') {\r\n set_site_transient( cs_google_uniqid().'_google_r', $cs_google_settings['google_redirect_reg'], 3600);\r\n }\r\n }\r\n if ($ID) { \r\n\r\n $secure_cookie = is_ssl();\r\n $secure_cookie = apply_filters('secure_signon_cookie', $secure_cookie, array());\r\n global $auth_secure_cookie; // XXX ugly hack to pass this to wp_authenticate_cookie\r\n\r\n $auth_secure_cookie = $secure_cookie;\r\n wp_set_auth_cookie($ID, true, $secure_cookie);\r\n $user_info = get_userdata($ID);\r\n do_action('wp_login', $user_info->user_login, $user_info);\r\n //do_action('cs_google_user_logged_in', $ID, $u, $oauth2);\r\n update_user_meta($ID, 'google_profile_picture', $u['picture']);\r\n }\r\n } else {\r\n \r\n $user_info = wp_get_current_user();\r\n set_site_transient($user_info->ID.'_cs_google_admin_notice',__('This Google profile is already linked with other account. Linking process failed!', 'directory'), 3600);\r\n \r\n }\r\n } else {\r\n if (isset($cs_google_settings['google_redirect']) && $cs_google_settings['google_redirect'] != '' && $cs_google_settings['google_redirect'] != 'auto') {\r\n $_GET['redirect'] = $cs_google_settings['google_redirect'];\r\n }\r\n if (isset($_GET['redirect'])) {\r\n set_site_transient( cs_google_uniqid().'_google_r', $_GET['redirect'], 3600);\r\n }\r\n \r\n $redirect = get_site_transient( cs_google_uniqid().'_google_r');\r\n \r\n if ($redirect || $redirect == cs_google_login_url()) {\r\n $redirect = site_url();\r\n set_site_transient( cs_google_uniqid().'_google_r', $redirect, 3600);\r\n }\r\n header('LOCATION: ' . $client->createAuthUrl());\r\n exit;\r\n }\r\n cs_google_redirect();\r\n}", "title": "" }, { "docid": "3325ab0ac02150bbcc6be5a1d6aeaa21", "score": "0.48679337", "text": "public function getAuthService()\n {\n return $this->getService('auth');\n }", "title": "" }, { "docid": "67e57183ba56d5b84fbacc65c09e5d27", "score": "0.4855842", "text": "public function getCredentials();", "title": "" }, { "docid": "d2ad6546507ce089cdcd1587413b17a3", "score": "0.48541895", "text": "public function request_filesystem_credentials() {\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "d8dfa6eecd6f410ee8612efb87cbde94", "score": "0.48526913", "text": "public static function emailClientAccountOauthCredentials()\n {\n return new EmailClientAccountOauthCredentialsBuilder(new EmailClientAccountOauthCredentials());\n }", "title": "" }, { "docid": "0dd2cc045a9c4cd1b08dfc743cee1fed", "score": "0.4851829", "text": "function initClient()\n\t{\n\t\t$client = new Google_Client();\n\t\t$client->setApplicationName(env('APP_NAME'));\n\t\t$client->setDeveloperKey(env('GOOGLE_SERVER_KEY'));\n\t\t$client->setClientId(env('GOOGLE_CLIENT_ID'));\n\t\t$client->setClientSecret(env('GOOGLE_APP_SECRET'));\n\n\t\treturn $client;\n\n\t}", "title": "" }, { "docid": "a1f2ecf0ac9f2d70bcda46aa5e4e90ce", "score": "0.4851387", "text": "function getClient()\n{\n $client = new Google_Client();\n $client->setApplicationName('Google Sheets API PHP Quickstart');\n $client->setScopes(Google_Service_Sheets::SPREADSHEETS);\n $client->setAuthConfig('credentials.json');\n $client->setAccessType('offline');\n $client->setPrompt('select_account consent');\n\n // Load previously authorized token from a file, if it exists.\n $tokenPath = 'token.json';\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n\n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n $client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($tokenPath))) {\n mkdir(dirname($tokenPath), 0700, true);\n }\n file_put_contents($tokenPath, json_encode($client->getAccessToken()));\n }\n return $client;\n}", "title": "" }, { "docid": "c0a52ed568d42bc5516806841aa24612", "score": "0.48471993", "text": "public function serviceAccountCredentials(string $serviceAccountCredentials)\n {\n $this->serviceAccountCredentials = $serviceAccountCredentials;\n\n return $this;\n }", "title": "" }, { "docid": "ffbbe021a8d56ad92df9b1e5d774d894", "score": "0.48435628", "text": "function initializeMybusiness()\n{\n\n // Use the developers console and download your service account\n // credentials in JSON format. Place them in this directory or\n // change the key file location if necessary.\n\t$t=\\Yii::getAlias('@app');\n\tputenv('GOOGLE_APPLICATION_CREDENTIALS='.$t.'/client_credentials.json');\n // Create and configure a new client object.\n\t$client = new \\Google_Client();\n\t// $client->useApplicationDefaultCredentials();\n\n\n\n \n $KEY_FILE_LOCATION= $t.'/client_secret_3795.json';\n $client->setApplicationName(\"Hello Google My Business\");\n $client->setAuthConfig($KEY_FILE_LOCATION);\n $client->setDeveloperKey(\"AIzaSyBFc6nb2XH8V2XafIFcSd3U9gs6KjFnW8A\");\n $client->setScopes(['https://www.googleapis.com/auth/business.manage']);\n\n $auth_url = $client->createAuthUrl();\n//die(var_dump($auth_url));\n header('Location: ' . filter_var($auth_url, FILTER_SANITIZE_URL));\n\n die(var_dump('here'));\n /*\n $access_token = $client->getAccessToken();\n $redirect_uri = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'];\n\t$client->setRedirectUri($redirect_uri);\n\tdie(var_dump($access_token));\n $accessToken = $client->fetchAccessTokenWithAuthCode($authCode);\n // $client->addScope(\\Google_Service_Drive::DRIVE);\n // $business = new \\Google_Service_MyBusiness($client);\n die(var_dump($auth_url));\n $accounts = $business->accounts->listAccounts()->getAccounts();\n \n echo '<pre>';\nvar_dump( $accounts );\necho '</pre>';\n\t$httpClient = $client->authorize();\n\n// make an HTTP request\n\t$response = $httpClient->get('https://www.googleapis.com/auth/business.manage');\n\tdie(var_dump($response));\n\t$request=$business->accounts;\n\t$resultsDeferred=$client->execute($request);\n\n\treturn $business;\n*/\n}", "title": "" }, { "docid": "e3897a2e10bb863d9d05d8e7ea69bae5", "score": "0.48250672", "text": "public function get_client() {\n\t\tif ( ! $this->google_client instanceof Google_Site_Kit_Client ) {\n\t\t\t$credentials = $this->credentials->get();\n\n\t\t\t$this->google_client = Client_Factory::create_client(\n\t\t\t\tarray(\n\t\t\t\t\t'client_id' => $credentials['oauth2_client_id'],\n\t\t\t\t\t'client_secret' => $credentials['oauth2_client_secret'],\n\t\t\t\t\t'redirect_uri' => $this->get_redirect_uri(),\n\t\t\t\t\t'token' => $this->get_token(),\n\t\t\t\t\t'token_callback' => array( $this, 'set_token' ),\n\t\t\t\t\t'token_exception_callback' => function( Exception $e ) {\n\t\t\t\t\t\t$this->handle_fetch_token_exception( $e );\n\t\t\t\t\t},\n\t\t\t\t\t'required_scopes' => $this->get_required_scopes(),\n\t\t\t\t\t'login_hint_email' => $this->profile->has() ? $this->profile->get()['email'] : '',\n\t\t\t\t\t'using_proxy' => $this->credentials->using_proxy(),\n\t\t\t\t\t'proxy_url' => $this->google_proxy->url(),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $this->google_client;\n\t}", "title": "" }, { "docid": "1e6321d5bccd6fc0229ca20032af41b4", "score": "0.4821873", "text": "public function loadCredentials($directory_name){\n $return = [\n \"success\" => true,\n \"message\" => null\n ];\n\n // Load previously authorized credentials from a file\n $credentialsPath = \"{$_SERVER['DOCUMENT_ROOT']}/users/{$directory_name}/.credentials/calendar-php-quickstart.json\";\n $accessToken = null;\n\n if (file_exists($credentialsPath)) {\n $accessToken = file_get_contents($credentialsPath);\n\n $this->client->setAccessToken($accessToken);\n\n // Refresh the token if it's expired\n if ($this->client->isAccessTokenExpired()) {\n try {\n $this->client->refreshToken($this->client->getRefreshToken());\n }catch(Google_Auth_Exception $e){\n $return[\"success\"] = false;\n $return[\"message\"] = $e->getMessage();\n }\n\n file_put_contents($credentialsPath, $this->client->getAccessToken());\n }\n }else{\n $return[\"success\"] = false;\n $return[\"message\"] = \"Credentials file no exists\";\n }\n\n return $return;\n }", "title": "" }, { "docid": "e9fbd27edae0f9e1726c7c9695cbbc66", "score": "0.4810955", "text": "public function __construct(GoogleService $googleService)\n {\n $this->middleware('guest')->except('logout');\n $this->googleService = $googleService;\n }", "title": "" }, { "docid": "780b4193071897fe7f3cc4f754acf2cd", "score": "0.4808203", "text": "function youtube_authenticate()\n{\n global $global;\n\n $developerkey=$global->config['youtube_developer_key'];\n\n\n $authenticationURL= 'https://www.google.com/youtube/accounts/ClientLogin';\n $httpClient = Zend_Gdata_ClientLogin::getHttpClient(\n $username = $global->config['youtube_username'],\n $password = $global->config['youtube_password'],\n $service = 'youtube',\n $client = null,\n $source = 'multimedia', // a short string identifying your application\n $loginToken = null,\n $loginCaptcha = null,\n $authenticationURL);\n\n\n $httpClient->setHeaders('X-GData-Key', \"key=${developerkey}\");\n\n $global->httpclient=$httpClient;\n\n}", "title": "" }, { "docid": "6b693f50070e07f77d23172df2a98d1d", "score": "0.47944304", "text": "private function setCredentials()\n\t{\n\t\t$this->credentials['api_key'] = $this->settings_repo->getSiteSetting('twitter', 'api_key');\n\t\t$this->credentials['api_secret'] = $this->settings_repo->getSiteSetting('twitter', 'api_secret');\n\t\t$this->credentials['access_token'] = $this->settings_repo->getSiteSetting('twitter', 'access_token');\n\t\t$this->credentials['access_token_secret'] = $this->settings_repo->getSiteSetting('twitter', 'access_token_secret');\n\t}", "title": "" }, { "docid": "c359b73d08bc05142c3a30f378f31e2b", "score": "0.47900498", "text": "public function getGoogleAccessToken()\n {\n return $this->googleAccessToken;\n }", "title": "" }, { "docid": "8591aaaeb785035e1b535e4608cf9252", "score": "0.4783168", "text": "public function getCredential()\n {\n return $this->credential;\n }", "title": "" }, { "docid": "b2e4635152d75f22b7fc97e5d6f9270b", "score": "0.47785842", "text": "function syncGdrive($lastSync)\r\n {\r\n $GLOBALS['log']->fatal('*********syncGdrive-START**********');\r\n $jsonCredentials = $this->auth_handler->getStoredCredentials($this->userID);\r\n if ($jsonCredentials) {\r\n $oauthCredentials = $this->auth_handler->getOauth2Credentials($jsonCredentials);\r\n $this->google_client->setAccessToken($oauthCredentials->toJson());\r\n if ($this->google_client->getAccessToken()) {\r\n $this->drive_service = new Google_DriveService($this->google_client);\r\n $this->google_client->setUseObjects(true);\r\n $ids = array();\r\n if ($this->prefrences[\"schedulers\"][\"documents_google\"] == true) {\r\n $GLOBALS['log']->fatal('GOOGLE-TO-SUGAR');\r\n $ids = DriveHelper::updateFromGoogle($this->drive_service, $this->userID, $lastSync);\r\n }\r\n if ($this->prefrences[\"schedulers\"][\"documents_sugar\"] == true) {\r\n $GLOBALS['log']->fatal('SUGAR-TO-GOOGLE');\r\n $beans = DriveHelper::retrieveUpdatedFromSugar($this->userID, $lastSync, $ids);\r\n DriveHelper::sendUpdatedToGoogle($this->drive_service, $beans);\r\n }\r\n } else {\r\n $GLOBALS['log']->fatal(\"error occured while getting access token for userID: \" . $this->userID);\r\n }\r\n } else {\r\n $GLOBALS['log']->fatal(\"No google auth credentials saved for userID : \" . $this->userID);\r\n }\r\n\r\n $GLOBALS['log']->fatal('*********syncGdrive-END**********');\r\n }", "title": "" }, { "docid": "261a3246c867b6656f43d9d99a908a28", "score": "0.4778423", "text": "public function MigrateD8ServiceCredentialsConfig();", "title": "" }, { "docid": "bea79199a91b5868d9ed4e76e7f41486", "score": "0.47746885", "text": "public function __construct()\n {\n $client_id = Config::get('google.client_id');\n $service_account_name = Config::get('google.service_account_name');\n $key_file_location = base_path() . Config::get('google.key_file_location');\n $application_name = base_path() . Config::get('google.application_name');\n $this->projectID = Config::get('google.default_project_id');\n $this->queryTimeout = Config::get('google.query_timeout');\n $this->queryTimeoutIncrement = Config::get('google.query_timeout_increment');\n\n $this->client = new \\Google_Client();\n $this->client->setApplicationName($application_name);\n $this->service = new \\Google_Service_Bigquery($this->client);\n\n //@TODO: determine how the cache works\n if (Cache::has('service_token')) {\n $this->client->setAccessToken(Cache::get('service_token'));\n }\n\n $key = file_get_contents($key_file_location);\n \n $scopes = array('https://www.googleapis.com/auth/bigquery');\n $cred = new \\Google_Auth_AssertionCredentials(\n $service_account_name,\n $scopes,\n $key\n );\n\n $this->client->setAssertionCredentials($cred);\n if ($this->client->getAuth()->isAccessTokenExpired()) {\n $this->client->getAuth()->refreshTokenWithAssertion($cred);\n }\n Cache::forever('service_token', $this->client->getAccessToken());\n }", "title": "" }, { "docid": "2d6a101110c772b93f41e43a3c93e06e", "score": "0.477392", "text": "public function authenticate() {\n $this->token = $this->client->getAccessToken('authorization_code',\n ['code' => $_GET['code']]);\n }", "title": "" }, { "docid": "c05935600921ccdb6d6af1c3f9ef8cbe", "score": "0.47737664", "text": "public function connectGoogleDrive()\n {\n session()->put('gdrive_redirect', action('SettingsController@settings'));\n\n return redirect(action('GoogleDriveController@callback'));\n }", "title": "" }, { "docid": "c957f6bd0bf93d38ca614b2a40d9e4ce", "score": "0.4745554", "text": "protected static function getFacadeAccessor() { return 'oauth'; }", "title": "" }, { "docid": "7ced3640b17e1db7944634ea878cd12f", "score": "0.47425196", "text": "public function getOAuth2Credential();", "title": "" }, { "docid": "c4b13e3c9ab6d44c9bbc907ca0b59520", "score": "0.47355595", "text": "function __construct()\n {\n \n try {\n $tmpclnt = $this->getClient();\n } catch (\\Exception $e) {\n $tmpclnt = $this->client;\n }\n\n $this->client = $tmpclnt;\n $this->service = new Google_Service_YouTube($this->client);\n }", "title": "" }, { "docid": "6106548352173139a4b20353466b5c81", "score": "0.47316435", "text": "public function setAuthenticationService(Authentication\\AuthenticationService $auth)\n {\n $this->_authenticationService = $auth;\n }", "title": "" }, { "docid": "69e4680bd9af8e5d78194dfcb9e246a5", "score": "0.4727995", "text": "protected static function getFacadeAccessor() { return 'GoogleAPI'; }", "title": "" }, { "docid": "57cbeefcab753f2313e10cbb01f6922c", "score": "0.4702783", "text": "private function _authenticate($apiKeyFile = null, $apiClientEmail = null)\n {\n $googleSdkSrc = __DIR__.DIRECTORY_SEPARATOR.\"Sdk\".DIRECTORY_SEPARATOR.\"src\";\n $googleSdkSrc = realpath($googleSdkSrc);\n $googleClientFile = $googleSdkSrc . DIRECTORY_SEPARATOR . \"Google\" . DIRECTORY_SEPARATOR . \"Client.php\";\n set_include_path(get_include_path() . PATH_SEPARATOR . $googleSdkSrc);\n require_once($googleClientFile);\n\n if ($apiKeyFile)\n {\n if (file_exists($apiKeyFile))\n {\n $this->_apiKeyFile = $apiKeyFile;\n } else {\n throw new \\Exception(\"Cannot connect to google merchant api because the api key file is invalid\");\n }\n }\n if ($apiClientEmail)\n {\n $this->_apiClientEmail = $apiClientEmail;\n }\n\n $client = null;\n if ($this->_apiKeyFile && $this->_apiClientEmail)\n {\n $private_key = file_get_contents($this->_apiKeyFile);\n $scopes = array('https://www.googleapis.com/auth/content');\n $credentials = new \\Google_Auth_AssertionCredentials(\n $this->_apiClientEmail,\n $scopes,\n $private_key\n );\n $client = new \\Google_Client();\n $client->setAssertionCredentials($credentials);\n }\n return $client;\n }", "title": "" }, { "docid": "106792724b0e8a3b8a4fc4e98bad7965", "score": "0.46973854", "text": "public function add_creds() {\r\n\t\tadd_filter( 'request_filesystem_credentials', array( $this, 'maybe_set_cred' ), 10, 7 );\r\n\t}", "title": "" }, { "docid": "95fa31efe8c14dee5fb59d124b207ccd", "score": "0.46960175", "text": "protected function authenticate() {\n // test authentication by listing containers\n $headers = array('date' => gmdate(self::SIGNATURE_DATE_FORMAT));\n $headers['Authorization'] = $this->sign('GET', $headers);\n $request = array('method' => 'GET', 'url' => $this->getUrl(), 'headers' => $headers);\n $success = NULL;\n if ($result = $this->curl(array($request))) {\n $success = $result['status'][0] == 200 || $result['status'][0] == 404;\n EncodingUtil::log(sprintf('GET Service request completed - status %d. Authentication was%s successful', $result['status'][0], $success ? '' : ' not'), 'GoogleObjectStorageController::authenticate', __LINE__);\n }\n else EncodingUtil::log(sprintf('GET Service request failed'), 'GoogleObjectStorageController::authenticate', __LINE__, TRUE);\n return $success;\n }", "title": "" }, { "docid": "32288c46212b20aac5905cacfa4690f5", "score": "0.4692206", "text": "protected function givenIAmAuthenticatedAsAdministrator()\n {\n $this->client = $this->createAuthenticatedClient('administrator', 'secret123');\n }", "title": "" }, { "docid": "f22383e9e7be679aaa71abaddb1c1fb2", "score": "0.4684186", "text": "private function _authorise()\n\t{\n\t\t$url = $this->getOption('authoriseURL') . '?oauth_token=' . $this->token['key'];\n\n\t\tif ($this->getOption('scope'))\n\t\t{\n\t\t\t$scope = is_array($this->getOption('scope')) ? implode(' ', $this->getOption('scope')) : $this->getOption('scope');\n\t\t\t$url .= '&scope=' . urlencode($scope);\n\t\t}\n\n\t\tif ($this->getOption('sendheaders'))\n\t\t{\n\t\t\t$this->application->redirect($url);\n\t\t}\n\t}", "title": "" }, { "docid": "2a49d4b34ee0b4916854f3bfd3b881cf", "score": "0.4666754", "text": "public function __construct(Google_Client $client)\n {\n $this->client = $client;\n }", "title": "" } ]
6cd942e313318b8eadc18b52ff64bf81
Clear the notification from the students notification list after reading
[ { "docid": "eff91d71c1b1696bfd1af30987d90c7d", "score": "0.66114545", "text": "public function clearNotification()\n {\n $notificationID = Input::get('clearNotif');\n //dd($notificationID);\n\n Notifynder::delete($notificationID);\n\n //\\Session::flash('flash_message','You deleted the notification successfully');\n return redirect('studentdashboard');\n\n }", "title": "" } ]
[ { "docid": "4564968d03ddf5845374c0e6942afd6e", "score": "0.7078658", "text": "public function actionClearNotifications() {\n $userId = Yii::$app->user->identity->student_id;\n\n //If User logged in, clear his notifications\n if ($userId) {\n //$user = \\common\\models\\Employer::findOne((int) $identity->employer_id);\n \\common\\models\\NotificationStudent::updateAll([\n 'notification_viewed' => \\common\\models\\NotificationStudent::VIEWED_TRUE,\n ], [\n 'student_id' => $userId,\n ]);\n }\n\n //return to previous page after clearing notifications\n return $this->redirect(Yii::$app->request->referrer);\n }", "title": "" }, { "docid": "41cf57a8fb69f93f588b0956b1b57415", "score": "0.67960507", "text": "public function reset()\n\t{\n\t\t$this->notifications = [];\n\t}", "title": "" }, { "docid": "6aa4ffd6965957164503a9479c07f9fb", "score": "0.66565365", "text": "public function clearStatmsgs()\n\t{\n\t\t$this->collStatmsgs = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "b14a2ddf8c89a10fa76b904f75081413", "score": "0.6596036", "text": "function cleanNotifyList() { /* {{{ */\n\t\t// If any of the notification subscribers no longer have read access,\n\t\t// remove their subscription.\n\t\tif (empty($this->_notifyList))\n\t\t\t$this->getNotifyList();\n\n\t\t/* Make a copy of both notifier lists because removeNotify will empty\n\t\t * $this->_notifyList and the second foreach will not work anymore.\n\t\t */\n\t\t/** @var mediarepo_Core_User[] $nusers */\n\t\t$nusers = $this->_notifyList[\"users\"];\n\t\t$ngroups = $this->_notifyList[\"groups\"];\n\t\tforeach ($nusers as $u) {\n\t\t\tif ($this->getAccessMode($u) < M_READ) {\n\t\t\t\t$this->removeNotify($u->getID(), true);\n\t\t\t}\n\t\t}\n\n\t\t/** @var mediarepo_Core_Group[] $ngroups */\n\t\tforeach ($ngroups as $g) {\n\t\t\tif ($this->getGroupAccessMode($g) < M_READ) {\n\t\t\t\t$this->removeNotify($g->getID(), false);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "77d0f063ddefb961e274f47b7973c9c4", "score": "0.63563544", "text": "public function remove_notifications()\n {\n $this->addchat_lib->remove_notifications();\n }", "title": "" }, { "docid": "60078e8cc97753637617a3b943d785f4", "score": "0.62342125", "text": "public function clearStudentFrees()\n\t{\n\t\t$this->collStudentFrees = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "ab85a420d92177d53a1f86477c12695f", "score": "0.6195502", "text": "public function clearStudentAttendances()\n\t{\n\t\t$this->collStudentAttendances = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "eacf6f5a4986bdf4e5202208c5e1b718", "score": "0.6190062", "text": "public function clearNotificationFlags()\r\n {\r\n $this->oos_notified = false;\r\n $this->timed_oos_notified = false;\r\n $this->low_stock_notified = false;\r\n return $this->save();\r\n }", "title": "" }, { "docid": "9bb0615b51a44da9bbb78fd045c9cdae", "score": "0.6184489", "text": "function reset_notifications();", "title": "" }, { "docid": "a8327396ba343ee2b373da4f103b71d5", "score": "0.61675996", "text": "public function clear()\n {\n $this->messages = array();\n }", "title": "" }, { "docid": "94d15bb1710a48f1ecea6fe0f5f53b3f", "score": "0.61414987", "text": "public function clear()\n {\n $this->messages = [];\n }", "title": "" }, { "docid": "6f41314125a2e78ba0a64f1dd66afa07", "score": "0.61146617", "text": "private function remove_notification() {\n\t\t$notification_center = Yoast_Notification_Center::get();\n\t\t$notification_center->remove_notification( $this->get_notification() );\n\t}", "title": "" }, { "docid": "2c19f13bc1331bc40225265d3ad229be", "score": "0.5955694", "text": "public function actionNotificated()\n {\n Notification::deleteAll(['id_receiver' => Yii::$app->user->id]);\n }", "title": "" }, { "docid": "332f9789fa98aa42ee58b4021ae088cb", "score": "0.5943959", "text": "public function resetMessagesAll(){\r\n foreach($this->messages as $key => $message){\r\n unset($this->messages[$key]);\r\n }\r\n }", "title": "" }, { "docid": "a928e9c8ae530c7d6c5d2f4a7d9b7f06", "score": "0.59147346", "text": "protected function clearMails() {\n $this->container->get('state')->delete('system.test_mail_collector');\n }", "title": "" }, { "docid": "9a20f9439f928b7b0fab43e8197e56da", "score": "0.58476686", "text": "public function destroy(StudentsNotification $studentsNotification)\n {\n //\n }", "title": "" }, { "docid": "158fea26da01769b38112151550e0135", "score": "0.573418", "text": "abstract public function clearMessages();", "title": "" }, { "docid": "bbf6608b5c45fa196d7880dd1246bac6", "score": "0.5685487", "text": "public function clearItens() {\n\t\t$this->itens = array();\n\t}", "title": "" }, { "docid": "e95de3ee87e28d46bf6325cc63331e30", "score": "0.5678512", "text": "public function unread($notification);", "title": "" }, { "docid": "d0c94423d721bd00864f3908658b3c20", "score": "0.5667122", "text": "public function flush_msg() {\r\n\t\t$this->message_list = '';\r\n\t}", "title": "" }, { "docid": "ea8b4fcaeb009614f0a07eab7e5c38bc", "score": "0.56436974", "text": "public function reset()\n {\n $this->data = array(\n 'recipients' => array()\n );\n }", "title": "" }, { "docid": "166f888f592132517e2a1c71afe10746", "score": "0.5638447", "text": "function clearSM(){\n\t\tif(isset($_SESSION[\"message\"])){\n\t\t\t$_SESSION[\"message\"] = null;\n\t\t}\n\t}", "title": "" }, { "docid": "54d13309d40fb7eb28f5644f20ceaf58", "score": "0.5634191", "text": "function clear_suppressed_messages() {\n\t\t\t$this->user_suppress = array( 'sticky_messages' => array(), 'messages' => array() );\n\t\t\t$this->save_suppressed_messages();\n\t\t}", "title": "" }, { "docid": "803f0d4a2f6c17373309ae4c1bfe19b8", "score": "0.56292623", "text": "public function remove_guest_notifications()\n {\n $this->addchat_lib->remove_guest_notifications();\n }", "title": "" }, { "docid": "c8bf9191366e3166d68ed8749f154798", "score": "0.5618855", "text": "public function clearRecordedEvents();", "title": "" }, { "docid": "b909782b1ba20d186646e19b5a2beb06", "score": "0.5610715", "text": "function _flashdata_sweep()\r\n {\r\n $userdata = $this->all_userdata();\r\n foreach ($userdata as $key => $value)\r\n {\r\n if (strpos($key, ':old:'))\r\n {\r\n $this->unset_userdata($key);\r\n }\r\n }\r\n\r\n }", "title": "" }, { "docid": "40d5ca294a7abdb7234239225c12e23a", "score": "0.55980283", "text": "private function _flashdataSweep()\n {\n $userdata = $this->getAllData();\n\n foreach ($userdata as $key => $value) {\n if (strpos($key, ':old:')) {\n $this->remove($key);\n }\n }\n }", "title": "" }, { "docid": "f7dca2d0601bce839368ec3e4e5d7329", "score": "0.5588675", "text": "public function reset(): void\n {\n $this->messages = [];\n }", "title": "" }, { "docid": "d360e5f7d34e73f12c9b12346056101e", "score": "0.5579772", "text": "function unsetInfo()\n\t{\n\t\tif(isset($_SESSION[\"infoMessages_persistCount\"]) && $_SESSION[\"infoMessages_persistCount\"] > 0)\n\t\t{\n\t\t\t$_SESSION[\"infoMessages_persistCount\"] = $_SESSION[\"infoMessages_persistCount\"] - 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Remove any lingering errors\n\t\t\tunset($_SESSION[\"infoMessages\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "9b1cc61a90522247caad0f58f9175aed", "score": "0.55786073", "text": "public function clearForNewMessage () {\n $this->callback_id = NULL;\n }", "title": "" }, { "docid": "c066e207ef2fef9e2e261f00cdb305c9", "score": "0.55721265", "text": "public static function queue_reset() {\n db_query(\"DELETE FROM {notifications_queue}\");\n db_query(\"DELETE FROM {notifications_event}\");\n }", "title": "" }, { "docid": "566a75db03d02d652e9eec4e1b84b3b0", "score": "0.55710405", "text": "public function retrieveNotifications();", "title": "" }, { "docid": "d5a6c09df14a54f0c70b28afcdc07edb", "score": "0.55625707", "text": "function clear_notices($category = null){\n $notices = $this->get_notices();\n\t if(!is_array($notices)){\n\t\t $notices = []; //Correct data if broken\n\t }\n if(isset($category)){\n foreach($notices as $k => $notice){\n if($notice['category'] == $category){\n unset($notices[$k]);\n }\n }\n }else{\n $notices = array();\n }\n\n $this->notices = $notices;\n $this->update_notices($notices);\n }", "title": "" }, { "docid": "e0829bb21d73bb3051f4f3f4d1c17d94", "score": "0.5447319", "text": "function markUnread();", "title": "" }, { "docid": "e36fb2fa86fc722a7baa211fbd392af4", "score": "0.54447323", "text": "public function reset()\n {\n $this->values[self::_SAY] = null;\n $this->values[self::_FRESH] = null;\n $this->values[self::_FETCH] = null;\n $this->values[self::_CHAT_ADD_BL] = null;\n $this->values[self::_CHAT_DEL_BL] = null;\n $this->values[self::_CHAT_FETCH_BL] = null;\n $this->values[self::_CHAT_BROAD_SAY] = null;\n }", "title": "" }, { "docid": "d92dd207bf33e0150c31118877b42d20", "score": "0.5444245", "text": "public function clear() {\n $this->items = [];\n $this->write();\n }", "title": "" }, { "docid": "0d2305f84e1a40d7ef96f3ae3d236cad", "score": "0.54348826", "text": "function clear()\n\t\t{\n\t\t\t$this->messages\t\t=\tarray();\n\t\t\t$this->num_messages\t=\t0;\n\t\t\t$this->has_errors\t=\tfalse;\n\t\t}", "title": "" }, { "docid": "70a822906ab5fb5f40868ac071ff72c9", "score": "0.54305714", "text": "protected function resetNotifier()\n {\n //\n }", "title": "" }, { "docid": "c140f6edffa0a6df082321a655fd3a92", "score": "0.5427523", "text": "public function clearEvents()\n {\n $this->initStream();\n $this->stream->flush();\n }", "title": "" }, { "docid": "2a29d0d1c868bc8e8f6c55105a89daf8", "score": "0.5415748", "text": "public function inbox_removedata() {\n\t\t$inbox_id = $this->input->post('inbox_id');\t\n\t\techo $this->job_seeker_model->job_seeker_inbox_removedata($inbox_id);\n\t}", "title": "" }, { "docid": "371d936c63ccaff99e62fa587a258784", "score": "0.54148656", "text": "public function clearData(){\n\t\t\t$this->data = array();\n\t\t}", "title": "" }, { "docid": "64cd783e1f3ffcaafa42bcb6e2f84fd7", "score": "0.5382436", "text": "public function markAsUnread()\n {\n if (!is_null($this->read_at)) {\n $this->forceFill(['read_at' => null])->save();\n }\n }", "title": "" }, { "docid": "05c5aa476cf3f5dff04ce4d390f0d980", "score": "0.5377893", "text": "public function reset()\n {\n $this->values[self::STATE_UPDATE_HEADER] = null;\n $this->values[self::CONVERSATION] = null;\n }", "title": "" }, { "docid": "0456277819ed3ddc54d54dc06927eff3", "score": "0.5368393", "text": "public function clear() {\n\t\t$this->data = array();\n\t}", "title": "" }, { "docid": "11f5fbd5e2778818f46b303e003c7c84", "score": "0.5366897", "text": "public function actionEliminarNotificaciones()\n\t{\n\t\t$usrnotif = Usrnotif::model()->findAllByAttributes(array('usuarios_id_usuario' => Yii::app()->user->usIdent));\t\n\t\t$trans = Yii::app()->db->beginTransaction();\n\t\ttry{\n\t\t\tforeach($usrnotif as $not){\n\t\t\t\tif(!$not->leido){\n\t\t\t\t\t$not->leido = !$not->leido;\n\t\t\t\t\t$not->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$trans->commit();\n\t\t} catch(Exception $e) {\n\t\t\t$trans->rollback();\n\t\t}\n\t\t\n\t\t$this->redirect(array('notificaciones/index'));\n\t}", "title": "" }, { "docid": "4ad7fa14d032b71bba18a3317e982f19", "score": "0.53541815", "text": "protected static function broadcastDeleteAll()\n {\n if (static::$blnWatchChanges) {\n \\QCubed\\Project\\Watcher\\Watcher::markTableModified (static::getDatabase()->Database, 'tourist');\n }\n\t}", "title": "" }, { "docid": "305959707cfba47ceb0efdf96358462d", "score": "0.5346583", "text": "public function clear_log_data() {\n\t\t$this->log_data = array();\n\t}", "title": "" }, { "docid": "6478a7b6bd489549788cc17217c29c60", "score": "0.5320734", "text": "public function initStatmsgs()\n\t{\n\t\t$this->collStatmsgs = array();\n\t}", "title": "" }, { "docid": "13fdf2599662229cea9d321d9dc4fd2d", "score": "0.5319609", "text": "public function flush_warning() {\r\n\t\t$this->warning_list = '';\r\n\t}", "title": "" }, { "docid": "587a3c225cd038f3bb64b52633423d23", "score": "0.5313791", "text": "function set_last_sent_notif_all($dados_notif) {\n $ja_notificado = $this->get_sent_user_in_course($dados_notif['id_curso'], $dados_notif['id_aluno']);\n if ($ja_notificado) {\n $this->db->where('id_notificacao', $ja_notificado['id_notificacao']);\n $this->db->update('cert_log_notificacao', $dados_notif);\n } else {\n $this->db->insert('cert_log_notificacao', $dados_notif);\n }\n }", "title": "" }, { "docid": "35ce1219ebb8d7b5c55455f3ac39def4", "score": "0.5309248", "text": "public function clearDataForUnprivilegedUsers()\n {\n $this->instructionalNotes = null;\n $this->clearDataForDraftOrScheduledEvent();\n $this->removeMaterialsInDraft();\n array_walk($this->learningMaterials, function (UserMaterial $lm) {\n $lm->clearMaterial();\n });\n }", "title": "" }, { "docid": "2d10f60cb02630756ba447111979a3c6", "score": "0.5306763", "text": "public function clear()\n {\n $this->data = array();\n }", "title": "" }, { "docid": "9b57d618447a91ffdec0a797485f7e5f", "score": "0.5306014", "text": "public function unsetNotificationDetails($index)\n {\n unset($this->notificationDetails[$index]);\n }", "title": "" }, { "docid": "ee40dddaf50006d4bd86bc4b974d0fc5", "score": "0.53038687", "text": "public static function clear() : void {\n self::$persons = array();\n }", "title": "" }, { "docid": "725eaf2df0ad84e98654695a6090601e", "score": "0.52960294", "text": "public function index(){\n\n if(Auth::user()->getnotificationstrue->count() > 0)\n {\n $notifavalider = Auth::user()->getnotificationstrue;\n\n foreach($notifavalider as $notif)\n {\n $notif->afficher = false;\n $notif->save();\n }\n }\n\n return view('front.notifications');\n }", "title": "" }, { "docid": "19d5f88bf70d84724bb6079a993505be", "score": "0.5294729", "text": "public static function clear() {\n\t\ttry {\n\t\t\t// Not using TRUNCATE, because that needs extra permissions,\n\t\t\t// which maybe not granted to the database user.\n\t\t\t$dbw = wfGetDB( DB_MASTER );\n\t\t\t$dbw->delete( 'msg_resource', '*', __METHOD__ );\n\t\t\t$dbw->delete( 'msg_resource_links', '*', __METHOD__ );\n\t\t} catch ( Exception $e ) {\n\t\t\twfDebug( __METHOD__ . \" failed to update DB: $e\\n\" );\n\t\t}\n\t}", "title": "" }, { "docid": "daca29063b5d1383acecfbb11037ee2c", "score": "0.5293196", "text": "public function clear() {\r\n $_SESSION['flash'] = null;\r\n }", "title": "" }, { "docid": "38e9e2abc1f2fd9742d9a1f1d77e6403", "score": "0.52899367", "text": "protected function hide_notifications()\n {\n // Call admin model\n $this->callModel();\n\n $this->model->hide_notifications();\n }", "title": "" }, { "docid": "d0181beeaf56417ff005ed9bc11f4a30", "score": "0.52785516", "text": "public static function MatchedClear() {\n $ids = self::get_array('id');\n $session = CRM_Core_Session::singleton();\n $userId = $session->get('userID');\n $success = true;\n\n foreach ($ids as $messageId) {\n $msg = self::getFullMessage($messageId);\n if ($msg) {\n $query = \"\n UPDATE nyss_inbox_messages\n SET status = \".self::STATUS_CLEARED.\", matcher = $userId\n WHERE id = $messageId\n \";\n CRM_Core_DAO::executeQuery($query);\n }\n else {\n $success = false;\n }\n }\n\n if ($success) {\n self::exitSuccess('Cleared messages');\n }\n else {\n self::exitError('Unable to clear all messages');\n }\n }", "title": "" }, { "docid": "8021e3abf9b12160ca55f0af212197a9", "score": "0.5266466", "text": "function empty_all() {\n\t\tif($this->session->userdata(\"customer_id\")==\"\"){\n\t\t\tredirect(base_url().\"index\");\n\t\t}\n\t\telse {\n\t\t\t$user_type=$this->session->userdata(\"user_type\");\t\n\t\t\t$customer_id=$this->session->userdata(\"customer_id\");\n\t\t\t$update = ['notifications_num' => 0];\n\t\t\t$this->db->update('customers',$update,array('id'=>$customer_id));\n\t\t//\t$update_notfy = ['view' =>'1'];\n\t\t//\t$this->db->update('notifications',$update_notfy,array('customer_id'=>$customer_id));\n\t\t}\n\t\n}", "title": "" }, { "docid": "74f192fbb3c73605fa7ec17788e12632", "score": "0.52623", "text": "public function resetVerification()\n {\n EmailVerification::join('subscribers', 'subscribers.id', '=', 'email_verifications.subscriber_id')\n ->where('mail_list_id', $this->id)\n ->delete();\n }", "title": "" }, { "docid": "d78dbd295cf5c9dd8b1df9add8dd5fac", "score": "0.5261148", "text": "public function reset()\n {\n $this->values[self::REQUEST_HEADER] = null;\n $this->values[self::ANNOTATION] = array();\n $this->values[self::MESSAGE_CONTENT] = null;\n $this->values[self::EXISTING_MEDIA] = null;\n $this->values[self::EVENT_REQUEST_HEADER] = null;\n }", "title": "" }, { "docid": "47d809ea8d2dcbd0a1a3afe60771aa67", "score": "0.5260418", "text": "public function getUnreadNotificationPerStudent(){\n\t\t$status = 0;\n\t\t$getUnreadNotificationPerStudent = $this->dbCon->Prepare(\"SELECT id, notification, date_sent, username, status\n\t\tFROM notifications WHERE students_student_no =? AND status =? ORDER BY date_sent DESC\");\n\t\t$getUnreadNotificationPerStudent->bindParam(1, $_SESSION['user']['username']);\n\t\t$getUnreadNotificationPerStudent->bindParam(2, $status);\n\t\t$getUnreadNotificationPerStudent->execute();\n\t\t\n\t\tif($getUnreadNotificationPerStudent->rowCount()>0){\n\t\t\t$rows = $getUnreadNotificationPerStudent->fetchAll();\n\t\t\treturn $rows;\n\t\t}\n\t}", "title": "" }, { "docid": "bb6277563465a8e18a2fdcf8f178b083", "score": "0.526032", "text": "public function clear(): void\n {\n if (isset($_SESSION[self::STATISTIC_KEY])) {\n unset($_SESSION[self::STATISTIC_KEY]);\n }\n }", "title": "" }, { "docid": "9ceeaf8546eb8039bfff1eea38007535", "score": "0.52587163", "text": "public static function reset()\n {\n EventListenerListItem::$counter = 0;\n }", "title": "" }, { "docid": "8e1359dac815d889dedb6abf8609412b", "score": "0.52583915", "text": "public function remove_unread_status($id){\t\t\n\t\t$this->TskAssignRead->deleteAll(array('tsk_assign_id' => $id), false);\n\t}", "title": "" }, { "docid": "73badd07ae45186ca5bc0b30d5214980", "score": "0.52577466", "text": "public function clearMessages()\n {\n $this->_messageQueue = array();\n }", "title": "" }, { "docid": "14d83b2045cafb3620e9df3304176392", "score": "0.52546686", "text": "public function reset(): void {\n $this->stream = null;\n $this->uid_cache = [];\n }", "title": "" }, { "docid": "d513e554cd2629aab8bc9f0e1c77c7cf", "score": "0.52458185", "text": "private function markFlashDataForDeletion()\n {\n foreach ($this->userData as $variable => $value) {\n if ($variable[0] == '@') {\n $this->killList[] = $variable;\n }\n }\n }", "title": "" }, { "docid": "ff16f447c7ae80ff0c5b3a9ecc9ce228", "score": "0.52444696", "text": "protected static function removeAllFlashMessagesFromSession()\n {\n self::getUserByContext()->setAndSaveSessionData('module.sync.flashMessages', NULL);\n }", "title": "" }, { "docid": "bb5b580aae48aaac4c6144072a72b581", "score": "0.52419645", "text": "public function reset()\n {\n $this->values[self::_MINE_ID] = null;\n $this->values[self::_APPLIER_UID] = null;\n }", "title": "" }, { "docid": "11dfe1f7e075a8ff13cee34159eb870c", "score": "0.52386767", "text": "function clear()\n {\n $this->data = array();\n }", "title": "" }, { "docid": "0521b2e02a8f894ac8dd6d5e844d3b08", "score": "0.5232671", "text": "public function clearUserTranslation()\n\t{\n\t\t$this->translations[0] = null;\n\t}", "title": "" }, { "docid": "ab863bda40b82d7ba361b3714b22c134", "score": "0.52292335", "text": "public function clear()\n {\n\n $this->items = array();\n }", "title": "" }, { "docid": "3fa57c8bd3964037678465d3202154ce", "score": "0.5225666", "text": "public function read_notification(Request $request)\n\t{\n\t $notif_id = $request->input('notification_id');\n\n\t $statusRead = [\n\t \t'status' => 1\n\t ];\n\t $newNotifications = Notification::where('id', $notif_id)->update($statusRead);\n\n\t}", "title": "" }, { "docid": "09b35de53aa522314b0439bb56945fcd", "score": "0.52182513", "text": "public function clearSeniorLineups()\n\t{\n\t\t$this->lineups = array();\n\t}", "title": "" }, { "docid": "84ffdd00acf3d48e9f1f150a6f6c1e15", "score": "0.52137786", "text": "public function clear()\n {\n $this->items = array();\n }", "title": "" }, { "docid": "5652f50edb0f287400eb77b1fe5bdd4f", "score": "0.521034", "text": "function clear_sticky_messages() {\n\t\t\t$this->sticky_messages = array();\n\t\t\tdelete_transient( 'wordpress_flash_sticky_messages' );\n\t\t}", "title": "" }, { "docid": "fef3312910f2ad72f38022835b3d91b1", "score": "0.5205237", "text": "public function markNotificationsAsRead(){\n $this->update([\n 'notifications_last_read_at' => Carbon::now()\n ]);\n }", "title": "" }, { "docid": "4088860478bafe6d1c37eb4a4a0172c7", "score": "0.5194546", "text": "public static function clearMessage(): void{\n $_SESSION['message'] = [];\n }", "title": "" }, { "docid": "e59bf9c107dbb36944afa78d14f5a000", "score": "0.5186785", "text": "function clearAuditLog()\n {\n $this->_auditLog = array();\n }", "title": "" }, { "docid": "7bc72f5d705fbc910d31901f80af35a4", "score": "0.51857424", "text": "public function clearSeniorMatchesDetails()\n\t{\n\t\t$this->matchesDetails = array();\n\t}", "title": "" }, { "docid": "0294e475e9585927fa365fd496f0ef35", "score": "0.5184512", "text": "public function clearChanges()\n {\n $this->changes = [];\n }", "title": "" }, { "docid": "ad58dff57ab1e9a42d58b69107846339", "score": "0.5175877", "text": "public function clear()\n {\n $this->items = [];\n }", "title": "" }, { "docid": "ad58dff57ab1e9a42d58b69107846339", "score": "0.5175877", "text": "public function clear()\n {\n $this->items = [];\n }", "title": "" }, { "docid": "878150897f3666d36fe3d822d7f85fdf", "score": "0.5170362", "text": "public function notifications()\n {\n }", "title": "" }, { "docid": "70ab009c7c6786acf40dceb6655435af", "score": "0.51702106", "text": "public function clear(){\r\n\t\tstatic::$_messages \t= array();\r\n\t\t$this->_results\t\t= array();\r\n\t\tstatic::$_driver \t= false;\r\n\t\tstatic::$_instance\t= false;\r\n\t}", "title": "" }, { "docid": "ec70202c7123ccb3d9b4edb7050ffa62", "score": "0.5167004", "text": "public function dropNotif() {\n $success = true;\n $this->Notification->begin();\n\n $success = $success && $this->Notification->deleteAll([\n 'Notification.user_id' => $this->Auth->user('id'),\n false\n ]);\n\n if ($success == true) {\n $this->Notification->commit();\n } else {\n $this->Notification->rollback();\n }\n\n $this->redirect($this->referer());\n }", "title": "" }, { "docid": "456fd43721cb3a2701f0bbc5b6b74f91", "score": "0.5164388", "text": "function retrieve_notifications();", "title": "" }, { "docid": "b53e53a34e482116788e0e346413c510", "score": "0.51619", "text": "public function reset()\n {\n $this->values[self::EVENT_STREAM_ID] = null;\n $this->values[self::EXPECTED_VERSION] = null;\n $this->values[self::EVENTS] = array();\n $this->values[self::REQUIRE_MASTER] = null;\n }", "title": "" }, { "docid": "a7e6a49490ed901c19f62d39cb78a6c0", "score": "0.51516336", "text": "public function clearAllStaffMembers()\n\t{\n\t\t$this->staffs = array();\n\t}", "title": "" }, { "docid": "aff64de4beefd8cf138fbd3dbaaf0ef0", "score": "0.5149359", "text": "function vikinger_mark_notifications_as_read($notifications) {\r\n foreach ($notifications as $notification_id) {\r\n $result = vikinger_mark_notification_as_read($notification_id);\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "7be7f18d8b010e1309d77500421848c3", "score": "0.51424074", "text": "public function clear(): void\n {\n $this->data = [];\n }", "title": "" }, { "docid": "e6ce95b0957a83a48b86063d2fd185bc", "score": "0.51423866", "text": "public function clearUnread($conv_id, $user){\n\t\t\n\t\t$this->deleteAll(array(\n\t\t\t'UnreadMessage.conversation_id' => $conv_id, \n\t\t\t'UnreadMessage.user_id' => $user['id']), \n\t\tfalse);\n\t}", "title": "" }, { "docid": "6da2d27dcac8a83762f1190fbf00b68d", "score": "0.5134894", "text": "public function clear()\n {\n $this->size = 0;\n $this->documents = [];\n }", "title": "" }, { "docid": "a8c826f0f44bb51225de1d9abcfe0f76", "score": "0.5130867", "text": "public function removeSessionMessage() {\n $session = $this->f3->get('SESSION');\n\n if ($session['repeat'] == false) {\n foreach ($session as $key => $value) {\n if ($key == 'success' || $key == 'warning' || $key == 'error') {\n $this->f3->clear(\"SESSION.$key\");\n }\n }\n }\n }", "title": "" }, { "docid": "12aac12d218a8dadff4ebea85c448082", "score": "0.51306105", "text": "public function removeAllMessages() {\r\n parent::removeAllMessages();\r\n $this->setFlashMessages();\r\n }", "title": "" }, { "docid": "cec98e91d3ac3e84b5312deb77feca68", "score": "0.51279753", "text": "public function resetEmails()\n {\n $this->mailcatcher->delete('/messages')->send();\n }", "title": "" }, { "docid": "cac5cc2e4f930a8045cbc3490f1124f1", "score": "0.5126285", "text": "public function clear() {\n\t\t$this->_data->clear();\n\t}", "title": "" }, { "docid": "07dbfce7bf9de399b06418be96f4f5a4", "score": "0.51229054", "text": "public function clear()\n {\n $this->data = null;\n }", "title": "" } ]
a08c5f1df03f24878b04d7b363987dc9
Whether this is a documentation ip_address or not, the range of documentation addresses is defines as `192.0.2.0/24` (TESTNET1), `198.51.100.0/24` (TESTNET2), and `203.0.113.0/24` (TESTNET3).
[ { "docid": "4efbab02e61bf10335e8cd1fa5594564", "score": "0.51863366", "text": "public function isDocumentation(): bool {\n\t\tif ($this->bytes[0] === 192 && $this->bytes[1] === 0 && $this->bytes[2] === 2) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->bytes[0] === 198 && $this->bytes[1] === 51 && $this->bytes[2] === 100) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->bytes[0] === 203 && $this->bytes[1] === 0 && $this->bytes[2] === 113) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "a310e4633c3d5e744b763441eaf4731a", "score": "0.5720692", "text": "function validate_internal_ip_address($value) {\n if (!filter_var($value, FILTER_VALIDATE_IP)) {\n throw new Carbon_Validator_ValidationError(\"Please enter valid IP address. \");\n }\n $pieces = explode('.', $value);\n\n if (count($pieces) !== 4) {\n throw new Carbon_Validator_ValidationError(\"Your IP should have exactly 4 numbers. \");\n }\n\n if (intval($pieces[0]) !== 192 || intval($pieces[1]) !== 168) {\n throw new Carbon_Validator_ValidationError(\"Your IP address should start with 192.168 \");\n }\n\n return true;\n}", "title": "" }, { "docid": "d643e35dc0237e6188bdc6a32fcfdd4b", "score": "0.54923713", "text": "public function testSimpleIp(){\n $testNum = \"169.254.1.0\";\n $ipArr=getIPAdressFromText($GLOBALS[\"testTextIP\"]);\n for ($i=0;$i<count($ipArr);$i++){\n if (trim($ipArr[$i])===$testNum){\n $this->assertSame($testNum,trim($ipArr[$i]));\n }\n }\n }", "title": "" }, { "docid": "bda71a53608208687ab4e2964e5bb1cb", "score": "0.547868", "text": "public function testGetMessageForNotInRangeIp(): void\n {\n $instance = new IPRange();\n $instance->validate('2001:abcd::0009', '2001:abcd::0010/125');\n\n $this->assertSame('Received ip is not in (2001:abcd::0010/125) range', $instance->getMessage());\n }", "title": "" }, { "docid": "f2d5b1d22f7ba53cbaba5eab03957bfa", "score": "0.54751235", "text": "public function ValidateIPAddress( )\n\t\t{\n\t\t\tif( !array_key_exists( 'REMOTE_ADDR', $_SERVER ) )\n\t\t\t{\n\t\t\t\tthrow new Exception( 'Missing remote address.' );\n\t\t\t}\n\t\t\t\n\t\t\t$Remote = ip2long( $_SERVER[ 'REMOTE_ADDR' ] );\n\t\t\t\n\t\t\t// https://api.github.com/meta\n\t\t\t$Addresses =\n\t\t\t[\n\t\t\t\t[ '192.30.252.0', 22 ],\n\t\t\t\t[ '185.199.108.0', 22 ],\n\t\t\t\t[ '140.82.112.0', 20 ],\n\t\t\t];\n\t\t\t\n\t\t\tforeach( $Addresses as $CIDR )\n\t\t\t{\n\t\t\t\t$Base = ip2long( $CIDR[ 0 ] );\n\t\t\t\t$Mask = pow( 2, ( 32 - $CIDR[ 1 ] ) ) - 1;\n\t\t\t\t\n\t\t\t\tif( $Base === ( $Remote & ~$Mask ) )\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "fd8c1a4e08be75dd8a1e798b1289bfb5", "score": "0.54493064", "text": "#[@test]\n public function differentIPsShouldBeDifferent() {\n $this->assertNotEquals(new Inet6Address('::1'), new Inet6Address('::fe08'));\n }", "title": "" }, { "docid": "fe5c969cbf17a1044ad22d261339cd44", "score": "0.5434905", "text": "public function testInvalidCidrForInvalidAddress(): void\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Range must be in valid IP/CIDR format, invalid address.');\n\n $instance = new IPRange();\n $instance->validate('2001:abcd::0010', '2001:abcdf::0010/29');\n }", "title": "" }, { "docid": "3f1cf6499d743a5784bdd43a0cf9cf75", "score": "0.5392292", "text": "public static function validateAuthorIp()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 255),\n\t\t);\n\t}", "title": "" }, { "docid": "73a1d85668e60a4c28b8b18102eafc39", "score": "0.53684556", "text": "#[@test]\n public function loopbackAddress() {\n $this->assertEquals('::1', create(new Inet6Address('::1'))->asString());\n }", "title": "" }, { "docid": "9d026545a02aebf2714a3b2327f1b718", "score": "0.53650457", "text": "public static function ips()\n {\n }", "title": "" }, { "docid": "ac7e260c7081b3ecb16281abcbc670f5", "score": "0.5326126", "text": "public function isIp();", "title": "" }, { "docid": "ec3534507e02c1f9c34eecc300250195", "score": "0.5232546", "text": "public function testTheReturnedDomainIsNegative()\n {\n $test = \"1.1.1.1.1.1\";\n $res1 = $this->controller->getTheIpDomainName($test);\n $this->assertContains('<p style=\"color:red; font-weight: 900;\">The ip-address you '.\n 'have entered is not valid! </p>', $res1);\n }", "title": "" }, { "docid": "f23a5ee4d4dc3ecf19c9cd691fcf3471", "score": "0.5231793", "text": "public function testIsIpOnValid() {\n\t\t$validIp = array('192.168.1.1');\n\t\t$nonArrayIp = '10.100.0.1';\n\n\t\t$this->assertTrue($this->SeoAppModel->isIp($validIp));\n\t\t$this->assertTrue($this->SeoAppModel->isIp($nonArrayIp));\n\t}", "title": "" }, { "docid": "254e6b4197b0ed2e22d00ca4c466852e", "score": "0.5217688", "text": "function check_ip_in_range( $ip, $cidr_ranges ) {\n\n // Check if given IP is inside a IP range with CIDR format\n $ip = ip2long( $ip );\n if ( ! is_array( $cidr_ranges ) ) {\n $cidr_ranges = array( $cidr_ranges );\n } \n \n foreach ( $cidr_ranges as $cidr_range ) {\n list( $subnet, $mask ) = explode( '/', $cidr_range );\n if ( ( $ip & ~( ( 1 << ( 32 - $mask ) ) - 1 ) ) == ip2long( $subnet ) ) { \n return true;\n }\n }\n\n return false;\n\n}", "title": "" }, { "docid": "e7e8d574915014a42defb582ce0b2349", "score": "0.5209744", "text": "#[@test]\n public function isNotLoopbackAddress() {\n $this->assertFalse(create(new Inet6Address('::2'))->isLoopback());\n }", "title": "" }, { "docid": "1fee9c7fc10586ae41f1191ded3016a3", "score": "0.52032197", "text": "static function is_sub_IP($range, $ip){\r\n\t \t\r\n\t \t$array_range \t= explode('.', $range);\r\n\t \t$array_ip \t\t= explode('.', $ip);\r\n\t \t\r\n\t \tfor ($i = 0; $i<count($array_range); $i++){\r\n\t \t\t\r\n\t\t \tif (strstr($array_range[$i], '/'))\r\n\t\t \t\t$parts[] = explode('/', $array_range[$i]);\r\n\t\t \telse \r\n\t\t \t\t$parts[] = $array_range[$i];\r\n\t\t \t\t\r\n\t\t \tif (is_array($parts[$i])){\r\n\t\t \t\tif ((int)$parts[$i][0] <= (int)$array_ip[$i] && (int)$parts[$i][1] >= (int)$array_ip[$i])\r\n\t\t \t\t\tcontinue;\r\n\t\t \t\telse \r\n\t\t \t\t\treturn FALSE;\r\n\t\t \t}elseif (is_string($parts[$i])) {\r\n\t\t \t\tif ($parts[$i] == $array_ip[$i])\r\n\t\t \t\t\tcontinue;\r\n\t\t \t\telse \r\n\t\t \t\t\treturn FALSE;\r\n\t\t \t}\r\n\t\t \t\r\n\t \t}\r\n \t\r\n \t return TRUE;\r\n \t\r\n }", "title": "" }, { "docid": "fb21748c70b17ab61aa026907e9451ab", "score": "0.5181135", "text": "function isIpAllowed() {\r\n\treturn true;\r\n}", "title": "" }, { "docid": "ed860aa6abe4437ef63b9ee0cbd9558a", "score": "0.517707", "text": "public static function ip()\n {\n }", "title": "" }, { "docid": "3c3e1ec5b3099e3f10c535c581d4a0d9", "score": "0.516825", "text": "#[@test, @expect('lang.FormatException')]\n public function illegalAddress() {\n new Inet6Address('::ffffff:::::a');\n }", "title": "" }, { "docid": "245a4b200c5077f1761d98b0d331f043", "score": "0.5167903", "text": "#[@test]\n public function isLoopbackAddress() {\n $this->assertTrue(create(new Inet6Address('::1'))->isLoopback());\n }", "title": "" }, { "docid": "2d5f86866db56799a388930792438338", "score": "0.516573", "text": "function ip_in_range($ip, $ip_cond)\n{\n if (strpos($ip_cond, '/') === false) {\n // no netmask\n return $ip == $ip_cond;\n }\n list($net, $mask) = explode('/', $ip_cond);\n $ip_long = ip2long($ip);\n if ($ip_long === false || $ip_long == -1) { // PHP4 returns -1, PHP5 returns 'false'\n warn(\"ip_in_range() invalid ip detected. [$ip]\");\n return false;\n }\n $net_long = ip2long($net);\n if ($net_long === false || $net_long == -1) {\n warn(\"ip_in_range() invalid net detected. [$net]\");\n return false;\n }\n if (!is_numeric($mask)) {\n $mask = mask_to_bitnum($mask);\n }\n $mask = ~((1 << (32 - $mask)) - 1);\n $ip_filtered = $ip_long & $mask;\n return $net_long == $ip_filtered;\n}", "title": "" }, { "docid": "67b33745a98cfb17de88d69fd6cb27d8", "score": "0.5142456", "text": "public function testGetCorrectIpInput()\n {\n $testIPv6 = \"fe80::fc6c:65db:a743:60a7\";\n $res1 = $this->controller->validateIpInput($testIPv6);\n $this->assertContains('The IP-address ' . '<p style=\"color:#69a542; font-weight: 900;\">' . $testIPv6 . '</p>' .\n ' is a valid IPv6 IP-address.', $res1);\n\n $testIPv4 = \"192.168.56.1\";\n $res2 = $this->controller->validateIpInput($testIPv4);\n $this->assertContains('The IP-address ' . '<p style=\"color:#69a542; font-weight: 900;\">' . $testIPv4 . '</p>' .\n ' is a valid IPv4 IP-address.', $res2);\n }", "title": "" }, { "docid": "05d5c4a13e43ff95671bc8a21854ee64", "score": "0.5141916", "text": "public function testAddressGet0()\n {\n }", "title": "" }, { "docid": "5bf5c9d6557c00132e608416d5d08412", "score": "0.5110158", "text": "public static function isPublic( $ip ) {\n\t\t$n = self::toUnsigned( $ip );\n\t\tif ( !$n ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// ip2long accepts incomplete addresses, as well as some addresses\n\t\t// followed by garbage characters. Check that it's really valid.\n\t\tif( $ip != long2ip( $n ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tstatic $privateRanges = false;\n\t\tif ( !$privateRanges ) {\n\t\t\t$privateRanges = array(\n\t\t\t\tarray( '10.0.0.0', '10.255.255.255' ), # RFC 1918 (private)\n\t\t\t\tarray( '172.16.0.0', '172.31.255.255' ), # \"\n\t\t\t\tarray( '192.168.0.0', '192.168.255.255' ), # \"\n\t\t\t\tarray( '0.0.0.0', '0.255.255.255' ), # this network\n\t\t\t\tarray( '127.0.0.0', '127.255.255.255' ), # loopback\n\t\t\t);\n\t\t}\n\n\t\tforeach ( $privateRanges as $r ) {\n\t\t\t$start = self::toUnsigned( $r[0] );\n\t\t\t$end = self::toUnsigned( $r[1] );\n\t\t\tif ( $n >= $start && $n <= $end ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "02bff88b8879f452c6682a592811ee13", "score": "0.51098233", "text": "public function getIpAddress();", "title": "" }, { "docid": "76f3a23e3a93efe16e9e90948c1961f5", "score": "0.510012", "text": "public function testAllowIpAddress()\n {\n self::setUpFirewallOff();\n\n $ipAddress = $this->getServiceManager()->get('Config')['zoop']['test']['ipAddress'];\n $firewall = $this->getServiceManager()\n ->get('zoop.pyro.firewall');\n $firewall->allow($ipAddress);\n\n $this->assertTrue($firewall->isAllowed($ipAddress));\n }", "title": "" }, { "docid": "23a11bfdb8064be0cddb6bf64dd730a2", "score": "0.5098723", "text": "function fn_is_inet_ip($ip, $is_int = false)\n{\n if ($is_int) {\n $ip = long2ip($ip);\n }\n $_ip = explode('.', $ip);\n\n return\n ($_ip[0] == 10 ||\n ($_ip[0] == 172 && $_ip[1] >= 16 && $_ip[1] <= 31) ||\n ($_ip[0] == 192 && $_ip[1] == 168) ||\n ($_ip[0] == 127 && $_ip[1] == 0 && $_ip[2] == 0 && $_ip[3] == 1) ||\n ($_ip[0] == 255 && $_ip[1] == 255 && $_ip[2] == 255 && $_ip[3] == 255))\n ? false : true;\n}", "title": "" }, { "docid": "b140f01c61560840d6889e18f22d173d", "score": "0.5093806", "text": "public function testGetMessageForInvalidIp(): void\n {\n $instance = new IPRange();\n $instance->validate('2001:abcdf::0010', '2001:abcd::0010/125');\n\n $this->assertSame('Received value is not a valid ip address', $instance->getMessage());\n }", "title": "" }, { "docid": "fc7a7767b44500baf3e91cee695938e8", "score": "0.50933754", "text": "public static function validateAuthorRealIp()\n\t{\n\t\treturn array(\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 128),\n\t\t);\n\t}", "title": "" }, { "docid": "2315e250e02b647e556055b8ba92cd1b", "score": "0.508983", "text": "static public function ipv4_in_range($ip, $range) {\n if (strpos($range, '/') !== false) {\n // $range is in IP/NETMASK format\n list($range, $netmask) = explode('/', $range, 2);\n if (strpos($netmask, '.') !== false) {\n // $netmask is a 255.255.0.0 format\n $netmask = str_replace('*', '0', $netmask);\n $netmask_dec = ip2long($netmask);\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\n } else {\n // $netmask is a CIDR size block\n // fix the range argument\n $x = explode('.', $range);\n while(count($x)<4) $x[] = '0';\n list($a,$b,$c,$d) = $x;\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\n $range_dec = ip2long($range);\n $ip_dec = ip2long($ip);\n\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\n\n # Strategy 2 - Use math to create it\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\n $netmask_dec = ~ $wildcard_dec;\n\n return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\n }\n } else {\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\n if (strpos($range, '*') !==false) { // a.b.*.* format\n // Just convert to A-B format by setting * to 0 for A and 255 for B\n $lower = str_replace('*', '0', $range);\n $upper = str_replace('*', '255', $range);\n $range = \"$lower-$upper\";\n }\n\n if (strpos($range, '-')!==false) { // A-B format\n list($lower, $upper) = explode('-', $range, 2);\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\n }\n\n return false;\n }\n\n }", "title": "" }, { "docid": "2394016c4420cdfee040aeee5d3431f7", "score": "0.5071345", "text": "public static function getDefaultIPWhois()\n {\n return array(self::LNICHOST, self::RNICHOST, self::PNICHOST, self::BNICHOST);\n }", "title": "" }, { "docid": "24a7eea799fe1824b2fe72d4eca8803d", "score": "0.50646996", "text": "public static function ipAddressValidation()\n {\n $hostIpAddress = Yii::$app->request->getRemoteIp();\n if(Yii::$app->user->identity->getId()==1 || $hostIpAddress==\"::1\"){\n return true;\n }\n $hostQuery = \"SELECT ipw_id FROM ava_ip_address_whitelist WHERE ipw_ip_address like '\".$hostIpAddress.\"' limit 1\";\n $hostData = commonComponent::getQueryResults($hostQuery);\n if(count($hostData)>0){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b6778e22074ff1a6eefe0def8270f5c6", "score": "0.50556546", "text": "protected function detectWorkaroundIP()\n\t{\n\t\t// Disable overrides and get the IP\n\t\tIp::setAllowIpOverrides(false);\n\n\t\t$ip = Ip::getIp();\n\n\t\t$checklist = [\n\t\t\t// Localhost IPs\n\t\t\t'127.0.0.0/8',\n\t\t\t'::1',\n\t\t\t// Private Network IPs\n\t\t\t'10.0.0.0-10.255.255.255',\n\t\t\t'172.16.0.0-172.31.255.255',\n\t\t\t'192.168.0.0-192.168.255.255',\n\t\t\t'169.254.1.0-169.254.254.255',\n\t\t\t'fc00::/7',\n\t\t\t'fd00::/8',\n\t\t\t'fe80::/10',\n\t\t\t// CloudFlare IPs - IPv4\n\t\t\t'173.245.48.0/20',\n\t\t\t'103.21.244.0/22',\n\t\t\t'103.22.200.0/22',\n\t\t\t'103.31.4.0/22',\n\t\t\t'141.101.64.0/18',\n\t\t\t'108.162.192.0/18',\n\t\t\t'190.93.240.0/20',\n\t\t\t'188.114.96.0/20',\n\t\t\t'197.234.240.0/22',\n\t\t\t'198.41.128.0/17',\n\t\t\t'162.158.0.0/15',\n\t\t\t'104.16.0.0/12',\n\t\t\t'172.64.0.0/13',\n\t\t\t'131.0.72.0/22',\n\t\t\t// CloudFlare IPs - IPv6\n\t\t\t'2400:cb00::/32',\n\t\t\t'2606:4700::/32',\n\t\t\t'2803:f800::/32',\n\t\t\t'2405:b500::/32',\n\t\t\t'2405:8100::/32',\n\t\t\t'2a06:98c0::/29',\n\t\t\t'2c0f:f248::/32',\n\t\t];\n\n\t\tAtsystemUtilFilter::setIp($ip);\n\n\t\t$shouldEnable = AtsystemUtilFilter::IPinList($checklist);\n\n\t\t// Avoid polluting the class object\n\t\tAtsystemUtilFilter::setIp(null);\n\n\t\treturn $shouldEnable;\n\t}", "title": "" }, { "docid": "26db4e38c83e6b63a9d58d3c211cb9c1", "score": "0.5041996", "text": "public function testIsIpOnInvalid() {\n\t\t$invalidIp = array('100');\n\t\t$invalidIp2 = array('1000.10.10.1');\n\n\t\t$this->assertFalse($this->SeoAppModel->isIp($invalidIp));\n\t\t$this->assertFalse($this->SeoAppModel->isIp($invalidIp2));\n\t}", "title": "" }, { "docid": "78d4beeef81c48c29ea8bb6f14b0d427", "score": "0.50313157", "text": "public static function checkIPValidRange( $ipAddress ){\n\t\t\tglobal $wpdb;\n\n\t\t\tif( is_multisite() ){\n\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t/*\n\t\t\t\t\tGets IP ranges\n\t\t\t\t*/\n\t\t\t\t$ipRanges = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\"SELECT * \n\t\t\t\t\t FROM \".$wpdb->prefix.\"wps_ip_ranges\n\t\t\t\t\t WHERE blog_id = '%d'\",\n\t\t\t\t\t $currentBlogID\n\t\t\t\t), ARRAY_A );\n\t\t\t\t\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t/*\n\t\t\t\t\tGets IP ranges\n\t\t\t\t*/\n\t\t\t\t$ipRanges = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.\"wps_ip_ranges\", ARRAY_A );\n\n\t\t\t}\n\t\t\t\n\t\t\t/*\n\t\t\t\tLoops through all of the IP Ranges\n\t\t\t\tto see if the ip address is within\n\t\t\t\trange.\n\t\t\t*/\n\t\t\tforeach($ipRanges as $ipRange){\n\t\t $min = ip2long($ipRange['start_ip']);\n \t\t$max = ip2long($ipRange['end_ip']);\n \t\t$needle = ip2long($ipAddress); \n\n \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n \t\t\treturn true;\n \t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tReturns false if the ip is not in range.\n\t\t\t*/\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "6f9152216c7cd849fd9a412a60aed05b", "score": "0.50205284", "text": "function ip_in_network($ip, $net_addr, $net_mask){ \n\t if($net_mask <= 0){ return false; } \n\t $ip_binary_string = sprintf(\"%032b\",ip2long($ip)); \n\t $net_binary_string = sprintf(\"%032b\",ip2long($net_addr)); \n\t return (substr_compare($ip_binary_string,$net_binary_string,0,$net_mask) === 0); \n\t}", "title": "" }, { "docid": "1f23d41845766a183111903e4654bccf", "score": "0.5018664", "text": "#[@test]\n public function sameIPsShouldBeEqual() {\n $this->assertEquals(new Inet6Address('::1'), new Inet6Address('::1'));\n }", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "c34b9a0b67189bd833ac86904be8d4ee", "score": "0.4980972", "text": "public function getAddress();", "title": "" }, { "docid": "34064b2244ca96df46f5dfd3b20d98f9", "score": "0.49661255", "text": "public function isIpv4(): bool;", "title": "" }, { "docid": "d3a5c72a3b939b9df25c60bdbfd74122", "score": "0.49602616", "text": "public function providerIpAddress2()\n {\n return [\n [\"145.38.5.6\"],\n ];\n }", "title": "" }, { "docid": "481015a0780af9ac609043739c7970e0", "score": "0.49561548", "text": "public function getIp();", "title": "" }, { "docid": "481015a0780af9ac609043739c7970e0", "score": "0.49561548", "text": "public function getIp();", "title": "" }, { "docid": "1275337b3c218922b3c394126c0e1e0e", "score": "0.4954769", "text": "public function isIpv4();", "title": "" }, { "docid": "aa1f53df27567be064fdf02609bf66dc", "score": "0.4954367", "text": "public function validateIpAddress($ip_addr)\r\n {\r\n if(preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\",$ip_addr))\r\n {\r\n //now all the intger values are separated\r\n $parts=explode(\".\",$ip_addr);\r\n //now we need to check each part can range from 0-255\r\n foreach($parts as $ip_parts)\r\n {\r\n if(intval($ip_parts)>255 || intval($ip_parts)<0)\r\n return false; //if number is not within range of 0-255\r\n }\r\n return true;\r\n }\r\n else\r\n return false; //if format of ip address doesn't matches\r\n }", "title": "" }, { "docid": "4018e8554a24eb2a8ef67cfe12460448", "score": "0.4951256", "text": "public function hasIp(): bool;", "title": "" }, { "docid": "a0e1d05211ca9d6c9ef421ea23733d00", "score": "0.49495298", "text": "public function dataInvalidAddresses()\n {\n $invalidaddresses = [\n '[email protected],com',\n 'first\\@[email protected]',\n '123456789012345678901234567890123456789012345678901234567890' .\n '@12345678901234567890123456789012345678901234 [...]',\n 'first.last',\n '12345678901234567890123456789012345678901234567890123456789012345@iana.org',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '\"first\"last\"@iana.org',\n '\"\"\"@iana.org',\n '\"\\\"@iana.org',\n //'\"\"@iana.org',\n 'first\\@[email protected]',\n 'first.last@',\n 'x@x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.x23456789.' .\n 'x23456789.x23456789.x23456789.x23 [...]',\n 'first.last@[.12.34.56.78]',\n 'first.last@[12.34.56.789]',\n 'first.last@[::12.34.56.78]',\n 'first.last@[IPv5:::12.34.56.78]',\n 'first.last@[IPv6:1111:2222:3333:4444:5555:12.34.56.78]',\n 'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:12.34.56.78]',\n 'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777]',\n 'first.last@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]',\n 'first.last@[IPv6:1111:2222::3333::4444:5555:6666]',\n 'first.last@[IPv6:1111:2222:333x::4444:5555]',\n 'first.last@[IPv6:1111:2222:33333::4444:5555]',\n '[email protected]',\n '[email protected]',\n 'first.last@x234567890123456789012345678901234567890123456789012345678901234.iana.org',\n 'abc\\@[email protected]',\n 'abc\\@iana.org',\n 'Doug\\ \\\"Ace\\\"\\ [email protected]',\n 'abc@[email protected]',\n 'abc\\@[email protected]',\n 'abc\\@iana.org',\n '@iana.org',\n 'doug@',\n '\"[email protected]',\n 'ote\"@iana.org',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '\"Doug \"Ace\" L.\"@iana.org',\n 'Doug\\ \\\"Ace\\\"\\ L\\[email protected]',\n 'hello [email protected]',\n //'helloworld@iana .org',\n '[email protected].',\n 'test.iana.org',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n 'test@[email protected]',\n 'test@@iana.org',\n '-- test [email protected]',\n '[test]@iana.org',\n '\"test\"test\"@iana.org',\n '()[]\\;:,><@iana.org',\n 'test@.',\n 'test@example.',\n '[email protected]',\n 'test@12345678901234567890123456789012345678901234567890123456789012345678901234567890' .\n '12345678901234567890 [...]',\n 'test@[123.123.123.123',\n '[email protected]]',\n 'NotAnEmail',\n '@NotAnEmail',\n '\"test\"blah\"@iana.org',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n 'Ima [email protected]',\n 'phil.h\\@\\@[email protected]',\n 'foo@[\\1.2.3.4]',\n //'first.\"\"[email protected]',\n 'first\\[email protected]',\n 'Abc\\@[email protected]',\n 'Fred\\ [email protected]',\n 'Joe.\\[email protected]',\n 'first.last@[IPv6:1111:2222:3333:4444:5555:6666:12.34.567.89]',\n '{^c\\@**Dog^}@cartoon.com',\n //'\"foo\"(yay)@(hoopla)[1.2.3.4]',\n 'cal(foo(bar)@iamcal.com',\n 'cal(foo)bar)@iamcal.com',\n 'cal(foo\\)@iamcal.com',\n 'first(12345678901234567890123456789012345678901234567890)last@(1234567890123456789' .\n '01234567890123456789012 [...]',\n 'first(middle)[email protected]',\n 'first(abc(\"def\".ghi).mno)middle(abc(\"def\".ghi).mno).last@(abc(\"def\".ghi).mno)example' .\n '(abc(\"def\".ghi).mno). [...]',\n 'a(a(b(c)d(e(f))g)(h(i)j)@iana.org',\n '.@',\n '@bar.com',\n '@@bar.com',\n 'aaa.com',\n '[email protected]',\n '[email protected]',\n 'aaa@[123.123.123.123]a',\n 'aaa@[123.123.123.333]',\n '[email protected].',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '\"Unicode NULL' . chr(0) . '\"@char.com',\n 'Unicode NULL' . chr(0) . '@char.com',\n 'first.last@[IPv6::]',\n 'first.last@[IPv6::::]',\n 'first.last@[IPv6::b4]',\n 'first.last@[IPv6::::b4]',\n 'first.last@[IPv6::b3:b4]',\n 'first.last@[IPv6::::b3:b4]',\n 'first.last@[IPv6:a1:::b4]',\n 'first.last@[IPv6:a1:]',\n 'first.last@[IPv6:a1:::]',\n 'first.last@[IPv6:a1:a2:]',\n 'first.last@[IPv6:a1:a2:::]',\n 'first.last@[IPv6::11.22.33.44]',\n 'first.last@[IPv6::::11.22.33.44]',\n 'first.last@[IPv6:a1:11.22.33.44]',\n 'first.last@[IPv6:a1:::11.22.33.44]',\n 'first.last@[IPv6:a1:a2:::11.22.33.44]',\n 'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.xx]',\n 'first.last@[IPv6:0123:4567:89ab:CDEFF::11.22.33.44]',\n 'first.last@[IPv6:a1::a4:b1::b4:11.22.33.44]',\n 'first.last@[IPv6:a1::11.22.33]',\n 'first.last@[IPv6:a1::11.22.33.44.55]',\n 'first.last@[IPv6:a1::b211.22.33.44]',\n 'first.last@[IPv6:a1::b2::11.22.33.44]',\n 'first.last@[IPv6:a1::b3:]',\n 'first.last@[IPv6::a2::b4]',\n 'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3:]',\n 'first.last@[IPv6::a2:a3:a4:b1:b2:b3:b4]',\n 'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]',\n //This is a valid RFC5322 address, but we don't want to allow it for obvious reasons!\n \"(\\r\\n RCPT TO:[email protected]\\r\\n DATA \\\\\\nSubject: spam10\\\\\\n\\r\\n Hello,\" .\n \"\\r\\n this is a spam mail.\\\\\\n.\\r\\n QUIT\\r\\n ) [email protected]\",\n ];\n\n return $this->arrayToNamedDataProvider($invalidaddresses, 'Invalid: ');\n }", "title": "" }, { "docid": "f68183e0ba323ba7958f4ce091d6a885", "score": "0.49459913", "text": "public function block_ip_addrs()\n\t{\n\t\t/* No reason to do anything if no IP addresses have been redlisted */\n\t\t$option_check = trim( $this->options['ip_addrs'] );\n\n\t\tif( ! empty( $option_check ) )\n\t\t{\n\t\t\t/* Create an array of the IP addresses */\n\t\t\t$ips = explode(\"\\n\", $this->options['ip_addrs'] );\n\n\t\t\tforeach( $ips as $ip )\n\t\t\t{\n\t\t\t\t$ip = trim( $ip );\n\n\t\t\t\tif( $ip == $_SERVER['REMOTE_ADDR'] )\n\t\t\t\t{\n\t\t\t\t\tif( $this->debug )\n\t\t\t\t\t{\n\t\t\t\t\t\tdie( $this->lang['debug_ip_address'] . $_SERVER['REMOTE_ADDR'] );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdie();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f44e4c35dec62f261b7ad37d2b503e1a", "score": "0.49361566", "text": "function inet_aton($ip) {\r\n $ip = trim($ip);\r\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6))\r\n return 0;\r\n return sprintf(\"%u\", ip2long($ip));\r\n }", "title": "" }, { "docid": "a38b4a011ec671343083cab19cf31cdb", "score": "0.49318808", "text": "public static function isIPAddress($value)\n\t{\n\t\t$pattern = \"/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i\";\n\t\tif (preg_match($pattern, $value))\n\t\t{\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "b1a6d5337477d842672c49ccc81b0528", "score": "0.49269265", "text": "#[@test]\n public function addressShorteningOnlyTakesPlaceOnce() {\n $this->assertEquals(\n 'febc::23c1:aa49:0:0:9982',\n create(new Inet6Address('febc:0000:0000:23c1:aa49:0000:0000:9982'))->asString()\n );\n }", "title": "" }, { "docid": "0a5410af4ee90e199ab3bad5750efbd6", "score": "0.49251685", "text": "public function isIp()\n {\n return $this->hostAsIpv4 || $this->hostAsIpv6;\n }", "title": "" }, { "docid": "fc97e47b2361b49c734510f20dcdc6bb", "score": "0.49247077", "text": "function ip_valid ( $ips )\n{\n\tif ( isset( $ips ) ) {\n\t\t$ip = ip_first ( $ips );\n\t\t$ipnum = ip2long ( $ip );\n\t\tif ( $ipnum !== -1 && $ipnum !== false && ( long2ip ( $ipnum ) === $ip ) ) {\n\t\t\tif ( ( $ipnum < 167772160 || $ipnum > 184549375 ) && // Not in 10.0.0.0/8\n\t\t\t( $ipnum < - 1408237568 || $ipnum > - 1407188993 ) && // Not in 172.16.0.0/12\n\t\t\t( $ipnum < - 1062731776 || $ipnum > - 1062666241 ) ) // Not in 192.168.0.0/16\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "bf6e9b8660bedde34dda933363787edc", "score": "0.49189374", "text": "public static function inet_aton($ip) {\n\t\t$ip = preg_replace('/(?<=^|\\.)0+([1-9])/', '$1', $ip);\n\t\treturn sprintf(\"%u\", ip2long($ip));\n\t}", "title": "" }, { "docid": "9ee27873aa6100b22ca4dcecbf35b2d0", "score": "0.49165526", "text": "public function address() {\r\n return $this->parse($this->choose($this->addressFormats));\r\n }", "title": "" }, { "docid": "e5c96304a48202140f5ebd81a684393c", "score": "0.4910896", "text": "#[@test]\n public function notInSubnet() {\n $this->assertFalse(create(new Inet6Address('::1'))->inSubnet(new Network(new Inet6Address('::0101'), 120)));\n }", "title": "" }, { "docid": "b6b5f2ee9750d578948e093248b6d39c", "score": "0.49055856", "text": "public function dataValidAddresses()\n {\n $validaddresses = [\n '[email protected]',\n '[email protected]',\n '1234567890123456789012345678901234567890123456789012345678901234@example.org',\n '\"first\\\"last\"@example.org',\n '\"first@last\"@example.org',\n '\"first\\last\"@example.org',\n 'first.last@[12.34.56.78]',\n 'first.last@x23456789012345678901234567890123456789012345678901234567890123.example.org',\n '[email protected]',\n '\"first\\last\"@example.org',\n '\"Abc\\@def\"@example.org',\n '\"Fred\\ Bloggs\"@example.org',\n '\"Joe.\\Blow\"@example.org',\n '\"Abc@def\"@example.org',\n '[email protected]',\n 'customer/[email protected]',\n '[email protected]',\n '!def!xyz%[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n 't*[email protected]',\n '[email protected]',\n '{_test_}@example.org',\n '[email protected]',\n '\"test.test\"@example.org',\n 'test.\"test\"@example.org',\n '\"test@test\"@example.org',\n '[email protected]',\n 'test@[123.123.123.123]',\n '[email protected]',\n '[email protected]',\n '\"test\\test\"@example.org',\n '\"test\\blah\"@example.org',\n '\"test\\blah\"@example.org',\n '\"test\\\"blah\"@example.org',\n 'customer/[email protected]',\n '[email protected]',\n '[email protected]',\n '\"Austin@Powers\"@example.org',\n '[email protected]',\n '\"Ima.Fool\"@example.org',\n '\"first\".\"last\"@example.org',\n '\"first\".middle.\"last\"@example.org',\n '\"first\"[email protected]',\n 'first.\"last\"@example.org',\n '\"first\".\"middle\".\"last\"@example.org',\n '\"first.middle\".\"last\"@example.org',\n '\"first.middle.last\"@example.org',\n '\"first..last\"@example.org',\n '\"first\\\"last\"@example.org',\n 'first.\"mid\\dle\".\"last\"@example.org',\n '[email protected]',\n '[email protected]',\n 'aaa@[123.123.123.123]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '\"Joe\\Blow\"@example.org',\n 'user%[email protected]',\n 'cdburgess+!#$%&\\'*-/=?+_{}|[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n ];\n\n return $this->arrayToNamedDataProvider($validaddresses, 'Valid: ');\n }", "title": "" }, { "docid": "feda653a996c59f972ba3711002c50e0", "score": "0.48951012", "text": "public function isIp(): bool\n {\n return $this->host_as_ipv4 || $this->host_as_ipv6;\n }", "title": "" }, { "docid": "cbb61076dd90f4459834e7ec4f6048ef", "score": "0.48900294", "text": "function validip($ip)\n{\n\t$ip = ip2long($ip);\n\tif (empty($ip) || $ip == '-1') {\n\t\treturn false;\n\t}\n\t// reserved IANA IPv4 addresses\n\t// http://www.iana.org/assignments/ipv4-address-space\n\t$reserved_ips = array(\n\t\tarray(\n\t\t\t'0',\n\t\t\t'50331647'\n\t\t), // '0.0.0.0','2.255.255.255'\n\t\tarray(\n\t\t\t'167772160',\n\t\t\t'184549375'\n\t\t), // '10.0.0.0','10.255.255.255'\n\t\tarray(\n\t\t\t'2130706432',\n\t\t\t'2147483647'\n\t\t), // '127.0.0.0','127.255.255.255'\n\t\tarray(\n\t\t\t'-1442971648',\n\t\t\t'-1442906113'\n\t\t), // '169.254.0.0','169.254.255.255'\n\t\tarray(\n\t\t\t'-1408237568',\n\t\t\t'-1407188993'\n\t\t), // '172.16.0.0','172.31.255.255'\n\t\tarray(\n\t\t\t'-1073741312',\n\t\t\t'-1073741057'\n\t\t), // '192.0.2.0','192.0.2.255'\n\t\tarray(\n\t\t\t'-1062731776',\n\t\t\t'-1062666241'\n\t\t), // '192.168.0.0','192.168.255.255'\n\t\tarray(\n\t\t\t'-256',\n\t\t\t'-1'\n\t\t) // '255.255.255.0','255.255.255.255'\n\t);\n\n\tforeach ($reserved_ips as $r) { // $r[0] = min, $r[1] = max\n\t\tif (($ip >= $r[0]) && ($ip <= $r[1])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "3f6a70864564b217f74dbf587c367cef", "score": "0.48877668", "text": "static function isIPInNet( $ipaddress, $network, $mask = 24 )\n {\n $lnet = ip2long( $network );\n $lip = ip2long( $ipaddress );\n $binnet = str_pad( decbin( $lnet ), 32, '0', STR_PAD_LEFT );\n $firstpart = substr( $binnet, 0, $mask );\n $binip = str_pad( decbin( $lip ), 32, '0', STR_PAD_LEFT );\n $firstip = substr( $binip, 0, $mask );\n return( strcmp( $firstpart, $firstip ) == 0 );\n }", "title": "" }, { "docid": "94738c9c54ebf52ce62b28274957fcad", "score": "0.48769993", "text": "public function ip($value) {\n return (filter_var($value, FILTER_VALIDATE_IP)) ? true : false;\n }", "title": "" }, { "docid": "1de60313196d5bb4798fde3cfc72420d", "score": "0.4873763", "text": "function check_dhcp_range($if_ipaddr, $if_subnet, $range_from, $range_to) {\n\t$input_errors = array();\n\t$subnet_start = (ip2long($if_ipaddr) & gen_subnet_mask_long($if_subnet));\n\t$subnet_end = (ip2long($if_ipaddr) | (~gen_subnet_mask_long($if_subnet)));\n\t\n\t$rangefrom = ip2long($range_from);\n\t$rangeto = ip2long($range_to);\n\t$ifip = ip2long($if_ipaddr);\n\t\n\tif (($rangefrom < $subnet_start) || ($rangefrom > $subnet_end) ||\n\t ($rangeto < $subnet_start) || ($rangeto > $subnet_end))\n\t\t$input_errors[] = \"The specified range lies outside of the current subnet.\";\n\t\n\tif ($rangefrom > $rangeto)\n\t\t$input_errors[] = \"The range is invalid (start address higher than end address).\";\n\t\n\tif (($rangefrom == $subnet_start) || ($rangeto == $subnet_end))\n\t\t$input_errors[] = \"The network address (\" . long2ip($subnet_start) . \") or the broadcast address (\" . long2ip($subnet_end) . \") cannot be used in the range.\";\n\t\n\tif ($ifip >= $rangefrom && $ifip <= $rangeto)\n\t\t$input_errors[] = \"The interface's IP address cannot be included in the range.\";\n\t\n\treturn $input_errors;\n}", "title": "" }, { "docid": "0a59719318da980d56be8cd6b2f010b7", "score": "0.48728067", "text": "function validate_ip_address($ip_addr)\r\n{\r\n if (preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\", $ip_addr))\r\n {\r\n //now all the intger values are separated\r\n $parts = explode(\".\", $ip_addr);\r\n //now we need to check each part can range from 0-255\r\n foreach ($parts as $ip_parts)\r\n {\r\n if (intval($ip_parts) > 255 || intval($ip_parts) < 0)\r\n return false; //if number is not within range of 0-255\r\n\r\n }\r\n return true;\r\n }\r\n else\r\n return false; //if format of ip address doesn't matches\r\n}", "title": "" }, { "docid": "944270555d736b99185a38ee3d6d509b", "score": "0.48680115", "text": "public function testListHostSubnet()\n {\n\n }", "title": "" }, { "docid": "1145597c4fadd0f235b8d076cddb291a", "score": "0.4867353", "text": "public function testAddressSetAsDefault()\n {\n }", "title": "" }, { "docid": "e818d4a0d1ad4711cdd378ebabb30031", "score": "0.48610893", "text": "public function getClientAddress();", "title": "" }, { "docid": "1a3aa27440c0ab1464a1caa7ca8b1562", "score": "0.48552555", "text": "#[@test]\n public function inSubnet() {\n $this->assertTrue(create(new Inet6Address('::1'))->inSubnet(new Network(new Inet6Address('::1'), 120)));\n }", "title": "" }, { "docid": "f22bdfc685cfd070faab549e0df2b81d", "score": "0.4841806", "text": "public static function isInRange($addr, $range) {\n\t\t// Convert to IPv6 if needed\n\t\t$unsignedIP = self::toHex( $addr );\n\t\tlist( $start, $end ) = self::parseRange( $range );\n\t\treturn (($unsignedIP >= $start) && ($unsignedIP <= $end));\n\t}", "title": "" }, { "docid": "ecb5b4ab942176663bfd75da56305e90", "score": "0.48394516", "text": "public function getDefaultIp(): string|null;", "title": "" }, { "docid": "bc9764f4e18a9bc34b8e4ce5fdf5e2e4", "score": "0.4837203", "text": "public function setIpAddress($val)\n {\n $this->_propDict[\"ipAddress\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "a8ab03ef766ee37227d8b247a6b7a5b6", "score": "0.48285875", "text": "public function address(): array;", "title": "" }, { "docid": "035b41cc12f2c3ebe3951e4f5d7ba48f", "score": "0.48284745", "text": "public function testDefaultMaskValueMatchesEntireIpAddress()\n {\n $ip = IPv4::create('172.16.3.5');\n\n $this->assertTrue($ip->matches('172.16.3.5'));\n $this->assertFalse($ip->matches('172.16.3.4'));\n }", "title": "" }, { "docid": "535d4569aca1de8e9ed7e361e43279c3", "score": "0.48231453", "text": "public function providerIpAddress()\n {\n return [\n [\"145.38.5.6\"],\n [\"128.33.2.1\"],\n ];\n }", "title": "" }, { "docid": "8f8846904b5b7e7a38843d050ce1cab7", "score": "0.4815759", "text": "public function getIp(): string;", "title": "" }, { "docid": "d075f2b9bb289fc7c37638f0af93f5f3", "score": "0.48113978", "text": "function is_ip_banned($ipaddr)\n\t{\n\t\t$addr_parts = [];\n\t\tpreg_match('/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)/', $ipaddr, $addr_parts);\n\t\tarray_shift($addr_parts);//удаляем всё совпадение, нужны только разбитые части\n\t\tarray_walk($addr_parts, function(&$item){ $item = sprintf('(?:%s|\\*)', $item); });\n\t\t//#(?:^|\\|)((?:[ip-part]|\\*)\\.(?:[ip-part]|\\*)\\.(?:[ip-part]|\\*)\\.(?:[ip-part]|\\*))(?:$|\\|)#\n\t\t$regexp = '#(?:^|\\|\\s*?)(' . $addr_parts[0] . '\\.' . $addr_parts[1] . '\\.' . $addr_parts[2] . '\\.' . $addr_parts[3] . ')(?:\\s*?$|\\|)#';\n\n\t\t$res = preg_match($regexp, Ibf::app()->vars['ban_ip']);\n\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "2813a9f704db961fd3c3bc156b0da4bf", "score": "0.48090768", "text": "public function testDenyIpAddress()\n {\n self::setUpFirewallOff();\n\n $ipAddress = $this->getServiceManager()->get('Config')['zoop']['test']['ipAddress'];\n $firewall = $this->getServiceManager()\n ->get('zoop.pyro.firewall');\n $firewall->deny($ipAddress);\n\n $this->assertTrue($firewall->isDenied($ipAddress));\n }", "title": "" }, { "docid": "6f10fcb84e5e1ea257e53ff227a99de1", "score": "0.48088336", "text": "public function getIPAddress(): string\n {\n if ($this->ipAddress) {\n return $this->ipAddress;\n }\n\n $ipValidator = [\n new FormatRules(),\n 'valid_ip',\n ];\n\n $proxyIPs = config(App::class)->proxyIPs;\n\n if (! empty($proxyIPs) && (! is_array($proxyIPs) || is_int(array_key_first($proxyIPs)))) {\n throw new ConfigException(\n 'You must set an array with Proxy IP address key and HTTP header name value in Config\\App::$proxyIPs.'\n );\n }\n\n $this->ipAddress = $this->getServer('REMOTE_ADDR');\n\n // If this is a CLI request, $this->ipAddress is null.\n if ($this->ipAddress === null) {\n return $this->ipAddress = '0.0.0.0';\n }\n\n // @TODO Extract all this IP address logic to another class.\n foreach ($proxyIPs as $proxyIP => $header) {\n // Check if we have an IP address or a subnet\n if (strpos($proxyIP, '/') === false) {\n // An IP address (and not a subnet) is specified.\n // We can compare right away.\n if ($proxyIP === $this->ipAddress) {\n $spoof = $this->getClientIP($header);\n\n if ($spoof !== null) {\n $this->ipAddress = $spoof;\n break;\n }\n }\n\n continue;\n }\n\n // We have a subnet ... now the heavy lifting begins\n if (! isset($separator)) {\n $separator = $ipValidator($this->ipAddress, 'ipv6') ? ':' : '.';\n }\n\n // If the proxy entry doesn't match the IP protocol - skip it\n if (strpos($proxyIP, $separator) === false) {\n continue;\n }\n\n // Convert the REMOTE_ADDR IP address to binary, if needed\n if (! isset($ip, $sprintf)) {\n if ($separator === ':') {\n // Make sure we're having the \"full\" IPv6 format\n $ip = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($this->ipAddress, ':')), $this->ipAddress));\n\n for ($j = 0; $j < 8; $j++) {\n $ip[$j] = intval($ip[$j], 16);\n }\n\n $sprintf = '%016b%016b%016b%016b%016b%016b%016b%016b';\n } else {\n $ip = explode('.', $this->ipAddress);\n $sprintf = '%08b%08b%08b%08b';\n }\n\n $ip = vsprintf($sprintf, $ip);\n }\n\n // Split the netmask length off the network address\n sscanf($proxyIP, '%[^/]/%d', $netaddr, $masklen);\n\n // Again, an IPv6 address is most likely in a compressed form\n if ($separator === ':') {\n $netaddr = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($netaddr, ':')), $netaddr));\n\n for ($i = 0; $i < 8; $i++) {\n $netaddr[$i] = intval($netaddr[$i], 16);\n }\n } else {\n $netaddr = explode('.', $netaddr);\n }\n\n // Convert to binary and finally compare\n if (strncmp($ip, vsprintf($sprintf, $netaddr), $masklen) === 0) {\n $spoof = $this->getClientIP($header);\n\n if ($spoof !== null) {\n $this->ipAddress = $spoof;\n break;\n }\n }\n }\n\n if (! $ipValidator($this->ipAddress)) {\n return $this->ipAddress = '0.0.0.0';\n }\n\n return $this->ipAddress;\n }", "title": "" }, { "docid": "486df7dce1fedc9c2e66ebc49538bf14", "score": "0.48067063", "text": "function verify_ipaddress(&$ipaddress)\n\t{\n\t\tif ($ipaddress == '')\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse if (preg_match('#^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$#', $ipaddress, $octets))\n\t\t{\n\t\t\tfor ($i = 1; $i <= 4; $i++)\n\t\t\t{\n\t\t\t\tif ($octets[\"$i\"] > 255)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "46789d031ced2f9feac4d052e19247c2", "score": "0.48034638", "text": "function is_ipaddr($var) {\r\n\tif (!is_string($var))\r\n\t\treturn FALSE;\r\n\treturn filter_var($var, FILTER_VALIDATE_IP);\r\n}", "title": "" }, { "docid": "2bdf2574825307197bd4e071c2c46285", "score": "0.4794926", "text": "#[@test]\n public function addressPostfixIsShortened() {\n $this->assertEquals(\n 'febc:a574:382b:23c1:aa49::',\n create(new Inet6Address('febc:a574:382b:23c1:aa49:0000:0000:0000'))->asString()\n );\n }", "title": "" }, { "docid": "2b3a43ccbf6a068f6d01c0858f84e8eb", "score": "0.47917485", "text": "public function testBind9FormatA() {\n\t\t$this->assertEquals('192.0.2.1', DNSContent::bind9_format('192.0.2.1', 'A', 'example.com.'));\n\t}", "title": "" }, { "docid": "3920ec0f7f380526d6ea41ed59d153e2", "score": "0.47909757", "text": "#[@test, @expect('lang.FormatException')]\n public function anotherIllegalAddress() {\n new Inet6Address('');\n }", "title": "" }, { "docid": "885bc6b8f4e5773b89d8044635b88181", "score": "0.47899023", "text": "public function ip_address() {\n if ($this->ip_address !== FALSE) {\n return $this->ip_address;\n }\n\n $proxy_ips = config_item('server.proxy_ips');\n if (!empty($proxy_ips) && !is_array($proxy_ips)) {\n $proxy_ips = explode(',', str_replace(' ', '', $proxy_ips));\n }\n\n $this->ip_address = $this->server('REMOTE_ADDR');\n\n if ($proxy_ips) {\n foreach (array('HTTP_X_FORWARDED_FOR', 'HTTP_CLIENT_IP', 'HTTP_X_CLIENT_IP', 'HTTP_X_CLUSTER_CLIENT_IP') as $header) {\n if (($spoof = $this->server($header)) !== NULL) {\n // Some proxies typically list the whole chain of IP\n // addresses through which the client has reached us.\n // e.g. client_ip, proxy_ip1, proxy_ip2, etc.\n sscanf($spoof, '%[^,]', $spoof);\n\n if (!$this->valid_ip($spoof)) {\n $spoof = NULL;\n } else {\n break;\n }\n }\n }\n\n if ($spoof) {\n for ($i = 0, $c = count($proxy_ips); $i < $c; $i++) {\n // Check if we have an IP address or a subnet\n if (strpos($proxy_ips[$i], '/') === FALSE) {\n // An IP address (and not a subnet) is specified.\n // We can compare right away.\n if ($proxy_ips[$i] === $this->ip_address) {\n $this->ip_address = $spoof;\n break;\n }\n\n continue;\n }\n\n // We have a subnet ... now the heavy lifting begins\n isset($separator) OR $separator = $this->valid_ip($this->ip_address, 'ipv6') ? ':' : '.';\n\n // If the proxy entry doesn't match the IP protocol - skip it\n if (strpos($proxy_ips[$i], $separator) === FALSE) {\n continue;\n }\n\n // Convert the REMOTE_ADDR IP address to binary, if needed\n if (!isset($ip, $sprintf)) {\n if ($separator === ':') {\n // Make sure we're have the \"full\" IPv6 format\n $ip = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($this->ip_address, ':')), $this->ip_address\n )\n );\n\n for ($j = 0; $j < 8; $j++) {\n $ip[$j] = intval($ip[$j], 16);\n }\n\n $sprintf = '%016b%016b%016b%016b%016b%016b%016b%016b';\n } else {\n $ip = explode('.', $this->ip_address);\n $sprintf = '%08b%08b%08b%08b';\n }\n\n $ip = vsprintf($sprintf, $ip);\n }\n\n // Split the netmask length off the network address\n sscanf($proxy_ips[$i], '%[^/]/%d', $netaddr, $masklen);\n\n // Again, an IPv6 address is most likely in a compressed form\n if ($separator === ':') {\n $netaddr = explode(':', str_replace('::', str_repeat(':', 9 - substr_count($netaddr, ':')), $netaddr));\n for ($i = 0; $i < 8; $i++) {\n $netaddr[$i] = intval($netaddr[$i], 16);\n }\n } else {\n $netaddr = explode('.', $netaddr);\n }\n\n // Convert to binary and finally compare\n if (strncmp($ip, vsprintf($sprintf, $netaddr), $masklen) === 0) {\n $this->ip_address = $spoof;\n break;\n }\n }\n }\n }\n\n if (!$this->valid_ip($this->ip_address)) {\n return $this->ip_address = '0.0.0.0';\n }\n\n return $this->ip_address;\n }", "title": "" }, { "docid": "1f72c431b8fed94cba708ab67724ca56", "score": "0.4781923", "text": "public function inAddr();", "title": "" }, { "docid": "97ff1bb3e0b012dc2e40d311a0ffafac", "score": "0.47812536", "text": "public function get_address() {\n\n\t\t$trusted_ip_origins = $this->get_option( 'trusted_ip_origins' );\n\n\t\tif( empty( $trusted_ip_origins ) || !is_array( $trusted_ip_origins ) ) {\n\n\t\t\t$trusted_ip_origins = array();\n\t\t}\n\n\t\tif( !in_array( 'REMOTE_ADDR', $trusted_ip_origins ) ) {\n\n\t\t\t$trusted_ip_origins[] = 'REMOTE_ADDR';\n\t\t}\n\n\t\t$ip = '';\n\t\tforeach ( $trusted_ip_origins as $origin ) {\n\n\t\t\tif( isset( $_SERVER[$origin] ) && !empty( $_SERVER[$origin] ) ) {\n\n\t\t\t\tif( strpos( $_SERVER[$origin], ',' ) !== false ) {\n\n\t\t\t\t\t$origin_ips = explode( ',', $_SERVER[$origin] );\n\t\t\t\t\t$origin_ips = array_map( 'trim', $origin_ips );\n\n\t\t\t if( $origin_ips ) {\n\n\t\t\t\t\t\tforeach ($origin_ips as $check_ip) {\n\n\t\t\t\t\t\t if( $this->is_ip_valid( $check_ip ) ) {\n\n\t\t\t\t\t\t $ip = $check_ip;\n\t\t\t\t\t\t break 2;\n }\n\t\t\t }\n }\n }\n\n if( $this->is_ip_valid( $_SERVER[$origin] ) ) {\n\n\t\t\t\t\t$ip = $_SERVER[$origin];\n\t\t\t\t\tbreak;\n }\n\t\t\t}\n\t\t}\n\n\t\t$ip = preg_replace('/^(\\d+\\.\\d+\\.\\d+\\.\\d+):\\d+$/', '\\1', $ip);\n\n\t\treturn $ip;\n\t}", "title": "" }, { "docid": "284358e2c7aac78c5ed382d4802a6163", "score": "0.47796363", "text": "function ipInRange($ip,$rangefrom,$rangeto) {\n\t$ip = explode(\".\",$ip);\n\t$rangefrom = explode(\".\",$rangefrom);\n\t$rangeto = explode(\".\",$rangeto);\n\tif (($ip[0]>=$rangefrom[0] AND $ip[0]<=$rangeto[0]) AND\n\t($ip[1]>=$rangefrom[1] AND $ip[1]<=$rangeto[1]) AND\n\t($ip[2]>=$rangefrom[2] AND $ip[2]<=$rangeto[2]) AND\n\t($ip[3]>=$rangefrom[3] AND $ip[3]<=$rangeto[3])) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "b4b7c6ea627bdc7cb894f6b3012f9268", "score": "0.4777587", "text": "public function test_rule_valid_ip()\n\t{\n\t\t$this->assertTrue($this->run_rule('valid_ip', ''));\n\t\t$this->assertTrue($this->run_rule('valid_ip', '127.0.0.1'));\n\t\t$this->assertTrue($this->run_rule('valid_ip[ipv4]', '127.0.0.1'));\n\t\t$this->assertTrue($this->run_rule('valid_ip', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\t\t$this->assertTrue($this->run_rule('valid_ip[ipv6]', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\n\t\t$this->assertFalse($this->run_rule('valid_ip[ipv4]', '2001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\t\t$this->assertFalse($this->run_rule('valid_ip[ipv6]', '127.0.0.1'));\n\t\t$this->assertFalse($this->run_rule('valid_ip', 'H001:0db8:85a3:0000:0000:8a2e:0370:7334'));\n\t\t$this->assertFalse($this->run_rule('valid_ip', '127.0.0.259'));\n\t}", "title": "" }, { "docid": "00370d34bea0100904426c4264939a9d", "score": "0.4776", "text": "#[@test]\n public function addressIsShortened() {\n $this->assertEquals(\n 'febc:a574:382b::4592:4efe:9982',\n create(new Inet6Address('febc:a574:382b:0000:0000:4592:4efe:9982'))->asString()\n );\n }", "title": "" }, { "docid": "cfb62611161e2af95f8248b344254976", "score": "0.47713163", "text": "public function getFixedIpAddress()\n {\n $value = $this->get(self::FIXEDIPADDRESS);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "aad5e3e2ad23bd42e47437dc633abded", "score": "0.47642496", "text": "public static function isIpAddress(string $input = \"\"):bool {\n\n return filter_var($input, FILTER_VALIDATE_IP) ? true : false;\n\n }", "title": "" }, { "docid": "acce91106ad57ba76bc1754c3ce3bad4", "score": "0.47636825", "text": "function LDAPNetAddr($networkaddress)\n\t{\n\t\t$addr = \"\";\n\t\t$addrtype = intval(substr($networkaddress, 0, 1));\n\t\t$networkaddress = substr($networkaddress, 2); // throw away bytes 0 and 1 which should be the addrtype and the \"#\" separator\n\n\t\tif (($addrtype == 8) || ($addrtype = 9)) {\n\t\t\t// TODO 1.6: If UDP or TCP, (TODO fill addrport and) strip portnumber information from address\n\t\t\t$networkaddress = substr($networkaddress, (strlen($networkaddress)-4));\n\t\t}\n\n\t\t$addrtypes = array (\n\t\t\t'IPX',\n\t\t\t'IP',\n\t\t\t'SDLC',\n\t\t\t'Token Ring',\n\t\t\t'OSI',\n\t\t\t'AppleTalk',\n\t\t\t'NetBEUI',\n\t\t\t'Socket',\n\t\t\t'UDP',\n\t\t\t'TCP',\n\t\t\t'UDP6',\n\t\t\t'TCP6',\n\t\t\t'Reserved (12)',\n\t\t\t'URL',\n\t\t\t'Count'\n\t\t);\n\t\t$len = strlen($networkaddress);\n\t\tif ($len > 0)\n\t\t{\n\t\t\tfor ($i = 0; $i < $len; $i += 1)\n\t\t\t{\n\t\t\t\t$byte = substr($networkaddress, $i, 1);\n\t\t\t\t$addr .= ord($byte);\n\t\t\t\tif ( ($addrtype == 1) || ($addrtype == 8) || ($addrtype = 9) ) { // dot separate IP addresses...\n\t\t\t\t\t$addr .= \".\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ($addrtype == 1) || ($addrtype == 8) || ($addrtype = 9) ) { // strip last period from end of $addr\n\t\t\t\t$addr = substr($addr, 0, strlen($addr) - 1);\n\t\t\t}\n\t\t} else {\n\t\t\t$addr .= \"address not available.\";\n\t\t}\n\t\treturn Array('protocol'=>$addrtypes[$addrtype], 'address'=>$addr);\n\t}", "title": "" }, { "docid": "7b2fb348d2c08156e340be3a46c5b68c", "score": "0.47611776", "text": "public function getMatchingIpAddresses()\n {\n return array(\n array('192.168.33.10', array(\n '192.168.0.1/30',\n '253.236.138.172',\n '192.168.10.99/12',\n )),\n array('10.0.0.1', array(\n '255.255.255.255/17',\n '128.0.0.1/9',\n '10.0.0.1',\n )),\n array('d7c8:9855:70ac:756e::dc9:6856', array(\n 'd789:c67f:6a5c:3b5a:ca74:8f3b:50b2:fadd/45',\n '34f6:ed98:10be:d265:17ff:f062:fd70:a976',\n 'd7c8:9855:70ac:756e::dc9:6856',\n )),\n array('43f7:5937:c939:30ef:d710:185a:2c8d:c055', array(\n '0197:9d87:df58:866e:1d3c:bc5d:29dd:110e/12',\n '1b2f:f066:53d9:f87c:6552:d959:ee19:f184',\n '43f7:5937:c938:6d:924b:8485::/47',\n )),\n );\n }", "title": "" }, { "docid": "2d1d1ff92fa667a9c2967dab9a78ce8c", "score": "0.47589168", "text": "public function testReadHostSubnet()\n {\n\n }", "title": "" }, { "docid": "4462315f493b1b168879ad2c256c99d7", "score": "0.47518525", "text": "function _matchRange ($ip, $range)\n {\n $d = strpos ($range, '-');\n if ($d !== false) {\n $from = ip2long (trim (substr ($range, 0, $d)));\n $to = ip2long (trim (substr ($range, $d + 1)));\n\n $ip = ip2long ($ip);\n return (($ip >= $from) && ($ip <= $to));\n }\n\n return false;\n }", "title": "" } ]
4da66512cb9b5220e73b49a6a76d41b4
[Gettext] ngettext() alternative w/ optional context
[ { "docid": "0833657628bbdcea72a3b45fa1a2fd51", "score": "0.7210977", "text": "function _n($string1, $string2, $num, $context = '')\n{\n\treturn (mb_strlen($context)\n\t\t? npgettext($context, $string1, $string2, $num)\n\t\t: ngettext($string1, $string2, $num)\n\t);\n}", "title": "" } ]
[ { "docid": "398b4985267d106f8f173a6c950e1ea6", "score": "0.79461056", "text": "function gettext_n ($msgid1, $msgid2, $n)\n{\n return ngettext($msgid1, $msgid2, $n);\n}", "title": "" }, { "docid": "39821ac94fcdddcd842fc076f5fe6f41", "score": "0.76184225", "text": "function ngettext($msgid1, $msgid2, $n)\n{\n}", "title": "" }, { "docid": "8748486edc378c7b657b5c4210498498", "score": "0.74687964", "text": "function gettext_dn ($domain, $msgid1, $msgid2, $n)\n{\n return dngettext($domain, $msgid1, $msgid2, $n);\n}", "title": "" }, { "docid": "5f241e19ae30bde636233bd25d3a6792", "score": "0.7317456", "text": "function npgettext($context, $msgid1, $msgid2, $num) {\n\t\t$contextString = $context . \"\\004\" . $msgid1;\n\t\t$contextStringp = $context . \"\\004\" . $msgid2;\n\t\t$translation = ngettext($contextString, $contextStringp, $num);\n\t\tif ($translation === $contextString || $translation === $contextStringp) return $msgid1;\n\t\treturn $translation;\n\t}", "title": "" }, { "docid": "1f4ebafe08d31af164173d48c2821e15", "score": "0.7161589", "text": "function gettext_dcn ($domain, $msgid1, $msgid2, $n, $category)\n{\n return dcngettext($domain, $msgid1, $msgid2, $n, $category);\n}", "title": "" }, { "docid": "6e12baf1f1b313e98b9013fcd9b9c17f", "score": "0.7068755", "text": "function gettext($text){\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "1ca9709f200b13c6d7bd608c8ab93324", "score": "0.6893337", "text": "function pgettext($context, $msgid) {\n\t\t$contextString = $context . \"\\004\" . $msgid;\n\t\t$translation = gettext($contextString);\n\t\tif ($translation === $contextString) return $msgid;\n\t\treturn $translation;\n\t}", "title": "" }, { "docid": "dde9b5a26d1b6b26f1d3cc22f026167c", "score": "0.6870595", "text": "function __($msgid)\n {\n return Simplify::l10n()->gettext($msgid);\n }", "title": "" }, { "docid": "97a2b811552f166b52f853a071a8c454", "score": "0.6860565", "text": "function process_ngettext_strings_with_context( $translation, $single, $plural, $number, $context, $domain ) {\n $translation = $this->process_ngettext_strings( $translation, $single, $plural, $number, $domain );\n return $translation;\n }", "title": "" }, { "docid": "3043238f16c19a5a05c45072c2bfee4a", "score": "0.68202215", "text": "function woocommerce_process_ngettext_strings_with_context( $translation, $single, $plural, $number, $context, $domain ) {\n if ( $domain === 'woocommerce' ) {\n $translation = $this->process_ngettext_strings_with_context( $translation, $single, $plural, $number, $context, $domain );\n }\n return $translation;\n }", "title": "" }, { "docid": "66eecf1238dc5baa21abf933b5063a9b", "score": "0.6771259", "text": "function gettext_d ($domain, $message)\n{\n return dgettext($domain, $message);\n}", "title": "" }, { "docid": "3c7991543bd18a707aa6b192cb059396", "score": "0.6706986", "text": "function gettext_dc ($domain, $message, $category)\n{\n return dcgettext($domain, $message, $category);\n}", "title": "" }, { "docid": "0a2677543e02813cfd1029e1e3ef401d", "score": "0.6683732", "text": "function __($string, $context = '')\n{\n\treturn (mb_strlen($context)\n\t\t? pgettext($context, $string)\n\t\t: gettext($string)\n\t);\n}", "title": "" }, { "docid": "d74136be2ceff24d4fccd5000b8f3546", "score": "0.6641053", "text": "function __t()\n{\n\t//$translate=Frd::getGlobal(\"translate\");\n\tglobal $am;\n\n\t$args=func_get_args();\n\t$num=func_num_args();\n\n\tif($num == 0)\n\treturn '';\n\n\t$str=$args[0];\n\tif($num == 1)\n\t{\n\t\treturn $am->getTranslation($str);\n\t}\n\n\tunset($args[0]);\n\treturn $am->getTranslation($str, $args);\n}", "title": "" }, { "docid": "3743f1a408a2dc53330516945fe85de7", "score": "0.66028607", "text": "function translate()\n{\n global $config, $c;\n\n $args = func_get_args();\n $item = $args[0];\n\n if (strpos($item, 'translate:') === 0) { // Do we need to translate the message ?\n $item = substr($item, 10); // Grab the variable\n }\n if ( isset($c['Translator']->language[$item])) {\n $translated = $c['Translator']->language[$item];\n\n if (sizeof($args) > 1) {\n $args[0] = $translated;\n return call_user_func_array('sprintf', $args);\n }\n return $translated;\n }\n $translate_notice = ($config['translate_notice']) ? 'translate:' : '';\n return $translate_notice.$item; // Let's notice the developers this line has no translate text\n}", "title": "" }, { "docid": "217a7ae09622a755ce6c08268d9e2b48", "score": "0.659586", "text": "static function translate() {\n\t\t$args = func_get_args();\n\t\treturn SyndLib::translateArgs($args);\n\t}", "title": "" }, { "docid": "e2a763e21b7614a290668844259d1f5c", "score": "0.65377486", "text": "function ngettext($str,$str2,$number) {\n if ($number>1) {\n return $str2;\n } else {\n return $str;\n }\n }", "title": "" }, { "docid": "efe61a7e56f97f22ed4a4a00e7d0c49b", "score": "0.6511056", "text": "function _t($str /*[, mixed $args [, mixed $... ]]*/){\n\tglobal $lc_lang;\n\tglobal $lc_translation;\n\tglobal $lc_translationEnabled;\n\n\t$args \t= func_get_args();\n\t$str \t= array_shift($args);\n\t$str \t= trim($str);\n\n\tif($lc_translationEnabled == false){\n\t\treturn (count($args)) ? vsprintf($str, $args) : $str;\n\t}\n\n\t$po = session_get('po');\n\tif(!is_array($po)) $po = array();\n\t$po[$str] = '';\n\n\tif(isset($lc_translation[$lc_lang])){\n\t\t# check with lowercase\n\t\t$lowerStr = strtolower($str);\n\t\tif( isset($lc_translation[$lc_lang][$lowerStr]) && !empty($lc_translation[$lc_lang][$lowerStr]) ){\n\t\t\t$translated = $lc_translation[$lc_lang][$lowerStr];\n\t\t\tif(is_array($translated)) $str = $translated[0];\n\t\t\telse $str = $translated;\n\t\t}\n\t}\n\n\tif(isset($translated)) $po[$str] = $translated;\n\treturn (count($args)) ? vsprintf($str, $args) : $str;\n}", "title": "" }, { "docid": "17a41655e4360853d5946002a95439b2", "score": "0.6497074", "text": "final public function Lang() {\r\n $args = func_get_args();\r\n $msgid = array_shift($args);\r\n if (!array_key_exists($msgid, NetDesignModule::$langHash)) {\r\n $notify = $this->config->offsetGet('lang_notify');\r\n if (is_array($notify) && in_array($this->LangCurrentGet(), $notify)) $msgstr = sprintf('--[%s:%s]--', $this->LangCurrentGet(), $msgid);\r\n elseif (is_string($notify) && $this->LangCurrentGet() == $notify) $msgstr = sprintf('--[%s:%s]--', $this->LangCurrentGet(), $msgid);\r\n elseif (is_bool($notify) && $notify === true) $msgstr = sprintf('--[%s:%s]--', $this->LangCurrentGet(), $msgid);\r\n else $msgstr = $msgid;\r\n }\r\n else $msgstr = NetDesignModule::$langHash[$msgid];\r\n if (empty($args)) return $msgstr;\r\n return vsprintf($msgstr, $args);\r\n }", "title": "" }, { "docid": "9768b1fbcd2ac85d696f8b63b0419278", "score": "0.6488731", "text": "public function gettext($message)\n\t{\n\t\treturn gettext($message);\t\n\t}", "title": "" }, { "docid": "b95c3316b96e230eb4e59ac4314d5d68", "score": "0.6469078", "text": "function tpl_translate($args) {\n global $lang;\n return $lang->translate($args[0]);\n}", "title": "" }, { "docid": "8166ce40ccd2ef298f0bf493f0cac5c8", "score": "0.6451255", "text": "public static function __(/* ... */) {\r\n $args = func_get_args();\r\n return call_user_func_array(array(self::$translate, '__'), $args);\r\n }", "title": "" }, { "docid": "093b422dce0396332c1236be1c498cfd", "score": "0.64440644", "text": "function smarty_block_t($params, $text) {\n if (!isset($text)) {\n return $text;\n }\n // set escape mode, default html escape\n if (isset($params['escape'])) {\n $escape = $params['escape'];\n unset($params['escape']);\n } else {\n $escape = 'html';\n }\n // set plural parameters 'plural' and 'count'.\n if (isset($params['plural'])) {\n $plural = $params['plural'];\n unset($params['plural']);\n // set count\n if (isset($params['count'])) {\n $count = $params['count'];\n unset($params['count']);\n }\n }\n // get domain param\n if (isset($params['domain'])) {\n $domain = $params['domain'];\n unset($params['domain']);\n } else {\n $domain = null;\n }\n // get context param\n if (isset($params['context'])) {\n $context = $params['context'];\n unset($params['context']);\n } else {\n $context = null;\n }\n // use plural if required parameters are set\n if (isset($count) && isset($plural)) {\n // use specified textdomain if available\n if (isset($domain) && isset($context)) {\n $text = dnpgettext($domain, $context, $text, $plural, $count);\n } elseif (isset($domain)) {\n $text = dngettext($domain, $text, $plural, $count);\n } elseif(isset($context)) {\n $text = npgettext($context, $text, $plural, $count);\n } else {\n $text = ngettext($text, $plural, $count);\n }\n } else {\n // use specified textdomain if available\n if (isset($domain) && isset($context)) {\n $text = dpgettext($domain, $context, $text);\n } elseif (isset($domain)) {\n $text = dgettext($domain, $text);\n } elseif (isset($context)) {\n $text = pgettext($context, $text);\n } else {\n $text = gettext($text);\n }\n }\n // run strarg if there are parameters\n if (count($params)) {\n $text = smarty_gettext_strarg($text, $params);\n }\n switch ($escape) {\n case 'html':\n $text = nl2br(htmlspecialchars($text));\n break;\n case 'javascript':\n case 'js':\n // javascript escape\n $text = strtr($text, array('\\\\' => '\\\\\\\\', \"'\" => \"\\\\'\", '\"' => '\\\\\"', \"\\r\" => '\\\\r', \"\\n\" => '\\\\n', '</' => '<\\/'));\n break;\n case 'url':\n // url escape\n $text = urlencode($text);\n break;\n }\n return $text;\n}", "title": "" }, { "docid": "939a07d16de719bd7febe143e2be2e66", "score": "0.6429555", "text": "function _n($single, $plural, $number)\n {\n return Simplify::l10n()->ngettext($single, $plural, $number);\n }", "title": "" }, { "docid": "4cb74223bc6765da71cfdd53f6b92d52", "score": "0.63941383", "text": "function _x($text, $context, $textdomain = null) {\n\treturn __($text, $textdomain, $context); \t\n}", "title": "" }, { "docid": "eecdd3c3ffb5af84943ee2ed21b364bb", "score": "0.63709533", "text": "function process_gettext_strings_with_context( $translation, $text, $context, $domain ) {\n $translation = $this->process_gettext_strings( $translation, $text, $domain );\n return $translation;\n }", "title": "" }, { "docid": "cb8b0a101e86f3ab85c6ec776a81ff4d", "score": "0.63676465", "text": "function pexeto_text( $textid ) {\r\n\r\n\t\t$locale=get_locale();\r\n\t\t$int_enabled=pexeto_option( 'enable_translation' );\r\n\t\t$default_locale=pexeto_option( 'def_locale' );\r\n\r\n\t\tif ( $int_enabled && $locale!=$default_locale ) {\r\n\t\t\t//use translation - extract the text from a defined .mo file\r\n\t\t\treturn __( $textid, 'pexeto' );\r\n\t\t}else {\r\n\t\t\t//use the default text settings\r\n\t\t\treturn stripslashes( pexeto_option( $textid ) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9011b273d102fd36486e7e24ac73a62a", "score": "0.6356149", "text": "function dngettext($domain,$str1,$strn,$number) {\n return ($number==1 ? $str1 : $strn);\n }", "title": "" }, { "docid": "3e9256759115d34899530f0da44f3c68", "score": "0.6353306", "text": "function woocommerce_process_gettext_strings_with_context( $translation, $text, $context, $domain ) {\n if ( $domain === 'woocommerce' ) {\n $translation = $this->process_gettext_strings_with_context( $translation, $text, $context, $domain );\n }\n return $translation;\n }", "title": "" }, { "docid": "6608e174ad11042e8c5460a69d528777", "score": "0.6346492", "text": "function dgettext($domain,$str) {\n return $str;\n }", "title": "" }, { "docid": "df3b8bb709a0149d106446c71e7c24dd", "score": "0.6343618", "text": "public static function _(/* ... */) {\r\n $args = func_get_args();\r\n return call_user_func_array(array(self::$translate, '_'), $args);\r\n }", "title": "" }, { "docid": "664409a90428896ed0b51b24a9ff6fe1", "score": "0.6330423", "text": "public function translations();", "title": "" }, { "docid": "f03de74ae9f079875bb351d83284c64a", "score": "0.631264", "text": "function esc_html_nx( $single, $plural, $number, $context, $domain = 'default' ) {\n\t\t$translations = get_translations_for_domain( $domain );\n\t\t$translation = $translations->translate_plural( $single, $plural, $number, $context );\n\t\treturn esc_html( apply_filters( 'ngettext_with_context', $translation, $single, $plural, $number, $context, $domain ) );\n\t}", "title": "" }, { "docid": "c1e2a55b4e4283f2f52193c0fb5b6452", "score": "0.6287578", "text": "public static function _($str, $args=array()) {\n\t\t$o = Localization::GetInstance();\n\t\t$args = func_get_args();\n\t\treturn call_user_func_array(array($o, \"TranslateText\"), $args);\n\t}", "title": "" }, { "docid": "fe1f615cf46481f23df240b517e83276", "score": "0.62845993", "text": "function t($text, array $context = [])\n{\n return app('translator')->translate($text, $context);\n}", "title": "" }, { "docid": "652a6b79c6ce9a59baa6eefe0d32ab33", "score": "0.6273884", "text": "abstract function i18n(): string ;", "title": "" }, { "docid": "7f8d520c7c4eb0a9095ba51c6bbd98c8", "score": "0.62390876", "text": "function line($msgid, $args = NULL, $domain = NULL)\n\t{\n\t\tif ($domain !== NULL && $domain <> 'messages') {\n\t\t\tT_bindtextdomain($domain, APPPATH.'language');\n\t\t\t$msgstr = T_dgettext($domain, $msgid);\n\t\t} else {\n\t\t\t$msgstr = T_gettext($msgid);\n\t\t}\n\n\t\treturn ($args) ? vsprintf($msgstr, (array) $args) : $msgstr;\n\t}", "title": "" }, { "docid": "1eb33fe4d6e3f0d5634acfa7f39b9074", "score": "0.62310696", "text": "public function i18n() {}", "title": "" }, { "docid": "c52c6fcd0f97bfe4cb7430c09fc828f1", "score": "0.62236255", "text": "function _t($key, ...$args)\n{\n $translation = TranslateHelper::getTranslation($key);\n $result = vsprintf($translation, $args);\n\n return $result;\n}", "title": "" }, { "docid": "e473050f526e4138d120d1ed992cb6e4", "score": "0.6211425", "text": "function _n($textSingular, $textPlural, $count, $textdomain = null) {\n\treturn $count == 1 ? __($textSingular, $textdomain) : __($textPlural, $textdomain); \t\n}", "title": "" }, { "docid": "fd8454f9184b15737c3d6fed320da360", "score": "0.62027264", "text": "function hybrid_gettext( $translated, $text, $domain ) {\n\n\t/* Check if 'hybrid-core' is the current textdomain, there's no mofile for it, and the theme has a mofile. */\n\tif ( 'hybrid-core' == $domain && !hybrid_is_textdomain_loaded( 'hybrid-core' ) && hybrid_is_textdomain_loaded( hybrid_get_parent_textdomain() ) ) {\n\n\t\t/* Get the translations for the theme. */\n\t\t$translations = &get_translations_for_domain( hybrid_get_parent_textdomain() );\n\n\t\t/* Translate the text using the theme's translation. */\n\t\t$translated = $translations->translate( $text );\n\t}\n\n\treturn $translated;\n}", "title": "" }, { "docid": "8046742b97568d9ceb59996b4401bc43", "score": "0.6195255", "text": "public function __($message) {\n\n if (func_num_args() == 1) {\n if (function_exists('gettext')) {\n $message = gettext($message);\n }\n return $message;\n } elseif (func_num_args() == 2) {\n // simple replace\n $args = func_get_args();\n if (function_exists('gettext')) {\n $message = gettext($message);\n }\n return sprintf($message, $args[1]);\n } elseif (func_num_args() == 3) {\n // plural form\n $args = func_get_args();\n if (function_exists('ngettext')) {\n $message = ngettext($message, $args[1], $args[2]);\n }\n return sprintf($message, $args[2]);\n } elseif (func_num_args() > 3) {\n // plural form with additional params\n if (function_exists('ngettext')) {\n $message = call_user_func_array('ngettext', func_get_args());\n }\n $args = array_slice(func_get_args(), 2);\n return vsprintf($message, $args);\n }\n }", "title": "" }, { "docid": "607c4868d6dc86a928016de42386f273", "score": "0.6181697", "text": "function tribe_custom_theme_text_plurals_with_context ( $translation, $single, $plural, $number, $context, $domain ) {\n if ( ! check_if_tec_domains( $domain ) ) {\n return $translation;\n }\n /**\n * If you want to use the context in your logic, this is where you'd do it.\n * Make sure you return as part of this, so you don't call the function at the end and undo your changes!\n * Example (here, we don't want to do anything when the context is \"edit\", but if it's \"view\" we want to change it to \"Tribe\"):\n * if ( 'edit' === strtolower( $context ) ) {\n * return $translation;\n * } elseif( 'view' === strtolower( $context ) ) {\n * return \"cat\";\n * }\n *\n * You'd do something as well here for singular/plural. This could get complicated quickly if it has to interact with context as well.\n * Example:\n * if ( 1 === $number ) {\n * return \"cat\";\n * } else {\n * return \"cats\";\n * }\n * Feel free to use the same logic we use in tribe_custom_theme_text() above for key => value pairs for this logic.\n */\n // If we're not doing any logic up above, just make sure your desired changes are in the $custom_text array above (in the `tribe_custom_theme_text` filter. )\n if ( 1 === $number ) {\n return tribe_custom_theme_text ( $translation, $single, $domain );\n } else {\n return tribe_custom_theme_text ( $translation, $plural, $domain );\n }\n}", "title": "" }, { "docid": "cbac0fdb556a65eb71c798dfae4fd3e1", "score": "0.6163912", "text": "function tribe_custom_theme_text_with_context ( $translation, $text, $context, $domain ) {\n if ( ! check_if_tec_domains( $domain ) ) {\n return $translation;\n }\n /** If you want to use the context in your logic, this is where you'd do it.\n * Make sure you return as part of this, so you don't call the function at the end and undo your changes!\n * Example (here, we don't want to do anything when the context is \"edit\", but if it's \"view\" we want to change it to \"Tribe\"):\n * if ( 'edit' === strtolower( $context ) ) {\n * return $translation;\n * } elseif( 'view' === strtolower( $context ) ) {\n * return \"Tribe\";\n * }\n *\n * Feel free to use the same logic we use in tribe_custom_theme_text() above for key => value pairs for this logic.\n */\n // If we're not doing any logic up above, just make sure your desired changes are in the $custom_text array above (in the `tribe_custom_theme_text` filter. )\n return tribe_custom_theme_text ( $translation, $text, $domain );\n}", "title": "" }, { "docid": "775fe4ae7a13a1eff1631a4d9c567b06", "score": "0.615401", "text": "function hybrid_extensions_gettext( $translated, $text, $domain ) {\n\n\t/* Check if the current textdomain matches one of the framework extensions. */\n\tif ( in_array( $domain, array( 'breadcrumb-trail', 'custom-field-series', 'post-stylesheets', 'theme-layouts' ) ) ) {\n\n\t\t/* If the theme supports the extension, switch the translations. */\n\t\tif ( current_theme_supports( $domain ) ) {\n\n\t\t\t/* If the framework mofile is loaded, use its translations. */\n\t\t\tif ( hybrid_is_textdomain_loaded( 'hybrid-core' ) )\n\t\t\t\t$translations = &get_translations_for_domain( 'hybrid-core' );\n\n\t\t\t/* If the theme mofile is loaded, use its translations. */\n\t\t\telseif ( hybrid_is_textdomain_loaded( hybrid_get_parent_textdomain() ) )\n\t\t\t\t$translations = &get_translations_for_domain( hybrid_get_parent_textdomain() );\n\n\t\t\t/* If translations were found, translate the text. */\n\t\t\tif ( !empty( $translations ) )\n\t\t\t\t$translated = $translations->translate( $text );\n\t\t}\n\t}\n\n\treturn $translated;\n}", "title": "" }, { "docid": "03de1168b7f09128c1787231777fb597", "score": "0.61415553", "text": "function loadTextI18nStatic()\n { \n if (($i18n= mfcontext::getInstance()->getI18n()))\n { \n $i18n->addModuleMessageSource($this->get('module')); \n } \n }", "title": "" }, { "docid": "625044af2b6561fdc77ac871fbb66b98", "score": "0.61251694", "text": "function sq_textdomain($domain) {\n global $gettext_domain;\n $gettext_domain=textdomain($domain);\n return $gettext_domain;\n}", "title": "" }, { "docid": "b57290053dac61878fecfd8ca5bcf062", "score": "0.6101904", "text": "function _d($domain, $msgid)\n {\n return Simplify::l10n()->dgettext($domain, $msgid);\n }", "title": "" }, { "docid": "7c755434d22209f6fdf8ecd94b4dd5eb", "score": "0.6094662", "text": "function get_translate_string () {\n\t\t$this->_pot\t\t=\tnew PO();\n\t\t$this->generate_pot();\n\t\t$this->_pot->import_from_file(DEFAULT_LANGUAGE_PATH.'/engine.po',true );\n\t\treturn apply_filters( 'et_get_translate_string', $this->_pot->entries);\n\t}", "title": "" }, { "docid": "99a307e4943536c7c5643c756a91ad5c", "score": "0.60594445", "text": "function _t( $text, $domain = 'habari' )\n{ \n\treturn true;\n}", "title": "" }, { "docid": "1dc22275b0640d0976a61f175aeb00e7", "score": "0.60396725", "text": "function nl_langinfo ($item) {}", "title": "" }, { "docid": "3d88b4be777c02203ac454a2ae5c514d", "score": "0.6036268", "text": "function l10n($key)\n{\n global $lang, $conf;\n\n if ( ($val=@$lang[$key]) === null)\n {\n if ($conf['debug_l10n'] and !isset($lang[$key]) and !empty($key))\n {\n trigger_error('[l10n] language key \"'. $key .'\" not defined', E_USER_WARNING);\n }\n $val = $key;\n }\n\n if (func_num_args() > 1)\n {\n $args = func_get_args();\n $val = vsprintf($val, array_slice($args, 1));\n }\n\n return $val;\n}", "title": "" }, { "docid": "8656f867182ee67d4c2d475720878de9", "score": "0.6034531", "text": "public function ngettext($singular, $plural, $count)\n\t{\n\t\treturn ngettext($message, $plural, $count);\r\n\t}", "title": "" }, { "docid": "700177cd6d36a21aea1bd4e6becd1257", "score": "0.6026092", "text": "function it_exchange_authorizenet_set_textdomain() {\n\tload_plugin_textdomain( 'it-l10n-exchange-authorize_net', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );\n}", "title": "" }, { "docid": "f7bbec8e272ceba6aedab8d060362ae6", "score": "0.6012323", "text": "function locale_info ($item)\n{\n return nl_langinfo($item);\n}", "title": "" }, { "docid": "610886b65e3112536acee480776f66e3", "score": "0.5993876", "text": "function it_exchange_manual_purchases_set_textdomain() {\n\tload_plugin_textdomain( 'LION', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );\n}", "title": "" }, { "docid": "b13041bb68a491f55d247d06e36728ee", "score": "0.5970888", "text": "function itegfp_textdomain() {\n\tload_plugin_textdomain( 'it-l10n-exchange-addon-gravity-forms', false, ITEGFP::$dir . '/lang/' );\n}", "title": "" }, { "docid": "aafba8e23eb84374899e261eb3bcec17", "score": "0.5969222", "text": "public function ngettext($msg, $msg_plural, $count=0) {\n\t\tif(empty($msg) or empty($msg_plural) or !is_numeric($count)) {\n\t\t\treturn $msg;\n\t\t}\n if(!$this->parsed) $this->parseFile();\n\t\t\n\t\tif($this->mustFixQuotes()) {\n\t\t\t$msg = $this->fixQuotes($msg, 'escape');\n\t\t\t$msg_plural = $this->fixQuotes($msg_plural, 'escape');\n\t\t}\n\t\t\n\t\t$translated = $count == 1 ? $msg : $msg_plural; // Failover\n\t\t\n\t\tif(array_key_exists($msg, $this->translation_table)) {\n\t\t\t$plural_index = $this->getPluralIndex($count);\n\t\t\t$index_id = $plural_index !== FALSE ? $plural_index : $count - 1;\n\t\t\t$table = $this->translation_table[$msg];\n\t\t\tif(array_key_exists($index_id, $table)) {\n\t\t\t\t$translated = $table[$index_id];\n\t\t\t}\n }\n\t\t\n\t\tif($this->mustFixQuotes()) {\n\t\t\t$translated = $this->fixQuotes($translated, 'unescape');\n\t\t}\n\t\t\n\t\treturn $translated;\n\n }", "title": "" }, { "docid": "4b8c6f5978d76dbbe7cf933f7ba959e6", "score": "0.59636545", "text": "public function __($string, $args = array(), $catalogue = 'messages')\n {\n return $this->context->getI18N()->__($string, $args, $catalogue);\n }", "title": "" }, { "docid": "7718afb61907474aaad137c1116d4fd4", "score": "0.59622717", "text": "abstract public function translate($text);", "title": "" }, { "docid": "de6c65b82928d575cae09bc951ef36e8", "score": "0.59616053", "text": "function client_language()\n\t{\n\t\treturn call_user_func_array(array(\n\t\t\tget_instance()->gettext,\n\t\t\t'get_client'\n\t\t), func_get_args());\n\t}", "title": "" }, { "docid": "2b8d4ee0fabc63bddd0edb14b9b396a8", "score": "0.59599704", "text": "function __($text)\n{\n\tglobal $lang, $missing, $default_lang;\n\n\tif ($lang != null)\n\t{\n\t\tif (isset($lang['text'][$text]))\n\t\t{\n\t\t\techo $lang['text'][$text];\n\t\t\treturn;\n\t\t}\n\t\telse if (!in_array($text, $missing))\n\t\t\t$missing[] = $text;\n\t}\n\n\tif ($default_lang != null and isset($default_lang['text'][$text]))\n\t\techo $default_lang['text'][$text];\n\telse\n\t\techo $text;\n}", "title": "" }, { "docid": "08d161c072a5da3969d1abccb076d573", "score": "0.59483135", "text": "function nbi_localization() {\r\n\t// Place it in this plugin's \"languages\" folder and name it \"nbi-[value in wp-config].mo\"\r\n\tload_plugin_textdomain( 'nbi', false, '/ning-buddypress-importer/languages' );\r\n}", "title": "" }, { "docid": "32eff02661129dce9c66cbd1fd6b21c7", "score": "0.5920896", "text": "function translations() {\n\n\t\tAC()->add_script_data( 'interfaceL10n', array(\n\t\t\t'adminmenuTrashEmpty' => __( 'Drag items here', 'AC' ),\n\t\t\t'widgetsTrashPostfixAC' => __( '(pending deletion)', 'AC' ),\n\t\t\t'widgetsTrashPostfixWP' => __( '(disabled)', 'AC' ),\n\t\t\t'unsavedChangesChangeRole' => __( 'You have unsaved changes. Are you sure you want to edit another role?', 'AC' ),\n\t\t\t'unsavedChangesExit' => __( 'You have unsaved changes. Are you sure you want to exit?', 'AC' ),\n\t\t) );\n\t}", "title": "" }, { "docid": "9dc9c33e48c1e5599a2041b83778d26b", "score": "0.59079164", "text": "function trans($string)\n{\n $ci =& get_instance();\n return $ci->lang->line($string);\n}", "title": "" }, { "docid": "b9c5fc7be8d177ac0522cb920b59bacf", "score": "0.588413", "text": "public function provideTranslationParam(): string;", "title": "" }, { "docid": "991ab2e9db165f48d61d309ab263ecf2", "score": "0.58811545", "text": "function _e($text, $domain = 'default') {\n print t($text);\n}", "title": "" }, { "docid": "193d55dbf9346e7553c9c764c6bd753f", "score": "0.5874582", "text": "static function text() {\n\t\t$args = func_get_args();\n\t\treturn SyndLib::textArgs($args);\n\t}", "title": "" }, { "docid": "27c927aa99581444e0405a694fb0d485", "score": "0.5866493", "text": "function t($string)\n{\n\n\t//$lang = JFactory::getLanguage();\n\t//return $lang->_($string);\n\n\treturn Language::_($string, System\\Auth::identity()->languageId);\n}", "title": "" }, { "docid": "4f600e5e39bfcc2179d7f59f1721f184", "score": "0.58606607", "text": "function getTransliteration(){\n\treturn i18n_r(\"TRANSLITERATION\");\n}", "title": "" }, { "docid": "29e94538ed41bf8deacf475aa5694f69", "score": "0.5856868", "text": "function woocommerce_process_ngettext_strings( $translation, $single, $plural, $number, $domain ) {\n if ( $domain === 'woocommerce' ) {\n $translation = $this->process_ngettext_strings( $translation, $single, $plural, $number, $domain );\n }\n\n return $translation;\n }", "title": "" }, { "docid": "7cb19a7bda0a03d636f10959220b816d", "score": "0.58539003", "text": "static function translatable() {\n\n\t\tload_plugin_textdomain( 'peenapo-premium-txd', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/');\n\n\t}", "title": "" }, { "docid": "2c6571c21fcbf5225bf3a41d06a37f5e", "score": "0.5842674", "text": "abstract public function getLocalizedMessage();", "title": "" }, { "docid": "8343bd1f73fee5f39b05da78c283aa7b", "score": "0.5829124", "text": "function _dn($domain, $single, $plural, $number)\n {\n return Simplify::l10n()->dngettext($domain, $single, $plural, $number);\n }", "title": "" }, { "docid": "99c790097dcd4ad63fea1917e70d4baf", "score": "0.58208025", "text": "function core_text_domain() {\n\t\t$locale = apply_filters( 'wcpt_textdomain', get_locale() );\n\t\t$mofile = WCPT_DIR . \"wcpt-languages/wcpt-$locale.mo\";\n\n\t\tload_textdomain( 'wcpt', $mofile );\n\t}", "title": "" }, { "docid": "2018a91deea0608973e51b75aebdcaa7", "score": "0.5806402", "text": "public function trans($text, $vars = [], $domain = null);", "title": "" }, { "docid": "627a61127a894b2bd7e3d1cb3db48c11", "score": "0.57994884", "text": "function gettext_text_domain ($text_domain)\n{\n return textdomain($text_domain);\n}", "title": "" }, { "docid": "ff96033359b82de25f6cb06592c0b13a", "score": "0.57556385", "text": "function default_language()\n\t{\n\t\treturn call_user_func_array(array(\n\t\t\tget_instance()->gettext,\n\t\t\t'get_default'\n\t\t), func_get_args());\n\t}", "title": "" }, { "docid": "74c2eaca489c84bba290afa6d52544f5", "score": "0.5754829", "text": "function _e($string) {\n\tglobal $CONFIG_COMMON;\n\t\n\tif($CONFIG_COMMON['i18n']['enabled'])\n\t\techo T_gettext($string);\n\telse\n\t\techo $string;\n}", "title": "" }, { "docid": "6b99901c95f93d64f01e1fb8ff407abf", "score": "0.5739014", "text": "function localize(string $key, ...$args): string\n{\n return Localization::getInstance()->localize($key, $args);\n}", "title": "" }, { "docid": "5e3fb676da2b6b3d53882dc126f0d2b7", "score": "0.5738622", "text": "function __t()\n{\n\tglobal $aa_translate;\n\t$translate=$aa_translate->translate;\n\t\n\t$args=func_get_args();\n\t$num=func_num_args();\n\n\tif($num == 0)\n\treturn '';\n\n\t$str=$args[0];\n\tif($num == 1)\n\t{\n\t\treturn $translate->_($str);\n\t}\n\n\tunset($args[0]);\n\t$param='\"'.implode('\",\"',$args).'\"';\n\n\t$str='$ret=sprintf(\"'.$translate->_($str).'\",'.$param.');';\n\teval($str);\n\n\treturn $ret;\n}", "title": "" }, { "docid": "c7215aaecb00fcc494e9bbe281329d69", "score": "0.57169443", "text": "public function translate()\n {\n if (PUBLISHER_LITE === TRUE)\n {\n return '';\n }\n\n $type = ee()->TMPL->fetch_param('type');\n\n switch ($type)\n {\n case 'category': return $this->translate_category(); break;\n case 'phrase': return $this->translate_phrase(); break;\n case 'entry': return $this->translate_entry(); break;\n }\n }", "title": "" }, { "docid": "1e95929ac985c562e299632a546f28e1", "score": "0.57053465", "text": "function not_found_text(){\n /* check if qtranslate function exists */\n $sSpanish = \"No se encontró nada con los términos señalados.\";\n $sEnglish = \"Nothing found under the given terms.\";\n\n if(class_exists('QTX_Translator')) {\n /* Support for Spanish and English */\n $s404 = __(\"[:en]{$sEnglish}[:es]{$sSpanish}[:]\", \"front-end-ninja\");\n }else{\n\n $s404 = $sSpanish;\n \n } ?>\n <p><?php echo $s404; ?></p><?php \n }", "title": "" }, { "docid": "7745eeec5191f80fbe2151cb3bad6540", "score": "0.5687594", "text": "function nline($singular, $plural, $number, $domain = NULL)\n\t{\n\t\tif ($domain !== NULL AND $domain <> 'messages') {\n\t\t\tT_bindtextdomain($domain, APPPATH.'languages');\n\t\t\t$msgstr = T_dngettext($domain, $singular, $plural, $number);\n\t\t} else {\n\t\t\t$msgstr = T_ngettext($singular, $plural, $number);\n\t\t}\n\n\t\treturn sprintf($msgstr, (int) $number);\n\n\t}", "title": "" }, { "docid": "035581a3545d32dd393c45a42ccd6cec", "score": "0.56861436", "text": "function lang_or_i18n_get_translated($text, $mixedprefix, $suffix = \"\")\n {\n # First it checks if $text exists in the current $lang (after $text is sanitized and $mixedprefix - one by one if an array - and $suffix are added).\n # If not found in the $lang, it tries to translate $text using the i18n_get_translated function.\n\n $text=trim($text);\n global $lang;\n\n if (is_array($mixedprefix)) {$prefix = $mixedprefix;}\n else {$prefix = array($mixedprefix);}\n for ($n = 0;$n<count($prefix);$n++) {\n $langindex = $prefix[$n] . strip_tags(strtolower(str_replace(array(\", \", \" \", \"\\t\", \"/\", \"(\", \")\"), array(\"-\", \"_\", \"_\", \"and\", \"\", \"\"), $text))) . $suffix;\n\n # Checks if there is a $lang (should be defined for all standard field names / values).\n if (isset($lang[$langindex])) {\n $return = $lang[$langindex];\n break;\n }\n } \n if (isset($return)) {return $return;}\n else {return i18n_get_translated($text);} # Performs an i18n translation (of probably a custom field name / value).\n }", "title": "" }, { "docid": "9a1f6998018d3c3e5a3542e68b0d36f7", "score": "0.56752354", "text": "function __($msgid) {\n if (!isset($this->translation)) {\n // Detect the domain from the plugin install-path\n $groups = array();\n preg_match('`plugins/(\\w+)(?:.phar)?`', $this->getInstallPath(), $groups);\n\n $domain = $groups[1];\n if (!$domain)\n return $msgid;\n\n $this->translation = self::translate($domain);\n }\n list($__, $_N) = $this->translation;\n return $__($msgid);\n }", "title": "" }, { "docid": "070b3870be934f693da9bddc31714fe1", "score": "0.5673316", "text": "protected function get_translate_function() {\n\t\treturn function ( $string, $args = [], $context = null ) {\n\t\t\treturn $this->__( $string, $args, $context );\n\t\t};\n\t}", "title": "" }, { "docid": "cea20a395977ef68ad7c6a7e8b05d7a8", "score": "0.56673807", "text": "public static function _() {\n return call_user_func_array([Localizer::class, 'translate'], func_get_args());\n }", "title": "" }, { "docid": "a517a99151e99a3f8e230c286db37d95", "score": "0.5666535", "text": "function trans( $key, $vars = null ) {\n\treturn Language::translate( $key, $vars );\n}", "title": "" }, { "docid": "f3745138cb49354364bd7532e291def0", "score": "0.5658535", "text": "function get_text($key, $lang = null) {\n\t$locale = option('locale');\n\t$_LOCALE = option('_LOCALE');\n\t\n\tif($lang == null) :\n\t\tif(array_key_exists($key, $_LOCALE[$locale])) {\n\t\t\t// Current Language has the requested key\n\t\t\treturn $_LOCALE[$locale][$key];\n\t\t} else {\n\t\t\t// During develokpment let the developer know that the request key is not available\n\t\t\tif(option('env') === ENV_DEVELOPMENT)\n\t\t\t\treturn \"i18n:[$key not found]\";\n\t\t\telse {\n\t\t\t\t// Request the key from the default locale (which god willingly should contain all keys used)\n\t\t\t\t$default_locale = option('default_locale');\n\t\t\t\treturn $_LOCALE[$default_locale][$key]; \n\t\t\t}\n\t\t}\n\telse :\n\t\treturn $_LOCALE[$lang][$key];\n\tendif;\n}", "title": "" }, { "docid": "d400fa1080bdee9bc40fa9280c3a8a00", "score": "0.5654575", "text": "public function override_bp_l10n() {\r\n\t\tglobal $l10n;\r\n\r\n\t\t$mo = new MO();\r\n\r\n\t\t$mo->add_entry( array(\r\n\t\t\t'singular' => 'There was an error sending that message, please try again',\r\n\t\t\t'translations' => array(\r\n\t\t\t\t__ ('You cannot private message a user who is not following you', 'bp-pms-follow' )\r\n\t\t\t)\r\n\t\t) );\r\n\r\n\t\t$mo->add_entry( array(\r\n\t\t\t'singular' => 'Message was not sent. Please try again.',\r\n\t\t\t'translations' => array(\r\n\t\t\t\t__ ('You cannot private message a user who is not following you', 'bp-pms-follow' )\r\n\t\t\t)\r\n\t\t) );\r\n\r\n\t\t$mo->add_entry( array(\r\n\t\t\t'singular' => 'There was a problem sending that reply. Please try again.',\r\n\t\t\t'translations' => array(\r\n\t\t\t\t__ ('You cannot private message a user who is not following you', 'bp-pms-follow'\r\n\t\t\t)\r\n\t\t) ) );\r\n\r\n\t\t$mo->add_entry( array(\r\n\t\t\t'singular' => \"Send To (Username or Friend's Name)\",\r\n\t\t\t'translations' => array(\r\n\t\t\t\t__( \"Send To (Username or Followers' Name)\", 'bp-pms-follow' )\r\n\t\t\t)\r\n\t\t) );\r\n\r\n\t\tif ( isset( $l10n['buddypress'] ) ) {\r\n\t\t\t$mo->merge_with( $l10n['buddypress'] );\r\n\t\t}\r\n\r\n\t\t$l10n['buddypress'] = &$mo;\r\n\t\tunset( $mo );\r\n\t}", "title": "" }, { "docid": "0f2f36fd64b2fda65eabce80bfc133f0", "score": "0.5650412", "text": "public function translate(string $text): string\n {\n return __($text, $this->domain);\n }", "title": "" }, { "docid": "c13f5a095a63e2a4c19417ce1ce4b3c2", "score": "0.5649739", "text": "public function load_plugin_textdomain() {\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), 'carton' );\n\t\t$formal = 'yes' == get_option( 'carton_informal_localisation_type' ) ? 'informal' : 'formal';\n\n\t\tload_textdomain( 'carton', WP_LANG_DIR . \"/carton/carton-$locale.mo\" );\n\n\t\t// Load admin specific MO files\n\t\tif ( is_admin() ) {\n\t\t\tload_textdomain( 'carton', WP_LANG_DIR . \"/carton/carton-admin-$locale.mo\" );\n\t\t\tload_textdomain( 'carton', $this->plugin_path() . \"/i18n/languages/carton-admin-$locale.mo\" );\n\t\t}\n\n\t\tload_plugin_textdomain( 'carton', false, dirname( plugin_basename( __FILE__ ) ) . \"/i18n/languages/$formal\" );\n\t\tload_plugin_textdomain( 'carton', false, dirname( plugin_basename( __FILE__ ) ) . \"/i18n/languages\" );\n\t}", "title": "" }, { "docid": "9bc2a62748233e1dcf3f48a98218c82e", "score": "0.5638339", "text": "public function load_textdomain() {\n\n\t\t// load locale\n\t\t$locale = apply_filters( 'plugin_locale', get_locale(), 'lifterlms-paypal' );\n\n\t\t// load a lifterlms specific locale file if one exists\n\t\tload_textdomain( 'lifterlms-paypal', WP_LANG_DIR . '/lifterlms/lifterlms-paypal-' . $locale . '.mo' );\n\n\t\t// load localization files\n\t\tload_plugin_textdomain( 'lifterlms-paypal', false, dirname( plugin_basename( __FILE__ ) ) . '/i18n' );\n\n\t}", "title": "" }, { "docid": "4cc2d982b3ade8d16909bb696e5b9f54", "score": "0.56310457", "text": "function translate($message, $count = NULL)\n\t{\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "8d1d2643b3fec7f6ac0d15b40b7fcc14", "score": "0.5630056", "text": "function tfuse_qtranslate($text) {\r\n\t$text = html_entity_decode($text, ENT_QUOTES, 'UTF-8');\r\n if(function_exists('qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage')) {\r\n $text = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage($text);\r\n } \r\n return $text;\r\n}", "title": "" }, { "docid": "983c0359fdcc31eb266f7d405e513663", "score": "0.56245226", "text": "function process_ngettext_strings( $translation, $single, $plural, $number, $domain ) {\n if ( $number == 1 )\n $translation = $this->process_gettext_strings( $translation, $single, $domain );\n else\n $translation = $this->process_gettext_strings( $translation, $plural, $domain );\n\n return $translation;\n }", "title": "" }, { "docid": "c24b60210f712b5a062f7511e112f8c5", "score": "0.5617486", "text": "abstract public function translation($model, $lang);", "title": "" }, { "docid": "c426fb4c48d18951a7fcb6b237e964ab", "score": "0.5615229", "text": "public function load_plugin_textdomain() {\n\n\n }", "title": "" }, { "docid": "724b190423f01ad8b54aa6f0208548a4", "score": "0.56142026", "text": "public function ngettext($single, $plural, $number)\n {\n if ($this->short_circuit) {\n if ($number != 1) {\n return $plural;\n } else {\n return $single;\n }\n }\n\n // find out the appropriate form\n $select = $this->select_string($number);\n\n // this should contains all strings separated by nulls\n $key = $single . chr(0) . $plural;\n\n if ($this->enable_cache) {\n if (!array_key_exists($key, $this->cache_translations)) {\n return ($number != 1) ? $plural : $single;\n } else {\n $result = $this->cache_translations[$key];\n $list = explode(chr(0), $result);\n return $list[$select];\n }\n } else {\n $num = $this->find_string($key);\n if ($num == -1) {\n return ($number != 1) ? $plural : $single;\n } else {\n $result = $this->get_translation_string($num);\n $list = explode(chr(0), $result);\n return $list[$select];\n }\n }\n }", "title": "" } ]
babd0c6676e848ca3f9ca610b7ac1184
Filter the query by primary key
[ { "docid": "fe508d81228fe39a5efadb9a83d8dab0", "score": "0.5965469", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RemoteHistoryContaoPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" } ]
[ { "docid": "3fc4abf16e8f504bacbd7ebc4424550e", "score": "0.69997245", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RepositoryPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "3fc4abf16e8f504bacbd7ebc4424550e", "score": "0.69997245", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RepositoryPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "799c48a24fd4aad21105c41b54747f34", "score": "0.67881054", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ActividadPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "c2ac3bbeafd8b5ad46109057644b852e", "score": "0.67723244", "text": "public function filterByPrimaryKey($key)\n {\n throw new LogicException('The AliRccode object has no primary key');\n }", "title": "" }, { "docid": "3b065e0b861709c66c1513bf39f91c5c", "score": "0.6747045", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(MantenimientoPeer::ID_AUTO, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "ce758139664cd57c720f49560830e230", "score": "0.6703562", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliTsalehTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "0588d533f4c372d805d1901b45d2aecf", "score": "0.6679783", "text": "public static function find($primary_key) {\n $table_name = self::table_name();\n return $table_name::unique([\"id\" => intval($primary_key)]); // convert to where struct and pass\n }", "title": "" }, { "docid": "b1604839ea36ea0358fc2afaef10dba7", "score": "0.6587593", "text": "protected function sqlKeyFilter()\n {\n return \"`id` = @id@\";\n }", "title": "" }, { "docid": "b1604839ea36ea0358fc2afaef10dba7", "score": "0.6587593", "text": "protected function sqlKeyFilter()\n {\n return \"`id` = @id@\";\n }", "title": "" }, { "docid": "1c438f46bef0d817ba7039560c87a20e", "score": "0.65793425", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ParameterPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "e8b2946dd97728d12f115760791a4691", "score": "0.65737134", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(MapPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "dbdd55d104cb6c18e7ed5f190991da98", "score": "0.65600085", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(SocioTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "1fbeaf80c16f6aab878ff3acdbaa061b", "score": "0.6498273", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(SessionPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "45227c36decc8aafa6d72031088f8b53", "score": "0.6466938", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(PurchasePeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "540b1b07db7c3bfa681a4f0e03cccf60", "score": "0.64665353", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(CmsArticlePeer::ART_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f056d83f890b9cae671287959d012f97", "score": "0.6445104", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(UserPeer::UID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "ed317ff10e605e00084c79226c3d4d95", "score": "0.64432883", "text": "protected function sqlKeyFilter()\n\t{\n\t\treturn \"`id` = @id@\";\n\t}", "title": "" }, { "docid": "84c3864cf8a0d2dd9bbe2c8c05e6846b", "score": "0.64356583", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(GoodsInSalePeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "f5781180370b917df4b3aed41eb1d930", "score": "0.6427391", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TbpaisPeer::ID_PAIS, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f7bb1b062baf2ecad541d6077332b803", "score": "0.6420232", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ProductoPeer::ID_PRODUCTO, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "4c8ecbe3ddc783b5262f5fe173e2f082", "score": "0.63689435", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PjuridicaPeer::ID_PJURIDICA, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "9693cc8ae07826382d63fc55be38ef42", "score": "0.6353535", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ExpedienteanticipoPeer::IDEXPEDIENTEANTICIPO, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "64b5dc709e98b0f62c9a566adf4df29f", "score": "0.63516444", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliPpvTableMap::COL_AID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "65105b5e07360c04dd3932865ea65215", "score": "0.63436145", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(Oops_Db_AddressPeer::ID_ADDRESS, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "aa9582b98581ed15120d68c6a9d4a284", "score": "0.6342326", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ProveedormarcaPeer::IDPROVEEDORMARCA, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "dbcb1a6fcd598422f94255b2cd76451a", "score": "0.6340199", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PersonTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "e7afe52bd9c4bbcf6c0ed403e59e7970", "score": "0.633714", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(LibroPeer::IDLIBRO, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "16b68af8eea3225037e86a21be6460b2", "score": "0.6334417", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(DomainCheckPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "79402762bef52f4e643044c068d9ca73", "score": "0.63332385", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(CalendarPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "a5a5ddd801c757da685a3fc24432374c", "score": "0.6310407", "text": "public function primaryKey() : mixed;", "title": "" }, { "docid": "a3e49f6e2c99f90b0c5da9c4f1cb9476", "score": "0.6297379", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ItemPropertyPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "23001d99ae764907f62d9163cb6474f3", "score": "0.6294217", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UserPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "2d97ea1d43737dc07c1bd75910629ea4", "score": "0.6291724", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(sfGuardUserPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "0005c12bd9b217a1f79e6e0fc480b56f", "score": "0.62912554", "text": "protected function getRowByPrimaryKey($primary_key)\r\n {\r\n $where = array();\r\n\r\n foreach($this->explodePrimaryKey($primary_key) as $k => $v)\r\n {\r\n $where[] = \"$k = \" . $this->DB->quote($v);\r\n }\r\n\r\n $result = $this->DB->query(\"SELECT * FROM {$this->table} WHERE \" . implode(' AND ', $where));\r\n return $this->DB->fetch($result);\r\n }", "title": "" }, { "docid": "61b1306f5d49e40925500b3d337c8205", "score": "0.62908936", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(EafFormInfoPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "89935f29ee5835062adfd367fbce7a81", "score": "0.6285254", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(Oops_Db_ProductPeer::ID_PRODUCT, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "9cfd78bba303894311e6cc208aba0553", "score": "0.62817943", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ProyectoTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "d7b63393315002bcc7cf0c74cfac2e74", "score": "0.6246484", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ArticleTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "18376df52867c303c5838f4bd97ebab8", "score": "0.62351805", "text": "public function filterByPrimaryKey($key)\n {\n throw new LogicException('The Map object has no primary key');\n }", "title": "" }, { "docid": "6583d51bac3d4d3eb8c90975b495c490", "score": "0.62332463", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(FormsPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "b0cf20f35478a5d64ba6ca3b669014db", "score": "0.62262106", "text": "public function getPrimaryKeyWhere()\n {\n $M = $this->Model;\n $aPK = $M->PDODecorator->getPrimaryKey(true);\n $aData = array_intersect_key($this->aData, array_flip($aPK));\n if (count($aData) != count($aPK)) {\n throw new \\InvalidArgumentException(sprintf(\n '[Item] : Primary column[%s] Must Be Selected!!!',\n $M->PDODecorator->getPrimaryKey())\n );\n }\n return $aData;\n }", "title": "" }, { "docid": "b18c9b3ef1f2c3a4bf215b0f4d052731", "score": "0.6224304", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RemAanvraagTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "30c106fd5b7dd2ed5d6f3b53c65fb321", "score": "0.62186414", "text": "public static function whereKey($id)\n {\n }", "title": "" }, { "docid": "f1d17f6c548feb1746d2f32ba13d0ee5", "score": "0.6211308", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(SertifikasiPdPeer::ID_SERT_PD, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "3b30a025ef4fb123fb834da954a56dcb", "score": "0.6204781", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ResultadoTableMap::COL_RESULTADO_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "88edf0d380356b4c75d945935a11642b", "score": "0.6201747", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(DireccionRequerimientoPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "ceb860d05ecf9e59587e5fe471168373", "score": "0.6195864", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PlanPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "7912813ba243425c98ac44679b59e971", "score": "0.61904305", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ImpresionPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "09a4f45e9630cf0d515ac60c463c1aba", "score": "0.6174311", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ClientPrestationsPeer::CL_PREST_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "6a7e185bb9fc225800c432ce4781214d", "score": "0.61695427", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ContactPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "2e6e8fa92bb2fe83cea71423f83e2fb5", "score": "0.61633337", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliHoldheadTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "1ede714c2bdd0d6b3421f83d3404b87f", "score": "0.6163005", "text": "public function isPrimaryKey();", "title": "" }, { "docid": "521395c1b296d6a29cd8cf6e0744ce46", "score": "0.6152659", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(FairwayTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "3159589ae7e7fa92e1eeeb98d8fb9235", "score": "0.61522263", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ProfessorTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "5b861511b34bead8b4aa8294f76e4d22", "score": "0.6135865", "text": "abstract function getPrimaryKey();", "title": "" }, { "docid": "0f44de05991844f05d1acdd2d4afecf7", "score": "0.61258835", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(WorkflowPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "d192f6b146a13f03e0bb339c697d4b75", "score": "0.6120279", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RegistrationPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "e745244bad6b0d2d8c7e01bd9b8c5b35", "score": "0.61196184", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(UsuarioTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "23900ebd3918d4bc7050937fd687b1a2", "score": "0.60954124", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RegcodeTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "c68e48605ceae48901d4ac51b143c8b3", "score": "0.60944504", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(QuestionTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "3643d86e9ba3c2da18afaa3b3c738b3b", "score": "0.6082846", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PromocionPeer::IDPROMOCION, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "5069eade4bde812cd5cb9d440b30513d", "score": "0.6082469", "text": "public function indexToPrimaryKey()\n {\n return $this->index($this->primaryKey);\n }", "title": "" }, { "docid": "8286e44d67ecc4f39a1071c073ad1639", "score": "0.6061635", "text": "protected abstract static function getPrimaryKey();", "title": "" }, { "docid": "be12637e978236f52842e3c8769b05dc", "score": "0.6049971", "text": "public function filterSelect()\n\t{\n\t\t// Check for schema information\n\t\t$Schema = $this->session->__get('PRIMARY_SCHEMA');\n\t\t$Table = $this->session->__get('PRIMARY_TABLE');\n\n\t\tif(!empty($Schema) && !empty($Table))\n\t\t{\n\t\t\t// Get columns\n\t\t\t$columns = $this->session->__get('PULL_COLUMNS');\n\n\t\t\tif($columns)\n\t\t\t{\n\t\t\t\t// Process changes\n\t\t\t\t$phase = getPageVar('phase', 'str', 'GET');\n\n\t\t\t\tswitch($phase)\n\t\t\t\t{\n\t\t\t\t\tcase 'fetchFilterTypes':\n\t\t\t\t\t\t// Get the name of the column\n\t\t\t\t\t\t$column = getPageVar('column', 'str', 'GET');\n\n\t\t\t\t\t\tif($column)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Parse column provided\n\t\t\t\t\t\t\t$colParts = explode('-|-', $column);\n\t\t\t\t\t\t\t$colPartCount = count($colParts);\n\n\t\t\t\t\t\t\t// Needs to be three or four parts\n\t\t\t\t\t\t\tif($colPartCount === 3 || $colPartCount === 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$fkCol = null;\n\n\t\t\t\t\t\t\t\tif($colPartCount === 4)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$fkCol = $colParts[3];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// Get the column data type\n\t\t\t\t\t\t\t\t$id = $this->createColId($colParts[0], $colParts[1], $colParts[2], $fkCol);\n\n\t\t\t\t\t\t\t\tif(isset($columns[$id]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$Column = $columns[$id];\n\t\t\t\t\t\t\t\t\t$colType = $Column['COLUMN']->getColumnType();\n\n\t\t\t\t\t\t\t\t\t$filters = array();\n\n\t\t\t\t\t\t\t\t\tswitch($colType)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tcase 'bigint':\n\t\t\t\t\t\t\t\t\t\tcase 'decimal':\n\t\t\t\t\t\t\t\t\t\tcase 'double':\n\t\t\t\t\t\t\t\t\t\tcase 'float':\n\t\t\t\t\t\t\t\t\t\tcase 'int':\n\t\t\t\t\t\t\t\t\t\tcase 'smallint':\n\t\t\t\t\t\t\t\t\t\t\t$filters = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'EQUALS' => '=',\n\t\t\t\t\t\t\t\t\t\t\t\t'GT' => '>',\n\t\t\t\t\t\t\t\t\t\t\t\t'GTE' => '>=',\n\t\t\t\t\t\t\t\t\t\t\t\t'LT' => '<',\n\t\t\t\t\t\t\t\t\t\t\t\t'LTE' => '<='\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tcase 'date':\n\t\t\t\t\t\t\t\t\t\tcase 'datetime':\n\t\t\t\t\t\t\t\t\t\tcase 'time':\n\t\t\t\t\t\t\t\t\t\tcase 'timestamp':\n\t\t\t\t\t\t\t\t\t\t\t$filters = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'BEFORE' => 'Before',\n\t\t\t\t\t\t\t\t\t\t\t\t'BEFORE_INCL' => 'Before (Inclusive)',\n\t\t\t\t\t\t\t\t\t\t\t\t'AFTER' => 'After',\n\t\t\t\t\t\t\t\t\t\t\t\t'AFTER_INCL' => 'After (Inclusive)',\n\t\t\t\t\t\t\t\t\t\t\t\t'EQUALS' => 'Equals'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tcase 'tinyint':\n\t\t\t\t\t\t\t\t\t\t\t$filters = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'FALSE' => 'False',\n\t\t\t\t\t\t\t\t\t\t\t\t'TRUE' => 'True'\n\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\t\t// Varchar, Char, Enum Typically\n\t\t\t\t\t\t\t\t\t\t\t$filters = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'CONTAINS' => 'Contains',\n\t\t\t\t\t\t\t\t\t\t\t\t'EQUALS' => 'Equals',\n\t\t\t\t\t\t\t\t\t\t\t\t'LIKE' => 'Like',\n\t\t\t\t\t\t\t\t\t\t\t\t'STARTS_WITH' => 'Starts With',\n\t\t\t\t\t\t\t\t\t\t\t\t'ENDS_WITH' => 'Ends With'\n\t\t\t\t\t\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}\n\n\t\t\t\t\t\t\t\t\t$this->set('filters', $filters);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// This is all we need here\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'invalidColumn':\n\t\t\t\t\t\tpushMessage('An invalid column was specified, please try again.', 'warning');\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'missingInfo':\n\t\t\t\t\t\tpushMessage('A required filter option and/or value were missing, please try again.', 'warning');\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'proceed':\n\t\t\t\t\t\t// Get inputs, as long as they're provided\n\t\t\t\t\t\t$filters = array();\n\t\t\t\t\t\t$process = true;\n\t\t\t\t\t\t$count = 1;\n\n\t\t\t\t\t\twhile($process)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$filterAndOrName = \"filter-andor_$count\";\n\t\t\t\t\t\t\t$filterColName = \"filter-col_$count\";\n\t\t\t\t\t\t\t$filterOptionName = \"filter-option_$count\";\n\t\t\t\t\t\t\t$filterValueName = \"filter-value_$count\";\n\n\t\t\t\t\t\t\t$column = getPageVar($filterColName, 'str', 'POST', false);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!empty($column))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Get Column Object\n\t\t\t\t\t\t\t\tif(isset($columns[$column]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$FilterCol = $columns[$column];\n\n\t\t\t\t\t\t\t\t\t// Get the option, andor, and values\n\t\t\t\t\t\t\t\t\t$option = getPageVar($filterOptionName, 'str', 'POST', false);\n\t\t\t\t\t\t\t\t\t$value = getPageVar($filterValueName, 'str', 'POST', false);\n\t\t\t\t\t\t\t\t\t$andOr = getPageVar($filterAndOrName, 'str', 'POST', false);\n\n\t\t\t\t\t\t\t\t\tif($option && ($value || (!$value && ($option == 'FALSE' || $option == 'TRUE'))))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// If no AndOr, then assume AND\n\t\t\t\t\t\t\t\t\t\tif(!$andOr && $count == 1)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$andOr = 'FIRST';\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$andOr = 'AND';\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t// Store values in array\n\t\t\t\t\t\t\t\t\t\t$filters[] = array('COLUMN' => $FilterCol, 'OPTION' => $option, 'VALUE' => $value, 'ANDOR' => $andOr);\n\n\t\t\t\t\t\t\t\t\t\t// Continue\n\t\t\t\t\t\t\t\t\t\t$count++;\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// Throw error\n\t\t\t\t\t\t\t\t\t\tredirect('DataPull', 'filterSelect', array('phase' => 'missingInfo'));\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// Throw error\n\t\t\t\t\t\t\t\t\tredirect('DataPull', 'filterSelect', array('phase' => 'invalidColumn'));\n\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// No column value, so we're done\n\t\t\t\t\t\t\t\t$process = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Store filters in session and redirect\n\t\t\t\t\t\t$this->session->__set('PULL_FILTERS', $filters);\n\n\t\t\t\t\t\tredirect('DataPull', 'dataReview');\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$this->set('schemaName', $Schema->getSchemaName());\n\t\t\t\t$this->set('tableName', $Table->getTableFriendlyName());\n\t\t\t\t$this->set('columns', $columns);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// We have a schema and table, but no columns. Redirect back to dataSelect\n\t\t\t\tredirect('DataPull', 'dataSelect', array('phase' => 'noCols'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// User hasn't started yet. Redirect to start\n\t\t\tredirect('DataPull', 'dsSelect', array('phase' => 'noSchema'));\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7dd280be4e01ed0886b76eaf73695ae4", "score": "0.60453784", "text": "protected function sqlKeyFilter()\n\t{\n\t\treturn \"`ReceiptNo` = @ReceiptNo@ AND `ClientSerNo` = @ClientSerNo@ AND `ChargeCode` = @ChargeCode@ AND `ItemID` = '@ItemID@'\";\n\t}", "title": "" }, { "docid": "11b48a077d9de449531067bca76d028a", "score": "0.6036233", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PlansTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "52917f6291004c7b7997977e2ef317b4", "score": "0.60349196", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EventPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "52917f6291004c7b7997977e2ef317b4", "score": "0.60349196", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EventPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "106ffeac62be9c14877e5ec64faeaa6b", "score": "0.6032644", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliFmbonusTableMap::COL_AID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "d522f8fe690c6c9be40a654b0d2bc60a", "score": "0.6029875", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(QueryParametersTableMap::COL_QRP_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "2b8d05f18867dd64436f7825aa0e257a", "score": "0.60265344", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(UnitPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "5f5c5e0034031173d8103c9559b25875", "score": "0.6024892", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliSmbonusTableMap::COL_AID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "ad8c03830c63ff3d4acf3d806d2b4eea", "score": "0.6022841", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(EventPeer::EVENTID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "ecb0f6648ed63238cf9fa4c8e0da6268", "score": "0.60190827", "text": "public function filter()\n\t{\n\t\treturn implode( ' AND ', array_map( function( $col ) { return \"$col=?\"; }, array_keys( $this->_id ) ) );\n\t}", "title": "" }, { "docid": "5471c49dc1e8b1a06b994e4af9dd4b78", "score": "0.6017292", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ClientePeer::IDCLIENTE, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "90cdd39bb3a89bb4aa2deaff29f6ab33", "score": "0.60086125", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(rlsTradeNamePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "1ef09a67ddeea46f591dec4b2368c261", "score": "0.59974205", "text": "abstract public function primaryKey(): string;", "title": "" }, { "docid": "c0caba2ba4f5e390a8b2f9798f11cbde", "score": "0.59973484", "text": "function SqlKeyFilter() {\n\t\treturn \"`inv_id` = @inv_id@\";\n\t}", "title": "" }, { "docid": "3fc567691320dd3504c32f9ba431452c", "score": "0.5993785", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(OrdencompradetallePeer::IDORDENCOMPRADETALLE, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "8b7da208e33eec200cf3c740055e321f", "score": "0.5991055", "text": "abstract public function byPk(string $query);", "title": "" }, { "docid": "d65a1746dcc2ee6e1dca0e58821671e6", "score": "0.59905046", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ActionPropertyPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f62d75dd6486b29bf607e5e611617b03", "score": "0.59839386", "text": "function get_by_key() {\t\n\t\t$sql = \"SELECT * \n\t\t\t\tFROM evs_database.evs_identification\n\t\t\t\tWHERE idf_id=?\";\n\t\t$this->db->query($sql, array($this->idf_id));\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "a394e7c0c5b538997c8439f9b6f21ed2", "score": "0.59768987", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(MetodoPagoTableMap::ID_PAGO, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "45803f66bef818f3afa6bf808e14b429", "score": "0.5976074", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TemplateUnPeer::TEMPLATE_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "63d5e552d67d9407a16b04d4f524384f", "score": "0.5973072", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(QuestionsTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "1d87899aa9b50683d7a2008ee3f34b65", "score": "0.5953263", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ArticleTableMap::COL_ARTICLE_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "267cc3bc8a28a2ad74f832244b4b6fe6", "score": "0.59488606", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ActividadFinalizadaPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "16649c3841988f12188dd1da39109a83", "score": "0.59444565", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(MentorTableMap::COL_MENTOR_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "7badaf2e4f65a226a18f60e262feb0d5", "score": "0.59433144", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TVShowTableMap::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "74a2c8d267e7538ae55514e247ea4105", "score": "0.59432805", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TblclienteTableMap::COL_CLIENTEID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "27804be9fe25bd1078e5c288b4610dbb", "score": "0.59388906", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(DocumentJobPeer::DOCUMENT_JOB_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "fa031d6bcd20d6b22130dad059d4372a", "score": "0.5923004", "text": "function SqlKeyFilter() {\n\t\treturn \"`personID` = @personID@\";\n\t}", "title": "" }, { "docid": "814a9e85018fdccb6696a603a29268a4", "score": "0.5922647", "text": "public function filterByPrimaryKey($key)\n {\n return $this->addUsingAlias(CollectorGeocacheArchivePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "5aa229151a832e3d4c23a7977446b12e", "score": "0.59207857", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(GsArtikelenPeer::ZINUMMER, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f4b81211fd1aa43de0d750043360344b", "score": "0.59124565", "text": "private function _fetch_primary_key()\n {\n if($this->primaryKey == NULl)\n {\n $this->primaryKey = $this->db->query(\"SHOW KEYS FROM `\".$this->_table.\"` WHERE Key_name = 'PRIMARY'\")->row()->Column_name;\n }\n }", "title": "" }, { "docid": "f41487974ad943dc062b606ef593fa62", "score": "0.5907375", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(ActividadPeer::ID, $keys, Criteria::IN);\n\t}", "title": "" }, { "docid": "078474cc565c136c546375605b9d2734", "score": "0.58966994", "text": "public function returnFindByPK($id);", "title": "" }, { "docid": "becf1feb77239b248179af062fa2ba5b", "score": "0.58943707", "text": "protected function sqlKeyFilter()\n\t{\n\t\treturn \"`EmployeeID` = @EmployeeID@\";\n\t}", "title": "" }, { "docid": "a8c37986e9cf5eeb94fc419180a88dfb", "score": "0.5893261", "text": "public function filterByUser(int $id);", "title": "" }, { "docid": "a5a4f8c2496a1fef75c75c43a658e395", "score": "0.58762574", "text": "public function filterByPrimaryKeys($keys)\n\t{\n\t\treturn $this->addUsingAlias(RepositoryPeer::ID, $keys, Criteria::IN);\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "7fe71b424754f5333feb221cb26ceb89", "score": "0.0", "text": "public function store(Request $request)\n {\n $course = new Course();\n $course->name = $request->name;\n $course->group_id = $request->group_id;\n $course->hash = md5(time()).rand(0, 999);\n\n Course::create($course->toArray());\n\n $user = Auth::user();\n $courseId = Course::all()->where('hash', $course->hash)->pluck('id')->first();\n\n DB::table('course_user')->insert(\n ['user_id' => $user->id, 'course_id' => $courseId, 'subject_id' => $request->subject_id]\n );\n\n return response()->json([\n 'created' => 'Course was added'\n ], 201);\n }", "title": "" } ]
[ { "docid": "6fd12939ad43e0b8465f714deb95dc17", "score": "0.68325156", "text": "protected function storeResources()\n {\n try {\n $this->storage->get('version');\n } catch (\\Exception $e) {\n $this->storeVersion();\n }\n\n $resources = $this->resources(['format' => 'json']);\n $this->storage->put('resources', $resources);\n }", "title": "" }, { "docid": "d0bfac5fb1dbb1b2eafc131014133a72", "score": "0.67544043", "text": "public function store()\n\t{\n $this->resourceForm->validate(Input::all());\n $resource = Resource::create(\n Input::only('id_number', 'first_name', 'last_name', 'time_zone', 'extension_num', 'extension_pin', 'primary_phone', 'secondary_phone', 'active')\n );\n return Redirect::to('resources');\n\t}", "title": "" }, { "docid": "53b23500f551bbef6ad4a65447665f8a", "score": "0.6527683", "text": "public function store() {}", "title": "" }, { "docid": "35ea40baf62f42e40aaed808f3011b13", "score": "0.64787066", "text": "public function store()\n {\n if (!$this->id) {\n $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "14f9113e10ab16db8b93522fa5bed4d4", "score": "0.6436744", "text": "public function store() {\n // TODO: Implement store() method.\n }", "title": "" }, { "docid": "26fc32d420262b338412a368e56f3c24", "score": "0.64273345", "text": "protected function store() {\n if (count($this->storage) > 0) {\n set_transient($this->hash, $this->storage, self::$expire);\n } else {\n delete_transient($this->hash);\n }\n }", "title": "" }, { "docid": "6cd571f4466b5901b43a82652b434634", "score": "0.64145803", "text": "public function store(CreateRequest $request)\n {\n Resource::create($request->only(['name', 'type','resource_starts','resource_ends','exclude_weekends']));\n\n return redirect(route('resources.index'))->withSuccess('Resource created!');\n }", "title": "" }, { "docid": "635cb61885cca5673270994e1d7049ef", "score": "0.64108855", "text": "public function store()\n {\n return $this->sendResponse(\n new $this->resource($this->model->create($this->request->all())),\n 'successfully created.',\n true,\n 201\n );\n }", "title": "" }, { "docid": "8f52d18a0b337a866245dca6174b31f7", "score": "0.6383452", "text": "public function store()\n {\n $data = request()->validate([\n 'name' => 'required|unique:storage_locations',\n 'nickname' => 'nullable',\n 'description' => 'required',\n 'storage_type_id' => 'exists:storage_types,id'\n ]);\n\n $location = StorageLocation::create($data);\n\n session()->flash('flash', ['message' => 'Storage Location added successfully!', 'level' => 'success']);\n\n return redirect(route('storage.locations.index'));\n }", "title": "" }, { "docid": "e6a2ecff8be90a692566c0ac3bcd7773", "score": "0.6366602", "text": "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\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": "" }, { "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": "" } ]
08b29ab210653c2e7723f938241e321b
Load data from DB
[ { "docid": "c86bbd24921d79a0b1c1df10ade0b1c7", "score": "0.0", "text": "public function index() {\n $email = $this->Setting->findByType('EMAIL');\n $theme = $this->Setting->findByType('THEME');\n $ogone = $this->Setting->findByType('OGONE');\n $doc_categories = $this->Setting->findByType('DOCCATEGORY');\n\n // Adapt data for the view\n $ogone = unserialize($ogone['Setting']['value']);\n $this->loadModel('Theme');\n $available_themes = $this->Theme->getThemes();\n $email = unserialize($email['Setting']['value']);\n\n // Send data to the view\n $this->set(compact('email', 'available_themes', 'theme', 'ogone', 'doc_categories'));\n }", "title": "" } ]
[ { "docid": "b148a2d7da7d497af0da61f07209d38c", "score": "0.7798965", "text": "protected function loadData()\n {\n $this->data = $this->mapper->fetchObjects($this->query);\n }", "title": "" }, { "docid": "c81331d5843db3927a05bd2008dbcb03", "score": "0.775951", "text": "public function loadData();", "title": "" }, { "docid": "dc13ba3de421fd752cd1139e7c53a05e", "score": "0.76919574", "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": "7bf7bf0c157124ace80651a9cc8e79d8", "score": "0.7247435", "text": "function LoadDB() {\r\n\t\t$this->connection->query($this->users);\r\n\t\t$this->connection->query($this->classes);\r\n\t\t$this->connection->query($this->grades);\r\n\t\t$this->connection->query($this->admin);\r\n\t}", "title": "" }, { "docid": "030577c23ded7b0733b8e9496bdbe84e", "score": "0.71144116", "text": "public function _loadFromDb(){\n\t\tif (empty($this->_loadData)){\n\t\t\t$statement = 'SELECT currency,rate FROM ' . self::DB_TABLE; \n\t\t\t$query = $this->_db->query($statement);\n\t\t\t$this->_loadData = $query->fetchAll(PDO::FETCH_OBJ);\n\t\t}\n\t\treturn $this->_loadData; \n\t}", "title": "" }, { "docid": "6f8f6ffabcd84e7d4500936f2e55e4b0", "score": "0.70988375", "text": "function loadTemplateDataFromDb(){\n\t\tif(!empty($this->table))\n\t\t{\n\t\t\t$q = $this->prepareSQL();\n\t\t\tif($entry = dbGetRow($q))\n\t\t\t{\n\t\t\t\tforeach($entry as $f_key => $f_val)\n\t\t\t\t{\n\t\t\t\t\tif($f_key != 'object_id' && isset($this->_properties['fields'][$f_key]) && $this->_properties['fields'][$f_key]['type'] == 'array' && $f_val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->object_data['data'][$f_key] = unserialize($f_val);\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->object_data['data'][$f_key] = $f_val;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!empty($this->arrayTables))\n\t\t{\n\t\t\tforeach($this->arrayTables as $fieldName => $tableName)\n\t\t\t{\n\t\t\t\t$q = '\n\t\t\t\tSELECT\n\t\t\t\t\t*\n\t\t\t\tFROM\n\t\t\t\t\t`' . $tableName . '`\n\t\t\t\tWHERE\n\t\t\t\t\t`object_id` = \"' . $this->object_data['id'] . '\"\n\t\t\t\tORDER BY\n\t\t\t\t\t`_key`\n\t\t\t\t';\n\t\t\t\t$this->object_data['data'][$fieldName] = dbGetAll($q, '_key');\n\t\t\t}\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "8232466c44d102a71a2567fd29277751", "score": "0.70272475", "text": "public function load()\n {\n $this->data = $this->getData();\n }", "title": "" }, { "docid": "9b9696036c254bf02326bdaece11d3eb", "score": "0.701993", "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": "ddca4f2272e719045f3a0f928c1dd97f", "score": "0.7001663", "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": "5e405cf2017d0437c9be679452952e52", "score": "0.70008063", "text": "private function load_data(){\n\n\t}", "title": "" }, { "docid": "e598306557eb8a852004848a7dbc7511", "score": "0.698255", "text": "function load(){\n\t\t$res = $this->db->getRow(\"SELECT * FROM \" . $this->tablename . \" WHERE \" . $this->idKey . \" = '\" . $this->id . \"'\",DB_FETCHMODE_ASSOC);\n\t\tif(DB::isError($res)){\n\t\t\traiseError($res);\n\t\t}\n\t\tif (count($res) > 0) {\n $this->data = $res;\n if($this->data[$this->idKey] != $this->id) {\n raiseError(\"returned id does not match with original id\");\n }\n } else {\n\t\t\tlogError(\"No such id: '$this->id' in '$this->tablename'\");\n $this->data = array();\n }\n\t}", "title": "" }, { "docid": "3d7c57fabaf0434603a1aaa5f007af71", "score": "0.69602865", "text": "public function load()\n\t{\n\t\t$this->list_table->load();\n\t}", "title": "" }, { "docid": "86c374c90e5cfd845d9beb3adb296483", "score": "0.69265974", "text": "protected function loadData()\n\t{\n\t\t// In real applications, data should come from database using an SQL SELECT statement.\n\t\t// In the following tabular data, field 'ISBN' is the primary key.\n\t\t// All update and delete operations should come with an 'id' value in order to go through.\n\t\tif(($this->_data=$this->getViewState('Data',null))===null)\n\t\t{\n\t\t\t$this->_data=array(\n\t\t\t\tarray(\n\t\t\t\t\t'ISBN'=>'0596007124',\n\t\t\t\t\t'title'=>'',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ISBN'=>'0201633612',\n\t\t\t\t\t'title'=>'Design Patterns: Elements of Reusable Object-Oriented Software',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ISBN'=>'0321247140',\n\t\t\t\t\t'title'=>'Design Patterns Explained : A New Perspective on Object-Oriented Design',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ISBN'=>'0201485672',\n\t\t\t\t\t'title'=>'Refactoring: Improving the Design of Existing Code',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ISBN'=>'0321213351',\n\t\t\t\t\t'title'=>'Refactoring to Patterns',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ISBN'=>'0735619670',\n\t\t\t\t\t'title'=>'Code Complete',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'ISBN'=>'0321278658 ',\n\t\t\t\t\t'title'=>'Extreme Programming Explained : Embrace Change',\n\t\t\t\t),\n\t\t\t);\n\t\t\t$this->saveData();\n\t\t}\n\t}", "title": "" }, { "docid": "04d8f1dce883edf7c03c510a8e43cce5", "score": "0.6856827", "text": "protected function loadData()\n\t{\n\t\t// In real applications, data should come from database using an SQL SELECT statement.\n\t\t// In the following tabular data, field 'ISBN' is the primary key.\n\t\t// All update and delete operations should come with an 'id' value in order to go through.\n\t\tif (($this->_data = $this->getViewState('Data', null)) === null) {\n\t\t\t$this->_data = [\n\t\t\t\t[\n\t\t\t\t\t'ISBN' => '0596007124',\n\t\t\t\t\t'title' => '',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'ISBN' => '0201633612',\n\t\t\t\t\t'title' => 'Design Patterns: Elements of Reusable Object-Oriented Software',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'ISBN' => '0321247140',\n\t\t\t\t\t'title' => 'Design Patterns Explained : A New Perspective on Object-Oriented Design',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'ISBN' => '0201485672',\n\t\t\t\t\t'title' => 'Refactoring: Improving the Design of Existing Code',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'ISBN' => '0321213351',\n\t\t\t\t\t'title' => 'Refactoring to Patterns',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'ISBN' => '0735619670',\n\t\t\t\t\t'title' => 'Code Complete',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'ISBN' => '0321278658 ',\n\t\t\t\t\t'title' => 'Extreme Programming Explained : Embrace Change',\n\t\t\t\t],\n\t\t\t];\n\t\t\t$this->saveData();\n\t\t}\n\t}", "title": "" }, { "docid": "7e09d8b6dae32d77c3cad34f7b98b26e", "score": "0.6855769", "text": "public function load()\n {\n $this->data = $this->read();\n }", "title": "" }, { "docid": "04284c832d83c06cbcdeae3993f8164c", "score": "0.6794032", "text": "public function _load() {\n $query = new Query(\n \"SELECT * \n FROM `\". Hovedleder::TABLE .\"`\n WHERE `arrangement_fra` = '#fra'\n AND `arrangement_til` = '#til'\",\n [\n 'fra' => $this->getArrangementFraId(),\n 'til' => $this->getArrangementTilId()\n ]\n );\n $res = $query->run();\n\n while( $row = Query::fetch($res ) ) {\n $this->add(\n HovedLeder::getByData(\n $this->getArrangementFraId(),\n $this->getArrangementTilId(),\n intval($row['l_id']),\n $row['dato']\n )\n );\n }\n }", "title": "" }, { "docid": "092650ab0d99d6fb673d8027d69184d2", "score": "0.677974", "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": "12af67b19e0e7a0f2b929b6d8d577d0e", "score": "0.6733517", "text": "public function loadDatabaseData()\n\t\t{\n\t\t\t// first load the website scope config data\n\t\t\t$defaultConfig = \\Z::getModel('core/config/data')->getCollection()\n\t\t\t\t\t->addFieldToFilter('scope', 'default')\n\t\t\t\t\t->addFieldToFilter('scope_id', '0');\n\n\t\t\t// first load the website scope config data\n\t\t\t$websiteConfig = \\Z::getModel('core/config/data')->getCollection()\n\t\t\t\t\t->addFieldToFilter('scope', 'website')\n\t\t\t\t\t->addFieldToFilter('scope_id', \\Z::getWebsiteView()->getWebsite()->getId());\n\n\t\t\t// then replace it with the website_view scope, if any data is defined\n\t\t\t$websiteViewConfig = \\Z::getModel('core/config/data')->getCollection()\n\t\t\t\t\t->addFieldToFilter('scope', 'website_view')\n\t\t\t\t\t->addFieldToFilter('scope_id', \\Z::getWebsiteView()->getId());\n\n\t\t\t$this->_flatData = array_replace($this->_flatData,\n\t\t\t\t\t$defaultConfig->toFlatArray(),\n\t\t\t\t\t$websiteConfig->toFlatArray(),\n\t\t\t\t\t$websiteViewConfig->toFlatArray());\n\t\t}", "title": "" }, { "docid": "855b15059b34cc6269bd26dc322e8350", "score": "0.67264724", "text": "protected function loadData()\n\t{\t\t \n\t\t$this->source->loadData(array(\n\t\t\t\t'where' => $this->getFilter(), \n\t\t\t\t'order' => $this->getOrder(), \n\t\t\t\t'page' => $this->getPage(), \n\t\t\t\t'limit' => $this->getLimit())\n\t\t);\n\t\t$this->rows = $this->source->getItems();\n\t\t// vybrana strana je vetsi nez jich ve skutecnosti je => novy dotaz na prvni stranu\n\t\tif(count($this->rows) == 0 && $this->source->getAllRows() != 0) {\n\t\t\t$this->page = 1;\t\t\t\n\t\t\t$this->source->loadData(array(\n\t\t\t\t\t'where' => $this->getFilter(), \n\t\t\t\t\t'order' => $this->getOrder(), \n\t\t\t\t\t'page' => 1, \n\t\t\t\t\t'limit' => $this->getLimit())\n\t\t\t);\n\t\t\t$this->rows = $this->source->getItems();\n\t\t}\n\t\t$this->loaded = TRUE;\n\t\t$this->allRows = $this->source->getAllRows();\n\t\t// Dispach Event\n\t\t$this->onLoadData($this);\t\t \n\t\t\n\t}", "title": "" }, { "docid": "fb345b241122aec2d2f6378c9def4d4d", "score": "0.67099303", "text": "public function load()\n\t{\n\t\tforeach ($this->builder->all() as $fetch) {\n\t\t\t$this->data[] = [$fetch['key_id'], $fetch['value']];\n\t\t}\n\t}", "title": "" }, { "docid": "455570a558fe1b940714b2ccb4815d2d", "score": "0.6683535", "text": "function loadFromDb()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result = $ilDB->queryF(\"SELECT * FROM svy_qpl WHERE obj_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($this->getId())\n\t\t);\n\t\tif ($result->numRows() == 1)\n\t\t{\n\t\t\t$row = $ilDB->fetchAssoc($result);\n\t\t\t$this->setOnline($row[\"isonline\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "e1818b84ef91be23f163954574376efe", "score": "0.6675859", "text": "public function load()\n\t{\n\t\tglobal $database;\n\t\tif (is_null($this->tableName)) return;\n\t\t$result = $database->query(\"SELECT * FROM $this->tableName WHERE id = $this->id;\");\n\t\tif ($result->num_rows == 0) return;\n\t\t$row = $result->fetch_assoc();\n\t\tforeach ($row as $column => $value) {\n\t\t\ttry {\n\t\t\t\t$this->$column = $value;\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\techo 'Invalid column name';\n\t\t\t}\n\t\t}\n\t\t$this->loaded = true;\n\t}", "title": "" }, { "docid": "45e1c003187d0aba9ea333769d0ee4fe", "score": "0.66656256", "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": "ef1ae4853d936a9eaa1f287699b1cd03", "score": "0.66656107", "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": "21366ee172033ae2a8959d7c22d876ec", "score": "0.66241443", "text": "private function loadDB() {\n return self::db();\n }", "title": "" }, { "docid": "10ccd7a95d955de2e705836a4236623d", "score": "0.6607099", "text": "public function loadall() {\n \t$query='SELECT * ' .\n \t\t\t'FROM `'.$this->_table;\n \t$this->query($query);\n \treturn $this->getObjectArray();\n }", "title": "" }, { "docid": "45435a2a777c5449b376e2c0a01f2e63", "score": "0.66025376", "text": "function load() {\n //see what type of object we have, do we have a database object or not,\n $DEB = Ruth::getOBJECT(\"DEB\");\n //read from the database\n if (!empty($DEB)) {\n //see if we can grab from xcache first\n\n if (empty($this->populateFromXCache())) {\n return $this->populateFromDebby($DEB);\n } else {\n return $this->populateFromXCache();\n }\n } else {\n return $this->populateFromXCache();\n }\n\n\n }", "title": "" }, { "docid": "c9cd82fa4936c93030755909695da3e1", "score": "0.6602235", "text": "public abstract function loadData($data);", "title": "" }, { "docid": "f83ff0d98c18242fd05c5303ce01ceab", "score": "0.6532549", "text": "public function loadFromDb( ezcDbHandler $db );", "title": "" }, { "docid": "0ac668943f0a9431da0e28bb93b92537", "score": "0.65274656", "text": "public function load($id)\n {\n global $prefix;\n\n $query = 'SELECT * FROM '.$prefix.$this->_mainTable.' WHERE '.$this->_primaryKey.' = '.$id;\n if (($res = mysql_query($query)) && mysql_num_rows($res)) {\n $this->_data = mysql_fetch_array($res);\n }\n }", "title": "" }, { "docid": "d8f0932e07a9fc8df5bdcccbd5b1db83", "score": "0.65091413", "text": "public function read_metadata_from_db ()\r\n\t{\r\n\t}", "title": "" }, { "docid": "9a51b77d243564dcb91f6002830eacca", "score": "0.6495413", "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": "57a9222c8b7ed3b287a88e4c91f289f3", "score": "0.6452614", "text": "public function LoadRecords()\n {\n \t$this->admin_users_records = $this->GetUsersRecords();\n }", "title": "" }, { "docid": "eee2f4c8ec7f66fb3b28b19bd6de6e61", "score": "0.64392614", "text": "public function LoadData() {\n require('BDD/bdd_for_export.php');\n $select = \"SELECT * FROM volontaire\";\n $query = mysqli_query($conn, $select);\n return $query;\n \n }", "title": "" }, { "docid": "6adaa1cbb66e342f209c988dd6596307", "score": "0.6435887", "text": "protected abstract function loadRow();", "title": "" }, { "docid": "2e5d03c261cb082477d1f914530f3910", "score": "0.64243025", "text": "protected function loadData()\r\n\t{\r\n\t\tif ($this->data === NULL) {\r\n\t\t\tif ($this->cache) {\r\n\t\t\t\tif (($this->data = $this->loadFromCache()) === NULL) {\r\n\t\t\t\t\t$this->data = $this->getData();\r\n\t\t\t\t\t$this->saveToCache();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$this->data = $this->getData();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c528eddbed86e520925ee79bba42aabe", "score": "0.6394774", "text": "function load_data()\n\t{\n\t\tlog_debug(\"inc_products\", \"Executing load_data()\");\n\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT * FROM products WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif ($sql_obj->num_rows())\n\t\t{\n\t\t\t$sql_obj->fetch_array();\n\n\t\t\t$this->data = $sql_obj->data[0];\t\n\n\t\t\treturn 1;\n\t\t}\n\n\t\t// failure\n\t\treturn 0;\n\n\t}", "title": "" }, { "docid": "42c0c4fb3add03d7aa32cd282643513d", "score": "0.6389844", "text": "public function loadData()\n {\n $where = $this->getDataFilter();\n $orderBy = $this->getDataOrderBy();\n\n $model = new Model\\DashboardData();\n $rows = $model->all($where, $orderBy);\n\n if (empty($rows)) {\n $this->generateRandomData(10, 10);\n $rows = $model->all($where, $orderBy);\n }\n\n foreach ($rows as $data) {\n if (empty($data->properties['enddate'])) {\n $this->tasks[] = $data;\n continue;\n }\n $this->completed[] = $data;\n }\n }", "title": "" }, { "docid": "b34a708082254799262752333a73ccf1", "score": "0.63877547", "text": "public function loadAll() {\n foreach ($this->persons as $data) {\n $this->db->insert(\"V_ETD_PRSN_TABL\", array_combine($this->prsn_fields, $data));\n }\n foreach ($this->addresses as $data) {\n $this->db->insert(\"V_ETD_PRAD\", array_combine($this->addr_fields, $data));\n }\n }", "title": "" }, { "docid": "21d31c590349942567007f9f9d5d32d5", "score": "0.6348056", "text": "public function load($id = null){\n\t\tif ($this->loaded) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->loaded = true;\n\n\t\tif ($id) {\n\t\t\t$this->_id = $id;\n\t\t}\n\n\t\tif ($this->id){\n\t\t\t$q = new Query();\n\t\t\t$q->addTable($this->tableName);\n\t\t\t$q->addWhere($this->primaryKey, $this->id);\n\t\t\tif ($data = $this->db->getRow($q)) {\n\t\t\t\t// clear existing data\n\t\t\t\t$this->data = array();\n\t\t\t\tforeach ($data as $column => $value) {\n\t\t\t\t\tif (!array_key_exists($column, $this->data)) {\n\t\t\t\t\t\t$this->data[$column] = self::cast($value, $this->tableInfo[$column]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tthrow new Exception('An id was specified but a corresponding database row does not exist in '.$this->tableName.' for '.$this->id);\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\tforeach ($this->tableInfo as $key => $value) {\n\t\t\t\tif (!array_key_exists($key, $this->data)) {\n\t\t\t\t\t$this->data[$key] = isset($this->tableInfo[$key]['default']) ? $this->tableInfo[$key]['default'] : null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->originalData = $this->data;\n\n\t\tif (method_exists($this, 'afterLoad')) {\n\t\t\t$this->afterLoad();\n\t\t}\n\t}", "title": "" }, { "docid": "cd0fc8e4cff45397a220568eaef27cba", "score": "0.6307671", "text": "function loadFromDatabase()\n {\n if (Application::getInstance()->withDatabase() === false) return;\n \n $data = QueryBuilder::table('setting')->select('setting_name', 'setting_value')->get();\n\n foreach ($data as $item) {\n $value = @unserialize($item->setting_value);\n if (is_array($value)) {\n foreach ($value as $id => $current_value) {\n $this->configs[$item->setting_name][$id] = $current_value;\n }\n } else {\n $this->configs[$item->setting_name] = stripslashes($value??'');\n }\n }\n }", "title": "" }, { "docid": "d25f6deec6e04b02e11fc0a26932d2b3", "score": "0.6303183", "text": "public function loadFromDb() {\n\t\tif($this->loaded) return true;\n\t\t$this->rows = self::$db->getRows('SELECT '.$this->getSelectFields().' FROM `'.$this->getTable().'` WHERE '.$this->getSelectWhere(), $this->getPrimaryKey());\n\t\treturn $this->rows!==false;\n\t}", "title": "" }, { "docid": "cacd2d94a6b6ea57532053b346e48c09", "score": "0.62790406", "text": "public function load()\n {\n $this->loadCourseList();\n $this->loadAnswerList();\n }", "title": "" }, { "docid": "cf4a10fee4cf385fa66f00498eae1a3b", "score": "0.62775713", "text": "function load()\n\t\t{\n\t\t\t$_result = $this->db_read->retrieve_one($this->table, $this->db_variables);\n\t\t\n\t\t\tif(!$_result)\n\t\t\t{\n\t\t\t\n\t\t\t\terror_log(\"load failed\");\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\n\t\t\t\t$this->has_changed = FALSE;\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "5f6be470c1c3ca8e312a29d342958d87", "score": "0.62774134", "text": "protected function loadByID($id){\n\t\t$this->db->query('SELECT * FROM users WHERE UserID = :uid');\n\t\t$this->db->bind(':uid', $id);\n\t\t$this->db->execute();\n\t\t$this->allData = $this->db->getRow();\t\n\t}", "title": "" }, { "docid": "7564eea66e0ad54a4054a5b039fa3ca3", "score": "0.6275712", "text": "public function load()\n\t{\n\t\t$this->_loaded = true;\n\t\tif ( $this->_datasource == null ) return $this;\n\n\t\t$rows = $this->_datasource->getAll();\n\t\t$values = array();\n\t\tforeach ($rows as $row) {\n\t\t\tforeach ($this->_edata as $dataname) {\n\t\t\t\tif (isset($this->_data[$dataname])) {\n\t\t\t\t\t$labelcol = $this->_data[$dataname]->getSourceLabelColumn();\n\t\t\t\t\t$datacol = $this->_data[$dataname]->getSourceDataColumn();\n\t\t\t\t\t$item = $row[$labelcol];\n\t\t\t\t\t$values[$dataname][$item] = $row[$datacol];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tforeach ($this->_edata as $dataname) {\n\t\t\tif (isset($this->_data[$dataname]) and isset($values[$dataname])) {\n\t\t\t\t$this->_data[$dataname]->addValue($values[$dataname]);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\n\t}", "title": "" }, { "docid": "0b59bcc92121e2478ff12041e76550a7", "score": "0.62556946", "text": "abstract protected function loadData($entity);", "title": "" }, { "docid": "219dc1e42f56e33e6d30f02277d583d1", "score": "0.62505424", "text": "function LoadData() {\n\t\t$sSql = $this->ChartSql;\n\t\t$cnn = ReportConn($this->Table->DBID);\n\t\t$rscht = $cnn->Execute($sSql);\n\t\twhile ($rscht && !$rscht->EOF) {\n\t\t\t$temp = array();\n\t\t\tfor ($i = 0; $i < $rscht->FieldCount(); $i++)\n\t\t\t\t$temp[$i] = $rscht->fields[$i];\n\t\t\t$this->Data[] = $temp;\n\t\t\t$rscht->MoveNext();\n\t\t}\n\t\tif ($rscht) $rscht->Close();\n\t}", "title": "" }, { "docid": "905c49fb7271affc5ff540669e6212a3", "score": "0.62485045", "text": "public function load($id)\n {\n // SELECT query on database\n $this->data = $this->db->query('SELECT ' . $this->db->fieldName('id') . ', ' . $this->db->fieldName('player_id') . ', ' . $this->db->fieldName('date') . ', ' . $this->db->fieldName('level') . ' FROM ' . $this->db->tableName('player_deaths') . ' WHERE ' . $this->db->fieldName('id') . ' = ' . (int) $id)->fetch();\n }", "title": "" }, { "docid": "245dc53f0aeb83640019c28db5f944cd", "score": "0.62476283", "text": "public function load()\n{\n require \"data_connect.php\";\n $id = $this->get_id();\n if( $stmt = $mysqli->prepare(\n \"SELECT\n id,\n country_id,\n zip_code,\n city_name,\n street_name,\n house_number\n FROM address WHERE id=?\"))\n {\n $stmt->bind_param('i', $id );\n $stmt->execute();\n $stmt->bind_result\n (\n $id,\n $country_id,\n $zip_code,\n $city_name,\n $street_name,\n $house_number\n );\n if( $stmt->fetch() == TRUE )\n {\n $this->set_id( $id );\n $this->set_country_id( $country_id );\n $this->set_zip_code( $zip_code );\n $this->set_city_name( $city_name );\n $this->set_street_name( $street_name );\n $this->set_house_number( $house_number );\n $stmt->close();\n }\n else\n {\n $this->db_warning->not_found();\n }\n $mysqli->close();\n }\n else\n {\n $this->db_error->load_error();\n }\n $this->db_error->serialize();\n $this->db_warning->serialize();\n}", "title": "" }, { "docid": "66f350bd5ecfcb75ed1c9a3458ecc8bb", "score": "0.6242958", "text": "public function loadAll()\n\t\t{\n\n\t\t\tparent::__construct();\n\n\t\t\t$this->data = $this->db->select(\n\t\t\t\t\"SELECT * FROM `units`\"\n\t\t\t);\n\n\t\t}", "title": "" }, { "docid": "6882bdd2ca33508bca89a7a331e10412", "score": "0.6241407", "text": "public function loadFromDb()\n\t{\n\t\t$res = $this->db->queryF(\n\t\t\t\t\"SELECT * FROM tst_dyn_quest_set_pools WHERE test_fi = %s\",\n\t\t\t\tarray('integer'), array($this->testOBJ->getTestId())\n\t\t);\n\t\t\n\t\twhile( $row = $this->db->fetchAssoc($res) )\n\t\t{\n\t\t\t$this->initFromArray($row);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "86364578aee4614e95c51804d8c06f27", "score": "0.62263155", "text": "public function loadData()\n {\n $where = $this->getDataFilter();\n $orderBy = $this->getDataOrderBy();\n\n $model = new Model\\DashboardData();\n $rows = $model->all($where, $orderBy);\n\n if (empty($rows)) {\n InfoStateInitialData::generateData($this);\n $rows = $model->all($where, $orderBy);\n }\n\n foreach ($rows as $data) {\n $modelInfo = $this->getModelInfo($data->properties['model']);\n $totalModel = $this->getSQLData($modelInfo['table'], $data->properties['values']);\n\n $this->group[$data->properties['group']] = [\n 'icon' => $data->properties['icon'],\n 'value' => $totalModel->totals['total'],\n 'url' => $modelInfo['url'],\n ];\n\n $this->addDetail($data->properties['group'], $data->properties['values'], $totalModel);\n }\n }", "title": "" }, { "docid": "958586f6560733254dfd39b4a69fbc5e", "score": "0.6218936", "text": "public function load($data){\n\t\t$this->data = $data;\n\t}", "title": "" }, { "docid": "a2169474c1c8949c1aba30782ab6f118", "score": "0.6211866", "text": "abstract protected function loadAll();", "title": "" }, { "docid": "17d89ea102db803667843c88f56daf98", "score": "0.62114125", "text": "public function load($id = null){\n\t\t\tif ($this->loaded) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->loaded = true;\n\n\t\t\t$ready = true;\n\t\t\tforeach ($this->primaryKeys as $pk) {\n\t\t\t\tif (!ValidateArrayKey($pk, $this->data)) {\n\t\t\t\t\t$ready = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($ready) {\n\t\t\t\t$q = new Query();\n\t\t\t\t$q->addTable($this->tableName);\n\t\t\t\tforeach ($this->primaryKeys as $pk) {\n\t\t\t\t\t$q->addWhere($pk, $this->data[$pk]);\n\t\t\t\t}\n\t\t\t\t$this->data = array();\n\t\t\t\tif ($data = $this->db->getRow($q)) {\n\t\t\t\t\tforeach ($data as $column => $value) {\n\t\t\t\t\t\tif (!array_key_exists($column, $this->data)) {\n\t\t\t\t\t\t\t$this->data[$column] = self::cast($value, $this->tableInfo[$column]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse {\n\t\t\t\t\tthrow new Exception('An id was specified but a corresponding database row does not exist in '.$this->tableName);\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tforeach ($this->tableInfo as $key => $value) {\n\t\t\t\t\tif (!array_key_exists($key, $this->data)) {\n\t\t\t\t\t\t$this->data[$key] = !empty($this->tableInfo[$key]['default']) ? $this->tableInfo[$key]['default'] : null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->originalData = $this->data;\n\n\t\t\tif (method_exists($this, 'afterLoad')) {\n\t\t\t\t$this->afterLoad();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "42d485ece348fe70c8866f068448479b", "score": "0.6210894", "text": "public function load(){\n\t\treturn $this->query(\"SELECT ip.tipo_jugador,j.nombre,ip.nacionalidad,\n\t\t\t\t\t\t\t\t\ti.ruta,j.id_jugador\n \t\t\t\t\t\t\tFROM informacion_personal ip JOIN jugadores j \n \t\t\t\t\t\t\tON (j.id_jugador=ip.id_jugador) \n \t\t\t\t\t\t\tJOIN imagenes i \n \t\t\t\t\t\t\tON(j.id_jugador=i.id_jugador)\n\t\t\t\t\t\t -- WHERE ip.tipo_jugador= 'Mundial' \n\t\t\t\t\t\t group by ip.tipo_jugador, ip.ranking,j.nombre\n\t\t\t\t\t\t order by j.id_jugador\"\n\t\t\t\t\t\t );\n\t}", "title": "" }, { "docid": "7a28020a4af86c72314ab3fd9618de3c", "score": "0.62074465", "text": "protected abstract function load($id, $data = null);", "title": "" }, { "docid": "a100577021be09ebd811e722ebfe9dc5", "score": "0.6207307", "text": "public function loadObjectDetails(){\n\t\t$db = dblink::getInstance();\n\t\t\n\t\t$where = \" WHERE \".$this->getPkCol().\" = ?\";\n\t\t$sql = \"SELECT \".$this->getTable().\".* FROM \".$this->getTable().$where;\n\t\t$records = $db->performQuery($sql, \"i\", array($this->getId()), FALSE);\n\t\tif(count($records)==1){\n\t\t\t$record = array_pop($records);\n\t\t\t$this->setPropertiesFromRecord($record);\n\t\t}\n\t\telse{\n\t\t\t$this->setId(-1);\n\t\t}\n\t}", "title": "" }, { "docid": "a9d656d5176b75a9067dcf73c985772e", "score": "0.62007964", "text": "public function readPeopleDb()\n {\n $currentGame = $this->getGame();\n $allPeople = $this->peopleCollection->find();\n foreach ($allPeople as $aPerson) {\n $aPersonObject = new Person($this->clockworkObject,$currentGame);\n $aPersonObject->fromJSON(json_encode($aPerson));\n $currentGame->insertPerson($aPersonObject);\n }\n }", "title": "" }, { "docid": "42a70cf646327152b48cdedbfb9c154b", "score": "0.6198959", "text": "function initialize_sql_data() {\n \n }", "title": "" }, { "docid": "1cd241db714eb0886e3e6f38f155138f", "score": "0.6184642", "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": "29a3cf6ec0ffad6b5fe9ae3200f1d10e", "score": "0.6162168", "text": "abstract public function loadDetails();", "title": "" }, { "docid": "9aaa659ac66891f50dda5afa65e0ec8c", "score": "0.6160482", "text": "protected function afterLoadingDatabase() { }", "title": "" }, { "docid": "d2f74192eb6c73567c6b1a7f23542a07", "score": "0.6152513", "text": "public function loadData($path) {}", "title": "" }, { "docid": "0caab8bac6f158aeeabd7fc850e94aa6", "score": "0.61457986", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM bar WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "265ac6ed77be0b42572ff011b9a17687", "score": "0.6136482", "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": "02efe95fd933ba361256264417549154", "score": "0.61352384", "text": "public function load(){}", "title": "" }, { "docid": "7668e5c41b08485c78554087d34ab4f0", "score": "0.6097271", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM rapor_data_sikap WHERE id_sikap = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "0e886a5edbcbd9e70a3dd0eba28aa810", "score": "0.60951596", "text": "public function load()\n\t{\n\n\t\t$sliders=Slide::select('id','title')->groupBy('id', 'title')->get();\n\n\t\t//$sliders=Slide::select('title','created_at','updated_at');\n\t\t\t\t\n\t\treturn Datatables::of($sliders)\n\t\t->escapeColumns(['title'])\n\t\n\t\t->addColumn('action',function($data){\n\t\t\treturn crudOps_for_slider('sliders',$data->title);\n\t\t})\n\t\t->make(true);\n\t}", "title": "" }, { "docid": "b553462877214c1a59994a43fc18b537", "score": "0.60708946", "text": "function load(){\n \n\t\tPerson::truncate();\n\t\tDB::table('person_person')->truncate();\n\n\t\t//Truncate tables\n\t\t//Read Person list with given Paramter (Filters?)\n\t\t$api = new ChurchtoolsApi();\n\t\t$allPersons = $api->getAllPerson();\n\n\t\t//Put Information in Person Model (name, surname, telefonprivat, geb, partner?, children?...)\n\t\tforeach($allPersons as $json_id => $json_person){\n\t\t\t$person = Person::create([\n\t\t\t\t'surname' => $json_person->name,\n\t\t\t\t'name' => $json_person->vorname,\n 'tel' => $json_person->telefonprivat,\n 'birthday' => $json_person->geb,\n\t\t\t\t'ct_id' => intval($json_person->p_id),\n //...\n\t\t\t\t]);\n\t\t}\n\n\t\t//Create Relationships //getAllRels\n\t\t$allRelationships = $api->getAllRelationships();\n\t\tforeach($allRelationships as $relationship){\n\t\t\t$person = Person::where('ct_id',$relationship->v_id)->first();\n\n\t\t\t//Partner\n\t\t\tif($relationship->typ_id == 2){\n\t\t\t\t$partner = Person::where('ct_id',$relationship->k_id)->first();\n\t\t\t\t$person->partner()->save($partner);\n\t\t\t\t$partner->partner()->save($person);\n\t\t\t}\n\t\t\t//Children\n\t\t\tif($relationship->typ_id == 1){\n\t\t\t\t$person->children()->attach(Person::where('ct_id',$relationship->k_id)->first()->id);\n\t\t\t}\n\t\t\t$person->save();\t\n\t\t}\n\t\t//Set flag on Person if it's information are complete\n\t\t//Skip if Person does have completion flag\n\t}", "title": "" }, { "docid": "973aad5cf655086289f44698778644b8", "score": "0.6058262", "text": "public function load() {\r\n $documents = array();\r\n $documentsData = $this->db->fetchAll(\"SELECT d.id, d.type \" . $this->fromClause . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());\r\n\r\n foreach ($documentsData as $documentData) {\r\n if($documentData[\"type\"]) {\r\n if($doc = Document::getById($documentData[\"id\"])) {\r\n $documents[] = $doc;\r\n }\r\n }\r\n }\r\n\r\n $this->model->setDocuments($documents);\r\n return $documents;\r\n }", "title": "" }, { "docid": "065f3edf5ccf8a732fa7219fb8498ac9", "score": "0.60559684", "text": "public function fetchData();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.6053537", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.6053537", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.6053537", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.6053537", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.6053537", "text": "public function load();", "title": "" }, { "docid": "b9081ad030d9b201e9d866621ec0567f", "score": "0.60526454", "text": "function load()\n {\n $query = <<<SQL\nSELECT\n *\nFROM\n course\nWHERE\n id = $this->id\nSQL;\n $result = $this->DB->execute($query,'retrieving Course info');\n $row = $this->DB->getData($result);\n if($this->DB->numRows($result))\n {\n if($_SESSION['instance_id'] == $row['instance_id'])\n {\n\t$this->number = $row['number'];\n\t$this->name = $row['name'];\n\t$this->instructor = $row['instructor'];\n\t$this->date_added = $row['date_added'];\n\t$this->instance_id = $row['instance_id'];\n\t$this->asked = ($row['asked'] == 1) ? TRUE : FALSE;\n }\n }\n /* If the passed course ID was not found, reset to FALSE */\n else\n $this->id = FALSE;\n }", "title": "" }, { "docid": "cdec35c7ab35d159d76078124c296448", "score": "0.6048331", "text": "public function load()\n {\n $sql = new Core_Utils_Sql();\n $result = $sql->runQuery($this->_query);\n $_collection = array();\n\n while($row = $result->fetch_assoc()) {\n array_push($_collection, array(\n 'id' => $row['id'],\n 'title' => $row['title'],\n 'content' => $row['content'],\n 'author' => $row['author'],\n 'published_date' => $row['published_date'],\n 'tags' => $row['tags']\n ));\n }\n\n $this->_collection = $_collection;\n return $this;\n }", "title": "" }, { "docid": "b4bf21102f8ff3db0edbb029d51f3ef3", "score": "0.6046082", "text": "function loadDB(){\n $dao = new DAO();\n $linesArr = getLines();\n\n foreach($linesArr as $line){\n $dao->insertLine($line);\n }\n echo \"\\n==DB load finished==\\n\";\n}", "title": "" }, { "docid": "a621b01131e5418d940f5edb35fd7bd7", "score": "0.60459524", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM aluno WHERE idaluno = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "0f770144ffa0dc24b0927ec8031ef3c8", "score": "0.6045466", "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": "02f701ef59e73593a88da8ed29526b8a", "score": "0.6045379", "text": "public function loadModel(){\n $data = Table::find($this->modelId);\n $this->name = $data->name;\n $this->num_seats = $data->num_seats;\n $this->qr_num = $data->qr_num;\n }", "title": "" }, { "docid": "f3f1bf5274b6ba650ae4d32f1c9c9d18", "score": "0.60428226", "text": "private function _AData()\n {\n $path = $this->_sPath . 'data/';\n foreach ($this->_tdb->schema->getTableSchemas() as $table) {\n $filename = $path . $table->fullName . '.php';\n if (is_file($filename)) {\n echo \"Filling: \" . $table->fullName . PHP_EOL;\n $data = include $filename;\n if (count($data) > 0)\n $this->_tdb->createCommand()->batchInsert($table->fullName, array_keys($data[0]), $data)->execute();\n echo \"Done: \" . $table->fullName . PHP_EOL;\n }\n }\n }", "title": "" }, { "docid": "f98efb265914383838b52d997820d2b9", "score": "0.60422236", "text": "protected function loadData()\n {\n\n $reader = new CsvReader();\n $reader->separator = CsvSeperator::COMMA;\n $reader->useFirstRowAsHeader = false;\n $reader->filename = (new Path((new IsoProject())->path))\n ->addPath('..')\n ->addPath('data')\n ->addPath('german-iso-3166.csv.txt')\n ->getFilename();\n foreach ($reader->getData() as $csvRow) {\n //$country->getCountryId($csvRow->getValueByNumber(0),$csvRow->getValueByNumber(1));\n\n\n $item=new IsoItem();\n $item->isoCode= $csvRow->getValueByNumber(0);\n $item->country= $csvRow->getValueByNumber(1);\n $this->addItem($item);\n\n /*\n $data = new Country();\n $data->updateOnDuplicate = true;\n $data->code = $csvRow->getValueByNumber(0);\n $data->country = $csvRow->getValueByNumber(1);\n $data->save();*/\n\n }\n\n\n }", "title": "" }, { "docid": "85e182a1bcd3397c6bf732cf02e425a4", "score": "0.6026612", "text": "public function load_all_data() {\n $this->db->select('ad.*');\n $this->db->from(tablename('admin').\" as ad\");\n $this->db->where(\"is_subadmin\", \"Y\");\n $this->db->where(\"delete_flag\", \"N\");\n $this->db->order_by(\"id\", \"asc\");\n\n $query = $this->db->get();\n $result = $query->result();\n\n if (!empty($result)) {\n return $result;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "d3c94fdae7641ce8d7682b3a066dce9e", "score": "0.6004051", "text": "public function load(){ \n\t\tif (IS_MEMCACHE){\n\t\t\treturn $this->_loadFromCache();\n\t\t} \n\t\treturn $this->_loadFromDb(); \n\t}", "title": "" }, { "docid": "00a6e9db914a620c3d239cad0edec691", "score": "0.5988688", "text": "private function _loadData(){\n\t\t$this->dataView = array(\n\t\t\t\t'title' => 'SPA Pedidos',\n\t\t\t\t'base_url' => base_url(),\n\t\t\t\t'actionFrm' => '/validar',\n\t\t\t\t'controller' => $this->controllerSPA,\n\t\t\t\t'iconTitle' => 'fa-dropbox',\n\t\t\t\t'active_pedidos' => 'active left-active',\n\t\t\t\t);\n\t}", "title": "" }, { "docid": "dbb40595651aaf734d8ecd39e66e7911", "score": "0.598559", "text": "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->image->Upload->DbValue = $row['image'];\n\t\t$this->title_en->DbValue = $row['title_en'];\n\t\t$this->title_ar->DbValue = $row['title_ar'];\n\t\t$this->position_en->DbValue = $row['position_en'];\n\t\t$this->position_ar->DbValue = $row['position_ar'];\n\t\t$this->experience->DbValue = $row['experience'];\n\t\t$this->gender->DbValue = $row['gender'];\n\t\t$this->applied->DbValue = $row['applied'];\n\t\t$this->desc_en->DbValue = $row['desc_en'];\n\t\t$this->desc_ar->DbValue = $row['desc_ar'];\n\t\t$this->created->DbValue = $row['created'];\n\t}", "title": "" }, { "docid": "95c705b2bf7a717c5c4d50befaeed237", "score": "0.5980039", "text": "abstract protected function loadData(ObjectManager $manager);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" }, { "docid": "366608448295f021f01283b7ac2cf8f5", "score": "0.5975732", "text": "public function load($id);", "title": "" } ]
d56b567360da2c854431420ae1f884e3
For updating the respective Model in storage
[ { "docid": "f30db312bdb0425dfb3dd3f8f9030b73", "score": "0.0", "text": "public function update(Testimonial $testimonial, array $input)\n {\n // Uploading Image\n if (array_key_exists('image_url', $input)) {\n $this->deleteOldFile($testimonial, $this->image_path);\n $input['image_url'] = $this->uploadImage($input['image_url']);\n }\n\n // Uploading video\n if (array_key_exists('video_url', $input)) {\n $this->deleteOldFile($testimonial, $this->video_path);\n $input['video_url'] = $this->uploadVideo($input['video_url']);\n }\n\n \tif ($testimonial->update($input))\n return true;\n\n throw new GeneralException(trans('exceptions.backend.testimonials.update_error'));\n }", "title": "" } ]
[ { "docid": "97b6e3224737bc7e7e679cae8ecba355", "score": "0.76457447", "text": "private function update()\n {\n $this->save();\n $this->load();\n }", "title": "" }, { "docid": "980c0fa877e90f89048127b9cd4623dd", "score": "0.681767", "text": "public function update( Model $model )\n {\n }", "title": "" }, { "docid": "926b286b7d7b8d71b73ae2c306d387f1", "score": "0.6766464", "text": "function update(Model $model)\n {\n }", "title": "" }, { "docid": "fba2597513adae42c85ee65636bd116f", "score": "0.65825135", "text": "public final function save(){\n if(isset($this->id)){\n Models::update($this->className, $this->toArray());\n }else{\n if($this->allAttributesSet()){\n //echo \"using strict\\n\";\n $obj = Models::createStrict($this->className, $this->toArrayNoId());\n }else{\n $obj = Models::create($this->className, $this->toArrayNoId());\n }\n //sync all values with those from the database\n foreach($obj as $key => $value){\n $this->$key = $value;\n }\n }\n }", "title": "" }, { "docid": "b2007330f725cf66673960f5212b753f", "score": "0.6562333", "text": "public function update()\n\t{\n\t\treturn $this->getModelStore()->update($this);\n\t}", "title": "" }, { "docid": "4269f9f37ad46dc56ad12b62df4498c5", "score": "0.6444347", "text": "public function update()\n\t {\n\t\t//We must have an ID associated\n\t\t//TODO: Use the $idKey!!\n\t\t$id = ((isset($this->_variables['_id']))? $this->_variables['_id'] : (($this->_data['_id'])? $this->_data['_id'] : NULL));\n\t\tif($id === NULL)\n\t\t\tthrow new \\Framework\\Exceptions\\EDatabaseDriverException(\"Model must contain an ID to update!\");\n\t\telse if(isset($this->_variables['_id']))\n\t\t\tunset($this->_variables['_id']);\n\n\t\t//Get data\n\t\t$data = $this->_variables;\n\t\tif(count($data) == 0)\n\t\t\treturn;\n\n\t\t//Update\n\t\tdie(__METHOD__);\n\t\t$this->getQuery()->update(array('_id' => $id->getValue()), array('$set' => array($data)));\n\t }", "title": "" }, { "docid": "56c40c0db883abfc7d1e9bb47bf987a4", "score": "0.64389986", "text": "public function update() {\r\n\t\t$affected = $this->model->update();\r\n\t\t$this->cache->invalidate();\r\n\t\treturn $this->response(0,$affected);\r\n\t}", "title": "" }, { "docid": "18cfe92fb08c19bf07cd467aca40f46d", "score": "0.64352506", "text": "public function update()\n {\n $this->formValidator();\n\n if ($this->form['book_id']) {\n\n $item = $this->model::find($this->form['book_id']);\n $item->categories()->sync($this->form['categories']);\n\n //check if there is a new uploaded file and store it\n if (is_object($this->form['path'])) {\n\n $this->storeBookFile();\n\n }\n\n //move or change filename if are changed author or book_title\n if ($item->author_id != $this->form['author_id'] || $item->title != $this->form['title']){\n\n $this->moveBookFile($item);\n\n }\n\n $item->save();\n $item->update($this->getData());\n\n $this->updateMode = false;\n session()->flash('message', $this->messages['update']);\n session()->flash('type', 'success');\n\n $this->resetInputFields();\n $this->emit('bookUpdate');\n\n //emit the event to update bookShelf component\n $this->emit('updateBookShelf');\n }\n }", "title": "" }, { "docid": "d25beab605a3157a95313d449d641ab0", "score": "0.64043015", "text": "public function update($id , Request $request) {\n // $update = $this->model->find($id)->update($this->request->all//());\n $update= Product::find($id);\n $update->price=$request->price;\n $update->status=$request->status;\n $update->custom_url=$request->custom_url;\n $update->custom_url_ar=$request->custom_url_ar;\n $update->meta_description=$request->meta_description;\n $update->meta_description_ar=$request->meta_description_ar;\n $update->duration=$request->duration;\n $update->meta_keyword=$request->meta_keyword;\n $update->meta_keyword_ar=$request->meta_keyword_ar;\n $update->meta_title=$request->meta_title;\n $update->meta_title_ar=$request->meta_title_ar;\n $update->catalog_id=$request->catalog_id;\n $update->offer=$request->offer;\n $update->model=$request->model;\n $update->sku=$request->sku;\n $update->weight=$request->weight;\n $update->save();\n \n if ($update) {\n if ($this->request->hasFile('gallary')) {\n $gallary = $this->request->file('gallary');\n foreach ($gallary as $photo) {\n $name = str_random(6) . '_' . $photo->getClientOriginalName();\n $extension = strtolower($photo->getClientOriginalExtension());\n if ($extension == \"jpg\" || $extension == \"jpeg\" || $extension == \"png\" || $extension == \"gif\") {\n $galary = new ProductGalary();\n $galary->photo = $name;\n $galary->product_id = $id;\n $galary->save();\n $dest = 'admin-assets/images/products/';\n $photo->move($dest, $name);\n }\n }\n }\n\n if ($this->request->has('spec')) {\n $specifications = $this->request['spec'];\n $ar_specifications = $this->request['spec_ar'];\n $values = $this->request['value'];\n $ar_values = $this->request['value_ar'];\n\n for ($i = 0; $i < count($specifications); $i++) {\n if (!empty($specifications[$i]) && !empty($ar_specifications[$i])) {\n $new = new Specific();\n $new->product_id = $id;\n $new->spec = $specifications[$i];\n $new->spec_ar = $ar_specifications[$i];\n $new->value = $values[$i];\n $new->value_ar = $ar_values[$i];\n $new->save();\n }\n }\n }\n if ($this->request->has('size')) {\n $sizes = $this->request['size'];\n $qu = $this->request['qu'];\n for ($i = 0; $i < count($sizes); $i++) {\n if (!empty($sizes[$i])) {\n $new = new ProductSize();\n $new->product_id = $id;\n $new->size = $sizes[$i];\n $new->qu = $qu[$i];\n $new->save();\n }\n }\n }\n\n \n \\Session::flash('flash_message', 'products successfully updated.'); //<--FLASH MESSAGE\n return redirect('/admin/cartproducts');\n } else {\n \\Session::flash('flash_message', 'products not updated. Try agin later '); //<--FLASH MESSAGE\n \n return redirect('/admin/cartproducts');\n }\n }", "title": "" }, { "docid": "759944ba999cbf0c91d2dd246865597f", "score": "0.6398988", "text": "public function updated(DatabaseModel $model): void;", "title": "" }, { "docid": "76e9952bcddf2abfe4ccaea5bb398f6f", "score": "0.6380041", "text": "function update($unique_id, $model)\n {\n }", "title": "" }, { "docid": "57d0e93cdbaf3b8d68569320b798943b", "score": "0.6338878", "text": "public static function update():self{\n $model = new static();\n return $model->update_protected();\n }", "title": "" }, { "docid": "2a693eb282f1705b3dac70d7bc1b7c10", "score": "0.6328245", "text": "public function save()\n {\n $this->syncValues();\n $this->model->save();\n }", "title": "" }, { "docid": "e7748ddc421ea081fef92f2fc58caadf", "score": "0.63156134", "text": "protected function update() {\n }", "title": "" }, { "docid": "60c0beaeab7213176055db825a7c5283", "score": "0.628281", "text": "public function update() {\n\t\t$params = $this->getVars();\n\t\t$model = self::getParams(get_class($this));\n\t\t\n\t\t//if update flag is true, update\n\t\tif($this->_updateFlag) {\n\t\t\t$sql = $this->getUpdateSQL($params, $model);\n\t\t} else {\n\t\t\t$sql = $this->getInsertSQL($params, $model);\n\t\t\t$this->_updateFlag = true;\n\t\t}\n\t\t\n\t\tself::query($sql, $params);\n\t}", "title": "" }, { "docid": "e8f2a79f2bd8c3eb405e389cd50395bf", "score": "0.62432134", "text": "public abstract function update($data);", "title": "" }, { "docid": "0b4f41bf22e928fc8b4c583ad9b286c2", "score": "0.62299603", "text": "protected function _update() {\n\t}", "title": "" }, { "docid": "0951000136e102f69ac2869790c5e587", "score": "0.62285537", "text": "public function update(){\n \n }", "title": "" }, { "docid": "13c37507875b23d1abbe20de9c15a643", "score": "0.6228094", "text": "public function update() {\n }", "title": "" }, { "docid": "cc2292234793b2215701472de4a7c507", "score": "0.62278306", "text": "public function update_model() {\n try {\n return VehicleHelper::update_particular_model();\n } catch (Exception $ex) {\n return CommonHelper::showException($ex);\n } catch (Illuminate\\Database\\QueryException $ex) {\n return CommonHelper::showException($ex);\n }\n }", "title": "" }, { "docid": "c2b5223c76efda3d9459c3a2e74a64ec", "score": "0.6226581", "text": "private function __update() {\n $class = $this->class;\n\n $attributes = $this->get_attributes();\n // do not update the primary key\n $primary_key = $attributes[$this->model['primary_key']['field']];\n $attributes['date_updated'] = 'UNIX_TIMESTAMP()';\n\n $keys = array_keys($this->model['fields']);\n $set_columns = $values = array();\n foreach ($keys as $key) {\n // skip primary key\n if ($this->model['primary_key']['field'] == $key) {\n continue;\n }\n $set_columns[] = \"`$key` = \" . $this->model['fields'][$key];\n $values[] = $attributes[$key];\n }\n $set_columns = 'SET ' . implode(', ', $set_columns);\n\n $values[] = $primary_key;\n\n $database = new database($class::$database);\n $database->query(\"UPDATE `{$class::$table}` $set_columns WHERE `\" . $this->model['primary_key']['field'] . '` = ' . $this->model['fields'][$this->model['primary_key']['field']], $values);\n $this->__fetch($primary_key);\n }", "title": "" }, { "docid": "e1ecb6daf6f9d3a90b6ff554bc298326", "score": "0.6214602", "text": "public function update(Request $request, Metadata $metadata)\n {\n $request->validate([\n 'id' => 'required',\n 'metadata_name' => 'required|max:10',\n 'predata_id' => 'required',\n 'num' => 'required',\n 'meta-model' => 'sometimes|nullable|max:12000|file|mimetypes:application/json,text/plain',\n 'meta-weight' => 'sometimes|nullable|max:12000|file|mimetypes:application/octet-stream',\n 'model' => 'sometimes|nullable|max:12000|file|mimetypes:application/json,text/plain',\n ]); \n\n \n $file = array($request->file('meta-model'),$request->file('model'),$request->file('meta-weight'));\n $old_file = array($request->old_meta_model,$request->old_model,$request->old_weight);\n $checkedFile = array(); \n //ファイル分け\n for($j=0; $j < count($file); $j++){\n if($file[$j] == null){\n array_push($checkedFile,$old_file[$j]);\n }\n else{\n $ext = $file[$j]->getClientOriginalExtension();\n $folder = 'lost';\n \n if ($ext === 'bin') {\n $filename = 'meta-weight-'. time() . '.' . $ext;\n $folder = 'weight';\n $old_name = $request->old_weight;\n } elseif ($ext == 'json') {\n if ($file[$j]->getClientOriginalName() === 'model.json') {\n $filename = 'model-'. time() . '.' . $ext;\n $folder = 'model';\n $old_name =$request->old_model;\n } else {\n $filename = 'meta-model-'. time() . '.' . $ext;\n $folder = 'meta';\n $old_name = $request->old_meta_model;\n }\n }\n $path = '/metadata/'.$folder.'/'.$old_name;\n $storePath = '/metadata/'.$folder; \n\n if (Storage::disk('public_store')->exists($path)) {\n Storage::disk('public_store')->delete($path);\n }\n else{\n return redirect('/metadata/'.$request->id)->with('metadata_error_status','モデルデータの登録はできませんでした!');\n } \n $file[$j]->storeAs($storePath,$filename,'public_store');\n array_push($checkedFile,$filename);\n\n \n }\n\n } \n \n Metadata::where('metadata_id',$request->id)->update([\n 'metadata_name' => $request->metadata_name,\n 'predata' => $request->predata_id,\n 'number' => $request->num,\n 'meta_model' => $checkedFile[0],\n 'model' => $checkedFile[1],\n 'model_weight' => $checkedFile[2],\n ]);\n \n return redirect('/metadata/'.$request->id)->with('metadata_status','モデルの更新が完了しました!');\n \n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.61968255", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.61968255", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.61968255", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.61968255", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.61968255", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.61968255", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "b73839a43aab77a0b584ca7d55c7f9ef", "score": "0.6195932", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "36f8e73869ab0849e8eb4da74301e631", "score": "0.6193092", "text": "public function actionUpdate($id)\n {\n\n $access_token = Yii::$app->request->headers['access-token'];\n\n Yii::$app->common_functions->checkAccess($access_token);\n\n// $params=$_REQUEST;\n// $params= Yii::$app->request->getBodyParams();\n\n Yii::$app->common_functions->_parsePut();\n\n $params = $GLOBALS['_PUT'];\n\n $model = $this->findModel($id);\n\n $old_selling_price = $model->attributes['selling_price'];\n $old_file = $model->attributes['image'];\n\n $model->attributes = $params;\n\n// print_r($params);\n// print_r($_FILES);\n// exit;\n\n $fileName = '';\n\n\n\n if (!empty($model->attributes['image']))\n {\n\n $pic = $model->attributes['image'];\n\n $data = base64_decode($pic);\n\n $fileName = time() . rand(1, 10000) . '.' . 'png';\n\n $upload_path = Yii::getAlias('@api') . '/product_images/';\n\n $model->setAttribute('image', $fileName);\n }\n else \n {\n $model->setAttribute('image', $old_file);\n }\n\n if ($model->save())\n {\n\n if ($model->attributes['image'] != $old_file)\n {\n\n file_put_contents($upload_path . $fileName, $data);\n\n unlink(Yii::getAlias('@api') . '/product_images/' . $old_file);\n }\n\n // Code added by Mohit Garg 19 Jan 2016\n // If product's selling price is updated then update corresponding orders \n // Check if selling price of product is updated or not \n if ($model->attributes['selling_price'] != $old_selling_price)\n {\n $model_orders = Orders::findAll([\n 'status' => \"on hold\",\n ]);\n if (!empty($model_orders))\n {\n foreach ($model_orders as $orders)\n {\n // Check is this product exist in this order\n $model_orderItem = OrderItems::findOne([\n 'order_id' => $orders['id'],\n 'product_id' => $id,\n ]);\n if (!empty($model_orderItem))\n {\n\n // Update the price in order_items table\n\n $model_orderItem->setAttribute('product_price', $model->attributes['selling_price']);\n\n $model_orderItem->save();\n\n //Get loyalty point of order\n $loyalty = ($orders['gross_amount'] + $orders['tax_amount']) - ($orders['final_amount'] + $orders['discount_amount'] + $orders['coupon_discount_amount']);\n\n // Get Gross Amount of order\n $gross_amount = 0;\n $model_orderItems = OrderItems::findAll([\n 'order_id' => $orders['id']\n ]);\n foreach ($model_orderItems as $orderitem)\n {\n $gross_amount = ($orderitem['qty'] * $orderitem['product_price']) + $gross_amount;\n }\n // Get discount amount\n $discount_amount = ($orders['discount_percentage'] * $gross_amount) / 100;\n // Get Tax Amount\n $tax_amount = ($orders['tax_percentage'] * ($gross_amount)) / 100;\n // Final Amount\n $final_amount = ($gross_amount + $tax_amount) - ($orders['coupon_discount_amount'] + $loyalty + $discount_amount);\n\n // Update the order table\n $orders->setAttribute('gross_amount', $gross_amount);\n $orders->setAttribute('discount_amount', $discount_amount);\n $orders->setAttribute('tax_amount', $tax_amount);\n $orders->setAttribute('final_amount', $final_amount);\n $orders->save();\n }\n }\n }\n }\n // Code Ends by Mohit Garg\n $status = Yii::$app->common_functions->status('success_code');\n\n $response = [\n\n 'status' => $status,\n// 'data' =>array_filter($model->attributes),\n 'msg' => 'Product updated successfully'\n ];\n\n Yii::$app->common_functions->_sendResponse($response['status'], json_encode($response));\n } else\n {\n\n $model_errors = $model->errors;\n\n $errors = $this->remove_arrays($model_errors);\n\n $status = Yii::$app->common_functions->status('error_code');\n\n $response = [\n\n 'status' => $status,\n 'errors' => $errors,\n ];\n\n Yii::$app->common_functions->_sendResponse($response['status'], json_encode($response));\n }\n }", "title": "" }, { "docid": "c4f953f1799a22b36444fdbd0eec7636", "score": "0.6192875", "text": "function update() {\r\n $CI = &get_instance();\r\n return $CI->rightsprofile_db->update($this);\r\n }", "title": "" }, { "docid": "b828f87a0552db60f4e187e50d68766e", "score": "0.6191027", "text": "public function store()\n\t{\n\t\tparent::storeModel();\n\t}", "title": "" }, { "docid": "ea61745139bf739d9da9434d6806d5fe", "score": "0.61866635", "text": "public function update()\n\t{\n\t\t//Ensure _id is there\n\t\tif(!isset($this->_idVal))\n\t\t\tthrow new \\Framework\\Exceptions\\EModelException(\"Cannot update without an ID.\");\n\n\t\t//Set driver\n\t\t$query = $this->_getQueryDriver();\n\n\t\t//Grab $variables not originals\n\t\t$vars = $this->getUpdateQuery();\n\n\t\t//Get ID\n\t\t$key = self::$_ID_KEYS[get_called_class()];\n\t\t$id = $this->_driver->convertModelIDToNativeID($this->_idVal);\n\n\t\t//Query\n\t\tif($vars !== NULL)\n\t\t\t$query->update(array($key => $id), $vars);\n\n\t\t//Merge variables to originals\n\t\t$this->merge();\n\t}", "title": "" }, { "docid": "85bf3cf26adda55301c6be49e548f386", "score": "0.6183673", "text": "public function update() { }", "title": "" }, { "docid": "2ef9c9b02a93b216bf7ea35a174c95ee", "score": "0.6182791", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "972b8d9affbd48eadf90d6b0318b043e", "score": "0.61794674", "text": "public function update () {\n $this->metamodel->setInput($this->bean);\n $this->metamodel->check();\n }", "title": "" }, { "docid": "9d7094230341f8307e66ea0199152bcd", "score": "0.6150216", "text": "public function update_model($filekey)\n {\n $column = $this->column;\n $this->model->$column = $filekey;\n\n }", "title": "" }, { "docid": "1bf2c0abe906af0554bb7e47a9fa204f", "score": "0.6145113", "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": "409264e7fd2d0a7187fcedb68a5c226a", "score": "0.61339545", "text": "public function update(InstanceInterface $model);", "title": "" }, { "docid": "9c56e418292ebd975a0a64b4fab2f8f5", "score": "0.6131373", "text": "public function update(Request $request,$id)\n {\n $validator = Validator::make($request->all(),[\n 'storage_id' => 'required',\n 'block_name' => \"required|unique:storage_blocks,block_name,$id\",\n 'self_of_block' => 'required',\n\n ]);\n if($validator->fails()){\n return redirect()->back()->withErrors($validator)->withInput();\n }\n\n $input = $request->except('_token');\n\n $getStorageBlock=StorageBlock::findOrFail($id);\n $input['updated_by']=Auth::user()->id;\n $storageInfo=Storage::findOrFail($request->storage_id);\n\n if (!empty($storageInfo)){\n $input['company_id']=$storageInfo->company_id;\n $input['branch_id']=$storageInfo->branch_id;\n }\n\n DB::beginTransaction();\n try {\n // update Storage Block ------------------\n $getStorageBlock->update($input);\n\n // Create self/rack on Storage Block ------------\n if (isset($request->self_of_block)){\n\n $odlDatas=SelfOfStorageBlock::where('storage_block_id',$id)->get();\n $newDatas=explode(',',$request->self_of_block);\n\n\n foreach ($odlDatas as $old_key=>$odlData){\n\n foreach ($newDatas as $new_key=>$newData){\n if ($odlData->self_of_block==$newData){\n unset($odlDatas[$old_key]);\n unset($newDatas[$new_key]);\n }\n\n }\n\n }\n\n\n // delete from odl data ------------\n if (count($odlDatas)>0){\n foreach ($odlDatas as $odlData){\n SelfOfStorageBlock::where('id',$odlData->id)->delete();\n }\n\n }\n\n // insert new self/rack data -----------------------\n if (count($newDatas)>0){\n foreach ($newDatas as $selfOfBlock){\n SelfOfStorageBlock::create([\n 'storage_block_id'=>$id,\n 'self_of_block'=>$selfOfBlock,\n 'created_by'=>Auth::user()->id\n ]);\n }\n }\n }\n\n\n $bug=0;\n DB::commit();\n } catch (Exception $e) {\n DB::rollback();\n $bug = $e->errorInfo[1];\n $bug1 = $e->errorInfo[2];\n }\n\n if($bug == 0){\n return redirect()->back()->with('success','New Block Of Storage Created Successfully.');\n }else{\n return redirect()->back()->with('error','Error: '.$bug1);\n }\n }", "title": "" }, { "docid": "099b7bf4723843472514004918e11afd", "score": "0.6128357", "text": "public function updating($entity) {}", "title": "" }, { "docid": "bae7c1827a7eef5dcfd29d3cc822083a", "score": "0.61080444", "text": "public function fillOnUpdate($model)\n {\n //\n }", "title": "" }, { "docid": "ddc85140420c43617bbd19f45eb2fb2e", "score": "0.6103561", "text": "public function update()\n {\n }", "title": "" }, { "docid": "5326033fb5db8ae330d2f7afe0b13b54", "score": "0.61019886", "text": "public function update(): void\n {\n parent::updateByString(['book_id']);\n }", "title": "" }, { "docid": "243eead2a036def54f9d8932c245c92f", "score": "0.60967344", "text": "public function save() {\n if(!$this->id) {\n $this->create();\n } else {\n $this->update();\n }\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.60961145", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.60961145", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.60961145", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.60961145", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.60961145", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.60961145", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.60961145", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "04d385027eeae176a79d151196f4da58", "score": "0.6095431", "text": "public function saveModelToDatabase($model)\n {\n if(!is_subclass_of($model, 'SmileScreen\\Base\\BaseModel')) {\n // again we need a model that extends BaseModel here\n throw new GenericSmileScreenException('Model needs to extend BaseModel. Not be a instance of BaseModel.');\n }\n\n $modelState = $model->getModelState();\n // here we get the current state of the moddel \n $modelTableName = $model->getDatabaseTable();\n // here we get the table name the model uses\n $date = date('Y-m-d H:i:s');\n // here we save the current time in a variable used for filling\n // timestamps later.\n\n\t\tif(($modelState & (ModelStates::FROM_DATABASE | ModelStates::NOT_SAVED)) == 3) {\n // Model is from database and needs to be updated.\n \n $updateQuery = ((new UpdateQuery())->setTable($modelTableName));\n // here we get a new update query and we set the table to the correct one.\n $updateQuery->setIdField($model->getIdField());\n // here we set the id field of the update query to the models idField\n $updateQuery->setId($model->getId());\n // we set the id to the id of the model we are updating\n\n $updateColumns = $model->getAllDatabaseAttributes(false);\n // we get all the database atributes that need to be saved except the id\n $updateValues = $model->getAllDatabaseValues(false);\n // we get all the values for those attributes\n\n $realUpdateColumns = $updateColumns;\n $realUpdateValues = $updateValues;\n // here we copy these values to the values that go into the database\n // we do this cause a few values need to be added\n // for the actual database but the original values are used later 2\n\n if ($model->usesTimestamps()) {\n $realUpdateColumns[] = 'updated_on';\n $realUpdateValues[] = $date;\n // does the model use timestamps? yes so we add this value to the real insert query\n }\n\n $updateQuery->setColumns($realUpdateColumns);\n // we set the updatequerys columsn\n $updateQuery->setValues($realUpdateValues);\n // we set the values to\n\n $sql = $updateQuery->getStatement();\n // we get the updatequerys sql\n\n try {\n $updateStatement = $this->pdoObject->prepare($sql);\n // Lets prepare the sql\n $result = $updateStatement->execute($updateQuery->getValues(true));\n // here we execute the array with the values from the updatequery\n // we also store the results since its important to not update the model if sh*t did ot work\n if ($result) {\n // Everying went fine we can update the model\n \n $model->setModelState(ModelStates::FROM_DATABASE);\n // here we set the state of the model its now from the database and does not \n // require to be saved until its changed again.\n if ($model->usesTimestamps()) {\n // Does the model use timestamps? Yes so we update the updated_on value\n $model->setUpdatedOn($date);\n }\n\n return true;\n } else {\n return false; // Sorry the updated did not go through we return false.\n }\n } catch (\\PDOException $e) {\n throw new DatabaseSmileScreenException('Could not update model: '.$e->getMessage());\n }\n }\n\n if(($modelState & ModelStates::NOT_SAVED) == 1) {\n // Model is not from database but needs to be saved.\n $insertQuery = ((new InsertQuery())->setTable($modelTableName));\n // since the model is not in the database we use a insertquery.\n // create a new insertquery and set the table to the models databse table\n\n $insertColumns = $model->getAllDatabaseAttributes(false);\n // we get all the stuff we need to insert\n $insertValues = $model->getAllDatabaseValues(false);\n // we get all the values we need to insert\n\n $realInsertColumns = $insertColumns;\n $realInsertValues = $insertValues;\n // we copy the values since we need to alter them but need to keep the original\n\n // Does the model use dates? If so we ad the required values to the insertQuery\n if ($model->usesTimestamps())\n {\n // the model uses timestamps so we set the required fields and add them\n $realInsertColumns[] = 'created_on';\n $realInsertColumns[] = 'updated_on';\n\n $realInsertValues[] = $date;\n $realInsertValues[] = $date;\n }\n\n $insertQuery->setColumns($realInsertColumns);\n // set the columns of the insert query\n $insertQuery->setValues($realInsertValues);\n // set the values of the insert query\n $this->runInsertQuery($insertQuery);\n // here we run the insertquery we got to insert the data of the new model\n\n // altho we are done inserting the data for the model\n // we run into problems if we just stop here \n // if we dont add the new id field to the old model it wont know how to update in the future\n // this will cause problems if not resolved so we go on to select the new model \n // and get its newly assigned id to update the model \n\n $selectQuery = ((new SelectQuery())->setTable($modelTableName));\n // we make a new selectquery and set the database table to the models database table\n $selectQuery->select([$model->getIdField(). ' AS id']);\n // we only need to select the id so we get the id field but we alster the query a litle bit\n // we say 'AS id' this makes it easier to find the variable later\n \n $whereArray = [];\n // we make a new array in this array we store the array we can pass to the selectquerys where function\n foreach($insertColumns as $key => $attribute) {\n // we loop through all the variables we set using insertColumns\n if(is_null($insertValues[$key])) {\n // if the variable is null we cant use it to compare stuff so we drop it by moving on\n\t\t\t\t\t continue;\n\t\t\t\t }\n $whereArray[$attribute] = ['=', $insertValues[$key]];\n // we add part of the where to the $whereArray\n }\n\n $selectQuery->where($whereArray, 'AND');\n // here we pass the where array to the select query but we also say to AND all the values together\n $selectStatement = $selectQuery->getStatement();\n // here we get the newly created statment \n\n try {\n $whereStatement = $this->pdoObject->prepare($selectStatement[0]);\n // we prepare the statment\n $whereStatement->execute($selectStatement[1]);\n // execute the stament\n $results = $whereStatement->fetchAll(PDO::FETCH_ASSOC);\n // Fetch the result of witch there should only be one\n\n $id = $results[0]['id'];\n // We get the id from the restults\n\n // Here we update the model. We set it's state to FROM_DATABASE\n // And we set it's id to the id we just got by looking up its values\n\t\t\t\t$model->setId($id);\n\t\t\t\t$model->setModelState(ModelStates::FROM_DATABASE);\n\n // Does the model use timestamps? If so we set it to the date from earlier\n if ($model->usesTimestamps()) {\n $model->setCreatedOn($date);\n $model->setUpdatedOn($date);\n }\n\n\t\t\t\treturn true; // Everything is good so we return true\n } catch (\\PDOException $e) {\n // Error so we throw a error\n throw new DatabaseSmileScreenException('Could not get id of inserted model: '.$e->getMessage());\n }\n }\n\n if(($modelState & ModelStates::NOT_SAVED) == 0) {\n // No update to the database is needed.\n // we just return true cause technically everthing is saved.\n return true;\n }\n }", "title": "" }, { "docid": "00155c41d87c9c0387e4babe3e9a9ae9", "score": "0.6087355", "text": "public function save()\n {\n $this->storage->write($this);\n }", "title": "" }, { "docid": "19323452d4f8b1e3cc766b966234512d", "score": "0.60858804", "text": "public function update($obj) {\n }", "title": "" }, { "docid": "4a265ec0ce4a35c698470132f29a7e0f", "score": "0.60790426", "text": "abstract function update($object);", "title": "" }, { "docid": "b7efc8833e2707d2c41ccbb075ab62b4", "score": "0.6076283", "text": "public function updateExisting();", "title": "" }, { "docid": "0735b88fa99945515b020a6550c7d695", "score": "0.607595", "text": "public function update(Request $request, $id)\n {\n $pro=Product::find($id);\n $pro->fill($request->all());\n $pro->save();\n $pro->sizes()->sync($request->size);\n $price= Price::where(\"product_id\",\"=\",$id)->first();\n $price->price=$request->price;\n $price->save();\n return redirect()->action(\"StockController@index\");\n \n \n }", "title": "" }, { "docid": "9114298108dd1c27bcdd6fe3f63b22ca", "score": "0.60658216", "text": "public function update_data();", "title": "" }, { "docid": "cf0d1787485fe887c77790d5a0f4516a", "score": "0.6056662", "text": "public function update(Request $request, $id)\n {\n $username = Auth::user()->name;\n if ( !isset($username)|| empty($username)) \n {\n return redirect('admin/' . $this->modelName )->with('status', '非法!');\n }\n set_time_limit(0);\n $model = Type::onWriteConnection()->find($id);\n\n if (is_null($model)){\n return redirect('admin/' . $this->modelName)->withErrors(\"纪录不存在!\")->withInput();\n }\n $is_new = Input::get('is_new');\n $old_is_new = $model->is_new;\n $old_name = $model->name;\n $model->name = trim(Input::get('name', $model->name));\n $model->name_cn = trim(Input::get('name_cn', $model->name_cn));\n $model->name_tw = trim(Input::get('name_tw', $model->name_tw));\n $model->name_ru = trim(Input::get('name_ru', $model->name_ru));\n $model->name_jp = trim(Input::get('name_jp', $model->name_jp));\n $model->name_es = trim(Input::get('name_es', $model->name_es));\n $model->is_new = Input::get('is_new', $model->is_new);\n $model->is_new_color = Input::get('is_new_color', $model->is_new_color);\n $model->font = Input::get('font', $model->font);\n $model->packagepay = Input::get('packagepay', $model->packagepay);\n $is_vip = Input::get('is_vip');\n if ($is_vip != $model->is_vip && $model->parent_id !=0) \n {\n $model->is_vip = $is_vip;\n Material::updateMaterialVip($model->name,$is_vip);\n }\n $model->weight = Input::get('weight', $model->weight);\n $model->desc = Input::get('desc', $model->desc);\n $model->desc_tw = trim(Input::get('desc_tw', $model->desc_tw));\n $model->desc_ru = trim(Input::get('desc_ru', $model->desc_ru));\n $model->desc_jp = trim(Input::get('desc_jp', $model->desc_jp));\n $model->desc_es = trim(Input::get('desc_es', $model->desc_es));\n $model->desc_cn = trim(Input::get('desc_cn', $model->desc_cn));\n $model->color1 = trim(Input::get('color1', $model->color1));\n $model->color2 = trim(Input::get('color2', $model->color2));\n $model->bg_color = trim(Input::get('bg_color', $model->bg_color));\n $model->version = trim(Input::get('version', $model->version));\n $model->device = trim(Input::get('device', $model->device));\n $pic = Input::file('pic','');\n $android_pic = Input::file('android_pic','');\n $ios_pic_frame = Input::file('ios_pic_frame','');\n $model->handle_user = $username . '_' . date(\"Y-m-d H:i:s\",time()) . '_edit';\n if(!empty($pic)) {\n $pic = FileTool::upload($pic, 'material', 'jpg', 1);\n $model->pic = $pic['path'];\n }\n if(!empty($ios_pic_frame)) {\n $ios_pic_frame = FileTool::upload($ios_pic_frame, 'material', 'jpg', 1);\n $model->ios_pic_frame = $ios_pic_frame['path'];\n }\n if(!empty($android_pic)) {\n $android_pic = FileTool::upload($android_pic, 'material', 'jpg', 1);\n $model->android_pic = $android_pic['path'];\n }\n if($model->save())\n {\n if (!empty($pic)) \n {\n Type::getSmallSizePic($model,'small_pic','304x336');\n Type::getSmallSizePic($model,'icon','150x150');\n\t\t\t\tType::getSmallSizePic($model,'small_pic_new','1200x1085');\n }\n if ($is_new != $old_is_new && ($model->device == 0 || $model->device == 2))\n\t\t\t{\n\t\t\t\tType::updateWhatsNewIds(null,1);\n\t\t\t}\n\t\t\tif ($model->name != $old_name)\n\t\t\t{\n\t\t\t\tType::updateMaterialType($model,$old_name);\n\t\t\t}\n return redirect()->back()->with('status', '修改成功!');\n }else {\n return redirect()->back()->with('status', '修改失败!');\n }\n }", "title": "" }, { "docid": "5c079033ad111d9349f520bc3844c3e3", "score": "0.6056549", "text": "public function updateUseModel($model, $requestData, $merge_data_with = []);", "title": "" }, { "docid": "45d12f4b06cc92411e016f2c942bddba", "score": "0.6050041", "text": "public function update(){\n\t}", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.6038279", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.6038279", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.6038279", "text": "public function update($data);", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.6038279", "text": "public function update($data);", "title": "" }, { "docid": "418a39007e047cabee577ea6676234ca", "score": "0.60328805", "text": "public function update(Request $request, $slug)\n {\n try{\n $obj = Obj::where('slug',$slug)->first();\n\n /* delete file request */\n if($request->get('deletefile')){\n\n if(Storage::disk('public')->exists($obj->image)){\n Storage::disk('public')->delete($obj->image);\n }\n redirect()->route('page',$slug);\n }\n\n $this->authorize('update', $obj);\n /* If image is given upload and store path */\n if(isset($request->all()['file_'])){\n $file = $request->all()['file_'];\n $filename = $request->get('slug').'.'.$file->getClientOriginalExtension();\n $path = Storage::disk('public')->putFileAs('articles', $request->file('file_'),$filename);\n $request->merge(['image' => $path]);\n }\n\n $labels = $request->get('labels');\n if($labels){\n $obj->labels()->detach();\n foreach($labels as $label){\n $obj->labels()->attach($label);\n }\n }else{\n $obj->labels()->detach();\n }\n\n $user = \\auth::user();\n $details = summernote_imageupload($user,$request->get('details'));\n $request->merge(['details'=>$details]);\n\n $description = summernote_imageupload($user,$request->get('description'));\n $request->merge(['description'=>$description]);\n\n \n\n $obj->update($request->except(['file_'])); \n\n $sizes = [300,600,900,1200];\n\n if($obj->image)\n if(Storage::disk('public')->exists($obj->image))\n foreach($sizes as $s)\n image_resize($obj->image,$s);\n\n /* update cache file of this product */\n $filename = $obj->slug.'.json';\n $filepath = $this->cache_path.$filename;\n\n $label1 = $obj->labels()->first();\n $label2 = $obj->labels()->skip(1)->first();\n $obj->labels = $obj->labels;\n if($label1){\n $obj->related1 = $label1->articles()->limit(4)->get(); \n }\n if($label2){\n $obj->related2 = $label2->articles()->limit(4)->get(); \n }\n\n file_put_contents($filepath, json_encode($obj,JSON_PRETTY_PRINT));\n\n /* update in cache folder main file */\n $filename = 'index.'.$this->app.'.'.$this->module.'.json';\n $filepath = $this->cache_path.$filename;\n $objs = $obj->orderBy('created_at','desc')->where('status',1)\n ->get(); \n file_put_contents($filepath, json_encode($objs,JSON_PRETTY_PRINT));\n \n\n flash('job item is updated!')->success();\n return redirect()->route('page',$slug);\n }\n catch (QueryException $e){\n $error_code = $e->errorInfo[1];\n if($error_code == 1062){\n flash('Some error in updating the record')->error();\n return redirect()->back()->withInput();\n }\n }\n }", "title": "" }, { "docid": "7a248f8addb9278c0b559e13a2d35895", "score": "0.6029203", "text": "public function update()\n {\n // code...\n }", "title": "" }, { "docid": "e2a0ecda45759c0620aab49e6cf56b12", "score": "0.6027338", "text": "public function flushModel()\n {\n $this->model = $this->newModel();\n }", "title": "" }, { "docid": "7fffcaac80e33272b9cc35f389c2ae1c", "score": "0.6026763", "text": "function updateObject()\n\t{\n\t\tif (!$this->checkPermissionBool(\"write\"))\n\t\t{\n\t\t\t$this->ilias->raiseError($this->lng->txt(\"msg_no_perm_write\"),$this->ilias->error_obj->MESSAGE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form = $this->initEditForm();\n\t\t\tif($form->checkInput())\n\t\t\t{\t\t\t\t\n\t\t\t\t$title = $form->getInput(\"title\");\n\t\t\t\t$desc = $form->getInput(\"desc\");\n\t\t\t\t$lang = $this->object->getTranslations();\n\t\t\t\t$lang = $lang[\"Fobject\"][0][\"lang\"]; \n\t\t\t\t$this->object->deleteTranslation($lang);\n\t\t\t\t$this->object->addTranslation($title, $desc, $lang, true);\t\n\t\t\t\t$this->object->setTitle($title);\n\t\t\t\t$this->object->setDescription($desc);\n\t\t\t\t$this->object->update();\n\t\t\t\t\n\t\t\t\t$this->saveSortingSettings($form);\n\t\t\t\t\n\t\t\t\t// save custom icons\n/*\t\t\t\tif ($this->ilias->getSetting(\"custom_icons\"))\n\t\t\t\t{\n\t\t\t\t\tif($form->getItemByPostVar(\"cont_big_icon\")->getDeletionFlag())\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->object->removeBigIcon();\n\t\t\t\t\t}\n\t\t\t\t\tif($form->getItemByPostVar(\"cont_small_icon\")->getDeletionFlag())\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->object->removeSmallIcon();\n\t\t\t\t\t}\n\t\t\t\t\tif($form->getItemByPostVar(\"cont_tiny_icon\")->getDeletionFlag())\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->object->removeTinyIcon();\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->object->saveIcons($_FILES[\"cont_big_icon\"]['tmp_name'],\n\t\t\t\t\t\t$_FILES[\"cont_small_icon\"]['tmp_name'],\n\t\t\t\t\t\t$_FILES[\"cont_tiny_icon\"]['tmp_name']);\n\t\t\t\t}*/\n\n\t\t\t\t// BEGIN ChangeEvent: Record update\n\t\t\t\tglobal $ilUser;\n\t\t\t\trequire_once('Services/Tracking/classes/class.ilChangeEvent.php');\n\t\t\t\tilChangeEvent::_recordWriteEvent($this->object->getId(), $ilUser->getId(), 'update');\n\t\t\t\tilChangeEvent::_catchupWriteEvents($this->object->getId(), $ilUser->getId());\t\t\t\t\n\t\t\t\t// END ChangeEvent: Record update\n\t\t\t\t\n\t\t\t\t// services\n\t\t\t\tinclude_once './Services/Object/classes/class.ilObjectServiceSettingsGUI.php';\n\t\t\t\tilObjectServiceSettingsGUI::updateServiceSettingsForm(\n\t\t\t\t\t$this->object->getId(),\n\t\t\t\t\t$form,\n\t\t\t\t\tarray(\n\t\t\t\t\t\tilObjectServiceSettingsGUI::INFO_TAB_VISIBILITY,\n\t\t\t\t\t\tilObjectServiceSettingsGUI::NEWS_VISIBILITY,\n\t\t\t\t\t\tilObjectServiceSettingsGUI::TAXONOMIES\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t// Update ecs export settings\n\t\t\t\tinclude_once 'Modules/Category/classes/class.ilECSCategorySettings.php';\t\n\t\t\t\t$ecs = new ilECSCategorySettings($this->object);\t\t\t\n\t\t\t\tif($ecs->handleSettingsUpdate())\n\t\t\t\t{\n\t\t\t\t\treturn $this->afterUpdate();\n\t\t\t\t}\t\t\t\t\t\t\n\t\t\t}\n\n\t\t\t// display form to correct errors\n\t\t\t$this->setEditTabs();\n\t\t\t$form->setValuesByPost();\n\t\t\t$this->tpl->setContent($form->getHTML());\n\t\t}\n\t}", "title": "" }, { "docid": "d4074248e0a1fab1615f9e277478c327", "score": "0.6024282", "text": "public function update(Request $request, $id)\n {\n// dd($request);\n $id = Product::find($id);\n $id->name = $request->name;\n if($request->image){\n \\Storage::disk('public')->delete($id->image);\n $id->image = $request->image->store('img', 'public');\n }\n $id->price = $request->price;\n\n $id->save();\n $id->sizes()->sync($request->size);\n session()->flash('update','تم تحديث القسم بنجاح');\n return redirect('products');\n\n }", "title": "" }, { "docid": "3676b93b16199c329ab272bbe2377210", "score": "0.60230035", "text": "public function actionUpdate()\n {\n $id = Yii::$app->request->post('id');\n $model = $this->findModel($id);\n if ($model->load(Yii::$app->request->post())) {\n \n if(empty($model->type) == true){\n $model->type = 1;\n } \n \n if($model->validate() == true && $model->save()){\n $msg = array('errno'=>0, 'msg'=>'保存成功');\n echo json_encode($msg);\n }\n else{\n $msg = array('errno'=>2, 'data'=>$model->getErrors());\n echo json_encode($msg);\n }\n } else {\n $msg = array('errno'=>2, 'msg'=>'数据出错');\n echo json_encode($msg);\n }\n \n }", "title": "" }, { "docid": "7dbf5bf7615859ed58ffe89515d7accb", "score": "0.60079485", "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": "fe024caeaf3c83482bbcda054c2d5214", "score": "0.6006285", "text": "public function testUpdate()\n\t{\n\t\t$this->withoutMiddleware();\n\t\t$this->call('POST', '/specimentype', $this->specimenData);\n\t\t$specimenTypestored = SpecimenType::orderBy('id','desc')->first();\n\n\t\t$this->withoutMiddleware();\n\t\t$this->call('PUT', '/specimentype/'.$specimenTypestored->id, $this->specimenDataUpdate);\n\n\t\t$specimenTypeUpdated = SpecimenType::find($specimenTypestored->id);\n\t\t$this->assertEquals($specimenTypeUpdated->name , $this->specimenDataUpdate['name']);\n\t\t$this->assertEquals($specimenTypeUpdated->description ,$this->specimenDataUpdate['description']);\n\t}", "title": "" }, { "docid": "7ec49c24791bc5209157302bea3743a1", "score": "0.5999518", "text": "public function saveAndLoad() {\n\t\t$this->save();\n\t\t$this->load();\n\t}", "title": "" }, { "docid": "1e5f257bcf6a1cb1c879f3645f91d35a", "score": "0.5994371", "text": "public function update()\n {\n $primaryKey = $this->primaryKey();\n\n if ($this->$primaryKey === null) {\n throw new MisuseException('missing primary key value');\n }\n\n if (!isset($snapshot[$primaryKey])) {\n $this->_snapshot[$primaryKey] = $this->$primaryKey;\n }\n\n $snapshot = $this->_snapshot;\n\n /** @noinspection TypeUnsafeComparisonInspection */\n if ($this->$primaryKey != $snapshot[$primaryKey]) {\n throw new MisuseException('updating model primary key value is not support');\n }\n\n $fields = $this->fields();\n\n foreach ($fields as $field) {\n if ($this->$field === null) {\n null;\n } elseif (!isset($snapshot[$field])) {\n null;\n } elseif ($snapshot[$field] !== $this->$field) {\n if ((is_string($this->$field) && !is_string($snapshot[$field]))\n && (string)$snapshot[$field] === $this->$field\n ) {\n $this->$field = $snapshot[$field];\n }\n }\n }\n\n $this->validate();\n\n if (!$this->hasChanged($fields)) {\n return $this;\n }\n\n foreach ($this->getAutoUpdatedData() as $field => $value) {\n $this->$field = $value;\n }\n\n list($db, $table) = $this->getUniqueShard($this);\n\n $this->fireEvent('model:saving');\n $this->fireEvent('model:updating');\n\n $fieldValues = [];\n foreach ($fields as $field) {\n if ($this->$field === null) {\n if (isset($snapshot[$field])) {\n $fieldValues[$field] = null;\n }\n } elseif (!isset($snapshot[$field]) || $snapshot[$field] !== $this->$field) {\n $fieldValues[$field] = $this->$field;\n }\n }\n\n foreach ($this->jsonFields() as $field) {\n if (isset($fieldValues[$field]) && is_array($fieldValues[$field])) {\n $fieldValues[$field] = json_stringify($fieldValues[$field]);\n }\n }\n\n $bind = [];\n $expressionFields = [];\n foreach ($fieldValues as $field => $value) {\n if ($value instanceof ExpressionInterface) {\n $expressionFields[] = $field;\n $compiled = $value->compile($this, $field);\n\n $fieldValues[] = $compiled[0];\n if (count($compiled) !== 1) {\n unset($compiled[0]);\n $bind = $bind ? array_merge($bind, $compiled) : $compiled;\n }\n unset($fieldValues[$field]);\n }\n }\n\n $map = $this->map();\n foreach ($map as $property => $column) {\n if (array_key_exists($property, $fieldValues)) {\n $fieldValues[$column] = $fieldValues[$property];\n unset($fieldValues[$property]);\n }\n }\n\n /** @var \\ManaPHP\\Data\\DbInterface $db */\n $db = $this->getShared($db);\n $db->update($table, $fieldValues, [$map[$primaryKey] ?? $primaryKey => $this->$primaryKey], $bind);\n\n if ($expressionFields) {\n $query = $this->newQuery()->select($expressionFields)->whereEq($primaryKey, $this->$primaryKey);\n if ($rs = $query->execute()) {\n foreach ((array)$rs[0] as $field => $value) {\n $this->$field = $value;\n }\n }\n }\n\n $this->fireEvent('model:updated');\n $this->fireEvent('model:saved');\n\n $this->_snapshot = $this->toArray();\n\n return $this;\n }", "title": "" }, { "docid": "f8e9f6199b07e8b0ea8459dea3f3dcbe", "score": "0.5981485", "text": "public function Update($entity) {\r\n }", "title": "" }, { "docid": "c1a173d43c338596f7f7af63ab872440", "score": "0.59778214", "text": "public function updateEventModel(){\n $this->model('calender/updateModel');\n \n $this->model->load(); \n }", "title": "" }, { "docid": "223fd4bbbff789f535b68c05884688f8", "score": "0.5977577", "text": "function updateObjectDB () {\n\t\t$this->prepareValues();\n\t\t$database = mamboDatabase::getInstance();\n\t\t$database->doSQL($this->updateSQL());\n\t}", "title": "" }, { "docid": "9d7c2f4c38fa6cf92e2ee2fe2067acf6", "score": "0.59752214", "text": "protected abstract function update();", "title": "" }, { "docid": "1e27101d42bf12b6abe6cc9c9f23e960", "score": "0.5964374", "text": "private function update()\n\t{\n\t\t$where = $this->buildPrimaryKeyWhere();\n\t\t$updateMembers = $this->getDataArrayForQueryBuilder('update');\n\t\t$this->dataSource->update(static::$table['name'], $updateMembers, $where, static::$database);\n\t\t$this->reset();\n\t}", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5964292", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5964292", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5964292", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5964292", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5964292", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5964292", "text": "abstract public function save();", "title": "" }, { "docid": "c5469e44a59217a9a3c7464f3ea49995", "score": "0.5956878", "text": "public function update(Request $request, $id)\n {\n if($request->hasFile('image')) {\n $file_name = time().'.'.$request->image->extension(); \n $path = $request->file('image')->storeAs('public/attribute',$file_name);\n $category->image=$file_name;\n \n $Image = str_replace('/storage', '', $request->old_image);\n // dd($Image);\n #Using storage\n \n if(Storage::exists('public/attribute/' . $Image)){\n\n $delete= Storage::delete('/public/attribute/' . $Image);\n \n }\n } \n \n $attribute =Attribute::where('id', $id)->update([\n 'name'=>$request->attribute_name\n ]);\n $atr_id=AttributeValue::where('attribute_id',$id)->get();\n \n foreach($request->values as $key=>$val) \n {\n $attributes =AttributeValue::where('id', $key)->update([\n 'value'=>$val,\n ]);\n // AttributeValue::update([ \"id\"=> $key], [\n // 'value' => $val,\n // ]);\n \n }\n\n if($request->new_values){\n foreach($request->new_values as $key1=>$attr_val) \n {\n \n $data_3=[\n 'attribute_id'=>$request->attributes_id,\n 'value'=>$attr_val,\n 'created_at'=>date('Y-m-d H:i:s'),\n ];\n AttributeValue::insert($data_3);\n }\n }\n\n alert::success('Attribute Updated Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "ea74479e1ff194e5d28a9a1bd9ea39dc", "score": "0.5952788", "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": "2675eddffbb961ad2b8b84874d0fcee4", "score": "0.5949043", "text": "public function update(Request $request)\n {\n DB::beginTransaction();\n try {\n $request->validate([\n 'name' => 'sometimes|required|max:255',\n 'buyprice' => 'required',\n 'sellprice' => 'required',\n 'stock' => 'required',\n ]);\n\n $file = $request->file('path');\n if($file) {\n if($file->getSize() > 100000) throw new \\Exception('Maximum file size limit is 100 KB!');\n $fileName = Str::uuid().'.'.$file->getClientOriginalExtension();\n $file->move(base_path('public/images'), $fileName);\n }\n\n $model = Items::find($request->id);\n $model->name = $request->name;\n $model->buyprice = $request->buyprice;\n $model->sellprice = $request->sellprice;\n $model->stock = $request->stock;\n if(isset($fileName)) $model->path = '/images/'.$fileName;\n \n if(!$model->save()) return back()->with('error', 'Failed saving data!');\n DB::commit();\n return back()->with('success', 'Data updated successfully.');\n } catch (\\Exception $exception) {\n DB::rollback();\n return back()->with('error', 'Failed saving data! '.$exception->getMessage());\n }\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.59481853", "text": "public function update()\n {\n }", "title": "" } ]
95c43ab3089522809f55134e967a33cc
Check if products is available
[ { "docid": "9a75042348a032354663f23e4e345d57", "score": "0.0", "text": "protected function isNotAvailable(Request $request)\n {\n foreach (auth()->user()->cart as $product) {\n if (!$product->isAvailableIn(UserAddress::find($request->address)->warehouse())) {\n return $product;\n }\n }\n return null;\n }", "title": "" } ]
[ { "docid": "8d4bdd1820669ff28cb4de06e22e6dc0", "score": "0.7491704", "text": "function validateProductAvailability() {\n \n $res = $this->db->query(\"SELECT * FROM `event`\");\n while ($event = $res->fetch_assoc()) {\n $total = $this->db->query(\"SELECT COUNT(*) FROM `purchase`,`product` WHERE purchase.product_id = product.product_id AND purchase.refunded = 0 AND product.event_id = '%s'\", $event[\"event_id\"])->fetch_array();\n //If sold out, make unavailable\n if ($total[0] >= $event[\"ticket_limit\"]) {\n $this->db->query(\"UPDATE `product` SET available = 0 WHERE event_id = '%s'\", $event[\"event_id\"]);\n }\n }\n \n }", "title": "" }, { "docid": "2e7b1801b6b077e23162a1754c85ed50", "score": "0.74870616", "text": "public static function shopHasAvailablePromoProducts(){\n $orderBy = Tools::getProductsOrder('by');\n $orderWay = Tools::getProductsOrder('way');\n $all_products = Product::getProducts((int)Context::getContext()->language->id, 0, 0, $orderBy, $orderWay, ID_CATEGORY_MAIN, true, null, false);\n foreach ($all_products as $product){\n if (Product::combinationListHasPromo($product['combinations']))\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6c93516746db3314f8d497b3e5a53f78", "score": "0.7257828", "text": "function product_in_order_exists($products)\n {\n $db = new DbKitchen();\n for ($i = 0; $i < count($products); $i++) {\n $id_product = $products[$i][\"_id\"];\n $product = $db->db_get_product($id_product)['product'];\n if ($product == null OR $product['enabled'] == false) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "5b98940e22880e006c1c4c1dd116570b", "score": "0.72091496", "text": "protected function getAvailability()\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\t$stock = $this->services->getCrawler()->filter('#item_out_of_stock')->text();\r\n\t\t\t$this->product->setAvailable(false);\r\n\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tcatch (\\Exception $e)\r\n\t\t{\r\n\t\t\t// if the out of stock message isn't there then it's in stock\r\n\t\t\t$this->product->setAvailable(true);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e416725e6edcdb2203ef476ee255e37e", "score": "0.7200363", "text": "function is_product_available($product_id)\n {\n $product_id = intval($product_id);\n if( $product_id<=0 )\n {\n return false;\n }\n\n $this->db->select('id');\n $this->db->from(db_prefix.'Products as products'); \n $this->db->where('products.id',$product_id);\n $this->db->where('products.blocked = 0'); \n $this->db->where('products.closed = 0'); \n $this->db->limit(1);\n $query = $this->db->get();\n\n if( $query->num_rows() > 0 )\n {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "21f04be1b190f0d0c79a3f2fb9aabd7d", "score": "0.70279163", "text": "public function availabilityAction()\n {\n $postcode = $this->getRequest()->getParam('postcode');\n $productId = $this->getRequest()->getParam('productId');\n $qty = $this->getRequest()->getParam('qty');\n\n if (!$postcode) {\n return $this->jsonError($this->helper->__('Postcode is required'));\n }\n if (!$productId) {\n return $this->jsonError($this->helper->__('Product ID is required'));\n }\n\n\n // check product is in stock\n /** @var Mage_Catalog_Model_Product $product */\n $product = Mage::getModel('catalog/product');\n $product->load($productId);\n if (!$product->getId()) {\n return $this->jsonError($this->helper->__('Product not found'));\n }\n if (!$product->isAvailable()) {\n // TODO: product placeholders\n return $this->jsonError(\n $this->helper->processPlaceholders(\n $this->helper->getAvailabilityTextOutOfStock()\n )\n );\n }\n\n if ($product->isVirtual()) {\n return $this->jsonError($this->helper->__('Virtual products cannot be shipped'));\n }\n\n // check store working hours + Porterbuddy hours\n $date = $this->availability->getAvailableUntil();\n if (!$date) {\n return $this->jsonError(\n $this->helper->processPlaceholders(\n $this->helper->getAvailabilityTextNoDate()\n )\n );\n }\n\n if (!$product->isSaleable()){\n return $this->jsonError(\n $this->helper->processPlaceholders(\n $this->helper->getAvailabilityTextOutOfStock()\n )\n );\n }\n\n $now = $this->helper->getCurrentTime();\n // server-based countdown in case browser's clocks lie\n $timeRemaining = floor(($date->getTimestamp() - $now->getTimestamp())/60); // minutes\n\n // today, tomorrow, Monday, May 28\n $now = $this->helper->getCurrentTime();\n if ($now->format('Y-m-d') == $date->format('Y-m-d')) {\n $humanDate = mb_convert_case($this->helper->__('Today'), MB_CASE_LOWER);\n } elseif ($now->modify('+1 day')->format('Y-m-d') == $date->format('Y-m-d')) {\n $humanDate = mb_convert_case($this->helper->__('Tomorrow'), MB_CASE_LOWER);\n } else {\n $humanDate = $this->helper->__($date->format('l'));\n }\n\n $result = new Varien_Object(array(\n 'available' => true,\n 'date' => $date->format(DateTime::ATOM),\n 'humanDate' => $humanDate,\n 'timeRemaining' => $timeRemaining,\n ));\n Mage::dispatchEvent('convert_porterbuddy_availability', array(\n 'postcode' => $postcode,\n 'product' => $product,\n 'qty' => $qty,\n 'result' => $result,\n ));\n\n if ($result->getError()) {\n $defaultMessage = $this->helper->processPlaceholders(\n $this->helper->getAvailabilityTextOutOfStock()\n );\n return $this->jsonError($result->getMessage() ?: $defaultMessage);\n }\n\n return $this->prepareDataJSON($result);\n }", "title": "" }, { "docid": "28d89103588f19af604ed389868adc0b", "score": "0.6990601", "text": "function is_available()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7cc431ca1e54c461ef69aed7e4dcd0be", "score": "0.69714355", "text": "public function hasProduct()\n {\n return (Mage::registry('Object_Cache_Product')) ? true : false;\n }", "title": "" }, { "docid": "aab30c81ae3031f0e09f36c42c562663", "score": "0.69308174", "text": "public function is_available() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.69099694", "text": "public function isAvailable();", "title": "" }, { "docid": "9875fde057109bb7390b1b109af92c74", "score": "0.68810487", "text": "public function is_available()\n {\n return $this->get_available();\n }", "title": "" }, { "docid": "83d2b730f7232c3107c524455b2d0f0d", "score": "0.6874761", "text": "public function isAvailable()\n {\n if (!\\in_array(Isotope::getConfig()->currency, array('EUR', 'CHF', 'GBP'), true)) {\n return false;\n }\n\n try {\n return parent::isAvailable();\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "7d7e2c64214885d3dd9a77b0a95cef6a", "score": "0.68127215", "text": "public function is_available() {\n\n\t\t// proper configuration\n\t\tif ( ! $this->get_ssl_merchant_id() || ! $this->get_ssl_user_id() || ! $this->get_ssl_pin() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// all dependencies met\n\t\tif ( count( wc_elavon_vm()->get_missing_dependencies() ) > 0 ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent::is_available();\n\t}", "title": "" }, { "docid": "2ea3b1c1fbef79b54a997418d8b447c0", "score": "0.67775893", "text": "public function productsAreCached();", "title": "" }, { "docid": "4c2484c1bb163ffdc7ed296762a437b2", "score": "0.6750821", "text": "function checkProducts() {\n\t\t$queryCheck = \"\tSELECT \n\t\t\t\t\t\t\tidproducto, p.idcomanda, d.nombre AS lugar\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tcom_pedidos p\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t\t\tapp_departamento d\n\t\t\t\t\t\t\tON\n\t\t\t\t\t\t\t\tp.tipo = d.id\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\t\t\t\tcom_comandas c\n\t\t\t\t\t\t\tON\n\t\t\t\t\t\t\t\tp.idcomanda = c.id\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\tp.status = 2 \n\t\t\t\t\t\tAND \n\t\t\t\t\t\t\tc.status = 0\";\n\t\t$result = $this -> queryArray($queryCheck);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ad250db3212ae4d594465369872c6e2b", "score": "0.67443514", "text": "public function is_available() {\r\n\r\n\t\tif ( ! function_exists( 'is_pos' ) || ! is_pos() ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif ( is_checkout() ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n if ( empty( POS_HOST ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn parent::is_available();\r\n\t}", "title": "" }, { "docid": "c3564b591f76a14c21d5708eed62f172", "score": "0.67385626", "text": "public function available()\n {\n return $this->stock !== 0;\n }", "title": "" }, { "docid": "52065eb5df7e019f99d650871717b675", "score": "0.6713635", "text": "public static function isAvailable(){\n\t\treturn true;\n\t}", "title": "" }, { "docid": "838f613fd1fea5ca300aad2473d2e2d6", "score": "0.67061156", "text": "private function checkStock($productId) {\n return Product::where('id',$productId)->where('quantity','>', 0)->exists();\n }", "title": "" }, { "docid": "f2a8a5dccb09bfc43078c9d22167c336", "score": "0.6693044", "text": "public function getAvailable(ProductModel $product)\n\t{\n\t\t$provider_key = $product->provider_key;\n\n\t\t$provider_service = ProductFactory::providerService($provider_key);\n\n\t\t$availables = $provider_service->getAvailables([$product]);\n\n\t\treturn array_get($availables, $product->id, -1);\n\t}", "title": "" }, { "docid": "0c4bb4857c8ac41be0546be36cbd03df", "score": "0.6684304", "text": "public function addAllSupportedProducts() {\n\t\t$result = TRUE;\n\n\t\t$visibilities = Mage::getSingleton('catalog/product_visibility')->getVisibleInSiteIds();\n\n\t\t$products = Mage::getModel('catalog/product')->getCollection()\n\t\t\t\t->addAttributeToFilter('visibility', array('in' => $visibilities))\n\t\t\t\t->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)\n\t\t\t\t->addAttributeToFilter('type_id', array('in' => $this->_getHelper()->getSupportedProductTypes()));\n\n\t\tforeach ($products as $product) {\n\t\t\t$added = $this->addItem($product);\n\t\t\tif (!$added) {\n\t\t\t\t$result = FALSE;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "5bf3c5423faaf9eb5fda840803d4b603", "score": "0.66627467", "text": "abstract public function isAvailable();", "title": "" }, { "docid": "573f56b708586f928c8eaa3672a81b66", "score": "0.6655287", "text": "public static function isAvailable()\n {\n return count(self::listAvailable()) > 1;\n }", "title": "" }, { "docid": "8d06e3847d95fcf964bc0049c1a9738a", "score": "0.6607876", "text": "public function isUsedForProduct($id=0);", "title": "" }, { "docid": "82051017dcd387ac3ced51f971ec87d6", "score": "0.66030073", "text": "function isAvailableOnRequest() {\n\t\treturn $this->getAvailableOnRequest()==true;\n\t}", "title": "" }, { "docid": "7d222bf44e06a8f0b92dd888301d4f71", "score": "0.6602826", "text": "public function check_availability();", "title": "" }, { "docid": "7d222bf44e06a8f0b92dd888301d4f71", "score": "0.6602826", "text": "public function check_availability();", "title": "" }, { "docid": "8e47bf2ec010425bc3e5032c181e7f78", "score": "0.6601434", "text": "public function isThereProductWithActiveLicense(){\n /**\n * We will directly query in the database instead of depending on\n * objects returned by getAllEpitroveProducts because this method\n * returns only plugins which are active. Therefore if there is any\n * plugin which is in deactivated state but active license status, then\n * that can't be captured with getAllEpitroveProducts method\n */\n global $wpdb;\n\n $likePattern = \"'%epi_%_license_status%'\";\n\n $licenseStatuses = array_map(function($status){\n return \"'\" . $status . \"'\";\n }, self::activeLicenseStatuses());\n $licenseStatuses = implode(',', $licenseStatuses);\n\n $query = \"\n SELECT count('option_id')\n FROM $wpdb->options\n WHERE `option_name` LIKE $likePattern\n AND `option_value` IN ($licenseStatuses)\n \";\n\n return $wpdb->get_var($query) > 0 ? true : false;\n\n }", "title": "" }, { "docid": "e4295ae41ac50e6c0437654f35023a79", "score": "0.6583262", "text": "public function isAvailable()\n {\n return true;\n }", "title": "" }, { "docid": "e4295ae41ac50e6c0437654f35023a79", "score": "0.6583262", "text": "public function isAvailable()\n {\n return true;\n }", "title": "" }, { "docid": "e4295ae41ac50e6c0437654f35023a79", "score": "0.6583262", "text": "public function isAvailable()\n {\n return true;\n }", "title": "" }, { "docid": "d7adb826fadae476e7ac2ada4d83b6ec", "score": "0.65831965", "text": "public function checkInventoryTracking() {\n\t\t$client = $this->client;\n\t\t$request_data = $this->request_data;\n\t\t\n\t\t$id = $this->getBCID();\n\n\t\t$product_id = (is_array($id))?$id['parent_id']:$id;\n\t\t\n\t\ttry {\n\t\t\t$response = $client->get(\"products/{$product_id}\");\n\t\t} catch (\\Exception $e) {\n\t\t\t$this->doException($e,\"checking product's inventory tracking status\");\n\t\t}\n\n\t\t$product = $response->json(array('object'=>TRUE));\n\t\t\n\t\t/*\n\t\t\tnone\n\t\t\tsimple\n\t\t\tsku\n\t\t*/\n\t\t\n\t\tif($product->inventory_tracking == 'none' ) {\n\t\t\t$this->doException(null,\"This product does not have inventory tracking enabled.\");\n\t\t}\n\n\t}", "title": "" }, { "docid": "d43846b5be49188d4bc14f94f1645270", "score": "0.65770465", "text": "function checkProductsCheckInventory()\r\n\t{\r\n\t\t// if this has already been done, don't repeat\r\n\t\tif (Tienda::getInstance()->get('checkProductsCheckInventory', '0'))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$table = '#__tienda_products';\r\n\t\t$definitions = array();\r\n\t\t$fields = array();\r\n\r\n\t\t$fields[] = \"product_check_inventory\";\r\n\t\t$newnames[\"product_check_inventory\"] = \"product_check_inventory\";\r\n\t\t$definitions[\"product_check_inventory\"] = \"tinyint(1) DEFAULT '0' COMMENT 'Check Inventory for this Product?'\";\r\n\r\n\t\t$fields[] = \"product_ships\";\r\n\t\t$newnames[\"product_ships\"] = \"product_ships\";\r\n\t\t$definitions[\"product_ships\"] = \"tinyint(1) DEFAULT '0' COMMENT 'Product Requires Shipping?'\";\r\n\r\n\t\tif ($this->changeTableFields( $table, $fields, $definitions, $newnames ))\r\n\t\t{\r\n\t\t\t// Update config to say this has been done already\r\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n\t\t\t$config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n\t\t\t$config->load( array( 'config_name'=>'checkProductsCheckInventory') );\r\n\t\t\t$config->config_name = 'checkProductsCheckInventory';\r\n\t\t\t$config->value = '1';\r\n\t\t\t$config->save();\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "724e26f2dbfdfa05ee6efc0c0bf8562f", "score": "0.65751195", "text": "static public function isAvailable() {\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "98dcdb54f7b55b7e64775528e298edc8", "score": "0.6568963", "text": "public function isProductAvailable(String $product_name)\n {\n $is_available = false;\n foreach ($this->available_products as $key => $value) {\n if (strtoupper($product_name) === strtoupper($key)) {\n $is_available = true;\n }\n }\n return $is_available;\n }", "title": "" }, { "docid": "9c519c3ce75a685988d1099dc9eb3079", "score": "0.6565398", "text": "function checkProductsInventory()\r\n\t{\r\n\t\t// if this has already been done, don't repeat\r\n\t\tif (Tienda::getInstance()->get('checkProductsInventory', '0'))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$table = '#__tienda_products';\r\n\t\t$definitions = array();\r\n\t\t$fields = array();\r\n\r\n\t\t$fields[] = \"product_check_inventory\";\r\n\t\t$definitions[\"product_check_inventory\"] = \"tinyint(1) DEFAULT '0' COMMENT 'Check Product Inventory?'\";\r\n\r\n\t\tif ($this->insertTableFields( $table, $fields, $definitions ))\r\n\t\t{\r\n\t\t\t// Update config to say this has been done already\r\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n\t\t\t$config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n\t\t\t$config->load( array( 'config_name'=>'checkProductsInventory') );\r\n\t\t\t$config->config_name = 'checkProductsInventory';\r\n\t\t\t$config->value = '1';\r\n\t\t\t$config->save();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "bac81170f038095e519ef9be2b533549", "score": "0.6511894", "text": "protected function isInstalledAndEnabled()\n {\n return $this->isPluginAvailable($this->identifier)\n && Settings::get('snipcartshop_products_enabled', true);\n }", "title": "" }, { "docid": "e68b32e692eed61ab233ceac4624e78f", "score": "0.6477271", "text": "public static function available();", "title": "" }, { "docid": "8bff9e0e8d55b6aae602cd7329f3e3c5", "score": "0.64759976", "text": "public abstract function can_load( $product );", "title": "" }, { "docid": "c1d149f36cc21d547b399fd39443ac44", "score": "0.6459374", "text": "function checkProductsNotForSale()\r\n\t{\r\n\t\t// if this has already been done, don't repeat\r\n\t\tif (Tienda::getInstance()->get('checkProductsNotForSale', '0'))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$table = '#__tienda_products';\r\n\t\t$definitions = array();\r\n\t\t$fields = array();\r\n\r\n\t\t$fields[] = \"product_notforsale\";\r\n\t\t$definitions[\"product_notforsale\"] = \"tinyint(1) NOT NULL\";\r\n\r\n\t\t$fields[] = \"quantity_restriction\";\r\n\t\t$definitions[\"quantity_restriction\"] = \"tinyint(1) NOT NULL\";\r\n\r\n\t\tif ($this->insertTableFields( $table, $fields, $definitions ))\r\n\t\t{\r\n\t\t\t// Update config to say this has been done already\r\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n\t\t\t$config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n\t\t\t$config->load( array( 'config_name'=>'checkProductsNotForSale') );\r\n\t\t\t$config->config_name = 'checkProductsNotForSale';\r\n\t\t\t$config->value = '1';\r\n\t\t\t$config->save();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "e26bd2f9d36ed4fc1706b0e7314c5f91", "score": "0.6448575", "text": "function has_subproducts() {\n\t\tif (count($this->products_uid) > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "1668aab25ae825a70a8a300e3f3a3ac4", "score": "0.6431135", "text": "public function is_available() {\n\t\tif( ! parent::is_available() ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif( ! is_admin() ) {\n\t\t\tif( ! $this->check_customer_country() ) {\n\t\t\t\treturn false;\n\t\t\t} else if( ! $this->check_customer_currency() ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "73b5fcbb1d2cc0a61de1aabb5b21cd11", "score": "0.6429476", "text": "public function isAvailable()\n {\n $this->data = null;\n $this->load();\n return isset($this->flatData[ConfigOptionsListConstants::CONFIG_PATH_INSTALL_DATE]);\n }", "title": "" }, { "docid": "d474ca4440ce22fed053cbd7cb89a02b", "score": "0.6422966", "text": "public function hasRatedAnyProduct(): bool\n {\n return$this->products->load('currentPromotions')->count();\n }", "title": "" }, { "docid": "d84dcc6c143d920e5c68a5efd47e8bb2", "score": "0.6408943", "text": "public function updateAvailable()\n {\n $productAmount = $this->getProductAmount();\n $productQuantity = $this->utils->getProductsQuantity();\n\n $obProduct = new \\CCatalogProduct();\n //$el = new \\CIBlockElement();\n\n foreach ($productAmount as $id => $quantity) {\n\n if ($quantity < 2) {\n $quantity = 0;\n }\n\n if($quantity != $productQuantity[$id]){\n $productQuantity[$id] = $quantity;\n $obProduct->Update($id, ['QUANTITY' => $quantity]);\n }\n }\n\n// unset($productAmount, $id, $quantity);\n//\n// foreach($productQuantity as $id => $quantity){\n//\n// if($quantity != 0 && $ids[$id] != 'Y'){\n// $el->Update($id, ['ACTIVE' => 'Y']);\n// }\n// elseif($quantity == 0 && $ids[$id] != 'N'){\n// $el->Update($id, ['ACTIVE' => 'N']);\n// }\n// }\n }", "title": "" }, { "docid": "a259e4eb3d54d30d214488a1b590beeb", "score": "0.64050186", "text": "public function TriedToGetProd() {\n\t\tif (isset($_GET[$this -> prodID])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cfa06d1d4c605c6501a669521cc025c1", "score": "0.63996387", "text": "public function hasImmersion(){\n if($this->products()->where('product','immersion')->where('status',1)->where('limit_date','>',gmdate('Y-m-d'))->first()){\n return true;\n };\n return false;\n }", "title": "" }, { "docid": "1ac3ba0ed570f99cdb85a01cabce1f8a", "score": "0.63971114", "text": "public function isAvailable(): bool\n {\n return true;\n }", "title": "" }, { "docid": "e0af629387a11331e76d9c3f0abd07b1", "score": "0.6363634", "text": "public function isAvailable() : bool\n\t{\n\t\treturn parent::isAvailable() && $this->getStatus() > 0;\n\t}", "title": "" }, { "docid": "0cbcc024e3026bffce3e1ca9ddb9322d", "score": "0.6361947", "text": "public function disableProduct(): bool\n {\n }", "title": "" }, { "docid": "b9106b7f7a8f0a193695619a93ef4e57", "score": "0.63605505", "text": "function _kapi_manager_db_exists_product($product_name) {\n $result = db_select('kapi_manager_products', 'p')\n ->fields('p', array('name'))\n ->condition('name', $product_name, 'LIKE')\n ->execute()\n ->fetchField();\n if ($result === $product_name) {\n return TRUE;\n }\n return FALSE;\n}", "title": "" }, { "docid": "fa40cfe6279c85379c945c088b439b10", "score": "0.63533545", "text": "private function allowPurchasingPrice(): bool\n\t{\n\t\treturn AccessController::getCurrent()->check(ActionDictionary::ACTION_PRODUCT_PURCHASE_INFO_VIEW);\n\t}", "title": "" }, { "docid": "746e90bc6bc6937b4d73f460d317dd36", "score": "0.63521606", "text": "function isEddProductsFeedProActive() {\r\n\treturn class_exists( 'Wpeddpcf_Product_Catalog' );\r\n}", "title": "" }, { "docid": "486a5fdc51792c5f16c14b45e8807cbd", "score": "0.634169", "text": "public function shouldProcessProduct()\n {\n return (bool) Mage::getStoreConfig('internalseolinking/process_options/products');\n }", "title": "" }, { "docid": "089dd07eba5cb1f087cb25732e19efbc", "score": "0.63408923", "text": "private function productList() {\n\t\t$result = $this->storage->getProductList($this->data['warehouseOwner']);\n\n\t\t$status = !empty($result);\n\n\t\t$this->response($status, $result);\n\t}", "title": "" }, { "docid": "fb8a1f4290fbeea82f829d7410588c70", "score": "0.6338846", "text": "protected function checkConditions()\n {\n// todo add configuration check per website and product\n// todo return true or false\n /* todo check if current product has option turned on,\n if website has option turned on,\n\n */\n $product = $this->getProduct();\n\n }", "title": "" }, { "docid": "61735ed1f547a2c47fd74ab9cd219334", "score": "0.63308144", "text": "public function isAvailable(): bool\n {\n return $this->getPhase() === 'Available';\n }", "title": "" }, { "docid": "7e3866aa60ab05743414106e7e5945cf", "score": "0.63126767", "text": "public function getAvailability()\n\t{\n\t\t$productData = $this->getProductData();\n\t\tif (!empty($productData['prodavailability'])) {\n\t\t\treturn $productData['prodavailability'];\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "76239a9259eccade32df12cf653f25d7", "score": "0.6311846", "text": "public function check_availability() {\n \n return true;\n \n }", "title": "" }, { "docid": "53a936b10cc2d976c81121708f99b469", "score": "0.6293039", "text": "public function isTheProductAvailableForAService($product_type_id){\n $model = new ProductType;\n return $model->isTheProductAvailableForAService($product_type_id);\n }", "title": "" }, { "docid": "d0863c1249ba576b26f397e28a3dc4ca", "score": "0.62898886", "text": "public function isSetProduct()\n {\n return count ($this->_fields['Product']['FieldValue']) > 0;\n }", "title": "" }, { "docid": "659084ee3e6917ceefef19b1ca8375d8", "score": "0.62856746", "text": "public function checkAvailable(Request $request){\n $changes = false;\n $oldcart = Session::get('cart');\n $cart = new Cart($oldcart);\n foreach ($cart->items as $item){\n $product = Product::find($item['item']['id']);\n //counter for each size\n $countS=0;\n $countM=0;\n $countL=0;\n $sizes= explode('|', $item['sizes']);\n\n //for each size check if there are more then available sizes\n foreach ($sizes as $size) {\n if ($size == 'small') {\n if (($product->sizeS) < ($countS+1)) {\n $changes=true;\n $cart->soldOut($item['item']['id'], $size);\n }else{\n $countS++;\n }\n }else if ($size == 'medium') {\n if ($product->sizeM < $countM+1) {\n $cart->soldOut($item['item']['id'], $size);\n $changes=true;\n }else{\n $countM++;\n }\n } else if ($size == 'large') {\n if ($product->sizeL < $countL+1) {\n $cart->soldOut($item['item']['id'], $size);\n $changes=true;\n }else{\n $countL++;\n }\n }\n }\n }\n $request->session()->put('cart', $cart);\n return $changes;\n }", "title": "" }, { "docid": "b21b7be7fdb72b37ab95f8a9c8641fc7", "score": "0.6284485", "text": "protected function is_available() {\n\t\treturn ( 3 > $this->options['force_lang'] ) || class_exists( 'PLL_Xdata_Domain', true );\n\t}", "title": "" }, { "docid": "cbc9a76fc2228c15ad1afbc1ad4cb0ea", "score": "0.6278443", "text": "protected function isPagePublicProduct(): bool\n {\n return 'product' === Dispatcher::getInstance()->getController();\n }", "title": "" }, { "docid": "6f586e130c7fe2bf8612276b13f03180", "score": "0.6267715", "text": "public function checkEpitroveProductUpdates()\n {\n $epitroveProducts = $this->getAllEpitroveProducts();\n \n if (empty($epitroveProducts)) {\n return;\n }\n\n require_once 'class-epitrove-updater.php';\n\n if (! class_exists('\\Licensing\\EpitroveUpdater')) {\n error_log(\"Updater Class Not Found\");\n return;\n }\n\n $registered_email = self::getRegisteredEmail();\n\n if (empty($registered_email)) {\n error_log(\"No registered email found\");\n return;\n }\n\n foreach ($epitroveProducts as $product) {\n if ($product->isActiveLicense()) {\n new \\Licensing\\EpitroveUpdater($product);\n }\n }\n }", "title": "" }, { "docid": "d2191cbd810dae5a58701f5bb44df8fd", "score": "0.62604135", "text": "function isProductCatalogFeedProActive() {\r\n\treturn class_exists( 'wpwoof_product_catalog' );\r\n}", "title": "" }, { "docid": "bdee4c7d25c60f5ac411a1cb733372e4", "score": "0.62536424", "text": "function productExists($product_id) {\n\t\t\t//Sprintf pour niquer les injections SQL :)\n\t\t\t$sql = sprintf(\"SELECT * FROM php_shop_products WHERE id = %d;\",\n\t\t\t\t\t\t\t$product_id); \n\t\t\t\t\n\t\t\treturn mysql_num_rows(mysql_query($sql)) > 0;\n\t}", "title": "" }, { "docid": "f5e1545db704a00e65c694d0634fce10", "score": "0.6253422", "text": "public function check_product_purchace_lmi()\n\t{\n\t\tif(($this->input->post(\"quantity\"))!= '0'){\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "54ff10cd951bc8760c8f2008ec25f3cf", "score": "0.62412715", "text": "function check_inventory() {\n\t\t$contents = $this->contents ();\n\t\t\n\t\t//this array merges any products that share the same product id\n\t\t$new_contents = array ();\n\t\tforeach ( $contents as $c ) {\n\t\t\t// skip gift card products\n\t\t\tif ($c ['is_gc']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//combine any product id's and tabulate their quantities\n\t\t\tif (array_key_exists ( $c ['id'], $new_contents )) {\n\t\t\t\t$new_contents [$c ['id']] = intval ( $new_contents [$c ['id']] ) + intval ( $c ['quantity'] );\n\t\t\t} else {\n\t\t\t\t$new_contents [$c ['id']] = $c ['quantity'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t$error = '';\n\t\t$this->CI->load->model ( 'Product_model' );\n\t\tforeach ( $new_contents as $product_id => $quantity ) {\n\t\t\t$product = $this->CI->Product_model->get_product ( $product_id );\n\t\t\t\n\t\t\t//make sure we're tracking stock for this product\n\t\t\tif (( bool ) $product->track_stock) {\n\t\t\t\tif (intval ( $quantity ) > intval ( $product->quantity )) {\n\t\t\t\t\t$error .= '<p>' . sprintf ( lang ( 'not_enough_stock' ), $product->name, $product->quantity ) . '</p>';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (! empty ( $error )) {\n\t\t\treturn $error;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "c6fa2d7f3a420823c275d08ad9c7dcf7", "score": "0.62386876", "text": "public function isAvailable() : bool;", "title": "" }, { "docid": "59a7e5930ca2545ceda57ea34af907cb", "score": "0.6212733", "text": "function is_available() {\n global $CFG;\n\n //we need the curriculum directory\n if (!file_exists($CFG->dirroot.'/curriculum/config.php')) {\n return false;\n }\n\n //we also need the curr_admin block\n if (!record_exists('block', 'name', 'curr_admin')) {\n return false;\n }\n\n //everything needed is present\n return true;\n }", "title": "" }, { "docid": "886de704e34030ba016eb3377c0f2764", "score": "0.6203616", "text": "public function isUsedForProduct($id=0) {\n //TODO implement\n return true;\n }", "title": "" }, { "docid": "c8932ac8b63c5de5610e6ea532107069", "score": "0.61978847", "text": "public function hadProduct(string $name): bool\n {\n return array_key_exists($name, $this->items);\n }", "title": "" }, { "docid": "8d83068072cf17b910c28b1c0471ddd3", "score": "0.61956537", "text": "public function isSetProducts()\n {\n return !is_null($this->_fields['Products']['FieldValue']);\n }", "title": "" }, { "docid": "3cb3c919bb3c2ec4c9e441c51d374bc2", "score": "0.61874247", "text": "function should_serve2($master_id, $productId)\n {\n $this->load->model('muserlogin_vendor_model');\n $cat_arr = $this->muserlogin_vendor_model->get_cat_arr($master_id);\n \n $found = false;\n \n foreach ($cat_arr as $cat_row) {\n if ($cat_row->catId == CATEGORY_WATER_LPG) {\n $found = in_array($productId, $cat_row->productIds);\n }\n }\n \n return $found;\n }", "title": "" }, { "docid": "d80cd133fd9454a99d2ed59899019a6e", "score": "0.618084", "text": "public function haveStockableItems(): bool\n {\n foreach ($this->items as $item) {\n if ($item->product->isStockable()) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "a7f55dca6cdbc8ddf7320a026088e310", "score": "0.6172189", "text": "public function isAvailable()\n {\n return $this->isavailable;\n }", "title": "" }, { "docid": "dbd73e61c0157e14d8e4517b07247f75", "score": "0.61714715", "text": "public function checkByName($productsName);", "title": "" }, { "docid": "6f77844b44e5ab2720e68a5781475578", "score": "0.61708003", "text": "function checkProRatedSubscriptionProducts()\r\n\t{\r\n\t\t//if this has already been done, don't repeat\r\n\t\tif (Tienda::getInstance()->get('checkProRatedSubscriptionProducts', '0')) return true;\r\n\t\t \r\n\t\t$table = '#__tienda_products';\r\n\t\t$definitions = array();\r\n\t\t$fields = array();\r\n\r\n\t\t$fields[] = \"subscription_prorated\";\r\n\t\t$fields[] = \"subscription_prorated_date\";\r\n\t\t$fields[] = \"subscription_prorated_charge\";\r\n\t\t$fields[] = \"subscription_prorated_term\";\r\n\r\n\t\t$definitions[\"subscription_prorated\"] = \"TINYINT( 1 ) NOT NULL DEFAULT '0'\";\r\n\t\t$definitions[\"subscription_prorated_date\"] = \"VARCHAR( 5 ) NULL DEFAULT NULL\";\r\n\t\t$definitions[\"subscription_prorated_charge\"] = \"TINYINT( 1 ) NOT NULL DEFAULT '1'\";\r\n\t\t$definitions[\"subscription_prorated_term\"] = \"VARCHAR( 1 ) NOT NULL DEFAULT 'D'\";\r\n\t\t\r\n\t\tif ($this->insertTableFields( $table, $fields, $definitions ))\r\n\t\t{\r\n\t\t\t// Update config to say this has been done already\r\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n\t\t\t$config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n\t\t\t$config->load( array( 'config_name'=>'checkProRatedSubscriptionProducts') );\r\n\t\t\t$config->config_name = 'checkProRatedSubscriptionProducts';\r\n\t\t\t$config->value = '1';\r\n\t\t\t$config->save();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "792d23263fc93d78d3c8a8abd44c80e9", "score": "0.6170112", "text": "public function checkPermission()\n {\n if (\\Input::get('act') != '' && (\\Input::get('mode') == '' || is_numeric(\\Input::get('mode'))))\n {\n $GLOBALS['TL_DCA']['tl_iso_products']['config']['closed'] = false;\n }\n\n // Hide \"add variant\" button if no products with variants enabled exist\n if (\\Database::getInstance()->query(\"SELECT COUNT(*) AS total FROM tl_iso_products p LEFT JOIN tl_iso_producttypes t ON p.type=t.id WHERE t.variants='1'\")->total == 0)\n {\n unset($GLOBALS['TL_DCA']['tl_iso_products']['list']['global_operations']['new_variant']);\n }\n\n $session = $this->Session->getData();\n\n $arrProducts = \\Isotope\\Backend::getAllowedProductIds();\n\n // Method will return true if no limits should be applied (e.g. user is admin)\n if (true === $arrProducts)\n {\n return;\n }\n\n // Filter by product type and group permissions\n if (empty($arrProducts))\n {\n unset($GLOBALS['TL_DCA']['tl_iso_products']['list']['global_operations']['new_variant']);\n unset($session['CLIPBOARD']['tl_iso_products']);\n $session['CURRENT']['IDS'] = array();\n $GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['filter'][] = array('id=?', 0);\n\n if (false === $arrProducts)\n {\n unset($GLOBALS['TL_DCA']['tl_iso_products']['list']['global_operations']['new_product']);\n }\n }\n else\n {\n // Maybe another function has already set allowed product IDs\n if (is_array($GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['root']))\n {\n $arrProducts = array_intersect($GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['root'], $arrProducts);\n }\n\n $GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['root'] = $arrProducts;\n\n // Set allowed product IDs (edit multiple)\n if (is_array($session['CURRENT']['IDS']))\n {\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['root']);\n }\n\n // Set allowed clipboard IDs\n if (is_array($session['CLIPBOARD']['tl_iso_products']['id']))\n {\n $session['CLIPBOARD']['tl_iso_products']['id'] = array_intersect($session['CLIPBOARD']['tl_iso_products']['id'], $GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['root'], \\Database::getInstance()->query(\"SELECT id FROM tl_iso_products WHERE pid=0\")->fetchEach('id'));\n\n if (empty($session['CLIPBOARD']['tl_iso_products']['id']))\n {\n unset($session['CLIPBOARD']['tl_iso_products']);\n }\n }\n\n // Overwrite session\n $this->Session->setData($session);\n\n if (\\Input::get('id') > 0 && !in_array(\\Input::get('id'), $GLOBALS['TL_DCA']['tl_iso_products']['list']['sorting']['root']))\n {\n \\System::log('Cannot access product ID '.\\Input::get('id'), __METHOD__, TL_ERROR);\n \\Controller::redirect('contao/main.php?act=error');\n }\n }\n }", "title": "" }, { "docid": "cc337efe0eca7d79ecae2050db440355", "score": "0.61674327", "text": "public function check_insufficient_product_stock($products, $branch_id) {\n if (!empty($products) && ((int) $branch_id > 0)) {\n $arr = array();\n foreach ($products as $product) {\n $branch_stock_by_product_id_branch_id = $this->Branch_stock_Model->get_branch_stock_by_product_id_branch_id($product['product_id'], $branch_id);\n if (empty($branch_stock_by_product_id_branch_id) || (((int) $branch_stock_by_product_id_branch_id->stock) < (int) $product['quantity'])) {\n// $this->session->set_flashdata('stock_insufficient_message', $product['product_name'] . ' ' . 'Stock Insufficient');\n// redirect(base_url('sale_product'));\n array_push($arr, $product['product_name'] . ' Stock Insufficient' . '<br>');\n }\n }\n if (!empty($arr)) {\n $this->session->set_flashdata('stock_insufficient_message', $arr);\n redirect(base_url('sale_product'));\n }\n }\n }", "title": "" }, { "docid": "2f93321a11a8adb990e7de5508925a53", "score": "0.6163952", "text": "function checkProductsSubscriptions()\r\n\t{\r\n\t\t// if this has already been done, don't repeat\r\n\t\tif (Tienda::getInstance()->get('checkProductsSubscriptions', '0'))\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$table = '#__tienda_products';\r\n\t\t$definitions = array();\r\n\t\t$fields = array();\r\n\r\n\t\t$fields[] = \"product_subscription\";\r\n\t\t$definitions[\"product_subscription\"] = \"tinyint(1) NOT NULL COMMENT 'Product creates a subscription?'\";\r\n\r\n\t\t$fields[] = \"subscription_lifetime\";\r\n\t\t$definitions[\"subscription_lifetime\"] = \"tinyint(1) NOT NULL COMMENT 'Lifetime subscription?'\";\r\n\r\n\t\t$fields[] = \"subscription_period_interval\";\r\n\t\t$definitions[\"subscription_period_interval\"] = \"int(3) NOT NULL COMMENT 'How many period-units does the subscription last?'\";\r\n\r\n\t\t$fields[] = \"subscription_period_unit\";\r\n\t\t$definitions[\"subscription_period_unit\"] = \"varchar(1) NOT NULL COMMENT 'D, W, M, Y = Day, Week, Month, Year'\";\r\n\r\n\t\tif ($this->insertTableFields( $table, $fields, $definitions ))\r\n\t\t{\r\n\t\t\t// Update config to say this has been done already\r\n\t\t\tJTable::addIncludePath( JPATH_ADMINISTRATOR.'/components/com_tienda/tables' );\r\n\t\t\t$config = JTable::getInstance( 'Config', 'TiendaTable' );\r\n\t\t\t$config->load( array( 'config_name'=>'checkProductsSubscriptions') );\r\n\t\t\t$config->config_name = 'checkProductsSubscriptions';\r\n\t\t\t$config->value = '1';\r\n\t\t\t$config->save();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "d539e0bce11b5853fc6798180aff9ae4", "score": "0.61501414", "text": "public function isAvailable(): bool\n {\n return $this->availabilityChecker->isAvailable();\n }", "title": "" }, { "docid": "09d29617f8ae58cb64669a1dcc5e2d13", "score": "0.61485636", "text": "private function isProductVisibilityAllowed(): bool\n {\n try {\n $productVisibility = $this->currentProduct->getProductVisibility();\n $allowedProductVisibilities = $this->getConfigurationVisibility();\n } catch (NoSuchEntityException $e) {\n $this->logger->debug((string)$e);\n return false;\n }\n\n try {\n $productType = $this->currentProduct->getProductType();\n if ($productType === ProductConfigurableType::TYPE_CODE) {\n if (!in_array(\n Visibility::VISIBILITY_NOT_VISIBLE,\n $allowedProductVisibilities,\n true\n )) {\n return false;\n }\n }\n } catch (NoSuchEntityException $e) {\n $this->logger->debug((string)$e);\n return false;\n }\n\n return in_array(\n $productVisibility,\n $allowedProductVisibilities,\n true\n );\n }", "title": "" }, { "docid": "197ddc3c8526c5ffd84131ede90069b6", "score": "0.6141456", "text": "public function canDisplay(): bool\n {\n return $this->isProductVisibilityAllowed()\n && $this->isProductTypeAllowed()\n && !empty($this->getProductNotificationId());\n }", "title": "" }, { "docid": "229cbde6f52a1e76d3286b0426ecaacb", "score": "0.6127386", "text": "function CheckAvailability( &$msg ) {\n\n\tglobal $myPage;\n\tglobal $absPath;\n\n\tif( ! $myPage->getConfigS( 'track_stock' ) ) {\n\t\treturn true;\t\t// won't check, but not out-of-stock either\n\t}\n\n\t$prod_descr = '';\n\tif( ! $myPage->verifyAvailability( $prod_descr ) ) {\n\t\t$msg = sprintf( _T(\"We are very sorry, but the last \\\"%s\\\" has just been sold.\"), $prod_descr );\n\t\treturn false;\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "468c6c9bb55e26cff98a86d5e93d0d94", "score": "0.6124412", "text": "public function is_available() {\n\t\t$screen = function_exists( 'get_current_screen' ) ? get_current_screen() : null;\n\t\tif ( ! $screen || 'pos_page' !== $screen->id ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn parent::is_available();\n\t}", "title": "" }, { "docid": "5bb1d85fc1dfcc41f84a190c2b14e308", "score": "0.61229396", "text": "public function isDisplayOnProductPage()\n {\n $isEnabledForProductPage=true;\n if (!$this->_configPayovertime->isEnabledForProductDisplayPage()) {\n $isEnabledForProductPage= false;\n }\n return $isEnabledForProductPage;\n }", "title": "" }, { "docid": "4c2fa846d90bb30c05be207f29226b1c", "score": "0.6120875", "text": "public function inStock(){\n\n return $this->stockCount() > 0;\n }", "title": "" }, { "docid": "935014db6822296bcd09009cd947ab40", "score": "0.6113088", "text": "public function is_available() {\n\t\tif ( ! function_exists( 'WC_Order_Barcodes' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn 'yes' === WC_Order_Barcodes()->barcode_enable;\n\t}", "title": "" }, { "docid": "1d824d3bb89ccfd75d7fbabfe5aede2a", "score": "0.6109453", "text": "public function AvailableWebsiteProducts() {\n\t\t\ttry {\n\t\t\t\t$conn = Mage::getSingleton('core/resource')->getConnection('core_read');\n\t\t\t\t$table_name = Mage::getSingleton(\"core/resource\")->getTableName(\"catalog_product_entity\");\n\t\t\t\tif ($this->csv_sku_prefix) {\n\t\t\t\t\t$sql = 'SELECT entity_id, sku FROM ' . $table_name . ' WHERE sku LIKE \\'' . $this->csv_sku_prefix . '%\\'';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$sql = 'SELECT entity_id, sku FROM ' . $table_name . '';\n\t\t\t\t}\n\t\t\t\t$available_skus = $conn->fetchAll($sql);\n\t\t\t\tforeach ($available_skus as $product) {\n\t\t\t\t\t$products_on_website[] = $product['sku'];\n\t\t\t\t}\n\t\t\t\treturn $products_on_website;\t\t\t\n\t\t\t} \n\t\t\tcatch (Exception $e) {\n\t\t\t\tMage::log('Failed to determine available website products', null, 'gemfind_csv.log');\t\t\t\t\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b0935b944333a936e9e0559334bd4db6", "score": "0.6106154", "text": "public function isAvailable()\n {\n return self::availableRooms() > 0;\n }", "title": "" }, { "docid": "0b4b19a648793f8f1f727309a671878c", "score": "0.61019015", "text": "public function isAvailable()\n\t{\n\t\t$result = parent::isAvailable();\n\n\t\tif (!$result)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t\\JLoader::import('joomla.filesystem.folder');\n\n\t\t// Akeeba Subscriptions 5.0+ does not have the admin views folder any more\n\t\tif (!\\JFolder::exists(JPATH_ADMINISTRATOR . '/components/' . $this->componentName . '/views'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "88779a6f9ee7b5be3264f8c72618ca52", "score": "0.6098089", "text": "public function getAvailableProducts()\n {\n $avail_products = array();\n $radar_messages = array();\n $products = $this->getRadarProducts();\n $webroot = $this->_findWebRoot();\n\n foreach ($products as $product => $legend)\n {\n $tname = realpath($webroot . $this->getImageDirectory() . '/' ) . '/' . strtolower($this->getRadarName()) . '_' . $product . '_';\n $ttype = '.' . $this->getImageType();\n $tfile = $tname . '0' . $ttype;\n if (file_exists($tfile))\n {\n $secsOld = filemtime($tfile);\n\n /* COMMENTED OUT FOR TESTING, REMOVE ME\n if ($secsOld >= time() - $this->getImageExpiration())\n {\n $avail_products[$product] = $legend;\n $radar_messages[$product] = '&nbsp;';\n }\n else {\n $radar_messages[$product] = sprintf(GRLevel3::IMAGE_NOT_CURRENT, $this->getImageExpiration());\n }*/\n \n //\n $avail_products[$product] = $legend;\n $radar_messages[$product] = '&nbsp;';\n }\n else {\n $radar_messages[$product] = GRLevel3::IMAGE_NOT_AVAILABLE;\n }\n }\n\n $this->setRadarMessages($radar_messages);\n return $avail_products;\n }", "title": "" }, { "docid": "5ee4523b1ff3cb3b044f973d4f2c1e14", "score": "0.60970426", "text": "public function hasEquipposdatas(){\n return $this->_has(10);\n }", "title": "" }, { "docid": "b3a23f09085ba8ef3d159cad0daf2a0a", "score": "0.6084718", "text": "public function isAvailable() {\n\t\treturn XCache::isAvailable() || APCu::isAvailable() || APC::isAvailable() || Memcached::isAvailable();\n\t}", "title": "" }, { "docid": "e2a4164fcb2de68f4c8d08e87eb1e655", "score": "0.608094", "text": "public static function checkMinStock() : bool\n {\n $alert = false;\n $products = Product::where('bussine_id', Auth::user()->bussine_id)->where('is_active', 'on')->get();\n\n foreach($products as $product){\n if($product->stock <= $product->alert_stock){\n $alert = true;\n }\n }\n\n return $alert;\n }", "title": "" }, { "docid": "1f72b1f516fc6312fced8334ea814f43", "score": "0.60728645", "text": "public function purchased($product){\n\n if( Auth::check() && Auth::user()->hasRole('Admin') && $this->id == Auth::user()->id ) return true;\n $product_type = get_class($product);\n if( !isset( $this->purchased[$product_type])) $this->purchased[$product_type] = $this->purchases()->where( 'product_type', $product_type )->lists('product_id' );\n\n if( in_array ( $product->id, $this->purchased[$product_type] ) ){\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f7111d5b9a9bb65322cb859e8c4c8bc2", "score": "0.60722154", "text": "public function isAvailable()\n\t{\n\t\treturn parent::isAvailable() && (bool) $this->getStatus();\n\t}", "title": "" }, { "docid": "bb72f1d60936d57a42d5f8deebfb5761", "score": "0.60694087", "text": "function dokan_spmv_can_vendor_create_new_product( $user_id ) {\n if ( dokan_pro()->module->is_active( 'product_subscription' ) ) {\n if ( ! \\DokanPro\\Modules\\Subscription\\Helper::get_vendor_remaining_products( $user_id ) ) {\n return false;\n }\n }\n\n return true;\n}", "title": "" }, { "docid": "69dcd692a06a458b1b8a6ed2eabf6344", "score": "0.6067906", "text": "public function isPurchasable();", "title": "" } ]
220664096fd1cc66024a81c945cf1ba1
Get the OcItemQueries that belong to this state.
[ { "docid": "9d04426667e51cdf5198adeb83ff4eab", "score": "0.68031585", "text": "public function oc_item_queries()\n {\n return $this->hasMany('App\\OcItemQuery');\n }", "title": "" } ]
[ { "docid": "157670a8654a976b560ad9fba3b2bc46", "score": "0.72928756", "text": "public static function getQueries()\n {\n return self::$queries;\n }", "title": "" }, { "docid": "bab1019f9db3716368ec0281f0860cf2", "score": "0.71794", "text": "public function getQueries()\n {\n return $this->queries;\n }", "title": "" }, { "docid": "bab1019f9db3716368ec0281f0860cf2", "score": "0.71794", "text": "public function getQueries()\n {\n return $this->queries;\n }", "title": "" }, { "docid": "bab1019f9db3716368ec0281f0860cf2", "score": "0.71794", "text": "public function getQueries()\n {\n return $this->queries;\n }", "title": "" }, { "docid": "5a254af805f080c6c75ceb9e52126197", "score": "0.71024835", "text": "public function getQueries(){\r\n\t\treturn $this->queries;\r\n\t}", "title": "" }, { "docid": "71100d1bd361f5680ab3889e0903842e", "score": "0.6986553", "text": "public function getQueries(): array\n {\n return $this->queries;\n }", "title": "" }, { "docid": "c92809850392aeae99e9ad671162d74f", "score": "0.6981062", "text": "public function getQueries()\n {\n if ($this->queries === null) {\n $this->initQueries();\n }\n\n return $this->queries;\n }", "title": "" }, { "docid": "e977d4bc43068440c89feeadd05436bf", "score": "0.69475657", "text": "public function &getQueries() {\n return $this->queries;\n }", "title": "" }, { "docid": "ce17c7fb39dc1be854d249ec3bccef10", "score": "0.666263", "text": "public function &getAppQueries() {\n return $this->appQueries;\n }", "title": "" }, { "docid": "b7e6c53c02f6f71126c9f87b46d350b4", "score": "0.6657313", "text": "public function getQueries();", "title": "" }, { "docid": "c990ff6c247fb24f5e756e4c9d7ff9cd", "score": "0.6641464", "text": "public function getQueries()\n {\n $queries = array();\n foreach ($this->queries as $query) {\n $queries = array_merge($queries, $query->getQuery());\n }\n return $queries;\n }", "title": "" }, { "docid": "0574b4baa73b5c5f6eef7a7badc8e554", "score": "0.6620449", "text": "public function associatedQueries()\n\t{\n\t\treturn $this->queries;\n\t}", "title": "" }, { "docid": "b8fd24e3fe686df05cb97fd75332a3ce", "score": "0.64327234", "text": "protected function getLoggedQueries()\n {\n return $this->loggedQueries->queries;\n }", "title": "" }, { "docid": "e01d0735b266577e502b364c41bb47c5", "score": "0.63077027", "text": "public function getQueries() {\n\t\treturn $this->mysql->getQueries();\n\t}", "title": "" }, { "docid": "17c74a605827d506e3e7078248b26815", "score": "0.62822783", "text": "public function getQueries(){\n return $this->_mysql->getQueries();\n }", "title": "" }, { "docid": "b30c155d78b956a199a7dc02fd278cbd", "score": "0.61753476", "text": "public function getQueries(): array;", "title": "" }, { "docid": "00bdedf2ceae34a95090f9bc67004a9d", "score": "0.61567414", "text": "private function getQueries() : array\n {\n if (!is_null($this->options)) {\n $this->validateMatchOptions();\n return $this->getEndQuery();\n }\n\n $this->setMatchOptions();\n $this->validateMatchOptions();\n return $this->getEndQuery();\n }", "title": "" }, { "docid": "b8f12f4c90532d9dabb1d7c72ac14f9f", "score": "0.61379194", "text": "public function getSavedQueries()\n {\n return $this->saved_queries;\n }", "title": "" }, { "docid": "fd8d7650dffdc1f14aba4f382c1fa5a8", "score": "0.6091112", "text": "public function get_query_stack()\n\t{\n\t\treturn $this->_queries;\n\t}", "title": "" }, { "docid": "f46a479be91b7b7cac4e063b37e0f51d", "score": "0.59739226", "text": "public function getQueriesExecuted() {\n\t\t\treturn $this->queriesExecuted;\n\t\t}", "title": "" }, { "docid": "f8b6e57effd80d96f36d168a072a48ec", "score": "0.59729576", "text": "public function getQueryList()\n {\n return $this->readOneof(2);\n }", "title": "" }, { "docid": "6d969be2300c83b18fd9a9083dfd1e55", "score": "0.5942657", "text": "public function getPanelData()\n {\n return $this->_queries;\n }", "title": "" }, { "docid": "4327d21a2728c68aaa66033d808c5f2a", "score": "0.59187096", "text": "public function getQueryComponents()\n {\n return $this->_queryComponents;\n }", "title": "" }, { "docid": "5b7c6493a134badb2908413e6caacc65", "score": "0.58868027", "text": "public function queryObject()\n {\n return array_filter($this->query);\n }", "title": "" }, { "docid": "42599a8f5d8414ba174af91522119cab", "score": "0.5881743", "text": "public function getQuery()\n {\n return $this->get(self::QUERY);\n }", "title": "" }, { "docid": "8447cd69a1d26965c14f10946a37a7bf", "score": "0.5879671", "text": "public function getSqs()\n {\n return $this->sqs;\n }", "title": "" }, { "docid": "4e196b95165bf12ea5de14fe6cd93a29", "score": "0.5873512", "text": "function getQueries ();", "title": "" }, { "docid": "0c3c4c739c80d3e19141af4e45014daa", "score": "0.5871814", "text": "public function query()\n {\n $query = Shop::query();\n\n return $this->applyScopes($query);\n }", "title": "" }, { "docid": "0ea1e95ce36654998801557df8b533b2", "score": "0.5866546", "text": "public function getQuery(): array\n {\n\n return $this->query;\n\n }", "title": "" }, { "docid": "a9d158534b3492273078e8e3cea69558", "score": "0.5845145", "text": "public function getQuery(): array\n {\n return $this->query;\n }", "title": "" }, { "docid": "1847750662a3da096a17b6afec269ef1", "score": "0.58226436", "text": "public function getQuery()\n {\n return $this->queryBuilder->getQuery($this);\n }", "title": "" }, { "docid": "6a2cf6dc94c28f3f64b77f5fdcedc846", "score": "0.58171284", "text": "public function getQueries() {\n\n // check if db factory is init'ed\n if (!$this->dbf) {\n return false;\n }\n\n // get dbs\n if (!($dbs = $this->dbf->allMade())) {\n return false;\n }\n\n // go through each db\n $queries = array();\n foreach($dbs as $db) {\n $queries[$db->connection()->dsn()] = $db->getQueries();\n }\n\n return $queries;\n }", "title": "" }, { "docid": "f1eb77305b22bf255af9ea073ee087d7", "score": "0.5807765", "text": "public function __getQuery() {\n\t\treturn $this->itsQuery;\n\t}", "title": "" }, { "docid": "0cc6bfc3f2399f8a5a7d84daf0b4a53f", "score": "0.5783494", "text": "protected function getCachedRequestsQuery(){\n\t\treturn CachedRequestQuery::create();\n\t}", "title": "" }, { "docid": "45f2696f13dcd9085b14966d699a6cef", "score": "0.57603925", "text": "private function buildQueries()\n {\n return $this->logger->getQueries();\n }", "title": "" }, { "docid": "1ad158dcdf16558c33fd7f0b47d42650", "score": "0.5755098", "text": "public function getFilterQueries(){}", "title": "" }, { "docid": "403455510991fce54abfe57afe680215", "score": "0.57336396", "text": "protected static function getQuery()\n {\n $instance = new static();\n\n $query = $instance->newQuery()->with($instance->getIndexRelations());\n\n foreach ($instance->getQueryScopes as $scope) {\n $query->$scope();\n }\n\n return $query;\n }", "title": "" }, { "docid": "b638807da997b3df2daf39656c2829a9", "score": "0.57323647", "text": "public function getProgramQueries() {\n if (!$this->programtableResults) {\n $this->programtableResults = $this->getServiceLocator()\n ->get('Admin\\Model\\ProgramTable');\n }\n return $this->programtableResults;\n }", "title": "" }, { "docid": "53aee0de97c94ca94d5260d36f95c35e", "score": "0.5714743", "text": "public function getQuery()\n\t{\n\t\t// Return the query object.\n\t\treturn $this->query;\n\t}", "title": "" }, { "docid": "59c095211ad8011b43b3c2d5e0def9da", "score": "0.57085013", "text": "protected function getListQuery()\n\t{\n\t\t// Capture the last store id used.\n\t\tstatic $lastStoreId;\n\n\t\t// Compute the current store id.\n\t\t$currentStoreId = $this->getStoreId();\n\n\t\t// If the last store id is different from the current, refresh the query.\n\t\tif ($lastStoreId != $currentStoreId || empty($this->query))\n\t\t{\n\t\t\t$lastStoreId = $currentStoreId;\n\t\t\t$this->query = $this->getListQuery();\n\t\t}\n\n\t\treturn $this->query;\n\t}", "title": "" }, { "docid": "59d35a83d0d88756d04c37de1e26e695", "score": "0.57009727", "text": "public function getQueryKeys()\n {\n return $this->queryKeys;\n }", "title": "" }, { "docid": "ab42fcfdca51e4e1ea637bf94b3a346f", "score": "0.56821185", "text": "protected function _getQuery() {\n\t\t$this->_query->clear ();\n\t\t$this->_query->direct_query = false;\n\t\treturn $this->_query;\n\t}", "title": "" }, { "docid": "3bf2ce36ea5bb7ce3487e58d65b4be2d", "score": "0.56781054", "text": "protected function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "a6dc4801e22736d2a65e76583ee0cf73", "score": "0.5667043", "text": "public function getExpandFilterQueries(){}", "title": "" }, { "docid": "5bae0be9440795bd99c4f99218610bd8", "score": "0.5657996", "text": "public function getQuery()\n {\n if (!$this->_query) {\n $this->_query = Mage::getModel('mpchadwick_searchautocompleteconfigmarator/query')\n ->loadByQuery($this->getQueryText());\n if (!$this->_query->getId()) {\n $this->_query->setQueryText($this->getQueryText());\n }\n }\n return $this->_query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "4824e4b6ce5db32996ac94555ad838c9", "score": "0.5639021", "text": "public function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "7e84878d6f21b1526ced5695d8fe4109", "score": "0.56326884", "text": "public function getQuery()\n {\n return $this->source->query;\n }", "title": "" }, { "docid": "952ff106ee628006d2ef2d947f11afea", "score": "0.5630066", "text": "public function getFilterQueries()\n {\n return [];\n }", "title": "" }, { "docid": "b5a038a2100f7a856b39cb5c99e9656c", "score": "0.56237656", "text": "public function getQuery()\n {\n return $this->modifyQuery($this->query);\n }", "title": "" }, { "docid": "f08004c30fb3fc10edd65e4f845bbcd3", "score": "0.56210756", "text": "public function getQuery(){\n if ($this->query == null)\n $this->query = $this->newQuery();\n\n return $this->query;\n }", "title": "" }, { "docid": "4462658758e5fa51df366c74c2b04098", "score": "0.561968", "text": "public function getQuery() {\n return $this->query;\n }", "title": "" }, { "docid": "11aea7824404b9a81e74c45674e41195", "score": "0.5608904", "text": "public function dataSourceQueries()\n {\n return self::getInstance()->get('datasource')->getQueriesNumber();\n }", "title": "" }, { "docid": "3552d323b0f48e8724be90f37c26ed25", "score": "0.55966073", "text": "function getQuery() {\n\t\treturn $this->_query;\n\t}", "title": "" }, { "docid": "90d6da4740e369f13d2f5364aefbe64e", "score": "0.55857724", "text": "public function getGroupQueries(){}", "title": "" }, { "docid": "0dfc95d872b0f98b63f3aba84b251e9f", "score": "0.55732", "text": "public function getQuery() {\n\t\treturn $this->query;\n\t}", "title": "" }, { "docid": "0dfc95d872b0f98b63f3aba84b251e9f", "score": "0.55732", "text": "public function getQuery() {\n\t\treturn $this->query;\n\t}", "title": "" }, { "docid": "0dfc95d872b0f98b63f3aba84b251e9f", "score": "0.55732", "text": "public function getQuery() {\n\t\treturn $this->query;\n\t}", "title": "" }, { "docid": "07a52ed2a392139923a8d0cebfb13929", "score": "0.55701596", "text": "public function getQuery()\n\t{\n\t\treturn $this->query;\n\t}", "title": "" }, { "docid": "4860ea08c41e2c7434c908f29fcf16e8", "score": "0.5552951", "text": "public function queryObject()\n {\n return $this->query;\n }", "title": "" }, { "docid": "20d29f86d9ac6ce2a92a77f5ce3991d3", "score": "0.5549809", "text": "public function getQuery()\n {\n if ($this->query === null) {\n $modelClass = get_class($this->owner);\n $this->query = $modelClass::find();\n }\n\n return $this->query;\n }", "title": "" }, { "docid": "fa89e4587639aff4c299439fcc9bf760", "score": "0.55323213", "text": "public function getQuery(): Query\n {\n return $this->query;\n }", "title": "" }, { "docid": "777d24c2e94bc8320677ee75a4e072c4", "score": "0.55293214", "text": "function getQuery()\n {\n return $this->query;\n }", "title": "" }, { "docid": "1385217820b87998d96790535810b840", "score": "0.5526906", "text": "public function getQuery() {\n return $this->query;\n }", "title": "" }, { "docid": "4aa3dcbb68e5a1b4a9d5dbd95b06ca16", "score": "0.5504869", "text": "protected function ItemInfoQuery() {\n\treturn $this->Engine()->Make('vcqtItemsInfo');\n }", "title": "" }, { "docid": "220df83ef728cb63f18b383698eedb7a", "score": "0.55019766", "text": "public function getQuery()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "9302226a24cbc83c500bd34be4be6800", "score": "0.5500131", "text": "public function getQuery() {\n\t\t$query;\n\t\t\n\t\tswitch ($this->queryType) {\n\t\t\tcase QueryTypes::INSERT:\n\t\t\t\t$query = $this->getInsertQuery();\n\t\t\t\tbreak;\n\t\t\tcase QueryTypes::DELETE:\n\t\t\t\t$query = $this->getDeleteQuery();\n\t\t\t\tbreak;\n\t\t\tcase QueryTypes::UPDATE:\n\t\t\t\t$query = $this->getUpdateQuery();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$query = $this->getSelectQuery();\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "9d2085ee47e48f943edb2a538a7c41d7", "score": "0.54993886", "text": "public function query()\n {\n $model = app($this->model);\n $query = $model->query();\n $selectedIds = collect($this->request()->get('selected_ids'))->filter();\n\n if ($selectedIds->isNotEmpty()) {\n $obscure = property_exists($model, 'obscure') && is_array($model->obscure) ? $model->obscure : config('cortex.foundation.obscure');\n\n if (in_array(app('request.accessarea'), $obscure['areas'])) {\n $selectedIds = $selectedIds->map(function ($value) {\n return optional(Hashids::decode($value))[0];\n });\n\n $query->whereIn($model->getKeyName(), $selectedIds);\n } else {\n $query->whereIn($model->getRouteKeyName(), $selectedIds);\n }\n }\n\n return $this->scope()->applyScopes($query);\n }", "title": "" }, { "docid": "f83f89ffc5d10f5abc859b343b3b05e6", "score": "0.5471633", "text": "public function getQueryStats()\n {\n return $this->query_stats;\n }", "title": "" }, { "docid": "7698156b07f4c143e1e7579f413c56a8", "score": "0.54690564", "text": "public function getQueryCacheInstance()\n {\n return $this->queryCache;\n }", "title": "" }, { "docid": "b164c2094f0af6378cf4406551c353e3", "score": "0.546218", "text": "protected function getQuery() {\n return $this->storage->getQuery();\n }", "title": "" }, { "docid": "f97a1821b4dd17b46e368e3b6fe23daa", "score": "0.5460525", "text": "public function getQuery(): array\n {\n return [\n 'attribute' => $this->attribute,\n 'operator' => $this->operator,\n 'values' => $this->values,\n ];\n }", "title": "" }, { "docid": "0e1124c8fe88e2e2c052f72470dee56e", "score": "0.5457475", "text": "public function query()\n {\n return $this->query;\n }", "title": "" }, { "docid": "b1ea8fe0e02b630eb04a4a6a08dc2080", "score": "0.5451249", "text": "public static function getQuery()\n {\n $query = new Query(self::NCMB_CLASS_NAME);\n $query->setApiPath(self::PATH_PREFIX);\n return $query;\n }", "title": "" }, { "docid": "410697707cad4429739da03e7290ed9c", "score": "0.5441598", "text": "public function getQuery()\n {\n return Mage::helper('catalogsearch')->getQuery();\n }", "title": "" }, { "docid": "3d07b7e7a74a62891855697b4f3cfcff", "score": "0.54362524", "text": "public function getQuery()\n {\n return $this->belongsToMany->getQuery();\n }", "title": "" }, { "docid": "e3705b7073fa2dc220757f573b193940", "score": "0.5435646", "text": "function getQuery() {\n return $this->query;\n }", "title": "" }, { "docid": "689600ddb678dec6f1e033eac0674d2b", "score": "0.5434265", "text": "public function query()\n {\n $users = Extension::query();\n\n return $this->applyScopes($users);\n }", "title": "" }, { "docid": "c0b87cc849f9078deaec7c5bca1f23fe", "score": "0.5434151", "text": "public function getQuery()\n {\n // We need to ensure we have at least one filter, as\n // no query results will be returned otherwise.\n if (count(array_filter($this->filters)) === 0) {\n $this->whereHas($this->schema->objectClass());\n }\n\n return $this->grammar->compile($this);\n }", "title": "" }, { "docid": "a48daf7b5cb11cf35d3a2225f33b5d50", "score": "0.54276145", "text": "public function getIndexQueryScopes()\n {\n return ($this->indexQueryScopes) ?: [];\n }", "title": "" }, { "docid": "7e178584ae2b8bcbb48570398b85d328", "score": "0.54213125", "text": "public function getQuery() {\n return $this->query;\n }", "title": "" } ]
9f716f816038846ffc1469f3ea8cdbbc
Generates a random 15 character for a file name, with the output format
[ { "docid": "56ea4613223c676f8a9eb0c71881c971", "score": "0.84198266", "text": "protected function generateFileName(): string\n {\n $randomString = (new Str())->random(25);\n return \"{$randomString}.{$this->outputFormat}\";\n }", "title": "" } ]
[ { "docid": "e37d46a621c96c0d23968d59b880221a", "score": "0.84061724", "text": "private function randFileName()\n\t{\n\t\treturn bin2hex(openssl_random_pseudo_bytes(12));\n\t}", "title": "" }, { "docid": "df20b690e6790ddabab95075f2ec6e45", "score": "0.7928187", "text": "function generate_filename($size = 12, $span = 3) {\n\tif(!is_integer($size)){\n\t\t$size = 6;\n\t}\n\t\n\t$name = '';\n\tfor ($i=0; $i < $span; $i++) { \n\t\t$name .= random_password($size).'-';\n\t}\n\n\t$name = rtrim($name , '-');\n\treturn strtolower($name);\n}", "title": "" }, { "docid": "ebe58c35bc30b8e0ac249e6d4aa55b36", "score": "0.7729346", "text": "public function generateFileName(): string {\n $newImgName = uniqid(rand(0, 1000), true) . \".\".$this->getFileExt();\n return $newImgName;\n }", "title": "" }, { "docid": "bb6feaa61c935a3aabc1677ea93bb135", "score": "0.7568656", "text": "function genfname() {\n global $_error;\n $f_name = substr(str_shuffle('1234567890abcdef'), 0, 5). \".png\";\n if ($_error == 0) {\n if (file_exists($p_dir.$f_name)) {\n $_error = $_error. 3;\n }\n return $f_name;\n }\n}", "title": "" }, { "docid": "44f398dba142dcd7a2485d0f3fec436f", "score": "0.7534269", "text": "private function getRandomFileName()\n {\n foreach (range(0, 10) as $number) {\n $hash = hash('sha1', $number . mt_rand(1, 1000000));\n $random_filename = $this->uploads_directory . DIRECTORY_SEPARATOR . $hash;\n if (!file_exists($random_filename)) {\n if (file_put_contents($random_filename, '', LOCK_EX) !== false) {\n if (stristr(PHP_OS, 'WIN') === false) {\n if (chmod($random_filename, 0644) === false) {\n @unlink($random_filename);\n throw new ILException(__METHOD__ . ' Can\\'t changing the mode of access to the file!', self::ERR_CHMOD);\n }\n }\n return $random_filename;\n }\n }\n }\n throw new ILException(__METHOD__ . ' Can\\'t create a file with a random name', self::ERR_CREATE_RANDOM_FILENAME);\n }", "title": "" }, { "docid": "2ceafc79facb740e53d4a74d2306250d", "score": "0.7533289", "text": "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return \"person\".md5(uniqid());\n }", "title": "" }, { "docid": "65efad208216172a8c483e8f808221dc", "score": "0.75160056", "text": "public static function generate_name() {\n $files = array();\n $dh = opendir(ROOT . \"/data/name-gen\");\n while (false !== ($file = readdir($dh))) {\n if (!preg_match(\"/^\\d+$/\", $file)) {\n continue;\n }\n $files[] = $file;\n }\n\n sort($files);\n\n $words = array();\n foreach ($files as $file) {\n $arr = file(ROOT . \"/data/name-gen/\" . $file);\n $words[] = rtrim($arr[array_rand($arr)]);\n }\n\n return preg_replace(\"/\\s+/\", \" \", trim(implode(\" \", $words)));\n }", "title": "" }, { "docid": "c7c5c3d3778d595f6c6552db7449f4ab", "score": "0.75129366", "text": "private function generateUniqueFileName()\r\n {\r\n // uniqid(), which is based on timestamps\r\n return md5(uniqid());\r\n }", "title": "" }, { "docid": "fefda6e20470552614b0dff069744358", "score": "0.7465868", "text": "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "title": "" }, { "docid": "fefda6e20470552614b0dff069744358", "score": "0.7465868", "text": "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "title": "" }, { "docid": "fefda6e20470552614b0dff069744358", "score": "0.7465868", "text": "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "title": "" }, { "docid": "9f23cdee6a53d5ee02f20ec4e83bf527", "score": "0.7457112", "text": "private function generateUniqueFileName()\n {\n // uniqid(), which is based on timestamps\n return md5(uniqid());\n }", "title": "" }, { "docid": "f767c37477f27d7f2fdc2abfda6455e9", "score": "0.74156606", "text": "function gen_filename ($string)\n{\n\tif(strlen($string)){\n\t\t$filename = filename_format_string($string);\n\t}else{\n\t\t$filename = rand ();\n\t}\n\treturn $filename;\n}", "title": "" }, { "docid": "5dd0aefdea595654a93641d7b0d39f49", "score": "0.73352784", "text": "function generate_file_name($extension)\n{\n return time() . substr( md5(microtime()), 0, rand(5, 12) ) . $extension;\n}", "title": "" }, { "docid": "bbc2b5abe31106de0b877c2549af5f50", "score": "0.7256159", "text": "public function generateID() {\r\n\t\t$res = '';\r\n\t\t$pattrn = '0123456789abcdefghijklmnopqrstuvwxzyABCDEFGHIJKLMNOPQRSTUVWXZY';\r\n\t\tfor ($i=0; $i <= $this->max_file_id; $i++) { \r\n\t\t\t$res .= $pattrn[mt_rand(0, strlen($pattrn) - 1)];\r\n\t\t} return $res;\r\n\t}", "title": "" }, { "docid": "f3480006de21173da4f0ce44bbdd4f2d", "score": "0.7240082", "text": "private function random_name($file)\n\t{\n\t\treturn md5($file.'_'.substr(uniqid(),-4)).'_'.substr(uniqid(),-4).'.'.strtolower(pathinfo($file, PATHINFO_EXTENSION));\n\t}", "title": "" }, { "docid": "7e744bd9f84bbbb8e3ff047e648959d4", "score": "0.72337306", "text": "function genIdentifier(){\n $id=array();\n $characters=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];\n\n for($i=0;$i<15;$i++){\n\t array_push($id,$characters[array_rand($characters)]);\n }\n\n return implode($id);\n }", "title": "" }, { "docid": "d7cd83dc12811dbae00506b0dc84255e", "score": "0.71842116", "text": "function generate ($file, $chars) {\n // get random file length of characters \n $fileLength = rand(10, 30);\n // define empty string to add the generated characters\n $str = '';\n // generate random number from 0 - length of characters array\n // and then add to str string \n for($i = 0; $i < $fileLength; $i++) {\n $index = rand(0, count($chars) - 1);\n $str.= $chars[$index];\n // check to prevent add white space at the end\n if($i != $fileLength - 1) {\n $str .= ' ';\n }\n }\n // write str in the opened file\n fwrite($file, $str);\n // close the file\n fclose($file);\n}", "title": "" }, { "docid": "d75ce0d9b36c81d504bdb8a7e4a4d1f9", "score": "0.7183611", "text": "protected function returnNewFileName()\r\n {\r\n $fileName = $this->returnShortName();\r\n if($this->randomName){\r\n $finalName = Yii::$app->security->generateRandomString();\r\n }\r\n else{\r\n $finalName = $fileName.\"_\".time().mt_rand(10, 99);\r\n }\r\n return $finalName;\r\n }", "title": "" }, { "docid": "2015b282247ba772a4652da908a7f63d", "score": "0.7175222", "text": "function create_filename ($folder, $fn, $rnd = TRUE)\n{\n\t$ok = FALSE;\n\t$foo = pathinfo ($fn);\n\t$ext = $foo['extension'];\n\t$add = '';\t// addtional random string(for safe filename), eg: 3c1_somename.ext, '3c1_' is additional string\n\twhile (!$ok)\n\t{\n\t\tif ($rnd)\n\t\t\t$tmp_name = random_str (16).'.'.$ext;\n\t\telse\n\t\t\t$tmp_name = $add.safe_filename ($fn);\n\n\t\tif (!file_exists ($folder.'/'.$tmp_name)) $ok = TRUE;\n\t\t$add = random_str (3).'_';\n\t}\n\treturn $tmp_name;\n}", "title": "" }, { "docid": "d4f26336e14900a1297c7dfaa163bd44", "score": "0.7086823", "text": "private function fileUniqueName()\n {\n\n return sha1(uniqid(mt_rand(), true));\n }", "title": "" }, { "docid": "139a965a8dc88ed1524b5eddf59fc455", "score": "0.7076761", "text": "function getRandomName($n) { \n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; \n $randomString = ''; \n \n for ($i = 0; $i < $n; $i++) { \n $index = rand(0, strlen($characters) - 1); \n $randomString .= $characters[$index]; \n } \n \n return $randomString; \n}", "title": "" }, { "docid": "0bb137429515984775867f070954d4e4", "score": "0.705602", "text": "function getFilename($file_type) {\n\t\t$stamp = strtotime (\"now\");\n\t\t$temp = $stamp.rand(10, 99);\n\t\t$temp = str_replace(\".\", \"\", $temp);\n\t\tsettype($temp, \"string\");\n\t\t$temp .= \".\";\n\t\t$temp .= $file_type;\n\t\treturn $temp;\n\t}", "title": "" }, { "docid": "5e0f098456daa164baed1ecba73a69b3", "score": "0.7025627", "text": "function generateIntelligentFileId() {\n //generate UUID\n $UUID = md5(uniqid(rand(), true));\n\n // chck for additional suffix : timestamp or random\n // accrodingly add random number ot timestamp\n $UUID .= '_' . ( strtolower(FILESUFFIXFORMAT) != \"timestamp\" ? rand() :\n date('dmYHis') . '_' . round(microtime(true) - floor(microtime(true)), 2) * 100\n );\n\n return $UUID;\n}", "title": "" }, { "docid": "4e33e5f37fb991a9fcec351cc2e31e31", "score": "0.6954959", "text": "public static function myUploadId()\n {\n // out format - xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\n $permitted_chars = '0123456789abcdefghijklmnopqrstuvwxyz';\n $p1 = substr(str_shuffle($permitted_chars), 0, 8);\n $p2 = substr(str_shuffle($permitted_chars), 0, 4);\n $p3 = substr(str_shuffle($permitted_chars), 0, 3);\n $p4 = substr(str_shuffle($permitted_chars), 0, 4);\n $p5 = substr(str_shuffle($permitted_chars), 0, 12);\n\n return $p1 . '-' . $p2 . '-4' . $p3 . '-' . $p4 . '-' . $p5;\n }", "title": "" }, { "docid": "d2068a18d6f6330c136495d1570015a9", "score": "0.6891983", "text": "function idrandom_file()\n{\n $stringa = \"\";\n for($i=0; $i<8; $i++) \n {\n $lettera = chr(rand(48,122)); // carattere casuale\n while (!ereg(\"[a-z0-9]\", $lettera))\n {\n $lettera = chr(rand(48,122));// genera un'altra\n }\n $stringa .= $lettera; // accoda alla stringa\n }\n\n return $stringa; // restituisci alla funzione\n\n}", "title": "" }, { "docid": "49ce6a424f90b15a0e4f006953c7c57f", "score": "0.68834925", "text": "public function genID(){\n\t\t$clavegen='';\n\t\tfor($i=1;$i<=512;$i++){\n\t\t\t//Caracteres Especiales\n\t\t\t$num=rand(33,125);\n\t\t\t$clavegen.=chr($num);\n\t\t}\n\t\treturn $clavegen;\n\t}", "title": "" }, { "docid": "f7eeb4c49de1093453ebfd557c49a859", "score": "0.6873597", "text": "public function generateStr(){\n $chars = 'abdefhiknrstyzABDEFGHKNQRSTYZ23456789';\n $numChars = strlen($chars);\n $length = rand(1,8);\n $string = '';\n for ($i = 0; $i < $length; $i++) {\n $string .= substr($chars, rand(1, $numChars) - 1, 1);\n }\n return $string;\n }", "title": "" }, { "docid": "304d5b70b9a544b0af4f68a78a44af6c", "score": "0.6859027", "text": "public function getRandomFileName($file)\n {\n return md5(rand()) . '.' . pathinfo($file, PATHINFO_EXTENSION);\n }", "title": "" }, { "docid": "2012dec78880e5c6f425425bf7c04d7e", "score": "0.6843496", "text": "function getRandomString($name_length = 8) {\n\t\t$alpha_numeric = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\t\treturn substr(str_shuffle(str_repeat($alpha_numeric,12)), 0, $name_length);\n\t}", "title": "" }, { "docid": "a842d150582bb65bbd2c98cdf9d1efae", "score": "0.6828419", "text": "private function createRandomString() {\n\t\t$chars = \"abcdefghijkmnopqrstuvwxyz023456789\";\n\t\tsrand((double)microtime()*1000000);\n\t\t$i = 0;\n\t\t$pass = '' ;\n\t\twhile ($i <= 19)\n\t\t{\n\t\t $num = rand() % 33;\n\t\t $tmp = substr($chars, $num, 1);\n\t\t $pass = $pass . $tmp;\n\t\t $i++;\n\t\t}\n\t\treturn $pass;\n }", "title": "" }, { "docid": "1d6d54c7fcc6910dc72b014d886b1ad3", "score": "0.68107724", "text": "public static function generateMediaFileName($fileExt='')\r\n\t{\r\n\t\t\t$strAlphaNumeric = self::getRandomAlphaNumeric(8).'-'.self::getRandomAlphaNumeric(4).'-'.self::getRandomAlphaNumeric(12).$fileExt;\r\n\t\t\treturn $strAlphaNumeric;\r\n\t}", "title": "" }, { "docid": "f7927fdcc28fe5a2312166947f37c87c", "score": "0.68055785", "text": "function tempFile(){\n\t return date('Ymd_His').'$'.substr('000'.rand(0,999), -3).'.'.$ext;\n\t}", "title": "" }, { "docid": "633c6e15b42a134594760e90ff37d13c", "score": "0.68002623", "text": "private static function genRandomKey() {\n $iterations = rand(5,20);\n $key = '';\n for ($index = 0; $index < $iterations; $index++) {\n $key = $key . strval(rand(0,3));\n }\n return $key;\n }", "title": "" }, { "docid": "97710f8b1d6fa4573d71aef40f523771", "score": "0.67738485", "text": "protected function makeFileName()\n {\n\n $name = time() . '_' . $this->file->getClientOriginalname();\n\n return \"{$name}\";\n\n }", "title": "" }, { "docid": "c7a34f01781c2c1e6652d004f8c82579", "score": "0.67663884", "text": "function generateRandStrCookie(){\n \t$length = 16;\n \t$randstr = \"\";\n \tfor($i=0; $i<$length; $i++){\n \t\t$randnum = mt_rand(0,61);\n \t\tif($randnum < 10){\n \t\t\t$randstr .= chr($randnum+48);\n \t\t}else if($randnum < 36){\n \t\t\t$randstr .= chr($randnum+55);\n \t\t}else{\n \t\t\t$randstr .= chr($randnum+61);\n \t\t}\n \t}\n \treturn $randstr;\n }", "title": "" }, { "docid": "203adecb7bc137e71c8f4996bc1cf6ad", "score": "0.6746903", "text": "private function createToken() : string\n {\n $chrs = array_merge(range('a', 'z'), ['A','F','E','H','R','T'], range('1', '9'));\n $r = [];\n shuffle($chrs);\n for ($i = 0; $i < $this->length; $i++) {\n if (in_array($chrs[$i], ['w', 'm', 'l', 'i', 'j', 'o', 'q', 'f','5'])) {\n $charas = array_merge(range('a', 'e'), range('x', 'z'));\n $chara = array_rand($charas, 1);\n $chrs[$i] = $charas[$chara];\n }\n $r[] = $chrs[$i];\n }\n\n return implode(\"\", $r);\n }", "title": "" }, { "docid": "dd47b899566e309d487a233824947266", "score": "0.67304134", "text": "private function generateFileName($input) {\n\t\t$name = uniqid().'.' . $input;\n\t\t\n\t\tif (file_exists($name)) { // Name already occupied. Generate filename with uniqid with more entropy\n\t\t\t$name = uniqid(true).'.' . $input;\n\t\t}\n\t\t\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "3754f61d40377f92889944379c03a370", "score": "0.67234516", "text": "private static function randomDataFile(int $size): string {\n $tmpName = tempnam(sys_get_temp_dir(), '');\n $f = fopen($tmpName, 'wb');\n \n while ($size > 0) {\n $step = min(mt_rand(1, max($size/100, 1)), $size);\n fseek($f, $step-1, SEEK_END);\n fwrite($f, chr(mt_rand(0, 255)));\n $size -= $step;\n }\n\n fclose($f);\n return $tmpName;\n }", "title": "" }, { "docid": "23827d0fc30d16c010b8f9a089bf4329", "score": "0.6705624", "text": "private function getName() {\n\t\treturn substr(md5(microtime() . rand()), rand(0,25), 6);\n\t}", "title": "" }, { "docid": "52f7be1776ac6de863183ceef1bbbf34", "score": "0.669239", "text": "static function create_new_password() {\n\t\tif(file_exists(Security::get_word_list())) {\n\t\t\t$words = file(Security::get_word_list());\n\n\t\t\tlist($usec, $sec) = explode(' ', microtime());\n\t\t\tsrand($sec + ((float) $usec * 100000));\n\n\t\t\t$word = trim($words[rand(0,sizeof($words)-1)]);\n\t\t\t$number = rand(10,999);\n\n\t\t\treturn $word . $number;\n\t\t} else {\n\t \t$random = rand();\n\t\t $string = md5($random);\n \t\t$output = substr($string, 0, 6);\n\t \treturn $output;\n\t\t}\n\t}", "title": "" }, { "docid": "e5d86d57d15f867045903f02547aea82", "score": "0.66691405", "text": "function uniqFileNameGenerator($fileName) {\n if (!empty($fileName)):\n $fileType = $fileName['type'];\n $fileTypeToArray = explode('/', $fileType);\n $fileExtention = $fileTypeToArray[1];\n if (!empty($fileExtention)):\n $newFileName = rand() . md5(@date('YmdHis')) . uniqid() . '.' . $fileExtention;\n if (!empty($newFileName)):\n return $newFileName;\n else:\n return FALSE;\n endif;\n else:\n return FALSE;\n endif;\n else:\n return FALSE;\n endif;\n}", "title": "" }, { "docid": "564a0ac111930089f5ac2f7a47ae7c57", "score": "0.6663911", "text": "function randomFile() {\n global $communityPaths;\n\n return tempnam($communityPaths['tempFiles'],\"CA-Temp-\");\n}", "title": "" }, { "docid": "b4b5ece9943745bd03a160e7a7f65d7d", "score": "0.6661797", "text": "function generate_media_identifier($length = 60)\n{\n\n return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$', ceil($length/strlen($x)) )),1,$length);\n\n}", "title": "" }, { "docid": "9a4797b30db330d2fb3d3e38cf8661fc", "score": "0.6661385", "text": "function genRandStr($length = 10) {\n return substr(str_shuffle('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, $length);\n}", "title": "" }, { "docid": "61091cecc88d72e45bc2789d05004612", "score": "0.66440326", "text": "protected function filename()\n {\n return 'canteens_' . time();\n }", "title": "" }, { "docid": "9732de885e8c25222c6fda8ef9579221", "score": "0.6642637", "text": "function createRandomText() {\n\t return rand(1,9) . '+' . rand(1,9);\n }", "title": "" }, { "docid": "a73ac47f788a4d7d7dd38ae973103e97", "score": "0.66401285", "text": "public function getRandomName();", "title": "" }, { "docid": "22d95c0562f06d4243a34eaeb0e8d10f", "score": "0.66361415", "text": "public function fileRebrand($fv){\n\t $ext = explode(\".\",$fv);\n\t $name = time().rand();\n\t $name .=\".\".$ext[count($ext)-1];\n\t $this->fileName =$name;\n\t\treturn $this->fileName;\n\t }", "title": "" }, { "docid": "f86157e944b2e3484a52b4662e2a63db", "score": "0.6631081", "text": "private function makeId()\n {\n $random = mt_rand();\n $random = md5($random);\n $random = substr($random, 0, 12);\n $name = $this->config['name'];\n $length = strlen($name);\n if ($length > 22) {\n $name = substr($name, 0, 22);\n }\n return $name . '-' . $random;\n }", "title": "" }, { "docid": "2ef60dd2472dd3edfdba169fc4a3025d", "score": "0.66240966", "text": "public static function getNewFileName($index = null)\n {\n if (empty($index)) {\n return date('YmdHis') . '-' . substr(microtime(), 2,3) . rand(0, 100);\n } else {\n return date('YmdHis') . '-' . substr(microtime(), 2,3) . $index . rand(0, 100);\n }\n\n }", "title": "" }, { "docid": "50122163f9098267520b7eb08db7ae6c", "score": "0.661786", "text": "private function getOutputName($file)\n {\n $arrRealName = explode('.', $file);\n $suffix = strtolower(end($arrRealName));\n $outFileName = md5($arrRealName[0] . time() . mt_rand(0, 10));\n $outFileName = substr_replace($outFileName, '/', 2, 0);\n $outFileName = substr_replace($outFileName, '/', 5, 0);\n return $outFileName . '.' . $suffix;\n }", "title": "" }, { "docid": "36e8c8d253099956d6abc9d38f27b279", "score": "0.6608524", "text": "function generateRandomToken() {\n\t$allFiles = scandir(\"uploads\");\n\t$randomToken = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstvwxyz\"), 0, 8);\n\t$randomTokenIsOK = true;\n\twhile (true) {\n\t\tforeach ($allFiles as $file) {\n\t\t\tif (strpos($file, $randomToken) !== false) {\n\t\t\t $randomTokenIsOK = false;\n\t\t\t}\n\t\t}\n\t\tif ($randomTokenIsOK) {\n\t\t\tbreak;\n\t\t} else {\n\t\t\t$randomToken = substr(str_shuffle(\"0123456789abcdefghijklmnopqrstvwxyz\"), 0, 8);\n\t\t}\n\t}\n\treturn $randomToken;\n}", "title": "" }, { "docid": "977b04e8de8a419c10ca5bff57564641", "score": "0.6600439", "text": "public function generateRandomName(int $entropy = 256): string\n {\n $bytes = random_bytes($entropy / 8);\n $randomName = rtrim(strtr(base64_encode($bytes), '+/', '-_'), '=');\n\n return $randomName . '.' . $this->file->getClientOriginalExtension();\n }", "title": "" }, { "docid": "e9a9f9c51e50ebec7a7a25adc30bc3ab", "score": "0.65932524", "text": "public function generateFileName($extension) {\r\n $log = new Logger(get_class($this));\r\n $log->setMethod(__FUNCTION__);\r\n $fileName = time() . CryptoUtil::generateToken(rand(10, 20)) . \".\" . $extension;\r\n $log->logInfo('Generated Filename: ' . $fileName);\r\n return $fileName;\r\n }", "title": "" }, { "docid": "6a94ada9246d4039f72a09f31f01e00f", "score": "0.65877295", "text": "private static function generateId(): string {\n\t\treturn dechex( time() ) . bin2hex( random_bytes( 8 ) );\n\t}", "title": "" }, { "docid": "1814265deb2ac00d5368940a7a37f6dd", "score": "0.6584652", "text": "function get_random_string( $__ssize ) {\n $var_string = \"abcdefghijklmnopqrstuvwxyz\" .\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\" .\n \"0123456789\" .\n \"yourdocumenttotheoriginalontainedinyourcurrenttemplate\";\n\n $shuffle_string = str_shuffle( $var_string );\n $sub_string_shuffle = substr( $shuffle_string, 0, $__ssize );\n\n return $sub_string_shuffle;\n }", "title": "" }, { "docid": "b23fe296f53c5196730cefc68e54ad54", "score": "0.6577752", "text": "function buildRandomTestID() {\n return substr(md5(time() * rand()),0,7);\n}", "title": "" }, { "docid": "d32eb23866d09fde49e935c9715d7d50", "score": "0.65741813", "text": "public function getName($n)\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n\n for ($i = 0; $i < $n; $i++) {\n $index = rand(0, strlen($characters) - 1);\n $randomString .= $characters[$index];\n }\n\n return $randomString;\n }", "title": "" }, { "docid": "03c13410896e0ac2ea1b167e64aa57a8", "score": "0.65635073", "text": "private function getRand($num = 6){\n\t\t$string = '';\n\t\t$source = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_';\n\t\t$length = strlen($source);\n\t\twhile(strlen($string) < $num){\n\t\t\t$string .= substr($source,rand(0,1000)%$length,1);\n\t\t}\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "53930d1b74470ae9dcab0ce8d39cc46b", "score": "0.65579927", "text": "private function createFileName()\n {\n $filename = str_replace('{date}'\n , date('d.m.Y')\n , $this->maskName) . $this->extension;\n return $this->rootDir . $this->path . $filename;\n }", "title": "" }, { "docid": "6f2a17bf0ff0f0283053ccb1b880cb6e", "score": "0.6544797", "text": "public function random()\n {\n\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $randomString = '';\n for ($i = 0; $i < 8; $i++) {\n $randomString .= $characters[rand(0, $charactersLength - 1)];\n }\n return $randomString;\n }", "title": "" }, { "docid": "927c483b6310487c9a1e155f5d23eccd", "score": "0.6540709", "text": "public static function generate()\n {\n \t$number=rand(100000, 10000000);\n \t$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';\n \t$length=strlen($chars); \n\t // Start our string\n\t $string = \"\"; \n\t // Generate random string\n\t for ($i = 1; $i < $length-4; $i++)\n\t {\n\t // Grab a random character from our list\n\t $string .= $chars[rand(0,$length)]; \n\t }\n \treturn md5($string.number);\n }", "title": "" }, { "docid": "a5bf2c1553aed9771c5bc57296b53c3c", "score": "0.65362877", "text": "public function generateFilename()\r\n {\r\n //\t $var = sfContext::getInstance()->getRequest()->getParameter('perfect_girls');\r\n //\t $name = $var['name'] . '-' . $var['surname'];\r\n //\t $name = SlugifyClass::Slugify($name);\r\n // substr($filename, strlen($filename)-3, 3);\r\n\r\n // $filename = str_replace(\" \", \"_\", strtolower($this->getOriginalName()));\r\n\r\n $filename = $this->getOriginalName();\r\n $name = substr($filename, 0, -4);\r\n $name = SlugifyClass::Slugify($name);\r\n\r\n\t $extension = $this->getExtension($this->getOriginalExtension());\r\n\r\n\t $filename = ($name . $extension);\r\n\r\n\r\n\t if(!file_exists($this->getPath().$filename))\r\n\t {\r\n\t\t return $filename;\r\n\t }\r\n\t else\r\n\t {\r\n\t\t $extension = $this->getExtension($this->getOriginalExtension());\r\n\t\t $filename = str_replace($extension, '', $filename) . '_';\r\n\r\n\t\t $i = 2;\r\n\r\n\t\t while(true)\r\n\t\t {\r\n\t\t\t if(file_exists($this->getPath().$filename.$i.$extension))\r\n\t\t\t {\r\n\t\t\t\t $i++;\r\n\t\t\t\t continue;\r\n\t\t\t }\r\n\t\t\t break;\r\n\t\t }\r\n\r\n\t\t return $filename.$i.$extension;\r\n\t }\r\n\r\n }", "title": "" }, { "docid": "20c1c34daef045c0c370d5a2cc2852d8", "score": "0.6528372", "text": "function generateCode($length = 64)\r\n{\r\n $name = \"\";\r\n\r\n // define possible characters\r\n $possible = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"; \r\n \r\n // set up a counter\r\n $i = 0; \r\n \r\n // add random characters to $name until $length is reached\r\n while ($i < $length) { \r\n\r\n // pick a random character from the possible ones\r\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\r\n $name .= $char;\r\n $i++;\r\n\r\n }\r\n\r\n // done!\r\n return $name;\r\n}", "title": "" }, { "docid": "d67a418db5d164d80379f8cd5462f210", "score": "0.65119696", "text": "function gen($len = 10) {\r\n\t$chars = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\r\n\t$pass = \"\";\r\n\tfor ($i = 0; $i < $len; $i++) {\r\n\t\t$str = str_split($chars);\r\n\t\t$pass .= $str[array_rand($str)];\r\n\t}\r\n\treturn $pass;\r\n}", "title": "" }, { "docid": "57fdfb52af6547efc2fe3719a4d75d92", "score": "0.6510536", "text": "function gen_encName($uid, $name) {\n\t$enc_name = SHA1(date('m/d/Y/i/s') . $uid . $name . rand(1, 999999));\n\treturn $enc_name;\n}", "title": "" }, { "docid": "1ffbade649aa0f09c080cbf9a81e0ed6", "score": "0.65075696", "text": "private function _randomString()\n\t{\n\t\treturn dechex(mt_rand(0, 0x7fffffff)) . dechex(mt_rand(0, 0x7fffffff));\n\t}", "title": "" }, { "docid": "099f9223024f39d768daa18365da3ba9", "score": "0.6497626", "text": "protected function _generateUniqueIdPath()\n {\n return str_replace('0.', '', str_replace(' ', '_', microtime()));\n }", "title": "" }, { "docid": "4ef5d1afd1887c5499f30dee2be91c44", "score": "0.64927036", "text": "function genString($length = 10) {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $randomString = '';\n for ($i = 0; $i < $length; $i++) {\n $randomString .= $characters[rand(0, strlen($characters) - 1)];\n }\n return $randomString;\n}", "title": "" }, { "docid": "534d8eaf1ca022ee8e27133dc60d5433", "score": "0.6492051", "text": "private function generateURL() {\n\t\n\t\t$ext = substr(str_shuffle(str_repeat(\"0123456789abcdefghijklmnopqrstuvwxyz\", 3)), 0, 3);//get random 3 char string\n\t\n\t\tif (!in_array($ext, $this->used)) {\n\t\t\treturn $ext;\n\t\t}\n\t\t\n\t\treturn $this->generateURL();//if random string exists then run again\n\t\t\n\t}", "title": "" }, { "docid": "49456f2120444a570446868f8ae93e99", "score": "0.64778394", "text": "private static function RandomString() {\n\t $characters = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n\t $randstring = \"\";\n\t for ($i = 0; $i < 12; $i++) {\n\t $randstring .= $characters[rand(0, strlen($characters)-1)];\n\t }\n\t return $randstring;\n\t}", "title": "" }, { "docid": "4f32943370cdf7a78eab011ea9817ca2", "score": "0.6475121", "text": "private function getRandomString(): string\n {\n return md5(uniqid(mt_rand(), true));\n }", "title": "" }, { "docid": "f96c20fedaafeff6a480a2032f7452b0", "score": "0.6474433", "text": "function generateUniqueFilename($fileName, $path=''){\n $path='/var/www/';\n\t $no = 1;\n $newFileName = $fileName;\n while (file_exists(\"$path/\".$newFileName)) {\n $no++;\n $newFileName = substr_replace($fileName, \"_$no.\", strrpos($fileName, \".\"), 1);\n }\n return $newFileName;\n }", "title": "" }, { "docid": "6cd8407726e9928d8b851eefadcdfd82", "score": "0.64733446", "text": "private function generateValue(): string\n {\n return Str::random(3) . '-'\n . Str::random(3);\n }", "title": "" }, { "docid": "9590f1af70881d94344b3fdd1416445f", "score": "0.6468604", "text": "private function makeFilename() {\n\t\treturn getcwd() . '/laravel_' . md5( getcwd() . time() . uniqid() ) . '.zip';\n\t}", "title": "" }, { "docid": "3a533b1130ef7747b2aa938a1c79b4ae", "score": "0.6465799", "text": "public function generate_slug()\n {\n $chars = 'bcdfghjkmnpqrstvwxyz23456789';\n $id = '';\n for ($i=0; $i<3; $i++)\n {\n $id .= mb_substr(str_shuffle($chars), 0, 1);\n }\n }", "title": "" }, { "docid": "dbeea2664b32783e350c15b4e6d24b43", "score": "0.6460381", "text": "public static function uuid_10_str() {\n\t//--\n\t$toggle = self::random_number(0,1);\n\t//--\n\t$uid = '';\n\tfor($i=0; $i<10; $i++) {\n\t\tif(($i % 2) == $toggle) {\n\t\t\t$rand = self::random_number(0,9);\n\t\t} else { // alternate nums with chars (this avoid to have ugly words)\n\t\t\t$rand = self::random_number(10,35);\n\t\t} //end if else\n\t\t$uid .= base_convert($rand, 10, 36);\n\t} //end for\n\t//--\n\treturn (string) strtoupper((string)$uid);\n\t//--\n}", "title": "" }, { "docid": "1191a7638a7f484c2b6e63286dd6199f", "score": "0.6458983", "text": "function generateFiles($number = null, $folder)\n{\n $number = ($number == 0) ? rand(10, 20) : $number;\n for ($i = 0; $i < $number; $i++) {\n $file = generateRandomString();\n $text = generateRandomString(0, 1);\n $myfile = fopen(\"./\" . $folder . \"/\" . $file . \".txt\", \"w\") or die(\"Unable to open file!\");\n $txt = $text . \"\\n\";\n fwrite($myfile, $txt);\n fclose($myfile);\n }\n}", "title": "" }, { "docid": "f9e1dc05d1b1a39b3fadde1d46ecd1e8", "score": "0.64328784", "text": "function imgRandomName()\n{\n $newname = uniqid().\"_\".time();\n return $newname;\n}", "title": "" }, { "docid": "ba08f79ec3d2a88360f14e9bd568873c", "score": "0.64318246", "text": "protected function generateKey(): string\n {\n $key = '';\n for ($i = 0; $i < 16; $i++) {\n $key .= chr(rand(33, 126));\n }\n return base64_encode($key);\n }", "title": "" }, { "docid": "a4456f89eda8e05d5dc9ee2a5f564c0c", "score": "0.64305866", "text": "private static function createRandomCharacterString(int $numOfCharacters){\n $randomString = '';\n $charactersCount = count(self::$characters);\n for($i = 0; $i < $numOfCharacters; $i++){\n $randomString .= self::$characters[mt_rand(0, $charactersCount)];\n }\n\n return $randomString;\n }", "title": "" }, { "docid": "684447190bd72a4782307df192ce8588", "score": "0.6425277", "text": "public function genUid() {\r\n $rand = $this['crypt/rand'];\n\n $hex = bin2hex($rand->Bytes(32));\r\n $str = substr($hex,0,16) . '-' . substr($hex,16,8) . '-' . substr($hex,24,8) . '-' . substr($hex,32,8) . '-' . substr($hex,40,24);\r\n return $str;\r\n }", "title": "" }, { "docid": "2d923218f4d534a68435e6cba1f8bae3", "score": "0.64212286", "text": "protected function generateUniqueToken(): string\n {\n return strtolower(Str::random(64));\n }", "title": "" }, { "docid": "c8b6abae31daa5bd36367d28985c5e79", "score": "0.64204407", "text": "public static function generateToken(): string\n {\n return rtrim(strtr(base64_encode(bin2hex(random_bytes(32))), '+/', '-_'), '=');\n }", "title": "" }, { "docid": "f97bbda0bcdb78aba6165e9611894997", "score": "0.64204246", "text": "function GenerateWord() {\r\n $nb = rand(3, 10);\r\n $w = '';\r\n for ($i = 1; $i <= $nb; $i++)\r\n $w .= chr(rand(ord('a'), ord('z')));\r\n return $w;\r\n}", "title": "" }, { "docid": "6cb331494121f6afc3e8d702445138d6", "score": "0.64190114", "text": "function fetdate($len) {\n $chars = array(\"0\", \"1\", \"2\",\n \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"\n );\n $charsLen = count($chars) - 1;\n shuffle($chars);\n $output = \"\";\n for ($i = 0; $i < $len; $i++) {\n $output .= $chars[mt_rand(0, $charsLen)];\n }\n return $output;\n }", "title": "" }, { "docid": "841f0f7f048d6b887d726075282cdaaa", "score": "0.6407712", "text": "private function generateFolderName()\n {\n return mb_strcut(sha1(uniqid(mt_rand(), true)), 0, 2);\n }", "title": "" }, { "docid": "8a046a827576876760a8cae95b1d4d24", "score": "0.64052176", "text": "function mypwgen($length = 15)\n{\n $fp = fopen (\"/dev/urandom\", 'r');\n if (!$fp) die (\"Can't access /dev/urandom to get random data. Aborting.\");\n $random = fread ($fp, 512);\n fclose ($fp);\n return substr (trim (base64_encode ($random), \"=\"), 0, $length);\n}", "title": "" }, { "docid": "68d2b51717e06a89925776a2fdafd837", "score": "0.64003104", "text": "public static function generateName($length = 10)\n {\n $pool = '0123456789abcdefghijklmnopqrstuvwxyz';\n\n return substr(str_shuffle(str_repeat($pool, $length)), 0, $length);\n }", "title": "" }, { "docid": "cecc3f27dab50243c2095ca5759c03bb", "score": "0.63823116", "text": "public function generate() : string\n {\n return bin2hex(random_bytes(32));\n }", "title": "" }, { "docid": "f0d188c9df2da8419b61b7e7a74f0b85", "score": "0.63706625", "text": "public function randomString(){\n $alpha = \"abcdefghijklmnopqrstuvwxyz\";\n $alpha_upper = strtoupper($alpha);\n $numeric = \"0123456789\";\n $special = \".-+=_,!@$#*%<>[]{}\";\n $chars = $alpha . $alpha_upper . $numeric; \n $pw = ''; \n $chars = str_shuffle($chars);\n $pw = substr($chars, 8,8);\n return $pw;\n }", "title": "" }, { "docid": "a328fbf20766e0fba20e89110baa1ea6", "score": "0.6363113", "text": "function _health_gen_uid($length = 10) {\n $str = \"\";\n for ($x = 0; $x < $length; $x++) {\n $str .= substr(str_shuffle(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"), 0, 1);\n }\n return $str;\n}", "title": "" }, { "docid": "cd03dcedf80711e326ee7d00d17defc8", "score": "0.6361118", "text": "public static function generateCode() {\n $characters = self::getRandCharacters();\n while ( true ) {\n $keys = array_rand( $characters, self::$randLength );\n $code = '';\n for ( $i = 0; $i < self::$randLength; $i++ ) {\n $code .= $characters[$keys[$i]];\n }\n\n if ( self::isUnique( $code ) ) {\n return $code;\n }\n }\n }", "title": "" }, { "docid": "2c9a6c80c9af4a2c6dcb2534aecab335", "score": "0.6358698", "text": "function generateRandStr($length)\n\t{\n $randstr = \"\";\n for($i=0; $i<$length; $i++){\n $randnum = mt_rand(0,61);\n if($randnum < 10){\n $randstr .= chr($randnum+48);\n }else if($randnum < 36){\n $randstr .= chr($randnum+55);\n }else{\n $randstr .= chr($randnum+61);\n }\n }\n return $randstr;\n }", "title": "" }, { "docid": "898c96082cba6bf2aeaf3cfa4e774afd", "score": "0.63415504", "text": "function random_string() {\n\t\tif(function_exists('random_bytes')) {\n\t\t\t$bytes = random_bytes(16);\n\t\t\t$str = bin2hex($bytes); \n\t\t} else if(function_exists('openssl_random_pseudo_bytes')) {\n\t\t\t$bytes = openssl_random_pseudo_bytes(16);\n\t\t\t$str = bin2hex($bytes); \n\t\t} else if(function_exists('mcrypt_create_iv')) {\n\t\t\t$bytes = mcrypt_create_iv(16, MCRYPT_DEV_URANDOM);\n\t\t\t$str = bin2hex($bytes); \n\t\t} else {\n\t\t\t$str = md5(uniqid('SOdfiov389sSug94kbv', true));\n\t\t}\t\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "f879ada487248fc5b3a54baf8d6d78e4", "score": "0.6339823", "text": "function genWord($min, $max){\n $wordLength = rand($min, $max);\n $word = \"\";\n for($i = 0; $i < $wordLength; $i++){\n $word .= chr(rand(97, 120));\n }\n echo $word . \" \";\n }", "title": "" }, { "docid": "7994644e8de459fd8fe4393c997eba7e", "score": "0.63387257", "text": "protected function generateFilenameToken()\n {\n $token = bin2hex(openssl_random_pseudo_bytes(8, $strong));\n if (!$strong) {\n throw new \\Exception('openssl_random_pseudo_bytes was not able to generate a cryptographical strong key.', 1447670792);\n }\n return $token;\n }", "title": "" }, { "docid": "c06b6fd81e0e5f58f6a9ad06222ad815", "score": "0.63384795", "text": "public function generateCropFileName() {\n\t\treturn 'http://'.CONTENT.URL_SEPARATOR.IMAGE_DIRECTORY.URL_SEPARATOR.'crop_'.$this->masterId.'_'.$this->id.'.png';\n\t}", "title": "" }, { "docid": "3133b9b85c1bd228ab8d85a3c59c9f0c", "score": "0.6338135", "text": "private function generateUniqueFileName($file)\n {\n return time() . '_' . uniqid() . '.' .$file->getClientOriginalExtension();\n }", "title": "" } ]
7cb2e068e21b7332f8ab6aae6ff9801d
Retirna 1 cartas do topo do baralho para o turn
[ { "docid": "a75fc825a86231780a0fa8d1800912fa", "score": "0.0", "text": "public function abrirTurn()\n {\n if (count($this->flop) != 3) {\n throw new Exception('É necessário abrir o flop antes de abrir o turn');\n }\n\n $c = $this->baralho->getCartaDoTopo();\n $this->turn = $c;\n }", "title": "" } ]
[ { "docid": "1dc0b4c844373f1f4369c634ac2cd9b2", "score": "0.5209976", "text": "public function sacar() {\n if ($this->cantcartas == -1)\n return FALSE;\n $this->cantcartas--;\n return $this->cajita[($this->cantcartas + 1)];\n }", "title": "" }, { "docid": "6e8f6ea0b506b8e056357cc81c991db6", "score": "0.4960767", "text": "function getNodeId($from_lat, $from_lon, $transport){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.01;\n switch ($transport){\n case \"foot\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n case \"bicycle\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n case \"car\":\n $sql = \"SELECT id, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_road_nodes\n WHERE lat < $from_lat+$offset AND lat > $from_lat-$offset\n AND lon < $from_lon+$offset AND lon > $from_lon-$offset\n ORDER BY x ASC LIMIT 1\";\n break;\n }\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = $row;\n }\n return (int) $arr[0]['id'];\n}", "title": "" }, { "docid": "2f024c068a0c23452fa6163a5e901bb0", "score": "0.49257013", "text": "public function getCart();", "title": "" }, { "docid": "cc4743f41af54194c8d7ecbd83efb822", "score": "0.48983425", "text": "public function getCosto()\n {\n return $this->costo;\n }", "title": "" }, { "docid": "dced7393bb7cd263342aca177ebdb027", "score": "0.48676503", "text": "function getNeigh($nodeId, $transport){\n global $mysqli;\n $costM = array();\n switch ($transport){\n case \"foot\":\n $sql = \"SELECT DISTINCT neighbour_id, distance FROM osm_node_neighbours_walk WHERE node_id = $nodeId\";\n break;\n case \"bicycle\":\n $sql = \"SELECT DISTINCT neighbour_id, distance FROM osm_node_neighbours_cycle WHERE node_id = $nodeId\";\n break;\n case \"car\":\n $sql = \"SELECT DISTINCT neighbour_id, distance FROM osm_node_neighbours_drive WHERE node_id = $nodeId\";\n break;\n }\n $res = $mysqli->query($sql);\n while($res && $row = $res->fetch_assoc()){\n $costM[$row['neighbour_id']] = $row['distance'];\n }\n return $costM ?? null;\n}", "title": "" }, { "docid": "76228f4e5ded683722ebf36147d1693d", "score": "0.4851879", "text": "protected function armaColeccionMapeoCarac() {\n $dao = new PGDAO();\n $where = $this->strZpTprop();\n $strSql = $this->COLECCIONMAPEOCARAC . \" WHERE tipoprop in (\" . $where . \");\";\n $arrayRet = $this->leeDBArray($dao->execSql($strSql));\n\treturn $arrayRet;\n }", "title": "" }, { "docid": "3320fd3fe5796dcb1045355327706d1f", "score": "0.4789385", "text": "public function obtenerCartas(){\n $cartas_ = new Cartas();\n $Cartas = $cartas_->getCartas();\n // Comprobamos si existe el jugador\n if ($Cartas) {\n $_SESSION['Cartas'] = $Cartas;\n }\n $this->Logica();\n \n }", "title": "" }, { "docid": "e18001e51f845174b81eaeae1c8838cb", "score": "0.4781765", "text": "public function get_centroCosto(){\n\t\t\t\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\t\t\t\t$sql=\"SELECT distinct AREA.COD_CC2, AREA.NOM_CC2 \n\t\t\t\t\t\tFROM CENTROCOSTO2 AREA, EMPLEADOS_BASIC EPL, EMPLEADOS_GRAL GRAL\n\t\t\t\t\t\tWHERE EPL.COD_EPL = GRAL.COD_EPL\n\t\t\t\t\t\tAND EPL.COD_CC2=AREA.COD_CC2\n\t\t\t\t\t\tand AREA.estado='A'\n\t\t\t\t\t\tand EPL.estado='A'\n\t\t\t\t\t\torder by nom_cc2 asc\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t$this->lista[]=array(\"codigo\" => $fila[\"COD_CC2\"],\n\t\t\t\t\t\t\t\t\t\t \"area\"\t => utf8_encode($fila[\"NOM_CC2\"]));\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn $this->lista;\n\t\t\t\t\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "fadcd7d5e4367686fb1ef91949fc7999", "score": "0.47353086", "text": "public function buscarProductoCarrito(){\n $carrito = $_SESSION['carrito'];\n\n $resList = array();\n\n foreach($carrito as $item){\n if($item[0] == $this -> producto){\n $resList[0] = $item[0];\n $resList[1] = $item[1];\n }\n }\n\n return $resList;\n }", "title": "" }, { "docid": "5081935b3bca0895eddd30c38ace2cf6", "score": "0.47152093", "text": "function setCobrar($tarjeta1,$tarjeta2,$tarjeta3,$tarjeta4,$tarjeta5,$partida){\n\t$tarjetas=array(0=>$tarjeta1,1=>$tarjeta2,2=>$tarjeta3,3=>$tarjeta4,4=>$tarjeta5);\n\t$tarjeta_cambio;\n\t$veces_entre_foreach=0;\n\t$cantidad=0;\n\t\t\t//pregunta si el usuario saco tarjeta en la ronda, si no saco no puede cambiar ninguna de las que ya tiene(por esto ese if)\n\tif($partida->turno_usuario->getSaqueTarjeta() == 1){\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tforeach($tarjetas as $tarjeta){\n\t\t\t\tif($tarjeta == 1){\n\t\t\t\t\tif($partida->turno_usuario->getTarjeta($veces_entre_foreach)!=NULL ){\n\t\t\t\t\t\t\t//solamente puede tomar una tarjeta, porque es cobrar, si hay mas de una seleccionadada cantidad de hace mas de 1 y el cambio no se realiza\n\t\t\t\t\t\tif($cantidad < 1){\n\t\t\t\t\t\t\t\t//digo que la tarjeta que esta en la posicion $avanzar_arreglo del usuario fue seleccionada\n\t\t\t\t\t\t\t$tarjeta_cambio=$partida->turno_usuario->getTarjeta($veces_entre_foreach);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$cantidad++;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t\t$veces_entre_foreach++;\n\t\t\t}//foreach($tarjetas as $tarjeta){\n\t\t\t\n\t\t\t\t//si se selecciono una y solo una tarjeta\n\t\t\tif($cantidad == 1){\n\t\t\t\t\t//compruebo si la tarjeta esta en estado de ser cambiada\n\t\t\t\tif($tarjeta_cambio->getEstado() == 0 ){\n\t\t\t\t\t\t\n\t\t\t\t\t$id_pais=$tarjeta_cambio->getIdPais();\n\t\t\t\t\t\t//recorro todos los paises \n\t\t\t\t\tforeach($partida->paises as $pais){\t\n\t\t\t\t\t\t\t//compruebo si id del usuario en turno es igual al del propietario del pais que selecciona el foreach Y aparte compruebo que \n\t\t\t\t\t\t\t//el pais al que hace referencia la tarjeta sea el seleccionado por el foreach\n\t\t\t\t\t\tif($id_pais == $pais->getId() && $partida->turno_usuario->getId() == $pais->getPropietario()->getId() )\t{\n\t\t\t\t\t\t\t\t//cambio el estado de la tarjeta\n\t\t\t\t\t\t\t$tarjeta_cambio->setEstado(1);\n\t\t\t\t\t\t\t\t//le entrego al pais al que hace referencia 2 fichas\n\t\t\t\t\t\t\t$pais->setFichas(2);\n\t\t\t\t\t\t\t\t//reseteo el saco tarjeta, para que en la misma ronda no pueda cobrar dos tarjetas\n\t\t\t\t\t\t\t$partida->turno_usuario->setSaqueTarjetaReset();\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}//if($cantidad == 1){\n\t\t\t\n\t}//if($partida->turno_usuario->getSaqueTarjeta() == 1){\t\n}", "title": "" }, { "docid": "cca7690d6f388bc6966a1cfd67bb09ef", "score": "0.4715042", "text": "public function getCartable();", "title": "" }, { "docid": "468797b5893b28b8e723355112ade08f", "score": "0.47103232", "text": "public function getCittaArrivo() {\n if (isset($_REQUEST['citta_arrivo'])) {\n return $_REQUEST['citta_arrivo'];\n } else\n return 0;\n }", "title": "" }, { "docid": "67131928ae94ca38da04d90879fc1ca5", "score": "0.4707962", "text": "public function getCodope(){\n\t\treturn $this->codope;\n\t}", "title": "" }, { "docid": "e2e7e5dd3ee805708565e667afa28495", "score": "0.47040346", "text": "public function buscarPlanes($valor)\n {\n return $this->conexionPlanes->buscar($valor,\"ASIGNATURA\", \"ASC\");\n }", "title": "" }, { "docid": "28f5a76d286a1dfa860d0a17279c6358", "score": "0.47008446", "text": "protected function get_cost_route($route){\r\n $valor = 0;\r\n foreach ($route as $index => $city){\r\n if($index > 0){\r\n $valor += $this->connections[$city][$route[$index-1]];\r\n }\r\n }\r\n return $valor;\r\n }", "title": "" }, { "docid": "1bac0b23d601e1f17f30e8ebe4e13270", "score": "0.46849778", "text": "public function copyTryCarrito(){\n\n $carrito = $_SESSION['carrito'];\n\n $resList = array();\n\n foreach($carrito as $item){\n if($item[0] == $this -> producto){\n $item[1] = $this -> cantidad;\n array_push($resList, $item);\n }else{\n array_push($resList, $item);\n }\n }\n return $resList;\n }", "title": "" }, { "docid": "491903f0cfbe91a343566709e52e7179", "score": "0.467028", "text": "public function generateUniqueCart()\n {\n return response()->json(['cart_id' => ShoppingCart::getOrCreateCartId(auth()->user()) ]);\n }", "title": "" }, { "docid": "f253986027f8f993f3939e7b3ef759d5", "score": "0.46660307", "text": "public function mezclar() {\n if ($this->cantcartas == -1 || $this->cantcartas == 0)\n return TRUE;\n $inicio = 0;\n $final = $this->cantcartas;\n $mezcla = [];\n $punt = 0;\n for (; $inicio != $final && $inicio < $final; $inicio++, $final--) {\n $mezcla[$punt] = $this->cajita[$final];\n $punt++;\n $mezcla[$punt] = $this->cajita[$inicio];\n $punt++;\n }\n if (($this->cantcartas % 2) == 0)\n $mezcla[$punt] = $this->cajita[$inicio];\n $this->cajita = $mezcla;\n return TRUE;\n }", "title": "" }, { "docid": "f1fc31ca65def24f162305ca09be9b62", "score": "0.4661019", "text": "private function getPrecosPorClientes($produtos)\n {\n\n $menus = [];\n $cursos = [];\n $precosCurso = [];\n $precosMenus = [];\n\n foreach ($produtos as $produto) {\n if ($produto->produto_tipo == BuscaConstants::BUSCA_TIPO_MENU) {\n $menus[] = $produto->produto_id;\n } else {\n $cursos[] = $produto->produto_id;\n }\n }\n\n if (count($menus) > 0) {\n $precosMenus = Query::fetch('Busca/QryBuscarPrecosMenus', ['id_menu' => $menus]);\n }\n\n if (count($cursos) > 0) {\n $precosCurso = Query::fetch('Busca/QryBuscarPrecosCursos', ['id_curso' => $cursos]);\n }\n\n $agrupadoPorIdMenu = [];\n $agrupadoPorIdCurso = [];\n\n foreach ($precosMenus as $precoMenu) {\n $agrupadoPorIdMenu[$precoMenu->id_menu][$precoMenu->qtd_minima_clientes] = $precoMenu->preco;\n }\n\n foreach ($precosCurso as $precoCurso) {\n $agrupadoPorIdCurso[$precoCurso->id_curso][$precoCurso->qtd_minima_clientes] = $precoCurso->preco;\n }\n\n foreach ($produtos as &$produto) {\n $preco = $produto->produto_preco;\n $precosFinais = [];\n $agrupadorLoop = null;\n $counter = 0;\n $ultimoQtdPessoas = 1;\n\n if ($produto->produto_tipo == BuscaConstants::BUSCA_TIPO_MENU && isset($agrupadoPorIdMenu[$produto->produto_id])) {\n $agrupadorLoop = $agrupadoPorIdMenu[$produto->produto_id];\n } else if ($produto->produto_tipo == BuscaConstants::BUSCA_TIPO_CURSO && isset($agrupadoPorIdCurso[$produto->produto_id])) {\n $agrupadorLoop = $agrupadoPorIdCurso[$produto->produto_id];\n }\n\n if (is_null($agrupadorLoop)) {\n continue;\n }\n\n foreach ($agrupadorLoop as $qtdPessoas => $valor) {\n $counter++;\n if ($qtdPessoas == 1) continue;\n $descricao = \"$ultimoQtdPessoas a \" . ($qtdPessoas - 1);\n\n if ($ultimoQtdPessoas == ($qtdPessoas - 1)) {\n $descricao = $ultimoQtdPessoas;\n }\n\n if ($counter == count($agrupadorLoop)) {\n if (empty($precosFinais)) {\n $precosFinais[] = ['preco' => $preco, 'qtd' => $descricao];\n } else {\n $precosFinais[] = ['preco' => $valor, 'qtd' => $descricao];\n }\n\n $precosFinais[] = ['preco' => $valor, 'qtd' => \"$qtdPessoas+\"];\n } else {\n $precosFinais[] = ['preco' => empty($precosFinais) ? $preco : $valor, 'qtd' => $descricao];\n }\n\n $ultimoQtdPessoas = $qtdPessoas;\n }\n\n $produto->precos = $precosFinais;\n\n }\n\n return $produtos;\n\n }", "title": "" }, { "docid": "612d1ad2c3da819e8fe51c8aa89f380d", "score": "0.46571603", "text": "public function cortesia()\n {\n $this->costo = 0;\n }", "title": "" }, { "docid": "b03bc579fa113eeea99ecd099be27242", "score": "0.46504185", "text": "public function run()\n {\n $tovari_transport = [\n \t[\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-04-07 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 1,\n\t 'tov_trans_types' => 1,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 1,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-04-07 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 1,\n\t 'type' => 0,\n\t 'tov_trans_types' => 3,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 3,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-04-12 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 1,\n\t 'tov_trans_types' => 2,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 3,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-04-12 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 1,\n\t 'type' => 0,\n\t 'tov_trans_types' => 2,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 2,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 500,\n\t 'to_date' => '2020-04-15 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 1,\n\t 'tov_trans_types' => 1,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 1,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 600,\n\t 'to_date' => '2020-04-21 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 1,\n\t 'type' => 0,\n\t 'tov_trans_types' => 5,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 5,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-04-21 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 1,\n\t 'tov_trans_types' => 4,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 4,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-07-05 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 0,\n\t 'tov_trans_types' => 2,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 2,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-07-05 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 1,\n\t 'tov_trans_types' => 3,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 3,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-07-05 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 1,\n\t 'type' => 0,\n\t 'tov_trans_types' => 3,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 5,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-07-05 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 1,\n\t 'tov_trans_types' => 1,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 4,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-07-05 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 1,\n\t 'type' => 0,\n\t 'tov_trans_types' => 3,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 1,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-07-05 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 0,\n\t 'type' => 1,\n\t 'tov_trans_types' => 2,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 1,\n \t ],\n \t [\n\t 'from_lat' => 43.218199,\n\t 'from_lng' => 27.932893,\n\t 'to_lat' => 42.510784,\n\t 'to_lng' => 27.451005,\n\t 'from_city' => \"Варна\",\n\t 'to_city' => \"Бургас\",\n\t 'description' => '',\n\t 'price' => 32,\n\t 'to_date' => '2020-07-05 10:10:10',\n\t 'fast_payment' => 1,\n\t 'adr' => 1,\n\t 'type' => 0,\n\t 'tov_trans_types' => 4,\n\t 'firm_id' => 1,\n\t 'vehicle_type' => 2,\n \t ],\n \t \n ];\n DB::table('tovari_transport')->insert($tovari_transport);\n }", "title": "" }, { "docid": "e546d20fe4508990fa9baac6b359ee09", "score": "0.46476492", "text": "private function makeMachineMove(){\n\t\t$spaces = $this->getAvaibleSpaces();\n\t $space = $spaces[rand()%count($spaces)];\n\t\t$this->gato[$space[0]][$space[1]] = $this->jugador2;\n\t\treturn $space[0].\":\".$space[1];\n\t}", "title": "" }, { "docid": "78a422db056d4d9249d323c4c1a8bafd", "score": "0.46337685", "text": "function getOrder()\n {\n return 2;\n }", "title": "" }, { "docid": "12a24ba53b294a53429dce0574cf0d47", "score": "0.46324247", "text": "public function checkout(){\n\t\ttry {\n\t\t\tif (Session::has('cart')){\n\t\t\t\t$cart = Session::get('cart');\n\t\t\t\treset($cart);\n\t\t\t\t$restaurant_id = key($cart);\n $idParen= DB::table('res_restaurants')\n ->select('parent_restaurant_id')\n ->where('restaurant_id', $restaurant_id)\n ->get();\n\t\t\t\t$res_addresses = Restaurant::where(\"parent_restaurant_id\", $idParen[0]->parent_restaurant_id)->where(\"activate\",1)->get();\n\n $shipping_charge=0;\n \n foreach ($res_addresses as $key => $value) {\n\t\t\t\t\t$resadds[$value->restaurant_id] = $value->name.\" - \".$value->address;\n \n if($value->restaurant_id==$value->parent_restaurant_id){\n //Si es el padre usar ese costo de envío\n $shipping_charge = $value->shipping_cost;\n }\n \n\t\t\t\t}\n\n\t\t\t\t$sches = Schedule::where(\"restaurant_id\", $restaurant_id)\n\t\t\t\t\t->where(\"day_id\", date('w')+1)->get();\n\n\t\t\t\t//Aqui mando a traer las direcciones\n\t\t\t\t$addrss = Address::where('user_id', Auth::user()->user_id)->get();\n\t\t\t\tforeach ($addrss as $key => $value) {\n\t\t\t\t\t$usradds[$value->address_id] = $value->address_name .\" - \". $value->address_1 .\n\t\t\t\t\t\t(!empty($value->address_2) ? \", \".$value->address_2 : \"\") .\n\t\t\t\t\t\t(!empty($value->city) ? \", \".$value->city : \"\");\n\t\t\t\t}\n\n\t\t\t\tif(!isset($usradds)){\n\t\t\t\t\t$usradds = array ();\n\t\t\t\t}\n \n\t\t\t\tif(!isset($resadds) || count($resadds) == 0){\n\t\t\t\t\t$resadds = array ();\t\n\t\t\t\t}\n \n if(count($resadds)>1){\n foreach ($resadds as $k=>$v) {\n if($k==$idParen[0]->parent_restaurant_id){\n unset($resadds[$k]);\n }\n }\n }\n \n $data['contador_add'] = count($addrss);\n $data['res_address']=$resadds;\n $data['usr_address']=$usradds;\n //Devolviendo la id, del padre\n $data['restaurant_id']=$restaurant_id;\n $data['parent_shipping_cost']=$shipping_charge;\n $data['schedule']=$sches;\n \n //For new Addresses\n $statelst = State::where('country_id', 69)->where('active', true)->get();\n $data['states'] = array();\n $data['municipalities'] = array();\n $data['zones'] = array();\n $data['states']['']=\"--Seleccione un departamento--\";\n $data['municipalities']['']=\"--Seleccione un municipio--\";\n $data['zones']['']=\"--Seleccione una zona--\";\n\n //Obtengo todas las zonas sin necesidad de los municipios\n $zonas = Zone::select('zone_id', DB::raw('CONCAT(zone, \" - $\", price) AS name_zona'))\n\t\t\t ->join('pf.com_shipping_prices', 'pf.com_zones.shipping_price_id', '=', 'pf.com_shipping_prices.shipping_price_id')\n\t\t\t ->lists('name_zona', 'zone_id');\n #sort($zonas);\n\t\t $combobox = array('none' => \"--Seleccione una zona\") + $zonas;\n\t\t $selected = array();\n \n \n foreach ($statelst as $state) {\n $data['states'][$state->state_id]=$state->state;\n }\n\n $date = new DateTime();\n\t\t $fecha = $date->format('Y-m-d H:i:s');\n\n\t\t $promociones = Product::where('activate',1)\n\t\t ->where('promotion',1)\n\t\t ->where('res_products.start_date', '<=', $fecha)->where('res_products.end_date', '>=', $fecha)\n\t\t ->count();\n\n\t\t\t\treturn View::make('web.checkout', compact('combobox', 'selected'))\n\t\t\t\t\t->with('promociones', $promociones)\n\t\t\t\t\t->with($data);\n\t\t\t}else{\n\t\t\t\treturn View::make('web.home');\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\treturn Response::json(array('message_error' => $e->getMessage()), 400);\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "6042dda5b94ce8c760fb2121d7bfa3b4", "score": "0.46170902", "text": "function calcularSemestreEspacioMasAtrasado() {\r\n if (is_array($this->espaciosPlan))\r\n {\r\n if(is_array($this->espaciosAprobados)){\r\n foreach ($this->espaciosPlan as $key => $espaciosPlan) {\r\n foreach ($this->espaciosAprobados as $key2 => $espaciosAprobados) {\r\n if ($espaciosPlan==$espaciosAprobados)\r\n unset ($this->espaciosPlan[$key]);\r\n }\r\n }\r\n }\r\n }else{\r\n $this->mensaje[$this->datosEstudiante['CODIGO']][]=\"No existen espacios registrados en el plan de estudios del estudiante\";\r\n\r\n }\r\n return $this->espaciosPlan[0]['SEMESTRE'];\r\n }", "title": "" }, { "docid": "3fd4a10eae448855b6d117ef47547153", "score": "0.4606809", "text": "public static function getDestinos() {\n $sql_destinos = \"SELECT products.city FROM products where activo=1 GROUP BY city\";\n \n $destinos = $this->db_list($sql_destinos);\n \n return $destinos;\n \n }", "title": "" }, { "docid": "6274aff9481cbeeb6a8893e4803d6cc6", "score": "0.4587781", "text": "public function getQuantita($prodotto) \n\t{\n\t\t$position = -1;\n\n\t\tfor ($i=0;$i<count($this->contenuto);$i++) \n\t\t{\n\t\t//Prelevo la posizione del prodotto nell'array\n\t\t\tif ($this->contenuto[$i]==$contenuto) \n\t\t\t$position=$i;\n\t\t}\n\n\t\t//Aggiorno le informazioni del prodotto\n\t\t$this->quantita[$position]=$quantita;\n\t\tif ($position==-1) \n\t\techo \"Impossibile aggiornare il prodotto,\n\t\t\tprodotto non trovato!<br><br>\";\n\t}", "title": "" }, { "docid": "74504e59bc81635477c6a23f00a236ca", "score": "0.45831263", "text": "public function changeToOrdine()\n {\n\n //crea la tabella degli ordini verso i fornitori\n //Rielabora\n $preventivatore = $this->getPreventivatore();\n $result = $preventivatore->elabora();\n $imponibile = $result['prezzo_cliente_senza_iva'];\n $iva = $result['prezzo_cliente_con_iva'] - $result['prezzo_cliente_senza_iva'];\n $importo_trasportatore = $result['costo_trazione'];\n $importo_depositario = $result['deposito'];\n $importo_traslocatore_partenza = $result['costo_scarico_totale'] ;\n $importo_traslocatore_destinazione = $result['costo_salita_piano_totale'] + $result['costo_montaggio_totale'] + $result['costo_scarico_ricarico_hub_totale'];\n\n $totali = array();\n $totali[$this->id_trasportatore] = 0;\n $totali[$this->id_depositario] = 0;\n $totali[$this->id_traslocatore_destinazione] = 0;\n $totali[$this->id_traslocatore_partenza] = 0;\n\n $totaliMC = array();\n $totaliMC[$this->id_trasportatore] = 0;\n $totaliMC[$this->id_depositario] = 0;\n $totaliMC[$this->id_traslocatore_destinazione] = 0;\n $totaliMC[$this->id_traslocatore_partenza] = 0;\n\n\n $totali[$this->id_trasportatore] = $totali[$this->id_trasportatore] + $importo_trasportatore;\n $totali[$this->id_depositario] = $totali[$this->id_depositario] + $importo_depositario;\n $totali[$this->id_traslocatore_partenza] = $totali[$this->id_traslocatore_partenza] + $importo_traslocatore_partenza;\n $totali[$this->id_traslocatore_destinazione] = $totali[$this->id_traslocatore_destinazione] + $importo_traslocatore_destinazione;\n\n\n $mc = $preventivatore->getMC();\n\n $totaliMC[$this->id_trasportatore] = $totaliMC[$this->id_trasportatore] + $mc;\n $totaliMC[$this->id_depositario] = $totaliMC[$this->id_depositario] + $mc;\n $totaliMC[$this->id_traslocatore_destinazione] = $totaliMC[$this->id_traslocatore_destinazione] + $mc;\n $totaliMC[$this->id_traslocatore_partenza] = $totaliMC[$this->id_traslocatore_partenza] + $mc;\n\n $imponibile = round($totali[$this->id_trasportatore]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_trasportatore] - $imponibile,2);\n\n $ordine_trasportatore = new OrdineFornitore($this->id_preventivo, $this->id_trasportatore, $totali[$this->id_trasportatore], $imponibile, $iva, $totaliMC[$this->id_trasportatore], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASPORTO);\n $ordine_trasportatore->save();\n\n $imponibile = round($totali[$this->id_traslocatore_partenza]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_partenza] - $imponibile,2);\n\n $ordine_traslocatore_partenza = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_partenza, $totali[$this->id_traslocatore_partenza], $imponibile, $iva, $totaliMC[$this->id_traslocatore_destinazione], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_PARTENZA);\n $ordine_traslocatore_partenza->save();\n\n $imponibile = round($totali[$this->id_traslocatore_destinazione]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_traslocatore_destinazione] - $imponibile,2);\n $ordine_traslocatore_destinazione = new OrdineFornitore($this->id_preventivo, $this->id_traslocatore_destinazione, $totali[$this->id_traslocatore_destinazione], $imponibile, $iva, $totaliMC[$this->id_traslocatore_partenza], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_TRASLOCO_DESTINAZIONE);\n $ordine_traslocatore_destinazione->save();\n\n if ($this->giorni_deposito>10) {\n $imponibile = round($totali[$this->id_depositario]/(1+ Parametri::getIVA()),2);\n $iva = round($totali[$this->id_depositario] - $imponibile,2);\n\n $ordine_depositario = new OrdineFornitore($this->id_preventivo, $this->id_depositario, $totali[$this->id_depositario], $imponibile, $iva, $totaliMC[$this->id_depositario], date('Y-m-d'), OrdineFornitore::TIPO_SERVIZIO_DEPOSITO);\n $ordine_depositario->save();\n }\n\n\n\n $data_ordine = date('Y-m-d');\n $con = DBUtils::getConnection();\n $sql =\"UPDATE preventivi SET tipo=\".OrdineBusiness::TIPO_ORDINE.\" , data='\".$data_ordine.\"' ,\n importo_commessa_trasportatore ='\".$totali[$this->id_trasportatore].\"',\n importo_commessa_traslocatore_partenza ='\".$totali[$this->id_traslocatore_partenza].\"',\n importo_commessa_traslocatore_destinazione ='\".$totali[$this->id_traslocatore_destinazione].\"',\n importo_commessa_depositario ='\".$totali[$this->id_depositario].\"',\n imponibile ='\".$imponibile.\"',\n iva ='\".$iva.\"'\n WHERE id_preventivo=\".$this->id_preventivo;\n\n $res = mysql_query($sql);\n //echo \"\\nSQL: \".$sql;\n DBUtils::closeConnection($con);\n\n return new OrdineCliente($this->id_preventivo);\n }", "title": "" }, { "docid": "321687be10ceacd6681a72dc94a1f9e3", "score": "0.4581609", "text": "public function getComunasPlanes(){\n\t\t$com = $this->_db->query(\"SELECT distinct com.id, com.nombre as comuna FROM planes p INNER JOIN empresas e ON p.empresa_id = e.id INNER JOIN sedes s ON s.empresa_id = e.id INNER JOIN comunas com ON s.comuna_id = com.id WHERE p.status_id = 1 ORDER BY comuna\");\n\n\t\treturn $com->fetchall();\n\t}", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.455982", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.455982", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.455982", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "7b82515ada2d880c28e89ca6bfd3d0c7", "score": "0.455982", "text": "function getOrder()\n {\n return 1;\n }", "title": "" }, { "docid": "5c3b8538ba20907d95dafbafac33f1b0", "score": "0.4559313", "text": "function select($itinerary,$tble,$index){\n\t\t$cart=$this->contents();\n\t\t//print_r($this->CI->session->userdata('tour_cart_contents'));exit;\n\t\tif(isset($cart[$itinerary][$tble][$index])){\n\t\t\treturn $cart[$itinerary][$tble][$index];\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "da8a4517f2abbf890db163394954252c", "score": "0.4551966", "text": "public function getCartera() {\n\n $result = Array(\n \"opc\" => $this->miempresa->getCartera()\n );\n\n $this->output->set_content_type('application/json')->set_output(json_encode($result));\n }", "title": "" }, { "docid": "ef6a0f8ac95be7a60dd33f78928fe79a", "score": "0.45362926", "text": "public function run()\n {\n\n $order1 = new Order();\n $order1->processed = 1;\n $order1->user_id = 4;\n $order1->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:2:{i:10;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:5;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:10;s:5:\"title\";s:17:\"Bear Beer Special\";s:11:\"description\";s:176:\"Special Bear Beer beer. Combines classic sophistication with chic trendsetting.Great at weddings, picnics, and sporting events when it is being compared to domestic light beer.\";s:5:\"price\";s:4:\"2.50\";s:3:\"img\";s:28:\"/storage/images/bearbeer.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:6;a:3:{s:3:\"qty\";i:1;s:5:\"price\";d:2;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:6;s:5:\"title\";s:14:\"Laško Special\";s:11:\"description\";s:334:\"Laško Special combines classic sophistication with chic trendsetting. On the one hand, the designation “traditionally brewed” is about reviving tried and tested names in new versions, and on the other, “new tradition” suggests fresh recipes. History is embodied in a noble red, and the future in an elegant silver neck label.\";s:5:\"price\";s:4:\"2.00\";s:3:\"img\";s:27:\"/storage/images/special.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:3;s:10:\"totalPrice\";d:7;}';\n $order1->save();\n\n $order2 = new Order();\n $order2->processed = 1;\n $order2->user_id = 4;\n $order2->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:2:{i:4;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:2.8999999999999999;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:4;s:5:\"title\";s:16:\"Laško Weißbier\";s:11:\"description\";s:320:\"Laško Weißbier Laško Weißbier was inspired by the freshness of the Alps. This light, unfiltered beer pivo is characterized by haziness, yeast sediment and special harmonious note with mild bitterness. It\"s made with lovers of rich flavored beers in mind and it\"s the perfect refreshment for hanging out with friends.\";s:5:\"price\";s:4:\"1.45\";s:3:\"img\";s:25:\"/storage/images/weiss.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:1;a:3:{s:3:\"qty\";i:4;s:5:\"price\";d:4.3600000000000003;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:1;s:5:\"title\";s:15:\"Laško Zlatorog\";s:11:\"description\";s:985:\"A specific taste which has remained the same over years owing to our unchanged recipe. Full of pride! Zlatorog is a pale lager with a specific flavour, rich head and a characteristic distinct bitterness achieved by using worldwide known Slovenian hop varieties. Incorporating the finest ingredients and the latest technological advances and brewed using our traditional formula which has remained unchanged for decades we can proudly say Zlatorog is a beer that was already enjoyed by our grandparents. Incorporating the finest ingredients and the latest technological advances and brewed using our traditional formula which has remained unchanged for decades we can proudly say Zlatorog is a beer that was already enjoyed by our grandparents. It is the best-selling Laško beer which suggests how nicely it goes down the hatch. In selected bars across Slovenia you can also indulge in a mug of Laško Zlatorog draught beer which gratifies all the senses and provides perfect pleasure.\";s:5:\"price\";s:4:\"1.09\";s:3:\"img\";s:26:\"/storage/images/svetlo.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:6;s:10:\"totalPrice\";d:7.2599999999999998;}';\n $order2->save();\n\n $order3 = new Order();\n $order3->processed = 0;\n $order3->user_id = 5;\n $order3->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:3:{i:9;a:3:{s:3:\"qty\";i:10;s:5:\"price\";d:49.900000000000006;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:9;s:5:\"title\";s:19:\"Desparados Tequilla\";s:11:\"description\";s:163:\"Desperados is a pale lager beer with 5.9% alcohol by volume originally produced by the French brewing company Fischer Brewery, now produced by Karlovačko Brewery.\";s:5:\"price\";s:4:\"4.99\";s:3:\"img\";s:30:\"/storage/images/desparados.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:11;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:1.98;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:11;s:5:\"title\";s:5:\"Chang\";s:11:\"description\";s:446:\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\";s:5:\"price\";s:4:\"0.99\";s:3:\"img\";s:25:\"/storage/images/chang.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}i:10;a:3:{s:3:\"qty\";i:5;s:5:\"price\";d:12.5;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:10;s:5:\"title\";s:17:\"Bear Beer Special\";s:11:\"description\";s:176:\"Special Bear Beer beer. Combines classic sophistication with chic trendsetting.Great at weddings, picnics, and sporting events when it is being compared to domestic light beer.\";s:5:\"price\";s:4:\"2.50\";s:3:\"img\";s:28:\"/storage/images/bearbeer.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:17;s:10:\"totalPrice\";d:64.380000000000024;}';\n $order3->save();\n\n $order4 = new Order();\n $order4->processed = 1;\n $order4->user_id = 5;\n $order4->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:1:{i:3;a:3:{s:3:\"qty\";i:2;s:5:\"price\";d:2.6600000000000001;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:3;s:5:\"title\";s:20:\"Laško Unpasteurized\";s:11:\"description\";s:574:\"Laško Nepasterizirano (Laško Unpasteurized) is an exceptionally drinkable light beer that comes in bottles with a retro hint, and is celebrated for its relaxed character formed by a full taste, a pleasantly fresh, hoppy aroma and the authentic bitterness of the legendary Slovenian beer. Laško Nepasterizirano offers a unique freshness, which is why its shelf life is limited to 12 weeks. It is, in fact, created with the help of a special procedure following the traditional recipe using pure malt. The perfect companion for spontaneous gatherings on hot and sunny days.\";s:5:\"price\";s:4:\"1.33\";s:3:\"img\";s:35:\"/storage/images/nepasterizirano.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:2;s:10:\"totalPrice\";d:2.6600000000000001;}';\n $order4->save();\n\n $order5 = new Order();\n $order5->processed = 0;\n $order5->user_id = 6;\n $order5->cart = 'O:8:\"App\\Cart\":3:{s:5:\"items\";a:1:{i:12;a:3:{s:3:\"qty\";i:24;s:5:\"price\";d:7.9199999999999999;s:4:\"item\";O:8:\"stdClass\":7:{s:2:\"id\";i:12;s:5:\"title\";s:10:\"KingFisher\";s:11:\"description\";s:446:\"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\";s:5:\"price\";s:4:\"0.33\";s:3:\"img\";s:30:\"/storage/images/kingfisher.png\";s:10:\"created_at\";s:19:\"2018-01-07 19:27:47\";s:10:\"updated_at\";s:19:\"2018-01-07 19:27:47\";}}}s:8:\"totalQty\";i:24;s:10:\"totalPrice\";d:7.9200000000000008;}';\n $order5->save();\n\n }", "title": "" }, { "docid": "4414a0b4461645d870c42e00b5f11380", "score": "0.4525872", "text": "public function nuevap5()\n {\n \t$sitios=request('pois');\n $mod=session('mod');\n $consult=DB::select('select poi.id_poi,poi.tiempoestancia,poi.nombre as pn,poi.coordenaday as cy,poi.coordenadax as cx\n from poi where poi.id_poi in('.$sitios.')');\n $poi=explode(\",\",$sitios);\n $cd=[];\n $pois=array();\n $ban=9999999;\n $vmin=[];\n for ($i=0; $i <count($poi); $i++) { \n foreach ($consult as $key) {\n if ($poi[$i]==$key->id_poi) {\n $cd[]=$key->cy.','.$key->cx;\n $this->pn[$key->id_poi]=$key->pn.\" \";\n }\n }\n }\n for($a=0;$a<count($cd);$a++){\n for ($b=0;$b<count($cd);$b++) { \n if ($a==$b) {\n $pois[$a][$b]=-1;\n }else{\n // se arma la tabla de distancias con todos los puntos de interes que pasaron los filtros anteriores\n $data = file_get_contents('https://api.mapbox.com/optimized-trips/v1/mapbox/'.$mod.'/'.$cd[$a].';'.$cd[$b].'?access_token=pk.eyJ1IjoidHVyaXN0cm91dGUiLCJhIjoiY2tuYjY3N2t4MDR5MjJ2cGhyYjFibGc1YSJ9.VhhVvZdDGKvZG75AhvHWsw', null, stream_context_create([\n 'http' => [\n 'header' => [\n 'Connection: close',],],]));\n $data=json_decode($data);\n \n $pois[$a][$b]=$data->trips[0]->distance; \n }\n }\n \n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($i!=$j) {\n if (bccomp($pois[$i][$j],$ban,10)==-1) {\n $min=($pois[$i][$j]);\n $ban=($pois[$i][$j]);\n }\n }\n }\n \n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) {\n if ($i!=$j) {\n $pois[$i][$j]=($pois[$i][$j])-$vmin[$i];\n }\n\n }}\n $vmin=[];\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n if (bccomp($pois[$j][$i],$ban,10)==-1) {\n $min=($pois[$j][$i]);\n $ban=($pois[$j][$i]);\n }\n }\n }\n $vmin[]=$min;\n $ban=99999999;\n }\n for ($i=0; $i <count($pois) ; $i++) { \n for ($j=0; $j <count($pois) ; $j++) { \n if ($j!=$i) {\n $pois[$j][$i]=($pois[$j][$i])-$vmin[$i];\n }\n }\n } \n\n $a=0;\n // Luego de eliminar de la tabla de distancias los caminos mas largos,se envia la matriz al metodo formar_posi\n $this->lista_rutas[] = new route();\n $this->n_poi=count($poi);\n $this->poi=$poi;\n $this->matriz=$pois; \n $this->poi_conectados[] = new Conexion(); \n for($i = 0; $i < count($this->matriz); $i++) {\n $poi_c = new Conexion();\n for ($j = 0; $j < count($this->matriz); $j++) {\n if ($this->matriz[$i][$j]!=\"-1\") { \n $poi_c->setConexiones($j);\n $poi_c->setValor($this->matriz[$i][$j]);\n \n }\n }\n $this->poi_conectados[]=($poi_c);\n \n }\n \n $this->formar_posi($x=Array(),$y=Array(), 0, \"0\");\n //Finalmente envia al recorrido a la siguiente vista\n $result=$this->rutas_aptas();\n return view('guardarr')->with('rt',$result)->with('p',$this->pn);\n\n }", "title": "" }, { "docid": "24daf043eeefb2f9640a882661bfeda6", "score": "0.4524971", "text": "public function getBrutto(){\n $brutto = 0;\n foreach($this->getOrders() as $order){\n $brutto += $order->getCourierCost() + $order->getCourierDiscount();\n }\n return $brutto;\n }", "title": "" }, { "docid": "7f15281257cbe54a05ce2052106f66e4", "score": "0.4520533", "text": "function getCarParkLoc($from_lat, $from_lon){\n // find the closest node_id to ($from_lat, $from_lon) on a way\n global $mysqli;\n $offset = 0.1;\n $sql = \"SELECT node_id, lat, lon, (lat-{$from_lat})*(lat-{$from_lat}) + (lon - {$from_lon})*(lon - {$from_lon}) AS x FROM osm_car_parkings\n ORDER BY x ASC LIMIT 1\";\n $arr = array();\n $result = $mysqli->query($sql);\n while($result && $row = $result->fetch_assoc()){\n $arr[] = array($row['lat'],$row['lon']);\n }\n return $arr[0];\n}", "title": "" }, { "docid": "4f1ae2cab90ab24b53a8dd108c92431f", "score": "0.4517746", "text": "public function getFourthOrderWithOnlyOnePhase()\n {\n $command = $this->getFourthCommand();\n $remainingPhase = null;\n\n foreach ($command->phases as $phase) {\n if($phase->ottp === static::ORDER_4_PHASE_1 ){\n $remainingPhase = $phase;\n }\n }\n $command->phases = [$remainingPhase];\n\n return $command;\n }", "title": "" }, { "docid": "b5a7d56dba14271ff404d8d9fc8d33d8", "score": "0.4516633", "text": "public function consulta_tienda_cart(){\n\n $this->que_dba=\"SELECT * FROM tienda t, inventario i, temp_pedido tp\n\t\t\tWHERE t.cod_tie=i.tienda_cod_tie\n\t\t\tAND i.cod_inv=tp.inventario_cod_inv\n\t\t\tAND tp.usuario_cod_usu='\".$_SESSION['cod_usu'].\"'\n\t\t\tGROUP BY raz_tie;\"; \n\t\t\t \n\t\treturn $this->ejecutar();\n\t}", "title": "" }, { "docid": "9ebbaafeeec5b2b08285cea0186dec26", "score": "0.45157555", "text": "public function abrirFlop()\n {\n $c1 = $this->baralho->getCartaDoTopo();\n $c2 = $this->baralho->getCartaDoTopo();\n $c3 = $this->baralho->getCartaDoTopo();\n array_push($this->cartasDaMesa, $c1, $c2, $c3);\n $this->flop = $this->cartasDaMesa;\n }", "title": "" }, { "docid": "06ed4de07f8e2345d0e3df9d65aba999", "score": "0.45149264", "text": "public function getCarrito()\n {\n return $this->carrito;\n }", "title": "" }, { "docid": "35d928e5c9d795f06b11dfbdd0c8d661", "score": "0.45131758", "text": "function cargar_cuenta_de_costo() {\n $sql = \"SELECT id_plan_contable,cuenta_plan_contable,descripcion_plan_contable,cargar_plan_contable,abonar_plan_contable,transferencia_plan_contable FROM prosic_plan_contable WHERE cuenta_plan_contable LIKE '9%' ORDER BY cuenta_plan_contable\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "title": "" }, { "docid": "fab6306163c96ec2eea75476cac7dfbe", "score": "0.45112208", "text": "protected function getOne() : DrinkInterface\n {\n if ($this->shelfs[$this->current]->count() == 0) {\n $this->current = $this->current - 1;\n }\n $drink = $this->shelfs[$this->current]->shift();\n\n return $drink;\n }", "title": "" }, { "docid": "31928896f7fdb1ff80ffd0eecb11b287", "score": "0.45085385", "text": "function getCart(){\n \treturn $this->myCart->getList();\n }", "title": "" }, { "docid": "66772c47f7307fa54f1883236186adc8", "score": "0.45015416", "text": "function caricastatorelays()\n {\n global $arrRelays;\n $statorele = shell_exec( '/usr/sbin/i2cget -y 1 0x23' );\n if (empty($statorele)) {\n\n die(\"<h1>La multipresa sembra scollegata!</h1>\");\n }\n $relays = zerificabinario( base_convert( $statorele, 16, 2 ) );\n $arrRelays = str_split( $relays );\n return ( $arrRelays );\n }", "title": "" }, { "docid": "36534e479ac58b841b1e33d0b4bef173", "score": "0.4497465", "text": "public function reservarStock(){\n $registrosCarro = $this->obtenerItemsCarro();\n\n //Tengo que crear movimientos por reserva segun el stock disponible y prioridad de las bodegas\n foreach ($registrosCarro as $item) {\n // Obtengo stocks segun orden\n $stocks = ProductosStock::getStockProductos($item->producto_id,$item->categoria_id);\n //Itero y muevo a almacen online\n $cantidad = $item->cantidad;\n foreach ($stocks as $stock) {\n $cantidad = $stock->moverAOnline($cantidad,$this->id_pedido);\n if ($cantidad <= 0)\n break;\n }\n }\n }", "title": "" }, { "docid": "ceefd064294852cc2ea08f59dfde595c", "score": "0.44974095", "text": "public function porCobrar(Request $request) {\n $clienteID = $request->cliente;\n $porCobrar = [];\n $totalNotaDebito = [];\n\n if ($clienteID == 0) {\n\n $porCobrar = PagoNacional::facturasPorPagarTodas($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebito($clienteID);\n\n if ($totalNotaDebito[0]->totalNotaDebito == NULL || $totalNotaDebito[0]->deudaNotaDebito == NULL) {\n\n $porCobrar = PagoNacional::facturasPorPagarTodas($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebitoNull($clienteID);\n }\n }\n\n if ($clienteID) {\n\n $porCobrar = PagoNacional::facturasPorPagar($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebito($clienteID);\n\n\n if ($totalNotaDebito[0]->totalNotaDebito == NULL || $totalNotaDebito[0]->deudaNotaDebito == NULL) {\n $porCobrar = PagoNacional::facturasPorPagar($clienteID);\n $totalNotaDebito = PagoNacional::totalNotaDebitoNull($clienteID);\n\n }\n }\n //Datos de Nota Débito\n $totalND = $totalNotaDebito[0]->totalNotaDebito;\n $totalDeudaND = $totalNotaDebito[0]->deudaNotaDebito;\n //dd($totalND,$totalDeudaND);\n $busqueda = $request;\n $porCobrar = collect($porCobrar);\n $porCobrar->total_cargo = $porCobrar->sum('total') + $totalND;\n $porCobrar->total_abono = $porCobrar->total_cargo - ($porCobrar->sum('deuda') + $totalDeudaND);\n $porCobrar->total = $porCobrar->total_cargo - $porCobrar->total_abono;\n\n $clientes = ClienteNacional::getAllActive();\n\n return view('finanzas.pagosNac.porCobrar')\n ->with([\n 'busqueda' => $busqueda,\n 'clientes' => $clientes,\n 'clienteID' => $clienteID,\n 'pagos' => $porCobrar\n ]);\n }", "title": "" }, { "docid": "650c55c4c0e4260bf253eee96a5b2cb6", "score": "0.4497392", "text": "function startShop(){\n $wiredController = new Controller(20, true);\n $notWiredController = new Controller(30, true);\n \n //First TV / values for price, maxExtras(default 0) infite extras = -1, \n $Television1 = new Television(250.50, \"TV1\", -1);\n\n $Television1Extras = 2;\n\n for($i = 0; $i < $Television1Extras; $i++){\n $Television1->setExtra($notWiredController);\n }\n\n $Television1->totalEletronicPrice();\n\n //Second TV / values for price, maxExtras\n $Television2 = new Television(200.50, \"TV 2\", -1);\n\n $Television2Extras = 1;\n for($i = 0; $i < $Television2Extras; $i++){\n $Television2->setExtra($notWiredController);\n }\n\n $Television2->totalEletronicPrice();\n\n //Console / values for price, maxExtras(default 0)\n $Console1 = new Console(500.50, \"Console\", 4);\n\n //add extra not wired controller\n $Console1Extras = 2;\n for($i = 0; $i < $Console1Extras; $i++){\n $Console1->setExtra($notWiredController);\n }\n\n //add extra wired controller \n $Console1Extras = 3;\n for($i = 0; $i < $Console1Extras; $i++){\n $Console1->setExtra($wiredController);\n }\n\n $Console1->totalEletronicPrice();\n\n //microwave / values for price, maxExtras(default 0)\n $Microwave1 = new microwave(350.80, \"Microwave\");\n\n $Microwave1Extras = 0;\n for($i = 0; $i < $Microwave1Extras; $i++){\n $Microwave1->setExtra($wiredController);\n }\n $Microwave1->totalEletronicPrice();\n\n $EletronicList = array(\n $Television1,\n $Television2,\n $Console1,\n $Microwave1\n );\n\n return $EletronicList;\n}", "title": "" }, { "docid": "b8bac72039e48e1e666b3edbf9270011", "score": "0.44963822", "text": "public function execute()\n {\n $this->slectPrioritis();\n\n Bots::getInstance()->clearNext();\n $ants = Bots::getInstance()->getList();\n foreach ($ants as $ant){\n\n $log = !empty($ant->gol) ? implode(Tools::createCoordinate($ant->gol), ':') : 'НЕТУ';\n// Tools::logger(\"Ant:[\" . implode(Tools::createCoordinate($ant->currentCoord ), ':'). \"] = EDA:$log\");\n $coordinats = Tools::createCoordinate($ant->currentCoord);\n if (empty($ant->gol)){\n// Tools::logger(\"У этого нет цели \" . $ant->currentCoord . \" Ставим ему дефолт\");\n// $ant->gol = $ant->currentCoord;\n// $ant->gol = Tools::createNum(28, 19);\n// $ant->gol = Tools::createNum(10, 67);\n// $ant->gol = Tools::createNum(14, 19);\n }\n// $golCoord = Tools::createCoordinate($ant->gol);\n// $dir = $this->createDirection($coordinats, $golCoord);\n// $dir = Tools::createDirection($coordinats, $golCoord);\n $dirArray = Tools::createDirection($ant);\n// Tools::logger(\"GO TO ВЫБОР ИЗ : \" . implode(':',$dirArray));\n $dir = Bots::getInstance()->selectMove($ant, $dirArray);\n// Bots::getInstance()->addNext($ant, $dir);\n// Tools::logger(\"GO TO ВЫБРАЛ $dir\");\n// Tools::logger(\"GO TO Этот выбрал - > \" . print_r($coordinats,true));\n\n $nextCoordinat = Tools::nextStep($ant->coordinatColRow['col'], $ant->coordinatColRow['row'], $dir);\n $nextNum = Tools::createNum($nextCoordinat['row'], $nextCoordinat['col']);\n \n Steamer::issueOrder($coordinats['row'], $coordinats['col'], $dir);\n// break;\n }\n\n }", "title": "" }, { "docid": "303f89ff75e07f44e5c5eff211c43268", "score": "0.44955155", "text": "public function getSshop()\n {\n return $this->get(self::_SSHOP);\n }", "title": "" }, { "docid": "303f89ff75e07f44e5c5eff211c43268", "score": "0.44955155", "text": "public function getSshop()\n {\n return $this->get(self::_SSHOP);\n }", "title": "" }, { "docid": "303f89ff75e07f44e5c5eff211c43268", "score": "0.44955155", "text": "public function getSshop()\n {\n return $this->get(self::_SSHOP);\n }", "title": "" }, { "docid": "6c4c4d0222d3e592a6182dc57183ef84", "score": "0.44866458", "text": "function select($tble,$index){\n\t\t$cart=$this->contents();\n\t\t//echo '<pre>';print_r($cart);echo '</pre>';exit;\n\t\tif(isset($cart[$tble][$index])){\n\t\t\treturn $cart[$tble][$index];\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "8d04491376821c6130234b88c513ea0c", "score": "0.44856223", "text": "public function getOneOfStock()\n {\n if ($this->stock[0]) {\n $dominoTile = $this->stock[0];\n unset($this->stock[0]);\n $newStock = array_values($this->stock);\n $this->stock = $newStock;\n\n return $dominoTile;\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "8475aa1826f303c8faf1ae77f3149a9f", "score": "0.44810534", "text": "public function retornaQuantPorTurma() {\n $sql = \"select aluno.turma_id, turma.nome, COUNT(aluno.turma_id) AS Qtd from turma inner join aluno on turma.id = aluno.turma_id \n GROUP BY aluno.turma_id, turma.nome HAVING COUNT(aluno.turma_id) > 0 ORDER BY COUNT(aluno.turma_id) ASC\";\n $insert = $this->conexao->query($sql);\n $array = array();\n foreach ($insert as $aluno) {\n array_push($array, $aluno);\n }\n return $array;\n }", "title": "" }, { "docid": "aa56cb4913e5697f05ea398f7f263a86", "score": "0.4472736", "text": "function printCart(){\n\t\tprint_r($this->articulos);\n\t}", "title": "" }, { "docid": "33f49134a0368c668d554d59596ee85e", "score": "0.4466468", "text": "public function costo_bancos($proceso) {\n\n $sql = \"SELECT * from bancos where status = 'A' and nombre like '%\" . $proceso . \"%' limit 1\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }", "title": "" }, { "docid": "3585a9f0e5d1ebeaecc3283b264da34e", "score": "0.44662747", "text": "function poco_cart_link() {\n ?>\n <a class=\"cart-contents\" href=\"<?php echo esc_url(wc_get_cart_url()); ?>\" title=\"<?php esc_attr_e('View your shopping cart', 'poco'); ?>\">\n <?php /* translators: %d: number of items in cart */ ?>\n <span class=\"count\"><?php echo wp_kses_data(sprintf(_n('%d', '%d', WC()->cart->get_cart_contents_count(), 'poco'), WC()->cart->get_cart_contents_count())); ?></span>\n <?php echo WC()->cart->get_cart_subtotal(); ?>\n </a>\n <?php\n }", "title": "" }, { "docid": "c0189bb218312d226c532feb1e477779", "score": "0.4463714", "text": "function consolidatePath2($path, $type) {\n $cpath = array();\n /*\n What are the conditions that determine a transfer?\n 1. If the connection type is different (express -> local)\n 2. If the train in the next segment is different and the original one is not available\n 3. if the connection type is transfer\n */\n // debugging\n $debug = true;\n $path_array = $path->path;\n $count = count($path_array);\n // this is a direction path and there is only one or two paths.\n // that means it either goes from loc->station->loc or just loc->loc\n if ($type == \"dir\" && $count <= 2) {\n return \"walk\";\n }\n //set up the first segment\n $segment = $path_array[0];\n if ($type == \"s2s\") {\n $i = 1; \n }\n else {\n $cpath[] = $segment;\n $segment = $path_array[1];\n $i = 2;\n }\n $marker1 = $segment->m1;\n $current_lines = $segment->m1->getOverlapLines($segment->m2);\n $connection = $segment->connection;\n $total_time = $segment->t;\n $segment2 = $path_array[$i+1];\n // loop through the path, starting at the next segment.\n for (; $i < $count; $i++) {\n // grab the segment\n $segment2 = $path_array[$i];\n \n if ($debug) {\n echo \"@\" . $segment2->m1->name . \"<br/>\";\n echo \"lines = \";\n foreach($current_lines as $line) {\n echo $line->name . \" \";\n }\n echo \"<br/>\";\n }\n \n if ($connection == \"transfer\") {\n // we know this segment is a transfer, so they will have to get off the train\n echo \"transfer<br/>\";\n \n // end the segment\n $new_segment = new Segment($marker1, $segment2->m1, $current_lines, $total_time, $connection);\n if ($debug) {\n echo \"segment = \" . $new_segment->toString() . \"<br/>\";\n }\n $cpath[] = $new_segment;\n \n // add the transfer segment\n // we need to get the transfer lines\n $lines = $segment2->m1->getOverlapLines($segment2->m2);\n $lines = getCorrectLines($lines, $segment2->connection);\n // create new segment\n $new_segment = new Segment($segment2->m1, $segment2->m2, $lines, $segment2->t, $segment2->connection);\n $cpath[] = $new_segment;\n \n // increment if we need to\n if ($i < $count) {\n // increment\n $i++;\n $segment = $path_array[$i];\n $marker1 = $segment->m1;\n $current_lines = $segment->m1->getOverlapLines($segment->m2);\n $connection = $segment->connection;\n $total_time = $segment->t;\n if ($i < $count) {\n // more segments available\n continue;\n }\n // we end here with this segment\n $new_segment = new Segment($segment->m1, $segment->m2, $current_lines, $total_time, $connection);\n $cpath[] = $new_segment;\n return $cpath;\n }\n }\n else if ($connection != $segment2->connection) {\n // the connection types are different, but trains can shift from express to local and vice versa.\n if ($debug) {\n echo \"old conn: \" . $connection . \" | new conn: \" . $segment2->connection . \"<br/>\";\n }\n // do we have the same train available?\n if (sameTrain($current_lines, $segment2)) {\n // it's the same train, so we just update our lines and continue\n $current_lines = updateLines($segment, $current_lines);\n $total_time += $segment2->t;\n $connection = $segment2->connection;\n continue;\n }\n // different trains, so we need to transfer\n \n // end the old segment and add to the path\n $new_segment = new Segment($marker1, $segment2->m1, $current_lines, $total_time, $connection);\n if ($debug) {\n echo \"new_segment = \" . $new_segment->toString() . \"<br/>\";\n }\n $cpath[] = $new_segment;\n \n // reset our variables for the next segment\n $segment = $segment2;\n $marker1 = $segment2->m1;\n $current_lines = $segment2->m1->getOverlapLines($segment2->m2);\n $connection = $segment2->connection;\n $total_time = $segment2->t;\n continue;\n }\n else if (!sameTrain($current_lines, $segment2)) {\n // different trains, so we need to transfer\n if ($debug) {\n echo \"old lines: \";\n foreach($current_lines as $line) {\n echo $line->name . \" \";\n }\n echo \"<br/>\";\n echo \"new line: \" . $segment2->lines[0]->name . \"<br/>\";\n } \n // end the old segment and add to the path\n $new_segment = new Segment($marker1, $segment2->m1, $current_lines, $total_time, $connection);\n if ($debug) {\n echo \"new_segment = \" . $new_segment->toString() . \"<br/>\";\n }\n $cpath[] = $new_segment;\n \n // reset our variables for the next segment\n $segment = $segment2;\n $marker1 = $segment2->m1;\n $current_lines = $segment2->m1->getOverlapLines($segment2->m2);\n $connection = $segment2->connection;\n $total_time = $segment2->t;\n continue;\n }\n // otherwise, we keep going and merge the segments\n $current_lines = linesIntersect($current_lines, $segment2->m1->getOverlapLines($segment2->m2));\n if ($debug) {\n echo \"# current_lines after intersect: \" . count($current_lines) . \"<br/>\"; \n foreach($current_lines as $line) {\n echo $line->name . \" \";\n }\n echo \"<br/>\";\n }\n $current_lines = getCorrectLines($current_lines, $connection);\n if ($debug) {\n echo \"# current_lines after correction: \" . count($current_lines) . \"<br/>\"; \n foreach($current_lines as $line) {\n echo $line->name . \" \";\n }\n echo \"<br/>\";\n }\n $connection = $segment2->connection;\n $total_time = $segment2->t;\n } // for\n // add the last segment\n $new_segment = new Segment($marker1, $segment2->m2, $current_lines, $total_time, $connection);\n $cpath[] = $new_segment; \n return $cpath;\n}", "title": "" }, { "docid": "39c83e9069beef125a390ed59541f0b2", "score": "0.4463063", "text": "public function returnCart() {\n return $this->cart_id;\n }", "title": "" }, { "docid": "b7a2de250433ab5e5d97f8c620e3e656", "score": "0.4457519", "text": "public function getShipcom()\n {\n return $this->shipcom;\n }", "title": "" }, { "docid": "2cbf828ff99c14424c6b664fd090b40d", "score": "0.44560042", "text": "public function StampaCarrello() {\n\t\t$somma=0;\n\t\tif (count($this->contenuto) > 0) \n\t\t{ ?>\n\n\t\t\t<table>\n\t\t\t\t<tbody>\n\t\t\t\t\t<?\n\t\t\t\t\t?><tr >\n\t\t\t\t\t\t\t<th>Prodotto</th>\n\t\t\t\t\t\t\t<th>Quantità</th>\n\t\t\t\t\t\t</tr><?\n\n\t\t\t\t\t\tfor ($i=0;$i<count($this->contenuto);$i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td><?= $this->contenuto[$i]->getNome() ;?></br> \n\t\t\t\t\t\t\t\t<td><?= $this->quantita[$i] ,' Kg';?></br> <?\n\t\t\t\t\t\t\t\t$somma=$somma+($this->contenuto[$i]->getPrezzo()*$this->quantita[$i]);?></br> \n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t?>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<p> Totale:<?=$somma, ' Euro' ?></p>\n\t\t\t<form method=\"post\" action=\"index.php?page=utente&subpage=home&somma=<?= $somma ?>\">\n\t\t\t\t\t\t<input type=\"hidden\" name=\"cmd\" value=\"completaOrdine\"/>\n\t\t\t\t\t\t<label for=\"date\">Inserisci la data di consegna</label>\n\t\t\t\t\t\t<input type=\"date\" name=\"date\" value=\"2000-01-01\"/>\n\t\t\t\t\t\t<button type=\"submit\">Conferma ordine </button>\n \t\t\t</form>\n\n\t<?php } \n\telse \n\t\t{ \n\t\t\t?><p class=\"messaggio\"> Nessun prodotto inserito </p><?\n\t\t} \n\t}", "title": "" }, { "docid": "ab54e221790f25112953cc41a04a9f95", "score": "0.44550413", "text": "public function get_cargos($centro_costo){\n\t\t\t\n\t\t\t\n\t\t\ttry { \n\t\t\t\tglobal $conn;\n\t\t\t\t$sql=\"SELECT distinct c.cod_car, C.NOM_CAR \n\t\t\t\t\t FROM CARGOS C, CENTROCOSTO2 AREA, EMPLEADOS_BASIC EPL\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t EPL.COD_CC2='\".$centro_costo.\"'\n\t\t\t\t\t\tAND EPL.COD_CAR=C.COD_CAR\n\t\t\t\t\t\torder by nom_car asc\n\t\t\t\t\t\t\";\n\t\t\t\t\t\t\n\t\t\t\t$rs=$conn->Execute($sql);\n\t\t\t\twhile($fila=$rs->FetchRow()){\n\t\t\t\t\t$this->lista[]=array(\"codigo\" => $fila[\"cod_car\"],\n\t\t\t\t\t\t\t\t\t\t \"cargos\"=> utf8_encode($fila[\"NOM_CAR\"]));\n\t\t\t\t}\n\t\t\t\n\t\t\t\treturn $this->lista;\n\t\t\t\t\n\t\t\t}catch (exception $e) { \n\n\t\t\t var_dump($e); \n\n\t\t\t adodb_backtrace($e->gettrace());\n\n\t\t\t} \n\t\t\n\t\t}", "title": "" }, { "docid": "6606ab1ea8f5ae90699b204d4e407d29", "score": "0.44513303", "text": "public function costo_offset($proceso) {\n\n $sql = \"SELECT * from proc_offset where status = 'A' and nombre = '\" . $proceso . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }", "title": "" }, { "docid": "ced980611c995712853d61b32f571ef8", "score": "0.44487494", "text": "public function costo()\n {\n return '$' . (string) number_format($this->costo, 2);\n }", "title": "" }, { "docid": "55515673949586e5a9c2a5d575e91223", "score": "0.44448015", "text": "function leer_prov_serv_cost($idproveedor,$idservicio){\n\t\t$sql=\"\n\t\tSELECT\n\t\t\t*\n\t\tFROM\n\t\t$this->catalogo.catalogo_proveedor_servicio_costo_negociado\n\t\tWHERE\n\t\t\tIDPROVEEDOR='$idproveedor'\n\t\t\tAND IDSERVICIO='$idservicio'\n\t\t\";\n\n\t\t$result= $this->query($sql);\n\t\twhile ($reg=$result->fetch_object()){\n\t\t\t$this->costos[$reg->IDCOSTO] = array(\n\t\t\t'MONTOLOCAL'=>$reg->MONTOLOCAL,\n\t\t\t'MONTOINTERMEDIO'=>$reg->MONTOINTERMEDIO,\n\t\t\t'MONTOFORANEO'=>$reg->MONTOFORANEO,\n\t\t\t'PLUSNOCTURNO'=>$reg->PLUSNOCTURNO,\n\t\t\t'PLUSFESTIVO'=>$reg->PLUSFESTIVO,\n\t\t\t'UNIDAD'=>$reg->UNIDAD,\n\t\t\t'IDMEDIDA'=>$reg->IDMEDIDA);\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "80120eeebd123ce239ac52851ec9f659", "score": "0.44414127", "text": "function get_initial_inventory() {\n return [\n 'A' => 2,\n 'B' => 3,\n 'C' => 1,\n 'D' => 0,\n 'E' => 0\n ];\n}", "title": "" }, { "docid": "fffc1fdfa6496fd59c6ecfb0c77c6463", "score": "0.4441057", "text": "function getOrder()\n {\n return 7;\n }", "title": "" }, { "docid": "fffc1fdfa6496fd59c6ecfb0c77c6463", "score": "0.4441057", "text": "function getOrder()\n {\n return 7;\n }", "title": "" }, { "docid": "c6d8e534011506ebf4343f49bf744169", "score": "0.44377148", "text": "protected function armaColeccionZpCarac() {\n $arrayRet = array();\n $dao = new PGDAO();\n $where = $this->strZpTprop();\n if ($where != '') {\n $arrayRet = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARAC . \" where tipoprop in (\" . $where . \")\"));\n } else {\n $arrayRet = $this->leeDBArray($dao->execSql($this->COLECCIONZPCARAC));\n }\n return $arrayRet;\n }", "title": "" }, { "docid": "3e4ab6f9b696cfcdfb4a893f07b926da", "score": "0.44369906", "text": "function Cart() {\n\t\t$order = self::get_current_order();\n\t\t$order->Items();\n\t\t$order->Total;\n\n\t\t//HTTP::set_cache_age(0);\n\t\treturn $order;\n\t}", "title": "" }, { "docid": "fdff06328f6ef820c308bf7fbd0f8766", "score": "0.4436759", "text": "function get_inventory_onhand($pcservno){\n\t$oConn = get_coneccion(\"CIA\");\n\t$lcsqlcmd = \"SELECT aradjt.cservno,\n\t\t\t\t\t sum(aradjt.nqty) as nqty\n\t\t\t\t FROM aradjm\n\t\t\t\t left outer join aradjt on aradjm.cadjno = aradjt.cadjno\n\t\t\t\t left outer join arserm on arserm.cservno = aradjt.cservno\n\t\t\t\t left outer join arcate on arcate.ccateno = aradjm.ccateno AND arcate.ctypecate = 'A'\n\t\t\t\t where arserm.lupdateonhand = true AND \n\t\t\t\t \t aradjm.lvoid = false and \n\t\t\t\t\t aradjt.cservno = '$pcservno' \n\t\t\t\t group by 1\n\t\t\t\t union all \n\t\t\t\t SELECT arinvt.cservno,\n\t\t\t\t\t\tsum(arinvt.nqty * -1) as nqty\n\t\t\t\tFROM arinvc\n\t\t\t\tLEFT OUTER JOIN arinvt on arinvc.cinvno = arinvt.cinvno\n\t\t\t\tLEFT OUTER JOIN arserm on arserm.cservno = arinvt.cservno\n\t\t\t\tleft outer join artcas on artcas.cpaycode = arinvc.cpaycode\n\t\t\t\twhere arserm.lupdateonhand = true and\n\t\t\t\t\t arinvc.lvoid = false and \n\t\t\t\t\t arinvt.cservno = '$pcservno' \n\t\t\t\tgroup by 1\n\t\t\t\";\t\n\t// determinando cuanto producto queda segun el caso \n\t$lnqty = 0;\n\t$lcresult = mysqli_query($oConn,$lcsqlcmd);\n\twhile($lnrowqty = mysqli_fetch_assoc($lcresult)){\n\t\t$lnqty += $lnrowqty[\"nqty\"];\t\n\t}\n\techo $lnqty;\n\t\n\t/*\t\n\t$lcResult = mysqli_query($oConn,$lcsqlcmd); // $oConn->query($lcSqlCmd);\n\t// convirtiendo estos datos en un array asociativo\n\t$ldata = mysqli_fetch_assoc($lcResult);\n\t// convirtiendo este array en archivo jason.\n\t$jsondata =json_encode($ldata,true);\n\t// retornando objeto json\n\techo $jsondata;\n\t*/\n}", "title": "" }, { "docid": "ce4bdb2986001b339ef86c09d527c1f7", "score": "0.443547", "text": "function getPackage($cart) {\n $array = [];\n\n for ($i = 0; $i < sizeof($cart['items']); $i++) {\n $cartItem = $cart['items'][$i];\n unset($cartItem['_id']);\n\n array_push($array, $cartItem);\n }\n\n return $array;\n}", "title": "" }, { "docid": "d5a45e074cd54dc4e15c0d7dd539aec3", "score": "0.44291386", "text": "public function NuevoCapacidad() {\r\n\t$nuevo = \"SELECT co_capacidad FROM tr012_capacidad\r\n\t\tORDER BY co_capacidad DESC \r\n\t\tLIMIT 1;\";\r\n\t$c = $this->pdo->_query($nuevo);\r\n\t\r\n\t//if(is_object($this->pdo->monitor) && $this->pdo->monitor->notify_select)\r\n\t\t//$this->popNotify(); // Libera posicion reg_padre\r\n\t\t\t\r\n\treturn $c;\r\n }", "title": "" }, { "docid": "b3661e8e39e5d69cdc7fd0b607107b6d", "score": "0.44274932", "text": "function getOrder()\n {\n return 20;\n }", "title": "" }, { "docid": "b3661e8e39e5d69cdc7fd0b607107b6d", "score": "0.44274932", "text": "function getOrder()\n {\n return 20;\n }", "title": "" }, { "docid": "5ff843c4dbe5d10c7915b29f8e6f9b02", "score": "0.44249886", "text": "function getOrder()\n {\n return 3;\n }", "title": "" }, { "docid": "262d8f070b2a2e1cd40ee56cc7181d0c", "score": "0.442016", "text": "public function getOrderCart( $map ) {\r\n\t\t \t$params = array('a.session_cookie'=>$map['session_cookie']);\r\n\t\t \t$this->db->select('a.itemid,a.option_id,a.quantity,a.size', FALSE)\r\n\t\t \t\t\t ->from(TABLES::$ORDER_CART.' AS a')\r\n\t\t \t\t\t ->where($params);\r\n\t\t \t\t\t //->order_by('c.name','asc');\r\n\t\t \t$query = $this->db->get();\r\n\t\t \t//echo $this->db->last_query();\r\n\t\t\t$result = $query->result_array();\r\n\t\t\treturn $result;\r\n\t\t}", "title": "" }, { "docid": "50ac58593c994b32674975ac07737290", "score": "0.4419916", "text": "public function obterCor($nome){\n $cores = Mage::getModel('cores/cores')->getCollection();\n $cor = $cores->addFieldToFilter('nome', $nome)->getFirstItem();\n\n if($cor->getImagem()){\n return $cor->getImagem();\n }else{\n return $cor->getCor();\n }\n }", "title": "" }, { "docid": "83439f94ece45468ddd3b6765cac43fe", "score": "0.44134316", "text": "public function darCostos(){\n\t\t/*variables: int $valor, float $costo*/\n\t\t$valor = parent::darCostos();\n\t\t$costo = $valor + ($valor * $this->getPorcentajeIncremento()); //45% incremento \n\t\treturn $costo;\n\t}", "title": "" }, { "docid": "d559c242891cbe375639e1149986a69a", "score": "0.44128662", "text": "public function rebobinar() {\n\t\treturn $this->irA(0);\n\t}", "title": "" }, { "docid": "cb17a658db1298ccf22f442f86b28f12", "score": "0.44094315", "text": "public function getDestinosCh(){\n \n $destinos = array();\n \n $em = $this->getDoctrine()->getEntityManager();\n\n $result = $em->getRepository('uesperaBundle:Destino')->findAll();\n \n foreach ($result as $dest){\n $destinos[ $dest->getNomdestino() ] = $dest->getNomdestino();\n }\n \n return $destinos;\n \n }", "title": "" }, { "docid": "d6fe86ba96180deaf804ac1df2a57634", "score": "0.44079763", "text": "public function getNbrShipByType()\n {\n\t\t$array = array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);\n\t\tforeach ($this->armyInBegin as $squadron) {\n\t\t\tfor ($i = 0; $i < 12; $i++) {\n\t\t\t\t$array[$i] += $squadron[$i];\n\t\t\t}\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "66600dd44a19686e793ea5cf63289c27", "score": "0.43965596", "text": "public function get_routes($punto1, $punto2, &$routes, &$route = array()){\r\n \r\n $origin_connections = $this->connections[$punto1];\r\n \r\n foreach ($origin_connections as $city => $cost) {\r\n \r\n if(!in_array($city , $this->ruta) && $cost > 0){\r\n $this->ruta[] = $city;\r\n if($city == $punto2){\r\n $routes[] = $this->ruta;\r\n array_splice($this->ruta, array_search($city, $this->ruta ));\r\n }else{\r\n $this->get_routes($city, $punto2, $routes, $route);\r\n }\r\n }\r\n }\r\n array_splice($this->ruta, count($this->ruta)-1);\r\n\r\n }", "title": "" }, { "docid": "0f50f4229d4e7a1d5e958e9b495116f0", "score": "0.43955654", "text": "function nbProduit(){\n\t$nombre = 0; \n\t\n\tif(isset($_SESSION['panier']['quantite'])){\n\t\tfor($i=0; $i < count($_SESSION['panier']['quantite']); $i++){\n\t\t// On tourne autant de fois qu'il y a de références dans le panier (nombre de ligne dans le petit tableau des quantités)\n\t\t\t$nombre += $_SESSION['panier']['quantite'][$i];\n\t\t}\n\t}\n\t\n\treturn $nombre;\n}", "title": "" }, { "docid": "d3c3c277dfdc3fb303d1f244edfe13f9", "score": "0.43936518", "text": "function SelecionarProdutosMeuCarrinho(){\r\n if ($this->nCdPedidoCompra != 0){\r\n $sSql = \"SELECT i.cdItemPedidoCompra,i.tipo_produto,i.quantidade,i.valor_unitario,i.valor_total,\";\r\n $sSql .= \" c.nome AS 'nome_produto',c.valor,c.desconto,c.descricao,\";\r\n $sSql .= \" s.nome AS 'nome_sub_grupo',\";\r\n $sSql .= \" g.nome AS 'nome_grupo'\";\r\n $sSql .= \" FROM item_pedido_compra i\";\r\n $sSql .= \" JOIN camiseta c ON i.cdFkProduto = c.cdCamiseta\";\r\n $sSql .= \" JOIN sub_grupo s ON c.cdFkSubGrupo = s.cdSubGrupo\";\r\n $sSql .= \" JOIN grupo g ON s.cdFkGrupo = g.cdGrupo\";\r\n $sSql .= \" WHERE i.cdFkPedidoCompra = '\".$this->nCdPedidoCompra.\"'\";\r\n $sSql .= \" AND status = 'aberto'\";\r\n $this->oDadosMeuCarrinho = $this->Fbd->PesquisarSQL($sSql);\r\n }\r\n }", "title": "" }, { "docid": "8ae99a7744222c3e4529d3b9f88a3d97", "score": "0.43806025", "text": "function arrayTurnosCola (){\n\t\t$host = \"localhost\";\n\t\t$usuario = \"root\";\n\t\t$password = \"\";\n\t\t$BaseDatos = \"pide_turno\";\n\n $link=mysql_connect($host,$usuario,$password);\n\n\t\tmysql_select_db($BaseDatos,$link);\n\n\t\t$consultaSQL= \"SELECT estado_programas.programa, estado_programas.Comentarios, estado_programas.turnos_atendidos, estado_programas.codigo, estado_programas.turnos_manana, estado_programas.turnos_tarde, estado_programas.segundos_espera, estado_programas.estado FROM estado_programas GROUP BY estado_programas.programa\";\n\t\t$retorno =\"\";\n\t\tmysql_query(\"SET NAMES utf8\");\n\t\t$result = mysql_query($consultaSQL);\n\t\tfor($i=0;$fila= mysql_fetch_assoc($result); $i++) {\n\t\t\tfor($a= 0;$a<mysql_num_fields($result);$a++){\n\t\t\t\t$campo = mysql_field_name($result,$a);\n\t\t\t\t$retorno[$i][$campo] = $fila[$campo];\n\t\t\t}\n\t\t};\n\t\tmysql_close($link);\n\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "b62ba409a06295ac57944777a5ad0bad", "score": "0.4374227", "text": "private function _getMCScaricoSalita()\n {\n $mc = 0;\n foreach ($this->lista_arredi as $arredo)\n {\n $mc+=$arredo->getMCScaricoSalita();\n }\n //TODO arrotondamento\n return $mc;\n }", "title": "" }, { "docid": "762c0c5fbca67d69d4479986ff3e7d4e", "score": "0.43687433", "text": "public function costo_laser($proceso) {\n\n $sql = \"SELECT * from proc_corte_laser where status = 'A' and nombre = '\" . $proceso . \"'\";\n\n $query = $this->db->prepare($sql);\n $query->execute();\n\n $result = array();\n\n while ($row = $query->fetch(PDO::FETCH_ASSOC)) {\n\n $result[] = $row;\n }\n\n return $result;\n }", "title": "" }, { "docid": "10c4e7a612307c58b3b1add397c3fb3a", "score": "0.43685967", "text": "public function getOrder(): int\n {\n return 6;\n }", "title": "" }, { "docid": "d44b412b25cbde8e8c4aea7aee660054", "score": "0.4367624", "text": "public function getActiveCart();", "title": "" }, { "docid": "ca234614a239881ba6335606f4a661e9", "score": "0.43667087", "text": "private function buildFirstLastBoarding()\n {\n $hasPreviousBoarding = false;\n $isLastBoarding = true;\n\n for ($i = 0, $size = count($this->boardings); $i < $size ; $i++) {\n // Lookup for the arrival city and the departure city\n foreach ($this->boardings as $trip) {\n // If current trip departure is another's trip arrival, so we have a previous trip\n if (strcasecmp($this->boardings[$i]['Departure'], $trip['Arrival']) == 0) {\n $hasPreviousBoarding = true;\n } elseif (strcasecmp($this->boardings[$i]['Arrival'], $trip['Departure']) == 0) {\n // If current trip's arrival is another trip departure, then it is not the last trip\n $isLastBoarding = false;\n }\n }\n\n if (!$hasPreviousBoarding) {\n // Its first trip, so should be a first element\n array_unshift($this->boardings, $this->boardings[$i]);\n unset($this->boardings[$i]);\n } elseif ($isLastBoarding) {\n // Lat element pushed to the end\n array_push($this->boardings, $this->boardings[$i]);\n unset($this->boardings[$i]);\n }\n }\n\n // We regenerate indexes\n $this->boardings = array_merge($this->boardings);\n }", "title": "" }, { "docid": "17ce879734793b0f9443627ce03847b5", "score": "0.43650675", "text": "function getNumberItem()\n{\n\t$numberItems = \\Cart::instance('shopping')->count(false);\n\n return $numberItems;\n}", "title": "" }, { "docid": "2c7e77d9922bdfedc3888b4a1d56eb64", "score": "0.436458", "text": "function genera_giocatore($max_num){\n $db_basket =[];\n for ($i=0; $i < $max_num; $i++) {\n $db_basket[] = stat_player();\n }\n return $db_basket;\n}", "title": "" }, { "docid": "b342b77c6e354ca91acc20f95d446226", "score": "0.43618667", "text": "function getOrder()\n {\n return 50;\n }", "title": "" }, { "docid": "f9398c3614a631b4187b167aba20f75c", "score": "0.43609825", "text": "public function getPlatoxRestaurant($idplato) {\n $adapter = $this->tableGateway->getAdapter();\n $sql = new Sql($adapter);\n $selecttot = $sql->select()\n ->from('ta_plato')\n ->columns(array('*', 'num' => new \\Zend\\Db\\Sql\\Expression('COUNT(tc.in_id)')))\n ->join('ta_tipo_plato', 'ta_plato.ta_tipo_plato_in_id=ta_tipo_plato.in_id ', array('tipo_plato_nombre' => 'va_nombre'), 'left')\n ->join(array('pl' => 'ta_plato_has_ta_local'), 'pl.ta_plato_in_id = ta_plato.in_id', array(), 'left')\n ->join(array('tl' => 'ta_local'), 'tl.in_id = pl.ta_local_in_id', array('va_horario_opcional','de_latitud','va_email', 'de_longitud', 'va_direccion', 'va_horario', 'va_dia', 'va_telefono','va_direccion_referencia'), 'left')\n ->join(array('tr' => 'ta_restaurante'), 'tr.in_id = tl.ta_restaurante_in_id', array('restaurant_id' => 'in_id', 'restaurant_nombre' => 'va_nombre', 'restaurant_img' => 'va_imagen','web'=>'va_web'), 'left')\n ->join(array('ttc' => 'ta_tipo_comida'), 'ttc.in_id=tr.ta_tipo_comida_in_id', array('tipo_comida'=>'va_nombre_tipo'), 'left') \n ->join(array('tu' => 'ta_ubigeo'), 'tu.in_id = tl.ta_ubigeo_in_id', array('pais' => 'ch_pais', 'departamento' => 'ch_departamento', 'provincia' => 'ch_provincia', 'distrito' => 'ch_distrito'), 'left')\n ->join(array('tc' => 'ta_comentario'), 'tc.ta_plato_in_id=ta_plato.in_id', array('estado_comen'=>'en_estado'), 'left')\n// ->join(array('tcli'=>'ta_cliente'),'tcli.in_id=tc.ta_cliente_in_id',array('va_nombre_cliente','va_email'),'left')\n ->where(array('ta_plato.in_id' => $idplato,'ta_plato.en_estado' =>'activo','tr.en_estado'=>'activo'));//'tc.en_estado'=>'aprobado'\n $selecttot->group('ta_plato.in_id');\n\n $selectString = $sql->getSqlStringForSqlObject($selecttot);\n $results = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);\n\n return $results; //->toArray();\n }", "title": "" }, { "docid": "4cca7fa9658a3bda4436798edcbc1143", "score": "0.4360899", "text": "function getCartTotal(){\n\t\t$totalCost = 0;\n\t\t$cartInfo = $this->getCart();\n\t\t$cartInfoSize = sizeof($cartInfo);\n\t\t$cartInfoSize--;\n\t\tfor($i=0; $i<=$cartInfoSize; $i++) {\n\t\t\t$totalCost = $totalCost + $cartInfo[$i][\"price\"];\n\t\t}\n\n\t\treturn $totalCost;\t\n\t}", "title": "" }, { "docid": "54054436dc10f8dbfcff8234a9ed4c6f", "score": "0.43578044", "text": "function get_other_buses($stopcode)\n{\n\n\t$url = \"http://api.bus.southampton.ac.uk/stop/\" . $stopcode . \"/buses\";\n\t$data = json_decode(file_get_contents($url), true);\n\t$ret = array();\n\tforeach($data as $item)\n\t{\n\t\t$operator = preg_replace(\"#^([^/]+)/.*$#\", \"$1\", $item['id']);\n\t\tif(strcmp($operator, \"BLUS\") == 0) { continue; }\n\t\tif(strcmp($operator, \"UNIL\") == 0) { continue; }\n\n\t\t$bus = array();\n\t\t$bus['name'] = $item['name'];\n\t\t$bus['dest'] = $item['dest'];\n\t\t$bus['date'] = $item['date'];\n\t\t$bus['time'] = date(\"H:i\", $item['date']);\n\t\t$bus['journey'] = $item['journey'];\n\t\t$ret[] = $bus;\n\t}\n\treturn($ret);\n}", "title": "" }, { "docid": "f49dadd04f33014cb8ff8f50a65d6659", "score": "0.43574145", "text": "public function nuevap6()\n {\n $sitios=request('indice');\n $consult=DB::select('select poi.id_poi,poi.tiempoestancia,poi.nombre as pn,poi.coordenaday as cy,poi.coordenadax as cx,imagen as img,costo\n from poi where poi.id_poi in('.$sitios.')'\n );\n $mod=session('mod');\n $poi=explode(\",\",$sitios);\n $sum=0;\n $time=0;\n $poi_anterior;\n $poi_actual;\n $cd;\n $tiempo;\n $nombres;\n $costo=0;\n foreach ($consult as $key) {\n $cd[$key->id_poi]=$key->cy.','.$key->cx;\n $tiempo[$key->id_poi]=$key->tiempoestancia;\n $nombres[$key->id_poi]=array('nombre'=>$key->pn,'img'=>$key->img);\n $costo=$costo+(int)$key->costo;\n }\n $band=0;\n foreach ($poi as $key => $value) {\n\n if ($band==0) {\n $poi_anterior=$cd[$value];\n $band=1;\n }else{\n \n $poi_actual=$cd[$value];\n //El tiempo y las distancias son obtenidos enviando las coordenadas a la api de mapbos\n $data = file_get_contents('https://api.mapbox.com/optimized-trips/v1/mapbox/'.$mod.'/'.$poi_anterior.';'.$poi_actual.'?access_token=pk.eyJ1IjoidHVyaXN0cm91dGUiLCJhIjoiY2tuYjY3N2t4MDR5MjJ2cGhyYjFibGc1YSJ9.VhhVvZdDGKvZG75AhvHWsw', null, stream_context_create([\n 'http' => [\n 'header' => [\n 'Connection: close',],],]));\n $data=json_decode($data);\n \n $sum=$sum+(($data->trips[0]->distance)/1000); \n $time=$time+$tiempo[$value]+(round(($data->trips[0]->duration)/60));\n $poi_anterior=$cd[$value];\n\n } \n }\n // Se envian los datos de la ruta a la siguiente vista\n return view('guardarrp2')->with('time',$time)->with('total',$sum)->with('poi',$poi)->with('nombres',$nombres)->with('costo',$costo);\n\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "6af36ba7a0998642ff239831f15b0219", "score": "0.0", "text": "public function update(Request $request, $id) {\n\t\t//\n\t}", "title": "" } ]
[ { "docid": "b8af9491d409a852eeea996523d9e2fa", "score": "0.7262445", "text": "protected function updateResource()\n {\n $this->context->resource->fill($this->context->input);\n $this->applyHooks(BeforeUpdate::class);\n $this->applyHooks(BeforeSave::class);\n $this->context->resource->save();\n $this->applyHooks(AfterSave::class);\n $this->refreshResource();\n }", "title": "" }, { "docid": "352ddad568859b94ee19a4459347b263", "score": "0.71491313", "text": "public function update() {\n $data = array($this->backing);\n $results = json_decode($this->context->make_request(\n $this->resource_type, \"PUT\", strval($this->backing[\"id\"]), \n json_encode($data), NULL, NULL), true);\n $this->backing = $results[0];\n }", "title": "" }, { "docid": "b66d45ed275220a344f3f222ce4980b5", "score": "0.70558053", "text": "public function update(Request $request, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "718f7d64347dbb970d3af2645ff41b28", "score": "0.6624096", "text": "public function update(Request $request, Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "c4d757ef327886959b7e0e652b0d54f4", "score": "0.6467624", "text": "private function update(ResourceInterface $resource)\n {\n $this->dispatcher->dispatch(ResourceEvents::PRE_UPDATE, $resource);\n $this->eventfullySave($resource);\n $this->dispatcher->dispatch(ResourceEvents::POST_UPDATE, $resource);\n }", "title": "" }, { "docid": "8103ef1c9a8f0abc99a6caed997962f1", "score": "0.6310542", "text": "public function update($resourceType, $resourceId, array $payload, $parameters = []);", "title": "" }, { "docid": "47e4c5326e79281be1ce31ec068dab77", "score": "0.61861783", "text": "public static function updateResource($path, $object)\n {\n if (is_array($object)) {\n $object = (object)$object;\n }\n\n return self::connection()->put(self::$api_path . $path, $object);\n }", "title": "" }, { "docid": "577df4a8eca4576fbfbc6c8b72e0277d", "score": "0.61575246", "text": "function update_resource($name, $id, $payload, $query=null)\n{\n # So we will need to do this in a non-REST way.\n\n return send_request(\"$name/$id/edit?$query\", [\n // CURLOPT_CUSTOMREQUEST => \"PUT\",\n CURLOPT_POST => true,\n CURLOPT_POSTFIELDS => [\"payload\" => json_encode($payload)],\n ]);\n}", "title": "" }, { "docid": "3389492293a758320b4c643143959b53", "score": "0.61515224", "text": "function update( $resource ){\n\n $image_path = asset_dir( 'img\\\\products\\\\') ;\n $image = 'img/products/'.$_FILES['product_image']['name'];\n\n $data = [\n\n \"product_name\" => $_POST['product_name'],\n \"product_description\" => $_POST['product_description'],\n \"product_brand\" => $_POST['product_brand'],\n \"sku\" => $_POST['sku'],\n \"product_type\" => $_POST['product_type'],\n \"updated_at\" => date( 'Y-m-d H:i:s' ),\n\n\n ];\n\n if( ! $_FILES['product_image']['error'] == 4){\n $data['product_image'] = $image;\n }\n\n if(!upload_post_image( $_FILES['product_image'], $image_path )){\n redirect( route( 'product/create?message=1' ) );\n }\n\n if( !patch( 'products', $resource, $data ) ){\n redirect( route( 'product/create?message=1' ) );\n }\n\n //Do Stock Process\n\n $stock_data = [\n\n 'product_id' => where( 'products', \"sku = {$_POST['sku']}\" )[0]['id'],\n 'stock' => $_POST['stock'],\n 'stock_limit' => $_POST['stock_limit'],\n 'created_at' => date( 'Y-m-d H:i:s' ),\n 'updated_at' => date( 'Y-m-d H:i:s' )\n\n ];\n\n if( !insert( 'inventory', $stock_data) ){\n\n redirect( route( 'product/create?message=1' ) );\n\n }\n\n redirect( route( \"product/{$resource}/edit\" ) );\n\n}", "title": "" }, { "docid": "af040437e7fb45157da33c190771f474", "score": "0.6125912", "text": "public function update($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\n\t\t$validator = Validator::make($data = Input::all(), Resource::getRulesForUpdate($id));\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tif (Input::file('file')){\n\t\t\t$file = Input::file('file');\n\n\t\t\t$extension = $file->getClientOriginalExtension();\n\t\t\t$destinationPath = 'eltdpResources';\n\t\t\t$filename = preg_replace('/\\s+/', '_', $data['name']);\n\t\t\t$uploadSuccess = $file->move($destinationPath, $filename .'.'. $extension);\n\t\t\t\t\n\t\t\tif ($uploadSuccess) {\n\n\t\t\t\t$data['picture'] = Resource::getExtensionType($file, $destinationPath, $filename);\n\n\t\t\t\tif($data['picture']){\n\n\t\t\t\t\t$data['file'] = $destinationPath .'/'. $filename .'.'. $extension;\n\n\t\t\t\t\t$resourceId = $this->resource->create($data)->id;\n\n\t\t\t\t\treturn Redirect::route('resources.show', $resourceId)\n\t\t\t\t\t->with('message', 'Resource saved.');\n\n\t\t\t\t} else {\n\t\t\t\t\tResource::destroy($this->resource->id);\n\t\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->with('message', 'The file you are trying to upload is not supported.<br> Supported file types are pdf, doc, docx, jpg, gif, bmp, mp3, mp4');\n\t\t\t\t} \n\n\t\t\t} else {\n\n\t\t\t\treturn Redirect::back()\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->withErrors($Validator)\n\t\t\t\t\t->with('message', 'Please upload a file.');\n\t\t\t}\n\t\t}\n\t\t$resource->update($data);\n\n\t\treturn Redirect::route('resources.index');\n\t}", "title": "" }, { "docid": "8b3aa10c010246b03fd3bd32304c0a11", "score": "0.605146", "text": "public function update($input, &$resource = null)\n {\n $resource = $this->repo->findOrFail(array_get($input, $this->repo->getKeyName()));\n\n $this->validate(array_filter($input + $resource->toArray()));\n\n return $resource->update($input);\n }", "title": "" }, { "docid": "dd769c108800c8271a7f2c99245c843e", "score": "0.597514", "text": "public function updateStream($path, $resource, Config $config)\n {\n\n }", "title": "" }, { "docid": "eaee54943a52f02e9d836bade5ff0c75", "score": "0.59377414", "text": "public function updateStream($path, $resource, Config $config)\n {\n }", "title": "" }, { "docid": "8b73dba39ae08dde13c502b11f4a48f0", "score": "0.5901713", "text": "public function update(Request $request, StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5890722", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "1b95c33d6856dbe3d6806b3117503341", "score": "0.5889373", "text": "public function updateEntry (Liquid_Storage_Entry $entry);", "title": "" }, { "docid": "241abe88cb12c84c9ac5ad453b88fdde", "score": "0.58799714", "text": "protected function put()\n {\n $article = ArticleModel::init($this->args['articleId']);\n $this->user->assertArticleAccess($article);\n\n // Read the version to set as current.\n $versionId = trim($this->request->getBody());\n if (!is_numeric($versionId)) {\n $this->response->setStatusCode(400);\n $this->response->setHeader('Content-Type', 'text/plain');\n $this->response->setBody(\"Request body must be the integer ID of the version to promote to current. (text/plain)\");\n return;\n }\n\n try {\n $version = VersionModel::init($this->args['articleId'], $versionId);\n } catch (ResourceException $e) {\n if ($e->getCode() === ResourceException::NOT_FOUND) {\n throw new ResourceException(\n \"Version {$versionId} does not belong to this article.\",\n ResourceException::INVALID_DATA\n );\n }\n throw $e;\n }\n\n // Fail if the passed version is already the current version.\n if ($version->isCurrent) {\n throw new ResourceException(\n \"Version {$version->versionId} is already the current version.\",\n ResourceException::CONFLICT\n );\n }\n\n // Point the article to the new version.\n $article->setCurrentVersion($version);\n\n // Out the article.\n $this->response->setStatusCode(200);\n $this->response->setHeader('Content-Type', 'application/json');\n $this->response->setBody(json_encode($article));\n }", "title": "" }, { "docid": "9455f5aa9c989bb04e6b6d3e1b419576", "score": "0.58611655", "text": "public function update()\n {\n $this->beginAction('update');\n $this->getResource();\n $this->applyHooks(AuthorizeResource::class);\n $this->gatherInput();\n $this->validateInput(true);\n $this->updateResource();\n $this->formatResource();\n\n return $this->makeResponse();\n }", "title": "" }, { "docid": "1d0bb5f7bf30b0c60548dedd141eeeaf", "score": "0.58220166", "text": "public function update(ProductFormRequest $request, Products $product): ProductsResource\n {\n $picture = $request->picture;\n $name = str_slug($request->name).'update_'.time();\n $folder = '/uploads/images/';\n $filePath = \"http://localhost:8888/cours-laravel/Wolfgang/public\". $folder . $name . '.' . $picture->getClientOriginalExtension();\n $this->uploadOne($picture, $folder, 'public', $name);\n\n $product->update(\n [\n 'name' => $request->name, \n 'reference' => $request->reference, \n 'picture' => $filePath, \n 'price' => $request->price, \n 'description' => $request->description,\n ]\n );\n\n return new ProductsResource($product);\n }", "title": "" }, { "docid": "e0f169404ca14678f1031bc947789344", "score": "0.57772154", "text": "public function update(Request $request, $id)\n {\n $codeno = \"JPM-\".rand(11111,99999);\n $item=Item::find($id);\n $name=$request->name;\n $newphoto=$request->photo;\n //$codeno=$request->codeno;\n $oldphoto=$item->photo;\n $price=$request->price;\n $discount=$request->discount;\n $description=$request->description;\n $subcategoryid=$request->subcategoryid;\n $brandid=$request->brandid;\n\n if($request->hasFile('photo'))\n {\n $imageName=time().'.'.$newphoto->extension();\n $newphoto->move(public_path('images/item'),$imageName);\n $filepath='images/item/'.$imageName;\n if (\\File::exists(public_path($oldphoto))) \n {\n (\\File::delete(public_path($oldphoto)));\n }\n }\n else\n {\n $filepath=$oldphoto;\n }\n\n $item->name=$name;\n $item->photo=$filepath;\n $item->codeno = $codeno;\n $item->price=$price;\n $item->discount=$discount;\n $item->description=$description;\n $item->subcategory_id=$subcategoryid;\n $item->brand_id=$brandid;\n\n $item->save();\n\n $message='Item updated successfully.';\n $status=200;\n $result= new ItemResource($item);\n\n\n $response=[\n 'status'=>$status,\n 'success'=>true,\n 'message'=>$message,\n 'data'=>$result\n ];\n return response()->json($response);\n\n }", "title": "" }, { "docid": "f509eafdef1f97698c6b5a41f544527b", "score": "0.5763816", "text": "public function update($id, Request $request)\n {\n $resource = Resource::find($id);\n $resource->name = $request->name ? $request->name : $resource->name;\n $resource->title = $request->title ? $request->title : $resource->title;\n $resource->list_of_skills = $request->list_of_skills ? $request->list_of_skills : $resource->list_of_skills;\n $resource->availability_calendar = $request->availability_calendar ? $request->availability_calendar : $resource->availability_calendar;\n $resource->pay_rate = $request->pay_rate ? $request->pay_rate : $resource->pay_rate;\n $resource->save();\n return response('Resource Updated successfully', 200)\n ->header('Content-Type', 'text/plain');\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.57525045", "text": "public function update($entity);", "title": "" }, { "docid": "eaf18f66946228a152f8b83c6b49e31e", "score": "0.5747208", "text": "public function update($id, $data) {}", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "4bbafe0c3491a2c2b0b9d5b2f03867a1", "score": "0.5729195", "text": "private function put($resource, $json_old_resource, $jsonstring_new_resource)\n\t{\n\t\tif ($resource !== $json_old_resource->url) {\n\t\t\tError::httpApplicationError('resource mismatch, something very wrong did happen.');\n\t\t}\n\t\t\n\t\t$new = json_decode($jsonstring_new_resource);\n\t\tif ($new === NULL) {\n\t\t\tError::httpApplicationError('Resources do not match');\n\t\t}\n\t\t\n\t\t// attributes set by backend (override transmitted content)\n\t\t$o = (object)array();\n\t\t$o->url = $resource;\n\t\t$o->version = $json_old_resource->version + 1;\n\t\t\n\t\t$o->type = $json_old_resource->type;\n\t\t$o->owner = $json_old_resource->owner;\n\t\t$o->creationDateTime = $json_old_resource->creationDateTime;\n\t\t$o->editor = Authentication::getInstance()->getUserId();\n\t\t$o->editionDateTime = date('c', time());\n\t\t$o->active = TRUE;\n\n\t\t// FIXME TODO: check that the announced type is the same as the one of old resource!!!!\n\t\t\n\t\t$v = new Validator();\n\t\t$o = $v->validate($jsonstring_new_resource, $o);\n\t\t\n\t\t// best effort transaction: if a new PUT, will simply delete the last created, but that's alright.\n\t\t// FIXME but at some point active = TRUE for 2 samples !!! ==> we should NEVER rely on 'active' only to get latest version\n\n\t\t$new = Database::getInstance()->create($o);\n\t\tif (!$new) {\n\t\t\tError::httpConflict(); // FIXME duplicate update?\n\t\t}\n\t\t$this->delete($resource, $json_old_resource->version);\n\t\t\n\t\t// return the newly created object with status 201\n\t\t// entity body contains the new resource,\n\t\t// Location header contains canonical path to resource\n\t\t// FIXME ?? header('Location: ' . $o->url . '/v' . $o->version, TRUE, 200);\n\t\theader('Content-Location: ' . $o->url . '/v' . $o->version, TRUE, 200);\n\t\tprint $new;\t\n\t}", "title": "" }, { "docid": "68611877d8742448025a8506ebac8d13", "score": "0.5723295", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "title": "" }, { "docid": "af1ecfb517bec3e1060c710281cb6693", "score": "0.5718758", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'min:6|required',\n 'image' => 'required',\n 'price' => 'required|integer|min:0',\n 'description' => 'required',\n 'stock' => 'required|integer|min:0'\n ]);\n\n $product = Product::findOrFail($id);\n $input = $request->input();\n\n if($request->file('image')){\n if(Storage::exists('public/picture/product/'.$product->image)){\n Storage::delete('public/picture/product/'.$product->image);\n }\n\n $path = $request->file('image')->store('public/picture/product');\n $input['image'] = str_replace('public/picture/product/', '', $path);\n\n }\n\n $product->fill($input)->save();\n\n return redirect()->route('product.show', $id);\n\n }", "title": "" }, { "docid": "637268e654cd5d14f2255e7524a211c5", "score": "0.57127887", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\tif (!$this->has($path)) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn $this->write($path, $resource, $config);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0796347760b32b6ecbcbd8ff6bb30bbc", "score": "0.570206", "text": "public function update(Request $request)\n {\n //\n $old = store::find($request['id']);\n $bol = 0;\n\n if ($old['file_path'] == $request['file'] || $request['file'] == null) $bol = 0;\n else $bol++;\n\n\n $img_name = $old['file_path'];\n\n if ($bol > 0) {\n $ex = $request->file->getClientOriginalExtension();\n $img_name = time() . '.' . $ex;\n $request->file->move(public_path('images'), $img_name);\n }\n\n $old->update([\n 'name' => $request->name,\n 'price' => $request->price,\n 'discount' => $request->discount,\n \"file_path\" => $img_name,\n ]);\n session()->flash('Edit', 'T-Shirt Edited');\n $store = store::all();\n return redirect('/store');\n }", "title": "" }, { "docid": "5435b173692212577be953865689438e", "score": "0.5693539", "text": "public function update($id, $data) {// sanitize the data\n\n $resource = $this->model->find($id);\n\n if ($resource->update($data)) { return $resource; }\n return false;\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "709be3333b89873d9e90b19464c68b23", "score": "0.5676446", "text": "public function update($id)\n\t{\n\t\t$input = Input::only('title', 'link', 'description', 'level');\n\t\t$rules = [\n\t\t\t'title' => 'required',\n\t\t\t'link' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t'level' => 'required|integer'\n\t\t];\n\n\t\t$validator = Validator::make($input, $rules);\n\n\t\tif($validator->passes())\n\t\t{\n\t\t\t$resource = Resource::find($id);\n\t\t\t\n\t\t\tif (Auth::id() !== ($resource->user_id))\n\t\t\t{\n\t\t\t\treturn Redirect::back()->withInput()->withFlashMessage('You cannot edit this resource');\n\t\t\t}\n\n\t\t\t$resource->title = Input::get('title');\n\t\t\t$resource->link = Input::get('link');\n\t\t\t$resource->description = Input::get('description');\n\t\t\t$resource->level = Input::get('level');\n\t\t\t$resource->save();\n\n\t\t\t// redirect\n\t\t\treturn Redirect::route('resources.show', ['id' => $resource->id])->withFlashMessage('The resource was successfully edited!');\n\t\t}\n\t\t\n\t\treturn Redirect::back()->withInput()->withErrors($validator);\n\t}", "title": "" }, { "docid": "6429c73de2ef2191c3d2be22fbf0f39c", "score": "0.5675671", "text": "public function update($data);", "title": "" }, { "docid": "8d0a97cdf24a3e49996a055c1d6f9ee9", "score": "0.5674049", "text": "public function put($data);", "title": "" }, { "docid": "127397632ca2d2e221079c5f52aca86b", "score": "0.56720823", "text": "public function update(RestRequestInterface $request, $identifier);", "title": "" }, { "docid": "aa791f30f13ec2f303130ddbd0ce5da7", "score": "0.56709456", "text": "public function update ($object);", "title": "" }, { "docid": "3003ecf965cfc6406e1202af1d9d00b1", "score": "0.5650661", "text": "public function update(Request $request,$id)\n {\n $DatosServicio=request()->except(['_token','_method']);\n if($request->hasFile('foto'))\n {\n $servicios = servicio::findOrFail($id); //verifica que id exista\n Storage::delete('public/'.$servicios->foto); //borra la foto que esta en storage\n $DatosServicio['foto']=$request->File('foto')->store('uplouds','public');\n }\n\n\n servicio::where('id','=',$id)->update($DatosServicio);\n\n $servicios = servicio::findOrFail($id);\n return view('Servicios.editar',compact('servicios'));\n }", "title": "" }, { "docid": "880715ba5af0affb767965ac42e71574", "score": "0.5641576", "text": "public function update()\n {\n // Temporary cheaty way, should see if a more effictient way is\n // available\n $this->storage->deleteLink($this->id); // Cannot have removeAllNodes called\n $this->save();\n }", "title": "" }, { "docid": "a348f53b5017f28ba6a056a9e2e947dd", "score": "0.5639944", "text": "public function update($id, EditResourceRequest $request)\n {\n $slug = str_slug($request->get('name'), \"-\");\n $rc_item = Rc_item::findOrFail($id);\n\n $rc_item ->update([\n 'name'=> $request->get('name'),\n 'slug' =>$slug,\n 'cat_id'=>$request->get('cat_id'),\n 'img_name'=> $request->get('image_name'),\n 'img_ext'=> $request->file('image')->getClientOriginalExtension(),\n 'download_link'=>$request->get('download_link')\n ]);\n\n $file = $request->image;\n\n if(!empty($file)){\n $rc_item->img_name = $request->get('image_name');\n $rc_item->img_ext = $request->file('image')->getClientOriginalExtension();\n\n $image = $rc_item->img_name . '.' . $rc_item->img_ext;\n $rc_item->save();\n }\n\n if(!empty($file)){\n\n File::delete(public_path($this->imagePath) .$image);\n File::delete(public_path($this->thumbnailPath) . $image);\n $this->saveImage($file, $image);\n }\n\n return redirect()->back()->with('success', 'Successfully Updated!');\n }", "title": "" }, { "docid": "e49cdd26e7843d77b4d5140e3330abc9", "score": "0.5636571", "text": "public function update(Request $request, $id)\n {\n $product = Products::findOrFail($id);\n\n $currentPhoto = $product->image;\n\n if($request->image != $currentPhoto){ // if there is different image\n\n $extension = explode('/', mime_content_type($request->image))[1];\n $name = time().rand().'.'.$extension;\n\n // image intervention package\n // instead of import Image we use \\\n \\Image::make($request->image)->save(public_path('img/products/').$name);\n\n $request->merge(['image' => $name]);\n\n $productImage = public_path('img/products/'.$currentPhoto); //Replace the old photo with the new\n if(file_exists($productImage)){\n @unlink($productImage); //unlink delete the photo\n }\n }\n\n $product->update($request->all());\n }", "title": "" }, { "docid": "b580434b2e577708f365194b901193c3", "score": "0.56211615", "text": "public function update() {\n\t\tif ($this->get('id') !== null) {\n\t\t\t$this->save();\n\t\t}\n\t}", "title": "" }, { "docid": "c4427773d8f9c02f5ada5a766d802347", "score": "0.5618803", "text": "function sharedresource_update_instance($sharedresource) {\n global $CFG;\n\n $sharedresource->type = 'file'; // Just to be safe\n $res = new sharedresource_base();\n\n return $res->update_instance($sharedresource);\n}", "title": "" }, { "docid": "881827b74625a92ff5b0b94e03819446", "score": "0.5611752", "text": "public function update(Request $request, $id)\n {\n \n $requestData = $request->all();\n if ($request->hasFile('photo')) {\n $requestData['photo'] = $request->file('photo')\n ->store('uploads', 'public');\n }\n\n $product = Product::findOrFail($id);\n $product->update($requestData);\n\n return redirect('products')->with('flash_message', 'Product updated!');\n }", "title": "" }, { "docid": "707dd142800f64b09c09c11325fccd78", "score": "0.5603893", "text": "abstract function update($identifier);", "title": "" }, { "docid": "7b0c8cb2764c13fdb98933dbc69be738", "score": "0.55960006", "text": "public function update(Request $request, $id)\n {\n $newResource = resources::find($id);\n if($request->input('name')){\n $newResource->name = $request->input('name'); \n }\n if($request->input('description')){\n $newResource->description = $request->input('description'); \n }\n if($request->input('status')){\n $newResource->status = $request->input('status'); \n }\n if($request->input('exp_date')){\n $newResource->exp_date = $request->input('exp_date');\n }\n if($request->input('price')){\n $newResource->price = $request->input('price');\n }\n if($request->input('status')){\n $newResource->status = $request->input('status');\n }\n \n $newResource->save();\n\n return back()->with('success','Machinery Successfully Updated!');\n }", "title": "" }, { "docid": "f77c93b62808595a63d9f6f31b1f80e0", "score": "0.55661047", "text": "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "9c815957f561d5473f845dd4d5b8d599", "score": "0.55490583", "text": "public function update(Request $request, $id)\n {\n $slider = \\App\\Slider::where('id',$id)->first();\n $slider->firstline = $request->firstline; \n $slider->secondline = $request->secondline; \n $slider->thirdline = $request->thirdline; \n $slider->status = $request->status; \n $slider->row_order = $request->row_order;\n if($request->hasFile('photo')) {\n $slider->photo = $request->file('photo')->store('uploads'.date('Y-m-d')); \n }\n $slider->save();\n return redirect('admin/slider');\n }", "title": "" }, { "docid": "359d84c7d511ae4b3f898ca4163e1aaf", "score": "0.55486757", "text": "public function update(Request $request, $id)\n {\n $this->validateData();\n// Update plan\n $article = Article::findOrFail($id);\n $article -> name = $request -> input('name');\n $article -> intro = $request -> input('intro');\n $article -> text = $request -> input('text');\n\n\n if ($request->hasFile('image')) {\n\n// Get file name with extention\n $fileExtention = $request -> file('image') -> getClientOriginalName();\n// Get just file name\n $filename =pathinfo($fileExtention,PATHINFO_FILENAME);\n// Get just ext\n $extention = $request -> file('image') -> getClientOriginalExtension();\n $filenameToStore = $filename.'_'.time().'.'.$extention;\n $path = $request -> file('image') -> storeAs('public/img/articles',$filenameToStore);\n\n Storage::delete('public/img/articles/' . $article->image);\n\n $article -> image = $filenameToStore;\n }\n\n $article -> save();\n\n if($request -> input('partner-name') != ''){\n\n $partner = Partner::where('name',$request -> input('partner-name')) -> get();\n\n if($partner != null){\n $article -> partners() -> attach($partner[0]->id);\n }\n }\n\n\n\n return redirect('/articles/'.$article->id)->with('success','ArticleResource is updated');\n }", "title": "" }, { "docid": "8ec34e0e6c475b60660d5237f61fb967", "score": "0.5542206", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $data = $request->all();\n\n $data['slug'] = \\Str::slug($data['name']);\n $data['user_id'] = auth()->user()->id;\n\n if(isset($data['foto'])){\n $data['foto'] = Storage::disk('public')->putFile('media', $data['foto']);\n }\n\n $product->update($data);\n\n return redirect()->route('design.index')->with('success','Berhasil !');\n }", "title": "" }, { "docid": "d9b6fe99056043df5723394c78be7f97", "score": "0.5542033", "text": "public function update(Request $request, $id)\n {\n //\n $slider = Slider::find($id);\n //$this->authorize('pass', $pagina);\n\n $slider->fill($request->all())->save();\n $path = Storage::disk('public')->put('img-sliders', $request->file('img'));\n $slider->fill(['img' => asset($path)])->save();\n\n return redirect()->route('adminsliders.edit', $slider->id)\n ->with('info', 'Slider actualizado con éxito');\n }", "title": "" }, { "docid": "0b66ea137462c4641492a24a6cd276fe", "score": "0.55355567", "text": "public function update(Request $request, $id)\n {\n try {\n DB::beginTransaction();\n\n $product = $this->queryProduct($id);\n\n $product->name = $request->name;\n $product->description = $request->description != null ? $request->description : null;\n $product->is_prescription = $request->is_prescription;\n $product->image_path = null; // for now\n $product->price = $request->price;\n\n $product->save();\n\n ProductPriceHistory::create(array(\n 'product_id_fk' => $product->product_id,\n 'price' => $request->price\n ));\n\n\n if($request->quantity != null) {\n $productInventory = ProductInventory::where('product_id_fk', '=', $product->product_id)\n ->first();\n\n $productInventory->previous_value = $productInventory->current_value;\n $productInventory->current_value += (int) $request->quantity;\n\n $productInventory->save();\n }\n\n\n DB::commit();\n\n return response()->json(array(\n 'message' => 'Product successfully updated!'\n ));\n } catch(QueryException $ex) {\n DB::rollBack();\n\n return response()->json(array(\n 'message' => 'Product update failed!'\n )); \n }\n }", "title": "" }, { "docid": "ff8620d972e560c355108f1adf752347", "score": "0.55345273", "text": "public function update(Request $request, $id)\n {\n\n $validator = Validator::make( $request->all(), [\n 'name' => 'required|max:100|string',\n 'description' => 'required|max:100|string',\n 'selectedfield' => ['required', Rule::in(['field1', 'field2'])],\n 'availability' => ['required', Rule::in(['0', '1'])],\n ]);\n\n if ( $validator->fails() ) {\n return response()->json([\n 'data' => [\n 'success' => FALSE,\n 'errors' => $validator->errors(),\n ]\n ]);\n }\n\n $device = Device::find($id);\n $device->name = $request->name;\n $device->description = $request->description;\n $device->field = $request->selectedfield;\n $device->availability = $request->availability;\n\n if(isset($request->dev_image)){\n unlink(public_path('storage/'.$device->id.'/'.$device->image));\n $image = $request->get('dev_image');\n $image_name = time().'.'.$request->dev_image->extension();\n $request->dev_image->move(public_path('/storage/'.$device->id), $image_name);\n $device->image = $image_name;\n }\n \n $device->save();\n\n $device->image = '/public/storage/'.$device->id.'/'.$device->image;\n\n return response()->json([\n 'success' => TRUE,\n 'data' => $device,\n 'message' => \"Device Updated\"\n ]);\n }", "title": "" }, { "docid": "66139d48c34ab92a5f49f5d92e5064cc", "score": "0.55334014", "text": "public function put_products($productName)\n{\n $raw = file_get_contents('php://input');\n $newProduct = Product::fromJson($raw);\n\n $db = new DataStore();\n $db->beginTransaction();\n $oldProduct = Product::productByName($db, $productName);\n if (is_null($oldProduct))\n throw new RESTException('Product not found.', 404);\n\n $oldProduct->update($db, $newProduct);\n $db->commit();\n echo('Product ' . $productName . ' updated.');\n}", "title": "" }, { "docid": "a60f40542a713142fac35050b8cc0c57", "score": "0.55281574", "text": "public function update(Request $request, $id)\n {\n $photo = Photo::find($id);\n $photo->album_id = $request->get(Photo::ALBUM_ID);\n $photo->title = $request->get(Photo::TITLE);\n $photo->url = $request->get(Photo::URL);\n $photo->thumbnail_url = $request->get(Photo::THUMBNAIL_URL);\n $photo->save();\n return new PhotoResource($photo);\n }", "title": "" }, { "docid": "6635eff0e783df96c39328a1351c17ab", "score": "0.5514517", "text": "public function update( $object );", "title": "" }, { "docid": "89c360360421e2cdcc1017ccb99a7828", "score": "0.55116844", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::find($id);\n\n if ( ! $product)\n {\n return $this->recordNotFound();\n }\n\n $validator = Validator::make($request->all(), array_merge(\n [\n 'sku' => 'string|between:8,14|unique:products,sku,'.$product->id.',id'\n ],\n Product::$update_rules\n ));\n\n if($validator->fails()){\n return response()->json($validator->errors(), 400);\n }\n\n $input = $request->all();\n $image_url = $product->image;\n $product->fill($input);\n\n if($request->has('image')){\n Storage::disk('public')->delete('products/'. basename($image_url));\n $uploadFolder = 'products';\n $image = $request->file('image');\n $image_uploaded_path = $image->store($uploadFolder, 'public');\n $product->image = Storage::disk('public')->url($image_uploaded_path);\n }\n\n $product->save();\n\n return response()->json([\n 'message' => 'Product successfully updated',\n 'product' => $product\n ]);\n }", "title": "" }, { "docid": "7614f731038f3fe7cc7be19a770b8134", "score": "0.5511056", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required|string|max:100',\n 'description' => 'required|string',\n 'categorie_id' => 'integer',\n 'sizes.*' =>'integer',\n 'url_image' => 'image|max:3000',\n 'code' => 'in:standard,solde',\n 'price' => 'required|numeric',\n 'reference' => 'required|alpha_num',\n \n ]);\n\n\n $product = Product::find($id);\n $product->update($request->all());\n $product->size()->sync($request->sizes);\n\n $im = $request->file('picture');\n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n }\n\n return redirect()->route('product.index')->with('message', 'Succès de la mise à jour');\n }", "title": "" }, { "docid": "66d083bb11d3019d16e02973863d6967", "score": "0.55049056", "text": "public function update(Request $request, Asset $asset)\n {\n }", "title": "" }, { "docid": "08757cc2c81b23ca63469f255efa2060", "score": "0.5502139", "text": "protected function update() {\n $this->client->sendRequest('POST', $this->name . ($this->key ? : (string) $this->id), $this->prepareRequestData());\n }", "title": "" }, { "docid": "0a5b062a5dceb2e06835dd93b36cb7c2", "score": "0.5501521", "text": "public function update(Request $request, $id)\n { \n if($request->image){\n $imageName = basename($request->image->store(\"public\"));\n $request['image'] = $imageName;\n }\n Product::find($id)->update($request->all());\n session()->flash('msg', \"s: Product Updatedd successfully \");\n return redirect(route(\"products.index\"));\n }", "title": "" }, { "docid": "ebfc2a23b89e301d5a4b298c50156e0d", "score": "0.54949397", "text": "public function update($id);", "title": "" }, { "docid": "4c918686af4f25ca69e952e282b47c7c", "score": "0.5494092", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => '',\n 'description' => '',\n 'price' => '',\n 'stock' => '',\n 'picture' => ''\n ]);\n\n // Membuat object dari Model Post\n $store = Store::find($id); \n $store->title = $request->input('title');\n $store->desc = $request->input('description');\n $store->price = $request->input('price');\n $store->stock = $request->input('stock');\n $path = 'storage/store_image/'.$store->pic;\n if($request->hasFile('picture')){\n unlink($path);\n $fileNameWithExt = $request->file('picture')->getClientOriginalName();\n $filename = pathinfo($fileNameWithExt, PATHINFO_FILENAME);\n $extension = $request->file('picture')->getClientOriginalExtension();\n $filenameSimpan = $filename.'_'.time().'.'.$extension;\n $path = $request->file('picture')->storeAs('public/store_image', $filenameSimpan);\n $store->pic = $request->input('picture');\n }else{\n $filenameSimpan = $store->pic;\n }\n $store->pic = $filenameSimpan;\n\n\n $store->save();\n\n return redirect('/adminstore')->with('success', 'Data telah diubah.');\n }", "title": "" }, { "docid": "cd61f7dfb166b27b13e2e27a951d1df3", "score": "0.54937416", "text": "public function updateObject($objectPath,$content);", "title": "" }, { "docid": "87241a0a9cce48b64ec4be8df8b5485b", "score": "0.5492993", "text": "public function update(Request $request, Product $product) {\n $product->isOwner();\n\n $request->validate([\n 'name' => 'required|max:255',\n 'description' => 'required',\n 'price' => 'required',\n 'stock' => 'required',\n 'discount' => 'required|max:2',\n ]);\n\n $product->name = $request->name;\n $product->detail = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n $product->discount = $request->discount;\n $product->save();\n\n return new ProductResource($product);\n }", "title": "" }, { "docid": "944220b7d8dc3f2475ecc0d6f47331b7", "score": "0.54863787", "text": "public function update($id, $data){\n $image = $this->findById($id);\n $this->validation($data);\n $image->fill($data);\n $image->save();\n return $image;\n }", "title": "" }, { "docid": "3ccd617169cd697bcf05ee458b57ebd6", "score": "0.5473963", "text": "public function update(Request $request, $id)\n {\n\n\n $products = new products;\n $send = $request->all();\n if($request->hasFile('file')){\n $filename = $request->file->getClientOriginalName();\n $path = $request->file->store('storage/uploads','public');\n $send['img'] = $path;\n }\n \n\n \n $p = $products::find($id);\n $p->update($send);\n \n \n \n }", "title": "" }, { "docid": "81ffa33c6a97b616b60b1d4825f6ed56", "score": "0.5473883", "text": "abstract public function update($object);", "title": "" }, { "docid": "4febf037679dde1b9296a47a3c708516", "score": "0.5462122", "text": "public function update(Request $request, $id)\n {\n $product = Product::where('id', $id)->first();\n\n if(!$product){\n return response()->json([\n 'status' => 'false',\n 'message' => 'Product not found'\n ])->setStatusCode(400, \"Product not found\");\n }\n\n $validation = Validator::make($request->all(), [\n 'title' => 'unique:products,title,' . $product->id,\n 'firm' => 'string',\n 'text' => 'string',\n 'image' => 'file|image|mimes:jpg,png|max:3072'\n ]);\n\n if($validation->fails()){\n return response()->json([\n 'status' => 'false',\n 'message' => $validation->errors()\n ])->setStatusCode(400, \"Editing error\");\n }\n\n $image = null;\n if($request->image){\n $image = $request->image->store('transport_images', 'api');\n }\n\n $product->update([\n 'title' => $request->title ? $request->title : $product->title,\n 'firm' => $request->firm ? $request->firm : $product->firm,\n 'text' => $request->text ? $request->text : $product->text,\n 'image' => $image ? 'storage/api/' . $image : $product->image\n ]);\n\n return response()->json([\n 'status' => true,\n 'post' => [\n 'title' => $product->title,\n 'datetime' => $product->updated_at->format('H:i d.m.Y'),\n 'firm' => $product->firm,\n 'text' => $product->text,\n 'tags' => $product->tags,\n 'image' => $product->image\n ]\n ])->setStatusCode(201, 'Successful creation');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "0c9339d032215169c3edaade53ef1825", "score": "0.54549414", "text": "public function update(Request $request, $id)\n {\n $vData = $request->validate([\n 'category_id' => 'required',\n 'title' => 'required',\n 'slug' => 'required',\n 'specs' => 'max:16300',\n 'details' => 'max:16300'\n ]);\n\n $product = Product::whereId($id)->update($vData);\n if($request->hasFile('file')){\n\n $cur_image = Image::where('product_id', $id)->first();\n @unlink($_SERVER['DOCUMENT_ROOT'] . '/'.$cur_image->path);\n\n\n $imageName = time().'.'.request()->file->getClientOriginalExtension();\n request()->file->move(public_path('storage/img/products/'), $imageName);\n $path = 'storage/img/products/'.$imageName;\n \n $image = Image::where('product_id', $id)->first();\n $image->path = $path;\n $image->update();\n\n\n }\n\n return back()->with('success', 'Product updated.');\n }", "title": "" }, { "docid": "2744fd02d7abb711d53573d70c4d3888", "score": "0.5452763", "text": "public function update($id)\n {\n $id = $this->filter->sanitize($id, 'int');\n\n try {\n\n $request = $this->request;\n\n $product = Product::findFirstOrFail(\n [\n 'id = ?0', 'bind' => [$id]\n ]\n );\n\n $product->assign(\n [\n 'id' => $id,\n 'name' => $request->getPut('name', 'string', $product->name),\n 'icon' => $request->getPut('name', 'string', $product->icon),\n ]\n );\n\n return $this->response($request, $product, true);\n\n } catch (ResourceNotFoundException $e) {\n return $e->returnResponse();\n }\n }", "title": "" }, { "docid": "53acca1ee81047a19045a47e38ed715c", "score": "0.5451808", "text": "public function setResource($resource){\n $this->resource = $resource;\n }", "title": "" }, { "docid": "24aefd649a6f08879c0683232037d759", "score": "0.54494536", "text": "public function update(Request $request, $id)\n {\n //Handle file upload\n if ($request->hasFile('prod_image')) {\n $filenameWithExt = $request->file('prod_image')->getClientOriginalName();\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n $extention = $request->file('prod_image')->getClientOriginalExtension();\n $fileNameToStore = $filename. '_' .time(). '.' .$extention;\n $path = $request->file('prod_image')->storeAs('public/prod_images', $fileNameToStore);\n \n } else {\n $fileNameToStore = 'noimage.jpg';\n }\n\n //Update products\n $product = Product::find($id);\n $product->title = $request->input('title');\n $product->description = $request->input('description');\n $product->notetocustomer = $request->input('notetocustomer');\n $product->prod_image = $fileNameToStore;\n $product->save();\n\n return redirect('products/'. $id);\n }", "title": "" }, { "docid": "c47170ee30d6553b2ef17d9464e431bf", "score": "0.5446973", "text": "public function update(Request $request, $id)\n {\n $file=file_get_contents(public_path().'\\products.json');\n $data=(array)json_decode($file);\n unset($file);\n $filePath=public_path().'\\products.json';\n $found_key = array_search($id, array_column($data, 'id'));\n $data[$found_key]->type=$_REQUEST['type'];\n $data[$found_key]->title=$_REQUEST['title'];\n $data[$found_key]->firstname=$_REQUEST['firstname'];\n $data[$found_key]->mainname=$_REQUEST['mainname'];\n $data[$found_key]->price=$_REQUEST['price'];\n $data[$found_key]->numpages=$_REQUEST['numpages'];\n file_put_contents($filePath, json_encode($data));\n return redirect('product');\n }", "title": "" }, { "docid": "e0201570e4544fdade8ae1ce85d31d37", "score": "0.5444659", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'numeric|required',\n 'reference' =>'string|required'\n \n ]);\n\n $product = Product::find($id); // on recupere dans la BDD le produit correspondant a $id\n\n\n $product->update($request->all()); // mon produit est mis a jour avec toutes les infos recues\n\n $im = $request->file('picture'); // on va chercher la la photo picture\n\n if (!empty($im)) { // si ce dossier n'est pas vide \n\n $link = $request->file('picture')->store('images'); // on enregistre la photo dans le dossier image ( store =secur)\n\n\n $product->update([\n 'url_image' => $link, // je preprend mon produt et le champs url image, j'y assicie le lien link crée = $link = le nom de l'image\n ]);\n }\n \n // on utilisera la méthode sync pour mettre à jour les auteurs dans la table de liaison\n \n\n return redirect()->route('admin.index')->with('message', 'article modifié');\n \n }", "title": "" }, { "docid": "dd047a60f5212296d1890ab530ebee18", "score": "0.54444635", "text": "public function update($id)\n {\n\n \n $validation = $this->runValidation();\n\n if (request()->ajax()) {\n\n if ($validation->getData()->status == 0) {\n return $validation;\n }\n\n }\n \n $data = $this->request->all();\n \n $resource = $this->model::findOrFail($id);\n if ($this->request->hasFile('url')) {\n\n $data['url'] = Helper::saveImage($this->request->url,\"/$this->basicRoute\");\n }\n\n if ($this->request->hasFile('image')) {\n \n $data['image'] = Helper::saveImage($this->request->image,\"/$this->basicRoute\");\n \n }\n\n $resource->update($data);\n\n toastr()->success(trans('main.saved_successfully'));\n\n if (request()->ajax()) {\n return responseJson(1,trans('main.saved_successfully'),['url'=>route($this->basicRoute . '.index')]);\n }\n\n return redirect()->route($this->basicRoute . '.index');\n }", "title": "" }, { "docid": "ccfb3d35b44456a2ee9c7ae900beffc7", "score": "0.5438126", "text": "function update( $resource ){\n\n $data = [\n\n 'receipt_number' => $_POST[ 'receipt_number' ],\n 'product_id' => $_POST[ 'product_id' ],\n 'quantity' => $_POST[ 'quantity' ],\n 'unit_price' => $_POST[ 'unit_price' ],\n 'receivable_image' => $_POST[ 'receivable_image' ],\n 'date_received' => $_POST[ 'receipt_number' ],\n\n ];\n\n $result = patch( 'receivables', $resource, $data );\n\n if( !$result ){\n return false;\n }\n\n return true;\n\n}", "title": "" }, { "docid": "6b0d98cb805b9bcb66defa2a25539d3b", "score": "0.5434785", "text": "public function update(Request $request, $id)\n\t{\n\t\t$this->validate($request, [\n\t\t\t'name' => 'required|string|max:30',\n\t\t\t'price' => 'required|string|max:5',\n\t\t\t'release_date' => 'required|date',\n\t\t\t'auther' => 'required|string',\n\t\t\t'retailer' => 'required|string',\n\t\t\t'desc' => 'required|string',\n\t\t\t'ISBN' => 'required|numeric',\n\t\t\t'file' => 'file|image',\n\n\t\t]);\n\n\t\t$getOne = Product::findOrFail($id);\n\n\t\t$getOne->name = $request->input('name');\n\t\t$getOne->price = $request->input('price');\n\t\t$getOne->release_date = $request->input('release_date');\n\t\t$getOne->auther = $request->input('auther');\n\t\t$getOne->retailer = $request->input('retailer');\n\t\t$getOne->desc = $request->input('desc');\n\t\t$getOne->ISBN = $request->input('ISBN');\n\t\tif ($request->hasFile('file') && isset($getOne->pic_index)) {\n\t\t\tStorage::delete('public/books/'.$getOne->pic_index);\n\t\t\t$uploadHelper = $request->file('file');\n\t\t\t$path = $uploadHelper->storeAs('public/books', $uploadHelper->hashName());\n\t\t\t$getOne->pic_path = $path;\n\t\t}\n\t\t$getOne->save();\n\t\treturn redirect()->route('product.index');\n\t}", "title": "" }, { "docid": "d761b550e7c8e095517fead3d3ebe9c1", "score": "0.54338276", "text": "public function update(Request $request, $id)\n {\n $file = File::findOrFail($request->file_id);\n\n $file->id = $request->input('file_id');\n $file->name = $request->input('name');\n\n if ($file->save()) {\n return new FileResource($file);\n }\n }", "title": "" }, { "docid": "8286c17eacfe236df6038d5372070538", "score": "0.54321754", "text": "public function update(Request $request, $id)\n { $file=Request()->file('picture');\n //validate\n $this->validate($request,[\n 'name'=>'required|max:100',\n //unique:products no me deja regrabar\n 'description'=>'required|max:500',\n 'price'=>'required|numeric',\n 'category_id'=>'required|integer',\n 'stock'=>'required|integer',\n 'purchable'=>'required|boolean'\n ]);\n //recuperar el producto de la DB\n $prod= Product::find($id); \n //save\n $prod->name = $request->name;\n $prod->description = $request->description;\n $prod->price = $request->price;\n $prod->category_id = $request->category_id;\n $prod->stock = $request->stock;\n $prod->purchable = $request->purchable;\n //guardar la imagen\n if($request->hasFile('picture')){\n $nombre= str_slug($prod->name) . '.' .request()->file('picture')->extension();\n $file->storeAs('/public/products/', $nombre);\n //asociar la imagen con el prod\n $prod->picture = $nombre; \n } \n $prod->save();\n //redirect\n return redirect('/admin/products/');\n }", "title": "" }, { "docid": "a96003ebfe5bb93afff05477cd90b813", "score": "0.5431496", "text": "public function update(Request $request, $id)\n {\n //\n \n $homeItem = HomeItem::find($id);\n \n // dd($request->path); \n // $tempPath = $request->file('path');\n // $tempPath = ;\n // die();\n\n $photoName = \"homePhoto_\" . $homeItem->id;\n if($request->file('path') != null)\n $request->file('path')->storeAs('storage/home/',$photoName);\n\n $path = \"storage/home/\" . $photoName;\n \n \n $data = [\n 'title' => $request->title,\n 'description' => $request->description,\n 'path' => $path\n ];\n\n $homeItem->update($data);\n \n return redirect()-> route('admin.home.index');\n \n //\n // HomePhoto homePhoto;\n }", "title": "" }, { "docid": "fa0ae59c9ed5781e236a66291f8f7f6f", "score": "0.5430425", "text": "public function update(StoreProductRequest $request, $id)\n {\n \n }", "title": "" }, { "docid": "e9317165d16f63837cf4020ead9f5bc5", "score": "0.54248756", "text": "public function update(Request $request, $id)\n {\n $validated = $request->validate([\n 'name' => 'required|min:3|max:50',\n 'slug' =>'unique:App\\Models\\Product,slug,'.$id.'|required',\n 'category_id' => 'required',\n 'description' => 'required|min:3',\n 'price' => 'required|numeric',\n 'img' => 'required',\n ]);\n\n $product = Product::findOrFail($id);\n $product->name = $request->name;\n $product->slug = $request->slug;\n $product->category_id = $request->category_id;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->action_price = $request->action_price;\n if($request->recomended == null){\n $request->recomended = false;\n $product->recomended = $request->recomended;\n }\n $product->recomended = $request->recomended;\n\n $product->img = $request->img;\n $product->save();\n\n $product->productRecommended()->sync($request->productRecommended);\n\n\n\n\n return redirect('/admin/product')->with('success', 'Product was Updated!');\n }", "title": "" }, { "docid": "c620c32a9166a55ea3c61d3b0b4a0d35", "score": "0.542303", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(), [\n 'nama_product' => 'max:255',\n 'harga' => 'max:10',\n \n ]);\n if ($validator -> fails()) {\n return response([\n 'error' => $validator->errors(),\n 'status' => 'Validation Error'\n ]);\n }\n $product = product::find($id);\n if ($product != null){\n $product->update($request->all());\n return response([\n 'data' => new ProductResource($product),\n 'message' => 'Adidas has been updated!'], 202);\n } else {\n return response([\n 'message'=>'No data found!',], 403);\n }\n }", "title": "" }, { "docid": "0a57d4518594a9989e97cec12943deca", "score": "0.5422329", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'storage' => ['required', 'max:255'],\n 'name' => ['required', 'string',]\n ]);\n\n $data['storage'] = $request->input('storage');\n $data['name'] = $request->input('name');\n\n SiloName::where('id', $id)->update($data);\n try {\n CloudSiloName::where('id', $id)->update($data);\n } catch (\\Throwable $th) {\n return redirect('setting/silo-setting')->with(['update' => 'Data updated successfully!']);\n }\n return redirect('setting/silo-setting')->with(['update' => 'Data updated successfully!']);\n }", "title": "" }, { "docid": "a44308ca5a380cae7b7e813b2c9f1a54", "score": "0.54173785", "text": "public function update(ProductRequest $request, $id)\n {\n\n $validatedData = $request->validated();\n $product = Product::find($id);\n if (file_exists($product->image) && $request['image']) {\n unlink($product->image);\n $validatedData['image'] = $this->uploadFile($request, $this->productsPath, 'image');\n }\n $product->update($validatedData);\n return redirect()->back()->with([\"heading\" => stringCutter(20, $request->name), \"message\" => \"Has Been Updated Successfully !\"]);\n }", "title": "" }, { "docid": "b0703c31ae5e60c6f79145b52c055770", "score": "0.5416545", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n\t\t\t'slider_large_title' => 'required',\n 'slider_small_title' => 'required',\n\t\t]);\n $requestData = $request->all();\n $slider = Slider::findOrFail($id);\n\n if ($request->hasFile('image')) {\n if (!$request->old_image='') {\n Storage::delete('public/' . $slider->image);\n }\n }\n if ($request->hasFile('image')) {\n $requestData['image'] = $request->file('image')->store('uploads', 'public');\n $setImage = 'storage/'.$requestData['image'];\n $img = Image::make($setImage)->resize(1920, 1000)->save($setImage);\n }else{\n $requestData['image'] = $request->old_image;\n }\n $slider->update($requestData);\n\n Toastr::success('Class updated!', 'Done', [\"positionClass\" => \"toast-top-right\"]);\n return redirect('admin/slider');\n }", "title": "" }, { "docid": "dae8a6503505f86c42e3ac3dd124b03f", "score": "0.54160446", "text": "public function update(Request $request, $id)\n {\n $book = Book::findorFail($id);\n $book->book_name=$request->input('book_name'); \n $book->author_name=$request->input('author_name');\n $book->shelf_no=$request->input('shelf_no');\n $book->shelf_image=\"\";\n $book->row_no=$request->input('row_no');\n $book->column_no=$request->input('column_no');\n $book->book_image=\"\";\n $book->book_quantity=$request->input('book_quantity');\n if($book->save()){\n $shelf_image = $request->file('shelf_image');\n if($shelf_image != null){\n $ext = $shelf_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($shelf_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n $book_image = $request->file('book_image');\n if($book_image != null){\n $ext = $book_image->getClientOriginalExtension();\n $fileName = rand(10000, 50000) . '.' . $ext;\n if($ext == 'jpg' || $ext == 'png' || $ext == 'jpeg'){\n if($book_image->move(public_path(), $fileName)){\n $book = Book::find($book->id);\n $book->icon = url('/') . '/' . $fileName;\n $book->save();\n }\n }\n\n }\n \n return new BookResource($book);\n \n } \n }", "title": "" }, { "docid": "7ad1378cea665d5004a8344ebd4b6866", "score": "0.54156536", "text": "public function update(Request $request, $id)\n {\n $file = $request->file('image');\n\n $product = Product::where('id',$id)->first();\n if($file == NULL)\n {\n Product::where('id',$id)->update(['name'=>$request->name,'amount'=>$request->amount]);\n }\n else {\n $file_name = uniqid().'_'.$request->image->getClientOriginalName();\n\n $file->move(public_path().'/image/author/',$file_name);\n\n Product::where('id',$id)->update(['image'=>$file_name,'name'=>$request->name,'amount'=>$request->amount]);\n }\n\n History::create(['description'=> Auth::user()->name,\" edited \",\" product \",$product->name],\" as \",$request->name);\n\n return redirect()->route('products.index',['product'=>$id]);\n }", "title": "" }, { "docid": "ee6e8f1b9c68eb99ac3960c72ccc4b79", "score": "0.5412932", "text": "public function update(Request $request, $id)\n {\n \n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->description = $request->description;\n $slider->slider_type = $request->slider_type;\n if ($request->file)\n {\n $file_name = $request->file -> getClientOriginalName();\n $file_name = uniqid().$file_name;\n $file_name = preg_replace('/\\s+/', '', $file_name);\n $file_type = $request->file->getClientOriginalExtension();\n $request->file-> move(public_path().'/admin/upload/sliders',$file_name);\n $file_size = $request->file->getClientSize();\n $file_size = $file_size/1000;\n $file_size = $file_size.' '.'kb';\n $new_path = url('/').'/public/admin/ecommerce/upload/sliders'.$file_name;\n $slider->image_name = $file_name;\n $slider->image_size = $file_size;\n $slider->image_extension = $file_type;\n $slider->image_url = $new_path; \n }\n $slider->update();\n return Redirect()->back()->with('status', 'Slider updated successfully!');\n }", "title": "" }, { "docid": "80fe54605f41c0621ee8786a51d07268", "score": "0.54110163", "text": "public function update(Request $request, $id)\n {\n $supplier = Supplier::find($id);\n $supplier->supplier_code = $request->supplier_code;\n $supplier->supplier_name = $request->supplier_name;\n $supplier->description = $request->description;\n $supplier->image = $request->image;\n \n\n if($request->hasFile('image'))\n {\n $file = $request->image;\n // Lưu tên hình vào column sp_hinh\n $supplier->image = $file->getClientOriginalName();\n \n // Chép file vào thư mục \"photos\"\n $fileSaved = $file->storeAs('public/uploads', $supplier->image);\n }\n\n $supplier->save();\n\n return redirect()->route('backend.supplier.index');\n }", "title": "" }, { "docid": "0e451bd98e5957fbd83c888a6f6c1040", "score": "0.5410927", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::findOrFail($id);\n if($resource->update($request->all()))\n {\n if ($request->hasFile('document')) {\n if(!empty($resource->document))\n {\n Storage::delete($resource->file);\n }\n $file = $request->document;\n $path = Storage::putFile('files/board', $file);\n $resource->file = $path;\n $resource->save();\n }\n Alert::success('Document updated successfully', 'Document Updated');\n }\n else\n {\n Alert::error('Document was not updated. Please correct your errors.', 'Oops!');\n return back();\n }\n return redirect('admin/portal');\n }", "title": "" }, { "docid": "9c20822df745e41d8d41c20390064ae1", "score": "0.5410915", "text": "public function update(Request $request, $id)\n {\n $found = Supply::findOrfail($request->get('supply_id'));\n $photo=\"\"; \n if($found){\n\n if($request->hasFile('Photo')){\n Storage::delete('public/'.$found->photo);\n $photo = $request->file('Photo')->store('suppliesUploads','public'); \n }\n\n $supplies = [\n 'user_id' => auth()->id(),\n 'name' => $request->get('Name'),\n 'price' => $request->get('Price'), \n 'stock' => $request->get('Stock'), \n 'offer' => $request->get('Offer'),\n 'photo' => $photo \n ];\n\n if(Supply::where('id','=',$found->id)->update($supplies))\n return redirect('supplies')->with('success','Supply updated successfuly');\n else \n return redirect('supplies')->with('error','Something is wrong, try later');\n }\n return redirect('supplies')->with('error','Supply not found, try again'); \n \n }", "title": "" }, { "docid": "13d50b8ba5ae96627a4f7af44881f80e", "score": "0.5407719", "text": "abstract public function updateAction($id, Request $request);", "title": "" }, { "docid": "21e1460ae7fcbf94fd77a17a41f5c7af", "score": "0.5405671", "text": "public function update(Request $request, Product $product)\n {\n\n $business = $product->business_id;\n\n $this->isValid($request);\n\n if ($request->hasFile('img')) {\n $path = $request->file('img')->store('stored-imgs');\n $product->img = $path;\n }\n\n $data = $request->all();\n $product->update($data);\n\n return redirect()->route('business.show', compact('business'));\n }", "title": "" }, { "docid": "26f85e8c2aab58a4938979b0f74012f6", "score": "0.54049784", "text": "public function update(PostStoreRequest $request, $id)\n {\n $post= Post::find($id);\n $post->fill($request->all())->save();\n\n //Image\n if($request->file('file')){\n $path= Storage::disk('public')->put('image',$request->file('file'));\n\n $post->fill(['file'=>asset($path)])->save();//asse... crea la ruta completa donde se guarda laimage\n }\n //tags\n\n $post->tags()->sync($request->get('tags'));//syc: sincroniza la relacion que hay entre post y etiquetas //evalua para saber si la relacion esta \n\n return redirect()->route('posts.edit',$post->id)//redireciona y envia el id de la etiqueta que recien se creo\n ->with('info','Entrada actualizada con éxito');\n }", "title": "" } ]
9739d127cb3c00cbbbe766cc28fad8a2
Operation getReturnLineItemById Find ReturnLineItem By ID
[ { "docid": "ffc409cfc9bb61835c346be62b82371b", "score": "0.78906065", "text": "public static function findById($id)\n {\n return self::getReturnLineItemById($id);\n }", "title": "" } ]
[ { "docid": "a75dee2c6996fabff539323d30d8c7c0", "score": "0.6946791", "text": "protected static function getReturnLineItemByIdRequest($return_line_item_id) \n {\n // verify the required parameter 'return_line_item_id' is set\n if ($return_line_item_id === null || (is_array($return_line_item_id) && count($return_line_item_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_line_item_id when calling getReturnLineItemById'\n );\n }\n\n $resourcePath = '/returnLineItems/{returnLineItemId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($return_line_item_id !== null) {\n $resourcePath = str_replace(\n '{' . 'returnLineItemId' . '}',\n ObjectSerializer::toPathValue($return_line_item_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = self::getHeaderSelector()->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = self::getHeaderSelector()->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if (self::getConfig()->getUserAgent()) {\n $defaultHeaders['User-Agent'] = self::getConfig()->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n self::getConfig()->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "73c1e3725272a037670d30a6ba0206d7", "score": "0.6525675", "text": "protected static function deleteReturnLineItemByIdRequest($return_line_item_id) \n {\n // verify the required parameter 'return_line_item_id' is set\n if ($return_line_item_id === null || (is_array($return_line_item_id) && count($return_line_item_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_line_item_id when calling deleteReturnLineItemById'\n );\n }\n\n $resourcePath = '/returnLineItems/{returnLineItemId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($return_line_item_id !== null) {\n $resourcePath = str_replace(\n '{' . 'returnLineItemId' . '}',\n ObjectSerializer::toPathValue($return_line_item_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = self::getHeaderSelector()->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = self::getHeaderSelector()->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if (self::getConfig()->getUserAgent()) {\n $defaultHeaders['User-Agent'] = self::getConfig()->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'DELETE',\n self::getConfig()->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "c3bacdace0d20a3a9961a73c39e009df", "score": "0.6364228", "text": "protected static function updateReturnLineItemByIdRequest($return_line_item_id, $return_line_item) \n {\n // verify the required parameter 'return_line_item_id' is set\n if ($return_line_item_id === null || (is_array($return_line_item_id) && count($return_line_item_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_line_item_id when calling updateReturnLineItemById'\n );\n }\n // verify the required parameter 'return_line_item' is set\n if ($return_line_item === null || (is_array($return_line_item) && count($return_line_item) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_line_item when calling updateReturnLineItemById'\n );\n }\n\n $resourcePath = '/returnLineItems/{returnLineItemId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($return_line_item_id !== null) {\n $resourcePath = str_replace(\n '{' . 'returnLineItemId' . '}',\n ObjectSerializer::toPathValue($return_line_item_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($return_line_item)) {\n $_tempBody = $return_line_item;\n }\n\n if ($multipart) {\n $headers = self::getHeaderSelector()->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = self::getHeaderSelector()->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if (self::getConfig()->getUserAgent()) {\n $defaultHeaders['User-Agent'] = self::getConfig()->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PATCH',\n self::getConfig()->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "f553a80c353f78ce48c74af9f907a331", "score": "0.6362898", "text": "protected static function getReturnLineItemByIdWithHttpInfo($return_line_item_id)\n {\n $returnType = '\\Tradenity\\SDK\\Resources\\ReturnLineItem'; \n $request = self::getReturnLineItemByIdRequest($return_line_item_id); \n\n try {\n $options = self::createHttpClientOption();\n try {\n $response = self::getHttpClient()->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Tradenity\\SDK\\Resources\\ReturnLineItem',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "b349f4b59a27e25927a65ab7e4a76702", "score": "0.6263387", "text": "protected static function replaceReturnLineItemByIdRequest($return_line_item_id, $return_line_item) \n {\n // verify the required parameter 'return_line_item_id' is set\n if ($return_line_item_id === null || (is_array($return_line_item_id) && count($return_line_item_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_line_item_id when calling replaceReturnLineItemById'\n );\n }\n // verify the required parameter 'return_line_item' is set\n if ($return_line_item === null || (is_array($return_line_item) && count($return_line_item) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_line_item when calling replaceReturnLineItemById'\n );\n }\n\n $resourcePath = '/returnLineItems/{returnLineItemId}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($return_line_item_id !== null) {\n $resourcePath = str_replace(\n '{' . 'returnLineItemId' . '}',\n ObjectSerializer::toPathValue($return_line_item_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($return_line_item)) {\n $_tempBody = $return_line_item;\n }\n\n if ($multipart) {\n $headers = self::getHeaderSelector()->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = self::getHeaderSelector()->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if (self::getConfig()->getUserAgent()) {\n $defaultHeaders['User-Agent'] = self::getConfig()->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n self::getConfig()->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "31cdcf30dc1c295702fce3c1e89ded7b", "score": "0.6177173", "text": "public function create()\n {\n $instance = self::createReturnLineItem($this);\n $this->setId($instance->getId());\n return $instance;\n }", "title": "" }, { "docid": "c708eef3c7b4fd4819f9725e3f331732", "score": "0.6140972", "text": "public function update()\n {\n return self::updateReturnLineItemById($this->getId(), $this);\n }", "title": "" }, { "docid": "8ab8eaaaf45ce5bb53a03b9b6802134b", "score": "0.6026834", "text": "public function getOrderLineItemID()\n {\n return $this->orderLineItemID;\n }", "title": "" }, { "docid": "7843f95dac46381f6bbf0ee3009e4806", "score": "0.59365684", "text": "public static function getReturnLineItemById($return_line_item_id)\n {\n list($response) = self::getReturnLineItemByIdWithHttpInfo($return_line_item_id);\n return $response;\n }", "title": "" }, { "docid": "3986de11624bb4e0e4c4a797b7aeee63", "score": "0.5933039", "text": "public function getLineItem()\n\t{\n\t\tif (!$this->lineItem) {\n\t\t\t$this->lineItem = Commerce::getInstance()->getLineItems()->getLineItemById($this->lineItemId);\n\t\t}\n\n\t\treturn $this->lineItem;\n\t}", "title": "" }, { "docid": "cda4c8ea6fd8692a1842dad0a6c879f0", "score": "0.58045137", "text": "public static function deleteReturnLineItemById($return_line_item_id)\n {\n self::deleteReturnLineItemByIdWithHttpInfo($return_line_item_id);\n }", "title": "" }, { "docid": "38ea30f8427fcddebea0ea07b34cc73c", "score": "0.5702885", "text": "protected static function replaceReturnLineItemByIdWithHttpInfo($return_line_item_id, $return_line_item)\n {\n $returnType = '\\Tradenity\\SDK\\Resources\\ReturnLineItem'; \n $request = self::replaceReturnLineItemByIdRequest($return_line_item_id, $return_line_item); \n\n try {\n $options = self::createHttpClientOption();\n try {\n $response = self::getHttpClient()->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Tradenity\\SDK\\Resources\\ReturnLineItem',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "c0ebefee854632b51546b2eb1cc79c48", "score": "0.5678954", "text": "public static function deleteById($id)\n {\n self::deleteReturnLineItemById($id);\n }", "title": "" }, { "docid": "7b0cc52d2b3837d7d1d2f5c878302b01", "score": "0.5609368", "text": "public function show($id)\n {\n return ProductLine::find($id);\n }", "title": "" }, { "docid": "08cf40fadde789a58fdb2b12cb17abc0", "score": "0.5608652", "text": "public function get(string $returnId): ReturnsResource\n {\n $response = $this->performApiCall(\n 'GET',\n \"returns/{$returnId}\"\n );\n\n return new ReturnsResource(collect($response));\n }", "title": "" }, { "docid": "9c2342872996abbc44aae61430f849f6", "score": "0.5588051", "text": "protected static function updateReturnLineItemByIdWithHttpInfo($return_line_item_id, $return_line_item)\n {\n $returnType = '\\Tradenity\\SDK\\Resources\\ReturnLineItem'; \n $request = self::updateReturnLineItemByIdRequest($return_line_item_id, $return_line_item); \n\n try {\n $options = self::createHttpClientOption();\n try {\n $response = self::getHttpClient()->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Tradenity\\SDK\\Resources\\ReturnLineItem',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "e8670d1417c995d9b68b77a360c064f5", "score": "0.5540941", "text": "public function getLineItemId()\n {\n return $this->lineItemId;\n }", "title": "" }, { "docid": "e8670d1417c995d9b68b77a360c064f5", "score": "0.5540941", "text": "public function getLineItemId()\n {\n return $this->lineItemId;\n }", "title": "" }, { "docid": "d6c58fb4174190cd0c5b9ca8d441c104", "score": "0.55376077", "text": "public function getRecord($returnID) {\n try {\n $sql = \"SELECT * FROM `ret_paypal_view` WHERE ReturnID = '{$returnID}'\";\n $stmt = $this->conn->query($sql, PDO::FETCH_ASSOC);\n $result = $stmt->fetch();\n return $result;\n } catch (PDOException $err) {\n $_SESSION[\"message\"] = msgPrep(\"danger\", \"Error - Returns/getRecord Failed: {$err->getMessage()}\");\n return false;\n }\n }", "title": "" }, { "docid": "468b993e9a51988ca0d708d019199398", "score": "0.5503289", "text": "protected static function createReturnLineItemWithHttpInfo($return_line_item)\n {\n $returnType = '\\Tradenity\\SDK\\Resources\\ReturnLineItem'; \n $request = self::createReturnLineItemRequest($return_line_item); \n\n try {\n $options = self::createHttpClientOption();\n try {\n $response = self::getHttpClient()->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 201:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Tradenity\\SDK\\Resources\\ReturnLineItem',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "d9d424f70d8ac4c402a49072a2997812", "score": "0.54941005", "text": "protected static function deleteReturnLineItemByIdWithHttpInfo($return_line_item_id)\n {\n $returnType = ''; \n $request = self::deleteReturnLineItemByIdRequest($return_line_item_id); \n\n try {\n $options = self::createHttpClientOption();\n try {\n $response = self::getHttpClient()->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n return [null, $statusCode, $response->getHeaders()];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n throw $e;\n }\n }", "title": "" }, { "docid": "f6412bc83709d574459a236da9f998f6", "score": "0.54828954", "text": "public function load($id){\n\t\t$sql = 'SELECT * FROM tbl_expense_lines WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->getRow($sqlQuery);\n\t}", "title": "" }, { "docid": "104e5705fe70226b70c12504ccb17cdf", "score": "0.5462074", "text": "public function getAReturnInfo($id)\n {\n $returnData = ReturnItemDetail::find($id);\n $returnData->load('repairItemDetail', 'warrantyItemDetail', 'customer','items','replacement');\n $customer =$returnData->customer;\n $item=$returnData->items;\n $item=$item->first();\n $supplier=$item->Supplier;\n\n return View::make('/return_management/returnsearchresults')->with('data', $returnData)->with('item', $item)->with('customer', $customer)->with('supplier', $supplier);\n\n }", "title": "" }, { "docid": "25007061bf581ef4773647c3202cc909", "score": "0.5428632", "text": "public function getReturnOrderID()\n {\n return $this->returnOrderID;\n }", "title": "" }, { "docid": "05fed11b4b6ca729b03cfe424911f8f9", "score": "0.5424781", "text": "public static function createReturnLineItem($return_line_item)\n {\n list($response) = self::createReturnLineItemWithHttpInfo($return_line_item);\n return $response;\n }", "title": "" }, { "docid": "9a02e0ff82af9e1ec472d0d93179bc66", "score": "0.54043263", "text": "public function find($id) {\n $sql = \"select * from trainer where id=?\";\n $row = $this->getDb()->fetchAssoc($sql, array($id));\n\n if ($row)\n return $this->buildDomainObject($row);\n else\n throw new \\Exception(\"No trainer matching id \" . $id);\n }", "title": "" }, { "docid": "3ed3229776985292a3e339923fcb115b", "score": "0.540258", "text": "protected static function createReturnLineItemRequest($return_line_item) \n {\n // verify the required parameter 'return_line_item' is set\n if ($return_line_item === null || (is_array($return_line_item) && count($return_line_item) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $return_line_item when calling createReturnLineItem'\n );\n }\n\n $resourcePath = '/returnLineItems';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n\n // body params\n $_tempBody = null;\n if (isset($return_line_item)) {\n $_tempBody = $return_line_item;\n }\n\n if ($multipart) {\n $headers = self::getHeaderSelector()->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = self::getHeaderSelector()->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if (self::getConfig()->getUserAgent()) {\n $defaultHeaders['User-Agent'] = self::getConfig()->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n self::getConfig()->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "90757ebbac6b5cb4ee13b3f856fd333d", "score": "0.539234", "text": "public static function GetLineItem($lid)\r\n\t{\r\n\t\t$lineItems = array();\r\n\t\ttry {\r\n\t\t\t$sql = 'SELECT * FROM credit_note_items WHERE id = '.$lid.' AND status = 1';\r\n\t\t\t$res = DatabaseHandler::GetRow($sql);\r\n\t\t\treturn new CreditNoteLine($item['invoice_id'], $item['item_name'], $item['item_desc'], $item['quantity'], $item['unit_price'], $item['tax']);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2274548e2a617bf459c5728883ba8184", "score": "0.537215", "text": "public function show($id)\n\t{\n $returnItems = ReturnItem::with(\n 'edition',\n 'magazine',\n 'invoiceDetail.invoice',\n 'agent')->find($id);\n return view('circulation/return-view', ['returnItem'=>$returnItems]);\n\t}", "title": "" }, { "docid": "91920187c1801ede20d0fdd9f4e30f66", "score": "0.5369451", "text": "public function actionLine($id)\n {\n\t\t$ol = DocumentLine::findOne($id);\n\t\t$work = $ol->getDocument()->one()->getWorks()->one();\n\t\t\n return $this->render('view', [\n 'model' => $work, // $this->findModel($work->id),\n\t\t\t'order_line' => $ol\n ]);\n }", "title": "" }, { "docid": "6debb3eb63e00fcf8a516b6c534af657", "score": "0.53589725", "text": "public static function GetLineItem($lid)\r\n\t{\r\n\t\t$lineItems = array();\r\n\t\ttry {\r\n\t\t\t$sql = 'SELECT * FROM invoice_items WHERE id = '.$lid.' AND status = 1';\r\n\t\t\t$item = DatabaseHandler::GetRow($sql);\r\n\t\t\treturn new SalesInvoiceLine($item['invoice_id'], $item['item_name'], $item['item_desc'], $item['quantity'], $item['unit_price'], $item['tax']);\r\n\t\t} catch (Exception $e) {\r\n\t\t\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "61661fc97362211d6f8614355dff2945", "score": "0.5280115", "text": "protected static function getReturnLineItemByIdAsyncWithHttpInfo($return_line_item_id) \n {\n $returnType = '\\Tradenity\\SDK\\Resources\\ReturnLineItem'; \n $request = self::getReturnLineItemByIdRequest($return_line_item_id); \n\n return self::getHttpClient()\n ->sendAsync($request, self::createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "title": "" }, { "docid": "12205c973f0317e412737fe49d2a3b24", "score": "0.5252966", "text": "public function edit($id)\r\n {\r\n if (!auth()->user()->can('direct_sell.access')) {\r\n abort(403, 'Unauthorized action.');\r\n }\r\n\r\n //Check if the transaction can be edited or not.\r\n $edit_days = request()->session()->get('business.transaction_edit_days');\r\n if (!$this->transactionUtil->canBeEdited($id, $edit_days)) {\r\n return back()\r\n ->with('status', [\r\n 'success' => 0,\r\n 'msg' => __('messages.transaction_edit_not_allowed', ['days' => $edit_days])\r\n ]);\r\n }\r\n\r\n //Check if return exist then not allowed\r\n if ($this->transactionUtil->isReturnExist($id)) {\r\n return back()->with('status', [\r\n 'success' => 0,\r\n 'msg' => __('lang_v1.return_exist')\r\n ]);\r\n }\r\n\r\n $business_id = request()->session()->get('user.business_id');\r\n\r\n $business_details = $this->businessUtil->getDetails($business_id);\r\n $taxes = TaxRate::forBusinessDropdown($business_id, true, true);\r\n\r\n $transaction = Transaction::where('business_id', $business_id)\r\n ->with(['price_group', 'types_of_service'])\r\n ->where('type', 'sell')\r\n ->findorfail($id);\r\n //Selling Price Group Dropdown\r\n $price_groups = SellingPriceGroup::forDropdown($business_id);\r\n $location_id = $transaction->location_id;\r\n $location_printer_type = BusinessLocation::find($location_id)->receipt_printer_type;\r\n\r\n $sell_details = TransactionSellLine::join(\r\n 'products AS p',\r\n 'transaction_sell_lines.product_id',\r\n '=',\r\n 'p.id'\r\n )\r\n ->join(\r\n 'variations AS variations',\r\n 'transaction_sell_lines.variation_id',\r\n '=',\r\n 'variations.id'\r\n )\r\n ->join(\r\n 'product_variations AS pv',\r\n 'variations.product_variation_id',\r\n '=',\r\n 'pv.id'\r\n )\r\n ->leftjoin('variation_location_details AS vld', function ($join) use ($location_id) {\r\n $join->on('variations.id', '=', 'vld.variation_id')\r\n ->where('vld.location_id', '=', $location_id);\r\n })\r\n ->leftjoin('units', 'units.id', '=', 'p.unit_id')\r\n ->where('transaction_sell_lines.transaction_id', $id)\r\n ->select(\r\n DB::raw(\"IF(pv.is_dummy = 0, CONCAT(p.name, ' (', pv.name, ':',variations.name, ')'), p.name) AS product_name\"),\r\n 'p.id as product_id',\r\n 'p.enable_stock',\r\n 'p.name as product_actual_name',\r\n 'pv.name as product_variation_name',\r\n 'pv.is_dummy as is_dummy',\r\n 'variations.name as variation_name',\r\n 'variations.sub_sku',\r\n 'p.barcode_type',\r\n 'p.enable_sr_no',\r\n 'variations.id as variation_id',\r\n 'units.short_name as unit',\r\n 'units.allow_decimal as unit_allow_decimal',\r\n 'transaction_sell_lines.tax_id as tax_id',\r\n 'transaction_sell_lines.item_tax as item_tax',\r\n 'transaction_sell_lines.unit_price as default_sell_price',\r\n 'transaction_sell_lines.unit_price_inc_tax as sell_price_inc_tax',\r\n 'transaction_sell_lines.unit_price_before_discount as unit_price_before_discount',\r\n 'transaction_sell_lines.id as transaction_sell_lines_id',\r\n 'transaction_sell_lines.quantity as quantity_ordered',\r\n 'transaction_sell_lines.sell_line_note as sell_line_note',\r\n 'transaction_sell_lines.lot_no_line_id',\r\n 'transaction_sell_lines.line_discount_type',\r\n 'transaction_sell_lines.line_discount_amount',\r\n 'transaction_sell_lines.res_service_staff_id',\r\n 'transaction_sell_lines.weight_excess',\r\n 'transaction_sell_lines.weight_loss',\r\n 'transaction_sell_lines.last_purchased_price',\r\n 'units.id as unit_id',\r\n 'transaction_sell_lines.sub_unit_id',\r\n DB::raw('vld.qty_available + transaction_sell_lines.quantity AS qty_available')\r\n )\r\n ->get();\r\n if (!empty($sell_details)) {\r\n foreach ($sell_details as $key => $value) {\r\n if ($transaction->status != 'final') {\r\n $actual_qty_avlbl = $value->qty_available - $value->quantity_ordered;\r\n $sell_details[$key]->qty_available = $actual_qty_avlbl;\r\n $value->qty_available = $actual_qty_avlbl;\r\n }\r\n\r\n $sell_details[$key]->formatted_qty_available = $this->transactionUtil->num_f($value->qty_available);\r\n $lot_numbers = [];\r\n if (request()->session()->get('business.enable_lot_number') == 1) {\r\n $lot_number_obj = $this->transactionUtil->getLotNumbersFromVariation($value->variation_id, $business_id, $location_id);\r\n foreach ($lot_number_obj as $lot_number) {\r\n //If lot number is selected added ordered quantity to lot quantity available\r\n if ($value->lot_no_line_id == $lot_number->purchase_line_id) {\r\n $lot_number->qty_available += $value->quantity_ordered;\r\n }\r\n\r\n $lot_number->qty_formated = $this->transactionUtil->num_f($lot_number->qty_available);\r\n $lot_numbers[] = $lot_number;\r\n }\r\n }\r\n $sell_details[$key]->lot_numbers = $lot_numbers;\r\n\r\n if (!empty($value->sub_unit_id)) {\r\n $value = $this->productUtil->changeSellLineUnit($business_id, $value);\r\n $sell_details[$key] = $value;\r\n }\r\n\r\n $sell_details[$key]->formatted_qty_available = $this->transactionUtil->num_f($value->qty_available);\r\n }\r\n }\r\n\r\n $commsn_agnt_setting = $business_details->sales_cmsn_agnt;\r\n $commission_agent = [];\r\n if ($commsn_agnt_setting == 'user') {\r\n $commission_agent = User::forDropdown($business_id);\r\n } elseif ($commsn_agnt_setting == 'cmsn_agnt') {\r\n $commission_agent = User::saleCommissionAgentsDropdown($business_id);\r\n }\r\n\r\n $types = [];\r\n if (auth()->user()->can('supplier.create')) {\r\n $types['supplier'] = __('report.supplier');\r\n }\r\n if (auth()->user()->can('customer.create')) {\r\n $types['customer'] = __('report.customer');\r\n }\r\n if (auth()->user()->can('supplier.create') && auth()->user()->can('customer.create')) {\r\n $types['both'] = __('lang_v1.both_supplier_customer');\r\n }\r\n $customer_groups = ContactGroup::forDropdown($business_id);\r\n\r\n $transaction->transaction_date = $this->transactionUtil->format_date($transaction->transaction_date, true);\r\n\r\n $pos_settings = empty($business_details->pos_settings) ? $this->businessUtil->defaultPosSettings() : json_decode($business_details->pos_settings, true);\r\n\r\n $waiters = null;\r\n if ($this->productUtil->isModuleEnabled('service_staff') && !empty($pos_settings['inline_service_staff'])) {\r\n $waiters = $this->productUtil->serviceStaffDropdown($business_id);\r\n }\r\n\r\n $invoice_schemes = [];\r\n $default_invoice_schemes = null;\r\n\r\n if ($transaction->status == 'draft') {\r\n $invoice_schemes = InvoiceScheme::forDropdown($business_id);\r\n $default_invoice_schemes = InvoiceScheme::getDefault($business_id);\r\n }\r\n\r\n $redeem_details = [];\r\n if (request()->session()->get('business.enable_rp') == 1) {\r\n $redeem_details = $this->transactionUtil->getRewardRedeemDetails($business_id, $transaction->contact_id);\r\n\r\n $redeem_details['points'] += $transaction->rp_redeemed;\r\n $redeem_details['points'] -= $transaction->rp_earned;\r\n }\r\n\r\n $edit_discount = auth()->user()->can('edit_product_discount_from_sale_screen');\r\n $edit_price = auth()->user()->can('edit_product_price_from_sale_screen');\r\n\r\n //Accounts\r\n $accounts = [];\r\n if ($this->moduleUtil->isModuleEnabled('account')) {\r\n $accounts = Account::forDropdown($business_id, true, false);\r\n }\r\n\r\n $contact_id = $this->businessUtil->check_customer_code($business_id, 1);\r\n $type = 'customer'; //contact type /used in quick add contact\r\n $shipping_statuses = $this->transactionUtil->shipping_statuses();\r\n\r\n $user = User::where('id', Auth::user()->id)->select('toggle_popup')->first();\r\n if (!empty($user)) {\r\n $toggle_popup = $user->toggle_popup;\r\n } else {\r\n $toggle_popup = 1;\r\n }\r\n\r\n $is_sales_page = 1;\r\n\r\n return view('sell.edit')\r\n ->with(compact('is_sales_page', 'business_details', 'toggle_popup', 'contact_id', 'taxes', 'sell_details', 'transaction', 'commission_agent', 'type', 'types', 'customer_groups', 'price_groups', 'pos_settings', 'waiters', 'invoice_schemes', 'default_invoice_schemes', 'redeem_details', 'edit_discount', 'edit_price', 'accounts', 'shipping_statuses'));\r\n }", "title": "" }, { "docid": "49744e70d45455b5856382227f2c8f2f", "score": "0.52102214", "text": "public function setOrderLineItemID($orderLineItemID)\n {\n $this->orderLineItemID = $orderLineItemID;\n return $this;\n }", "title": "" }, { "docid": "0c07142419bf417f938f3470f93199c6", "score": "0.52000874", "text": "public function getLineItem()\n {\n return $this->lineItem instanceof LineItemBuilder ? $this->lineItem->build() : $this->lineItem;\n }", "title": "" }, { "docid": "6f643fe603692a33384d7fe1053b3e32", "score": "0.51864403", "text": "public static function find($id) {\r\n return Doctrine::getTable ( 'PurchaseInvoices' )->findOneBy ( 'purchase_id', $id );\r\n }", "title": "" }, { "docid": "9f8201fd06a61fd53387f9c6a5597dbd", "score": "0.5176835", "text": "public function invoice($id = null);", "title": "" }, { "docid": "d704b44988b1bb3d00c733c9e044882f", "score": "0.51545155", "text": "public function getRecord($data){\n\t\t$this->db->where('id',$data);\n\t\tif($query = $this->db->get('sales_return')){\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "4b50e4fe1bebc4547e53bf64ddf8cd07", "score": "0.5143861", "text": "function get($id) {\r\n/*\t\t$orderitemObj = OrderItemPeer::retrieveByPK($id);\r\n return $orderitemObj;\r\n*/\r\n\t\t$orderItem = OrderItemQuery::create()->findByPK($id);\r\n\t\treturn $orderItem;\r\n }", "title": "" }, { "docid": "1e9a1fca71247dfad300a441c793332a", "score": "0.51332134", "text": "public function getEventLineItem()\n {\n return $this->eventLineItem;\n }", "title": "" }, { "docid": "36fc146f968b0de5dd269c0cbf5d90b2", "score": "0.51310325", "text": "public function findById($id) {\n return $this->em->getRepository(self::ENTITY_NAME)->find($id);\n }", "title": "" }, { "docid": "a54ce17bd202311b5ad87b7a3c893a3c", "score": "0.51270235", "text": "public function getInvoice($id){\r\n\t\t$this->db->query(\"SELECT * FROM invoices\r\n\t\t\t\t\t\tWHERE invoices.id = :id\t\t\t\r\n\t\t\");\r\n\t\t$this->db->bind(':id', $id);\r\n\t\t\r\n\t\t//Assign Row\r\n\t\t$row = $this->db->single();\r\n\t\t\r\n\t\treturn $row;\r\n\t}", "title": "" }, { "docid": "5d90b9dad4ff52b396a8b6827467ec43", "score": "0.50882596", "text": "public function invoice($id = 0)\n {\n $UserAuth = $this->Session->read('UserAuth');\n if (empty($UserAuth)) {\n return $this->redirect('login');\n }\n $userId = $this->Session->read('UserAuth.User.id');\n $user_group = $this->Session->read('UserAuth.UserGroup.alias_name');\n\n\n\n if (!$this->Order->exists($id)) {\n throw new NotFoundException(__('Invalid order'));\n }\n $options = array ();\n\n $options['conditions'][]['Order.' . $this->Order->primaryKey] = $id;\n switch ($user_group) {\n case 'Admin':\n\n break;\n default:\n $options['conditions'][]['Order.user_id'] = $userId;\n break;\n }\n\n $this->Order->recursive = 2;\n $order = $this->Order->find('first', $options);\n $this->set(compact('order'));\n\n\n }", "title": "" }, { "docid": "bece27b18c70ac0eb68f36d7e6f5c6dd", "score": "0.50880605", "text": "protected function findModel($id)\n {\n if (($model = OrderReturn::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "df521e433e70bddeb0be364abaa17022", "score": "0.50848395", "text": "public function getLineItemKey()\n {\n return $this->lineItemKey;\n }", "title": "" }, { "docid": "df521e433e70bddeb0be364abaa17022", "score": "0.50848395", "text": "public function getLineItemKey()\n {\n return $this->lineItemKey;\n }", "title": "" }, { "docid": "4787aae7bf841e5e371045b946adb88d", "score": "0.50759584", "text": "public function getDetailRowById($id)\n\t{\n\t\t$sql = new Sql($this->dbAdapter);\n\t\t$select = $sql->select();\n\t\t$select\n\t\t//->columns(array('id_company', 'name_company', 'brand', 'rfc', 'website', 'business', 'interestingin'))\n\t\t->from(array('s' => $this->table))\n\t\t->join(array('u_s' => 'users_shipping'), 's.id_shipping = u_s.id_shipping', array('id_user','type_user', 'amount'), 'LEFT')\n\t\t->join(array('i_u' => 'iof_users'),'u_s.id_user = i_u.user_id',array('name', 'surname', 'lastname'), 'LEFT')\n\t\t->join(array('c' => 'company'), 's.company_ID = c.id_company', array('name_company'), 'LEFT')\n\t\t->join(array('d' => 'destinations'), 's.id_destination = d.id_destination', array('name_destination', 'description_destination'), 'LEFT')\n\t\t->where(array('s.id_shipping' => $id));\n\t\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\n\t\t$execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\n\t\t$result = $execute->toArray();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1a7647f4eae709604f84ba7668f554df", "score": "0.5069739", "text": "public function findById($id){\n $order = Order::where(['id' => $id])->first();\n return $order;\n }", "title": "" }, { "docid": "f10506503b4cf176978965ca4e9022e8", "score": "0.5056102", "text": "public function getCustomLineItemId()\n {\n return $this->customLineItemId;\n }", "title": "" }, { "docid": "a048ce12dea4f90195221452ffd6162e", "score": "0.5044713", "text": "public function findById($id) {\n $sql = $this->getSelectStatement() . ' where ' . $this->getPrimaryKeyName() . '=:id';\n $statement = DatabaseHelper::runQuery($this->connection, $sql, Array(':id' => $id));\n return $statement->fetch();\n }", "title": "" }, { "docid": "e520d43537db9a099474c90c2afff68e", "score": "0.5038098", "text": "public function findById($id)\n {\n return Invite::whereId($id)->get();\n }", "title": "" }, { "docid": "a698f388bbb08a7c3a586ed5c7e6d4c3", "score": "0.5035228", "text": "public function getOne($id)\n {\n return $this->salon->where('id',$id)->with('addresses')->first();\n }", "title": "" }, { "docid": "6f88be23586e86a0702bdfaa0d2e60d6", "score": "0.502861", "text": "public static function getReturnLineItemByIdAsync($return_line_item_id)\n {\n return self::getReturnLineItemByIdAsyncWithHttpInfo($return_line_item_id)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "9db0d2a00e91b570ec50d17c7dddc45c", "score": "0.5022083", "text": "public function find($id)\n {\n return $this->em->createQueryBuilder()\n ->from(Order::class, 'o')\n ->select('o')\n ->andWhere('o.id = :id')\n ->setParameter('id', $id)\n ->getQuery()\n ->getOneOrNullResult();\n }", "title": "" }, { "docid": "3e1d290551b7bca53431724e7322217d", "score": "0.5013441", "text": "function lineupGet($id){\n\t$lineup = new \\Spuzik\\Users\\Lineup();\n\t$lineup->load($id);\n\techo $lineup->toJSON();\n\n\t$lineup = null;\n}", "title": "" }, { "docid": "983f50da62d73ccb02ce153aaaecc236", "score": "0.5011856", "text": "public function findById($id)\r\n {\r\n return $this->findByField('id', $id)->first();\r\n }", "title": "" }, { "docid": "baa6fb1f20f07e7e40ffe82f7f67ef41", "score": "0.50116795", "text": "public function getLedgerReceiptId(): ?int;", "title": "" }, { "docid": "959999f553e1c7cb4e1b6f20d95d435f", "score": "0.5001638", "text": "function getSingleRecordById($id){\n \ttry {\n \t\tif (Fuelinventorydetail::where('Id', $id)->exists()) {\n $singleRecord = Fuelinventorydetail::where('Id', $id)->get()->toJson(JSON_PRETTY_PRINT);\n return response($singleRecord,200);\n } else {\n return response()->json([\n \"message\" => \"Record not found\"\n ], 404);\n }\n \t} catch (Exception $e) {\n \t\treturn $e;\n \t}\n }", "title": "" }, { "docid": "54a0522de4d3977e34eb59b3415db071", "score": "0.49876314", "text": "public function findItem($id);", "title": "" }, { "docid": "ba0bd6a84d4fe492bdfee21a8f3afa0f", "score": "0.4975594", "text": "public function getOrderById($id);", "title": "" }, { "docid": "620308ef638a244cb316a7b0c3af6e01", "score": "0.49727422", "text": "public function findRecordById($id)\n {\n $rowset = $this->select(['id' => $id]);\n $row = $rowset->current();\n\n return $row;\n }", "title": "" }, { "docid": "5be8e2db955a9ffb01431bf4734540e5", "score": "0.4972396", "text": "public function findById($id = \"\")\n {\n $this->db->where('id_estatico', $id);\n return $this->db->get('estatico')->row();\n }", "title": "" }, { "docid": "6685c1a5c49a08700810e15f78a2e4e1", "score": "0.49692476", "text": "public function findItem($id)\n {\n return $this->model->findOrFail($id);\n }", "title": "" }, { "docid": "b833eccd489f0fde8d1804d3806c9dc5", "score": "0.49668753", "text": "public function find($id)\n {\n return $this->customer->where('id', $id)->first();\n }", "title": "" }, { "docid": "b0ad03bd592b9b3555a827f94fdd4d6f", "score": "0.49547428", "text": "public function getReturnNotes($returnId)\r\n\t{\r\n\t\t$mozuClient = OrderNoteClient::getReturnNotesClient($returnId);\r\n\t\t$mozuClient = $mozuClient->withContext($this->apiContext);\r\n\t\t$mozuClient->execute();\r\n\t\treturn $mozuClient->getResult();\r\n\r\n\t}", "title": "" }, { "docid": "215322e3bd66b9f49eed153e238fd2a5", "score": "0.4951508", "text": "public function find($id)\n {\n return $this->retailerRepository->find($id);\n }", "title": "" }, { "docid": "39b853fa861cfba26a38d43a5b1a4a7d", "score": "0.49480727", "text": "public function getRefData($returnID) {\n try {\n $sql = \"SELECT `OwnerUserID`, `InvoiceID`, `Status` FROM `returns` WHERE `ReturnID` = '{$returnID}'\";\n $stmt = $this->conn->query($sql, PDO::FETCH_ASSOC);\n $result = $stmt->fetch();\n return $result;\n } catch (PDOException $err) {\n $_SESSION[\"message\"] = msgPrep(\"danger\", \"Error - Returns/getRefData Failed: {$err->getMessage()}\");\n return false;\n }\n }", "title": "" }, { "docid": "9eb6233ab752ee21139112f811f4e0dc", "score": "0.4939612", "text": "public static function updateReturnLineItemById($return_line_item_id, $return_line_item)\n {\n list($response) = self::updateReturnLineItemByIdWithHttpInfo($return_line_item_id, $return_line_item);\n return $response;\n }", "title": "" }, { "docid": "77b240f0bd0efe82e7e60d8ff564f29d", "score": "0.4927629", "text": "public function id($id){\n return $this->query->find($id);\n }", "title": "" }, { "docid": "0306180749c203f6fcc7bd00ba9e5b87", "score": "0.4925601", "text": "public function actionReturn($id)\n\t{\n\t\tYii::app()->MAyBxCgTKStni_pYPNUb1122->JpLnRZIvtolT();\n\t\t$old=$this->loadModel($id);\n\n\t\t$admin_pwd = isset($_GET['admin_pwd'])?$_GET['admin_pwd']:'';\n\t\tif (!$admin_pwd){\n\t\t\tYii::app()->user->setFlash('error','Please enter admin password to continue');\t\t\t\n\t\t\t$this->redirect(array('view','id'=>$old->id));\n\t\t}\n\n\t\tif ( !$this->cekAdminPwd($admin_pwd) ){\n\t\t\tYii::app()->user->setFlash('error','Incorrect admin password, please try again');\t\t\t\n\t\t\t$this->redirect(array('view','id'=>$old->id));\n\t\t}\n\n\n\t\t/* header */\n\t\t$model=new Order;\n\t\t$model->number = 'Unposted Return/'.date(\"YmdHis\");\n\t\t$model->order_date = date(\"Y-m-d H:i:s\");\n\t\t$model->salesman_id = Yii::app()->user->id ;\n\t\t$model->state=ORDER_NEW;\n\t\t$model->total_paid=0;\n\t\t$model->total_change=0;\n\t\t$model->notes='Return ' . $old->notes;\n\t\t$model->session_id=Yii::app()->session['session_id'];\n\n\t\tif(!$model->save()){\n\t\t\tdie('error save order');\n\t\t}\n\n\t\t/* details */\n\t\tforeach ($old->orderDetails as $od){\n\t\t\t$newOd = new OrderDetail;\n\t\t\t$newOd->product_id = $od->product_id;\n\t\t\t$newOd->order_id = $model->id;\n\t\t\t$newOd->qty = -$od->qty;\n\t\t\t$newOd->unit_price = $od->unit_price;\n\t\t\t$newOd->amount = $newOd->qty * $newOd->unit_price;\n\t\t\t$newOd->tax \t\t= $od->tax;\n\t\t\tif(!$newOd->save()){\n\t\t\t\tdie('error save order detail');\n\t\t\t}\n\t\t}\n\n\n\t\t$this->redirect(array('view','id'=>$model->id));\n\t}", "title": "" }, { "docid": "8eb258672b591dd29d272ccc33774eff", "score": "0.49200514", "text": "public function getInvoice($invoiceId);", "title": "" }, { "docid": "6b065f218845c298cc7c869eb4695219", "score": "0.49186102", "text": "public function _find($id) {\n return $this->call('', array('id' => $id));\n }", "title": "" }, { "docid": "2f33c5a6b460f2ee687d46d95171a628", "score": "0.49164236", "text": "private function _getRecordById($id)\n {\n $record = RerouteRecord::find()\n ->where(['id' => $id])\n ->one();\n\n return $record;\n }", "title": "" }, { "docid": "9ba61b44a81d0989b2631ebc070d7a06", "score": "0.49153423", "text": "public function getRowById($id)\n\t{\n\t\t$sql = new Sql($this->dbAdapter);\n\t\t$select = $sql->select();\n\t\t$select\n\t\t//->columns(array('id_company', 'name_company', 'brand', 'rfc', 'website', 'business', 'interestingin'))\n\t\t->from(array('s' => $this->table))\n\t\t->join(array('u_s' => 'users_shipping'), 's.id_shipping = u_s.id_shipping', array('id_user','type_user', 'amount'), 'LEFT')\n\t\t->where(array('s.id_shipping' => $id));\n\t\n\t\t$selectString = $sql->getSqlStringForSqlObject($select);\n\t\t$execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\n\t\t$result = $execute->toArray();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c31e23d785aca106c80387bfcec5b7f5", "score": "0.4914222", "text": "public function getInvoiceDetailById($id)\n {\n $this->db->select('orders.*, invoices.*');\n $this->db->from('invoices');\n $this->db->join('orders', 'orders.id = invoices.order_id');\n $this->db->where('invoices.id', $id);\n return $this->db->get()->row_array();\n }", "title": "" }, { "docid": "d6706fa27e50f5673d0104a08757613c", "score": "0.4911485", "text": "function findById($_id) {\n\t\treturn $this->Store->read(\"Extra_{$_id}\");\n\t}", "title": "" }, { "docid": "b14a01e59abaeec92f618907ba71e981", "score": "0.48999673", "text": "public function getRowById($id)\n\t{\n\t\t$list = $this->getList();\n\t\twhile ($row = $list->fetch())\n\t\t{\n\t\t\tif ($row['ID'] == $id)\n\t\t\t{\n\t\t\t\treturn $row;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "572c4c1abd9dfdd54d5f2d5429e80b2c", "score": "0.489405", "text": "public function getById(int $id);", "title": "" }, { "docid": "e1c8de0981d8c3844b300cac4348246d", "score": "0.4887326", "text": "public function _findById( $id )\r\n\t{\r\n\t\t$sql = sprintf( 'select * from %s where id = :id' , $this->CurrentObject->getTable() );\r\n\t\t$sth = $this->PDO->prepare( $sql );\r\n\t\t$sth->binds( [ ':id' => $id ] );\r\n\t\t$sth->execute();\r\n\r\n\t\treturn $sth->fetchObject();\r\n\t}", "title": "" }, { "docid": "50335c79f8c012dc71cd6082a2b9beb2", "score": "0.48870176", "text": "function getById( $id ){\n return $this->getWithJoins( \" \\nWHERE \".$this->tablename.\".id = $id\" );\n }", "title": "" }, { "docid": "4ebb45165042e86a7fd9fbc1aea28211", "score": "0.48647466", "text": "public static function replaceReturnLineItemById($return_line_item_id, $return_line_item)\n {\n list($response) = self::replaceReturnLineItemByIdWithHttpInfo($return_line_item_id, $return_line_item);\n return $response;\n }", "title": "" }, { "docid": "5d55d007d8c2d0a010778bd058942f21", "score": "0.48625803", "text": "public function getSalesReturnItems($sales_return_id,$warehouse_id){\n\t\t$this->db->select('si.*,wp.quantity as warehouses_quantity,pr.product_id,pr.code,pr.name,pr.unit,pr.price,pr.cost,pr.hsn_sac_code')\n\t\t\t\t ->from('sale_return_items si')\n\t\t\t\t ->join('products pr','si.product_id = pr.product_id')\n\t\t\t\t ->join('warehouses_products wp','wp.product_id = pr.product_id')\n\t\t\t\t ->where('si.sale_return_id',$sales_return_id)\n\t\t\t\t ->where('wp.warehouse_id',$warehouse_id);\n\t\tif($query = $this->db->get()){\n\t\t\treturn $query->result();\n\t\t}\n\t\telse{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "94ae67ee2a638c0feaa6a497f284f6cc", "score": "0.48535028", "text": "function get( $id=0 ){\n if( $id != 0 ) $this->id = $id;\n return $this->retrieve( $this->id );\n }", "title": "" }, { "docid": "93f24bf7403fd0f1747a42fbb640e880", "score": "0.48517787", "text": "public function find($id)\n {\n return $this->getRepository()->find($id);\n }", "title": "" }, { "docid": "3bcb48c370e0972bf17c01f3f845ff75", "score": "0.4848558", "text": "public function findById($id)\n {\n return $this->getRepository()->find($id);\n }", "title": "" }, { "docid": "bb8621c1bb1a3d4e10abba55309f7eea", "score": "0.48452106", "text": "public function getReturnId($reference){\n\tlist($id_return_order)=dbFetchArray(dbQuery(\"SELECT id_return_order FROM tbl_return_order WHERE reference = '$reference'\"));\n\treturn $id_return_order;\n}", "title": "" }, { "docid": "cf18be0b7c05c965a85694b3e19aefdf", "score": "0.4841528", "text": "public function show($id)\n {\n $returninfo = Returninfo::findorFail($id);\n return view('returninfo.show')->with('returninfo',$returninfo);\n }", "title": "" }, { "docid": "bf73f5e7502136878f72458b0ad1a5ae", "score": "0.4833576", "text": "public function find($id) {\n\t\treturn $this->model->find($id);\n\t}", "title": "" }, { "docid": "bf73f5e7502136878f72458b0ad1a5ae", "score": "0.4833576", "text": "public function find($id) {\n\t\treturn $this->model->find($id);\n\t}", "title": "" }, { "docid": "25daa58c03237596894664d62fd645a2", "score": "0.48261923", "text": "public function find($id)\n {\n return $this->_sm->find($this->_entityName, $id);\n }", "title": "" }, { "docid": "160ce0e3833fde7bd85db661b4cfe4c4", "score": "0.48158887", "text": "public function find($id)\n\t{\n\t\treturn $this->model->find($id);\n\t}", "title": "" }, { "docid": "f9fb5f1ea592fd3374eb4780b9c5830e", "score": "0.48142418", "text": "public function invoice(string $invoiceId): Invoice;", "title": "" }, { "docid": "498a877d29e96c2102f879481324f4c6", "score": "0.48111004", "text": "public function getById( $id );", "title": "" }, { "docid": "12f2df68edb5d6bf23645c5ac9f03f31", "score": "0.481104", "text": "public function get($id, $throw = true);", "title": "" }, { "docid": "d31d763d0be1ee4e366bebac79422616", "score": "0.48051223", "text": "protected function getRecord($id)\n {\n // if (empty($this->customSelect)) {\n $primaryKey = unserialize($id);\n $record = call_user_func_array(\n array($this->obj, 'find'),\n array_values($primaryKey)\n )->toArray();\n /*} else {\n $primaryKey = unserialize($id);\n $db = \\Zend_Registry::get($this->dbAdapter);\n $select = $this->customSelect;\n foreach ($primaryKey as $key => $value) {\n $select->where($key . ' = ?', trim($value));\n }\n var_dump($db->fetchRow($select));\n exit;\n }*/\n \n return $record;\n }", "title": "" }, { "docid": "aaf6100e4bad8bc89d78d05108f6cf62", "score": "0.48049393", "text": "function getReturnOnID($sales_id){\n $this->db->select('rc.*, drc.*, prd.prd_name');\n $this->db->from($this->rc_tb.' as rc');\n $this->db->join($this->drc_tb.' as drc', 'rc.'.$this->rc_f[0].'=drc.'.$this->drc_f[1], 'LEFT');\n $this->db->join('tb_product as prd', 'drc.'.$this->drc_f[2].'=prd.prd_id', 'LEFT');\n $this->db->where('rc.'.$this->rc_f[1], $sales_id);\n $resultSelect = $this->db->get();\n return $resultSelect->result_array();\n }", "title": "" }, { "docid": "3c9c5a05a6388aeb499ebf8a51317d9e", "score": "0.48008007", "text": "public function getList($invoiceID = null) {\n try {\n if ($invoiceID == null) {\n $sql = \"SELECT `ReturnID`, `InvoiceID`, `ItemCount`, `ProductCount`, `RefundTotal`, `AddedTimestamp`, `OwnerUserID`, `ReturnStatus`, `Status` FROM `returns` ORDER BY `ReturnID` DESC\";\n } else {\n $sql = \"SELECT `ReturnID`, `InvoiceID`, `ItemCount`, `ProductCount`, `RefundTotal`, `AddedTimestamp`, `OwnerUserID`, `ReturnStatus`, `Status` FROM `returns` WHERE `InvoiceID` LIKE '%{$invoiceID}%' ORDER BY `ReturnID` DESC\";\n }\n $stmt = $this->conn->query($sql, PDO::FETCH_ASSOC);\n $result = $stmt->fetchAll();\n return $result;\n } catch (PDOException $err) {\n $_SESSION[\"message\"] = msgPrep(\"danger\", \"Error - Returns/getList Failed: {$err->getMessage()}\");\n return false;\n }\n }", "title": "" }, { "docid": "47128376946ba4f0ed9748ce0233ca72", "score": "0.48006824", "text": "public function findByid($id);", "title": "" }, { "docid": "07783f98a6d248d92a860edd199ba7fb", "score": "0.4798998", "text": "public function loadModel($id)\n\t{\n\t\t$model=ClaimLine::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" }, { "docid": "a648b13c9b20df2fa3392c0795dbce1e", "score": "0.4796653", "text": "function get_by_id($id)\n {\n $this->db->where('res_id', $id);\n $query = $this->db->get('fis_rresources');\n return $query->row(); //untuk memastikan baris dari query tersebut ada\n }", "title": "" } ]
ec021e7789442984d51f55f63cc23647
Changes the data in the user's table.
[ { "docid": "137a8166672e854458e92c63e9d7ffab", "score": "0.0", "text": "public function updateInfo(array $d): bool\n {\n if ($this->checkSession()) {\n $update = [];\n foreach ($d as $key => $val) {\n if (($key !== $this->fields['id'])\n && ($key !== $this->fields['cfg'])\n && ($key !== 'auth')\n && ($key !== 'admin')\n && ($key !== 'dev')\n && ($key !== 'pass')\n ) {\n $update[$key] = $val;\n }\n }\n\n if (\\count($update) > 0) {\n $r = (bool)$this->update($this->getId(), $update, true);\n /** @todo Why did I do this?? */\n if ($r) {\n /** @todo WTF?? */\n $this->setSession(['cfg' => false]);\n $this->_user_info();\n }\n }\n return $r ?? false;\n }\n\n return false;\n }", "title": "" } ]
[ { "docid": "781db38885fc8fef73df20616aea429c", "score": "0.72263634", "text": "public function update_user_store_table()\n {\n $this->account_model->update_user_store_table($this->user); \n }", "title": "" }, { "docid": "1b44a6217b71acb95495863747d3a0e6", "score": "0.714584", "text": "protected function updateUser()\n {\n $this->queryBuilder->update($this->tableName);\n $this->logger->debug(sprintf('[%s] Executed UPDATE query: %s', $this->tableName, $this->queryBuilder->getSQL()));\n $this->queryBuilder->execute();\n }", "title": "" }, { "docid": "ad0c1968757d50fcc3ecc5d8bfd3b0a9", "score": "0.70971704", "text": "public function update() {\r\n $this->connection->update(\r\n \"gen_user\", array(\r\n \"login\" => \"'\" . $this->observer->login . \"'\",\r\n \"name\" => \"'\" . $this->observer->name . \"'\",\r\n \"active\" => ($this->observer->active ? \"1\" : \"0\"),\r\n \"email\" => \"'\" . $this->observer->email . \"'\",\r\n \"lastLogin\" => \"'\" . $this->observer->lastLogin->format(\"Y-m-d H:i:s\") . \"'\",\r\n \"logged\" => 0), array(\"iduser\" => $this->observer->iduser), $this->user->iduser\r\n );\r\n }", "title": "" }, { "docid": "9edcb8b67e5537b55551c8d68fc38bf5", "score": "0.7018465", "text": "public function change()\n {\n $userTable = $this->table('user');\n $userTable->addColumn('username', 'string')\n ->addColumn('email', 'string')\n ->addColumn('passwordHash', 'string')\n ->addColumn('fullname', 'string')\n ->create();\n\n $userDataFieldTable = $this->table('user_data_field');\n $userDataFieldTable->addColumn('fieldName', 'string')\n ->create();\n\n $userDataTable = $this->table('user_data');\n $userDataTable->addColumn('fieldID', 'integer')\n ->addForeignKey('fieldID', $userDataFieldTable, 'id', [\n 'delete' => 'CASCADE',\n 'update' => 'NO_ACTION'\n ])\n ->addColumn('userID', 'integer')\n ->addForeignKey('userID', $userTable, 'id', [\n 'delete' => 'CASCADE',\n 'update' => 'NO_ACTION'\n ])\n ->addColumn('value', 'binary')\n ->create();\n\n }", "title": "" }, { "docid": "02b266ef8be36f2de22121b9dcbd6fad", "score": "0.6952875", "text": "function updateUser($vals)\r\n\t {\r\n\t\t$this->dataClass->updateRecord($vals); \r\n\t }", "title": "" }, { "docid": "255941493aa447411160c3d523fc3d91", "score": "0.68389064", "text": "public function updateData() {\n $this->setData( $this->proxy->getUser( $this->getApiId() ) );\n }", "title": "" }, { "docid": "9a0078d3eeab880d3e31778bb8b1e17f", "score": "0.682999", "text": "function edit_user($data)\n\t{\n\t\textract($data);\n\t\t\n\t\t// $query=\"UPDATE rules SET rule_title='$rule_title', rule_content= '$rule_content' WHERE rule_id=\".$rule_id.\" \";\n\t\t$data = array(\n\t\t\t'user_name' => $edit_userName,\n\t\t\t'user_password' => $edit_userPassword,\n\t\t\t'user_role'\t=>\t$edit_userRole,\n\t\t\t'access_privilege'\t=>\t$edit_userRole\n\t\t);\n\t\t\n\t\t$this->db->where('user_id', $edituser_id);\n\t\t$result =$this->db->update('user_tab', $data); \n\t\t\n\t\tif($result){\n\t\t\treturn \"Updated successfully\";\n\t\t}\n\t\telse{\n\t\t\treturn \"Updation failed\";\n\t\t}\n\t}", "title": "" }, { "docid": "30c94f77ce346c0bd06c7ddce174dbe0", "score": "0.6769062", "text": "public function change()\n {\n $table = $this->table('user');\n $table->addColumn(\"firstname\", \"string\", array('length' => 64, 'null' => true))\n ->save();\n }", "title": "" }, { "docid": "d38b13418a13ae3eb23226807fd9c708", "score": "0.67229825", "text": "public function change()\n {\n $usertexts = $this->table('UserTexts', array('id'=> false,'primary_key' => array('idUserTexts')));\n $usertexts->addColumn('idUserTexts','integer')\n ->addColumn('avatar','text',array('limit' => MysqlAdapter::TEXT_REGULAR,'null' => true))\n ->addColumn('hobbys','text',array('limit' => MysqlAdapter::TEXT_TINY,'null' => true))\n ->addColumn('description','text',array('limit' => MysqlAdapter::TEXT_REGULAR,'null' => true))\n ->addForeignKey('idUserTexts','User','idUser',array('delete'=> 'NO_ACTION', 'update'=> 'NO_ACTION'))\n ->create();\n }", "title": "" }, { "docid": "196249078eaeb23ce7b7203eb335b6fd", "score": "0.6667233", "text": "public function testUpdate()\n {\n $id = $this->tester->grabRecord('common\\models\\User', ['username' => 'testeUser']);\n $user = User::findOne($id);\n $user->username = 'testeUserUpdate';\n $user->update();\n $this->tester->seeRecord('common\\models\\User', ['username' => 'testeUserUpdate']);\n }", "title": "" }, { "docid": "f49b11ef229a8df38e24d10c97d87d46", "score": "0.665532", "text": "static public function mdlEditUser($table, $data){\n\n\t\t$stmt = Connection::connect()->prepare(\"UPDATE $table set name = :name, password = :password, profile = :profile, picture = :picture WHERE username = :username\");\n\n\t\t$stmt -> bindParam(\":name\", $data[\"name\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":username\", $data[\"username\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":password\", $data[\"password\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":profile\", $data[\"profile\"], PDO::PARAM_STR);\n\t\t$stmt -> bindParam(\":picture\", $data[\"picture\"], PDO::PARAM_STR);\n\n\t\tif ($stmt->execute()) {\t\n\t\t\treturn 'ok';\n\t\t} else {\t\t\t\n\t\t\treturn 'error';\n\t\t}\t\t\n\t\t$stmt -> close();\n\t\t$stmt = null;\n\t}", "title": "" }, { "docid": "aebdd4b8b18b3c3355ad570639b2825c", "score": "0.6607764", "text": "public function set()\n {\n $users = User::findAll(['id' => (array)$this->user_id]);\n foreach ($users as $user) {\n $data = [\n 'title' => $this->title,\n 'text' => $this->text,\n 'user_id' => $user->id,\n 'user_email' => $user->email,\n 'notification_type_id' => $this->notification_type_id,\n ];\n\n $this->saveData($data);\n }\n\n }", "title": "" }, { "docid": "c58b7863f36cd534f0b52583cc7ffdd4", "score": "0.6516104", "text": "public function changeInfo($data){\n //Creates query\n $this->db->query('UPDATE users SET User_First_Name = :firstName, User_Last_Name = :lastName, Email = :email, Timezone = :timezone,\n Buisness_User = :buisness_user WHERE User_Id = :userId ');\n //Binds the variables to the query\n $this->db->bind(':firstName', $data['first_name'] );\n $this->db->bind(':lastName', $data['last_name'] );\n $this->db->bind(':email', $data['email'] );\n $this->db->bind(':timezone', $data['timezone'] );\n //The database reads buisness user as a 0 or 1 as a boolean so have to conver string to boolean\n if($data['buisness_user'] == \"sub\"){\n $this->db->bind(':buisness_user', 1);\n //Changes session\n $_SESSION['buisness_user_account_type'] == true;\n }else if($data['buisness_user'] == \"unSub\"){\n $this->db->bind(':buisness_user', 0);\n //Changes session\n $_SESSION['buisness_user_account_type'] == false;\n }else{\n if($_SESSION['buisness_user_account_type'] == true){\n $this->db->bind(':buisness_user', 1);\n }else{\n $this->db->bind(':buisness_user', 0);\n }\n }\n \n $this->db->bind(':userId', $_SESSION['user_id']);\n\n $_SESSION['user_timezone'] = $data['timezone'];\n //executes query\n if($this->db->execute()){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "feccb72992c3e9a458f04c774ba3bb1c", "score": "0.64864105", "text": "function update() {\r\n\t\ttry {\r\n\t\t\t$stmt = getDB ()->prepare ( \"UPDATE users SET username=:username, email=:email, password=:password, group_id=:group_id, activationkey=:activationkey, forgotkey=:forgotkey, salt=:salt WHERE id=:id\" );\r\n\t\t\t$stmt->execute ( array (\r\n\t\t\t\t\t\"username\" => $this->username,\r\n\t\t\t\t\t\"password\" => $this->password,\r\n\t\t\t\t\t\"group_id\" => $this->group_id,\r\n\t\t\t\t\t\"activationkey\" => $this->activationkey,\r\n\t\t\t\t\t\"forgotkey\" => $this->forgotkey,\r\n\t\t\t\t\t\"email\" => $this->email,\r\n\t\t\t\t\t\"salt\" => $this->salt,\r\n\t\t\t\t\t\"id\" => $this->id \r\n\t\t\t) );\r\n\t\t} catch ( Exception $ex ) {\r\n\t\t\tsetSession ( \"error\", $ex->getMessage () );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b88417e700eaa873e82a1ee99fe95d6a", "score": "0.6481108", "text": "public function change()\n {\n $table = $this->table('users');\n if ($table->hasColumn('code')) {\n $table->changeColumn('code', 'text', ['null' => true])\n ->update();\n }\n\n // Get all users that have codes\n $usersWithCodes = $this->fetchAll('SELECT * FROM users WHERE code IS NOT NULL');\n foreach ($usersWithCodes as $userData) {\n if (empty($userData['code'])) {\n continue;\n }\n\n $expires = new \\DateTime($userData['code_expires']);\n $expires->setTime(23, 59, 59);\n\n $updated = new \\DateTime($userData['updated']);\n $jwtConfig = new \\Lcobucci\\JWT\\Configuration();\n $token = $jwtConfig->createBuilder()\n ->canOnlyBeUsedBy($userData['user_id'])\n ->issuedAt($updated->getTimestamp())\n ->canOnlyBeUsedAfter($updated->getTimestamp())\n ->expiresAt($expires->getTimestamp())\n ->identifiedBy($userData['code'])\n ->getToken();\n\n $this->getOutput()->writeln(sprintf('Changing code [%s] for: %s', $userData['code'], $userData['user_id']));\n // Update to JWT Token\n $this->execute(\n 'UPDATE users ' .\n 'SET code = \"' . $token->__toString() . '\"' .\n 'WHERE user_id = \"' . $userData['user_id'] . '\"'\n );\n }\n\n // Remove other columns\n if ($table->hasColumn('code_starts')) {\n $table->removeColumn('code_starts');\n }\n\n if ($table->hasColumn('code_expires')) {\n $table->removeColumn('code_expires');\n }\n\n $table->update();\n }", "title": "" }, { "docid": "d4629851817093c9219ef30135522696", "score": "0.6478703", "text": "public function change()\n {\n $table = $this->table('sessions');\n $table->addColumn('status', 'enum', array('values' => 'activa, terminada'))\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime')\n ->create();\n\n $refTable = $this->table(\"sessions\");\n $refTable\n ->addColumn(\"user_id\", \"integer\", array(\"signed\" => \"disable\"))\n ->addForeignKey(\"user_id\", \"users\", \"id\", array(\"delete\" => \"CASCADE\", \"update\" => \"NO_ACTION\"))\n ->update();\n }", "title": "" }, { "docid": "b4055cd5ba467809c0408819b5e7c4dd", "score": "0.6453724", "text": "public function updateUser($params){\n pg_update($this->connection,\"users\",$params,array('user_id'=>$_COOKIE['type']));\n }", "title": "" }, { "docid": "3b218a28ca1b9162f8e6c3cc4133cb3d", "score": "0.6447071", "text": "public function change()\n\t{\n\t\t// account token sessions\n\t\t$table = $this->table('account_api_session', array(\n\t\t\t'id' => false,\n\t\t\t'primary_key' => array('token', 'account_id')\n\t\t));\n\t\t$table\n\t\t\t->addColumn('account_id', 'integer')\n\t\t\t->addColumn('token', 'string', array('limit' => 64))\n\t\t\t->addColumn('created', 'datetime')\n\t\t\t->addForeignKey('account_id', 'account', 'id')\n\t\t\t->create();\n\n\t\t// account notification application instances (formerly user_device)\n\t\t$table = $this->table('account_notification');\n\t\t$table\n\t\t\t->addColumn('account_id', 'integer')\n\t\t\t->addColumn('hash', 'string', array('limit' => 255))\n\t\t\t->addColumn('is_apple', 'boolean', array('null' => true))\n\t\t\t->addColumn('active', 'boolean', array('default' => true))\n\t\t\t->addForeignKey('account_id', 'account', 'id')\n\t\t\t->create();\n\n\t}", "title": "" }, { "docid": "b14e82eca0f3aed8c3fed92a1b21d32a", "score": "0.64329815", "text": "public function update_user()\r\n {\r\n $data = array(\r\n 'username' => 'silvia',\r\n 'fname' => 'madrejo',\r\n 'lname' => 'sánchez'\r\n );\r\n $this->db->where('id', 3);\r\n $this->db->update('users', $data);\r\n }", "title": "" }, { "docid": "b14e82eca0f3aed8c3fed92a1b21d32a", "score": "0.64329815", "text": "public function update_user()\r\n {\r\n $data = array(\r\n 'username' => 'silvia',\r\n 'fname' => 'madrejo',\r\n 'lname' => 'sánchez'\r\n );\r\n $this->db->where('id', 3);\r\n $this->db->update('users', $data);\r\n }", "title": "" }, { "docid": "deef5c064a81fbf60b995478eb8ed35a", "score": "0.64278746", "text": "public function change()\n {\n $table = $this->table('users', ['comment' => 'User primary properties']);\n\n $table\n ->addColumn('password', 'string',\n ['comment' => 'User password for user logging in by login/password', 'null' => true])\n ->addColumn('registered', 'datetime',\n ['comment' => 'User record creation time', 'default' => 'CURRENT_TIMESTAMP'])\n ->addColumn('token', 'string',\n ['comment' => 'Token for restore user password', 'null' => true])\n ->addColumn('expiration', 'datetime',\n ['comment' => 'Restore password token expiration time', 'null' => true])\n ->addColumn('is_active', 'boolean',\n ['comment' => 'User not active, active or banned', 'null' => true]);\n\n $table->create();\n }", "title": "" }, { "docid": "c645bf720d9120f21b75ec4241739677", "score": "0.6427088", "text": "function setUserData($data){\n\t\t//after this data's collected the tax,shipping and final totals can be run\n\t\t$this->_data[\"userdata\"]=$data;\n\t\t$this->_setTax();\n\t\t$this->_setShipping();\n\t\t$this->_setGrandTotal();\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "b22580dd855b87022014161a0f4bef71", "score": "0.6420101", "text": "public function changeInfo()\n {\n if ($this->validate()) {\n $user = $this->getUser();\n $user->full_name = $this->full_name;\n $user->company = $this->company;\n $user->tax_number = $this->tax_number;\n $user->address = $this->address;\n $user->job = $this->job;\n $user->phone = $this->phone;\n $user->birth_date = $this->birth_date;\n $user->facebook_url = $this->facebook_url;\n $user->bio = $this->bio;\n $user->save();\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "45a324912120a304fd6e56d142103e15", "score": "0.640598", "text": "public function userUpdate() {\n $render = new Render('updateUser', 'Modifications de vos informations');\n }", "title": "" }, { "docid": "815168a4a60a7050d3549523628594a4", "score": "0.63988525", "text": "public function change()\n {\n $table = $this->table('logins');\n $table->addForeignKey(\n 'user_id',\n 'users',\n 'id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE'\n ]\n )->addColumn('user_id', 'string',[\n 'limit' => 36,\n 'default' => null,\n 'null' => false,\n ])\n ->addColumn('ip_address', 'string',[\n 'default' => null,\n 'null' => false\n ])\n ->addColumn('created', 'datetime')\n ->create();\n }", "title": "" }, { "docid": "653501fa16d9304c37f07715c5b2b6a2", "score": "0.639071", "text": "protected function put_user() {\r\n // First check that we got everything we need\r\n if (strlen($_POST['email']) == 0 or strlen($_POST['name']) == 0 or strlen($_POST['system']) == 0) {\r\n $this->setReponseState(170, 'Missing data');\r\n }\r\n else {\r\n // Update user\r\n $update_user = \"UPDATE user\r\n SET name = :name,\r\n email = :email\r\n WHERE id = :id\";\r\n\r\n $update_user_query = $this->db->prepare($update_user);\r\n $update_user_query->execute(array(':name' => $_POST['name'], ':email' => $_POST['email'], ':id' => $this->id));\r\n \r\n // Update system\r\n $update_system = \"UPDATE system\r\n SET name = :system\r\n WHERE id = :id\";\r\n\r\n $update_system_query = $this->db->prepare($update_system);\r\n $update_system_query->execute(array(':system' => $_POST['system'], ':id' => $this->system));\r\n \r\n $this->log($this->user_name.' (#'.$this->id.') oppdaterte sitt personalia.');\r\n }\r\n }", "title": "" }, { "docid": "2bc05351b4a9e1f27b0951b282f44d5e", "score": "0.6383156", "text": "public function setUser($data) {\n $this->db->insert('user', $data);\n }", "title": "" }, { "docid": "015e9149d83b14f93a9948e3ff83ce6f", "score": "0.63614047", "text": "public function save_update_user_data ($id, $data)\n {\n $this->db->where('user_id', $id);\n $this->db->update('tbl_users', $data); \n }", "title": "" }, { "docid": "72ca80e7b695b532f059c8c7f1318ee4", "score": "0.63536364", "text": "public function updateUserData($idUser, $userEmail, $userNewPassword);", "title": "" }, { "docid": "c50627ca14c605d70431cf959b048b59", "score": "0.6335266", "text": "public static function updateAccessRecord(): void\n {\n $_SESSION[\"LAST_RECORD\"] = date(\"Y-m-d H:i:s\");\n\n #registra en BD tiempo actual\n SimpleDAO::_update(\n \"users\",\n SimpleDAO::putQuoteAndNull(array(\"lastlogin\" => $_SESSION[\"LAST_RECORD\"])),\n SimpleDAO::putQuoteAndNull(array(\"uid\" => $_SESSION[\"USER_ID\"]))\n );\n }", "title": "" }, { "docid": "5cbd7310affcedc07fd772914fa0f2f9", "score": "0.63339615", "text": "public function updateUser()\r\n {\r\n\r\n $this->user_model->updateUserInfo($this->input->post());\r\n $this->userProfile($this->input->post('user_id'));\r\n }", "title": "" }, { "docid": "7a8fa06855175a2d78fda95d49567531", "score": "0.62956357", "text": "public function testUpdateUserInfo()\n {\n $user = User::onlyUser()->inRandomOrder()->first();\n\n $this->putJson(\"{$this->url}/{$user->id}\", ['name' => 'New name'], $this->authUserHeader($user))\n ->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n 'id',\n 'name',\n 'email',\n 'created_at',\n 'roles' => [\n 'data' => [\n '*' => [\n 'id',\n 'name',\n 'level',\n ],\n ],\n ],\n ],\n ]);\n }", "title": "" }, { "docid": "0e8b88d4eb247613d90e0ac1cbede963", "score": "0.6280068", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email=\\\"$this->email\\\",lastname=\\\"$this->lastname\\\",username=\\\"$this->username\\\",is_active=$this->is_active,kind=$this->kind,area_id=$this->area_id,origin_id=$this->origin_id where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "fb36a872156b72e49038a74fd2853771", "score": "0.62760144", "text": "private function setUser(): void\n {\n $this->set(['user' => $this->user]);\n }", "title": "" }, { "docid": "4b920ce0e3e490574e0d2bcc022b80f2", "score": "0.6267317", "text": "public function changeUserActiveState($data)//shashi\n\t{\n\t\t$UserId=$data['userid'];\n\t\t$this->db->where('userid',$UserId); \n $this->db->update('profiles',$data); \n\t}", "title": "" }, { "docid": "1d0ba189a8f913228f4531f92cb3e2c1", "score": "0.6252777", "text": "public function update() {\n\t\ttry {\n\t\t\t$this->validateUpdate();\n\n\t\t\t$sth = $this->context->connection->prepare(\n\t\t\t\t\"UPDATE user SET\n\t\t\t\t\tstatus = :status, user_code = :userCode,\n\t\t\t\t\tgiven_name = :givenName,\n\t\t\t\t\tfamily_name_prefix = :familyNamePrefix, \n\t\t\t\t\tfamily_name = :familyName, email_address = :emailAddress, \n\t\t\t\t\tcustom_data = :customData\n\t\t\t\tWHERE instance_id = :instId AND user_id = :id\");\n\n\t\t\t$this->context->connection->bindInstance($sth);\n\t\t\t$sth->bindValue(\":id\", $this->id, \\PDO::PARAM_INT);\n\n\t\t\t$sth->bindValue(\":status\", $this->status, \\PDO::PARAM_INT);\n\t\t\t$sth->bindValue(\":userCode\", $this->userCode, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":givenName\", $this->givenName, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":familyNamePrefix\", $this->familyNamePrefix, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\":familyName\", $this->familyName, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":emailAddress\", $this->emailAddress, \\PDO::PARAM_STR);\n\t\t\t$sth->bindValue(\n\t\t\t\t\":customData\", serialize($this->customData), \\PDO::PARAM_STR);\n\n\t\t\t$sth->execute();\n\n\t\t\tunset($this->context->cache[\"U\".$this->id]);\n\n\t\t} catch(\\PDOException $e) {\n\t\t\tthrow new \\Scrivo\\ResourceException($e);\n\t\t}\n\t}", "title": "" }, { "docid": "7be461442ab373a97aa7f3cc7be1c2ee", "score": "0.624926", "text": "public function updateData(Request $request)\n {\n \t$id = $request->id;\n\n \t$user = User::find($id);\n \t$user->name \t= $request->name;\n \t$user->email \t= $request->email;\n\n \t$user->save();\n }", "title": "" }, { "docid": "9c0f4e148879e725f0107006291d1548", "score": "0.62440157", "text": "public function testUpdateUser()\n {\n $userupdate = User::find(2);\n $userupdate->name = 'Steve Smith';\n $this->assertTrue($userupdate->save());\n }", "title": "" }, { "docid": "5ff9bc07c5a9f2888b85fb7bf154ca0b", "score": "0.6232993", "text": "public function modify($user)\r\n {\r\n\r\n $sql = \"UPDATE USUARIO SET cod_usuario = \" . $user->getCod_usuario() . \",\r\n cod_t_usuario = \" . $user->getCod_t_usuario() . \",\r\n correo = '\" . $user->getCorreo() . \"',\r\n password = '\" . $user->getPassword() . \"',\r\n nombre = '\" . $user->getNombre() . \"',\r\n cod_estado = \" . $user->getEstado() . \",\r\n cantidad_documentos = \" . $user->getCantidad_documentos() . \",\r\n direccion = '\" . $user->getDireccion() . \"',\r\n telefono = '\" . $user->getTelefono() . \"',\r\n cantidad_reservas_hechas = \" . $user->getCantidad_reservas_hechas() . \" \r\n where cod_usuario = \" . $user->getCod_usuario() . \";\";\r\n \r\n pg_Exec($this->conexion, $sql);\r\n }", "title": "" }, { "docid": "93661a6aa23b53705112ed7412eb6691", "score": "0.6230755", "text": "function userUpdate() \t{\n\t\t$this->getMenu() ;\n\t\t$form['user_id']\t\t= $this->input->post('user_id');\n\t\t$form['employee_id']\t= $this->input->post('employee_id');\n\t\t$form['approval']\t\t= $this->input->post('approval');\n\t\t$form['acl']\t\t\t= $this->input->post('acl');\n\t\t$form['user_active']\t= $this->input->post('user_active');\n\n\t\t$this->dataModel->saveUser($form);\n\t\t//$this->load->view('clientEdit/'.$form['client_id'].'/SAVED');\n\t\t//$this->load->view('clientEdit/'.$form['client_id'].'/SAVED');\n\t}", "title": "" }, { "docid": "bb809a5e39f4bb4e91bb8d8c47638002", "score": "0.62237036", "text": "public function save() {\n\t\tif ( isset( $this->raw_password ) ) {\n\t\t\t$this->password\t= \n\t\t\tstatic::password( $this->raw_password );\n\t\t}\n\t\t\n\t\tif ( isset( $this->id ) ) {\n\t\t\tparent::edit( self::$fields, $this, 'users' );\n\t\t} else {\n\t\t\t$this->id = \n\t\t\tparent::put( self::$fields, $this, 'users' );\n\t\t}\n\t}", "title": "" }, { "docid": "12a7c40837bae4f338f7025ef6d9c9f1", "score": "0.6217693", "text": "public function setUser()\n {\n $this->user = User::find($this->user_id);\n }", "title": "" }, { "docid": "b73a313c4e2b284f71f4432f861182f6", "score": "0.61910903", "text": "function updateUser($objSecurity)\n\t\t{\t\t\t\n\t\t\tglobal $db;\t\n\t\t\tif($objSecurity->password==\"my_system_password\")\n\t\t\t{\n\t\t\t\n\t\t\t\t$sql=\"\n\t\t\t\t\tUPDATE puser SET USER_NAME=?, FULL_NAME=?, JOB_TITLE=?,\n\t\t\t\t\tDESCRIPTION=?, EMAIL=?, PHONE=?, MODIFY_DATE=now(),MODIFY_BY=?,STATUS_ID=? WHERE USER_ID=?\n\t\t\t\t\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql=\"\n\t\t\t\t\tUPDATE puser SET USER_NAME=?, FULL_NAME=?,JOB_TITLE=?, \n\t\t\t\t\tDESCRIPTION=?, EMAIL=?, PHONE=?, MODIFY_DATE=now(),MODIFY_BY=?,STATUS_ID=? WHERE USER_ID=?\n\t\t\t\t\";\n\t\t\t}\n\t\t\t\n\t\t\t$sql = $db->Prepare($sql); \n\t\t\t\n\t\t\t//if($objSecurity->password!=\"my_system_password\")\n\t\t\t\t//$db->Bind($sql, $objSecurity->$this->pwdEncrypt($objSecurity->password));\n\t\t\t\t \n\t\t\t$db->Execute($sql,array(\n\t\t\t\t\t\t\t$objSecurity->user_name,\n\t\t\t\t\t\t\t$objSecurity->full_name, $objSecurity->job_title,\n\t\t\t\t\t\t\t$objSecurity->description,\n\t\t\t\t\t\t\t$objSecurity->email,\n\t\t\t\t\t\t\t$objSecurity->phone,\n\t\t\t\t\t\t\t$objSecurity->created_by,\n\t\t\t\t\t\t\t$objSecurity->status_id,\n\t\t\t\t\t\t\t$objSecurity->user_id\n\t\t\t\t\t\t\t\n\t\t\t));\t\t\t\n\t\t}", "title": "" }, { "docid": "917812dece18436de085493279b435ad", "score": "0.6173442", "text": "public function update_user($id, $data){\n\t\t$this->db->where('volunteer_id', $id); //where id of the volunteer in table is equal to $id\n\t\t$this->db->update('volunteers', $data); //update the information in the 'volunteers' table\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0fc65a9fb123a28ca631667ffa167825", "score": "0.61626685", "text": "public function testUpdateuser()\n {\n $user = User::find(20);\n $user->name = 'Steve Smith';\n $user->email = '[email protected]';\n $user->password = 'steve';\n $this->assertTrue($user->save());\n\n }", "title": "" }, { "docid": "9cc2030e75377a4caecf11f2912d812e", "score": "0.6160006", "text": "public function update() {\n /*Db::table('tb_user')->where('u_id',1)->update([\n 'u_name' => 'laravel',\n 'u_count'=> ['exp', 'u_count+1'],\n ]);*/\n /*\\db('user')->where('u_id',2)->setField('u_name', 'thinkphp');*/\n Db::table('tb_user')->where('u_id','3')->setField('u_name','yii');\n Db::table('tb_user')->where('u_id',6)->setInc('u_count');\n Db::name('user')->where('u_id',7)->setInc('u_count',6);\n Db::table('tb_user')->where('u_id', 4)->setDec('u_count',1);\n Db::name('user')->where('u_id',5)->setDec('u_count',5);\n\n \\db('user')->where('u_id', 1)->setInc('u_count',2, 30);\n \\db('user')->where('u_id', 2)->setDec('u_count',1, 3);\n }", "title": "" }, { "docid": "44b27cedf5089807b0015486a359ad7f", "score": "0.61592966", "text": "public function update(){\r\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email=\\\"$this->email\\\",last_name=\\\"$this->last_name\\\",username=\\\"$this->username\\\",rol=$this->rol,plant_id=$this->plant_id where id=$this->id\";\r\n\t\tExecutor::doit($sql);\r\n\t}", "title": "" }, { "docid": "32aebc88a4f5eaecce2cd2bb3f122aac", "score": "0.61452705", "text": "public function update_row() {\n $this->template->content = View::instance('v_users_update');\n $this->template->title = \"Update Profile\";\n \n #Pass to the view\n $this->template->content->user_id = $user_id;\n\n #Render the view\n echo $this->template;\n }", "title": "" }, { "docid": "cc99a130e5fb68ba7ba14fbe3d07055d", "score": "0.61354077", "text": "public function change()\n {\n $table = $this->table('users');\n $table->addColumn('profile_id', 'integer', [\n 'default' => null,\n 'limit' => 11,\n 'null' => false,\n ]);\n $table->addColumn('username', 'string', [\n 'default' => null,\n 'limit' => 45,\n 'null' => false,\n ]);\n $table->addColumn('password', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ]);\n $table->addIndex(['profile_id']);\n $table->create();\n\n $table = $this->table('users');\n $table->addForeignKey('profile_id','profiles','id',[\n 'update' => 'RESTRICT',\n 'delete' => 'RESTRICT'\n ]);\n $table->update();\n }", "title": "" }, { "docid": "0b888f26bdb6311d0d653e1cecc0460a", "score": "0.6124122", "text": "public function saveChangeUser()\n {\n //start session if it doesn't exist\n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n\n $userRepository = new UserRepository();\n $authenticator = new Authentication();\n $authenticator->restrictAuthenticated();\n\n // validate input\n $validator = new Validator();\n // sanitize $_POST-Array\n $validator->sanitizeData();\n\n if(isset($_POST) && !empty($_POST)){\n if($authenticator->checkPassword($_SESSION['id'], $_POST['password_old'])){\n if($userRepository->updateUser($_SESSION['id'], $_POST['username'], $_POST['password_new1'], $_POST['lastname'], $_POST['firstname'], $_POST['email'])){\n // update user\n $_SESSION['user'] = $_POST['username'];\n $_SESSION['firstname'] = $_POST['firstname'];\n $_SESSION['name'] = $_POST['lastname'];\n $_SESSION['email'] = $_POST['email'];\n header('Location: /user/profile');\n }\n } else {\n // get user by id\n $user = $authenticator->getAuthenticatedUser();\n // create data-populated view of changeUser site\n $view = new View('user/changeCredentials');\n $view->title = 'Profil';\n $view->heading = 'Benutzerdaten ändern';\n $view->username = htmlspecialchars($user->username);\n $view->lastname = htmlspecialchars($user->name);\n $view->firstname = htmlspecialchars($user->firstname);\n $view->email = htmlspecialchars($user->email);\n $view->wrongpwd = true;\n $view->display();\n }\n } else {\n \n }\n }", "title": "" }, { "docid": "1dfa7402bd4386ff40778ab1810abbbe", "score": "0.612269", "text": "public function change()\n {\n Transaction::wrap(function(){\n $banned_users = UserModel::select(Where::and()->set('deleted_at', Where::OperatorIsNot, null), false);\n\n foreach ($banned_users as $user) {\n /** @var UserModel $user */\n $banned_user = new BannedUserModel();\n $banned_user->reason = 'old ban';\n $banned_user->user_id = $user->id;\n $banned_user->created_at_timestamp = $user->deleted_at;\n $banned_user->save();\n\n $user->ban_id = $banned_user->id;\n $user->save();\n $user->restore();\n }\n });\n }", "title": "" }, { "docid": "ef4140ba55b50e741e0378c3c43475eb", "score": "0.6121331", "text": "function update_user($data)\n {\n $this->db->trans_start();\n $this->db->where('id', $data['id']);\n\n if(isset($data['password'])) {\n $data['password'] = md5($data['password']);\n }\n\n $this->db->update($this->tbl_user, $data);\n $this->db->trans_complete();\n\n if ($this->db->affected_rows() > 0) {\n return true;\n } else {\n if ($this->db->trans_status() === false) {\n return false;\n } else {\n return true;\n }\n }\n }", "title": "" }, { "docid": "096139a48d14d59c1372c45e1cfeecab", "score": "0.6119519", "text": "public function updateInfo(){\n\t\t\tglobal $db_main;\n\t\t\t$R_info = $db_main->query(\"SELECT * FROM users WHERE username = '\".$this->username.\"' LIMIT 1\");\n\t\t\tif($R_info != FALSE){\n\t\t\t\t$info = $R_info->fetch_assoc();\n\t\t\t\t$this->id = $info['userid'];\n\t\t\t\t$this->firstname = $info['firstname'];\n\t\t\t\t$this->lastname = $info['lastname'];\n\t\t\t\t$this->email = $info['email'];\n\t\t\t\t$this->stripeID = $info['stripeID'];\n\t\t\t\t$this->ebay = $info['ebayID'];\n\t\t\t\t$this->address = array(\n\t\t\t\t\t'firmname' => $info['firmname'],\n\t\t\t\t\t'unit' => $info['unit'],\n\t\t\t\t\t'address' => $info['address'],\n\t\t\t\t\t'city' => $info['city'],\n\t\t\t\t\t'state' => $info['state'],\n\t\t\t\t\t'zip5' => $info['zip5'],\n\t\t\t\t\t'zip4' => $info['zip4']\n\t\t\t\t);\n\t\t\t\t$R_info->free();\n\t\t\t\tunset($R_info);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d2b8009fd7214629239eed3556d5b611", "score": "0.6110325", "text": "function refreshUser() {\n\t\t$this->user = $this->loadUser($this->active_id);\n\t}", "title": "" }, { "docid": "3814b4d00c03690dcbb5067806847b66", "score": "0.6106656", "text": "public function setUserID($id,$data){\n\t\t$tmp = CustomerServiceDB::find($id);\n\t\tif($tmp!=NULL){\n\t\t\t$tmp->userID=$data;\n\t\t\t$tmp->save();\n\t\t}\n\t\telse {}\n\t}", "title": "" }, { "docid": "7a315e9bf16a4dac470174eaf0e3611c", "score": "0.61016345", "text": "function updateUserData($UserModel)\n {\n\n // I split them up into different commands because the other one didn't seem to work.\n $this->connection->query(\"UPDATE users SET firstName='$UserModel->userFirstName' WHERE userID=$UserModel->userID\");\n $this->connection->query(\"UPDATE users SET lastName='$UserModel->userLastName' WHERE userID=$UserModel->userID\");\n $this->connection->query(\"UPDATE users SET dateOfBirth='$UserModel->userDob' WHERE userID=$UserModel->userID\");\n $this->connection->query(\"UPDATE users SET bio='$UserModel->userBio' WHERE userID=$UserModel->userID\");\n $this->connection->query(\"UPDATE users SET interest='$UserModel->userInterest' WHERE userID=$UserModel->userID\");\n $this->connection->query(\"UPDATE users SET job='$UserModel->userJob' WHERE userID=$UserModel->userID\");\n $this->connection->query(\"UPDATE users SET employer='$UserModel->userEmployer' WHERE userID=$UserModel->userID\");\n $this->connection->query(\"UPDATE users SET isPublic='$UserModel->userIsPublic' WHERE userID=$UserModel->userID\");\n //$this->connection->query(\"UPDATE users SET isSuspended='$UserModel->userIsSuspended' WHERE userID=$UserModel->userID\"); This one doesn't work\n $this->connection->query(\"UPDATE users SET profilePictureId='$UserModel->userProfilePictureId' WHERE userID=$UserModel->userID\");\n }", "title": "" }, { "docid": "0d4966d713e661790b78c16aa578722a", "score": "0.60887927", "text": "public function UpdateUser($data) {\n $data['email'] = addslashes($data['email']);\n $data['nome'] = addslashes($data['nome']);\n $this->savelog('Atualizou Usuario - ' . $data['email'] . ' -> ' . $data['nome']);\n $this->db_query(\"update usuario set nome='{$data['nome']}' where email='{$data['email']}'\");\n }", "title": "" }, { "docid": "ce09af1243e14bcacecd8de3eb4e40ce", "score": "0.6087745", "text": "public function action_update() {\n if ($_POST) {\n $usuario = ORM::factory('users', array('id' => $_POST['user_id']));\n if ($usuario->loaded()) {\n $usuario->nombre = html::chars($_POST['nombre']);\n $usuario->cargo = html::chars($_POST['cargo']);\n $usuario->email = html::chars($_POST['email']);\n $usuario->dependencia = html::chars($_POST['dependencia']);\n $usuario->save();\n $this->request->redirect('/admin/user/detalle/' . $usuario->id);\n }\n }\n }", "title": "" }, { "docid": "55831ae5d63aa31853d235062be44c30", "score": "0.6085931", "text": "private function changeLecturerData($data)\n {\n\n $sql = \"UPDATE msonair_users SET \" . $data['column'] . \" = :value WHERE user_id = :id\";\n $this->set($sql, [\":value\" => $data[\"value\"], \":id\" => $data[\"id\"]]);\n echo $this->labels[$data[\"column\"]] . \" erfolgreich geändert.\";\n }", "title": "" }, { "docid": "6fb9b4421d2022ac22ca955765ca75cc", "score": "0.6084186", "text": "function UpdateInformation($user = \"\", $f = \"\", $v = \"\")\n\t\t{\n\t\t\tmysql_query(\"UPDATE `usr_users` SET `\".$f.\"` = '\".$v.\"' WHERE `username` = '\".$user.\"'\");\n\t\t}", "title": "" }, { "docid": "dc2757d1789020239f713a5e96b6eac1", "score": "0.60818005", "text": "function updateUser($id, $FirstName, $LastName, $password, $email)\r\n {\r\n $sql = \"UPDATE users SET ID_user='\" . $id . \"', FirstName='\" . $FirstName . \"',\r\n LastName='\" . $LastName . \"', Password='\" . $password . \"', email='\" . $email . \"'WHERE ID_user='\" . $id . \"'\";\r\n $stmt = $this->connect()->query($sql);\r\n if (!$stmt) {\r\n echo \"Something wrong in the binding process. sql error?\";\r\n exit();\r\n } else {\r\n echo \"Update Successful\";\r\n }\r\n }", "title": "" }, { "docid": "56348a89fe31dc800d765d9f5a19eed0", "score": "0.60590816", "text": "public static function update_profile_info($data) {\n $date = new DateTime();\n $user_info = ORM::factory('UserInfo')->where('user_id', '=', $data['user_id'])->find();\n $user_info->first_name = $data['firstname'];\n $user_info->last_name = $data['lastname'];\n $user_info->company_name = $data['company'];\n $user_info->telephone_number = $data['phoneno'];\n $user_info->updated_at = $date->format('Y-m-d H:i:s');\n $user_info->save();\n }", "title": "" }, { "docid": "392affb016b35d76d9d453d3b3dc80ab", "score": "0.605267", "text": "static private function _editUser($id,$data){\n\n\t\t\tSystem::LoadLibrary('mantisIntegration');\n\t\t\tglobal $MantisDB;\n\n\t\t\tif (is_int($MantisDB))\n\t\t\t\treturn 1;\n\n\t\t\t$check = $MantisDB->where('id',$id)->getOne('mantis_user_table');\n\t\t\tif (empty($check))\n\t\t\t\treturn 2;\n\n\t\t\t$data = System::TrashForeignValues(['username','name','password','email'],$data);\n\t\t\tforeach ($data as $key => $value){\n\t\t\t\tif (System::InputCheck($value,$key)) return 3;\n\t\t\t}\n\n\t\t\tif (!empty($data['name'])){\n\t\t\t\t$data['realname'] = $data['name'];\n\t\t\t\tunset($data['name']);\n\t\t\t}\n\n\t\t\tif (!empty($data['password']))\n\t\t\t\t$data['password'] = Password::Kodolas($data['password']);\n\n\t\t\t$action = $MantisDB->where('id',$id)->update('mantis_user_table',$data);\n\n\t\t\tif ($action) return 0;\n\t\t\telse return 4;\n\t\t}", "title": "" }, { "docid": "9ae90194db54170754244a75753953ac", "score": "0.6048585", "text": "private function update() {\n\t\t//Yuck - checkboxes not passed if value is null...\n\t\tif (!$this->formData['isVegetarian']) {\n\t\t\t$this->formData['isVegetarian'] = 0;\n\t\t}\n\t\tif (!$this->formData['isVegan']) {\n\t\t\t$this->formData['isVegan'] = 0;\n\t\t}\n\n\t\t$_SESSION['user']->populate($this->formData);\n\n\t\tif ( !$_SESSION['user']->store() ) {\n\t\t\t$this->setError('db_failed','');\n\t\t}\n\t}", "title": "" }, { "docid": "374574086fd0349d488765d60550f70b", "score": "0.60474896", "text": "public function update_user()\n{\n\tif($this->session->userdata('is_cost_estimator_logged') || $this->session->userdata('is_admin_logged'))\n\t{\n\t\t$user_id = $this->uri->segment(4);\n\t\t$data['userData']\t= $this->site_model->get_row_c1('user','id',$user_id);\n\t\t$data['user_type']\t= $this->site_model->get_rows('user_role');\n\t\t$this->load->view('admin/common/header');\n\t\t$this->load->view('admin/common/sidebar');\n\t\t$this->load->view('admin/update_user',$data);\n\t\t$this->load->view('admin/common/footer');\n\t}\n\telse\n\t{\n\t\tredirect('admin/app/not_authorized');\n\t}\n}", "title": "" }, { "docid": "876f866d666c0559e2abd7e0998fc68b", "score": "0.6045187", "text": "public function change_account_data($user_id, $user_data){\n\t\treturn model('Modules\\Auth\\Models\\Users') -> change_account_data($user_id, $user_data);\n\t}", "title": "" }, { "docid": "beea2482395933fab76479b71b9722b4", "score": "0.60439676", "text": "public function updateProfile($data){\n\t\t$this->db->where('wp_users.ID = ', $data['ID']);\n\t\t$this->db->update('wp_users', $data);\n\t}", "title": "" }, { "docid": "d0ff2a4aa15328ea2180d3a99a87f1d0", "score": "0.6024457", "text": "public function editUser() {\n if($this->_linkDB) {\n $this->_result = $this->_linkDB->update(\"tbl_customer\",\"name='\".$this->_User['userName'].\"',family='\".$this->_User['userFamily'].\"',age=\".$this->_User['userAge'].\",phone_number=\".$this->_User['userTel'].\"\",\"WHERE customer_id = \".$this->_User['userID'].\";\");\n return $this->_result;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3d49ad958bc25e80cd798a7c0d81ad42", "score": "0.60238737", "text": "function update_user($data_array) {\n\t\t$db_table = $this->config->item('db_table_prefix') . 'users';\n\n\t\t$data = array(\n\t\t 'first_name' => $data_array['first_name'],\n\t\t 'last_name' => $data_array['last_name'],\n\t\t 'username' => $data_array['username'],\n\t\t 'permission_level' => $data_array['permission_level'],\n\t\t 'user_status' => $data_array['user_status'],\n\t\t 'modification_date' => current_timestamp()\n\t\t);\n\n\t\t$this->db->where('user_id', $data_array['user_id']);\n\t\t$result = $this->db->update($db_table, $data);\n\n\t\tif ($result) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "0e96e6749e045d7c44b7a0ce13b215c6", "score": "0.6020379", "text": "public function run()\n {\n UserModel::truncate();\n factory(UserModel::class, 10)->create();\n UserModel::find(1)->update(\n [\n 'uid' => 'admin',\n 'password' => Hash::make('admin'),\n 'name' => '系统管理员',\n 'is_admin' => true,\n 'sex' => '男',\n 'phone' => '110120119',\n ]\n );\n UserModel::find(2)->update(\n [\n 'uid' => 'test',\n 'password' => Hash::make('test'),\n 'name' => '测试学生',\n 'is_admin' => false,\n 'sex' => '男',\n 'phone' => '110120119',\n ]\n );\n }", "title": "" }, { "docid": "89a1256bcfab4bedf02e7de7357f0510", "score": "0.6020008", "text": "public function admin_changePassword()\n {\n if (!empty($this->request->data)) {\n $this->request->data['User']['id'] = $this->Auth->user('id');\n $this->User->set($this->request->data);\n if ($this->User->save()) {\n $this->Session->setFlash(__('Save successful'));\n $this->redirect(array('action' => 'profile'));\n };\n }\n\n }", "title": "" }, { "docid": "c32cbebb1d2e1a0ad0a6410b4ac53ebf", "score": "0.6011817", "text": "function edit_user($userinfo) {\n $sql = 'UPDATE users SET ';\n $sql .= 'username = \"'.$userinfo['username'].'\"';\n $sql .= ', fname = \"'.$userinfo['fname'].'\"';\n $sql .= ', lname = \"'.$userinfo['lname'].'\"';\n $sql .= ', emplid = \"'.$userinfo['emplid'].'\"';\n $sql .= ' WHERE user_id = \"'.$userinfo['user_id'].'\" limit 1';\n\n $_SESSION['dbconn']->query($sql) or die(\"could not update your information: \" . $_SESSION['dbconn']->error);\n $_SESSION['notifications'][] = \"Updated user information\";\n}", "title": "" }, { "docid": "b4215d51a0c171dc9a6c95182ae8ee04", "score": "0.60023826", "text": "public function madeChangeUser(Request $request)\n {\n $id=$request->id;\n $user=UserModel::findOrFail($id);\n\n $user->name=$request->name;\n $user->email=$request->email;\n $user->phone=$request->phone;\n\n $user->saveOrFail();\n return redirect('/home');\n }", "title": "" }, { "docid": "6eaecb5e967ec4958fbc90288997f6b9", "score": "0.6001332", "text": "public function set_user_data($user)\n\t{\n\t\t$this->user = $user;\n\t}", "title": "" }, { "docid": "8cd45f725c36250f1fdc256572192bcb", "score": "0.5995692", "text": "public function updateuserAction()\n\t{\n\t\t// is not them.\n\t\t\n\t\t$userId = $this->_getParam('userInfoUserId');\n\t\t\n\t\tif ($this->_user->id != $userId) {\n\t\t\t$this->_helper->json->sendJSON(array(\n\t\t\t\t'status' => 'failure',\n\t\t\t\t'message' => 'Permission denied.'\n\t\t\t));\n\t\t}\n\t\t\n\t\t// Populate user object and update\n\t\t\n\t\trequire_once('model/auth/users/AppUser.php');\n\t\t$user = new AppUser();\n\t\t$user->id = $userId;\n\t\t$user->SMSPhone = $this->_getParam('userInfoPhone1') . $this->_getParam('userInfoPhone2') \n\t\t\t\t\t\t. $this->_getParam('userInfoPhone3');\n\t\t$user->email = $this->_getParam('userInfoEmail');\n\t\t$user->lastName = $this->_getParam('userInfoLastName');\n\t\t$user->firstName = $this->_getParam('userInfoFirstName');\n\t\t$user->SMSCarrierId = $this->_getParam('userInfoCarrierId');\n\t\t$user->postalCode = $this->_getParam('userInfoPostalCode');\n\t\t$user->gender = $this->_getParam('userInfoGender');\n\t\t$user->acceptedTerms = ($this->_getParam('userInfoAcceptedTerms') == 'yes') ? 1 : 0;\n\t\t\n\t\trequire_once('model/auth/AuthService.php');\n\t\trequire_once('model/database/OdbcConnectionFactory.php');\n\t\t$dbh = OdbcConnectionFactory::getInstance();\n\t\t\n\t\tif (!AuthService::updateUser($user)) {\n\t\t\t$this->_logger->err('Failed updating user record for ' . $user->id . ' ' . $user->email);\n\t\t\todbc_rollback($dbh);\n\t\t\t$this->_helper->json->sendJSON(array(\n\t\t\t\t'status' => 'failure',\n\t\t\t\t'message' => 'Failed updating user record.'\n\t\t\t));\n\t\t} else {\n\t\t\t$this->_logger->info('Updated user record for user ' . $user->id . ' ' . $user->email);\n\t\t}\n\n\t\t// Passed all updates, commit transaction\n\t\todbc_commit($dbh);\n\t\t\n\t\t// We've just updated our account, we need to update the authentication credentials.\n\t\t// We skip the username/password thing here...\n\t\trequire_once('Zend/Auth.php');\n\t\trequire_once('model/auth/AuthRefreshAdapter.php');\n\t\t$auth = Zend_Auth::getInstance();\n\t\t$auth->clearIdentity();\t\t\n\t\t$auth->authenticate(new AuthRefreshAdapter($user));\t\t\n\t\t$this->_logger->info('Updated user info for: ' . $user->id . ' ' . $user->email);\n\t\t\n\t\t$this->_helper->json->sendJSON(array(\n\t\t\t'status' => 'success',\n\t\t\t'message' => 'User record updated.',\n\t\t\t'user' => $user\n\t\t));\t\t\n\t}", "title": "" }, { "docid": "cbff5e6d2fae05fda0b97b9f8beff5ba", "score": "0.5993015", "text": "public function change()\n {\n $table = $this->table('Usuario');\n $table->addColumn('cedula','string',array('limit'=>20))\n ->addColumn('nombre','string',array('limit'=>20))\n ->addColumn('primer_ape','string',array('limit'=>20))\n ->addColumn('segundo_ape','string',array('limit'=>20))\n ->addColumn('puesto','enum',array('values'=>'administrador, dependiente, mecanico'))\n ->addColumn('password','string',array('limit'=>200))\n ->create();\n }", "title": "" }, { "docid": "1f619d8668e0856fce1a04f293f82451", "score": "0.5990717", "text": "public function setUser(UserInterface $user)\n\t{\n\t\t$this->user_id = $user->getId();\n\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "76416b083129757831e854e2e3517910", "score": "0.5989099", "text": "public function set_user($username){\n\t$db=Database::obtain();\n\n\t$sql = \"SELECT user_id, username, password, salt, email, created, accessed, status FROM `\" .TABLE_USERS. \"` WHERE username = '\".$db->escape($username).\"'\";\n\n\t$this->info=$db->query_first($sql);\n}", "title": "" }, { "docid": "b64ad7f889a0639ad075cf41284b76ef", "score": "0.59873027", "text": "function edit(){\r\n\r\n $util = new Util;\r\n $id = (int)$_SESSION['user_logged_in'];\r\n $firstname = trim($this->data['firstname']);\r\n $lastname = trim($this->data['lastname']);\r\n $age = trim($this->data['age']);\r\n if (empty($age)) {\r\n $age = 'NULL';\r\n }else{\r\n $age = (int)$age;\r\n }\r\n $occupation = trim($this->data['occupation']);\r\n $location = trim($this->data['location']);\r\n $profile_pic = $util->file_upload(APP_ROOT.\"/views/assets/files/\", \"profilePic\");\r\n $password = password_hash(trim($this->data['password']), PASSWORD_DEFAULT);\r\n\r\n if( !empty(trim($_POST['password'])) ){ // New password entered\r\n\r\n $sql = \"UPDATE users SET password='$password', firstname='$firstname', lastname='$lastname', age=$age, occupation='$occupation', location='$location', profile_pic='$profile_pic' WHERE id='$id'\";\r\n\r\n }else{ // No new password entered\r\n\r\n $sql = \"UPDATE users SET firstname='$firstname', lastname='$lastname', age=$age, occupation='$occupation', location='$location', profile_pic='$profile_pic' WHERE id='$id'\";\r\n\r\n }\r\n\r\n $this->execute($sql);\r\n }", "title": "" }, { "docid": "d03303b7bbc6a1ea32dcfa9cc4c6779b", "score": "0.5985463", "text": "public function save() {\n\t\t$db = new DB();\n\t\tif (!$this->user_id){ //if theres no user id then get one from the username\n\t\t\t$tmp_user = $db->select('User', \"username = '$this->username'\");\n\t\t\tfb($tmp_user,'Temp User');\n\t\t\tif ($tmp_user){\n\t\t\t\t$this->user_id = $tmp_user['user_id'];\n\t\t\t\tfb($tmp_user,'isNewUser = false, found id',$this->user_id);\n\t\t\t\t$isNewUser=false;\n\t\t\t}else{\n\t\t\t\tfb($tmp_user,'isNewUser = true, no user with the username, and user_id nonexistant');\n\t\t\t\t$isNewUser=true;\n\t\t\t}\n\t\t}else{ //we already have a user_id, so check that it's valid\n\t\t\tfb($this->user_id,'OUR USER ID');\n\t\t\t$isNewUser = $db->select('User', \"user_id = '$this->user_id'\") ? false : true;\n\t\t\tfb($isNewUser,'=isNewUser since user_id was ',$this->user_id);\n\t\t}\n\t\t//Update User\n\t\tif (!$this->role){\n\t\t\t$this->role='student';\n\t\t}\n\t\t$data = array(\n\t\t\t\"user_id\" => \"$this->user_id\",\n\t\t\t\"username\" => \"$this->username\",\n\t\t\t\"password\" => \"$this->password\",\n\t\t\t\"firstname\" => \"$this->firstname\",\n\t\t\t\"lastname\" => \"$this->lastname\",\n\t\t\t\"role\" => \"$this->role\",\n\t\t\t\"email\" => \"$this->email\"\n\t\t);\n\t\tif(!$isNewUser) {\n\t\t\tfb('updating',$data,'into User table.');\n\t\t\t//update the row in the database\n\t\t\t$db->update($data, 'User', 'user_id = '.$this->user_id);\n\t\t}else {\n\t\t\t$this->user_id = $db->insert($data, 'User');\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ae0a45293975af94e61e75b44b66ea9d", "score": "0.5981137", "text": "public function setUserTable($table = NULL) {\r\n \tif(is_object($table)) {\r\n \t\t$this->userTable = $table;\r\n \t} else {\r\n \t\t$this->userTable = new LarcApp_Phonebook_People();\r\n \t}\r\n \t$info = $this->userTable->info();\r\n \t$joinCols = array();\r\n \tforeach($info['cols'] as $col) {\r\n \t\tif($col != $info['primary']) { // don't need primary key\r\n \t\t\t$alias = 'user_'.$col;\r\n \t\t\t// make sure alias will not overwrite history columns\r\n \t\t\tif(!in_array($alias, $this->_cols)) {\r\n\t\t \t\t$joinCols[$alias] = $col;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t$this->_referenceMap['user'] = array(\r\n\t\t\t'columns' => array('changed_by_id'), \r\n\t\t\t'refTable' => $info['name'], \r\n\t\t\t'refTableClass' => get_class($this->userTable),\r\n\t\t\t'refColumns' => $info['primary'],\r\n\t\t\t'joinColumns' => $joinCols\r\n \t);\r\n }", "title": "" }, { "docid": "5c4a7c3badefa3e7843812a91cf57ab9", "score": "0.5980516", "text": "function save()\n\t{\n\t\tglobal $sql;\n\t\t$key = sql::Escape($this->key);\n\t\t$sql->Query(\"UPDATE $this->tablename SET\n\t\t\t\t\tuser = '$this->user',\n\t\t\t\t\trequestkey = '$key'\n\t\t\t\t\tWHERE id='$this->id'\");\n\t}", "title": "" }, { "docid": "b6f5a7debdd5d6c3666988c3f01b0c03", "score": "0.5969599", "text": "public function updateUser($data)\r\n\t{\r\n\t\r\n\t\t$datapost = array(\r\n\t\t\t'firstname' => $data[0],\r\n\t\t\t'lastname' => $data[1],\r\n\t\t\t'timezone' => $data[2],\r\n\t\t\t);\r\n\t\t\tif ($data[3] > 0) {\r\n\t\t\t\r\n\t\t\t//We have an ID so we need to update this object because it is not new\r\n\t\t\tif ($this->db->update(\"user\", $datapost, array(\"user_id\" => $data[3]))) {\r\n\t\t\t\t\r\n\t\t\t\t//echo $this->db->last_query();\r\n\t\t\t\t\r\n\t\t\t\t$newdata = array(\r\n \t \t'user_id' \t\t=> $this->session->userdata['validEntry']['user_id'],\r\n\t\t\t\t\t\t'user_type'\t\t=> $this->session->userdata['validEntry']['user_type'],\r\n\t\t 'user_email' => $this->session->userdata['validEntry']['user_email'],\r\n\t\t\t\t\t\t'fullname'\t\t=> $data[0].\" \".$data[1],\r\n\t 'logged_in' \t=> TRUE,\r\n );\r\n\t\t\t\t \r\n\t\t\t\t$this->session->set_userdata(\"validEntry\",$newdata);\r\n\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cfcfa29cf97950d0682ee1adbeffb309", "score": "0.5961973", "text": "function UpdateUser($Id,$data)\n {\n $this->db->where('id_user',$Id);\n $this->db->update('users',$data);\n }", "title": "" }, { "docid": "62714d22404be7e0ddd6f3f4e5396892", "score": "0.5957165", "text": "public function modifyUser($user){\n $this->userRequest->modifyUser($user->getId(), $user->getName(), $user->getPassword(), $user->getMail(), $user->getPhone(), $user->getRoleId());\n\n }", "title": "" }, { "docid": "75e551d7b5511107cdbb0a46d54b404f", "score": "0.59557337", "text": "private function setUserData($row){\n\t\t$_SESSION['is_logged_in'] = true;\n\t\t$_SESSION['user_id'] = $row ->id;\n\t\t$_SESSION['is_logged_in'] = $row ->username;\n\t\t$_SESSION['is_logged_in'] = $row ->name;\n\t}", "title": "" }, { "docid": "8fd0dcd977a484ab195d860463f78485", "score": "0.5944444", "text": "public function change(): void\n {\n $this->table('session')\n ->addColumn('user_uuid', 'uuid', ['null' => false])\n ->addColumn('comment', 'string', ['null' => false])\n ->addColumn('secret', 'string', ['length' => 44, 'null' => false])\n ->addColumn('created', 'integer', ['signed' => false, 'null' => false])\n ->addColumn('expires', 'integer', ['signed' => false, 'null' => false])\n ->addColumn('ip', 'string', ['length' => 39, 'null' => false])\n ->addColumn('ua', 'string', ['length' => 250, 'null' => false])\n ->addIndex(['user_uuid'])\n ->addIndex(['secret'])\n ->addIndex(['expires'])\n ->addIndex(['ip'])\n ->addForeignKey(['user_uuid'], 'user', ['uuid'])\n ->create();\n // holds early expirations for authenticated user session tokens\n $this->table('session_expiration')\n ->addColumn('session_id', 'integer', ['signed' => false, 'null' => false])\n ->addColumn('date', 'biginteger', ['signed' => false, 'null' => false])\n ->addColumn('reason', 'string', ['null' => false])\n ->addIndex(['session_id'], ['unique' => true])\n ->addForeignKey(['session_id'], 'session')\n ->create();\n }", "title": "" }, { "docid": "562ce1a079f1a74e4007c60590a1cf0c", "score": "0.59363073", "text": "public function edit($user,$data)\n {\n \n $this->db->where('username', $user);\n $this->db->update('korisnici', $data);\n \n }", "title": "" }, { "docid": "0dcbc09fa348dbc0a7ff417d11870a01", "score": "0.5936083", "text": "public function run()\n {\n DB::table('users')->where('email', '[email protected]')->update(['isAdmin' => true]);\n }", "title": "" }, { "docid": "369def97d007b318093a287ee4369f79", "score": "0.5930926", "text": "public function EditUser($objUser) {\n // convert JSON data to array\n $user_object = json_decode($objUser, True);\n \n // loop the properties of the user to generate sql statement \n foreach($user_object as $key => $item){\n $sql_condition .= $key . \" = '$item', \"; \n }\n \n // Remove characters from the right side of a string:\n $sql_condition = rtrim($sql_condition,\", \");\n \n $this->sql = \"update user set $sql_condition WHERE userID = '\".$objUser[\"userID\"].\"'\";\n $bool = $this->database->insert2db($this->sql); \n \n // prints database feedback\n echo $this->dbFeedBack($bool);\n \n }", "title": "" }, { "docid": "6365e9e845160d0de25d1fa9a94fd411", "score": "0.5927891", "text": "public function updateUser($id, $firstname, $name, $login, $email, $phone, $id_unit, $id_responsible, $id_status, $convention, $date_convention, $date_end_contract = \"\", $is_active = 1) {\n\t\t$sql = \"update core_users set login=?, firstname=?, name=?, email=?, tel=?, id_unit=?, id_responsible=?, id_status=?,\n \t\t\t convention=?, date_convention=?, date_end_contract=?, is_active=? \n \t\t\t where id=?\";\n\t\t$this->runRequest ( $sql, array (\n\t\t\t\t$login,\n\t\t\t\t$firstname,\n\t\t\t\t$name,\n\t\t\t\t$email,\n\t\t\t\t$phone,\n\t\t\t\t$id_unit,\n\t\t\t\t$id_responsible,\n\t\t\t\t$id_status,\n\t\t\t\t$convention,\n\t\t\t\t$date_convention,\n\t\t\t\t$date_end_contract,\n\t\t\t\t$is_active,\n\t\t\t\t$id \n\t\t) );\n\t}", "title": "" }, { "docid": "b50aa6721afc362caabdc0e34f816c3c", "score": "0.59269506", "text": "public function run()\n\t{\n\t\tDB::table($this->table)->truncate();\n\n\t\t$date = new \\DateTime;\n\n\t\tDB::table('users')->insert(array(\n\t\t\tarray('username'=>'[email protected]','cwid'=>'admin','firstname'=>'Cynthia','lastname'=>'Rader','is_admin'=>true),\n\t\t));\n\n\n\t\t//TODO seed from the csv file\n\t\tparent::run();\n\n\t\tforeach (DB::table(\"users\")->get() as $user) {\n\t\t\tDB::table(\"users\")\n\t\t\t\t->where('id',$user->id)\n\t\t\t\t->update(array(\"password\"=>Hash::make($user->cwid)));\n\t\t}\n\n\t}", "title": "" }, { "docid": "137a9997493b6c4a535249d1321f27d3", "score": "0.5924632", "text": "function updateUser($ID, $data){\n $user = User::newFromId($ID);\n $user->load();\n if($user->mId == 0)\n throw new Exception(\"Not exists users '$data->name' with id '$ID'\\n\",\"001\");\n foreach($data as $key=>$value){\n if(isset($value)){\n $method = 'set' . ucwords($key);\n call_user_func(array($user, $method), $value);\n }\n }\n $user->saveSettings();\n}", "title": "" }, { "docid": "50e4e7d14e9da488966f9162d98064d5", "score": "0.5923603", "text": "function editUser($id, $fname, $username, $password, $email){\n $pdo = Database::getInstance()->getConnection();\n\n //TODO: Run the proper SQL query to update tbl_user with proper values\n $update_user_query = 'UPDATE tbl_user SET user_fname = :fname, user_name = :username,';\n $update_user_query .= ' user_pass=:password, user_email =:email WHERE user_id = :id';\n $update_user_set = $pdo->prepare($update_user_query);\n $update_user_result = $update_user_set->execute(\n array(\n ':fname'=>$fname,\n ':username'=>$username,\n ':password'=>$password,\n ':email'=>$email,\n ':id'=>$id\n )\n );\n\n // echo $update_user_set->debugDumpParams();\n // exit;\n\n //TODO: if everything goes well, redirect user to index.php\n // Otherwise, return some error message...\n if($update_user_result){\n redirect_to('index.php');\n }else{\n return 'Guess you got canned...';\n }\n}", "title": "" }, { "docid": "1a4f7670b00566c0d5ed6c1c96877807", "score": "0.5921361", "text": "public function change()\n {\n $table= $this->table('user_accounts',['id'=>false,'primary_key'=>['id']]);\n $table->addColumn('id','uuid')\n ->addColumn('user_account_username','string',['limit'=>20])\n ->addColumn('user_account_password','text')\n ->addColumn('user_account_avatar','text',['default'=>null])\n ->addColumn('user_account_is_active','boolean',['default'=>true])\n ->addColumn('created','datetime')\n ->addColumn('modified','datetime')\n ->addColumn('deleted','datetime')\n ->addColumn('user_id','uuid')\n // ->addForeignKey('user_id' ,['deleted'=>'CASCADE','update'=>'CASCADE'])\n ->create();\n\n $table = $this->table('user_accounts');\n $table->addForeignKey('user_id',['deleted'=>'CASCADE', 'update'=>'CASCADE'])\n ->update();\n }", "title": "" }, { "docid": "4fe2eeb355fa103f28992baf3c82fd73", "score": "0.5921264", "text": "function update_user_info($user_id) {\n\t$user_id = (int)$user_id;\n\t//mysql_query(\"insert into `thepurplebooth`.`users`(`full_name`,`email`,`password`,`profile_picture`) values ()\");\n}", "title": "" }, { "docid": "62626391ecb1492767efe2df21e4a1c1", "score": "0.59090084", "text": "public function dao_update() {\n $db = Database::getInstance();\n $stmt = $db\n ->getPdo()\n ->prepare(sprintf(\"UPDATE `%s` SET `name`=:name, `passwordhash`=:passwordhash, `email`=:email, `group`=:groupid WHERE `id`=:id\",\n $db->table(self::DB_TAB_USERS)));\n\n $id = $this->getId();\n $name = $this->getName();\n $passwordhash = $this->getPasswordhash();\n $email = $this->getEmail();\n $groupid = $this->getGroup()->getId();\n\n $stmt->bindParam(\":id\", $id, PDO::PARAM_INT);\n $stmt->bindParam(\":name\", $name, PDO::PARAM_STR);\n $stmt->bindParam(\":passwordhash\", $passwordhash, PDO::PARAM_STR);\n $stmt->bindParam(\":email\", $email, PDO::PARAM_STR);\n $stmt->bindParam(\":groupid\", $groupid, PDO::PARAM_INT);\n\n $stmt->execute();\n }", "title": "" }, { "docid": "58f238b6e379b8aba4b2c86caf5b88b9", "score": "0.59089017", "text": "public function update (){\n // just call simple_table_ops class, which will process $_POST['variables']\n\n $update = new simple_table_ops();\n $columns = array ('nom', 'prenom', 'nom_khmer', 'prenom_khmer', 'sex_id', 'active_id');\n $update->set_id_column('teacher_id');\n $update->set_table_name('teachers');\n $update->set_table_column_names($columns);\n\n $update->update();\n header(\"Location: http://\".WEBSITE_URL.\"/index.php?controller={$_GET['controller']}&action=index\");\n\n }", "title": "" }, { "docid": "7ef31e809a29d9ae432896e33313f58d", "score": "0.5907263", "text": "public function testChangeUser(){\n $return = $this->userDaoTest->changesUserDao($this->user, 11, 123456);\n $this->assertTrue($return);\n }", "title": "" }, { "docid": "9f6e42539c8baffb4661f23dfdb022fa", "score": "0.59066546", "text": "public function saveUserProfile($data){\n\n foreach ($data as $key => $value){\n $this->$key=$value;\n }\n\n $this->name = $this->first_name.' '.$this->last_name;\n $this->dob = $this->year.'-'.$this->month.'-'.$this->day;\n $this->country_id = 77;\n\n $sql = \"UPDATE users SET \n first_name= :fName,\n last_name= :lName,\n name= :name, \n dob= :dob,\n religion_id= :religion,\n community_id= :community,\n education_id= :education,\n occupation_id= :occupation,\n marital_id= :marital,\n manglik_id= :manglik,\n height_id= :height,\n country_id= :country\n WHERE id= :id\";\n\n $pdo = Model::getDB();\n $stmt=$pdo->prepare($sql);\n return $stmt->execute([\n ':fName'=>$this->first_name,\n ':lName'=>$this->last_name,\n ':name'=>$this->name,\n ':dob'=>$this->dob,\n ':religion'=>$this->religion_id,\n ':community'=>$this->community_id,\n ':education'=>$this->education_id,\n ':occupation'=>$this->occupation_id,\n ':marital'=>$this->marital_id,\n ':manglik'=>$this->manglik_id,\n ':height'=>$this->height_id,\n ':country'=>$this->country_id,\n ':id'=>$this->id\n ]);\n }", "title": "" }, { "docid": "81bad9d0a2dc127cf1e52f054d4dc61e", "score": "0.59025127", "text": "public function saveNewRole()\n {\n $this->user->fk_role=$this->fk_role;\n $this->user->update();\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4bac3188558c3acab53dd8d5175c1d4e", "score": "0.0", "text": "public function show($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "1e43f3d3b2f3866101c5634098486ad9", "score": "0.7079807", "text": "public function show(Resource $resource)\n {\n return view('resources.show')->with('resource', $resource);\n }", "title": "" }, { "docid": "1e43f3d3b2f3866101c5634098486ad9", "score": "0.7079807", "text": "public function show(Resource $resource)\n {\n return view('resources.show')->with('resource', $resource);\n }", "title": "" }, { "docid": "05b525c46e58ebdea607568ba7e031f9", "score": "0.699911", "text": "public function show(Resource $resource)\n {\n return view('admin.resources.show', compact('resource'));\n }", "title": "" }, { "docid": "4374562bd3b3c76899b3d68131e9a081", "score": "0.68174225", "text": "function display($resource_name, $cache_id = null, $compile_id = null)\r\n {\r\n $this->_smarty->fetch($resource_name, $cache_id, $compile_id, true);\r\n }", "title": "" }, { "docid": "511a03741cea7982a95e0898bd8c8015", "score": "0.6725235", "text": "public function showResourceItem(array $data);", "title": "" }, { "docid": "6056fa21e4d2ebaac57d6ae22cfb4260", "score": "0.6548998", "text": "public function show(Request $request, $resource)\n { \n presenting_resource($resource);\n\n return $this->resource($resource);\n }", "title": "" }, { "docid": "1c52708cb57fd592777a5112fceca4f9", "score": "0.6427337", "text": "public function indexAction($resource)\n {\n parent::staticResource($resource);\n }", "title": "" }, { "docid": "02342204dff832c132b8ce831e17a092", "score": "0.63763934", "text": "public function get( $resource );", "title": "" }, { "docid": "38d4e6796db39109f0d6935dfd120534", "score": "0.6311607", "text": "public function retrieve(Resource $resource);", "title": "" }, { "docid": "54166e0b4bd59c6836b3f61a27596a54", "score": "0.6273021", "text": "public function viewResource($resourceController, $id) {\n $wrapper = $resourceController->wrapper($id);\n return $this->serialize(self::getData($wrapper));\n }", "title": "" }, { "docid": "31fd7f5a71b2af075f21c41c3d288e5e", "score": "0.62364846", "text": "public function show($id)\n {\n $resource = Resource::findorfail($id);\n return view('resources.show', ['resource'=>$resource]);\n }", "title": "" }, { "docid": "cf59458dc7815f856881d0a5db80dfc2", "score": "0.6228283", "text": "public function show(Resource $resource)\n {\n ResourceResource::withoutWrapping();\n\n return new ResourceResource($resource);\n }", "title": "" }, { "docid": "83bb7b752846f0cc3eb62e3fff19d079", "score": "0.61094654", "text": "public function displayAction()\r\n {\r\n // set filters and validators for GET input\r\n $filters = array(\r\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\r\n ); \r\n $validators = array(\r\n 'id' => array('NotEmpty', 'Int')\r\n );\r\n $input = new Zend_Filter_Input($filters, $validators);\r\n $input->setData($this->getRequest()->getParams());\r\n\r\n // test if input is valid\r\n // retrieve requested record\r\n // attach to view\r\n if ($input->isValid()) {\r\n $q = Doctrine_Query::create()\r\n ->from('Square_Model_Item i')\r\n ->leftJoin('i.Square_Model_Country c')\r\n ->leftJoin('i.Square_Model_Grade g')\r\n ->leftJoin('i.Square_Model_Type t')\r\n ->where('i.RecordID = ?', $input->id);\r\n $result = $q->fetchArray();\r\n if (count($result) == 1) {\r\n $this->view->item = $result[0]; \r\n } else {\r\n throw new Zend_Controller_Action_Exception('Page not found', 404); \r\n }\r\n } else {\r\n throw new Zend_Controller_Action_Exception('Invalid input'); \r\n }\r\n }", "title": "" }, { "docid": "c0f2735f053c6a5a3e8867a70d986464", "score": "0.6095133", "text": "function display($resource_name = null, $cache_id = null, $compile_id = null, $display = false) {\n\t\tglobal $pommo;\n\n\t\tif(!$this->templateExists($resource_name)) {\n\t\t\tPommo :: kill(sprintf(Pommo::_T('Template file (%s) not found in default or current theme'), $resource_name), true, true);\n\t\t}\n\n\t\tif ($pommo->_logger->isMsg())\n\t\t\t$this->assign('messages', $pommo->_logger->getMsg());\n\t\tif ($pommo->_logger->isErr())\n\t\t\t$this->assign('errors', $pommo->_logger->getErr());\n\t\t\t\n\t\treturn parent :: display($resource_name, $cache_id = null, $compile_id = null, $display = false);\n\t}", "title": "" }, { "docid": "1aeacbffda6650974375c42070cae740", "score": "0.6069593", "text": "public function show($id)\n {\n //\n return Resource::find($id);\n }", "title": "" }, { "docid": "7ec97073766288c908c352bcddc36a14", "score": "0.60485154", "text": "public function show($id)\n\t{\n\t\t$resource = $this->getResourceRepository()->find($id);\n\n if($resource) {\n return $this->apiResponse->success($resource->toArray());\n }\n\n return $this->apiResponse->failed(array(\"resource not found\"), 404, \"Resource not found\");\n\t}", "title": "" }, { "docid": "412f76bcd34cbd9d455a43614efe905d", "score": "0.6027944", "text": "public function single(){\n \n $this->display();\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "8b1101140a2110ae57f11fa001bc879a", "score": "0.59651244", "text": "public function actionShow() {\n\n $workspace = $this->getSpace();\n $this->render('show', array('workspace' => $workspace));\n }", "title": "" }, { "docid": "8bc1c5b8544b92e4394c7b7553267dc3", "score": "0.5931247", "text": "public function show($id)\n\t{\n $model = $this->model;\n $resource = $model::find($id);\n\n if (!$resource) {\n return Response::apiNotFound();\n } else {\n\t\t return Response::api(['resource' => $resource]);\n }\n\t}", "title": "" }, { "docid": "0b4e77112a7869cf0d904b30e184112a", "score": "0.5922144", "text": "public function display()\r\n {\r\n $this->client = $this->get( 'client' );\r\n \r\n parent::display();\r\n }", "title": "" }, { "docid": "a6688716096de732ac676d2606652404", "score": "0.5905599", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "eddab4555ac4a572fa5a763f4e0471fc", "score": "0.58919686", "text": "public function show(HTTP_Request $request, HTTP_Response $response);", "title": "" }, { "docid": "0c9be934bd18c758ee8036136e38ca6d", "score": "0.586946", "text": "public function resource($resource)\n {\n return $this->_returnContent(\n 'resource://' . $resource->getResource()->getSha1()\n );\n }", "title": "" }, { "docid": "6fbb381f7148aba7574dc29413d87f90", "score": "0.5863148", "text": "public function display($id)\n {\n\n\n\n }", "title": "" }, { "docid": "ff6b8314d3827e83bc6f916f611deecc", "score": "0.5861292", "text": "public final function display()\n\t{\n\t\techo $this->fetch();\n\t}", "title": "" }, { "docid": "d9a6eb41dd9fbf426113fcd8b0ba834e", "score": "0.58584934", "text": "public function showAction()\n {\n $album = $this->_getAlbumById($this->_getParam('id'));\n $this->view->album = $album;\n $this->view->artist = $album->findParentRow('Model_Artist');\n }", "title": "" }, { "docid": "5781a2d120285a71e7e85b5a66be6d25", "score": "0.5857818", "text": "public function edit(Resource $resource)\n {\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "fb50b97152154644c43c75ade8145487", "score": "0.5847528", "text": "public function show($id)\n\t{\n\t\treturn $this->resource->find($id);\n\t}", "title": "" }, { "docid": "8827cab97e78bc260c04825c9bb3d30a", "score": "0.5832523", "text": "public\n\t\tfunction show($id)\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "1859e20a258f6d15d4629c6689c04084", "score": "0.5794996", "text": "public function show()\n\t{\n\t\t\n\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "b305d1a5fdddca312c53a5b0873ba322", "score": "0.5764189", "text": "public function get(string $resource, int $id);", "title": "" }, { "docid": "e85f77f9bd4a383aa63ea576917efd8b", "score": "0.57539546", "text": "public function show(Respon $respon)\n {\n //\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\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": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "bd887cc40d240b6d393f5e769c337a39", "score": "0.5715846", "text": "public function display()\n {\n echo $this->tplObj->fetch();\n }", "title": "" }, { "docid": "056b3dd2a38f029f5eae7e6137d14e09", "score": "0.5703375", "text": "public function show($id)\n\t{\n\t\t$data = $this->resource->show($id);\n\t\treturn $this->responseMessage($data);\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": "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": "8a051215912849e35253d096a8bfd6b8", "score": "0.56884444", "text": "public function show($object)\n {\n //\n }", "title": "" }, { "docid": "f16e75f4649c770d9e84451bfcb472f1", "score": "0.5685978", "text": "public function show(Capacity $capacity)\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": "" }, { "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": "" } ]
6b58b0f72581ab68cea422fb22dc1825
Elimina un control dado su id.
[ { "docid": "b8c6e64c5a35ea1c5223fad64b347443", "score": "0.68770045", "text": "public function deleteControlById($idControl) {\r\n $tabla = \"planeacioncontrol\";\r\n $predicado = \"idPlaneacionControl = \" . $idControl;\r\n $r = $this->db->borrarRegistro($tabla, $predicado);\r\n return $r;\r\n }", "title": "" } ]
[ { "docid": "e2c67d3cc810cddaf034e2c2ae868cf0", "score": "0.71951675", "text": "public function remove_control( $id ) {\n\t\t$this->parent->remove_control( $this->get_control_id( $id ) );\n\t}", "title": "" }, { "docid": "face9ee832a015ec56c949241b81a9e3", "score": "0.6921015", "text": "public function eliminar($id);", "title": "" }, { "docid": "435282090f724666ba07bf1015ccf9a2", "score": "0.6788736", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.6748416", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.6748416", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.6748416", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.6748416", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.6748416", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "110d49ec244fd5f3bc4864b99286aaae", "score": "0.67128813", "text": "public function eliminar($id)\n {\n //\n }", "title": "" }, { "docid": "110d49ec244fd5f3bc4864b99286aaae", "score": "0.67128813", "text": "public function eliminar($id)\n {\n //\n }", "title": "" }, { "docid": "eef4e51dd7b7c672da044f23bc20b461", "score": "0.6678577", "text": "public function eliminar($id)\r\n {\r\n }", "title": "" }, { "docid": "e5d6084311e6f1e8ff8172baabf471cc", "score": "0.6610316", "text": "public function eliminarPorId($id)\n {\n }", "title": "" }, { "docid": "8568afab780924979ae6c185ed880bca", "score": "0.6476962", "text": "function eliminarTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n mysql_query(\"DELETE FROM ca_tipo_matricula WHERE id = ? ;\");\n $sql = \"DELETE FROM ca_tipo_matricula WHERE id = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "title": "" }, { "docid": "d12e439ded7494457fd7fdc870a7362f", "score": "0.6437", "text": "public static function deleteField($id){\n DB::table('pista')\n ->where('id',$id)->delete();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.63789016", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.63789016", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.63789016", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.63789016", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.63789016", "text": "public function remove($id);", "title": "" }, { "docid": "e7cf16765acfece99a4a8e17b1ff3aa0", "score": "0.63452756", "text": "function eliminar($id) {\n\t\t\tif ($this->con->conectar() == true) {\n\t\t\t\treturn mysql_query(\"DELETE FROM nivel_educativo WHERE nivelDescripcion = '\".$id.\"'\");\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "30ffc52b6a5d02be3496ddd99a80099b", "score": "0.632274", "text": "final public function delete($id) {\n global $config;\n\n # Borrar el elemento de la base de datos\n $hijos = $this->db->query_select(\n \"SELECT COUNT(*) as total\n FROM nino_2\n WHERE id_padre=$id;\"\n );\n $hijos = $hijos[0]['total'];\n\n if ($hijos == 0){\n # Borrar el elemento de la base de datos\n $this->db->query(\"DELETE FROM padre_2 WHERE cedula = '$id'\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'representantes/&success=true');\n }\n else{\n $this->functions->redir($config['site']['url'] . 'representantes/&success=true');}\n \n }", "title": "" }, { "docid": "018804bbc6ac67d66e510961d77fc992", "score": "0.6320135", "text": "public function eliminarficha($id)\n {\n\n $this->db->delete('etiqueta_marc', array('id' => $id));\n\n }", "title": "" }, { "docid": "b814443f39ed48bb1cbfbb3692c57f6c", "score": "0.6314573", "text": "public function Eliminar($id){\n\t\t\n\t\ttry \n\t\t{\n\t\t\t$stm = $this->pdo\n\t\t\t ->prepare(\"DELETE FROM datos WHERE Identificador = ?\");\t\t\t \n\n\t\t\t$res=$stm->execute(array($id));\n\t\t\treturn $res;\n\t\t} catch (Exception $e) \n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\n\t\t\n\n }", "title": "" }, { "docid": "aaec726884685d92bb004a255f536cb6", "score": "0.6293332", "text": "public static function eliminar_registro($id){\n require 'php/conexion.php';\n $records = $conn->prepare(\"DELETE FROM cuerpo_tecnico WHERE id_cuerpo_tecnico = '$id'\");\n if($records-> execute()){\n return \"Datos eliminados exitosamente\";\n }\n else{\n return \"Datos no eliminados\";\n }\n }", "title": "" }, { "docid": "d42b7a0376cce8423fa6db882ff0f69d", "score": "0.6280554", "text": "public function remove(string $id);", "title": "" }, { "docid": "d50d0432463b06d665b25eb45af8fd2a", "score": "0.626098", "text": "public function EliminarInstituto($id){\n if($this->security_check()){\n\n $resultado = $this->InstitutosModel->EliminarInstituto($id);\n \n if ($resultado) {\n $this->load->model(\"InstitutosModel\");\n $data[\"listaInstitutos\"] = $this->InstitutosModel->getAll();\n $this->load->view(\"header\",$data);\n } else {\n echo \"No se pudo eliminar el instituto.\";\n $this->load->view(\"header\");\n }\n \n }\n }", "title": "" }, { "docid": "a61e23f2c1a303e1d371166910ff967e", "score": "0.6259527", "text": "public function eliminarTip()\n {\n $this->validarSesion();\n $id = $_POST['valor'];\n $this->carruselModelo->eliminarTip($id);\n $this->formatoadmin();\n }", "title": "" }, { "docid": "bfe4cddd4c5031eb27af01b7551929fb", "score": "0.6256213", "text": "public function delete($id){\n $sql = \"delete from tbl_aluno where matricula =\".$id;\n\n $conex = new conexaoMySql();\n $PDO_conex = $conex->conectDatabase();\n\n if ($PDO_conex->query($sql)) {\n echo \"Excluído com sucesso\";\n } else {\n echo \"Erro no script de delete\";\n }\n\n $conex->closeDatabase();\n }", "title": "" }, { "docid": "94f65963ff39ab5d1470f42d794da036", "score": "0.6254424", "text": "function remover($id)\n {\n try {\n $conexao = Conexao::getInstance();\n $stmt = $conexao->prepare(\"DELETE FROM `palestras` WHERE idpalestras= '{$id}'\");\n return $stmt->execute();\n } catch (PDOException $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "601830be4466512cc3cc8e9b61533406", "score": "0.6246302", "text": "static function remove($id) {\n $cnpj = $_SESSION['login']['cnpj_empresa'];\n if(empty($id))\n throw new SistemaException(\"Para ser removido, o cliente deve possuir ID!\");\n $sql = \"DELETE FROM tb_cliente WHERE id = :id AND cnpj_empresa = :cnpj_empresa\";\n $DB = db_connect();\n $stmt = $DB->prepare($sql);\n $stmt->bindParam(':id', $id);\n $stmt->bindParam(':cnpj_empresa', $cnpj);\n $stmt->execute();\n }", "title": "" }, { "docid": "3b433a1de922590346cfc02876eefa7e", "score": "0.62203157", "text": "public static function remove($id);", "title": "" }, { "docid": "5159e5d21c5dd9d40f87ef6c55fc71e7", "score": "0.62029135", "text": "public function eliminar($id) {\n $db = new BD();\n $res = mysqli_query($db->connection,\"DELETE FROM concurso WHERE edicion=\".\"'$id'\");\n $db->desconectar();\n return $res;\n }", "title": "" }, { "docid": "1b9f5ef97eb72c111b6cfc4b93ed6b79", "score": "0.61972", "text": "public function remove($id)\n {\n //\n }", "title": "" }, { "docid": "cb011dfecc55ee15b0166dd24a4c9c3f", "score": "0.6166582", "text": "public function delete($id) {\n\n $sql = \"DELETE FROM grupos WHERE id = ? \";\n \n $stmt = $this->conexao->prepare($sql);\n $stmt->bindValue(1, $id);\n $stmt->execute();\n }", "title": "" }, { "docid": "f147aedf14b19b0900bfc1c7aa5a59a2", "score": "0.61423665", "text": "public function remove($id)\n {\n }", "title": "" }, { "docid": "f147aedf14b19b0900bfc1c7aa5a59a2", "score": "0.61423665", "text": "public function remove($id)\n {\n }", "title": "" }, { "docid": "435ed5efe4fb855c552daea44fa19c20", "score": "0.6131282", "text": "public function destroy($id)\n\t{\n\t\t//Delete the control\n\t\t$control = Control::find($id);\n\t\t$control->delete();\n\t\t// redirect\n\t\treturn Redirect::route('control.index')->with('message', trans('messages.success-deleting-control'));\n\t}", "title": "" }, { "docid": "071b93802cc843371e198d65311cd083", "score": "0.6126228", "text": "function eliminarCursosDelTipoDeMatricula($id){\n \t$pdo = DatabaseCao::connect();\n $sql = \"DELETE FROM ca_tipo_matricula_curso WHERE tipo_matricula = ?\";\n $q = $pdo->prepare($sql);\n $q->execute(array($id));\n DatabaseCao::disconnect();\n }", "title": "" }, { "docid": "e5b8b5785ccf2676d3dd26c70225b5b7", "score": "0.6121846", "text": "function admin_remove($id=null){\n\n\tif(!empty($id)){\n\t\t $this->Formula->delete($id);\n\t\t $this->Session->setFlash(\"Formula Deleted !\");\n\t\t$this->redirect($this->referer());\n\t}else{\n\t\t$this->Session->setFlash(\"Invalid Formula Selected\");\n\t\t$this->redirect($this->referer());\n\t}\n }", "title": "" }, { "docid": "8cabfbae33e77aed15b99fdf2dde9de1", "score": "0.61100686", "text": "public function eliminar($id) {\n $mensaje = \"Fallido\";\n $conexion = new Conexion();\n $consulta = $conexion->prepare('DELETE FROM tema WHERE id= :idc');\n $consulta->bindParam(':idc', $id);\n if ($consulta->execute()) {\n $mensaje = \"exitoso\";\n }\n return $mensaje;\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.6105394", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.6105394", "text": "public function removeById($id);", "title": "" }, { "docid": "c1cd53c07b791ece8f3d820e2ec9afec", "score": "0.60726583", "text": "public function deleteCasino($id);", "title": "" }, { "docid": "8eb8e897b9861f632670dcf6aa23b7f7", "score": "0.6063731", "text": "public function delete_field() {\n $id = $this->input->post('id');\n $result = $this->social->remove($id);\n if($result == TRUE){\n echo 'there is delete';\n }\n }", "title": "" }, { "docid": "0e80171dbf13e341895b9fad4f81becd", "score": "0.6035681", "text": "public function eliminar($id){\n\t\n\t\t$this->db->delete(\"ventas\", array(\"id\" => $id));\n\t\n\t}", "title": "" }, { "docid": "a1293edbc1ed8f8bf749778dcf54cb8a", "score": "0.6028613", "text": "public function eliminar($id)\n {\n $cliente = cliente::find($id);\n $cliente->delete();\n\n $bitacoras = new App\\Bitacora;\n\n $bitacoras->user = Auth::user()->name;\n $bitacoras->lastname = Auth::user()->name;\n $bitacoras->role = Auth::user()->user_type;\n $bitacoras->action = 'Ha Eliminado un Cliente';\n $bitacoras->save();\n\n flash('¡Registro eliminado satisfactoriamente!', 'success');\n\n return back()->with('info', 'El cliente ha sido eliminado');\n }", "title": "" }, { "docid": "445e85f752a665c879cf5c21fcb2d622", "score": "0.60262495", "text": "function eliminar_clip($id)\n {\n $con = new DBmanejador;\n \tif($con->conectar()==true)\n \t{\n\t\t \t $consulta= \"delete from tclips where clip_id=('\".$id.\"')\";\n\t\t\t\t $resultado=mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());\n\n\t\t\t\t if (!$resultado) return false;\n\t\t\t\t else return true;\n \t}\n }", "title": "" }, { "docid": "b7b5da9c580303d6b2feeb68958cc902", "score": "0.6021109", "text": "public function eliminar($id)\n {\n\n $this->clientes->update($id, ['activo_clt' => 0]);\n\n //luego agregamos un retorno \n return redirect()->to(base_url() . '/clientesContr');\n }", "title": "" }, { "docid": "41684aa58a5e71ee790f03596f7dd12e", "score": "0.6017537", "text": "private function eliminar($id) {\r\n\t\tif(!$id = $this->seguridad->entero_seguro($id)) {\r\n\t\t\t$this->error = \"ID no es Seguro\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$sql = sprintf(\"DELETE FROM clientes WHERE id='%d'\", $id);\r\n\t\t\r\n\t\tif($elimino = mysqli_query($this->conexion, $sql)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\t$this->error = \"No se puede Eliminar\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e4bee015f8d6cca1b1cfb45355b13cbb", "score": "0.60161084", "text": "public function delete($id)\n {\n mysqli_query($this->koneksi, \"DELETE from pemesanan where id='$id'\");\n }", "title": "" }, { "docid": "50190129a5006088ba4d8590f2f6a516", "score": "0.6012937", "text": "public function eliminar_por_id($id){\n $this->db->where('menu_id', $id);\n $exito = $this->db->delete($this->t2);\n // Eliminar en la tabla menú\n if ($exito){\n $this->db->where('menu_id', $id);\n $this->db->delete($this->t1);\n }\n //$this->db->query(\"SET FOREIGN_KEY_CHECKS = 0\"); \n //$this->db->query(\"SET FOREIGN_KEY_CHECKS = 1\");\n }", "title": "" }, { "docid": "d716bb59c7b782de70c248300308e196", "score": "0.6002992", "text": "public function deleteAutocontrolById($idAutocontrol) {\r\n $tabla = \"planeacionautocontrol\";\r\n $predicado = \"idPlaneacionAutocontrol = \" . $idAutocontrol;\r\n $r = $this->db->borrarRegistro($tabla, $predicado);\r\n return $r;\r\n }", "title": "" }, { "docid": "5a0a83898d7df1f67023a0e59e38d39e", "score": "0.5998397", "text": "public function deleteOilID($id) {\n $this->db->table('oleje')\n ->where('id_oleje', $id)\n ->delete();\n }", "title": "" }, { "docid": "23575d781c7c07fecf4defd85f0dcbce", "score": "0.5989527", "text": "public function deletar($id) {\n }", "title": "" }, { "docid": "246ab64ac50c5f165ecc0fe39c70cf95", "score": "0.5987469", "text": "public function delete($id){\n\t\t$this->action_delete($id,new Group());\n\t}", "title": "" }, { "docid": "ff611cdbc83f199d32f0626956a8835c", "score": "0.5984858", "text": "public function delete($id)\n {\n mysqli_query($this->koneksi, \"DELETE from kelas where id='$id'\");\n }", "title": "" }, { "docid": "59755f3fdc101ebad2ba5f31027a0c04", "score": "0.5978849", "text": "public static function eliminarBD($id){\n\t\t$db = Db::getInstance();\n\t\t//$id=$_GET['id'];\n\t\t$req = $db->prepare('DELETE FROM articulo WHERE id=:id');\n\t\t$req->bindParam(\":id\", $id);\n\t\tif($req->execute()){\n\t\t\t?><script>\n\t\t\talert(\"Articulo Eliminado\");\n\t\t\t</script>\n\t\t\t<?php\n\t\t\treturn true;\n\n\n\t\t}else{\n\t\t\t\t\t\t?><script>\n\t\t\talert(\"Algo ha ido mal. No se ha eliminado\");\n\t\t\t</script>\n\t\t\t<?php\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "5a43eccc722aa4aae91c399774f64aec", "score": "0.59577256", "text": "public function remove($id): void;", "title": "" }, { "docid": "6bacdecef5c35b77aa70e85bf7c1da25", "score": "0.59497756", "text": "function rec_del( $db, $id ) {\n\t$sqlstring = \"DELETE from registrazioni where id='$id'\";\n\n\tif ( ($result = $sq->exec($sqlstring)) == FALSE) {\n\t\tmyerror(\"Impossibile cancellare\");\t\n\t} else {\n\t\tmymessage(\"Registrazione correttamente cancellata!\");\t\n\t}\n}", "title": "" }, { "docid": "e815b6238d4f881048e35081505f18e8", "score": "0.5949532", "text": "public function delete($id){\r\n $sql = \"DELETE FROM tblcontatos where codigo=\".$id;\r\n\r\n //Abrindo conexão com o BD\r\n $PDO_conex = $this->conex->connectDataBase();\r\n\r\n //Executa no BD o script Insert e retorna verdadeiro/falso\r\n if($PDO_conex->query($sql)){\r\n header(\"location:index.php\");\r\n }else{\r\n echo(\"Erro de script de delete\");\r\n }\r\n\r\n //Fecha a conexão com o BD\r\n $this->conex->closeDataBase();\r\n }", "title": "" }, { "docid": "b0d26011db93ba73486b1fd2e53bee43", "score": "0.5946173", "text": "public function actionEliminaAdmin($id) {\n }", "title": "" }, { "docid": "8923c2f853a122cb097ae7db37ccdecc", "score": "0.5943581", "text": "public function eliminar($id) {\n $mensaje = \"Fallido\";\n $conexion = new Conexion();\n $consulta = $conexion->prepare('DELETE FROM administrador WHERE id= :idc');\n $consulta->bindParam(':idc', $id);\n if ($consulta->execute()) {\n $mensaje = \"exitoso\";\n }\n return $mensaje;\n }", "title": "" }, { "docid": "5e7c389f2495b43da0af0b9c0801008b", "score": "0.59380734", "text": "public function deleteVille($id){\n \n global $conn; \n //req_delete : sql requete delete ville by ile\n $req_delete = \"DELETE FROM villes WHERE id=\".$id;\n\n // execute sql requete\n $conn->query($req_delete);\n\n }", "title": "" }, { "docid": "62442b789c25a7ed56974aa25f9b4765", "score": "0.59291214", "text": "function delete_computadora($id)\n {\n return $this->db->delete('computadoras',array('id'=>$id));\n }", "title": "" }, { "docid": "4f9761ba2b79d6fe6f4a7fe63eedac50", "score": "0.5928278", "text": "public function removeById($id)\n {\n }", "title": "" }, { "docid": "b7012ad8d4fde3dd04ff09b99edc57fe", "score": "0.59120005", "text": "public function remove(string $id): self;", "title": "" }, { "docid": "7ffdc766049095337a648c3a0a3ef6a4", "score": "0.59100693", "text": "public function delete($id) {\n try {\n\n $arrayOrderFields = scaffold::getMetaData($this->tableName);\n $this->arrayMetaData = scaffold::getMetaData($this->tableName, 'COLUMN_NAME');\n\n $data = scaffold::getById($id, $this->tableName, $arrayOrderFields);\n\n scaffoldView::set('title', 'Eliminació de ' . $this->tableName);\n scaffoldView::set('row', $data);\n scaffoldView::set('action', 'DELETE');\n scaffoldView::set('arrayMetaData', $this->arrayMetaData);\n scaffoldView::renderDialog();\n unset ($data);\n } catch (Exception $e) {\n error::writeLog($e->getMessage(), __METHOD__);\n }\n }", "title": "" }, { "docid": "9630eab2695cb065b7207447a94e72c1", "score": "0.590341", "text": "public function eliminar(){\n\t\tif (!$this->request->is('post')) {\n \tthrow new MethodNotAllowedException();\n\t }\n\t $id = $this->request->data[id];\n\t if ($this->Nomina->delete($id)) {\n\t $this->Session->setFlash('Nomina fue eliminada con éxito!', 'default', array(), 'success');\n\t }\t\t\n\t\t\n\t}", "title": "" }, { "docid": "c2b5c1692ee32e80a7642497ed5d7b67", "score": "0.59002554", "text": "public function eliminar_termino($id) {\n \tif (Session::Get('autenticado_adminsciocco') == true ){ \n\t\t\tSession::set('modulo', \"admin\");\n\t //Si el id no es un nro entero\n\t if (!$this->filtrarInt($id)) {\n\t //Se redirecciona al index\n\t $this->redireccionar('index','terminos');\n\t }\n\n\t\t\t//Si no existe un registro con ese id\n\t\t\tif (!$this->_terminos->get_termino($this->filtrarInt($id))) {\n\t\t\t\t$this->redireccionar('index','terminos');\n\t\t\t}\n\n \t$this->_terminos->eliminar_termino($this->filtrarInt($id));\n } else {\n \t\t$this->redireccionar('admin');\n \t}\n }", "title": "" }, { "docid": "5983708d8b583f6bdf8756aa00129026", "score": "0.58985156", "text": "public function eliminar_delete( $id ){\n\n // Comprobar que se reciba un id\n if( !$id ){\n $this->response( null, 400 );\n }\n\n $delete = $this->comites_model->delete( $id );\n\n // Comprobar que se haya borrado\n if( !is_null( $delete ) ){\n $this->response( array( 'response' => 'comite eliminado correctamente..' ), 200 );\n } else {\n $this->response( array( 'error' => 'Algo ha fallado en el servidor. No se pudo borrar el comite'));\n }\n }", "title": "" }, { "docid": "37c66038d0da2dde471a2bbce990251f", "score": "0.58939505", "text": "public function eliminar($id){\n $this->Data_base->eliminando_tabla($id);\n header('location:/../Formulario/index.php/Ejecutar/cargar_datos');\n \n }", "title": "" }, { "docid": "869babca672375591c670cbede712660", "score": "0.58931535", "text": "public function deleteSelectField($id){\n\n $inv_gtask = InvGtask::findOrFail($id);\n $inv_gtask->delete();\n\n return Redirect::back()->with('message','Removed Successfully.');\n }", "title": "" }, { "docid": "a24ee341a766d1588e50242ff854cddf", "score": "0.589206", "text": "public function actionEliminar($id)\n {\n $this->loadModel($id)->delete();\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }", "title": "" }, { "docid": "79538c19a569072dc160f4ea38901fa7", "score": "0.5891002", "text": "public function eliminarAtributo($id){\n $atributo=Atributo::findOrFail($id);\n $grupo=$atributo->grupoAtributo->id;\n $atributo->delete();\n\n\n \\flash('atributo eliminado con exito')->important()->success();\n if(\\Auth::user()->rol_id==2){\n return \\redirect()->route('tiendas.grupoAtributo.edit',$grupo);\n }else{\n return \\redirect()->route('grupoAtributo.edit',$grupo);\n }\n \n\n }", "title": "" }, { "docid": "c80978d7afda9b011873c2db61147e2d", "score": "0.5884491", "text": "function supprimer($id) {\n\t\t$sql=\"delete from $this->table where $this->cle=:id\";\n\t\t$statement = self::$link->prepare($sql);\n\t\t$statement->bindValue(\":id\",$id,PDO::PARAM_INT);\n\t\ttry {\n\t\t\t$statement->execute();\n\t\t} finally {}\n\t}", "title": "" }, { "docid": "1b88ac426de8b0d32c05967d181bca28", "score": "0.5883776", "text": "function eliminar($id)\n\t{\n\t\t$data=$this->detalle($id);\n\t\tforeach ($data as $fila) {\n\t\t\t$token=$data[0][\"token\"];\n\t\t}\n\t\t$this->db->where(\"token\",$token);\n\t\t$this->db->delete(\"pedidos_encabezados\");\n\t\t//\n\t\t$this->db->where(\"token\",$token);\n\t\t$this->db->delete(\"pedidos_detalle\");\n\t}", "title": "" }, { "docid": "89e8deed349fbea3a70ced7a1069c735", "score": "0.58761436", "text": "public function delAjusteId($id){\n\t\t\t$this->db->query(\"DELETE FROM ajustes WHERE id_ajustes=:id\");\n\n\t\t\t$this->db->bind(':id', $id);\n\n\t\t\t$this->db->execute();\n\t\t}", "title": "" }, { "docid": "24e82565447c441c1eded05610464d83", "score": "0.58700913", "text": "public function delete($id){\n\t\t$this->db->where('id_pasangan', $id);\n \t$this->db->delete('pasangan'); // Untuk mengeksekusi perintah delete data\n\t}", "title": "" }, { "docid": "98a039950215693ad75937112843a7b8", "score": "0.5870041", "text": "function remove($id) {\n $query = $this->db->prepare('DELETE FROM city WHERE id = ?');\n $query->execute([$id]);\n }", "title": "" }, { "docid": "e369970c0654956c63c59a6a1e92ec55", "score": "0.58696526", "text": "public function validator_delete($id)\n {\n }", "title": "" }, { "docid": "3d08b862fec0d5bb6f275f6d19761b05", "score": "0.58665764", "text": "public function delete(){\n\t\t\t\n\t\t\t// $sql = \"DELETE FROM $this->table WHERE $campo = :id\";\n\t\t\t// $stmt = @BD::conn()->prepare($sql);\n\t\t\t// $stmt->bindParam(':id',$id, PDO::PARAM_INT);\n\t\t\t// return $stmt->execute();\n\n\t\t}", "title": "" }, { "docid": "716c7b5a9a7688893af91c9aa4323177", "score": "0.58659303", "text": "public function remove($id)\n {\n $sql = \"DELETE FROM liste WHERE id = :id\";\n\n $stmnt = $this->db->prepare($sql);\n\n $stmnt->bindParam(':id', $id);\n\n $stmnt->execute();\n }", "title": "" }, { "docid": "7cae73198fd320de7c8b4709c60ce35e", "score": "0.5865846", "text": "public function deleteNc($id)\n{\n\n\t$this->nc_model->deletar($id);\n\n\tredirect('nc/listAll','refresh');\n}", "title": "" }, { "docid": "f78259bca2d63a91b231268ae591c546", "score": "0.5865274", "text": "public function destroy($id)\n {\n try {\n $clinica = Clinica::find($id);\n $clinica->delete();\n echo \"Eliminado\";\n } catch (Exception $e) {\n //print_r($e->errorInfo);\n if ($e->errorInfo[1]==1451) {\n echo 'No fue posible eliminarlo debido a que tiene información relacionada.';\n } else {\n echo $e;\n }\n }\n }", "title": "" }, { "docid": "9a0b1dd8f8d5f00621f8c00a8ce54be8", "score": "0.5852222", "text": "public function del(){\n\t\t$sql = \"delete from \".self::$tablename.\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "1ba69ccac07ebd90ff292ce9952bed03", "score": "0.5851264", "text": "public function deleteObservacionById($idObservacion) {\r\n $tabla = \"observacionautocontrol\";\r\n $predicado = \"idObservacionAutocontrol = \" . $idObservacion;\r\n $r = $this->db->borrarRegistro($tabla, $predicado);\r\n return $r;\r\n }", "title": "" }, { "docid": "83bd108f7d3e658f2bf42f27b5bf028e", "score": "0.5850655", "text": "public function destroy($id)\n {\n $eliminar=DB::table('Descargas')->where('Descargas.idDescargas',$id)->delete(); \n }", "title": "" }, { "docid": "f0071f6837753ab5fb1784e52871477b", "score": "0.5849402", "text": "function eliminarHorario($id){\r\n $this->db->where('id_agenda', $id);\r\n $this->db->limit(1);\r\n return $this->db->delete('horarioatencion');\r\n }", "title": "" }, { "docid": "cb6e2227f0e8eac6f662b429449889f4", "score": "0.5828278", "text": "public function eliminar($id)\n {\n \n if(!\\Auth::user()){\n return redirect()->action('HomeController@index');\n }\n if(!\\Auth::user()->admin){\n return redirect()->action('HomeController@index');\n }\n\n $cancha = Cancha::find($id);\n $cancha->delete();\n\n return view('index');\n }", "title": "" }, { "docid": "78f4604e35f346843bbe8b66158cdfc2", "score": "0.58271474", "text": "public function destroy($id)\n {\n $rubrosCdpValor = RubrosCdpValor::where('rubrosCdp_id', $id)->get();\n foreach ($rubrosCdpValor as $borrar){\n $borrar->delete();\n }\n Session::flash('error','Dinero liberado correctamente del rubro');\n }", "title": "" }, { "docid": "1fdb002940c3e827bc1a1d87b8983c98", "score": "0.5815985", "text": "public function delNoticias($id){\n\t\t\t$this->db->query(\"DELETE FROM noticias WHERE id_noticias=:id\");\n\n\t\t\t$this->db->bind(':id', $id);\n\n\t\t\t$this->db->execute();\n\t\t}", "title": "" }, { "docid": "cda0028a727dca8be928f3b9b35537f8", "score": "0.58142114", "text": "public function eliminarCultivo()\n {\n $this->validarSesion();\n $id = $_POST['valor'];\n $this->cultivoModelo->eliminarCultivo($id);\n header('Location:' . RUTA_URL . 'index/mostrarFincas');\n }", "title": "" }, { "docid": "425e8f2476ad8a1fcbcfe2769f9dfb59", "score": "0.58082646", "text": "public function eliminarc($id_cancha, $imagen)\n {\n\n $cn=new Conexion();\n\n $sql=\"DELETE FROM canchas WHERE id_cancha='$id_cancha'\";\n\n if ($cn->query($sql)) {\n\n echo \"<script>alert('Cancha Eliminada...');\n self.location='Formcanchas.php?accion=listarc#listado'; \n </script>\";\n\n unlink($imagen);\n\n $general=new General();\n\n $general->devautoincremento(\"id_cancha\", \"canchas\" );\n\n } else {\n\n echo \"<script>alert('Error, Cancha no Eliminada');\n window.history.back();\n </script>\";\n }\n\n $cn->close();\n\n }", "title": "" }, { "docid": "c279c0aa0dffa62acf19cf989b49a726", "score": "0.58049387", "text": "private function _remove($id)\n\t{\n\t\t$form_tambah_dokumentasi = $this->model_form_tambah_dokumentasi->find($id);\n\n\t\tif (!empty($form_tambah_dokumentasi->file)) {\n\t\t\t$path = FCPATH . '/uploads/form_tambah_dokumentasi/' . $form_tambah_dokumentasi->file;\n\n\t\t\tif (is_file($path)) {\n\t\t\t\t$delete_file = unlink($path);\n\t\t\t}\n\t\t}\n\n\t\t\n\t\treturn $this->model_form_tambah_dokumentasi->remove($id);\n\t}", "title": "" }, { "docid": "95e7434f3fc23a530cb8ea6a608411e2", "score": "0.58030003", "text": "final public function delete() {\n global $config;\n # Borrar el elemento de la base de datos\n $this->db->query_select(\"DELETE FROM ejercicios_4\n WHERE id_ejercicio = $this->id\");\n # Redireccionar a la página principal del controlador\n $this->functions->redir($config['site']['url'] . 'ejercicios/');\n }", "title": "" }, { "docid": "538b86eb6e71db49d62f80d29bf9937b", "score": "0.58002865", "text": "static public function mdlEliminarCombo($tabla,$id){\n\t\n\t\t$stmt = Conexion::conectar()->prepare(\"DELETE FROM $tabla WHERE id=:id\");\n\n\t\t$stmt -> bindParam(\":id\", $id, PDO::PARAM_INT);\n\t\n\t\tif($stmt -> execute()){\n\n\t\t\treturn \"ok\";\n\t\t\n\t\t}else{\n\n\t\t\treturn \"error\";\t\n\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "7c01025db0aa0e3abdc16d668bebd2ff", "score": "0.5800157", "text": "function remove(){\n $modelUser = new User();\n $id = $_POST['id'];\n $modelUser->remove((int)$id);\n }", "title": "" }, { "docid": "53c539c065bf13278cb2e1ebd4f5969b", "score": "0.5797999", "text": "public function delete($id){\n\t\t$sql = 'DELETE FROM tbl_form_1701q WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t$sqlQuery->setNumber($id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "3f71e65938fcd3011bf3d3e1fc7e4a9a", "score": "0.57955337", "text": "public static function delete($id_tienda){\n\t\t$db=Db::getConnect();\n\t\t$delete=$db->prepare('DELETE FROM tienda WHERE id_tienda=:id_tienda');\n\t\t$delete->bindValue('id_tienda',$id_tienda);\n\t\t$delete->execute();\t\t\n\t}", "title": "" }, { "docid": "5600991555cb523a4ea64cc29f1d1f1f", "score": "0.5793174", "text": "function eliminar($idEncuesta){\n\t $conexion=$this->Conectarse();\n\t\t$consulta=\"DELETE FROM encuesta WHERE encuesta.id='$idEncuesta'\";\n\t\t$resultset=$conexion->query($consulta) or die(mysql_error()); \n\t\tif ($resultset==1)\n\t\treturn 1;\n\t\telse\n\t\treturn 0;\n\t}", "title": "" } ]
5fd069ff416abf1b455be171c4feed65
Creates a form to delete a class entity.
[ { "docid": "74df1ddd2589529e16b4b4285c62b133", "score": "0.7652774", "text": "private function createDeleteForm(Classes $class)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('class_delete', array('id' => $class->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" } ]
[ { "docid": "30061d5477138dd0f98cf227c2633bbf", "score": "0.76241773", "text": "private function createDeleteForm()\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('texto_mail_delete', array('id' => '__obj_id__')))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1405c65c95f0efddbe98f4f9e2d54cb9", "score": "0.72685176", "text": "private function createDeleteForm()\n {\n $usuario = $this->get('security.token_storage')->getToken()->getUser();\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('delete_account', array('id' => $usuario->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "14dd62723b1087232c65d1b390bb2c9f", "score": "0.70191216", "text": "protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new AppForm;\r\n\t\t$form->addSubmit('cancel', 'Cancel');\r\n\t\t$form->addSubmit('delete', 'Delete')->setAttribute('class', 'default');\r\n\t\t$form->onSubmit[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection('Please submit this form again (security token has expired).');\r\n\t\treturn $form;\r\n\t}", "title": "" }, { "docid": "7bf83419debc125e86f846c65da75dd3", "score": "0.69706476", "text": "private function createDeleteForm(CfgTipoClase $cfgTipoClase)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cfgtipoclase_delete', array('id' => $cfgTipoClase->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0ba597ddacd97685b73bb54b1c00166c", "score": "0.6880435", "text": "public function deletefromclassesform($url, $deleteclasslist, $classinfo) {\n global $CFG;\n\n $params = $arrayName = array('deleteclasslist' => $deleteclasslist, 'classinfo' => $classinfo);\n\n require_once($CFG->dirroot.'/auth/dq/forms.php');\n\n return new auth_dq_delete_student_from_class($url, $params, 'post', '', array('autocomplete' => 'on'));\n }", "title": "" }, { "docid": "188ab9f76c54461c7d76c3fe5a26405f", "score": "0.6817641", "text": "private function createDeleteForm(Contraventionale $contraventionale)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contraventionale_delete', array('id' => $contraventionale->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a33b83ac1b214d519b7ce49af0a415b1", "score": "0.68129134", "text": "private function createDeleteForm($id)\n {\n\t\t$this->securityControle();\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etude_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Effacer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "da47fe242ce57014d9dc053cec247376", "score": "0.67950666", "text": "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('categorie_delete', array('id' => $id)))\r\n //->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la catégorie courante'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "c323645eb41190b10f9ceae90b1e14cb", "score": "0.6791641", "text": "private function createDeleteForm($id)\n {\n //$eliminar=$this->get('translator')->trans('Eliminar');\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('seguimiento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => \"Eliminar\", 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "049209cb8c7b0da34437b18093a76fa5", "score": "0.67859375", "text": "private function createDeleteForm( $id ) {\n\t\treturn $this->createFormBuilder()\n\t\t ->setAction( $this->generateUrl( 'empleados_delete', array( 'id' => $id ) ) )\n\t\t ->setMethod( 'DELETE' )\n\t\t ->add( 'submit', 'submit', array( 'label' => 'Delete' ) )\n\t\t ->getForm();\n\t}", "title": "" }, { "docid": "9a0af095a9c0bd7b8092c45f5df192b3", "score": "0.67434424", "text": "private function createDeleteForm($id)\n {\n \treturn $this->createFormBuilder()\n \t->setAction($this->generateUrl('server_delete', array('id' => $id)))\n \t->setMethod('DELETE')\n \t->add('submit', 'submit', array(\n \t\t\t'label' => 'Delete',\n \t\t\t'attr' => array('class' => 'ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-icon-check')\n \t))\n \t->getForm()\n \t;\n }", "title": "" }, { "docid": "3b14adc330b2789bacf872fef82f0af9", "score": "0.673142", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_entradas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Eliminar',\n 'attr' => array('class' => 'btn-danger'),\n 'icon' => 'trash',\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9049f25ce5768d4cb7f076bdbc05843b", "score": "0.6725559", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estadodecuentas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a2cd4bf66c44d5224b352c363757493f", "score": "0.6720514", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cursos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d1f1f333efed7d43a5fbd16f9c605012", "score": "0.6714699", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_matchtennis_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer','attr'=>array('class'=>\"btn icon-btn btn-danger\")) ) \n ->getForm()\n ;\n }", "title": "" }, { "docid": "d876d0bb0318d2f64ecdf2f8e2279649", "score": "0.671439", "text": "private function createDeleteForm(Type $type)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t ->setAction($this->generateUrl('type_delete', array('id' => $type->getId())))\n\t\t ->setMethod('DELETE')\n\t\t ->getForm()\n\t\t\t;\n\t}", "title": "" }, { "docid": "13ea31636a509759352de8acd34c2191", "score": "0.6710326", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('modelos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "713d5237ccd41027dc1ab66c2f6e4ffb", "score": "0.67041296", "text": "public function deleteAction() {\n \t$id = $this->_getInt('id');\n\n \tif ($id) {\n \t\t$class = Doctrine::getTable($this->crudClass)->find($id);\n \t\tif ($class) {\n \t\t\t$class->delete();\t\t\t\t\n\t\t\t\tif (isset($_SERVER[\"HTTP_REFERER\"]) && strlen($_SERVER[\"HTTP_REFERER\"])) {\n\t\t\t\t\t$this->_redirect($_SERVER[\"HTTP_REFERER\"]);\n\t\t\t\t\treturn;\n\t\t\t\t}\n \t\t}\n \t}\n\n\t\t$this->_redirect('/' . $this->_getParam('module') . '/' . $this->_getParam('controller'));\n }", "title": "" }, { "docid": "05598ec755e0e569818ec9e9a85b0606", "score": "0.6695609", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('catadores_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2d8a0aba113436da4e421882c05cc835", "score": "0.66938585", "text": "private function createDeleteForm(GradeClass $gradeClass)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('course_gradeclass_delete', ['id' => $gradeClass->getId()]))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "36c385b7d2868192c0cb434f17635546", "score": "0.66881645", "text": "private function createDeleteForm($id) {\n $this->securityControle();\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('salairecompo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Effacer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f325c05e4aea705982b550346f485174", "score": "0.66871583", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demandes_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //->add('submit', 'submit', array('label' => 'Effacer','attr' =>array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c44d97abb6127adea02b30ce63d8f0b0", "score": "0.6681237", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('depot_delete', array('id' => $id)))\n ->setMethod('DELETE')\n //--\n ->add('supprimer', 'submit', array('label' => 'S', 'attr' => array('class' => 'btn-supp btn-danger', 'title' => 'Supprimer')))\n //--\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d0027be556b250f97ee13b53f524ac89", "score": "0.6651934", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('user_delete', array('id' => $id)))\n ->setMethod('DELETE')\n// ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'red')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c74a974c3527450e9a3742b40de9f3b0", "score": "0.6650064", "text": "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('supprimer_action', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm();\r\n }", "title": "" }, { "docid": "9167ea84d91a0576070f7003b74cd165", "score": "0.6641633", "text": "private function createDeleteForm(RefCourtier $refCourtier)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('refcourtier_delete', array('id' => $refCourtier->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b3a8f965dd26ae4159d063682ac6ce30", "score": "0.66399103", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder(null, array('attr' => array('id' => 'delete')))\n ->setAction($this->generateUrl('producto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c674b4a19a651171ace11ec8ae7cc7f0", "score": "0.66377527", "text": "private function createDeleteForm($id) {\n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('insumossuministrados_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7df68ca0f73a8827a3aab81b0efd3f19", "score": "0.6636304", "text": "private function createDeleteForm($id)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('cmf_admin_site_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', SubmitType::class, array('label' => 'Удалить', 'attr' => array('class' => 'btn btn-danger')))\n\t\t\t->getForm();\n\t}", "title": "" }, { "docid": "286398473e2e57552ef30443c7dce50f", "score": "0.6634671", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('poboxtype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8350e09d1248411ed1f1a10a12caef83", "score": "0.66344404", "text": "private function createDeleteForm(Comanda $comanda)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comanda_delete', array('id' => $comanda->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d4826414cbab11f5fc002ff3116f0482", "score": "0.6629299", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('kosten_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9f66a6f17d075fa85a27c7ed3a49bde9", "score": "0.6626078", "text": "private function createDeleteForm($id) {\r\n\t\treturn $this->createFormBuilder ()->setAction ( $this->generateUrl ( 'categoria_delete', array (\r\n\t\t\t\t'id' => $id \r\n\t\t) ) )->setMethod ( 'DELETE' )->add ( 'submit', 'submit', array (\r\n\t\t\t\t'label' => 'Delete' \r\n\t\t) )->getForm ();\r\n\t}", "title": "" }, { "docid": "8ec535aeb8210b4ba4fc250df9eb6218", "score": "0.6624307", "text": "private function createDeleteForm( $id ) {\n\t\treturn $this->createFormBuilder()\n\t\t ->setAction( $this->generateUrl( 'campania_encuesta_delete', array( 'id' => $id ) ) )\n\t\t ->setMethod( 'DELETE' )\n\t\t ->add( 'submit', 'submit', array( 'label' => 'Delete' ) )\n\t\t ->getForm();\n\t}", "title": "" }, { "docid": "a1d82c81cdf19627d3bd84935c4cefe8", "score": "0.6619641", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('com_facture_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "df55840862aba137ff8e7696cda4e954", "score": "0.6615826", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('curso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "192992254b854091f48e650d504382ed", "score": "0.6614526", "text": "private function createDeleteForm(Contrat $contrat) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contrat_delete', array('id' => $contrat->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "dca0f639eb56b72186ba15bfb9f0112d", "score": "0.6599708", "text": "private function createDeleteForm(Exposition $exposition)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('exposition_delete', array('id' => $exposition->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3dffb2a3cc6674fc1df28e36b71014f7", "score": "0.65965545", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('proyectopresupuesto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete', 'attr' => array('class' => 'hide-submit')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d4d43f27863b62fb5833f00469d4c317", "score": "0.65957236", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administrador_educacion_estudiantenf_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete', 'attr' => array('class' => \"btn btn-danger btn-lg\", 'onClick' => 'return ConfirmarAccion();')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "031b028e84892cbeec9d41d14fa7407a", "score": "0.6579166", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nombre_modelo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "4fcc6b5351b07ba50aeb201246b788df", "score": "0.65770644", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('PersonaPotencial_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "915906eee4300adf8f3b9c6540fe8ad4", "score": "0.657484", "text": "private function createDeleteForm($id)\n {\n \t\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('newslink_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'X', 'attr' => array('class'=>'btn btn-danger', 'style' => 'font-size:7px;margin-bottom:4px;')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "74be8be0071fe2349f313dda62c3e32d", "score": "0.6571919", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('typepage_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5e86cfa0e4bbe464aa64f6bb7e2a52aa", "score": "0.6571393", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_concepto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger btn-sm'\n )\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b4deeca5089cf9eacb4c0af522a8ed32", "score": "0.65705425", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('programacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.submit_eliminar', 'translation_domain' => 'RUGCProgramacionCatarsisBundle', 'attr' => array('class' => 'btnDer')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "44da7d4d6e74f7de383db4d4b4e7ab4a", "score": "0.6568041", "text": "private function createDeleteForm(SvCfgUtilizacion $svCfgUtilizacion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('svcfgaseguradora_delete', array('id' => $svCfgUtilizacion->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "3080026c026544dcfed6e2b5c77cd42e", "score": "0.6563651", "text": "private function createDeleteForm(Instances $instances)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('documentation_instances_delete', array('id' => $instances->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }", "title": "" }, { "docid": "0ed7e3574d6ec578c5b1ae44e0c2cc05", "score": "0.65617007", "text": "private function createDeleteForm($token)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('diary_delete', array('token' => $token)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('attr' => array('class' => 'btn btn-info'),'label' => '删除'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ed02a82f98d5870a9333504c26872553", "score": "0.6561178", "text": "private function createDeleteForm($idConcour)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('concour_delete', array('idConcour' => $idConcour)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "af12337c0919e429e5ca62a57bcd9bd2", "score": "0.65601724", "text": "public function delete(FormComponent $formComponent)\n {\n //\n }", "title": "" }, { "docid": "904fcf32729bd4ac5d8b339d677b32b6", "score": "0.6555967", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('faqcategory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "aed8d51f017336d85faaf242ad4cfd35", "score": "0.655162", "text": "public function deleteForm()\n {\n $request = $this->app->request();\n $id = $request->get('id');\n if (empty($id)) {\n throw new \\Exception('The \"id\" parameter is required.');\n }\n\n // Get details\n $result = $this->getProfiles()->get($id);\n\n $this->_template = 'runs/delete-form.twig';\n $this->set(array(\n 'run_id' => $id,\n 'result' => $result,\n ));\n }", "title": "" }, { "docid": "d1ee0e0e1d603b41714cb3ee0c779dae", "score": "0.65510136", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tarea_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => \"Eliminar\", 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a8c10ca7e8b164c289202a291e59b6dd", "score": "0.6549169", "text": "private function createDeleteForm(Notas $nota) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('notas_delete', array('id' => $nota->getIdNota())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fe1196e670d7d4f8bfa9b96fa0f4aeef", "score": "0.65471697", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('experimento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar', 'attr'=>array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b4eab4f7cb998eb0e54ca5d60a70a9d3", "score": "0.65461177", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('historialpersonausuario_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => ' Eliminar', 'attr' => array('icon' => 'remove' )))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "56dcb65b96a09a9560a1f9cf82c6f207", "score": "0.6536091", "text": "private function createDeleteForm(GB_make $gB_make)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gb_make_delete', array('id' => $gB_make->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3958d53506e5c35f97e36dc1c8ef9357", "score": "0.65294886", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_musictype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3da52217c7c5f68b3a98f15d19ca01eb", "score": "0.6525084", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('produto_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8d4a670b8b2882b1379d84d101d3df5b", "score": "0.6523964", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('buku_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete',\n 'attr' => array('class' => 'btn btn-danger btn-lg')))\n ->getForm();\n }", "title": "" }, { "docid": "d1501f53c1c359fa9564d7034175f397", "score": "0.6518537", "text": "private function createDeleteForm(DetalleVentaEntrega $detalleVentaEntrega)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('detalleventaentrega_delete', array('id' => $detalleVentaEntrega->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "780e3cf2796c4af17bedc9b27a48e09e", "score": "0.6509311", "text": "private function createDeleteForm(Ruta $rutum)\n {\n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ruta_delete', array('id' => $rutum->getIdruta())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n \n }", "title": "" }, { "docid": "1ec741365fe928b67ecb2b2b46029c37", "score": "0.6504846", "text": "private function createDeleteForm(ContratL $contratL)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adminContratL_delete', array('id' => $contratL->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2158c49618ba0f05f4ee76be57c91ad8", "score": "0.65043664", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()->setAction($this->generateUrl(\n 'contentprovider_delete',\n array('id' => $id)\n ))->setMethod('DELETE')->add('submit', 'submit', array('label' => 'Delete'))->getForm();\n }", "title": "" }, { "docid": "9a69ac5091339ef0b1d127091aab87db", "score": "0.65031123", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null,array('show_legend' => false))\n ->setAction($this->generateUrl('musician_delete', array('id' => $id)))\n ->setMethod('DELETE')\n\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "29d2b37cffb330aa1591305df50b6710", "score": "0.6502438", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('car_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c44fe80aa652de50fe6ed8b697bc68b2", "score": "0.64945966", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ben_fse_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "6fe2a1b313de8c7121dca3dfd30951df", "score": "0.64941114", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estadoentidad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1fa7ce04da7e7034a5c31c9afadd9a79", "score": "0.6491917", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('factory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "590a388a7df78263379c954409e30b15", "score": "0.6487405", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('absence_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "db67a60ee99f06d8fecd5d21541a2fa7", "score": "0.64867556", "text": "private function createDeleteForm(Comentarios $comentario)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('comentarios_delete', array('id' => $comentario->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "55700a7cc490989239af4fb139f8affb", "score": "0.64827096", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('apporteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "165e70e4c8e8744104b2737ad3a7db08", "score": "0.64815706", "text": "private function createDeleteForm($id)\n {\n\n $redirect = 'catalogs_delete';\n if (strtoupper($this->dashboard) == 'DMS') {\n $redirect = 'dms_catalogs_delete';\n }\n return $this->createFormBuilder()\n ->setAction($this->generateUrl($redirect, array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete', 'attr' => array('class' => 'btn btn-danger left',)))\n ->getForm();\n }", "title": "" }, { "docid": "f0bc5e9e813f3ced2315d8b65429c5c8", "score": "0.6479653", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etatfichefrais_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5f3857be67003635ee1e91de79757983", "score": "0.6478305", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_modulos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cbc38a86cbbd463f0a4bcd849ba3ee06", "score": "0.6473536", "text": "private function createDeleteForm(IndicaMarcha $indicaMarcha) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicamarcha_delete', array('id' => $indicaMarcha->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2bebd8c8810c53f3998afa50f4056863", "score": "0.64727205", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('posgradoalumnos_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d661abdf38a7259247f3b5a3aec731f0", "score": "0.6471637", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('investigador_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "31808e39408da8a7f9f55260cf858f4e", "score": "0.6471223", "text": "private function createDeleteForm(Etnia $etnium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etnia_delete', array('id' => $etnium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "06a3577310f743251a276f7d22593638", "score": "0.6466674", "text": "private function createDeleteForm(Espectador $espectador)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('espectador_delete', array('id' => $espectador->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "78f5c6ad6967ecd7f3a8f74ee07e5fae", "score": "0.6466222", "text": "private function createDeleteForm($token)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ss_cart_delete', array('token' => $token)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cc0130331cebb9d2cd9cbaf9307fac69", "score": "0.6465421", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('plagas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "88dcf62f354b3311390b1eda3eae88a4", "score": "0.64627814", "text": "private function createDeleteForm(Participation $participation)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('participation_delete', array('id' => $participation->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "aacb6abab67e7eb6acf4ebda1691b6f5", "score": "0.6462388", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('prijava_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c2f4007b9825b387609e266cc5d220dc", "score": "0.64591485", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tramite_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "301f837ff3f96b186a19832105a4c63b", "score": "0.64513254", "text": "private function createDeleteForm($id)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('admin_actor_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t->getForm()\n\t\t;\n\t}", "title": "" }, { "docid": "75eb708be3c6dbe4746f7353be03e227", "score": "0.64511454", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('documento_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e004b59df38e5d2f2709b589c01d2219", "score": "0.6450679", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('avalplang_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "6c453265be83a3518005ad7efdea17bc", "score": "0.6446034", "text": "private function createDeleteForm(AdminMisionesComunidad $adminMisionesComunidad)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('configurables_tipos_misiones_comunidad_delete', array('id' => $adminMisionesComunidad->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7f6835c6bd8e79840b3c5346cb154b9b", "score": "0.6444707", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ccc_email_template_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'ccc.email-template.delete', \n 'translation_domain' => 'CCCEmailTemplate', \n 'attr' => array('class' => 'btn')\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5bf30af44b584ed500f8d584828c31e7", "score": "0.6443451", "text": "private function createDeleteForm(RefSiegeLesion $refSiegeLesion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('refsiegelesion_delete', array('idSiegelesi' => $refSiegeLesion->getIdsiegelesi())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "dec1cef6b741878c985a6fd330c43bb7", "score": "0.6434983", "text": "private function createDeleteForm(Presidente $presidente)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('presidente_delete', array('id' => $presidente->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "baffc047d0fabfb600f6c35570ea9b9c", "score": "0.64348406", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pdf_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a9d2cf1108b5778a28982250249db624", "score": "0.6431168", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('emprendedor_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c61ddebbd30cf1f9568c9185797fbe2f", "score": "0.6430378", "text": "private function createDeleteFormationForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('demand_formation_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer','attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "79ff5ddc741dbd6f75b5afb57579dceb", "score": "0.6428559", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('club_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer Club'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "78adff20185329be6e37d8a234e79a21", "score": "0.6428301", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('supplier_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "b2b5c7be8aca045281ab87ab7f4ef086", "score": "0.6428199", "text": "private function createDeleteForm(ParticipacionComunitaria $participacionComunitarium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('participacioncomunitaria_delete', array('id' => $participacionComunitarium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b0778ed5d5e5295659d4e99c7395d95f", "score": "0.6427715", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ingresosfamiliares_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" } ]
0648246d93106045ef6312b22021fd25
model hak akses admin
[ { "docid": "b46896a3e15edf677fa434f238c5d7df", "score": "0.0", "text": "public function getAllDetailKegiatan($id_kegiatan, $id_level, $id_user)\n\t\t{\n\t\t\t$this->db->from('tb_detail_user duser');\n\t\t\t$this->db->where('duser.id_kegiatan', $id_kegiatan);\n\t\t\t$this->db->where('duser.id_level' , $id_level);\n\t\t\t$this->db->where('duser.id_user' , $id_user);\n\t\t\t\n\t\t\t$result = $this->db->get(); \n\t\t\treturn $result -> result_array();\n\t\t}", "title": "" } ]
[ { "docid": "79216622f05d606687be2e4cfa15145a", "score": "0.8458332", "text": "public function AdminModel(){\n\t\t\n\t}", "title": "" }, { "docid": "c40c45304c17932c64ab50640b7020e7", "score": "0.7267223", "text": "public function admin_admin(){}", "title": "" }, { "docid": "30eaf3a1c071df9c164e1720fa570e08", "score": "0.68921447", "text": "public function model() {\n }", "title": "" }, { "docid": "201bcd49c32a3cdeba5e0e3aa907c197", "score": "0.6755244", "text": "public function model();", "title": "" }, { "docid": "201bcd49c32a3cdeba5e0e3aa907c197", "score": "0.6755244", "text": "public function model();", "title": "" }, { "docid": "201bcd49c32a3cdeba5e0e3aa907c197", "score": "0.6755244", "text": "public function model();", "title": "" }, { "docid": "201bcd49c32a3cdeba5e0e3aa907c197", "score": "0.6755244", "text": "public function model();", "title": "" }, { "docid": "c095b5fb4dc8f32f0167f353594f9043", "score": "0.66969883", "text": "function miguel_MMain() \r\n {\t\r\n\t\t$this->base_Model();\r\n }", "title": "" }, { "docid": "a880083568d9f3022a1ae6323bca7d83", "score": "0.66632706", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('m_admin');\t\t\n\t}", "title": "" }, { "docid": "40d7ea1707beacda23c16078e523eb05", "score": "0.6652497", "text": "public function run()\n {\n $user = new AdminModel();\n $user->username = 'admin';\n $user->password = password_hash('123456', PASSWORD_DEFAULT);\n $user->email = '[email protected]';\n $user->no_hp = '0812345678901';\n $user->nama = 'Admin Patani';\n $user->alamat = 'Indonesia';\n $user->save();\n }", "title": "" }, { "docid": "7b3a702bfa8f1dac00ebcd18cf0d43f8", "score": "0.66122323", "text": "function admin_index(){\n \t\t\t\t\n\t\t\t$d['products'] = $this->Product->find('all');\n \t\n\n \t$this->set($d); \n\n\t\t}", "title": "" }, { "docid": "075bfd32a39bf757d58cfc63690bec51", "score": "0.6610724", "text": "public function admin()\n\t{\n\t\t#--------------------------------------------------------------------------\n\t\t# Mempersiapkan pengambilan data dari MODEL Mmember\n\t\t#--------------------------------------------------------------------------\n\t\t$this->load->model('Mmember');\n\n\n\t\t#--------------------------------------------------------------------------\n\t\t# Persiapan pengambilan data pada tabel 'tb_admin'\n\t\t#--------------------------------------------------------------------------\n\t\t$con['tabel'] \t= 'tb_admin';\n\t\t$con['select']\t= 'tb_admin.nip, tb_pegawai.nama, tb_unitkerja.deskripsi, jabatan, tb_level.nama as level, is_pembina, status';\n\t\t$con['join'] \t= array('tb_pegawai'=>'tb_admin.nip = tb_pegawai.nip', 'tb_unitkerja'=>'tb_pegawai.id_unitkerja = tb_unitkerja.id', 'tb_level'=>'tb_admin.level = tb_level.level');\n\t\t$con['where']\t= array('tb_admin.deleted'=>'0', 'tb_pegawai.deleted'=>'0');\n\n\t\t#--------------------------------------------------------------------------\n\t\t# Kemudian data hasil dimasukan kedalam var $dat\n\t\t#--------------------------------------------------------------------------\n\t\t$data['dat'] \t= $this->Mmember->get($con)->result();\n\n\t\t#--------------------------------------------------------------------------\n\t\t# Hasil pengambilan data di tampilkan ke Halaman ADMINISTRASI\n\t\t#--------------------------------------------------------------------------\n\t\t$this->init('vmenu-administrasi-read',$data);\n\t}", "title": "" }, { "docid": "134ada13cba9ef1ad105f3ab70d1e18a", "score": "0.6599577", "text": "public function actionIndex(){\n\t\t\n\n // $model = new app\\modules\\admin\\models\\Settings();\n//\t$data = new Settings();\n/* if ($model->load(Yii::$app->request->post())) {\n if ($model->validate()) {\n // form inputs are valid, do something here\n return;\n }\n }\n\n*/\n//\t$model = $this->data->find()->all();\n\t$model = Settings::findOne(['id'=> '1']);\n\t\t\t\n\t\t\t//::find()->all();\n // debug($model);\n\n if ($model->load(Yii::$app->request->post())) $model->save();\n\t\n return $this->render('settings', [\n 'model' => $model,\n ]);\n\t\n\t}", "title": "" }, { "docid": "f4f25e0410961c721f9159afa1406d51", "score": "0.6593999", "text": "public function run()\n {\n //Membuat role admin \n $adminRole = new Role();\n $adminRole->name = \"superadmin\";\n $adminRole->display_name = \"SuperAdmin\";\n $adminRole->save();\n\n //Membuat role sekolah\n $dosenRole = new Role();\n $dosenRole->name = \"sekolah\";\n $dosenRole->display_name = \"sekolah\";\n $dosenRole->save();\n }", "title": "" }, { "docid": "02ed2db0a41e4116d006f4da8e1f0c1d", "score": "0.6586977", "text": "public function admin()\n\t{\n\t\treturn $this->belongsTo(Administrador::class, 'idAdministrador');\n\t}", "title": "" }, { "docid": "2335e2843c31315fc301b0207b934724", "score": "0.65862983", "text": "public function kelola_admin(){\n\n\t\t$data['kk'] = 'admin';\n\n\t\t$data['admin'] = $this->db->query(\"SELECT * FROM user where role_id = 2\")->result();\n\t\t$this->load->view('admin/template/header',$data);\n\t\t$this->load->view('admin/pemilik/kelola_admin',$data);\n\t\t$this->load->view('admin/template/footer');\n\t}", "title": "" }, { "docid": "68ea0210f01af51dad419d8eff4d0059", "score": "0.6578544", "text": "private function admin()\n\t {\n\n\t }", "title": "" }, { "docid": "67caef1e62d9d1fb7ccb5e6579fbd15f", "score": "0.6570695", "text": "function Votemodel()\r\n {\r\n parent::Model();\r\n }", "title": "" }, { "docid": "ed9ed4aa31cbe47b7d0ff1800ccd131d", "score": "0.65543556", "text": "public function index() {\n $this->tplVars = $this->tplVars + [\n 'page_title' => $this->pageTitle\n ];\n \n //liste des données\n $this->tplVars = $this->tplVars + [\n 'lists' => $this->model->findAll()\n ];\n \n \n foreach($this->tplVars['lists'] as $list){\n \n if($list[\"Admin\"] == null){\n \n $list[\"Admin\"] = \"Non\";\n \n }else($list[\"Admin\"] = \"Oui\");\n }\n \n \n \n //afficher la liste \n \\Renderer::showAdmin(strtolower($this->pageCrud).\"/display\",$this->tplVars);\n\n \n }", "title": "" }, { "docid": "8830a8b636f9b7a8f25c99918047b16b", "score": "0.6553454", "text": "public function admin() {\n $usuario = new Usuario($this->adapter);\n\n //Conseguimos todos los usuarios\n $allusu = $usuario->getAll();\n\n //Cargamos la vista index y le pasamos valores\n $this->view(\"Usuarios/admin\", array(\"allusu\" => $allusu));\n }", "title": "" }, { "docid": "49c53a0396ea6ca157c31ab9227b3871", "score": "0.6551289", "text": "public function admin() {\r\n $Recomendacion = new RecomendacionRuta ($this->adapter);\r\n\r\n //Conseguimos todos los usuarios\r\n $allRec = $Recomendacion->getAllUsers();\r\n //Cargamos la vista index y le pasamos valores\r\n $this->view(\"RecomendacionRuta/admin\", array(\"allRec\" => $allRec));\r\n \r\n }", "title": "" }, { "docid": "84222ce305189b6a5f17ccdd76c00d73", "score": "0.6527515", "text": "abstract protected function model();", "title": "" }, { "docid": "84222ce305189b6a5f17ccdd76c00d73", "score": "0.6527515", "text": "abstract protected function model();", "title": "" }, { "docid": "84222ce305189b6a5f17ccdd76c00d73", "score": "0.6527515", "text": "abstract protected function model();", "title": "" }, { "docid": "0a041b7c7c6eed6bb43e60354bec2def", "score": "0.6525374", "text": "public function actionFamilia()\n {\n \t$models=\\app\\models\\Maquina::find()->all();\n\t\tforeach($models as $model){\n\t\t\t\n\t\t}\n }", "title": "" }, { "docid": "c44161c1a5c8ebaf6b51cb0a709c5832", "score": "0.65186274", "text": "public function add_nasabah()\n {\n $this->load->model('Model_admin');\n $this->Model_admin->insert_data(\"nasabah\"); \n }", "title": "" }, { "docid": "ee648990c9bb01e33de516a09d3b23e1", "score": "0.6490863", "text": "public function materia_admin($id = false){\n\t\tif(Session::get(\"autenticado\")){\n\t\t\t\n\t\t\tSession::accesoEstricto([\"1\"]);\n\n\t\t\t$model = new Estudiante();\n\n\t\t\t$this->_view->titulo = \"Listado de Materias\";\n\n\t\t\t$this->_view->render(\"materia_admin\", 'estudiante',[\n\t\t\t\t\t\"model\"=>$model,\n\t\t\t\t\t\"id\" =>$id\n\t\t\t\t]);\n\n\t\t}else{\n\t\t\t$this->redirect(\"site/index\");\n\t\t}\n\t}", "title": "" }, { "docid": "f7dac6fbc06d1269f5333b69b8d16a89", "score": "0.64850974", "text": "function __construct(){\n sessionAdmin();\n //ModeloBitacoras es donde estan todas las consultas con la base de datos\n $this->ModeloBitacoras = $this->model('ModeloBitacoras');\n \n }", "title": "" }, { "docid": "087e2b003102443b2902adf524040f99", "score": "0.64830434", "text": "public function main(){\n global $model, $db;\n \n if($model->useris('superadmin')||$model->useris('admin')||$model->useris('moderator')||$model->useris('editor')){\n \n } else {\n $model->mode = 0;\n return print('<h3>bu sayfayı görüntülemeye yetkiniz yok!</h3>');\n }\n \n if($model->paths[1] == 'ajax')\n return $this->ajax();\n \n $model->template = 'cp';\n $model->title = 'Popular Dies Admin | Democratus.com';\n \n $model->addScript(PLUGINURL . 'lib/jquery/jquery.js', 'jquery.js', 1 );\n \n $model->addScript(PLUGINURL . 'lib/boxy/boxy.js', 'boxy.js', 1 );\n $model->addStyle(PLUGINURL . 'lib/boxy/boxy.css', 'boxy.css', 1 );\n $model->addStyle('body{ font: 62.5% \"Trebuchet MS\", sans-serif; margin: 50px;}' );\n \n $model->addScript(PLUGINURL . 'lib/jquery/jquery.maskedinput.js', 'jquery.maskedinput.js', 1 );\n \n $model->addScript(PLUGINURL . 'lib/jquery-ui/jquery-ui.js', 'jquery-ui.js', 1 );\n $model->addStyle(PLUGINURL . 'lib/jquery-ui/jquery-ui.css', 'jquery-ui.css', 1 );\n \n $model->addScript(PLUGINURL . 'lib/flexigrid/flexigrid.js', 'flexigrid.js', 1 );\n $model->addStyle(PLUGINURL . 'lib/flexigrid/flexigrid.css', 'flexigrid.css', 1 );\n \n //$model->addStyle(TEMPLATEURL . 'default/dialogform.css', 'dialogform.css', 1 );\n $model->addScript(PLUGINURL . 'lib/tiny_mce/tiny_mce.js', 'tiny_mce.js', 1 );\n \n $model->addScript(PLUGINURL . 'lib/democratus.js', 'democratus.js', 1 );\n $model->addScript($model->pluginurl . 'populardiesadmin.js', 'populardiesadmin.js', 1 ); \n?>\n<table id=\"grid1\" style=\"display: none;\" class=\"flexigrid\"><tr><td>&nbsp;</td></tr></table>\n<script type=\"text/javascript\">\n $(\"#grid1\").flexigrid({\n url: \"<?php echo $model->pageurl; ?>ajax/rows/\",\n dataType: \"json\",\n colModel : [\n {display: \"ID\", name : \"ID\", width : 30, sortable : true, align: \"center\"},\n {display: \"sharername\", name : \"sharername\", width : 100, sortable : true, align: \"left\"},\n {display: \"di\", name : \"di\", width : 400, sortable : true, align: \"left\"},\n {display: \"popularite\", name : \"popularite\", width : 40, sortable : true, align: \"center\"}, \n {display: \"Status\", name : \"status\", width : 30, sortable : false, align: \"center\"}, \n {display: \"Datetime\", name : \"datetime\", width : 150, sortable : false, align: \"center\"}\n ], \n searchitems : [\n {display: \"di\", name : \"di\", isdefault: true}\n ],\n sortname: \"popularite\",\n sortorder: \"desc\",\n usepager: true,\n title: \"Popular dies\",\n useRp: true,\n rp: 15,\n showTableToggleBtn: false,\n onSuccess: populardiesgridready,\n //onSubmit: agendafilter,\n width: 'auto',\n height: 410\n }\n );\n \n \n var ajaxurl = '<?php echo $model->pageurl; ?>ajax/'\n</script>\n<?php\n \n }", "title": "" }, { "docid": "11de020488e30d3a51ce0c462401d655", "score": "0.64646304", "text": "abstract public function model ();", "title": "" }, { "docid": "593954f85b4e09bdfb1e722a86afa816", "score": "0.6453757", "text": "abstract public function model();", "title": "" }, { "docid": "593954f85b4e09bdfb1e722a86afa816", "score": "0.6453757", "text": "abstract public function model();", "title": "" }, { "docid": "9adbfb2f74ec56402c34f45acf176edc", "score": "0.6445405", "text": "public function displayForAdmin(){\r\n $queryTable = $this->getRepository('Salle');\r\n $salles = $queryTable->findAll();\r\n $this->view->displayForAdmin($salles);\r\n }", "title": "" }, { "docid": "e2c6a05b4e00a0f33556a7eb6819fcdf", "score": "0.64225215", "text": "public function run()\n {\n $items = [\n 'seo_admin_main' => 'SEO',\n 'news_admin_main' => 'Новости',\n 'regions_admin_main' => 'Регионы',\n 'dealers_admin_main' => 'Дилеры',\n 'banners_admin_main' => 'Баннеры',\n 'cars_admin_main' => 'Автомобили',\n 'special_offers_admin_main' => 'Спецпредложения',\n 'placeholders_admin_main' => 'Плейсхолдеры',\n 'accessories_admin_main' => 'Аксессуары',\n 'motorstudio_admin_main' => 'Моторстудио',\n 'brandcollection_admin_main' => 'Бренд-коллекция',\n 'manuals_admin_main' => 'Руководства и каталоги',\n 'users_admin_main' => 'Пользователи',\n 'user_roles_admin_main' => 'Группы пользователей',\n 'siebel_logs_admin_main' => 'Siebel logs',\n 'storage_photos_admin_main' => 'Фото',\n 'dealer_menu_admin_main' => 'Дилерское меню',\n ];\n\n $up = UserPermission::whereIn('code', array_keys($items))->get()->pluck('code');\n\n foreach($items as $code => $name) {\n if($up->search($code) === false) {\n $model = new UserPermission();\n $model->name = $name;\n $model->code = $code;\n $model->save();\n }\n }\n }", "title": "" }, { "docid": "23d295ae1ea1dbc1d35cfa9299a53b88", "score": "0.64069986", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('admin_model');\n\t}", "title": "" }, { "docid": "e17fd4fc86f131ebc46658c577dc153d", "score": "0.64019805", "text": "function tampil_admin(){\r\n return $this->db->query('SELECT * FROM admin');\r\n }", "title": "" }, { "docid": "6b656c881a52b2bfb144e5a1b410da99", "score": "0.6389793", "text": "public abstract function model();", "title": "" }, { "docid": "6b656c881a52b2bfb144e5a1b410da99", "score": "0.6389793", "text": "public abstract function model();", "title": "" }, { "docid": "ed340be4aa076a87d38634e56670b519", "score": "0.6378469", "text": "public function adminBenevol()\n {\n session_start();\n if (empty($_SESSION['username'])) {\n return $this->twig->render('Admin/login.html.twig', ['errors' => ['Cette page d\\'administration n\\'est pas accessible sans identification']]);\n }\n\n $contentManager = new ArticleManager();\n $benevolManager = new BenevolManager();\n\n if (isset($_GET['delete'])) {\n $delete = $benevolManager->deleteBenevol($_GET['delete']);\n }\n $benevol = $benevolManager->selectNameId();\n if ($_POST) {\n $data = ['title' => $_POST['title'], 'content' => $_POST['content']];\n if (strlen($_POST['picture']) > 0) {\n $data['picture'] = '/assets/DBimages/' . $_POST['picture'];\n }\n $contentManager->update(6, $data);\n }\n\n $content = $contentManager->selectOneById(6);\n return $this->twig->render('Admin/adminBenevol.html.twig', ['content'=>$content, 'benevol'=>$benevol]);\n \n }", "title": "" }, { "docid": "4c34c3de40cc66973d28648094fcd7e5", "score": "0.6374758", "text": "public function admins(){\n\t\t//load all admins\n\t\t$data['admins'] = $this->admininfo->get_all();\n\t\t//load a view\n\t\t$this->load->admin_template('admins',$data,true);\n\t}", "title": "" }, { "docid": "c0e04eb908cb9033de5f9c84000a7126", "score": "0.6366976", "text": "function __construct(){\n\t\t\tparent::__construct();\n\t\t\t$this -> load -> model('Mahasiswa_model');//load Mahasiswa_model dari folder model\n\t\t}", "title": "" }, { "docid": "ce9621136a4095f829d95eecbad8d3a8", "score": "0.63662994", "text": "public function listmodel() {\n $this->viewBuilder()->layout('admin');\n $this->loadModel('Models');\n \n // $conditions = ['ServiceTypes.status'=> 1];\n \n $this->paginate = [\n \n 'order' => [ 'Makes.make_name']\n ];\n $service = $this->paginate($this->Models,['contain' => ['Makes']]);\n // pr($service);\n $this->set(compact('service'));\n $this->set('_serialize', ['service']);\n \n }", "title": "" }, { "docid": "5ec5c961db2abfe0d9eceeeb13a1a843", "score": "0.63658273", "text": "function admin_index()\r\n {\r\n $this->__requireRole(ROLE_TUTOR);\r\n $this->Topic->unbindModel(array('hasMany'=>array('Scenario','Exam')));\r\n $data = $this->Topic->find('all'); \r\n $data = (!empty($data))? $data : array() ;\n $this->set('data', $data);\r\n $this->render();\r\n }", "title": "" }, { "docid": "76ae77cf3e0f98f1d05ba52d75e7dea7", "score": "0.6363292", "text": "function model()\n {\n }", "title": "" }, { "docid": "ed15bb0e58fe333eb90e69905e6f1a68", "score": "0.6351359", "text": "public function adminshow($id)\n {\n //\n }", "title": "" }, { "docid": "0984fab3506dc58a6abdc7d1778fbd50", "score": "0.63507503", "text": "function db() {\n\t\t\t$this->breadcrumbs->push('Advisees', '/advisees');\n\t\t\t$this->breadcrumbs->push('List Advisees', 'adviseelist');\n\t\t\t$this->breadcrumbs->unshift('Home', '/');\n\t\t\t$data = array('alladvisees' => $this->Users_model->getallusers(), 'view'=> 'admin-template/db');\n\n\t\t\t$this->load->view('admin', $data);\n\n\t\t}", "title": "" }, { "docid": "03653b744e67f99507ef96f37f08d8b0", "score": "0.6346287", "text": "public function actionManage() {\n if (isset($_POST['Kelompok']) && !empty($_POST['Kelompok'])) {\n $model = Kelompok::model()->find(\"nama_kelompok = '{$_POST['Kelompok']['nama_kelompok']}'\");\n if(empty($model)){\n $model = new Kelompok();\n }\n $model->attributes = $_POST['Kelompok'];\n $model->aktif = !empty($_POST['Kelompok']['aktif'])?1:0;\n if ($model->validate()) {\n if($model->save()){\n if(!empty($_POST['Kelompok']['ustadz_id'])){\n $model_kelompok_ustadz = new RiwayatKelompok();\n $model_kelompok_ustadz->kelompok = $model->id;\n $model_kelompok_ustadz->tanggal_dibuat = date('Y-m-d H:i:s', time());\n $model_kelompok_ustadz->aktif = 1;\n $model_kelompok_ustadz->user_id = $_POST['Kelompok']['ustadz_id'];\n if($model_kelompok_ustadz->validate()){\n $model_kelompok_ustadz->save();\n }\n }\n } \n }\n else {\n }\n }\n $model_add = new Kelompok();\n $model = new Kelompok('searchGroup');\n $model->unsetAttributes();\n $this->render('index', array('model'=>$model, 'model_add' => $model_add));\n }", "title": "" }, { "docid": "d3c7547b7a9ad665f7d2ded9f38e5120", "score": "0.6343613", "text": "function Userbanmodel()\r\n\t\t{\r\n\t\t\tparent::Model();\r\n\t\t}", "title": "" }, { "docid": "6165ec578ebc439038b5bfd23c52af06", "score": "0.6343285", "text": "public function muestraSalones(){\n\t\t$objeto = new modelo();\n\t\t$data[\"titulo\"] = \"Salones\";\n\t\t$data[\"objeto\"] = $objeto->getSalones();\n\t\t$data[\"pagina\"] = $objeto->getPaginacionSalones();\n\n\t\t//mandando información del modelo a la vista\n\t\trequire_once \"vista/admin/adm_salon.php\";\n\t}", "title": "" }, { "docid": "4a6f5878d6048d98187065f6e775f544", "score": "0.63391435", "text": "public function run()\n {\n // $menu = new \\App\\Menu();\n // //$menu ->model='menu-1';\n // $menu->user_id='20';\n // $menu->menu_type='admin';\n // $menu->save(); \n\n // $menu = new \\App\\Menu(); \n // $menu->user_id='76';\n // $menu->menu_type='admin';\n // $menu->save();\n $menu = new \\App\\Menu(); \n $menu->user_id='77';\n $menu->menu_type='vk';\n $menu->save();\n\n $menu = new \\App\\Menu(); \n $menu->user_id='11';\n $menu->menu_type='fields';\n $menu->save();\n\n $menu = new \\App\\Menu(); \n $menu->user_id='12';\n $menu->menu_type='forethought';\n $menu->save();\n\n $menu = new \\App\\Menu(); \n $menu->user_id='13';\n $menu->menu_type='the higherpitch';\n $menu->save();\n\n $menu = new \\App\\Menu(); \n $menu->user_id='13';\n $menu->menu_type='logix';\n $menu->save();\n\n $menu = new \\App\\Menu(); \n $menu->user_id='13';\n $menu->menu_type='technova';\n $menu->save();\n\n $menu = new \\App\\Menu(); \n $menu->user_id='13';\n $menu->menu_type='adobe';\n $menu->save();\n }", "title": "" }, { "docid": "943cb6f99e881c284f2bb568ea916245", "score": "0.63390154", "text": "public function run()\n {\n\t\t$model = new Role();\n\t\t$model->name = 'admin';\n\t\t$model->description = 'Administrateurs';\n\t\t$model->created_by = '1';\n\t\t$model->save();\n\n\t\t$model = new Role();\n\t\t$model->name = 'user';\n\t\t$model->description = 'Utilisateurs';\n\t\t$model->created_by = '1';\n\t\t$model->save();\n }", "title": "" }, { "docid": "fc3100bffca9b959b07987662c8ea548", "score": "0.6334437", "text": "function admin_aide(){\n\n\t\t$this->loadModel('Post');\n\n\t\t$this->set($d);\n\n\t}", "title": "" }, { "docid": "c7794866d90b07e5899467bd1fd37626", "score": "0.6331251", "text": "public function admin()\n {\n $data['tb_admin'] = $this->m_admin->tampil_admin()->result();\n\n $this->load->view('admin_template/header');\n $this->load->view('admin_template/mainmenu');\n $this->load->view('admin/v_admin', $data);\n $this->load->view('admin_template/footer');\n }", "title": "" }, { "docid": "24f63b1321db8c40175b0a122fad864f", "score": "0.6329509", "text": "public function admin()\n {\n $this->validarSesion();\n $usuario = $this->usuarioModelo->listarUsuario();\n $datos = [\n 'nombre' => $usuario,\n 'telefono' => $usuario,\n 'usuario' => $usuario,\n 'contrasena' => $usuario,\n 'id_rol' => $usuario,\n ];\n $this->vista(\"index2/index2\", $datos);\n }", "title": "" }, { "docid": "ab2d4397dd07020090e0e6540fa87d26", "score": "0.63232017", "text": "public function admin_init()\n {\n\n }", "title": "" }, { "docid": "a3f593025f3e2e04037b115a46e2f4ab", "score": "0.6320383", "text": "public function run()\n {\n $administrator = new \\App\\User;\n $administrator->username = \"administrator\";\n $administrator->name = \"Site Administrator\";\n $administrator->email = \"[email protected]\";\n $administrator->roles = json_encode([\"ADMIN\"]);\n $administrator->password = \\Hash::make(\"komputer1\");\n $administrator->avatar = \"saat-ini-tidak-ada-file.png\";\n $administrator->address = \"Pagarsih, Bandung\";\n $administrator->phone = \"087824392239\";\n\n $administrator->save();\n $this->command->info(\"User Admin berhasil diinsert\");\n\n }", "title": "" }, { "docid": "b790019180e12288f8278e7cde8c4a87", "score": "0.6312121", "text": "function cl_edu_relatmodel() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"edu_relatmodel\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "0a1bb6cbad2aa9558e4bacb6e7bf2665", "score": "0.63081455", "text": "public function hapusadmin() {\n\t\t$id = $this->uri->segment(4);\n\t\t$this->tokomodel->gethapusadmin($id);\n\n\t\tredirect(base_url('admin/toko/user'));\n\t}", "title": "" }, { "docid": "b2690a479904ae6408d625fc3d8b1545", "score": "0.6305539", "text": "public function __construct() {\r\n parent::__construct(\"administracion\");\r\n }", "title": "" }, { "docid": "620180377a3b4d857756032330eed248", "score": "0.63053876", "text": "function miguel_mDepartment() \r\n {\t\r\n\t\t$this->base_Model();\r\n }", "title": "" }, { "docid": "8687867d2193b222530caebd6cbb340e", "score": "0.6295782", "text": "public function run()\n {\n $admin = new \\App\\Admin();\n $admin->name = \"ayodeji\";\n $admin->email = \"[email protected]\";\n $admin->password = bcrypt('admin');\n $admin->phone_number = \"07033751685\";\n $admin->country = \"nigeria\";\n $admin->state = \"lagos\";\n $admin->county = \"ikeja\";\n $admin->save(); \n }", "title": "" }, { "docid": "57fee2c05ecab5ad530694edaefad2a1", "score": "0.62942415", "text": "public function edit(){\n $id = $this -> input -> get('id');\n $title='添加管理员';\n\n if(!empty($id)){\n $title='编辑管理员';\n $admin = $this -> adminModel -> read($id);\n $this -> tpl -> assign('admin',$admin);\n }\n\n $this -> tpl -> assign('title',$title);\n $this -> tpl -> display('admin_add.html');\n }", "title": "" }, { "docid": "d635a2f02474ce4469ba16c37a2a21c7", "score": "0.6282943", "text": "public function run()\n {\n /* Reports */\n Permission::create(['model'=>'Reportes','name'=>'list_report', 'spanish_name' => 'Listar reportes']);\n /* Act Templates */\n Permission::create(['model'=>'Plantillas de acta','name'=>'list_act_template', 'spanish_name' => 'Listar plantilla actas']);\n Permission::create(['model'=>'Plantillas de acta','name'=>'create_act_template', 'spanish_name' => 'Crear plantilla actas']);\n Permission::create(['model'=>'Plantillas de acta','name'=>'edit_act_template', 'spanish_name' => 'Editar plantilla actas']);\n Permission::create(['model'=>'Plantillas de acta','name'=>'delete_act_template','spanish_name' => 'Eliminar plantilla actas']);\n /* Committee */\n Permission::create(['model'=>'Comités','name'=>'list_committee', 'spanish_name' => 'Listar comite']);\n Permission::create(['model'=>'Comités','name'=>'create_committee','spanish_name' => 'Crear comite']);\n Permission::create(['model'=>'Comités','name'=>'edit_committee', 'spanish_name' => 'Editar comite']);\n Permission::create(['model'=>'Comités','name'=>'delete_committee', 'spanish_name' => 'Eliminar comite']);\n /* Committee Parameter */\n Permission::create(['model'=>'Parametros de plantillas','name'=>'list_committee_parameter', 'spanish_name' => 'Listar parametro comite']);\n Permission::create(['model'=>'Parametros de plantillas','name'=>'create_committee_parameter', 'spanish_name' => 'Crear parametro comite']);\n Permission::create(['model'=>'Parametros de plantillas','name'=>'edit_committee_parameter', 'spanish_name' => 'Editar parametro comite']);\n Permission::create(['model'=>'Parametros de plantillas','name'=>'delete_committee_parameter', 'spanish_name' => 'Eliminar parametro comite']);\n /* Committee Session */\n Permission::create(['model'=>'Sessiones de comité','name'=>'list_committee_session', 'spanish_name' => 'Listar sesion comite']);\n Permission::create(['model'=>'Sessiones de comité','name'=>'create_committee_session', 'spanish_name' => 'Crear sesion comite']);\n Permission::create(['model'=>'Sessiones de comité','name'=>'edit_committee_session', 'spanish_name' => 'Editar sesion comite']);\n Permission::create(['model'=>'Sessiones de comité','name'=>'delete_committee_session', 'spanish_name' => 'Eliminar sesion comite']);\n /* Committee Session State */\n Permission::create(['model'=>'Estado sesion de comité','name'=>'list_committee_session_state', 'spanish_name' => 'Listar estado sesion comite']);\n Permission::create(['model'=>'Estado sesion de comité','name'=>'create_committee_session_state', 'spanish_name' => 'Crear estado sesion comite']);\n Permission::create(['model'=>'Estado sesion de comité','name'=>'edit_committee_session_state', 'spanish_name' => 'Editar estado sesion comite']);\n Permission::create(['model'=>'Estado sesion de comité','name'=>'delete_committee_session_state', 'spanish_name' => 'Eliminar estado sesion comite']);\n /* Contract Type */\n Permission::create(['model'=>'Tipo de contrato','name'=>'list_contract_type', 'spanish_name' => 'Listar tipos de contratos']);\n Permission::create(['model'=>'Tipo de contrato','name'=>'create_contract_type','spanish_name' => 'Crear tipos de contratos']);\n Permission::create(['model'=>'Tipo de contrato','name'=>'edit_contract_type','spanish_name' => 'Editar tipos de contratos']);\n Permission::create(['model'=>'Tipo de contrato','name'=>'delete_contract_type','spanish_name' => 'Eliminar tipos de contratos']);\n Permission::create(['model'=>'Tipo de contrato','name'=>'update_contract_type','spanish_name' => 'Actualizar tipos de contratos']);\n /* Formation Program */\n Permission::create(['model'=>'Programa de formación','name'=>'list_formation_program','spanish_name' => 'Listar programas de formacion']);\n Permission::create(['model'=>'Programa de formación','name'=>'create_formation_program','spanish_name' => 'Crear programas de formacion']);\n Permission::create(['model'=>'Programa de formación','name'=>'edit_formation_program','spanish_name' => 'Editar programas de formacion']);\n Permission::create(['model'=>'Programa de formación','name'=>'delete_formation_program','spanish_name' => 'Eliminar programas de formacion']);\n Permission::create(['model'=>'Programa de formación','name'=>'update_formation_program','spanish_name' => 'Actualizar de programas de formacion']);\n /* Formation Program Type */\n Permission::create(['model'=>'Tipo de programa de formación','name'=>'list_formation_program_type','spanish_name' => 'Listar tipos de programas de formacion']);\n Permission::create(['model'=>'Tipo de programa de formación','name'=>'create_formation_program_type','spanish_name' => 'Crear tipos de programas de formacion']);\n Permission::create(['model'=>'Tipo de programa de formación','name'=>'edit_formation_program_type','spanish_name' => 'Editar tipos de programas de formacion']);\n Permission::create(['model'=>'Tipo de programa de formación','name'=>'delete_formation_program_type','spanish_name' => 'Eliminar tipos de programas de formacion']);\n Permission::create(['model'=>'Tipo de programa de formación','name'=>'update_formation_program_type','spanish_name' => 'Actualizar tipos de programas de formacion']);\n /* Formative Measure */\n Permission::create(['model'=>'Medida formativa','name'=>'list_formative_measure','spanish_name' => 'Listar medidas formativas']);\n Permission::create(['model'=>'Medida formativa','name'=>'create_formative_measure','spanish_name' => 'Crear medidas formativas']);\n Permission::create(['model'=>'Medida formativa','name'=>'edit_formative_measure','spanish_name' => 'Editar medidas formativas']);\n Permission::create(['model'=>'Medida formativa','name'=>'delete_formative_measure','spanish_name' => 'Eliminar medidas formativas']);\n /* General Parameter */\n Permission::create(['model'=>'Parametro general','name'=>'list_general_parameter','spanish_name' => 'Listar parametros generales']);\n Permission::create(['model'=>'Parametro general','name'=>'create_general_parameter','spanish_name' => 'Crear parametros generales']);\n Permission::create(['model'=>'Parametro general','name'=>'edit_general_parameter','spanish_name' => 'Editar parametros generales']);\n Permission::create(['model'=>'Parametro general','name'=>'delete_general_parameter','spanish_name' => 'Eliminar parametros generales']);\n /* Group */\n Permission::create(['model'=>'Grupo','name'=>'list_group','spanish_name' => 'Listar grupos']);\n Permission::create(['model'=>'Grupo','name'=>'create_group','spanish_name' => 'Crear grupos']);\n Permission::create(['model'=>'Grupo','name'=>'edit_group','spanish_name' => 'Editar grupos']);\n Permission::create(['model'=>'Grupo','name'=>'delete_group','spanish_name' => 'Eliminar grupos']);\n /* Infringement Classification */\n Permission::create(['model'=>'Clasificacion de la falta','name'=>'list_infringement_classification','spanish_name' => 'Listar clasificacion de faltas']);\n Permission::create(['model'=>'Clasificacion de la falta','name'=>'create_infringement_classification','spanish_name' => 'Crear clasificacion de faltas']);\n Permission::create(['model'=>'Clasificacion de la falta','name'=>'edit_infringement_classification','spanish_name' => 'Editar clasificacion de faltas']);\n Permission::create(['model'=>'Clasificacion de la falta','name'=>'delete_infringement_classification','spanish_name' => 'Eliminar clasificacion de faltas']);\n /* Infringement Type */\n Permission::create(['model'=>'Tipo de falta','name'=>'list_infringement_type','spanish_name' => 'Listar tipos de faltas']);\n Permission::create(['model'=>'Tipo de falta','name'=>'create_infringement_type','spanish_name' => 'Crear tipos de faltas']);\n Permission::create(['model'=>'Tipo de falta','name'=>'edit_infringement_type','spanish_name' => 'Editar tipos de faltas']);\n Permission::create(['model'=>'Tipo de falta','name'=>'delete_infringement_type','spanish_name' => 'Eliminar tipos de faltas']);\n /* Learner */\n Permission::create(['model'=>'Aprendiz','name'=>'list_learner','spanish_name' => 'Listar aprendices']);\n Permission::create(['model'=>'Aprendiz','name'=>'create_learner','spanish_name' => 'Crear aprendices']);\n Permission::create(['model'=>'Aprendiz','name'=>'edit_learner','spanish_name' => 'Editar aprendices']);\n Permission::create(['model'=>'Aprendiz','name'=>'delete_learner','spanish_name' => 'Eliminar aprendices']);\n /* Learner Novelty */\n Permission::create(['model'=>'Novedades del aprendiz','name'=>'list_learner_novelty','spanish_name' => 'Listar novedades de aprendices']);\n Permission::create(['model'=>'Novedades del aprendiz','name'=>'create_learner_novelty','spanish_name' => 'Crear novedades de aprendices']);\n Permission::create(['model'=>'Novedades del aprendiz','name'=>'edit_learner_novelty','spanish_name' => 'Editar novedades de aprendices']);\n Permission::create(['model'=>'Novedades del aprendiz','name'=>'delete_learner_novelty','spanish_name' => 'Eliminar novedades de aprendices']);\n /* Modality */\n Permission::create(['model'=>'Modalidad','name'=>'list_modality','spanish_name' => 'Listar modalidades']);\n Permission::create(['model'=>'Modalidad','name'=>'create_modality','spanish_name' => 'Crear modalidades']);\n Permission::create(['model'=>'Modalidad','name'=>'edit_modality','spanish_name' => 'Editar modalidades']);\n Permission::create(['model'=>'Modalidad','name'=>'delete_modality','spanish_name' => 'Eliminar modalidades']);\n Permission::create(['model'=>'Modalidad','name'=>'update_modality','spanish_name' => 'Actualizar modalidades']);\n /* Novelty Type */\n Permission::create(['model'=>'Tipo de novedad','name'=>'list_novelty_type','spanish_name' => 'Listar tipos de novedades']);\n Permission::create(['model'=>'Tipo de novedad','name'=>'create_novelty_type','spanish_name' => 'Crear tipos de novedades']);\n Permission::create(['model'=>'Tipo de novedad','name'=>'edit_novelty_type','spanish_name' => 'Editar tipos de novedades']);\n Permission::create(['model'=>'Tipo de novedad','name'=>'delete_novelty_type','spanish_name' => 'Eliminar tipos de novedades']);\n /* Position */\n Permission::create(['model'=>'Cargo','name'=>'list_position','spanish_name' => 'Listar cargos']);\n Permission::create(['model'=>'Cargo','name'=>'create_position','spanish_name' => 'Crear cargos']);\n Permission::create(['model'=>'Cargo','name'=>'edit_position','spanish_name' => 'Editar cargos']);\n Permission::create(['model'=>'Cargo','name'=>'delete_position','spanish_name' => 'Eliminar cargos']);\n Permission::create(['model'=>'Cargo','name'=>'update_position','spanish_name' => 'Actualizar cargos']);\n /* Role */\n Permission::create(['model'=>'Rol','name'=>'list_role','spanish_name' => 'Listar roles']);\n Permission::create(['model'=>'Rol','name'=>'create_role','spanish_name' => 'Crear roles']);\n Permission::create(['model'=>'Rol','name'=>'edit_role','spanish_name' => 'Editar roles']);\n Permission::create(['model'=>'Rol','name'=>'delete_role','spanish_name' => 'Eliminar roles']);\n /* Sanction */\n Permission::create(['model'=>'Sancion','name'=>'list_sanction','spanish_name' => 'Listar sanciones']);\n Permission::create(['model'=>'Sancion','name'=>'create_sanction','spanish_name' => 'Crear sanciones']);\n Permission::create(['model'=>'Sancion','name'=>'edit_sanction','spanish_name' => 'Editar sanciones']);\n Permission::create(['model'=>'Sancion','name'=>'delete_sanction','spanish_name' => 'Eliminar sanciones']);\n /* Stimulus */\n Permission::create(['model'=>'Estimulo','name'=>'list_stimulus','spanish_name' => 'Listar estimulos']);\n Permission::create(['model'=>'Estimulo','name'=>'create_stimulus','spanish_name' => 'Crear estimulos']);\n Permission::create(['model'=>'Estimulo','name'=>'edit_stimulus','spanish_name' => 'Editar estimulos']);\n Permission::create(['model'=>'Estimulo','name'=>'delete_stimulus','spanish_name' => 'Eliminar estimulos']);\n /* User */\n Permission::create(['model'=>'Usuario','name'=>'list_user','spanish_name' => 'Listar usuarios']);\n Permission::create(['model'=>'Usuario','name'=>'create_user','spanish_name' => 'Crear usuarios']);\n Permission::create(['model'=>'Usuario','name'=>'edit_user','spanish_name' => 'Editar usuarios']);\n Permission::create(['model'=>'Usuario','name'=>'delete_user','spanish_name' => 'Eliminar usuarios']);\n /* Formative measure responsibles */\n Permission::create(['model'=>'Responsable de medida formativa','name'=>'list_formative_measure_responsible','spanish_name' => 'Listar responsables de medidas formativas']);\n Permission::create(['model'=>'Responsable de medida formativa','name'=>'create_formative_measure_responsible','spanish_name' => 'Crear responsables de medidas formativas']);\n Permission::create(['model'=>'Responsable de medida formativa','name'=>'edit_formative_measure_responsible','spanish_name' => 'Editar responsables de medidas formativas']);\n Permission::create(['model'=>'Responsable de medida formativa','name'=>'delete_formative_measure_responsible','spanish_name' => 'Eliminar responsables de medidas formativas']);\n /* Profile */\n Permission::create(['model'=>'Perfil','name'=>'list_profile','spanish_name' => 'Listar perfil']);\n }", "title": "" }, { "docid": "1a304776bebef80dc69895790c7a1c06", "score": "0.62803596", "text": "function __construct()\n {\n parent::__construct();\n $this->load->model('M_admin');\n }", "title": "" }, { "docid": "eac9f5a3ac4e82e59dd50bdf7185b10a", "score": "0.62748855", "text": "public function run()\n {\n $s1 =new Role;\n // //mgmg\n $s1->name=\"Admin\";\n // $s1->email=\"[email protected]\";\n // $s1->address=\"Bahan\";\n $s1->save();\n\n // //susu\n $s2 = new Role;\n $s2->name=\"Customer\";\n // $s2->email=\"[email protected]\";\n // $s2->address=\"Shan\";\n $s2->save();\n }", "title": "" }, { "docid": "ffca4ca81e0d446a133035bfbd6c0017", "score": "0.6274784", "text": "public function __construct()\n{\n $this->__Module=\"Admin\";\n $this->__Model=\"Admin\";\n $this->__Directory=\"Admin\";\n $this->__pKey=\"id\";\n}", "title": "" }, { "docid": "c2b19dc5b11ad44837becab249138369", "score": "0.62746304", "text": "public function run()\n {\n $admin = new Role;\n $admin->role_name = 'admin';\n $admin->description = 'Administrator dapat mengelola user, mengelola CV yg diupload User';\n $admin->save();\n\n $user = new Role;\n $user->role_name = 'user';\n $user->description = 'User wajib mengisi data diri dan mengupload CV untuk diperiksa oleh administrator';\n $user->save();\n\n }", "title": "" }, { "docid": "b9f1c0ce79caa0b17eaa0fefb287f065", "score": "0.62716186", "text": "function DbAdmin() {\n $this->Database();\n }", "title": "" }, { "docid": "dafa96fa0b2b6962fa517fe14bfdd1e6", "score": "0.62689704", "text": "public function admin_init() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "3b36819e39f08eb9cc997e5a091ee3fa", "score": "0.6267975", "text": "function alta() {\n $data['nombresCliente'] = $_POST['txtNombre'];\n $data['apellidosCliente'] = $_POST['txtApellido'];\t\n $data['direccionCliente'] = $_POST['txtDireccion'];\n $data['telefonoCelular'] = $_POST['txtCelular'];\n $data['telefonoCasa'] = $_POST['txtCasa'];\n //llamamos al modelo, concretamente a la función insert() para que nos haga el insert en la base de datos.\n $this->load->model('modeloMantenimientoAdministrador');\n $this->modeloMantenimientoAdministrador->insert($data);\n //volvemos a visualizar la tabla\n $this->index();\n }", "title": "" }, { "docid": "a5a58fd4d0f04cbaffe283b1e5c48ee9", "score": "0.6266197", "text": "public function main(){\n global $model, $db;\n \n if($model->useris('superadmin') || $model->useris('admin')){\n \n } else {\n $model->mode = 0;\n return print('<h3>bu sayfayı görüntülemeye yetkiniz yok!</h3>');\n }\n \n \n if($model->paths[1] == 'ajax')\n return $this->ajax();\n \n $model->template = 'cp';\n $model->title = 'Agenda Admin | Democratus.com';\n \n $model->addScript('var ajaxurl = \"' . $model->pageurl . 'ajax/\";');\n \n $model->addScript(PLUGINURL . 'lib/jquery/jquery.js', 'jquery.js', 1 );\n \n $model->addScript(PLUGINURL . 'lib/boxy/boxy.js', 'boxy.js', 1 );\n $model->addStyle(PLUGINURL . 'lib/boxy/boxy.css', 'boxy.css', 1 );\n $model->addStyle('body{ font: 62.5% \"Trebuchet MS\", sans-serif; margin: 50px;}' );\n \n $model->addScript(PLUGINURL . 'lib/jquery/jquery.maskedinput.js', 'jquery.maskedinput.js', 1 );\n \n \n $model->addScript(PLUGINURL . 'lib/jquery-ui/jquery-ui.js', 'jquery-ui.js', 1 );\n $model->addStyle(PLUGINURL . 'lib/jquery-ui/jquery-ui.css', 'jquery-ui.css', 1 );\n \n $model->addScript(PLUGINURL . 'lib/flexigrid/flexigrid.js', 'flexigrid.js', 1 );\n $model->addStyle(PLUGINURL . 'lib/flexigrid/flexigrid.css', 'flexigrid.css', 1 );\n \n $model->addStyle(TEMPLATEURL . 'default/form.css', 'form.css', 1 );\n $model->addScript(PLUGINURL . 'lib/tiny_mce/tiny_mce.js', 'tiny_mce.js', 1 );\n \n //$model->addScript(PLUGINURL . 'lib/ajaxupload/ajaxupload.js', 'ajaxupload.js', 1 );\n $model->addScript(PLUGINURL . 'lib/fileuploader/fileuploader.js', 'fileuploader.js', 1 );\n //$model->addStyle(PLUGINURL . 'lib/fileuploader/fileuploader.css', 'fileuploader.css', 1 );\n \n $model->addScript(PLUGINURL . 'lib/democratus.js', 'democratus.js', 1 );\n $model->addScript($model->pluginurl . 'agendaadmin.js', 'agendaadmin.js', 1 );\n \n?>\n<table id=\"grid1\" style=\"display: none;\" class=\"flexigrid\"><tr><td>&nbsp;</td></tr></table>\n<script type=\"text/javascript\">\n $(\"#grid1\").flexigrid({\n url: \"<?php echo $model->pageurl; ?>ajax/rows/\",\n dataType: \"json\",\n colModel : [\n {display: \"ID\", name : \"ID\", width : 30, sortable : true, align: \"center\"},\n {display: \"Title\", name : \"title\", width : 330, sortable : true, align: \"left\"},\n {display: \"Start - End Time\", name : \"time\", width : 220, sortable : false, align: \"center\"},\n {display: \"Options\", name : \"options\", width : 70, sortable : false, align: \"center\"},\n {display: \"Status\", name : \"status\", width : 30, sortable : false, align: \"center\"},\n \n {display: \"Translation\", name : \"translation\", width : 200, sortable : false, align: \"center\"}\n ],\n \n buttons : [\n {name: 'Add', bclass: 'add', onpress : agendaaddclick},\n {separator: true}\n ], \n searchitems : [\n {display: \"Title\", name : \"title\", isdefault: true}\n ],\n sortname: \"ID\",\n sortorder: \"asc\",\n usepager: true,\n title: \"Agendas\",\n useRp: true,\n rp: 20,\n showTableToggleBtn: false,\n onSuccess: agendagetready,\n //onSubmit: agendafilter,\n width: 'auto',\n height: 600\n }\n );\n \n \n// var ajaxurl = '<?php echo $model->pageurl; ?>ajax/';\n</script>\n<?php\n \n }", "title": "" }, { "docid": "f2b91c03e10c82f70a68c29769d7dc17", "score": "0.62572217", "text": "abstract function model();", "title": "" }, { "docid": "f2b91c03e10c82f70a68c29769d7dc17", "score": "0.62572217", "text": "abstract function model();", "title": "" }, { "docid": "f2b91c03e10c82f70a68c29769d7dc17", "score": "0.62572217", "text": "abstract function model();", "title": "" }, { "docid": "19a1502ef2b07d46d73ee7fba0107175", "score": "0.62366855", "text": "function tampil_admin(){ \n \n $data['data_admin']=$this->M_admin->tampil_data_admin(); \n $this->load->view('admin/a_header'); \n $this->load->view('admin/data_admin',$data);\n }", "title": "" }, { "docid": "6c809b0f4cd7a64ff7b9f506ca4c44af", "score": "0.62354386", "text": "public function index()\n\t{\n\t\t$BuscadorModel= new BuscadorModel();\n\t\t$BuscadorModel=$BuscadorModel->findAll();\n\t\t$BuscadorModel=array('BuscadorModel'=>$BuscadorModel);\t\t\n\t\t$estructura=view('head').view('header').view('index').view('adminBuscador',$BuscadorModel);\n\t\treturn $estructura;\n }", "title": "" }, { "docid": "e1caa47a284f75a3e501b064dc5e429a", "score": "0.62320125", "text": "public function add_agen()\n {\n $this->load->model('Model_admin');\n $this->Model_admin->insert_data(\"agen\");\n \n }", "title": "" }, { "docid": "45aedc83b1af2db014e10b20762deb89", "score": "0.6220825", "text": "private function User(){\n include $this->liens_absolu.'/modele/verifBdd.php';\n }", "title": "" }, { "docid": "f43cdbb19db13512fe7b689c54e13277", "score": "0.621219", "text": "function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->database(); // Connecter la base donnée\n\t\t$this->load->model('Enseignant');\n\t\t$this->load->model('Etudiant');\n\t\t$this->load->model('Admin');\n\t}", "title": "" }, { "docid": "ba1684b42f59efd4e0f002ac913489ba", "score": "0.62058353", "text": "Public Function ListarLoja(){\n $LojaModel = new LojaModel();\n echo $LojaModel->ListarLoja();\n }", "title": "" }, { "docid": "2ae0259535246d1de1eb1dfb075e9f79", "score": "0.61883646", "text": "public function __construct(){\n\t parent::__construct();\n\t $this->load->model('AdminModel');\n\t $this->load->model('GuestModel');\n }", "title": "" }, { "docid": "ac7a1da9097b0be78e60f67f8bfc2f7d", "score": "0.61842626", "text": "public function model()\n {\n return MensagemAnuncio::class;\n }", "title": "" }, { "docid": "725a8004d029e30d005c030d2c090479", "score": "0.6183295", "text": "public function run()\n {\n $administrador = Administrador::create(['adm_tipo'=>'3']);\n }", "title": "" }, { "docid": "1ce020231c9f08f8da9c775cb114027b", "score": "0.61827314", "text": "public function model()\n {\n return Aluno::class;\n }", "title": "" }, { "docid": "cebaf8fa326eb8b89c77c2042b30b942", "score": "0.61823285", "text": "public function _init()\n {\n $this->opModel = new Admin();\n }", "title": "" }, { "docid": "55a10626b09002bf26d0c977635a37e2", "score": "0.618193", "text": "public function admin()\n {\n \n $this->set('users', $this->User->find('all'));\n }", "title": "" }, { "docid": "e1f0a7d4618d85b90e941268c4b38efb", "score": "0.6167069", "text": "function getAdmin(){\n\n }", "title": "" }, { "docid": "f2760c2e9382e6ef2fbaa5d7ccd542d5", "score": "0.6166363", "text": "public function index()\r\n {\r\n close_setup_menu();\r\n\r\n $data['title'] = get_menu_option('dokumente', 'Dokumente');\r\n $data['staff'] = $this->staff_model->get('', ['active' => 1]);\r\n $this->load->view('admin/dokumente/manage', $data);\r\n }", "title": "" }, { "docid": "633c46cb99cb18cf4c250b02d676747b", "score": "0.6160394", "text": "public function run()\n {\n $administrator = new \\App\\Models\\User;\n $administrator->username = \"admin\";\n $administrator->name = \"mas admin\";\n $administrator->email = \"[email protected]\";\n $administrator->roles = json_encode([\"ADMIN\"]);\n $administrator->password = \\Hash::make(\"larashop\");\n $administrator->avatar = \"sepi.png\";\n $administrator->address = \"jakal kaliurang\";\n $administrator->save();\n\n $this->command->info(\"Seder larashop verhasil dibuat\");\n }", "title": "" }, { "docid": "24298aca7c4284bcb9ca1c501fc031c2", "score": "0.6154849", "text": "public function run()\n {\n //1\n $rol= new roles();\n $rol->descripcion='administrador';\n $rol->save();\n //2\n $rol = new roles();\n $rol->descripcion='medico';\n $rol->save();\n //3\n $rol = new roles();\n $rol->descripcion='fisioterapeuta';\n $rol->save();\n //4\n $rol = new roles();\n $rol->descripcion='pasante';\n $rol->save();\n //5\n $rol = new roles();\n $rol->descripcion='practicante';\n $rol->save();\n //6\n $rol = new roles();\n $rol->descripcion='servidor social';\n $rol->save();\n }", "title": "" }, { "docid": "47c4b4402faf461294cc4e25e3223dc5", "score": "0.6154438", "text": "public function model(){\n return null;\n }", "title": "" }, { "docid": "ca1f73fb72bacf48375ffb896a3364d9", "score": "0.615432", "text": "public function indexAction() : object\n {\n $title = \"administratör\";\n\n\n $this->app->db->connect();\n\n $sql = \"SELECT * FROM `content`\";\n $resultset = $this->app->db->executeFetchAll($sql);\n\n $data = [\n \"resultset\" => $resultset,\n ];\n\n\n // går till view/admin/index.php\n $this->app->page->add(\"admin/index\", $data);\n\n return $this->app->page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "4ebfda28ffaef9837024fe03cde0b53e", "score": "0.61534476", "text": "public function index()\n\t{\n//\t\t$list = $model->table('Menu')->where(['status[!=]'=>1])->select();\n//\t\tdump($list);\n//\t\t$this->api_success($list);\n//\t\t$list = [];\n//\t\tfor ($i = 1; $i <= 10; $i++) {\n//\t\t\t$data = [\n//\t\t\t\t'pid'=>0,\n//\t\t\t\t'status'=>1,\n//\t\t\t\t'name'=>'字段填充'.$i,\n//\t\t\t];\n//\t\t\t$list[]=$data;\n//\t\t}\n//\t\t$status = $model->table('Menu')->addAll($list);\n//\t\tdump($model->getLastSql());\n\t\t$menu_model = new MenuModel();\n\t\t$list = $menu_model->getOne(3);\n\t\tdump($list);\n\n\t}", "title": "" }, { "docid": "02a33af0889aca18dd64589f60ac4ef1", "score": "0.61479616", "text": "public function admin()\n {\n // belongsTo(RelatedModel, foreignKey = admin_id, keyOnRelatedModel = id)\n return $this->belongsTo('App\\Admin','user_id','user_id');\n }", "title": "" }, { "docid": "1725f1c7a38ad0cbc049368bc44603f7", "score": "0.6146527", "text": "function admin_contenu(){\n\n\t\t$this->set($d);\n\n\t}", "title": "" }, { "docid": "ad6080b91f26d7815c6024addf0c566f", "score": "0.61428475", "text": "public function crearguiaadmin()\n {\n $this->validarSesion();\n $this->vista(\"crearguiaadmin/crearguiaadmin\");\n }", "title": "" }, { "docid": "3e66ca76c82c96fa4c759d8cc40c71db", "score": "0.6138853", "text": "public function __construct() {\n \t$this->mdefault = 'admin';\n \t$this->cdefault = 'index';\n $this->template = TEMPLATE_ADMIN;\n \n //construtor pai\n parent::__construct();\n }", "title": "" }, { "docid": "774d0eed4fd2dc01e7c07a1b89c953d7", "score": "0.61350703", "text": "public function run()\n {\n\n $uni = Universidad::first();\n\n $curso = new Curso();\n $curso->slug = 'administracion-i';\n $curso->nombre = 'Administración I';\n $curso->universidad_id = $uni->id;\n $curso->save();\n\n $curso2 = new Curso();\n $curso2->slug = 'administracion-ii';\n $curso2->nombre = 'Administración II';\n $curso2->universidad_id = $uni->id;\n $curso2->save();\n\n\n }", "title": "" }, { "docid": "03ebebe0f592d399b2bee9c544ba94eb", "score": "0.61293805", "text": "function admin_index() {\n\n\t\t$this->Sqluser->recursive = 0;\n\n\t\t/**\n\t\t * Put all sql users in \"sqlusers\".\n\t\t * $sqlusers will be available in the view.\n\t\t */\n\t\t$this->set('sqlusers', $this->paginate());\n\n\t}", "title": "" }, { "docid": "a539b4efc83cc39c857d6bef36735a9a", "score": "0.6127377", "text": "public function admin()\r\n {\r\n return $this->belongsTo(Admin::class, 'admin_id', 'id');\r\n }", "title": "" }, { "docid": "0c4d85ee5f88318db85eeef8e2255969", "score": "0.61258274", "text": "public function add_transaksi()\n {\n $this->load->model('Model_admin');\n $this->Model_admin->insert_data(\"transaksi\");\n\n }", "title": "" } ]
5bc8f0ba374df4bfbf64de88d3740863
Sets selected table and columns
[ { "docid": "35584f16d2007abbe9dd13fbcf9ec784", "score": "0.6267272", "text": "public function setTable($table) {\n\t\t$this->table = $table;\n\t\t$this->setColumns();\n\t}", "title": "" } ]
[ { "docid": "d22ba265fca4af7e5676548a70b80bcb", "score": "0.679059", "text": "protected function _setCols()\n {\n // all table and calculate column descriptions in the model\n $this->_cols = array_merge(\n $this->_model->table_cols,\n $this->_model->calculate_cols\n );\n }", "title": "" }, { "docid": "63613b84bbd7f9368bd0d5e86d538623", "score": "0.65129405", "text": "public function setIndexSelectColumns()\r\n {\r\n if (!empty($this->_indexSelectColumns))\r\n $this->_indexColumns = $this->_indexSelectColumns;\r\n }", "title": "" }, { "docid": "87d639929870ea0ee941ad72838c1fe5", "score": "0.6457737", "text": "public function setupColumnSelect(): void\n {\n if ($this->rememberColumnSelectionIsDisabled()) {\n $this->forgetColumnSelectSession();\n }\n\n // If the column select is off, make sure to clear the session\n if ($this->columnSelectIsDisabled() && session()->has($this->getColumnSelectSessionKey())) {\n session()->forget($this->getColumnSelectSessionKey());\n }\n\n // Get a list of visible default columns that are not excluded\n $columns = $this->getDefaultVisibleColumns();\n\n // Set to either the default set or what is stored in the session\n $this->selectedColumns = (isset($this->{$this->tableName}['columns']) && count($this->{$this->tableName}['columns']) > 0) ?\n $this->{$this->tableName}['columns'] :\n session()->get($this->getColumnSelectSessionKey(), $columns);\n\n // Check to see if there are any excluded that are already stored in the enabled and remove them\n foreach ($this->getColumns() as $column) {\n if (! $column->isSelectable() && ! in_array($column->getSlug(), $this->selectedColumns, true)) {\n $this->selectedColumns[] = $column->getSlug();\n session([$this->getColumnSelectSessionKey() => $this->selectedColumns]);\n }\n }\n }", "title": "" }, { "docid": "545b12ead2c2f8da46099988fd6cf4af", "score": "0.64170754", "text": "public function updatedSelectedColumns(): void\n {\n if ($this->allDefaultVisibleColumnsAreSelected() && $this->allSelectedColumnsAreVisibleByDefault()) {\n $this->selectAllColumns();\n } else {\n $this->{$this->tableName}['columns'] = $this->selectedColumns;\n session([$this->getColumnSelectSessionKey() => $this->{$this->tableName}['columns']]);\n event(new ColumnsSelected($this->getColumnSelectSessionKey(), $this->selectedColumns));\n }\n }", "title": "" }, { "docid": "6e613616ac998cd8b5e5e12f855ab98d", "score": "0.6232144", "text": "public function setInitColumns(): self ;", "title": "" }, { "docid": "6db51e4064ded4245c6dfb61899f001f", "score": "0.6202787", "text": "function selectTableColumns() {\n if (count($this->columns) === 0) {\n $this->columns[] = array(new pdoext_query_Field($this->tablename.'.*'), null);\n }\n }", "title": "" }, { "docid": "5e3c5c663fd40c0979ff814bcb8226d6", "score": "0.61137676", "text": "protected function _setTables()\n {\n if (!empty($this->_options['tables'])) {\n return;\n }\n\n $this->_options['tables'] = $this->_getAllTables();\n }", "title": "" }, { "docid": "8a7b083dc1203e15ab250c31c5d9795e", "score": "0.61070234", "text": "function setTable( $table ){ $this->table = $table; }", "title": "" }, { "docid": "e746483a01c26ac42f44f176ede20faf", "score": "0.60327774", "text": "protected abstract static function setClassAndTable();", "title": "" }, { "docid": "b5c007244927eccbd370121f26dd2aff", "score": "0.6002371", "text": "private function _setColumns()\n {\n $this->columns = new Pike_Grid_DataSource_Columns();\n\n foreach ($this->_query->getFields() as $field) {\n $this->columns->add($field, null, $field);\n }\n\n //not finished\n }", "title": "" }, { "docid": "e9709fcf3b31d0c8643c656e9e3b52af", "score": "0.5905539", "text": "public function set_table(table_data &$table_data);", "title": "" }, { "docid": "819e539a856f656252c1323f2318d850", "score": "0.5895539", "text": "public function setTableDefinition()\n {\n\t\tforeach ($this->_options['columns'] as $key => $options) {\n\n\t $name = $options['name'];\n\n\t\t\tif ($options['alias'])\n\t {\n\t $name .= ' as ' . $options['alias'];\n\t }\n\t\t\t\n\t $this->hasColumn($name, $options['type'], $options['length'], $options['options']);\n\t\t}\n\t\t\n $this->addListener(new Doctrine_Template_Listener_Categorizable($this->_options));\n }", "title": "" }, { "docid": "10c96c29b6152bc634e4ae77756da970", "score": "0.586973", "text": "public function setTableColumnDefs($value) {\n $this->stack [$this->index]->setTableColumnDefs($value);\n }", "title": "" }, { "docid": "a00cfed994e2cb24bb47e67f7ad2ae69", "score": "0.5855437", "text": "public static function editColumns();", "title": "" }, { "docid": "a1d3da92d9f04120d4bd584266957681", "score": "0.5838393", "text": "function select($table)\n {\n }", "title": "" }, { "docid": "5ffb0e5ece068efc63f9961b1be0aaa1", "score": "0.582822", "text": "function ChooseTable()\r\n\t\t{\r\n\t\t\t//if we posted smth\r\n\t\t\tif ((!empty($this->request->post)))\r\n\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$this->data[tables] = $this->controller_model->GetTables(array());\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "378cbc1510699fab82dffbe33d83ba81", "score": "0.58010846", "text": "public function setTable($table);", "title": "" }, { "docid": "378cbc1510699fab82dffbe33d83ba81", "score": "0.58010846", "text": "public function setTable($table);", "title": "" }, { "docid": "46bce140fae486e53067782f023fac0a", "score": "0.5785795", "text": "public function setSelect($columns){\n\t $this->_selectColums=$columns;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8965eb4d269710f8d5d16a50e83d6920", "score": "0.5734536", "text": "public function select( $columns, $option = null );", "title": "" }, { "docid": "56235770bf98976d0388e3422dfe99e4", "score": "0.56914794", "text": "public function setTableColumnDefs($value) {\n $this->table_column_defs = $value;\n }", "title": "" }, { "docid": "a8dab41ef152cd5643817ef8d550327d", "score": "0.5669182", "text": "public function &select() {\n\t\t$nb = func_num_args();\n\t\tif ($nb > 1) {\n\t\t\tfor ($i = 0; i < $nb; $i++)\n\t\t\t\t$this->tables[func_get_arg($i)] = null;\n\t\t} else {\n\t\t\t$o = func_get_arg(0);\n\t\t\tif (is_string($o))\n\t\t\t\t$this->tables[$o] = null;\n\t\t\telse foreach ($o as $table_name=>$alias)\n\t\t\t\tif (is_string($table_name))\n\t\t\t\t\t$this->tables[$table_name] = $alias;\n\t\t\t\telse\n\t\t\t\t\t$this->tables[$alias] = null;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a4feb6ceccd4e77750845ad9f892b9db", "score": "0.5644213", "text": "public function setColumns(array $columns = []);", "title": "" }, { "docid": "14180d3848ca7b1a4848d7af74dea57c", "score": "0.5642138", "text": "public function setSelectColumns($value)\n {\n return $this->set('SelectColumns', $value);\n }", "title": "" }, { "docid": "14180d3848ca7b1a4848d7af74dea57c", "score": "0.5642138", "text": "public function setSelectColumns($value)\n {\n return $this->set('SelectColumns', $value);\n }", "title": "" }, { "docid": "14180d3848ca7b1a4848d7af74dea57c", "score": "0.5642138", "text": "public function setSelectColumns($value)\n {\n return $this->set('SelectColumns', $value);\n }", "title": "" }, { "docid": "14180d3848ca7b1a4848d7af74dea57c", "score": "0.5642138", "text": "public function setSelectColumns($value)\n {\n return $this->set('SelectColumns', $value);\n }", "title": "" }, { "docid": "6ecee94489bdc8dc3ff7a2263c70678b", "score": "0.56383747", "text": "public function setColumns(array $columns){ $this->columnNames = $columns; }", "title": "" }, { "docid": "7fbb6e16a88d0f83895f588e80adfacc", "score": "0.5574987", "text": "private function setColumns() {\n\t\t$sql = \"SHOW COLUMNS FROM \" . $this->table;\n\t\t$columns = $this->db->query($sql);\n\t\tforeach ($columns as $k => $column):\n\t\t\tif ($column['Key'] == 'PRI'):\n\t\t\t\t$this->primaryKey = $column['Field'];\n\t\t\telse:\n\t\t\t\t$this->columns[] = $column['Field'];\n\t\t\tendif;\n\t\tendforeach;\n\n\t}", "title": "" }, { "docid": "7dd0c5bbb37a311b487a444d4e015453", "score": "0.5559562", "text": "public function setFilters()\r\n {\r\n $this->grid->getColumn( 'tier' )->setFilterType( 'select' );\r\n $this->grid->getColumn( 'class' )->setFilterType( 'select' );\r\n $this->grid->getColumn( 'nationality' )->setFilterType( 'select' );\r\n }", "title": "" }, { "docid": "69f65bf8aff947d6fe0d4e3ce976ca80", "score": "0.55577075", "text": "protected function setTables(){\n $this->mainTable = self::TABLE_PRIVILEGE;\n }", "title": "" }, { "docid": "7703ab5cead40da8ef46050467dde902", "score": "0.5548305", "text": "protected function setTable($value)\n\t{\n\t\t$this->table = $value;\n\t}", "title": "" }, { "docid": "9bc1b2713252cd658b80a1b71e4ba1df", "score": "0.55467236", "text": "public static abstract function set_table_definition();", "title": "" }, { "docid": "12aafb8cabfafbcf35eae3cc0b24cb66", "score": "0.55409884", "text": "public function setTableOptions($value)\n {\n $this->_tableOptions = $value;\n }", "title": "" }, { "docid": "56f0152e7f01ced12d77d533c260c727", "score": "0.551873", "text": "abstract public function columns($table);", "title": "" }, { "docid": "2a14088e22e379992eb871b3d4fd8f0c", "score": "0.5512863", "text": "abstract protected function tableColumns();", "title": "" }, { "docid": "d616b46c2798512ccef9640ad2167540", "score": "0.55090034", "text": "public function setContentTermHeader() {\n\n $i = 0;\n foreach ($this->getUserSelectedColumns() as $value) {\n //error_log($value);\n switch ($value) {\n case \"CODE\":\n $CONST_NAME = \"CODE_ID\";\n $colWidth = 20;\n break;\n case \"STUDENT\":\n $CONST_NAME = \"FULL_NAME\";\n $colWidth = 20;\n break;\n case \"GENDER\":\n $CONST_NAME = \"GENDER\";\n $colWidth = 20;\n break;\n case \"DATE_BIRTH\":\n $CONST_NAME = \"DATE_BIRTH\";\n $colWidth = 20;\n break;\n case \"PHONE\":\n $CONST_NAME = \"PHONE\";\n $colWidth = 20;\n break;\n case \"EMAIL\":\n $CONST_NAME = \"EMAIL\";\n $colWidth = 25;\n break;\n \n default:\n $CONST_NAME = defined($value) ? constant($value) : $value;\n $colWidth = 30;\n break;\n }\n\n $COLUMN_NAME = defined($CONST_NAME) ? constant($CONST_NAME) : $CONST_NAME;\n $this->setCellContent($i, $this->startHeader, $COLUMN_NAME);\n $this->setFontStyle($i, $this->startHeader, true, 11, \"000000\");\n $this->setFullStyle($i, $this->startHeader, \"DFE3E8\");\n $this->setCellStyle($i, $this->startHeader, $colWidth, 40);\n\n $i++;\n }\n }", "title": "" }, { "docid": "0ffdeb86aa42807a73e45163ea009314", "score": "0.54796284", "text": "function set_pdf_tabla_ancho($ancho)\n\t{\n\t\t$this->_pdf_tabla_ancho = $ancho;\n\t}", "title": "" }, { "docid": "abfb8e980895c58fde427de50f58e7b5", "score": "0.5471936", "text": "private function setColumns()\n {\n $this->columnList = implode(', ', Base::$headerColumns);\n $this->columnList .= ', csv_row';\n }", "title": "" }, { "docid": "08e0373bb2839744477efc3ac0f4c5ab", "score": "0.54615206", "text": "public function setTable($table) {\n\t\t$this->table = $table;\n\t}", "title": "" }, { "docid": "92f5c790c46d3a2d4f3f0e9b4e31f432", "score": "0.5449984", "text": "public function setOptionsTable() {\n\t\t $paramTable = array(\n \t\t\t\tself::T_CONDITION => array(\n \t\t\t\t\t'table' => 'webset.disdef_bgb_ksaconditions',\n \t\t\t\t\t'columns' => \n \t\t\t\t\t\tarray(\n \t\t\t\t\t\t\t'refid' => 'crefid',\n \t\t\t\t\t\t\t'item' => 'cdesc',\n \t\t\t\t\t\t\t'ksaID' => 'blksa',\n \t\t\t\t\t\t\t'ksaCM' => 'blksa',\n \t\t\t\t\t\t\t'ksaWH' => 'AND blksa = '\n \t\t\t\t\t\t)\n \t\t\t\t),\n \t\t\t\t self::T_VERB => array(\n \t\t\t\t\t 'table' => 'webset.disdef_bgb_ksaksgoalactions',\n \t\t\t\t\t 'columns' => \n \t\t\t\t\t \t array(\n \t\t\t\t\t\t\t 'refid' => 'gdskgarefid',\n \t\t\t\t\t\t\t 'item' => 'gdskgaaction',\n \t\t\t\t\t\t\t 'ksaID' => 'gdskgrefid',\n \t\t\t\t\t\t\t 'ksaCM' => 'gdskgrefid',\n \t\t\t\t\t\t\t 'ksaWH' => 'AND gdskgrefid = '\n \t\t\t\t\t\t )\n \t\t\t\t ),\n \t\t\t\tself::T_CONTENT => array(\n \t\t\t\t\t'table' => 'webset.disdef_bgb_scpksaksgoalcontent',\n \t\t\t\t\t'columns' => \n \t\t\t\t\t\tarray(\n \t\t\t\t\t\t\t'refid' => 'gdskgcrefid',\n \t\t\t\t\t\t\t'item' => 'gdskgccontent',\n \t\t\t\t\t\t\t'ksaID' => 'gdskgrefid',\n \t\t\t\t\t\t\t'ksaCM' => 'gdskgrefid',\n \t\t\t\t\t\t\t'ksaWH' => 'AND gdskgrefid = '\n \t\t\t\t\t\t)\n \t\t\t\t),\n \t\t\t\tself::T_MEASURE => array(\n \t\t\t\t\t'table' => 'webset.disdef_bgb_measure',\n \t\t\t\t\t'columns' => \n \t\t\t\t\t\tarray(\n \t\t\t\t\t\t\t'refid' => 'mrefid',\n \t\t\t\t\t\t\t'item' => 'mdesc',\n \t\t\t\t\t\t\t'ksaID' => '',\n \t\t\t\t\t\t\t'ksaCM' => '',\n \t\t\t\t\t\t\t'ksaWH' => ''\n \t\t\t\t\t\t)\n \t\t\t\t),\n \t\t\t\tself::T_SCHEDULE => array(\n \t\t\t\t\t'table' => 'webset.disdef_bgb_ksaeval',\n \t\t\t\t\t'columns' => \n \t\t\t\t\t\tarray(\n \t\t\t\t\t\t\t'refid' => 'erefid',\n \t\t\t\t\t\t\t'item' => 'edesc',\n \t\t\t\t\t\t\t'ksaID' => '',\n \t\t\t\t\t\t\t'ksaCM' => '',\n \t\t\t\t\t\t\t'ksaWH' => ''\n \t\t\t\t\t\t)\n \t\t\t\t)\n \t\t\t);\n \t\t\t\n \t\t\t$this->table = $paramTable[$this->type]['table'];\n \t\t\t$this->columns = $paramTable[$this->type]['columns'];\n \t\t\n\t }", "title": "" }, { "docid": "9cba5d955573d876f48e9073a300857b", "score": "0.5444175", "text": "public function setTable(string $table){ $this->table = $table; }", "title": "" }, { "docid": "5f3aaf869f8090b067cf539384ab905d", "score": "0.5443372", "text": "function view_edit_columns() {\n\t\t$join_columns_tmp = array();\n\t\t\n\t\t/* Database */\n\t\t$query = \"SELECT * FROM databases d, objects o WHERE o.object_id=d.object_id AND d.database_id='\".$this->id.\"';\";\n\t\t$res = $this->dobj->db_query($query);\n\t\t$dbs = $this->dobj->db_fetch($res);\n\t\t\n\t\t/* Tables */\n\t\t$query = \"SELECT * FROM tables WHERE database_id='\".$this->id.\"' ORDER BY human_name;\";\n\t\t$res = $this->dobj->db_query($query);\n\t\t$tables_query = $this->dobj->db_fetch_all($res);\n\n\t\tforeach ($tables_query as $table_tmp) {\n\t\t\t$table_id = $table_tmp['table_id'];\n\n\t\t\t$tables[$table_id]['name'] = $table_tmp['human_name'];\n\t\t\t$tables[$table_id]['description'] = $table_tmp['description'];\n\t\t}\n\n\t\t/* Columns */\n\t\t$query = \"SELECT t.human_name as table_human_name, c.human_name as column_human_name, * FROM tables t INNER JOIN columns c ON (c.table_id=t.table_id) WHERE t.database_id='\".$this->id.\"' ORDER BY t.human_name, c.human_name;\";\n\t\t$res = $this->dobj->db_query($query);\n\t\t$columns_query = $this->dobj->db_fetch_all($res);\n\n\t\tforeach ($columns_query as $columns_tmp) {\n\t\t\t$column_id = $columns_tmp['column_id'];\n\n\t\t\t$columns[$column_id]['name'] = $columns_tmp['table_human_name'].\".\".$columns_tmp['column_human_name'];\n\t\t\t$columns[$column_id]['description'] = $columns_tmp['description'];\n\t\t\t$columns[$column_id]['example'] = $columns_tmp['example'];\n\t\t\t$columns[$column_id]['type'] = $columns_tmp['data_type'];\n\t\t}\n\n\t\tforeach ($columns_query as $columns_tmp) {\n\t\t\t$column_id = $columns_tmp['column_id'];\n\t\t\tif ($columns_tmp['key_type'] == \"PK\") {\n\t\t\t\t$columns[$column_id]['key'] = \"Primary\";\n\t\t\t} else {\n\t\t\t\t$columns[$column_id]['key'] = \"&nbsp;\";\n\t\t\t}\n\n\t\t\tif (!empty($columns_tmp['references_column'])) {\n\t\t\t\tif (!empty($columns[$columns_tmp['references_column']])) {\n\t\t\t\t\t$columns[$column_id]['references'] = $columns[$columns_tmp['references_column']]['name'];\n\t\t\t\t} else {\n\t\t\t\t\t$columns[$column_id]['references'] = $columns_tmp['references_column'];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$columns[$column_id]['references'] = \"&nbsp;\";\n\t\t\t}\n\n\t\t\tif ($columns_tmp['available'] == \"t\") {\n\t\t\t\t$columns[$column_id]['available'] = \"Yes\";\n\t\t\t} else {\n\t\t\t\t$columns[$column_id]['available'] = \"No\";\n\t\t\t}\n\t\t}\n\n\t\t/* Joins */\n\t\t$table_joins_query = $this->dobj->db_fetch_all($this->dobj->db_query(\"SELECT * FROM table_joins WHERE (table1='\".implode(\"' OR table1='\", array_keys($tables)).\"') AND (table2='\".implode(\"' OR table2='\", array_keys($tables)).\"') ORDER BY table1, table2;\"));\n\n\t\tif (!empty($table_joins_query)) {\n\t\t\tforeach ($table_joins_query as $table_join_tmp) {\n\t\t\t\t$table_join_id = $table_join_tmp['table_join_id'];\n\t\t\t\t$table1 = $table_join_tmp['table1'];\n\t\t\t\t$table2 = $table_join_tmp['table2'];\n\n\t\t\t\t$joins[$table_join_id]['table1'] = $tables[$table1]['name'];\n\t\t\t\t$joins[$table_join_id]['table2'] = $tables[$table2]['name'];\n\t\t\t}\n\n\n\t\t\tforeach ($table_joins_query as $table_join_tmp) {\n\t\t\t\t$join_columns_tmp = array_merge((array)$join_columns_tmp, (array)explode(\",\", $table_join_tmp['method']));\n\t\t\t\t$table_joins[$table_join_tmp['table_join_id']] = $table_join_tmp;\n\t\t\t}\n\t\t\t$join_columns_tmp = array_unique($join_columns_tmp);\n\n\t\t\t$join_columns_query = $this->dobj->db_fetch_all($this->dobj->db_query(\"SELECT c.column_id, c.name as column_name, t.table_id, t.name as table_name FROM columns c INNER JOIN tables t ON (c.table_id=t.table_id) WHERE c.column_id='\".implode(\"' OR c.column_id='\", $join_columns_tmp).\"';\"));\n\t\t\tforeach ($join_columns_query as $join_column_tmp) {\n\t\t\t\t$join_columns[$join_column_tmp['column_id']] = $join_column_tmp;\n\t\t\t\t$join_tables[$join_column_tmp['table_id']] = $join_column_tmp;\n\t\t\t}\n\n\t\t\tforeach ($table_joins as $table_join) {\n\t\t\t\t$joins[$table_join['table_join_id']]['name'] = $this->render_join($table_join, $join_columns);\n\t\t\t}\n\n\t\t}\n\n\t\t$output = Catalogue_View::view_edit_columns($dbs, $tables, $columns, $joins, $dbs['type']);\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "9eddb87a1eb15e4c03ab2559ed6c0c92", "score": "0.54387236", "text": "protected function setOptions()\n {\n //allow changing the statements' table name\n if (isset($GLOBALS['RAP']['conf']['database']['tblStatements'])) {\n $this->sg->setStatementsTable(\n $GLOBALS['RAP']['conf']['database']['tblStatements']\n );\n }\n }", "title": "" }, { "docid": "82bfc0a66893d5d6374d63193e577ed6", "score": "0.5435408", "text": "public function setTable($table)\n {\n $this->table = $table;\n }", "title": "" }, { "docid": "82bfc0a66893d5d6374d63193e577ed6", "score": "0.5435408", "text": "public function setTable($table)\n {\n $this->table = $table;\n }", "title": "" }, { "docid": "96ecb6e5f0c72ec95419f759f001b063", "score": "0.5433824", "text": "public function setTable($table) {\n $this->table = $table;\n }", "title": "" }, { "docid": "d8a15e186ebec2536c177ec8357e51c5", "score": "0.54179627", "text": "public function setColumns(array $columns): self;", "title": "" }, { "docid": "5c858fdf89f62f5b36d5eb7f0dabf220", "score": "0.54098827", "text": "public function setTable(Zend_Db_Table_Abstract $table)\n\t{\n\t\t$this->_table = $table;\n\t}", "title": "" }, { "docid": "528712f3278562084d95e384845a599c", "score": "0.54082084", "text": "private function setCategoryTableColumns($table):void\n {\n $table->addColumn(Category::COLUMN_NAME)->setTitle(__('admin_page_categories.table_head_category_name'))\n ->isSortable()->isSearchable()->sortByDefault()->useForDestroyConfirmation();\n }", "title": "" }, { "docid": "63ab1826bae741f5f9803a0f5e74ac78", "score": "0.5407705", "text": "public function setTable($table)\n {\n \\Segment\\utilities\\Utilities::areArgumentsValid(__METHOD__, func_get_args(), $this);\n if ($this->count === 1 && count($this->table) === 0) {\n $this->table[0] = $table;\n }\n }", "title": "" }, { "docid": "f7162ca4fbc03d5b28be4ae47e6aee46", "score": "0.5406224", "text": "public function set_table($table = '') {\n $this->table = $table;\n }", "title": "" }, { "docid": "80ed2294a88824ccc51a6efe9248e6da", "score": "0.5405164", "text": "public function crossUpdateFromSelect($table)\n {\n }", "title": "" }, { "docid": "a1ef9fc4d76a891765b42042915bb865", "score": "0.5401323", "text": "protected function setSelect()\n\t{\n\t\t$columns = array($this->query->getModel()->getTable().'.*');\n\n\t\t$this->query->select(array_merge($columns, $this->getPivotColumns()));\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "65100204c3a3202b38926dd925440831", "score": "0.54009813", "text": "function setTable($tablename)\n {\n $this->m_table = $tablename;\n }", "title": "" }, { "docid": "c0348999c75c6d8e9acaca5f2c50c1ef", "score": "0.53979665", "text": "public function setTable($name);", "title": "" }, { "docid": "28c9e1da1f098ab49084826900ec5345", "score": "0.5383185", "text": "function set_pdf_tabla_opciones($opciones)\n\t{\n\t\t$this->_pdf_tabla_opciones = $opciones;\n\t}", "title": "" }, { "docid": "524f3051ab0c17a9b79560d552b69fe5", "score": "0.5369871", "text": "protected function _prepareColumns()\n {\n parent::_prepareColumns();\n $this->removeColumn('in_selected');\n return $this;\n }", "title": "" }, { "docid": "492e3775a716485580e1a843dd11c671", "score": "0.535985", "text": "public function set_table_col($table, $id, $col)\n\t{\n\t\t$this->table = $table;\n\t\t$this->table_id = $id;\n\t\t$this->table_col = $col;\n\t\t$this->enum_array = null;\n\t}", "title": "" }, { "docid": "cda2470fe8fd9f4a40885b19efb3e840", "score": "0.53552425", "text": "protected function addColNames() : void\n {\n if ($this->select->hasCols()) {\n return;\n }\n\n $table = $this->table->getName();\n $cols = [];\n foreach ($this->table->getColNames() as $col) {\n $cols[] = \"{$table}.{$col}\";\n }\n $this->select->cols($cols);\n }", "title": "" }, { "docid": "e086bce14c9c6c166182fb0af6cf483a", "score": "0.5353881", "text": "public function setTable($table)\n {\n $this->table = (string) $table;\n $this->select = null;\n return $this;\n }", "title": "" }, { "docid": "a3ed328efa3dfdc005a5a7a5050ff74b", "score": "0.53495824", "text": "public function setTableCurrentColumn($value) {\n $this->stack [$this->index]->setTableCurrentColumn($value);\n }", "title": "" }, { "docid": "421244fc5e42678601b1d11b4264e7d6", "score": "0.53490645", "text": "public function selectMultiTableMN($params)\n {\n \\extract($params);\n //whereAdd = 'perm_user_id= '.$perm_user_id;\n //fieldname = 'areas'\n //fieldlabel = 'Aree'\n //echo '<h3>selectMultiTableMN</h3>';\n //tablemn = 'liveuser_area_admin_areas'\n //tablem = 'liveuser_areas'\n //tablem_label = 'area_define_name'\n //external_key =\n //-------------------------------------------\n $do = DB_DataObject::factory($tablem);\n $keys = $do->keys();\n $primary_key = $keys[0];\n //$do->joinAdd($do1);\n //$do->whereAdd('perm_user_id= '.$perm_user_id);\n $allAreas = $do->fetchAll();\n //echo '<h3>'.count($allAreas).'</h3><pre>'; print_r($allAreas); echo '</pre>';\n $allAreas = ARRAY_OP::arrayKeysX($allAreas, $primary_key, $tablem_label);\n //-------------------------------------------------------------------------\n\n $do = DB_DataObject::factory($tablemn);\n //$do1 = DB_DataObject::factory('liveuser_areas');\n //$do->joinAdd($do1);\n //$do->whereAdd('perm_user_id= '.$perm_user_id);\n $do->whereAdd($whereAdd);\n $areas = $do->fetchAll();\n if (!isset($external_key)) {\n $external_key = $primary_key;\n }\n $areas = ARRAY_OP::arrayKeysX($areas, $external_key);\n //echo '<pre>'; print_r($areas); echo '</pre>';\n //$do = DB_DataObject::factory('liveuser_area_admin_areas');\n\n //echo '<script type=\"text/javascript\" src=\"/xot/js/qfamsHandler.js\"></script>';\n echo '<script type=\"text/javascript\" src=\"/PEAR/PEAR/HTML/QuickForm/qfamsHandler.js\"></script>';\n $form->setDefaults([$fieldname => $areas]);\n\n /*$el=$form->addElement('advmultiselect', $fieldname, $fieldlabel, $allAreas,\n array('size' => 5,'style' => 'width:300px;')\n );\n */\n $el = &HTML_QuickForm::createElement(\n 'advmultiselect',\n $fieldname,\n $fieldlabel,\n $allAreas,\n ['size' => 5, 'style' => 'width:300px;']\n );\n\n $form->addElement($el);\n //echo htmlspecialchars($el1->getElementJs(true));\n }", "title": "" }, { "docid": "9d12e12d1c5f2a899007c7c06c05b419", "score": "0.5341502", "text": "protected function setAttributes()\n\t{\n\t\t$sql = \"SHOW COLUMNS FROM \".$this->table;\n\t\t$columns = $this->db->get_results($sql);\n\t\tforeach ($columns as $row) {\n\t\t\t$this->{$row->Field};\n\t\t}\n\n\t}", "title": "" }, { "docid": "d6b2374d6d24f0ac1cf9d6fe2f0e4268", "score": "0.5322816", "text": "public function setTable($table)\n\t{\n\t\t$this->table = $table;\n\t\t$this->tableStructure = new OrmTableStructure($table, 'default_read_only');\n\t}", "title": "" }, { "docid": "9c7dffc53045f02dfdedd08e5499a67d", "score": "0.5307217", "text": "public function setFiedsTable($tabela)\n {\n $this->_FiedsTable = $this->TablesColumns($tabela);\n }", "title": "" }, { "docid": "c70ff2485dccd1b5cb82ace11bb56c44", "score": "0.53040934", "text": "private function declareTableColumn()\n {\n $this->crud->addColumn([\n 'name' => 'name',\n 'label' => 'Name',\n ]);\n $this->crud->addColumn([\n 'name' => 'rank',\n 'label' => 'Rank',\n ]);\n }", "title": "" }, { "docid": "9c13bcdca97adf9ae0f5a273171ff26f", "score": "0.5290926", "text": "private function set_col_names()\n {\n $i = 0;\n $this->col_names = array();\n\n // synch con la lista delle colonna da configurazione\n if (isset($this->config[\"column\"]) && is_array($this->config[\"column\"]))\n {\n // aggiungiamo colonne da configurazione\n foreach($this->config[\"column\"] as $col_name => $col_info)\n {\n if (array_key_exists($col_name, $this->col_meta))\n {\n $this->col_names[$i] = $col_name;\n $i++;\n }\n }\n }\n\n // completiamo con colonne da metadata\n foreach($this->col_meta as $col_name => $col_info)\n {\n if (!in_array( $col_name, $this->col_names))\n {\n $this->col_names[$i] = $col_name;\n $i++;\n }\n }\n }", "title": "" }, { "docid": "5c8679d13590bc9447f074ffe59ce737", "score": "0.5287577", "text": "public function select($columns);", "title": "" }, { "docid": "3040011a37d36292a74f50aa144c0504", "score": "0.5285069", "text": "public function setTable($name)\n {\n $this->tName = $name;\n }", "title": "" }, { "docid": "edf8248ea0c43f2006e9a843539d5f0e", "score": "0.5278666", "text": "public function set($table, array $columns)\n\t{\n\t\t$this->table = $table;\n\t\t$this->columns = $columns;\n\t\t$this->total = $this->model->count($this->table);\n\t}", "title": "" }, { "docid": "859a363888ca149638066c3fa4e768cf", "score": "0.52702963", "text": "public function setTableDefinition()\n {\n // Add global Doctrine record filter which implements Symfony filter events for unknown property calls\n $this->_table->unshiftFilter(new sfSympalRecordEventFilter());\n\n // Attach i18n behavior if is i18ned\n if ($this->isI18ned())\n {\n $this->sympalActAsI18n(array('fields' => $this->getI18nedFields()), 'Doctrine_Template_I18n');\n }\n\n // Invoke Symfony event to hook into every models setTableDefinition() process\n sfProjectConfiguration::getActive()->getEventDispatcher()->notify(new sfEvent($this->getInvoker(), 'sympal.'.$this->_eventName.'.set_table_definition', array('object' => $this)));\n }", "title": "" }, { "docid": "230814f54e99d2fdf5c9b7134c3c86cf", "score": "0.52686644", "text": "private function selectColumns()\n {\n $this->dbColumns = '';\n if (isset($this->columns)) {\n $max = count($this->columns) - 1;\n foreach ($this->columns as $k => $s) {\n if ($k < $max) {\n $this->dbColumns .= $s . ', ';\n } else {\n $this->dbColumns .= $s;\n }\n }\n //Transformation: from ['name', 'email', ... ] to name, email, ...\n } else {\n echo '$this->Columns is not set Yet!' . PHP_EOL;\n }\n }", "title": "" }, { "docid": "7a5e1bb6e9f5e2aefbf9ac69f2ed1ae7", "score": "0.5265915", "text": "public function setTableDefinition()\n {\n if (($root = $this->getAttribute('rootColumnName')) && (!$this->table->hasColumn($root))) {\n $this->table->setColumn($root, 'integer');\n }\n\n $this->table->setColumn('lft', 'integer', 4);\n $this->table->setColumn('rgt', 'integer', 4);\n if ($level = $this->getAttribute('levelColumnName')) {\n $this->table->setColumn($level . ' AS level', 'integer', 2);\n } else {\n $this->table->setColumn('level', 'integer', 2);\n }\n }", "title": "" }, { "docid": "95febb685e059957f193219d439a92cf", "score": "0.5262952", "text": "public function set_table_values($values) {\n $this->_tableValues = $values;\n }", "title": "" }, { "docid": "19e83960129861d3e7d0e68fc8660603", "score": "0.5253339", "text": "function setUserTable($userTable) {\r\n\t\t$this->userTable = $userTable;\r\n\t}", "title": "" }, { "docid": "bd422e4b6e33176c57cd0c58b84ca8ab", "score": "0.52520835", "text": "private function selectQuery()\n {\n if(!empty($this->dbColums))\n $this->query = 'SELECT id, ' . $this->dbColums . ' FROM ' .$this->name;\n else\n $this->query = 'SELECT id ' . $this->dbColums . ' FROM ' .$this->name;\n \n $this->dbColums = '';\n }", "title": "" }, { "docid": "66c8990d3696018d44a72892adf554dc", "score": "0.5247275", "text": "function prepareColumns()\n\t{\n\t}", "title": "" }, { "docid": "9fc7e775f8c5b0b782f58216b32923d5", "score": "0.524679", "text": "public function setCustomTable($table)\r\n\t{\r\n\t\t$this->object_table = $table;\r\n\t\t$this->useCustomTable = true;\r\n\t}", "title": "" }, { "docid": "8019d25c46235985a1e2c5362e05ff23", "score": "0.5246785", "text": "public function autoSetTableNames();", "title": "" }, { "docid": "f3d04b1837a4b0ee1769d07435821225", "score": "0.52452916", "text": "function populate_table(){\n\n }", "title": "" }, { "docid": "86864906c3d8cb85e3b17c3dc261be5a", "score": "0.5243682", "text": "function __set($name, $value)\n {\n $this->table = $value;\n }", "title": "" }, { "docid": "4c6bcb29deb99862a2c08b386c2df925", "score": "0.52436656", "text": "protected function loadTableColumnData()\n {\n $sql = 'SELECT \"name\" FROM \"sqlite_master\" WHERE \"type\" = \\'table\\'';\n $tables = $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n $tables = $tables->toArray();\n\n foreach ($tables as $table) {\n $sql = 'PRAGMA table_info(\"' . $table['name'] . '\")';\n $columns = $this->adapter->query($sql, Adapter::QUERY_MODE_EXECUTE);\n $this->tableData[$table['name']] = $columns->toArray();\n }\n }", "title": "" }, { "docid": "d869e263b1f4b230a653aeb6e89601de", "score": "0.5243556", "text": "public function setColumns(?array $value): void {\n $this->getBackingStore()->set('columns', $value);\n }", "title": "" }, { "docid": "819dec5a55c246f67cd36536029f15bc", "score": "0.5223268", "text": "protected function set_selects() {\n if (!empty($this->selects) && $this->escape === FALSE) {\n $this->db->select($this->selects, FALSE);\n\n // Clear it out for the next process.\n $this->selects = NULL;\n $this->escape = NULL;\n } elseif (!empty($this->selects)) {\n $this->db->select($this->selects);\n\n // Clear it out for the next process.\n $this->selects = NULL;\n }\n }", "title": "" }, { "docid": "b1069c552854f3bc2aba9df13f4ac3c1", "score": "0.52153724", "text": "public function setTableClass($class) {\n\t\t$this->tableclass = $class;\n\t}", "title": "" }, { "docid": "05a7472db7f7e6b36926067dccb9669e", "score": "0.52098584", "text": "protected function _getSelectedColumns()\r\n {\r\n if (!$this->isTotals()) {\r\n /*if ('month' == $this->_period) {\r\n $this->_periodFormat = 'DATE_FORMAT(e.updated_at, \\'%Y-%m\\')';\r\n } elseif ('year' == $this->_period) {\r\n $this->_periodFormat = 'EXTRACT(YEAR FROM e.updated_at)';\r\n } else {\r\n $this->_periodFormat = 'DATE(e.updated_at)';\r\n }\r\n $this->_selectedColumns += array('period' => $this->_periodFormat); */\r\n }\r\n else{ \r\n /*$this->_selectedColumns['total_order'] = '(SUM(e.subtotal))'; \r\n $this->_selectedColumns['discount_amount'] = '(SUM(e.discount_amount))'; \r\n $this->_selectedColumns['shipping_amt'] = '(SUM(e.shipping_amount))'; \r\n $this->_selectedColumns['shipping_cost'] = '(SUM(si.ammount))'; \r\n $this->_selectedColumns['order_tax'] = '(SUM(e.tax_amount))';*/ \r\n $this->_selectedColumns['order_state'] = 'e.state'; \r\n }\r\n return $this->_selectedColumns;\r\n }", "title": "" }, { "docid": "8aadff28779de0bae3bb64ee6b1b5428", "score": "0.52013075", "text": "public function setContentClassHeader() {\n\n $i = 0;\n foreach ($this->getUserSelectedColumns() as $value) {\n //error_log($value);\n switch ($value) {\n case \"CODE\":\n $CONST_NAME = \"CODE_ID\";\n $colWidth = 20;\n break;\n case \"STUDENT\":\n $CONST_NAME = \"FULL_NAME\";\n $colWidth = 20;\n break;\n case \"GENDER\":\n $CONST_NAME = \"GENDER\";\n $colWidth = 20;\n break;\n case \"DATE_BIRTH\":\n $CONST_NAME = \"DATE_BIRTH\";\n $colWidth = 20;\n break;\n case \"PHONE\":\n $CONST_NAME = \"PHONE\";\n $colWidth = 20;\n break;\n case \"EMAIL\":\n $CONST_NAME = \"EMAIL\";\n $colWidth = 25;\n break;\n \n default:\n $CONST_NAME = defined($value) ? constant($value) : $value;\n $colWidth = 30;\n break;\n }\n\n $COLUMN_NAME = defined($CONST_NAME) ? constant($CONST_NAME) : $CONST_NAME;\n $this->setCellContent($i, $this->startHeader, $COLUMN_NAME);\n $this->setFontStyle($i, $this->startHeader, true, 11, \"000000\");\n $this->setFullStyle($i, $this->startHeader, \"DFE3E8\");\n $this->setCellStyle($i, $this->startHeader, $colWidth, 40);\n\n $i++;\n }\n }", "title": "" }, { "docid": "34caa5f56c832fd495cee1454bea0bc5", "score": "0.5198676", "text": "public function setTable(string $table)\n\t{\n\t\t$this->table=$table; \n\t\t$this->keyModified['table'] = 1; \n\n\t}", "title": "" }, { "docid": "16168f66a1df2a31b8f94b5279e6bc0f", "score": "0.5194664", "text": "public function setCols($criteria, $tableKey, $textKeys)\n {\n\n $colSql = '';\n\n if ($textKeys) {\n $colSql = implode(\" || ', ' || \", $textKeys).' as dset_text ';\n } else {\n $colSql = \"'{$this->domainNode->label}: ' || {$tableKey}.rowid as dset_text \";\n }\n\n $cols = array\n (\n 'group_users.date_start as date_start',\n 'group_users.date_end as date_end',\n 'role_group.name as \"role_group_name\"',\n \"role_user.name || ' <' ||\n COALESCE\n (\n person.lastname || ', ' || person.firstname,\n person.lastname,\n person.firstname,\n ''\n ) || '>' as full_name\",\n \"role_user.rowid as user_id\",\n \"{$tableKey}.rowid as dset_id\",\n $colSql\n );\n\n $criteria->select($cols, true);\n\n // check if there is a given order\n $criteria->orderBy(array(\n 'dset_text',\n 'full_name',\n 'role_group.name',\n ));\n\n $this->structure = array(\n 'dset_text' => array($this->domainNode->label, 'text', 40),\n 'full_name' => array('User', 'text', 40),\n 'role_group_name' => array('Group', 'text', 40),\n 'date_start' => array('Start', 'date', 10),\n 'date_end' => array('End', 'date', 10),\n );\n\n }", "title": "" }, { "docid": "8d5fb1da4d97ef4e4ded73d8b263062b", "score": "0.51938784", "text": "public function setColumns($columns)\n {\n $this->columns = $columns;\n }", "title": "" }, { "docid": "9e3a66c4aef5b515e89035b77e209d73", "score": "0.5190938", "text": "function SetColumnHeader(&$heads)\n {\n $this->_column_heads = $heads;\n }", "title": "" }, { "docid": "261b2c2bd1d401adb09d29ecab276dff", "score": "0.5188712", "text": "public function sqlTable($sql_table){\r\n\t\t\r\n\t\t$sel = substr($sql_table,0,6);\r\n\t\t// check for the keyword \"select\"\r\n\t\t(stristr($sel,'SELECT')) ? $this->sql = $sql_table : $this->table = $sql_table;\r\n }", "title": "" }, { "docid": "67aacdfc058de050893edbc3eb0d2d45", "score": "0.51782805", "text": "public function setColumns($cols)\n {\n parent::setAttr(\"cols\", $cols);\n }", "title": "" }, { "docid": "6017b366c13c7129cd9b95c7acb03269", "score": "0.51699644", "text": "protected function _prepareColumns()\n {\n $this->addColumn(\n 'in_pages',\n [\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_pages',\n 'inline_css' => 'checkbox entities',\n 'field_name' => 'in_pages',\n 'values' => $this->getSelectedPages(),\n 'align' => 'center',\n 'index' => 'page_id',\n 'use_index' => true\n ]\n );\n\n $this->addColumn(\n 'page_id',\n [\n 'header' => __('ID'),\n 'sortable' => true,\n 'index' => 'page_id',\n 'header_css_class' => 'col-id',\n 'column_css_class' => 'col-id'\n ]\n );\n\n $this->addColumn(\n 'chooser_identifier',\n [\n 'header' => __('Identifier'),\n 'name' => 'chooser_identifier',\n 'index' => 'identifier',\n 'header_css_class' => 'col-identifier',\n 'column_css_class' => 'col-identifier'\n ]\n );\n\n $this->addColumn(\n 'chooser_title',\n [\n 'header' => __('Title'),\n 'name' => 'chooser_title',\n 'index' => 'title',\n 'header_css_class' => 'col-title',\n 'column_css_class' => 'col-title'\n ]\n );\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "925bd7e7bfe8c483ac33fc02e64d538d", "score": "0.51651853", "text": "public function change()\n {\n $opt = [\n 'default' => '',\n 'null' => true,\n 'limit' => 8, \n ];\n\n $table_list = [\n 'users',\n 'temp_users',\n 'profile_data',\n 'document_versions',\n ];\n foreach( $table_list as $i => $table_name ){\n $this->table( $table_name )\n ->changeColumn('language', 'string', $opt )\n ->update();\n }\n\n $this->table('names')\n ->changeColumn('preset', 'string', $opt )\n ->update();\n }", "title": "" }, { "docid": "e3f69ade21dfd5abba787e17bbc650f1", "score": "0.516398", "text": "function usetAll ()\n\t{\n\t\t$this->_selection = array () ;\n\t\t\n\t\t$this->_length = 0 ;\n\n\t\t$this->_idx = 0 ;\n\n\t\treturn $this ;\n\t}", "title": "" }, { "docid": "bc6dd8fd602e9978b4d75e158b9fadbe", "score": "0.51616424", "text": "public function setTable(string $table): void\n\t{\n\t\t$this->table = $table;\n\t}", "title": "" }, { "docid": "710ba8b361e562b56e52d573dfc1ad3c", "score": "0.5144471", "text": "public function setTableDefinition( )\n {\n /* Add UID column. */\n $column = $this->getOption('column', 'uid');\n $length = $this->getOption('length', '40');\n $this->hasColumn($column, 'string', $length);\n\n /* Add index if directed to do so. */\n if( $this->_options['index']['enabled'] )\n {\n /* Pick a name for this index. */\n $index = $this->_options['index']['name'];\n if( $index == '' )\n {\n $index = $this->getTable()->getTableName() . '_autouid';\n }\n\n /* Add field and set uniqueness. */\n $opts = array('fields' => array($column));\n if( $this->_options['index']['unique'] )\n {\n $opts['type'] = 'unique';\n }\n\n $this->index($index, $opts);\n }\n\n /* Install the magic maker. */\n /** @noinspection PhpParamsInspection */\n $this->addListener(new AutoUidListener($this->getOptions()));\n }", "title": "" }, { "docid": "8337140135d554b8fdc1b0dea423ece2", "score": "0.51265967", "text": "public function setTableAutoColumns($value) {\n $this->stack [$this->index]->setTableAutoColumns($value);\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "cf9963d9176b8d3099af80d87ca0be67", "score": "0.0", "text": "public function index(Request $request, Builder $htmlBuilder)\n {\n if ($request->ajax()) {\n $authors = Author::select(['id', 'name','tanggal_lahir','pendidikan','pekerjaan']);\n return Datatables::of($authors)\n ->addColumn('action', function($author){\n return view('datatable.action', [\n 'model'=> $author,\n 'form_url'=> route('authors.destroy', $author->id),\n 'edit_url' => route('authors.edit', $author->id),\n 'confirm_message' => 'Yakin mau menghapus ' . $author->name . '?'\n ]);\n })->make(true);\n }\n $html = $htmlBuilder\n ->addColumn(['data' => 'name', 'name'=>'name', 'title'=>'Nama'])\n ->addColumn(['data' => 'tanggal_lahir', 'name'=>'tanggal_lahir', 'title'=>'Tanggal Lahir'])\n ->addColumn(['data' => 'pendidikan', 'name'=>'pendidikan', 'title'=>'Pendidikan'])\n ->addColumn(['data' => 'pekerjaan', 'name'=>'pekerjaan', 'title'=>'Pekerjaan'])\n ->addColumn(['data' => 'action', 'name'=>'action', 'title'=>'', 'orderable'=>false, '\\\n searchable'=>false]);\n return view('authors.index')->with(compact('html'));\n }", "title": "" } ]
[ { "docid": "a2c82e645f33199ca3af4df01daa0da0", "score": "0.7345847", "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.7216281", "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.71584034", "text": "public function listAction()\n {\n $this->processList();\n }", "title": "" }, { "docid": "e5d3acc1f5204195de85b93044bfcb61", "score": "0.714968", "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.7130196", "text": "public function index() {\n return view('admin.resources.index', [\n 'resources' => Resource::paginate(10)\n ]);\n }", "title": "" }, { "docid": "174c016a6d20963698d0780d8861782d", "score": "0.71018636", "text": "function showListPage() {\n\t\t$this->setCacheLevelNone();\n\n\t\t$this->render($this->getTpl('list'));\n\t}", "title": "" }, { "docid": "598d9caa73e88220c1d2180531a736f9", "score": "0.7094195", "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.7083491", "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.705319", "text": "public function index()\n {\n return TodoListResource::collection($this->listRepository->list());\n }", "title": "" }, { "docid": "fbd940db6024ed547d75a84196b6efcc", "score": "0.70112765", "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.6980453", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::all());\n }", "title": "" }, { "docid": "937d8c67ef1e241cc6f04440a03a35d5", "score": "0.6966549", "text": "public function listing(){\n return view('interface/listing');\n }", "title": "" }, { "docid": "43a3797d462201f8486a324b4e596f68", "score": "0.6950168", "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.69414216", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStageArtist:list.html.twig');\n }", "title": "" }, { "docid": "161606f4dde01f5513c0d576501b3cb7", "score": "0.69051754", "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.68990475", "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.6897745", "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.68910974", "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.68750435", "text": "public function listAction() {\n\n\t\t}", "title": "" }, { "docid": "e908ab42fc450a9a0594cc9564f4eeb9", "score": "0.68624306", "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.685542", "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.6850214", "text": "public function listAction()\n {\n $this->forward('index');\n }", "title": "" }, { "docid": "d6111f19a7aca7d26ffbe0986ebf3edd", "score": "0.68399847", "text": "public function indexAction()\n {\n $this->listAction();\n }", "title": "" }, { "docid": "88277ff9376f997f91e6b5491575d7bb", "score": "0.68352187", "text": "public function index()\n {\n return ShoppingListResource::collection(ShoppingList::paginate(15));\n }", "title": "" }, { "docid": "546b231c03944da42a8e98b848f51fa9", "score": "0.682824", "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.6795487", "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.67901134", "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": "1647b90a06fcd39c33c32b33bf9fa133", "score": "0.6786885", "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": "89d40e37a12f5ea687a94247a2fdb4da", "score": "0.67858726", "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": "487c93a93f48c83d96a649e03fdb104d", "score": "0.677415", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::orderBy('id', 'asc')->paginate());\n }", "title": "" }, { "docid": "6265f2e35f1c819b84733e2d894fc9f3", "score": "0.6765278", "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.67443746", "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.67389554", "text": "public function index()\n {\n $offers = Offer::filter()->paginate();\n\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "e89b2c9176e1e2ba1660cebc077dc45d", "score": "0.6726463", "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.6711897", "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.66966474", "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": "a90256f37c65707c557ad75ce4efde1a", "score": "0.66936135", "text": "public function index()\n {\n return $this->service->getList();\n }", "title": "" }, { "docid": "c28bf83f5ff7f88cca0b895b2e8d3ae8", "score": "0.6692058", "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": "4cc7c30861d929f90a57a50b59a5a1f5", "score": "0.66877764", "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.66868424", "text": "public function list(): Response\n {\n return $this->renderList(\n [],\n ['artist' => 'ASC', 'title' => 'ASC']\n );\n }", "title": "" }, { "docid": "a8ee22092f12cd9a55fa2d36291251f4", "score": "0.6685699", "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.66774195", "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.66537195", "text": "public function index()\n {\n $requests = ModelsRequests::paginate();\n\n return ResourcesRequests::collection($requests);\n }", "title": "" }, { "docid": "097ff24f05f0eef21fe921e55bd3b80d", "score": "0.6648661", "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": "f186543d4e229fe60c320d197652a0ac", "score": "0.66485703", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "59475f9f5ef859f09d1ee48e7e27d0ea", "score": "0.6640863", "text": "public function index()\n {\n return $this->showAll(SpeciesResource::collection(Species::get()));\n }", "title": "" }, { "docid": "3e9e7ace6967f2049a9e3a5287aa7bc1", "score": "0.6639373", "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.6638494", "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.66361636", "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": "0ef8e5b1a7ba68c743bcff23cd0cf130", "score": "0.66285247", "text": "public function index()\n {\n return Resource::all();\n }", "title": "" }, { "docid": "317c606a7e54f34736590f60393be790", "score": "0.6628422", "text": "function index()\n\t{\n\t\t$this->items();\n\t}", "title": "" }, { "docid": "fda26526263c4f32a26eb1c3721263e4", "score": "0.66246575", "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.6623645", "text": "public function paginatedListAction() {\n return $this->getList();\n }", "title": "" }, { "docid": "0e1a46d9ea752b3e205c54aab701c4fd", "score": "0.6620047", "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.66195893", "text": "public function index()\n {\n return $this->service->lists();\n }", "title": "" }, { "docid": "bca6e37ce935bd0d2b77093989d408cd", "score": "0.66146135", "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.6603645", "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.6598529", "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.6595079", "text": "public function index()\n {\n return PharmacyResource::collection($this->pharmacyRepoInstance->paginate(self::PER_PAGE, ['id', 'name', 'address']));\n }", "title": "" }, { "docid": "be3ed76ca60da4c3caa2d8528ae5c319", "score": "0.6590606", "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.6583201", "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.65742314", "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.6573946", "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": "6b6ca26ff623891fbb04a6646a0e894c", "score": "0.65684056", "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": "9500e1733deedb51878d2d909f31751a", "score": "0.6566764", "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": "22313e01879ad9cf6aefe5b6cf7eaac2", "score": "0.65659904", "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.65606946", "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.65556854", "text": "public function index()\n {\n $entities = Entity::all();\n\n return view('actions.entity.read', compact('entities'));\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65406024", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "b1c6918b8a647032258b39902afb3198", "score": "0.6532685", "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.65320146", "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": "289c02bb55888cea68db6bb293329f8b", "score": "0.6530896", "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": "b09ff22d2468ad0a34a73b6be1c564e7", "score": "0.6530189", "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": "9541d55e53804985d6027f052d293580", "score": "0.6527978", "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.6527978", "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.65218955", "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.6521452", "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": "3f1eb8293a667a2878f4d80d96280084", "score": "0.6519301", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(25));\n }", "title": "" }, { "docid": "d06d606c40c9d56f52b80f958f43b5ce", "score": "0.6518461", "text": "public function index()\n\t{\n\t\t// will show list of Data\n\t}", "title": "" }, { "docid": "d44d85e06d4eeb7940282586d59ecb10", "score": "0.651312", "text": "public function index()\n {\n return UnitResource::collection(Unit::paginate(5));\n }", "title": "" }, { "docid": "81a94e8c32b6134de5e7342f4235e4ec", "score": "0.65080947", "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.6505484", "text": "public function index()\n {\n $authors = Author::all();\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "1071b7d841a42ebb958087fb23ea72c9", "score": "0.64997417", "text": "public function index()\n {\n //return $this->repository->all();\n return $this->service->showAll();\n }", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.649851", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "1a823c7469d426833399140a05c28243", "score": "0.6495377", "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.64939874", "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.64902115", "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": "ad2789681d764a50f799c66b64e9e3f5", "score": "0.6485477", "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.64854217", "text": "public function index()\n {\n $cust = Customers::paginate(20);\n return CustomersResource::collection($cust);\n }", "title": "" }, { "docid": "7029a5ba2d86ddb638223bf9a830e61a", "score": "0.64850414", "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": "fc608464ab00efa2883cbaa1ca108cd1", "score": "0.6482003", "text": "public function index()\n {\n return $this->collection($this->repository->all());\n }", "title": "" }, { "docid": "c22119f1d6e05e764e700b1cf1e15c3a", "score": "0.64818084", "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.6478664", "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.64783806", "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.6476836", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c1799a28a7e3f24be756df7e3d5ed18d", "score": "0.6475801", "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.6473541", "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": "85336711eddcf6c317cce3da86408817", "score": "0.64704394", "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": "b9a94eb6086245c9e4f089dc9aede055", "score": "0.6469862", "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": "" }, { "docid": "b6d79dbbd4bd8f24a2ee993dec416fde", "score": "0.6468302", "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": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64670485", "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": "" } ]
45f7347ee033d7ece220a208ff9e91cb
Removes all the instances by the specified person id
[ { "docid": "c0087659f50ded1c59c642bf81ac16f1", "score": "0.78282225", "text": "public function removeAllByPersonId(int $id)\n {\n DB::table('film_person')->where('person_id', $id)->delete();\n }", "title": "" } ]
[ { "docid": "e4e4a6d114f5fc6e0a6314e7ef8ae3b0", "score": "0.68412024", "text": "public function destroy($id)\n {\n $p= Persona::find($id);\n $p->delete();\n }", "title": "" }, { "docid": "163fb9c644c6192753dfd589327d03e8", "score": "0.68328524", "text": "public function destroy($id)\n {\n //\n $persona = Persona::find($id);\n $persona->delete();\n }", "title": "" }, { "docid": "0f3f43d6ffea089a3b78425f835dd048", "score": "0.67785466", "text": "public function destroy($id) {\n $data = Persona::findOrFail($id);\n $data->delete();\n }", "title": "" }, { "docid": "f3d16aac99b75e6ccb9d32cf9af82050", "score": "0.67699075", "text": "public function destroy($id)\n {\n $d=Persona::find($id);\n $d->delete($id);\n }", "title": "" }, { "docid": "1124e0812734d69f7a5e71725822963b", "score": "0.6676382", "text": "public function destroy($id)\n {\n //\n return Person::find($id)->delete();\n }", "title": "" }, { "docid": "35b5c21e5fcfa4387f76e9ada4ffb8fd", "score": "0.64825004", "text": "public function destroy($id)\n {\n $clien = Persona::findOrFail($id);\n $clien->delete();\n //\n }", "title": "" }, { "docid": "26ffe73c7c2f2472d3d65e2cc48ec4e5", "score": "0.646133", "text": "public function destroy($id){\n\n $persona = \\Afocat\\Persona::find($id);\n $persona->delete();\n return 1;\n }", "title": "" }, { "docid": "4453b2dc04cc665ef76797ac002cb8c3", "score": "0.63849837", "text": "public function destroy(int $id)\n {\n \t/**\n \t * \n \t * @var \\App\\Person $model\n \t */\n \t$model = Person::find($id);\n \t$imagesAttached= $model->Images()->allRelatedIds();\n \t$model->Images()->detach($imagesAttached);\n \tImage::destroy($imagesAttached);\n \t$model->Heroes()->detach($model->Heroes()->allRelatedIds());\n \tPerson::destroy($id);\n return redirect()->route('person.index');\n \n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6319624", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6319624", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.6319624", "text": "public function remove($id);", "title": "" }, { "docid": "bdd01e84f04349c2fb793835286c238c", "score": "0.6302375", "text": "public function removeOnID($id)\n {\n }", "title": "" }, { "docid": "67c9891d624c329ebd68222df032f59a", "score": "0.62795365", "text": "public function destroy($id)\n {\n $persona = $this->find($id);\n $persona->delete();\n Cache::flush();\n return $persona;\n }", "title": "" }, { "docid": "db7340a21804508149e8e1e4ed330e2b", "score": "0.6248554", "text": "public function destroy(People $people)\n {\n //\n }", "title": "" }, { "docid": "db7340a21804508149e8e1e4ed330e2b", "score": "0.6248554", "text": "public function destroy(People $people)\n {\n //\n }", "title": "" }, { "docid": "e127c043222b85a9c1afb8538897e845", "score": "0.61909765", "text": "public function deletePeople($id)\n\t{\n try\n {\n $people = People::find($id);\n\n if ($people)\n $people->delete();\n else\n return $this->respHandler->requestError('People not found.');\n\n return $this->respHandler->success('People has been deleted.');\n }\n catch(\\Exception $e)\n {\n return $this->respHandler->requestError($e->getMessage());\n }\n\t}", "title": "" }, { "docid": "c4775375eb1ab00f97cdf87c1022a466", "score": "0.6190391", "text": "public static function removeFromCache($idPerson) {\n\t\t$idPerson\t\t= intval($idPerson);\n\n\t\tTodoyuRecordManager::removeRecordCache('TodoyuContactPerson', $idPerson);\n\t\tTodoyuRecordManager::removeRecordQueryCache(self::TABLE, $idPerson);\n\t}", "title": "" }, { "docid": "9323bd78a7aab034d20d70654f6edf1f", "score": "0.6174315", "text": "public function destroy(Request $request, $id) {\n $person = Person::where('user_id',Auth::user()->id)\n ->delete();\n }", "title": "" }, { "docid": "871902189f7b05b13baddbab324c8b6c", "score": "0.61160505", "text": "public function destroy(Person $person)\n {\n //\n }", "title": "" }, { "docid": "871902189f7b05b13baddbab324c8b6c", "score": "0.61160505", "text": "public function destroy(Person $person)\n {\n //\n }", "title": "" }, { "docid": "871902189f7b05b13baddbab324c8b6c", "score": "0.61160505", "text": "public function destroy(Person $person)\n {\n //\n }", "title": "" }, { "docid": "6a614f17e99dd1b4b416bd24d0d3387a", "score": "0.6104536", "text": "function delete_person($id)\n {\n $response = $this->db->delete('person',array('id'=>$id));\n if($response)\n {\n return \"person deleted successfully\";\n }\n else\n {\n return \"Error occuring while deleting person\";\n }\n }", "title": "" }, { "docid": "695f4fa1b402a40e4a0400c8f65adb23", "score": "0.6038279", "text": "public function destroy($id)\n {\n $this->person->find($id)->delete();\n return back();\n }", "title": "" }, { "docid": "881af78716634eb0839810d497c1c22c", "score": "0.60372335", "text": "public function destroy($id)\n {\n $people = people::find($id);\n \n Cache::forget('people'.'-'.$people->slug);\n people::destroy($id);\n\n session()->flash('bg', 'danger');\n session()->flash('name', $people->name);\n session()->flash('msg', 'Se elimino');\n \n return redirect('personas')->with('status',true);\n \n }", "title": "" }, { "docid": "d7c8923544bfb437980f5f4d77fdedd4", "score": "0.60287625", "text": "public function remove($id) {\n }", "title": "" }, { "docid": "19ca43e6487e9ad07599c96166e86eb8", "score": "0.6012784", "text": "public function del($id)\n {\n // $res = DB::table('user')->where('p_id',$id)->delete();\n $res = People::destroy($id);\n if($res){\n \treturn redirect('/user');\n }\n }", "title": "" }, { "docid": "44f40efa2f5b5a61f22f7618274bfbc7", "score": "0.60098296", "text": "public function remove($id = null);", "title": "" }, { "docid": "0d9bada83e28dd6b15b5e586b5b137a6", "score": "0.5972186", "text": "public function delete($person_id) {\n\n $user['user_deleted'] = 'si';\n $this->db->where('person_id', $person_id);\n $this->db->trans_begin();\n $this->db->update(self::TABLE_NAME, $user);\n $logs = new Logs ( );\n $mywhere = 'where person_id = ' . $person_id;\n $myquery = $logs->sqldelete(self::TABLE_NAME, $mywhere);\n $logs->write(self::TABLE_NAME, 'DELETE', $myquery);\n\n if ($this->db->trans_status() === FALSE) {\n $this->db->trans_rollback();\n } else {\n $this->db->trans_commit();\n }\n }", "title": "" }, { "docid": "2c279d4c05dc76912bfbd2e881a2c8af", "score": "0.59706414", "text": "public function destroy($id)\n {\n $res=DB::table('people')->where('p_id',$id)->delete();\n if($res){\n return redirect('/people');\n }\n }", "title": "" }, { "docid": "382fc674e09ee86e4d7d8b3966fbabb2", "score": "0.5962834", "text": "public function remove( $id)\n {\n //\n }", "title": "" }, { "docid": "3ddfbb7a8688376d7e535054356fd6f8", "score": "0.59598917", "text": "function delete($people_id)\r\n\t{\r\n\t\treturn true;; \r\n\t}", "title": "" }, { "docid": "f93d6c05651b9e0e8a6ec6255db8f3d7", "score": "0.5957224", "text": "function removePerson($conn) {\n\t\t// Gets the user's ID received from the admin factory.\n\t\t$id = $_REQUEST['id'];\n\n\t\t$query = \"DELETE FROM person WHERE id='$id'\";\n\t\t$result = $conn->query($query);\n\t \n\t\techo true;\n\t}", "title": "" }, { "docid": "0d36d0bf060ac9b081a66b3443d34787", "score": "0.59375495", "text": "public function destroy($id){}", "title": "" }, { "docid": "0d36d0bf060ac9b081a66b3443d34787", "score": "0.59375495", "text": "public function destroy($id){}", "title": "" }, { "docid": "0d36d0bf060ac9b081a66b3443d34787", "score": "0.59375495", "text": "public function destroy($id){}", "title": "" }, { "docid": "da63fd4d114d944046a92c52c79897a3", "score": "0.5933142", "text": "public function destroy($id)\n\t{\n\t\t$user = Person::find($id);\n\t\tif(!is_null($user)) {\n\t\t\t$user->delete();\n\t\t\tSession::flash('message', 'Utente eliminato');\n\t\t\treturn Redirect::to('persons');\n\t\t} else {\n\t\t\treturn Redirect::to('persons');\n\t\t}\n\t}", "title": "" }, { "docid": "d198810d98d4d948baa018e74b3a0581", "score": "0.5933029", "text": "public function destroy($id)\n {\n $persona=Persona::findOrFail($id);\n //Persona::destroy($id);\n $persona->delete(); \n return redirect('');\n }", "title": "" }, { "docid": "2b33718af8bc2a0bdeb07d037f7f8a01", "score": "0.59275925", "text": "public static function remove($id)\n {\n $db = Zend_Registry::get('dbAdapter');\n $db->delete('salespersons', 'salespersons.id = ' . $id);\n }", "title": "" }, { "docid": "c6fc0d0a5fdd565c0d08f52dd22d26a1", "score": "0.5906343", "text": "public function delete_person($personID)\n {\n //delete users associated with personID\n $query = \"DELETE FROM SJPARTRI.USERS WHERE PERSON_ID = $personID\";\n $sensor = oci_parse ($this->con, $query);\n oci_execute($sensor);\n \n //delete person\n $query = \"DELETE FROM SJPARTRI.PERSONS WHERE PERSON_ID = $personID\";\n $sensor = oci_parse ($this->con, $query);\n oci_execute($sensor); \n }", "title": "" }, { "docid": "544c5c84f0eb55bc90418a46b5420df6", "score": "0.5905944", "text": "public static function deletePerson($idPerson) {\n\t\t$idPerson\t= intval($idPerson);\n\n\t\t$data\t= array(\n\t\t\t'deleted'\t=> 1\n\t\t);\n\n\t\tself::updatePerson($idPerson, $data);\n\n\t\tTodoyuHookManager::callHook('contact', 'person.delete', array($idPerson));\n\t}", "title": "" }, { "docid": "c1ada6c3b690b42ca7e35e1b03258424", "score": "0.5905203", "text": "public function destroy($id)\n {\n $member = Member::find($id);\n $member->delete();\n }", "title": "" }, { "docid": "a5dc4cfef4c9214a482ad291b6ae2cc8", "score": "0.59010977", "text": "public function remove_members($id){\t\n\t\t$this->loadModel('TskRoaRewardMember');\n\t\t$this->TskRoaRewardMember->deleteAll(array('tsk_applause_reward_id' => $id), false);\n\t}", "title": "" }, { "docid": "9cff5c26463fba80c08ae861d2b6977e", "score": "0.5897019", "text": "public function deleteById($id)\n {\n $this->instanciate()->where($this->instance->getKeyName(), '=', $id)->delete();\n }", "title": "" }, { "docid": "f7d6c8a707b3c0a6ce2e0426d3cad733", "score": "0.5879324", "text": "public function remove($id)\n {\n\n }", "title": "" }, { "docid": "11f378bb3015aa31146475e7777a4128", "score": "0.5860103", "text": "public function destroy($id)\n {\n \t//se busca al servicio que se quiere eliminar\n $servicio = servicios::find($id);\n $servicio->delete();\n }", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "17a48899f0113743f59ab84e5fdeb73b", "score": "0.5835258", "text": "public function destroy($id);", "title": "" }, { "docid": "7b36b226775f1ef6763a6f7b31edf6a3", "score": "0.58339787", "text": "public function destroy( $id );", "title": "" }, { "docid": "00e917c3c24b711d36e86c2187effbed", "score": "0.5824325", "text": "public function destroy($id)\n {\n $person = $this->repository->find($id);\n if(!$person){\n return redirect()->back();\n }\n\n $person->delete();\n\n return redirect()->route('people.index');\n }", "title": "" }, { "docid": "e79ffaf61349f24993a98cba86f2bb49", "score": "0.5813618", "text": "public function destroy($id)\n {\n $massive = Massive::where('id', $id)->first();\n\n if($massive->user_id == Auth::id()){\n $massive->delete();\n }\n }", "title": "" }, { "docid": "14a750254b8d367d9ed64a8539aede36", "score": "0.58040726", "text": "function deletePers($id){\r\n\t\tif ($id != NULL){\r\n\t\t\t$this->connect(); //verbinden\r\n\t\t\tif(!$this->con->connect_errno) {\r\n\t\t\t\t$sql= \"DELETE FROM person WHERE id='$id'\" ;\r\n\t\t\t\t$result = $this->con->query($sql);\t\t\t\t\r\n\t\t\t\t\tif (!$result) {\r\n\t\t\t\t\t printf(\"</br>Errormessage: %s\\n\", $this->con->error);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->close();\r\n\t\t\t\t\treturn ($result);\r\n\t\t\t}\r\n\t\t} else throw new Exception ('Keine Person ausgewaelt!');\r\n\t}", "title": "" }, { "docid": "0d5163ea39436987a52313f61d2c7cfe", "score": "0.5799352", "text": "public function destroy($id)\n { $recomendacionesall =Recomendacion::find($id);\n $recomendacionesall->delete();\n }", "title": "" }, { "docid": "0811ed8f00effaf99833b1048e7e554d", "score": "0.57958066", "text": "public function deleteRecord() {\n Database::prepare(\n \"DELETE FROM tt_persons WHERE id = ?\",\n array($this->id)\n );\n $this->displayListScreen();\n }", "title": "" }, { "docid": "d75827a208daf5232ea1241d468a43d8", "score": "0.5789921", "text": "public function destroy($id) {\n\n // detach all employees that are part of this team\n \\DB::table('teams_have_employees')\n ->where('teamId', '=', $id)\n ->delete();\n\n Team::destroy($id);\n }", "title": "" }, { "docid": "8f6a85cffc0af5a2e5d3ec3d8ccc077b", "score": "0.5789828", "text": "public function destroy($id)\n {\n $res = Person::where('id',$id)->delete();\n if ($res){\n VotePerson::where('user_id',$id)->delete();\n flash('投票删除成功','success');\n }else{\n flash('投票删除失败','error');\n }\n return redirect('admin/vote');\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.57739246", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.57739246", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.57739246", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.57739246", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "0fc8b1431d0f2a3f631e2b7df2c5cf0c", "score": "0.57739246", "text": "protected function eliminar($id)\n {\n }", "title": "" }, { "docid": "34287a39a5faba369b246f8f79b602df", "score": "0.5768899", "text": "function delete_instance ($user_id, $id) {\n global $sql;\n return $sql->sql_delete('kodi', ['user_id' => $user_id, 'id' => $id]);\n }", "title": "" }, { "docid": "79ee293dfe7e4324889ca7c42a0d24b6", "score": "0.57426715", "text": "public function destroy( $id )\n {\n //middleware\n\n Person::destroy( $id );\n\n return $id;\n }", "title": "" }, { "docid": "875591b791b7b6935b3d51c8cb8a728e", "score": "0.5740765", "text": "public function destroy($id){\n //\n }", "title": "" }, { "docid": "36d89e6ec724409bbcf3f32d90ade4f0", "score": "0.5730742", "text": "public function destroy($id) {\n \n //\n \n }", "title": "" }, { "docid": "36d89e6ec724409bbcf3f32d90ade4f0", "score": "0.5730742", "text": "public function destroy($id) {\n \n //\n \n }", "title": "" }, { "docid": "ee24b5d17c230240002c1d75054e8053", "score": "0.5730649", "text": "public function remove (){\n extract( $this->kernel->params );\n\n if( $this->row = $this->getOne( $id ) )\n $this->kernel->db->query(\"DELETE FROM {$this->table} WHERE id = '$id'\");\n\n }", "title": "" }, { "docid": "e5970b7b44135115ab44f1eb6206b7f7", "score": "0.5727319", "text": "public function destroy($id) {\n\n Festival::find($id)->Person()->detach();\n Festival::find($id)->Guest()->detach();\n Festival::find($id)->Performer()->detach();\n Festival::find($id)->Association()->detach();\n Festival::find($id)->User()->detach();\n\n\n $festival = Festival::find($id);\n $f = Festival::where('id', $id)->delete();\n\n\n $response = [];\n $response[\"name\"] = $festival->name;\n if ($f->trashed()) {\n $statusCode = 200;\n $response['result'] = \"deleted\";\n } else {\n $statusCode = 422;\n $response['result'] = \"Cannot delete.\";\n }\n return Response::json($response, $statusCode);\n }", "title": "" }, { "docid": "d934b2bcec36bd695a249a6ace8e0eb9", "score": "0.5727215", "text": "public function destroy($id) {\r\n //\r\n }", "title": "" }, { "docid": "d934b2bcec36bd695a249a6ace8e0eb9", "score": "0.5727215", "text": "public function destroy($id) {\r\n //\r\n }", "title": "" }, { "docid": "d34c1d725327dcc9b834cef3d8c4c365", "score": "0.5722577", "text": "public function deleteByid($className, $id);", "title": "" }, { "docid": "a0c84254014db9ff8f7ec51c9d4dde52", "score": "0.5713794", "text": "public function remove_members($id){\t\t\n\t\t$this->TskProject->TskProjectMember->deleteAll(array('tsk_projects_id' => $id), false);\n\t}", "title": "" }, { "docid": "090401cdbcbcdfabd7023dbde9e9e462", "score": "0.57110655", "text": "function delete( $id = false )\r\n {\r\n $db =& eZDB::globalDatabase();\r\n $db->begin();\r\n\r\n if ( !$id )\r\n $id = $this->ID;\r\n\r\n if ( isSet( $id ) && is_numeric( $id ) )\r\n {\r\n // Delete project state\r\n eZPerson::setProjectState( false, $id );\r\n\r\n // Delete real world addresses\r\n\r\n $db->array_query( $address_array, \"SELECT eZContact_PersonAddressDict.AddressID AS 'DID'\r\n FROM eZAddress_Address, eZContact_PersonAddressDict\r\n WHERE eZAddress_Address.ID=eZContact_PersonAddressDict.AddressID\r\n AND eZContact_PersonAddressDict.PersonID='$id' \" );\r\n\r\n foreach ( $address_array as $addressItem )\r\n {\r\n $addressDictID = $addressItem[ $db->fieldName( \"DID\" ) ];\r\n $res[] = $db->query( \"DELETE FROM eZAddress_Address WHERE ID='$addressDictID'\" );\r\n }\r\n $res[] = $db->query( \"DELETE FROM eZContact_PersonAddressDict WHERE PersonID='$id'\" );\r\n\r\n // Delete phone numbers.\r\n\r\n $db->array_query( $phone_array, \"SELECT eZContact_PersonPhoneDict.PhoneID AS 'DID'\r\n FROM eZAddress_Phone, eZContact_PersonPhoneDict\r\n WHERE eZAddress_Phone.ID=eZContact_PersonPhoneDict.PhoneID\r\n AND eZContact_PersonPhoneDict.PersonID='$id' \" );\r\n\r\n foreach ( $phone_array as $phoneItem )\r\n {\r\n $phoneDictID = $phoneItem[\"DID\"];\r\n $res[] = $db->query( \"DELETE FROM eZAddress_Phone WHERE ID='$phoneDictID'\" );\r\n }\r\n $res[] = $db->query( \"DELETE FROM eZContact_PersonPhoneDict WHERE PersonID='$id'\" );\r\n\r\n // Delete online address.\r\n\r\n $db->array_query( $online_array, \"SELECT eZContact_PersonOnlineDict.OnlineID AS 'DID'\r\n FROM eZAddress_Online, eZContact_PersonOnlineDict\r\n WHERE eZAddress_Online.ID=eZContact_PersonOnlineDict.OnlineID\r\n AND eZContact_PersonOnlineDict.PersonID='$id' \" );\r\n\r\n foreach ( $online_array as $onlineItem )\r\n {\r\n $onlineDictID = $onlineItem[ $db->fieldName( \"DID\" ) ];\r\n $res[] = $db->query( \"DELETE FROM eZAddress_Online WHERE ID='$onlineDictID'\" );\r\n }\r\n $res[] = $db->query( \"DELETE FROM eZContact_PersonOnlineDict WHERE PersonID='$id'\" );\r\n $res[] = $db->query( \"DELETE FROM eZContact_CompanyPersonDict WHERE PersonID='$id'\" );\r\n $res[] = $db->query( \"DELETE FROM eZContact_Person WHERE ID='$id'\" );\r\n $res[] = $db->query( \"DELETE FROM eZContact_PersonIndex WHERE PersonID='$id'\" );\r\n $db->array_query( $res_array, \"SELECT ID FROM eZTrade_Order WHERE PersonID='$id'\" );\r\n include_once( \"eztrade/classes/ezorder.php\" );\r\n foreach ( $res_array as $order )\r\n {\r\n $orderObject = new eZOrder( $order[$db->fieldName( \"ID\" )] );\r\n $orderObject->delete();\r\n }\r\n }\r\n eZDB::finish( $res, $db );\r\n return true;\r\n }", "title": "" }, { "docid": "76554b2e3b66d802194bf9062d163eb8", "score": "0.5710786", "text": "public function destroy($id)\n {\n Userss::where(\"id\",'=',$id)->delete();\n }", "title": "" }, { "docid": "c14b54d412893df0fd8d17bdc242d57f", "score": "0.57098913", "text": "public function destroy($id)\n {\n Empleados::where(\"id\", $id)->delete();\n }", "title": "" }, { "docid": "621b96766c968b0f548e77028ad3774b", "score": "0.5704322", "text": "public function destroy($id) {\n \n $healths = Health::find($id);\n\n $health_pics = DB::table('health_pic')->get()->where('health_id',$id);\n\n foreach ($health_pics as $health_pic) {\n\n File::delete(public_path() . '/images/resize/' .$health_pic->health_pic_file);\n }\n \n $healths->delete();\n return back();\n\n // Health::find($id)->delete();\n // return back();\n // Health::destroy($id);\n // return back();\n }", "title": "" }, { "docid": "767929a9df32efbc1471b7c0548c4ec2", "score": "0.5702235", "text": "public function delete($id): void;", "title": "" }, { "docid": "c6d94b8339052603b68dc86df5a71e2d", "score": "0.56993294", "text": "public function excluir($id);", "title": "" }, { "docid": "30b66d78cbec4544e90ad1104e3a5e20", "score": "0.5696959", "text": "protected function eliminar($id)\n { }", "title": "" }, { "docid": "8eadc50213c8a73d39a48404d489559f", "score": "0.5693599", "text": "public function forceRemoveAllParticipant()\n {\n $this->participants()->forceDelete();\n }", "title": "" }, { "docid": "8b0799647f0d4961f190109ad3f6328a", "score": "0.5690519", "text": "public function destroy($id)\n\t{\n\t\t$company = Company::find($id);\n foreach($company->employee as $value){\n $value->delete();\n }foreach($company->orders as $value){\n $value->delete();\n }\n $company->delete();\n\t}", "title": "" }, { "docid": "17db0617514c6d6fd3e65d583b79955f", "score": "0.5690368", "text": "public function destroy($id)\n {\n $reservation = Reservation::find($id);\n $reservation->delete();\n $room = Room::find($id);\n $room->delete();\n $event = Event::find($id);\n $event->delete();\n echo \"ceci a bien etais suprimé\";\n }", "title": "" }, { "docid": "6aa8e93fe1908ff3b312fb7e1b7c71fc", "score": "0.569004", "text": "public function destroy($id)\n {\n $instance = Instance::find($id);\n InstanceService::where('instance_id','=',$instance->id)->delete();\n $instance_images = InstanceImage::where('instance_id','=',$instance->id)->get();\n $path = public_path().'/providers/cases/'.$instance->id.'/';\n File::deleteDirectory($path);\n InstanceImage::where('instance_id','=',$instance->id)->delete();\n $instance->delete();\n return redirect()->route('cases.index');\n }", "title": "" }, { "docid": "38e2dcf367639e73a6c6efb319dd2fea", "score": "0.5689796", "text": "function delete($person_id)\n\t{\n\t\treturn true;; \n\t}", "title": "" }, { "docid": "e34c8c564f6ac08935ff175ba8ea4d75", "score": "0.568484", "text": "public function destroy($id)\n {\n $famousPeople = FamousPeople::findOrFail($id);\n //delete image\n if (!empty($famousPeople->image) && File::exists(public_path(config('constants.UPLOAD.FAMOUS_PEOPLE_IMAGE')) . '/' . $famousPeople->image)) {\n unlink(public_path(config('constants.UPLOAD.FAMOUS_PEOPLE_IMAGE')) . '/' . $famousPeople->image);\n }\n $famousPeople->delete();\n\n Session::flash('flash_message', __('admin.famous_people.flash_messages.destroy'));\n\n return redirect(\"admin/famous-people\");\n }", "title": "" }, { "docid": "aa169ab4fcc33eedb3f26baa493f286c", "score": "0.568041", "text": "public function destroy($id, AwbContactPerson $person)\n {\n //\n $person=$person->find($id);\n if ($person->delete()) flash()->success(trans('admin/common.deleteFlashTitle'), trans('admin/common.deleteSuccessText'));\n else flash()->error(trans('admin/common.deleteFlashTitle'), trans('admin/common.deleteErrorText')); \n return redirect(route('admin-awb-contact-people.index'));\n }", "title": "" }, { "docid": "a1cd486a2ab80ce3d19fa5871fb3de87", "score": "0.5678332", "text": "public function destroy( $id ) {\n $employee = Employee::where( 'id', $id )->first();\n $photo = $employee->photo;\n\n if ( $photo ) {\n $photo_url = $photo;\n $part = explode( '/', $photo_url );\n $slicedArr = array_slice( $part, 3 );\n $photoStr = implode( '/', $slicedArr );\n unlink( $photoStr );\n Employee::where( 'id', $id )->delete();\n } else {\n Employee::where( 'id', $id )->delete();\n }\n }", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.567795", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.567795", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.567795", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.567795", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.567795", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.567795", "text": "public function deleteById($id);", "title": "" }, { "docid": "a67dec9e7ef6fd04bad17fdbdfeb0983", "score": "0.567795", "text": "public function deleteById($id);", "title": "" } ]
3be07e23d54ce5693c12b12992ecc36d
Creates a new visitor without any previous visit information.
[ { "docid": "4382e361321cd4583dc1ef22f4377f62", "score": "0.48655286", "text": "public function __construct() {\n\t\t$this->setFirstVisitTime(new DateTime());\n\t\t$this->setPreviousVisitTime(new DateTime());\n\t\t\n\t\t$this->setVisitCount(1);\n\t}", "title": "" } ]
[ { "docid": "6a71272df29c5069c665b419813f2631", "score": "0.6516087", "text": "protected function getNewVisitObject()\n\t{\n\t\treturn new Piwik_LogStats_Generator_Visit($this->db);\n\t}", "title": "" }, { "docid": "dc153decc4ec5e7d2eded0bb9d0e39a9", "score": "0.60000247", "text": "abstract protected function createVisitor(Context $context);", "title": "" }, { "docid": "165f48ad75670c9a1cf4b4e0300e6aa3", "score": "0.5982351", "text": "public function __construct(Visitor $visitor)\n {\n \t$this->visitor = $visitor;\n }", "title": "" }, { "docid": "47fe88e7b19ac0f17a166bb2a346a18e", "score": "0.59250957", "text": "public function getVisitor() {\n\t\t$this->init();\n\t\treturn $this->visitor;\n\t}", "title": "" }, { "docid": "2f8cc0e1a086df0f6f415c1c83c7cb34", "score": "0.5840547", "text": "public static function newVisitor($visitorId = null)\n {\n $instance = self::getInstance();\n return VisitorBuilder::builder($visitorId, $instance->getConfigManager(), $instance->getContainer());\n }", "title": "" }, { "docid": "6172a8c8220f0fa1ef85710ef9979f45", "score": "0.5677135", "text": "abstract public function getVisitor(): VisitorInterface;", "title": "" }, { "docid": "8e858babae1540ae4fa6cad12697356c", "score": "0.53413624", "text": "public function __construct() {\n $this->visitors = array();\n }", "title": "" }, { "docid": "fcf5f09b072834d8fece1a713f5ea00b", "score": "0.5281689", "text": "public function testNewVisitor()\n {\n // test true\n $cookie = rand();\n $this->assertTrue((new WebRequest())->newVisitor($cookie));\n\n // test false\n $webRequest = new WebRequest(5);\n $this->assertFalse((new WebRequest())->newVisitor($webRequest->visitor_cookie));\n }", "title": "" }, { "docid": "c7de519074c8921cf67c886ceb253329", "score": "0.5274187", "text": "private function initVisitor() {\n\t\t// Initialize visitor\n\t\tif ($this->visitor !== null) {\n\t\t\treturn;\n\t\t}\n\n\t\t$persister = $this->getPersister('zpt\\cdt\\model\\Visitor');\n\n\t\t$visitor = null;\n\t\tif (isset($_COOKIE['visitor_id'])) {\n\t\t\t$visitorKey = $_COOKIE['visitor_id'];\n\n\t\t\t$c = new Criteria();\n\t\t\t$c->addEquals('key', $visitorKey);\n\n\t\t\t$visitor = $persister->retrieveOne($c);\n\t\t\tif ($visitor === null) {\n\t\t\t\t// It is possible under certain circumstances to get here.\tAn\n\t\t\t\t// example would be if the visitors table is cleared. Some failure\n\t\t\t\t// cases may also result in a cookie getting out of sync with the\n\t\t\t\t// server.\tIn this case a new visitor ID should be assigned.\n\t\t\t\t$visitor = $this->newVisitor($persister);\n\t\t\t}\n\t\t} else {\n\t\t\t$visitor = $this->newVisitor($persister);\n\t\t}\n\n\t\t$this->visitor = $visitor;\n\n\t}", "title": "" }, { "docid": "5bc80fc29d452a9c6791ecf147685ac4", "score": "0.5256333", "text": "private function newVisitor($persister) {\n\t\t$visitorKey = uniqid('visitor_', true);\n\n\t\t$visitor = new Visitor();\n\t\t$visitor->setKey($visitorKey);\n\t\t$persister->save($visitor);\n\n\t\t$tenYearsFromNow = time() + 315569260;\n\t\t$path = _P('/');\n\t\tsetcookie('visitor_id', $visitorKey, $tenYearsFromNow, $path);\n\n\t\treturn $visitor;\n\t}", "title": "" }, { "docid": "63173e040c175aab60511acc02a3f035", "score": "0.518129", "text": "public function newVisit(Request $request)\n {\n $data = $request->all();\n $vId = $data['visitor_id'];\n if (Visitor::hasSession($vId)) {\n //no need to sign them in,\n //they need to sign out first\n\n return redirect('visitor/visit/out/'.$vId);\n\n } else {\n //no session, so sign them in\n History::create([\n 'visitor_id' => $data['visitor_id'],\n 'p_of_visit' => $data['p_of_visit'],\n 'whom_to_see' => $data['whom_to_see'],\n 'date' => Carbon::now(),\n 'time_in' => Carbon::now(),\n 'time_out' => null,\n 'admin' => auth()->user()->name\n\n ]);\n\n return redirect('/home')->with('message', ['New Visitor Signed In']);\n\n }\n\n\n }", "title": "" }, { "docid": "d62c42b143d371544f3d433e8a3faf4e", "score": "0.5156687", "text": "static function LogVisitor() {\n\t\t\n\t\t$log = new LogSite();\n\t\treturn $log->Create(self::$logVisitorType, self::$logVisitorMessage, self::$logVisitorCreator);\n\t\t\n\t}", "title": "" }, { "docid": "4bc03fb44adfaf642b081dd6ccdabec2", "score": "0.5014523", "text": "function __construct()\n\t{\n\t\t$this->visited = false;\n\t}", "title": "" }, { "docid": "e36214abf0251f9061b60ada88e5ab46", "score": "0.49893832", "text": "public function store(Request $request)\n {\n $visitor = Visitor::create($request->all());\n return $visitor;\n }", "title": "" }, { "docid": "1d7524efc00bb26ba7860c8e555e9cb3", "score": "0.49867606", "text": "public static function logVisitor()\n {\n // stats should be gathered. However, the flag will be mostly absent.\n // Hence the slightly complicated check whether the flag is there and\n // actually set to true\n if (!($nostats ?? false)) {\n $page = rex_getUrl();\n $timestamp = date('Y-m-d H:i:s');\n\n $sql = rex_sql::factory();\n $sql->setTable('naju_visitor_stat');\n\n $stats = ['timestamp' => $timestamp, 'page' => $page];\n\n // check if referer information is present and add it if so\n $referer = rex_server('HTTP_REFERER');\n if ($referer) {\n $stats['referer'] = $referer;\n }\n\n $sql->setValues($stats);\n $sql->insert();\n }\n }", "title": "" }, { "docid": "f37857c33acbc3b0b72de421cd537094", "score": "0.4961038", "text": "public function createExpressionVisitor(): QueryExpressionVisitor\n {\n return new QueryExpressionVisitor(\n $this->compositeExpressions,\n $this->comparisonExpressions,\n $this->entityClassResolver\n );\n }", "title": "" }, { "docid": "f1ec8ff1256ffad9937e11420b644e85", "score": "0.48893824", "text": "public function create(): View\n {\n return view('visitors.create');\n }", "title": "" }, { "docid": "b4f102ade8710d692c2755f001e0ba5c", "score": "0.48815662", "text": "public function __construct( array $visitors = array() )\n {\n foreach ( $visitors as $visitor )\n {\n $this->addVisitor( $visitor );\n }\n }", "title": "" }, { "docid": "b8af74f086160c92b57cb37dc7bfe9cc", "score": "0.4814757", "text": "public function generateVisit(VisitEvent $event)\n {\n $this->logger->debug(\"Registering a new visit for a user\", array (\"event\" => $event));\n\n $visited = $event->getVisited();\n $visitor = $event->getVisitor();\n $filter = $this->createVisitFilter($visited, $visitor);\n\n if ($this->skipVisit($visited, $visitor))\n {\n $this->logger->debug(\"Skipping the visit registration\", array (\"visitor\" => $visitor));\n\n return;\n }\n\n $visitCount = $this->visitManager->countByFilter($filter);\n\n if ($visitCount > 0)\n {\n $this->logger->warning(\"The visitor is trying to spam visits\", array (\"event\" => $event));\n\n return;\n }\n\n $visit = $this->visitManager->create($visitor, $visited);\n\n $this->logger->info(\"Visit registered [{visit}]\", array (\"visit\" => $visit));\n }", "title": "" }, { "docid": "3187f511db603c94783a420bc1e33ac6", "score": "0.47740048", "text": "public function __construct(VisitorDelegate $visitorDelegate)\n {\n $this->visitorDelegate = $visitorDelegate;\n }", "title": "" }, { "docid": "fb9c7d467eaa4dfc2dddc9efd32948c0", "score": "0.47619888", "text": "public static function unspecified()\n {\n return new self(null, null);\n }", "title": "" }, { "docid": "254f58a53dc09666766ed9ceec6b332a", "score": "0.4706108", "text": "public static function ignoreRoutes()\n {\n static::$registersRoutes = false;\n\n return new static();\n }", "title": "" }, { "docid": "de007dc96b0afe8a959423539f651c52", "score": "0.46747977", "text": "public function accept(/*mixed*/ $visitor) /*: mixed*/ {\n if (method_exists($visitor, \"visitAttribute\")) {\n // UNSAFE\n return $visitor->visitAttribute($this);\n }\n // UNSAFE\n return $visitor->visitNode($this);\n }", "title": "" }, { "docid": "e4c0e5ae33ad7b9ff0cdb6a89650c440", "score": "0.4663128", "text": "public function accept(/*mixed*/ $visitor) /*: mixed*/ {\n if (method_exists($visitor, \"visitUnaryOpExpression\")) {\n // UNSAFE\n return $visitor->visitUnaryOpExpression($this);\n } else if (method_exists($visitor, \"visitExpression\")) {\n // UNSAFE\n return $visitor->visitExpression($this);\n } else {\n return $visitor->visitNode($this);\n }\n }", "title": "" }, { "docid": "63b6618a428ae49c1891884f385fae47", "score": "0.4651613", "text": "public static function ignoreRoutes(): static\n {\n static::$registersRoutes = false;\n return new static();\n }", "title": "" }, { "docid": "fc485658e438cd58f080d86c0f1f2f56", "score": "0.46469325", "text": "public function __construct()\r\n {\r\n $this->middleware('guest:visitor');\r\n }", "title": "" }, { "docid": "322c358f629987a826098e1cad2eabcc", "score": "0.45716646", "text": "public static function createWithNoNames()\n {\n return new static();\n }", "title": "" }, { "docid": "665180813baae79b8340a30248d3ffcd", "score": "0.45555246", "text": "public function accept(/*mixed*/ $visitor) /*: mixed*/ {\n if (method_exists($visitor, \"visitClassConstantExpression\")) {\n // UNSAFE\n return $visitor->visitClassConstantExpression($this);\n } else if (method_exists($visitor, \"visitExpression\")) {\n // UNSAFE\n return $visitor->visitExpression($this);\n } else {\n return $visitor->visitNode($this);\n }\n }", "title": "" }, { "docid": "c49b43c169efd5221fe3b86db43ddf88", "score": "0.4540304", "text": "public function visit()\n\t{\n\t\t$old = $this->visited;\n\t\t$this->visited = true;\n\n\t\treturn $old;\n\t}", "title": "" }, { "docid": "d8d5755bb3e7b2cb5f9d21ddd1ab4dd0", "score": "0.4506766", "text": "private function getVisitors($type)\n {\n $xpath = new \\DOMXPath($this->getXml());\n $nodeList = $xpath->query('//' . $type);\n $visitor = new \\DOMDocument('1.0', 'UTF-8');\n $visitor->appendChild($visitor->importNode($nodeList->item(0), true));\n return new Visitors($visitor);\n }", "title": "" }, { "docid": "d16eaec91f2ece9cd81f4f944bb65a0a", "score": "0.4467607", "text": "public function get_visitor_dao() {\n\t\treturn new wopstaVisitorDao();\n\t}", "title": "" }, { "docid": "ed557bcc66d9144d299128b58fef0bd9", "score": "0.4457312", "text": "public function accept( ymcPipeVisitor $visitor )\n {\n if ( $visitor->visit( $this ) )\n {\n foreach ( $this->outNodes as $outNode )\n {\n $outNode->accept( $visitor );\n }\n }\n }", "title": "" }, { "docid": "20321ea87d9dff814da3eef2033022bd", "score": "0.44526818", "text": "public function createGraph()\n {\n // Copy Graph\n return $this->getGraph()->createGraphCloneEdges($this->getEdges());\n }", "title": "" }, { "docid": "19d091458d1ef0485598d2a8ec41a5d1", "score": "0.443986", "text": "public abstract function accept(VisitorInterface $visitor);", "title": "" }, { "docid": "f2e37e823ae748f89c43b247572e18e5", "score": "0.4439657", "text": "public function createDefaultVisa(){\n\t\t$this->setVisa(\"--\");\n\t}", "title": "" }, { "docid": "e7ea9430e971b48bb1169e3df6e08366", "score": "0.44028178", "text": "public function handle(Request $request, Closure $next)\n {\n $ip = hash('sha512', $request->ip());\n if (Visitor::where('date', today())->where('ip', $ip)->count() < 1) {\n Visitor::create([\n 'date' => today(),\n 'ip' => $ip,\n ]);\n }\n return $next($request);\n }", "title": "" }, { "docid": "7d6d1218650b054a9b06dca9f3dce6f5", "score": "0.4399999", "text": "public function reset()\n\t{\n\t\t$this->visited = false;\n\t}", "title": "" }, { "docid": "7956bbbbe6c9a05be5bc7306ad16ec0c", "score": "0.4398523", "text": "public function prune($visitation = null)\n {\n if ($visitation) {\n $this->addUsingAlias(VisitationPeer::ID, $visitation->getId(), Criteria::NOT_EQUAL);\n }\n\n return $this;\n }", "title": "" }, { "docid": "91ce3d11433e7c73fb720067abe27fe5", "score": "0.4385549", "text": "public static function makeEmpty() {\n $class = get_called_class();\n return new $class(array());\n }", "title": "" }, { "docid": "dae724c1dd802bc78af5ea222075f4e6", "score": "0.43851098", "text": "public function withoutViews()\n {\n $this->withViews(function () {\n\n });\n }", "title": "" }, { "docid": "516aad18b59520a1c7bc01d9d1c50d5a", "score": "0.43776825", "text": "public function __construct(Website $website, Visitor $visitor, array $attributes = [])\n {\n $this->attributes = $attributes;\n $this->website = $website;\n $this->visitor = $visitor;\n }", "title": "" }, { "docid": "06ae9603413e8c0d6ec21f49d350a6e2", "score": "0.43755358", "text": "public function noop(){}", "title": "" }, { "docid": "334e99a54ce4aa060fd9f7822c627bd6", "score": "0.4371893", "text": "public function not( $expr )\r\n {\r\n $evals = $this->_evaluate( $expr, 'self', 'boolean' );\r\n $res = new Bdp_DOM_NodeList();\r\n\r\n foreach($evals as $eval)\r\n {\r\n if(!$eval['eval'])\r\n $res->push($eval['el']);\r\n }\r\n\r\n return new self( $res );\r\n }", "title": "" }, { "docid": "c14b9e23e784b374d7b405a8e9f98486", "score": "0.43683037", "text": "public function newAction()\n {\n $entity = new Visit();\n $form = $this->createForm(new VisitType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "title": "" }, { "docid": "03b3b0d88ab1af0ce9e4dc7db78fc975", "score": "0.43124145", "text": "public function visit(Node $node) {\n }", "title": "" }, { "docid": "d6caa83ef2dccf4a66130ed47fa238d5", "score": "0.43047297", "text": "public function get_visit_dao() {\n\t\treturn new wopstaVisitDao();\n\t}", "title": "" }, { "docid": "606bf682979ccb6f89448ed903bb36f2", "score": "0.43038568", "text": "public function accept(/*mixed*/ $visitor) /*: mixed*/ {\n if (method_exists($visitor, \"visitEncapsListExpression\")) {\n // UNSAFE\n return $visitor->visitEncapsListExpression($this);\n } else if (method_exists($visitor, \"visitExpression\")) {\n // UNSAFE\n return $visitor->visitExpression($this);\n } else {\n return $visitor->visitNode($this);\n }\n }", "title": "" }, { "docid": "59498aa280c54e8295e458fc5dbac019", "score": "0.43035206", "text": "public function create()\n {\n return view('dashboard.visits.create');\n }", "title": "" }, { "docid": "5224fa018e1b7b3484cd6f24a5f8e83c", "score": "0.4299422", "text": "public function newQueryWithoutScopes();", "title": "" }, { "docid": "1f80d3d50c1e0b00023bb532b5010bd2", "score": "0.42895037", "text": "public function create()\n {\n return view('admin.visits.create');\n \n }", "title": "" }, { "docid": "023d717be8beb13af3c07cd59b0888aa", "score": "0.42890579", "text": "public static function buildEmptyNode($env, $father) {\n $node = new Node($env, NODE_NEW, $father);\n return $node;\n }", "title": "" }, { "docid": "090f9186a3d2c749fa4418d5cd4e2a81", "score": "0.4275193", "text": "public static function newInstanceWithoutConstructor()\n {\n return (new \\ReflectionClass(__CLASS__))->newInstanceWithoutConstructor();\n }", "title": "" }, { "docid": "c9836ec9659929e709d2750442e293e6", "score": "0.42548412", "text": "function getVisit() {\r\n\t\treturn $this->visit;\r\n\t}", "title": "" }, { "docid": "10cfa2c0bba58bf790c1005b5f0d2f6e", "score": "0.42532203", "text": "public function no_log()\n\t{\n\t\t$this->no_log = true;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "276c4bad956129b8e8ba6125657b2749", "score": "0.42495888", "text": "public function Visitors() {\n if (!$this->exclusion_match) {\n if ($this->db->check_exists_table($this->tbl_visitor)) {\n $this->result = $this->db->get_row($this->tbl_visitor, \"*\", array(\n 'last_counter' => $this->Current_Date('Y-m-d'),\n 'ip' => $this->ip,\n 'agent' => $this->agent['browser'],\n 'platform' => $this->agent['platform'],\n 'version' => $this->agent['version'],\n ));\n\n if (!$this->result) {\n if (Registry::$settings['system']['statistics']['store_ua'] == true) {\n $ua = $_SERVER['HTTP_USER_AGENT'];\n } else {\n $ua = '';\n }\n// if (function_exists('geoip_record_by_name')) {\n// $record = geoip_record_by_name($this->ip);\n// if ($record) {\n// Debug::preTag($record);\n// }\n// }\n $location = \"000\";\n if (function_exists('geoip_country_code_by_addr')) {\n $gi = geoip_open(SYS_PATH . \"inc\" . DS . \"geoip\" . DS . \"GeoIP.dat\", GEOIP_STANDARD);\n $location = geoip_country_code_by_addr($gi, $this->ip);\n geoip_close($gi);\n }\n\n $this->db->insert($this->tbl_visitor, array(\n 'last_counter' => $this->Current_date('Y-m-d'),\n 'referred' => $this->get_Referred(),\n 'agent' => $this->agent['browser'],\n 'platform' => $this->agent['platform'],\n 'version' => $this->agent['version'],\n 'ip' => $this->ip,\n 'location' => $location,\n 'UAString' => $ua\n ));\n }\n }\n }\n }", "title": "" }, { "docid": "cd9f2be65c3ec355e1747d7ed33d7f4f", "score": "0.42485973", "text": "public function destroy(Visit $visit)\n {\n //\n }", "title": "" }, { "docid": "805156e3fb99a7410fd2d9d34c82d598", "score": "0.42436773", "text": "public static function fresh()\n {\n $instance = new self();\n return $instance;\n }", "title": "" }, { "docid": "805156e3fb99a7410fd2d9d34c82d598", "score": "0.42436773", "text": "public static function fresh()\n {\n $instance = new self();\n return $instance;\n }", "title": "" }, { "docid": "805156e3fb99a7410fd2d9d34c82d598", "score": "0.42436773", "text": "public static function fresh()\n {\n $instance = new self();\n return $instance;\n }", "title": "" }, { "docid": "4a2c5a4fcb5c5de4eed6e0b09d561f59", "score": "0.42359763", "text": "public function create()\n {\n return view('admin.visits.create');\n }", "title": "" }, { "docid": "19c4d40bb13f8273abf1025387848152", "score": "0.4233076", "text": "public function createDefault()\n {\n return new \\PapaLocal\\Feed\\ValueObject\\FeedFilter(\n array('transaction', 'agreement', 'referral'),\n '01/01/2015',\n date(\"m/d/Y\"),\n 'NEWEST_FIRST'\n );\n }", "title": "" }, { "docid": "ed711db1afaab84d816fc5376906a43b", "score": "0.4229831", "text": "public function new()\r\n\t{\r\n\t\t$template = new View(\r\n\t\t\t'servers-create.html',\r\n\t\t\tcompact([])\r\n\t\t);\r\n\t\t$template->render();\r\n\t}", "title": "" }, { "docid": "58c6cc88661c3cd6f88fc02a6979b686", "score": "0.4218212", "text": "public function construct(DeserializationVisitorInterface $visitor, ClassMetadata $metadata, $data, array $type, DeserializationContext $context): ?object;", "title": "" }, { "docid": "6eb15ae5435d66353ecdddbf6e7f6aa6", "score": "0.42168772", "text": "public function create() {\n\t\t$title = trans( 'visitor.new' );\n\t\t$custom_fields = CustomFormUserFields::getCustomUserFields( 'visitor' );\n\n\t\treturn view( 'layouts.create', compact( 'title', 'custom_fields' ) );\n\t}", "title": "" }, { "docid": "9c419b95bff6bd440908aec2e2620a62", "score": "0.42158636", "text": "public function __clone()\n {\n $this->lexer = clone $this->lexer;\n $this->query = clone $this->query;\n $this->queryBuilder = clone $this->queryBuilder;\n }", "title": "" }, { "docid": "1d780c2cf6fa71ad9ef58d3195fb8539", "score": "0.42153913", "text": "public function noop() {}", "title": "" }, { "docid": "6a3abc341a926d1a75fae88bb270b1a3", "score": "0.4208201", "text": "public function withoutCreateInfo()\n {\n $this->options['no-create-info'] = null;\n return $this;\n }", "title": "" }, { "docid": "ad19e1419e1543d7e4bd7af0001d17aa", "score": "0.41955602", "text": "public function filter( $expr )\r\n {\r\n $evals = $this->_evaluate( $expr, 'self', 'boolean' );\r\n $res = new Bdp_DOM_NodeList();\r\n\r\n foreach($evals as $eval){\r\n if($eval['eval']){\r\n $res->push($eval['el']);\r\n }\r\n }\r\n\r\n return new self( $res );\r\n }", "title": "" }, { "docid": "579f135194b7bb0b7339f21250c22689", "score": "0.41915298", "text": "public function store(request $request)\n {\n $inputs = $request->input('visitor');\n if(array_key_exists('level',$inputs))\n {\n $inputs['level'] = 1;\n }else{\n $inputs['level'] = 0;\n }\n /* $inputs['code'] = $this->random(); */\n /* $inputs['code'] = ''; */\n $visitor = visitor::create($inputs);\n return $this->index();\n //\n }", "title": "" }, { "docid": "364ef37f00c534474e0ef599fe9f8e5b", "score": "0.41804677", "text": "private function createADirectedGraphWithIsolatedVertices(): DirectedGraph\n {\n\n $graph = new DirectedGraph();\n\n $graph->createVerticesByIds(self::SAMPLE_VERTICES_IDS);\n $graph->createVertex('v5');\n\n $graph->addDirectedEdgeByVerticesIds(self::SAMPLE_VERTICES_IDS[1], self::SAMPLE_VERTICES_IDS[3]);\n $graph->addDirectedEdgeByVerticesIds(self::SAMPLE_VERTICES_IDS[2], self::SAMPLE_VERTICES_IDS[1]);\n\n return $graph;\n }", "title": "" }, { "docid": "c040b0f29e27305a3d591c0e521c3e52", "score": "0.41445807", "text": "public function __construct()\n {\n $this->middleware('visitor')->except('logout', 'lock', 'lockScreen');\n }", "title": "" }, { "docid": "1e18e9ccbefadfad830f993b19151594", "score": "0.41405705", "text": "public function getNodeVisitors() {\n return array();\n }", "title": "" }, { "docid": "6c72b4df0dcd192e0428e5b947f14666", "score": "0.41377944", "text": "public function getNodeVisitors()\n {\n return [];\n }", "title": "" }, { "docid": "bcc8516a0760c2512e0aa5819981166e", "score": "0.41310152", "text": "public function CreateAccount(string $Username, string $Password, string $Name, string $Email, string $PhoneNumber): Visitor\n\t{\n\t\tDatabaseFunctions\\CreateAccount($Username, $Password, $Name, $Email, $PhoneNumber);\n\t\t$addVisitor = new Visitor($Username, $Password, $PhoneNumber, $Email, $Name);\n\t\tAccountHandler::GetInstance()->CreateAccount($addVisitor);\n\t\treturn $addVisitor;\n\t}", "title": "" }, { "docid": "175784de094a4d9c3b9b58fe1666c3cf", "score": "0.41245896", "text": "static function getEmptyDocumentCustomerFilter(){\n\t\treturn new self();\n\t}", "title": "" }, { "docid": "a9e8f20c149246fb4f6d6923e430c94c", "score": "0.41147903", "text": "public function anonymous() {\n $clone= clone $this;\n if ($this->authority) {\n $clone->authority= new Authority($this->authority->host(), $this->authority->port());\n }\n return $clone;\n }", "title": "" }, { "docid": "89a34ad426c8c248e0cf39a0cdb03373", "score": "0.41102356", "text": "public function new()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "b6c67cba87177b74b41e2220e20b3b6e", "score": "0.41061532", "text": "public function create_void() {\n\n\t\t$this->create_transaction( self::TRANSACTION_TYPE_TAGGED_VOID );\n\t}", "title": "" }, { "docid": "aec7d71e5cb031cd01197bf0540fe7ab", "score": "0.40978694", "text": "public function __clone()\n {\n $this->template = null;\n unset($this->data);\n unset($this->returnData);\n }", "title": "" }, { "docid": "2b0a97414e2d0b2f7da2c60e40225180", "score": "0.40929198", "text": "public static function null(): self\n {\n return (new ReflectionClass(get_called_class()))->newInstanceWithoutConstructor();\n }", "title": "" }, { "docid": "6e96804975d0cc72f3cbd1b35a14c66e", "score": "0.40858388", "text": "public function pastLink(){\n try {\n $url = $this->data['url'];\n $result = LinkBL::find($url);\n if (!$result) throw new Exception(-1);\n $visitorData = [\n 'link_id' => $result->id,\n 'referrer' => $this->data['referrer'],\n 'ip' => $this->data['ip'],\n 'created_at' => date('Y-m-d H:i:s'),\n ];\n $newVisit = VisitorBL::createNew($visitorData);\n if (!$newVisit) throw new Exception(-2);\n if ($this->data['redirect']) {\n return redirect($result->link);\n }\n return $this->outputPacker(2, $result);\n } catch (\\Exception $e) {\n return $this->outputPacker($e->getMessage());\n }\n\n }", "title": "" }, { "docid": "1c076e9cecb8c57c6894021a87e67b8f", "score": "0.40849718", "text": "public function createEdge(Vertex $vertex)\n {\n return new EdgeUndirected($this, $vertex);\n }", "title": "" }, { "docid": "2fe2e3ce13a933a3893c1f6a86cf4463", "score": "0.40743825", "text": "function clear() {\r\n\t\t$this->visit = null;\r\n\t\tunset($_SESSION['db_visit']);\r\n\t\tsession_destroy();\r\n\t}", "title": "" }, { "docid": "51372a934cfdd2d82cb7e122791f3179", "score": "0.40694532", "text": "public function getPostCompileVisitors()\n {\n $visitors = [];\n foreach ($this->visitors as $visitor) {\n /* @var $visitor VisitorInterface */\n if ($visitor->getType() === VisitorInterface::TYPE_POST_COMPILE) {\n $visitors[] = $visitor;\n }\n }\n\n return $visitors;\n }", "title": "" }, { "docid": "9c0df38b020c549092dc691ab3a757df", "score": "0.4067992", "text": "protected function _subclass_cloneNodeShallow(): Node\n {\n $shallow = new Document($this->isHTMLDocument(), $this->_address);\n $shallow->_mode = $this->_mode;\n $shallow->_contentType = $this->_contentType;\n return $shallow;\n }", "title": "" }, { "docid": "59efc075e5480d3746413b9009e99086", "score": "0.40642938", "text": "function newVisit(){\n\t\tglobal $themePrefix;\n\t\tif( is_singular( array( 'noticias', 'eventos', 'videos' ) ) ){\n\t\t\tupdate_post_meta( get_the_id(), $themePrefix.'visitorCount', get_post_meta( get_the_id(), $themePrefix.'visitorCount', true ) + 1 );\n\t\t}\n\t}", "title": "" }, { "docid": "7d8e8623d5f4692fad310b344ca3219a", "score": "0.40514538", "text": "public function getPreCompileVisitors()\n {\n $visitors = [];\n foreach ($this->visitors as $visitor) {\n /* @var $visitor VisitorInterface */\n if ($visitor->getType() === VisitorInterface::TYPE_PRE_COMPILE) {\n $visitors[] = $visitor;\n }\n }\n\n return $visitors;\n }", "title": "" }, { "docid": "31760ed732351da926a8f14a3312a989", "score": "0.40459692", "text": "public function negated(): self\n {\n $internal = clone $this->internal;\n $internal->invert = 1;\n return new self($internal);\n }", "title": "" }, { "docid": "318da48c82a9ed35d2ea6f33afbfc831", "score": "0.4039419", "text": "public function newInstancesOnly()\n {\n $this->newInstanceOnly = true;\n return $this;\n }", "title": "" }, { "docid": "c6e1c0eff1ea905b493fa8239152f1f9", "score": "0.40365827", "text": "public function empty() : Instance\n {\n return new Instance(1);\n }", "title": "" }, { "docid": "97fe7b1956892c370a39d6c457d09742", "score": "0.402818", "text": "abstract function visit($node);", "title": "" }, { "docid": "56e923185bbd9acea0f5b3a7e4c6be46", "score": "0.4027662", "text": "public function __construct($visits)\n {\n $this->visits = $visits;\n }", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.40268967", "text": "public function newInstance();", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.40268967", "text": "public function newInstance();", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.40268967", "text": "public function newInstance();", "title": "" }, { "docid": "806f881884814a397b54fe81509d50d6", "score": "0.40155253", "text": "public function copy(&$visited = [])\n {\n $hash = spl_object_hash($this);\n\n if (isset($visited[$hash])) {\n return $visited[$hash];\n }\n\n $copy = $visited[$hash] = new DefaultState($this->label, $this->type);\n\n foreach ($this->transitions as $transition) {\n $copy->addTransition($transition->copy($visited));\n }\n\n return $copy;\n }", "title": "" }, { "docid": "7f4b7c3b9513ba298ef624a6767cbb4e", "score": "0.4011771", "text": "public static function newInstance() {\n self::$INSTANCES[get_called_class()] = NULL;\n return self::getInstance();\n }", "title": "" }, { "docid": "40d310ecd0a7c2843ad69b49512703c2", "score": "0.40096083", "text": "protected function getVisitorUniqueId()\n\t{\n\t\tif($this->isVisitorKnown())\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Piwik_Common::generateUniqId();\n\t\t}\n\t}", "title": "" }, { "docid": "5114ae5a4c25a67a64e46d6d871f3a1b", "score": "0.40067244", "text": "public function __clone()\n\t{\n\t\t$this->filter = clone $this->filter;\n\t}", "title": "" }, { "docid": "2ac9ddad635ba17eddbac90f4e3e51db", "score": "0.40059572", "text": "public function newInstanceWithoutConstructor($args = null)\n {\n $function = __FUNCTION__;\n $this->initializeInternalReflection();\n\n return parent::$function($args);\n }", "title": "" } ]
541829c451814f6481084dec792fd9a9
Returns configuration for contenttype.
[ { "docid": "8afb8bc90bd52d0f6c3b3eaa9a3a86ed", "score": "0.5803649", "text": "public function getConfiguration();", "title": "" } ]
[ { "docid": "eb2ce57c5b54da147f336e4230630af8", "score": "0.6677356", "text": "public static function getPostTypeConfig();", "title": "" }, { "docid": "c3f82d1959f9f91d9c287d4476209669", "score": "0.66486436", "text": "public function getContentType(){return $this->_data['content_type']; }", "title": "" }, { "docid": "38e355e08a80f8d8f5856c99d657bcd2", "score": "0.62498933", "text": "function getContentType() {\r\n\r\n\t\treturn $this->contentType;\r\n\r\n\t}", "title": "" }, { "docid": "e16eaec351995962468ddf1950f547ba", "score": "0.62479424", "text": "abstract public function getContentType();", "title": "" }, { "docid": "e6b57d20beeeeaace6b4550e6d8bf02f", "score": "0.6241931", "text": "public function getContentType() {\n return $this->contenttype;\n }", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.62367487", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.62367487", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.62367487", "text": "public function getContentType();", "title": "" }, { "docid": "223d5d2134fa340f9ca8900e7ec97965", "score": "0.62367487", "text": "public function getContentType();", "title": "" }, { "docid": "72b4573dacbb5872cdbe9bff7e510ac8", "score": "0.6211015", "text": "protected function getContentType()\n {\n return $this->content_type;\n }", "title": "" }, { "docid": "0b476e1b12e0d9ddeb9999c3d4403e85", "score": "0.61771536", "text": "public function getContentTypeOptions() {\n\n $coreContent_table = Engine_Api::_()->getDbtable('content', 'core');\n $select = $coreContent_table->select()\n ->from('engine4_core_content', 'params')\n ->where('name = ?', 'siteadvsearch.search-contents');\n $params = $coreContent_table->fetchRow($select);\n if (isset($params['params']['show_statstics'])) {\n return $showStatstics = $params['params']['show_statstics'];\n }\n else\n return $showStatstics = '';\n }", "title": "" }, { "docid": "07b9d482376ddc83a398985273cff57c", "score": "0.6149389", "text": "public function getContentType(): string;", "title": "" }, { "docid": "07b9d482376ddc83a398985273cff57c", "score": "0.6149389", "text": "public function getContentType(): string;", "title": "" }, { "docid": "cd538b7936ff4820bd4edd995414a641", "score": "0.6143978", "text": "public static function getConfig($type = '')\n {\n\n }", "title": "" }, { "docid": "1a41e88a48acd29abadaf885dea4c117", "score": "0.6113231", "text": "public function getContentType()\n {\n return $this->content_type;\n }", "title": "" }, { "docid": "1a41e88a48acd29abadaf885dea4c117", "score": "0.6113231", "text": "public function getContentType()\n {\n return $this->content_type;\n }", "title": "" }, { "docid": "554aab62801e105354944e95ee40c11b", "score": "0.6103554", "text": "public function getContentType() {\n return $this->contentType;\t\n }", "title": "" }, { "docid": "22aeadbebe046f8a3d05d3c0c60bda0f", "score": "0.6038516", "text": "public function content_type($content_type = 'application/x-www-form-urlencoded; charset=UTF-8')\n\t{\n\t\n\t\tif(is_bool($content_type))\n\t\t{\n\t\t\t$content_type = $this->_booltostr($content_type);\t\t\n\t\t}\n\t\telseif(is_string($content_type))\n\t\t{\n\t\t\t$content_type = \"\\\"$content_type\\\"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this;\t\n\t\t}\n\t\t\n\t\t$this->sets['content_type'] = \"\\tcontentType:$content_type,\".ln();\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f83cb28ae293adfb5c9896895fc4f46f", "score": "0.6035588", "text": "public function getContentType()\n\t{\n\t return $this->content_type;\n\t}", "title": "" }, { "docid": "927ca79dab438b0b7d67e5de8a3cfb27", "score": "0.59759474", "text": "function getContentType() {\n\n return null;\n\n }", "title": "" }, { "docid": "749b7a5bd3f1c1c639473be2a3b45dfb", "score": "0.5972106", "text": "public function getContentTypeHeader();", "title": "" }, { "docid": "fbc0724f8611ed093c1669ff61e494ea", "score": "0.5930693", "text": "public function config() {\r\n return $this->request_configuration;\r\n }", "title": "" }, { "docid": "1f9dfe6c319040beaf54550c5c7a9910", "score": "0.5906961", "text": "public function getConfigType()\r\n {\r\n return Mage::getStoreConfig('chat/widgetconfig/type_config');\r\n }", "title": "" }, { "docid": "626707cd3ad0ef1507d341ef8368f47f", "score": "0.5888517", "text": "public function getContentType() {\n return $this->contentType;\n }", "title": "" }, { "docid": "7b480a0a747f3a02e70cc5d8231df55d", "score": "0.58817935", "text": "public function getConfiguration ();", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "b09362c628fb277a6dd7d51d532af4ed", "score": "0.5864591", "text": "public function getContentType()\n {\n return $this->contentType;\n }", "title": "" }, { "docid": "14ef511620a68e0bd3c7236f03c196b2", "score": "0.5859317", "text": "public function user_prop_getcontenttype() {\n //return 'httpd/unix-directory';\n // Hmm, this was commented out, but why? I think XHTML is perfect for now.\n // [PieterB]\n return BeeHub::best_xhtml_type() . '; charset=\"utf-8\"';\n }", "title": "" }, { "docid": "b6967c0f3a3fb40e7552f4725daa71c4", "score": "0.58569205", "text": "public function getContentType()\n\t{\n\t\treturn $this->_get('contentType');\n\t}", "title": "" }, { "docid": "29f6fa2245767406fb25dabe9b371397", "score": "0.5851742", "text": "public function getContentTypes()\n {\n return array(\n 'html' => 'html',\n 'markdown' => 'markdown',\n );\n }", "title": "" }, { "docid": "27c4819e8f2ccd35bdfd1cfb3db031f2", "score": "0.58465946", "text": "final public function getContentType() {\n\t\treturn $this->contentType;\n\t}", "title": "" }, { "docid": "c85a85d9095248786ba1a68f4d4bd77e", "score": "0.5834073", "text": "public function getConfiguration()\n {\n $configuration = parent::getConfiguration();\n $configuration['debug'] = isset($configuration['debug']) ? $configuration['debug'] : false;\n\n if (isset($configuration['schemes']) && is_array($configuration['schemes'])) {\n foreach ($configuration['schemes'] as $key => &$scheme) {\n if (is_string($scheme['featureType'])) {\n $featureTypes = $this->container->getParameter('featureTypes');\n $scheme['featureType'] = $featureTypes[ $scheme['featureType'] ];\n }\n if (isset($scheme['formItems'])) {\n $scheme['formItems'] = $this->prepareItems($scheme['formItems']);\n }\n }\n }\n return $configuration;\n }", "title": "" }, { "docid": "08c34d749f4bd5d61ba8c3c082c8f8a8", "score": "0.5823672", "text": "public function getGridTypeConfig()\n {\n return Mage::getSingleton('customgrid/grid_type_config');\n }", "title": "" }, { "docid": "53ee2662767fb9279e8b0ca1ad0c39cc", "score": "0.5789529", "text": "final public function getContentType()\n\t{\n\t\treturn $this->contentType;\n\t}", "title": "" }, { "docid": "3dcbc9feaac8b00b959e88b8655bf3f2", "score": "0.57818526", "text": "protected function loadConfig(){\n $this->acceptTypes = parse_ini_file(\"config.ini\")[\"contentTypes\"];\n }", "title": "" }, { "docid": "10efae88826264b4014bf1180b6216dc", "score": "0.5781437", "text": "function getConfig() {\n\t\t$typeNum = t3lib_div::_GET('type');\n\t\t$setup = $GLOBALS['TSFE']->tmpl->setup;\n\t\t$pageId = $GLOBALS['TSFE']->id;\n\n\t\t\t// check whether it's not the default view and whether the page was cached\n\t\tif($typeNum > 0 && !isset($setup['types.'])) {\n\t\t\techo ' cached ';\n\t\t\t\t// cached page, recompile the TS setup\n\t\t\trequire_once(PATH_t3lib.'class.t3lib_tsparser_ext.php');\n\t\t\trequire_once(PATH_t3lib.'class.t3lib_page.php');\n\n\t\t\t$template = t3lib_div::makeInstance('t3lib_tsparser_ext');\n\t\t\t$template->tt_track = 0;\n\t\t\t$template->init();\n\n\t\t\t$sysPage = t3lib_div::makeInstance('t3lib_pageSelect');\n\t\t\t$rootLine = $sysPage->getRootLine($pageId);\n\n\t\t\t\t// generate the constants/config + hierarchy info for the template.\n\t\t\t$template->runThroughTemplates($rootLine);\n\t\t\t$template->generateConfig();\n\n\t\t\t$setup = $template->setup;\n\t\t}\n\n\t\treturn $setup[$setup['types.'][$typeNum].'.'];\n\t}", "title": "" }, { "docid": "fe010b665218311513f81edc3ea24c8a", "score": "0.57711107", "text": "public function getContentType()\n {\n return $this->_contentType;\n }", "title": "" }, { "docid": "9b0db4aeb7b2c78211a17339c8e3df71", "score": "0.57617503", "text": "public function get_content_type() {\r\n if(!($contentType = filter_input(INPUT_SERVER, 'HTTP_RESPOND_CONTENT_TYPE')) === false){\r\n switch (strtolower($contentType)) {\r\n case 'json':case 'application/json':\r\n $this->contentType = 'json';\r\n break;\r\n case 'xml':case 'application/xml':\r\n $this->contentType = 'xml';\r\n break;\r\n case 'htm':case 'html': case 'php':case 'text/html':\r\n break;\r\n default:\r\n $this->contentType = $contentType;\r\n }\r\n }\r\n\r\n return $this->contentType;\r\n }", "title": "" }, { "docid": "3a1151bd9bfd861528aa3482cbc6ce06", "score": "0.5758011", "text": "function get_content_type()\n\t{\n\t\tif(empty($this->extension))\n\t\t{\n\t\t\t$this->error_msg[]=\"cannot set the content type , extension unknown\";\n\t\t\t$this->error_flag++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->extension==\"jpg\" || $this->extesnsion==\"jpeg\")\n\t\t\t{\n\t\t\t\t$this->content_type\t=\t\"header(\\\"Content-type: image/jpeg\\\")\";\n\t\t\t}\n\t\t\telse if($this->extension==\"png\")\n\t\t\t{\n\t\t\t\t$this->content_type\t=\t\"header(\\\"Content-type: image/png\\\")\";\n\t\t\t}\n\t\t\telse if($this->extension==\"gif\")\n\t\t\t{\n\t\t\t\t$this->content_type\t=\t\"header(\\\"Content-type: image/gif\\\")\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->error_msg[]=\"Invalid File format : support only jpeg/gif/png\";\n\t\t\t\t$this->error_flag++;\n\t\t\t}\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "cce144a2f6c5be4e6fc55ce62e21e328", "score": "0.5743742", "text": "final public function getContentType()\r\n\t{\r\n\t\treturn $this->contentType;\r\n\t}", "title": "" }, { "docid": "79cb7cdfe17d109885a0fcf5badb5612", "score": "0.57392365", "text": "public function getValue()\n {\n return [\n 'Content-Type' => $this->getType(),\n ];\n }", "title": "" }, { "docid": "143672f04970ba47c5ec0e1cc15f2be1", "score": "0.57365847", "text": "private function get_request_content_type () {\n\t\t$this->result_type = $_SERVER['CONTENT_TYPE']==\"application/xml\" ? \"xml\" : \"json\";\n\t}", "title": "" }, { "docid": "4457c22f9160511f6ea420065f911c5b", "score": "0.573355", "text": "public function getConfiguration(): FormFieldTypeConfiguration;", "title": "" }, { "docid": "670cac4d93013427aad68bc3d824cd80", "score": "0.57243735", "text": "public function getContentType()\n\t{\n\t\tswitch ($this->_format) {\n\t\t\tcase 'less':\n\t\t\t\treturn 'text/css';\n\n\t\t\tcase 'json':\n\t\t\t\treturn 'application/json';\n\n\t\t\tdefault:\n\t\t\t\treturn 'text/plain';\n\t\t}\n\t}", "title": "" }, { "docid": "9993d5da7ea630afc09cc11ce93a94e8", "score": "0.5723769", "text": "public function configuration()\n\t\t{\n\n\t\t\treturn [\n\t\t\t\t'installable' => false,\n\t\t\t\t'type' => 'whois',\n\t\t\t\t'data' => true,\n\t\t\t\t'reloadable' => true,\n\t\t\t];\n\t\t}", "title": "" }, { "docid": "f64a21ce66235867b0883707380c619b", "score": "0.5720459", "text": "public function get_content_type() {\n\t\treturn 'text/html';\n\t}", "title": "" }, { "docid": "5f901c78ff14f19598e4d3bab822833f", "score": "0.5701809", "text": "public function contentType()\n {\n return array_value($this->server, 'CONTENT_TYPE');\n }", "title": "" }, { "docid": "5fd1b6d3f19bf7a90b1ccb22576a6827", "score": "0.5698908", "text": "public function getContentType()\n\t{\n\t\treturn 'application/json';\n\t}", "title": "" }, { "docid": "34c88aea54c8a5a55a30cf591843accc", "score": "0.569629", "text": "public function getContentType()\n {\n return 'application/xml';\n }", "title": "" }, { "docid": "18e95068732462e3ec1afb95e576cc1a", "score": "0.5655667", "text": "public function getConfig($type=false) {\n\t\tif(!$type)\n\t\t\treturn $this->config;\n\t\telse if(isset($this->config[$type]))\n\t\t\treturn $this->config[$type];\n\t\telse \n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "cdc01710dbba84eff390fffc6837d579", "score": "0.56423724", "text": "public function getApplicationConfiguration();", "title": "" }, { "docid": "79f731170f25a478ffed69c428ab9ffa", "score": "0.5611484", "text": "public function getContentMimeType() {\n return $this->contentType;\n }", "title": "" }, { "docid": "6e162f91a9ce530b44a3f950fcc6b16d", "score": "0.56086224", "text": "public function getContentType() {\n\t\treturn isset($_SERVER[\"CONTENT_TYPE\"]) ? $_SERVER[\"CONTENT_TYPE\"] : '';\n\t}", "title": "" }, { "docid": "76d3b3675024df7e8e5779b5304abf08", "score": "0.56063145", "text": "protected function getEmailContentType()\n {\n return $this->site_ini->hasVariable('MailSettings', 'ContentType') ? $this->site_ini->variable('MailSettings', 'ContentType') : self::HTML_CONTENT_TYPE;\n }", "title": "" }, { "docid": "264b515326214f2d1fe21e0c487de026", "score": "0.55795836", "text": "function GetImExSettings() {\n\t\t// Create the view object.\n\t\t$view = $this->getView('templates', 'raw');\n\t\t\n\t\t// Standard model\n\t\t$view->setModel( $this->getModel( 'templates', 'CsvimprovedModel' ), true );\n\t\t\n\t\t$view->setLayout('templateconfigurator_config_'.JRequest::getVar('type'));\n\t\t\n\t\t// Now display the view. Make sure you dont have a parent::display() anymore\n\t\t$view->display();\n\t}", "title": "" }, { "docid": "e7fd8741065146b79c1809c1c9f8714c", "score": "0.5572691", "text": "public function types()\n\t{\n\t\treturn $this->content_types;\n\t}", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "88036d2d3b38154d8ff418b57d7d58db", "score": "0.55696964", "text": "public function getConfig();", "title": "" }, { "docid": "9ba83881990c681360a9650e490fbfb6", "score": "0.55685073", "text": "protected function loadContentType()\n {\n\n $this->typeLabel = 'RSS Feed'; // 'Feed Item';\n $this->typeId = '7c727c6f-e179-442d-acf6-e5f7c602d1ee';\n\n $this->formClassList[]=ContentSearchForm::class;\n\n $this->viewClassList[] = FeedItemContentView::class;\n $this->viewSite = FeedItemRedirectSite::$site;\n $this->parameterClass = FeedItemParameter::class;\n\n $this->listingClass=FeedItemContentListing::class;\n\n $this->feedDateTime= (new DateTime())->setNow();\n\n }", "title": "" }, { "docid": "d7288c5b672e31d4d4d78db9c5a9f132", "score": "0.5564451", "text": "public function getExtensionConfiguration() {\n\t\treturn $this->extensionConfiguration;\n\t}", "title": "" }, { "docid": "71df0e27001abb0955a6def180ecc236", "score": "0.5562413", "text": "public function getContentTypes(): array;", "title": "" }, { "docid": "3b34d44dcdd1a2a745988c705d384ce0", "score": "0.55546796", "text": "public function configuration()\n\t{\n\t\treturn $this->getContextInstance('Configuration');\n\t}", "title": "" }, { "docid": "73d5e8ce96f0459b3e7b15b745cfa8bf", "score": "0.5552708", "text": "public function templateConfig() {\n return Dipper::parse($this->template_contents[1]);\n }", "title": "" }, { "docid": "b808fa642f7865a4184c53ab6a267fab", "score": "0.553194", "text": "function ding_panels_library_portal_content_type_content_types() {\n $types = array(\n 'library_portal_navigation' => array(\n 'title' => t('Library portal navigation.'),\n 'description' => t('Shows the CMS menu - if available, it will show the portal library specific menu.'),\n ),\n );\n\n // Append our default settings to every type.\n foreach ($types as $name => $type) {\n $types[$name] += array(\n 'category' => t('Library page'),\n 'required context' => new ctools_context_optional(t('Node'), 'node'),\n );\n }\n return $types;\n}", "title": "" }, { "docid": "d2096aa1a4a0530df17215d6de55ab90", "score": "0.5529396", "text": "public function getUploadConfig()\n {\n $config = [\n //type\n 1 => [\n //location\n 1 => [\n 'limit' => 5,\n 'filesize' => 1*1024*1024,\n 'size' => '1170*300',\n ],\n\n 2 => [\n 'limit' => 1,\n 'filesize' => 1*1024*1024,\n 'size' => '567*315',\n ],\n\n 3 => [\n 'limit' => 1,\n 'filesize' => 1*1024*1024,\n 'size' => '567*315',\n ]\n ],\n 2 => [\n 'limit' => 1,\n 'filesize' => 1*1024*1024,\n 'size' => '800*600',\n ],\n 3 => [\n 'limit' => 1,\n 'filesize' => 1*1024*1024,\n 'size' => '800*600',\n ],\n ];\n return $config;\n }", "title": "" }, { "docid": "2d07711d4f807f909a45515f2bdc15c2", "score": "0.5524191", "text": "public function get() {\n $connection = Yii::app()->db;\n $sql = \"SELECT * FROM configuration WHERE config_key = :config_key ORDER BY \n display_order ASC\";\n $query = $connection->createCommand($sql);\n $query->bindParam(\":config_key\", $this->type);\n $configurations = $query->queryAll();\n return $configurations;\n }", "title": "" }, { "docid": "701656fb00780de6df77fb331d3e6c00", "score": "0.5523758", "text": "public function getContentType() {\n\t\t$ret = $this->contentType;\n\n\t\tif (!is_null($ret) && !is_null($this->characterEncoding) && $this->charsetSet) {\n\t\t\t$ret .= '; charset=' . $this->characterEncoding;\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "752246e5be5afbde1449572353405d2f", "score": "0.55233216", "text": "protected function _configuration()\n {\n return [\n 'configuration/MODULE_ORDER_TOTAL_MOLLIE_STATUS' => [\n 'value' => 'true',\n 'type' => 'switcher',\n ],\n 'configuration/MODULE_ORDER_TOTAL_MOLLIE_TAX_CLASS' => [\n 'value' => '0',\n 'type' => 'tax-class',\n ],\n 'configuration/MODULE_ORDER_TOTAL_MOLLIE_SORT_ORDER' => [\n 'value' => self::DEFAULT_OT_MOLLIE_SORT_ORDER,\n ],\n ];\n }", "title": "" }, { "docid": "f6ed39043d9f7d42091e8a1939a41438", "score": "0.5509418", "text": "public function getContentType() {\n\t\treturn $this->mime;\n\t}", "title": "" }, { "docid": "5aa74cbb72d9921c78265903fbb52888", "score": "0.55086666", "text": "function church_admin_email_type($content_type){\nreturn 'text/html';\n}", "title": "" }, { "docid": "c54ce410bf9a154c0c32634bb647c299", "score": "0.55059594", "text": "protected function getConfig($type = null)\n {\n return $this->path->getConfig($type);\n }", "title": "" }, { "docid": "735896bdd6409cb13af3ec371b752b4f", "score": "0.5504708", "text": "private static function _selectConfiguration ( $content )\n {\n $matchesList = array();\n preg_match ( \"/(\\\\\\$default.*;)$/msU\", $content, $matchesList );\n return isset ( $matchesList[1] ) ? $matchesList[1] : null;\n }", "title": "" }, { "docid": "c2fccd59b3ca91a565aa3ebf5400bbd0", "score": "0.5503198", "text": "protected function configuration(string $type): array\n {\n return $this->container->getParameter('contao.graphql.config')[$type];\n }", "title": "" }, { "docid": "bdb5421ca2c3600fc1d81c7e04853440", "score": "0.5498877", "text": "function fetch_content_type_header()\r\n {\r\n return 'Content-Type: ' . $this->content_type . ($this->charset == '' ? '' : '; charset=' . $this->charset);\r\n }", "title": "" }, { "docid": "e158553614245d468ec14838860f8711", "score": "0.5485262", "text": "public static function config()\n {\n if (self::$config === null)\n {\n self::$config = new DocBlox_Core_Config(dirname(__FILE__) . '/../../../data/docblox.tpl.xml');\n }\n\n return self::$config;\n }", "title": "" }, { "docid": "866db432d9d70468def6d88a066f6af3", "score": "0.5485132", "text": "function getType() {\n \tif (!empty($this->_content['type'])) {\n \treturn $this->_content['type'];\n }\n return false;\n }", "title": "" }, { "docid": "bb164fe0bb2c6a0ca7b00ce8f0bc90a5", "score": "0.5478796", "text": "public function get_type()\n\t{\n\t\treturn $this->contentType;\n\t}", "title": "" }, { "docid": "e72b102c2dab28484f99109b290b730a", "score": "0.54739934", "text": "abstract public function getConfig();", "title": "" }, { "docid": "83c832a8fbb553d982cb1d26b5d7fc76", "score": "0.54734516", "text": "public function getConfiguration(){\n\t\treturn $this->configuration;\n\t}", "title": "" }, { "docid": "453bbe8a6303c4c5b729c7fc9357ebc3", "score": "0.54665154", "text": "function get_content_type()\n\t{\t\n\t\t\tif\t($this->mailtype == 'html' && count($this->attach_name) == 0)\n\t\t\t\treturn 'html';\n\t\n\t\telseif\t($this->mailtype == 'html' && count($this->attach_name) > 0)\n\t\t\t\treturn 'html-attach';\t\t\t\t\n\t\t\t\t\n\t\telseif\t($this->mailtype == 'text' && count($this->attach_name) > 0)\n\t\t\t\treturn 'plain-attach';\n\t\t\t\t\n\t\t else\treturn 'plain';\n\t}", "title": "" }, { "docid": "b16ad0e9493676757c772a7281ca128f", "score": "0.54631823", "text": "public function get_configuration() {\n return $this->configuration;\n }", "title": "" }, { "docid": "23e1e57bb38425427594f44c2aecbc22", "score": "0.54627615", "text": "public static function getContentType()\n {\n return array('dam', 'media');\n }", "title": "" }, { "docid": "35d46802e6d28276c66f701d7b49d53d", "score": "0.54624146", "text": "abstract protected function configuration();", "title": "" }, { "docid": "b4eb74ea3c3c347f35b53e2d1725eef4", "score": "0.545859", "text": "protected function _getConfig()\n {\n return Mage::getConfig()->getNode('global/document_db')->asArray();\n }", "title": "" }, { "docid": "ea119d8f5ca60f2570326ee326c8001e", "score": "0.5456652", "text": "abstract protected function getConfiguration();", "title": "" } ]
2418f534e3613f67a0d490fe41f8487c
Mapping from the attribute name to the visibility storage native type. Generated from protobuf field map storage_schema = 3;
[ { "docid": "f675b1757bb46c6d1918f68476372572", "score": "0.483826", "text": "public function getStorageSchema()\n {\n return $this->storage_schema;\n }", "title": "" } ]
[ { "docid": "123ba149acb3b3ffcf242c10b3031958", "score": "0.54009444", "text": "public function setStorageSchema($var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->storage_schema = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "f5f102451a3fc27799381847c4512773", "score": "0.5264125", "text": "public function getStorageTypeAllowableValues()\r\n {\r\n return [\r\n self::STORAGE_TYPE_DRAM,\r\n ];\r\n }", "title": "" }, { "docid": "57f968b0f64efc0296a694cd5df1b1a3", "score": "0.52320397", "text": "protected function _getVisibilityAttributeInfo()\n {\n $visibilityAttribute = Mage::getSingleton('eav/config')\n ->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'visibility');\n $info = array(\n 'id' => $visibilityAttribute->getId() ,\n 'table' => $visibilityAttribute->getBackend()->getTable()\n );\n return $info;\n }", "title": "" }, { "docid": "b0608ff02a9ae0c62e293553621ac938", "score": "0.5127341", "text": "abstract public function getVisibilityType();", "title": "" }, { "docid": "8dad79dd38c2a74ed76f88aed1c01d6c", "score": "0.4936589", "text": "public function typeName() {\n switch ($this->type) { \n case DB_ATTRTYPE_BIT:\n return 'bool';\n \n case DB_ATTRTYPE_DATETIME:\n case DB_ATTRTYPE_DATETIMN: \n case DB_ATTRTYPE_TIMESTAMP:\n case DB_ATTRTYPE_SMALLDATETIME:\n case DB_ATTRTYPE_DATE:\n return 'util.Date';\n \n case DB_ATTRTYPE_BINARY:\n case DB_ATTRTYPE_CHAR:\n case DB_ATTRTYPE_IMAGE:\n case DB_ATTRTYPE_NCHAR: \n case DB_ATTRTYPE_NVARCHAR:\n case DB_ATTRTYPE_TEXT:\n case DB_ATTRTYPE_VARBINARY:\n case DB_ATTRTYPE_VARCHAR:\n case DB_ATTRTYPE_ENUM:\n return 'string';\n \n case DB_ATTRTYPE_DECIMAL:\n case DB_ATTRTYPE_DECIMALN:\n case DB_ATTRTYPE_NUMERIC: \n case DB_ATTRTYPE_NUMERICN:\n return $this->scale == 0 ? 'int' : 'float';\n \n case DB_ATTRTYPE_INT:\n case DB_ATTRTYPE_INTN:\n case DB_ATTRTYPE_TINYINT:\n case DB_ATTRTYPE_SMALLINT:\n return 'int';\n \n case DB_ATTRTYPE_FLOAT:\n case DB_ATTRTYPE_FLOATN:\n case DB_ATTRTYPE_MONEY:\n case DB_ATTRTYPE_MONEYN:\n case DB_ATTRTYPE_SMALLMONEY:\n case DB_ATTRTYPE_REAL:\n return 'float';\n \n case DB_ATTRTYPE_SYSNAME:\n return 'string';\n }\n \n return FALSE;\n }", "title": "" }, { "docid": "6b14e9cf8f230d731840ab39ed0efa7a", "score": "0.4874818", "text": "public function attributeTypes();", "title": "" }, { "docid": "9ba5e28fb31ac1665fdc0406fe240886", "score": "0.47882", "text": "public function getTypeString() {\n static $map= array(\n 'DB_ATTRTYPE_BINARY', \n 'DB_ATTRTYPE_BIT', \n 'DB_ATTRTYPE_CHAR', \n 'DB_ATTRTYPE_DATETIME', \n 'DB_ATTRTYPE_DATETIMN', \n 'DB_ATTRTYPE_DECIMAL', \n 'DB_ATTRTYPE_DECIMALN', \n 'DB_ATTRTYPE_FLOAT', \n 'DB_ATTRTYPE_FLOATN', \n 'DB_ATTRTYPE_IMAGE', \n 'DB_ATTRTYPE_INT', \n 'DB_ATTRTYPE_INTN', \n 'DB_ATTRTYPE_MONEY', \n 'DB_ATTRTYPE_MONEYN', \n 'DB_ATTRTYPE_NCHAR', \n 'DB_ATTRTYPE_NUMERIC', \n 'DB_ATTRTYPE_NUMERICN', \n 'DB_ATTRTYPE_NVARCHAR', \n 'DB_ATTRTYPE_REAL', \n 'DB_ATTRTYPE_SMALLDATETIME',\n 'DB_ATTRTYPE_SMALLINT', \n 'DB_ATTRTYPE_SMALLMONEY',\n 'DB_ATTRTYPE_SYSNAME', \n 'DB_ATTRTYPE_TEXT', \n 'DB_ATTRTYPE_TIMESTAMP', \n 'DB_ATTRTYPE_TINYINT', \n 'DB_ATTRTYPE_VARBINARY', \n 'DB_ATTRTYPE_VARCHAR',\n 'DB_ATTRTYPE_ENUM',\n 'DB_ATTRTYPE_DATE'\n );\n return $map[$this->type];\n }", "title": "" }, { "docid": "66a8f3dc181f9dadd7ecd0000a2fcf3c", "score": "0.47792798", "text": "function Object_Structure () {\n\treturn [\n\t\t'Storage' => '`skey` VARCHAR(256) NOT NULL , `sstorage` TEXT NOT NULL'\n\t];\n}", "title": "" }, { "docid": "93341530001842c0571e154480941f4d", "score": "0.46160755", "text": "public function getVolumeTypeAllowableValues()\r\n {\r\n return [\r\n self::VOLUME_TYPE_SATA,\r\n self::VOLUME_TYPE_SAS,\r\n self::VOLUME_TYPE_SSD,\r\n self::VOLUME_TYPE_GPSSD,\r\n ];\r\n }", "title": "" }, { "docid": "9345f4e8d1bd082746327b538418d996", "score": "0.46137753", "text": "public function getStorageType()\n\t{\n\t\t$class = get_class($this->event->connection->driver);\n\t\t$name = preg_replace('~^Dibi|Driver$~', '', $class);\n\t\treturn lcFirst($name);\n\t}", "title": "" }, { "docid": "6264a47eba8dbd581dd7ef6f94c0a95b", "score": "0.4561044", "text": "function schemaAttribute();", "title": "" }, { "docid": "409ac537217904dbf033a7f2ec580eec", "score": "0.4549201", "text": "public function getCoreDataVolumeTypeAllowableValues()\r\n {\r\n return [\r\n self::CORE_DATA_VOLUME_TYPE_SATA,\r\n self::CORE_DATA_VOLUME_TYPE_SAS,\r\n self::CORE_DATA_VOLUME_TYPE_SSD,\r\n self::CORE_DATA_VOLUME_TYPE_GPSSD,\r\n ];\r\n }", "title": "" }, { "docid": "a3f98c26e18a489b231421ee575ea907", "score": "0.45477188", "text": "public static function storageTypes() : array{\n return array(\n 'redis' => RedisStorage::class,\n 'pdo' => PdoStorage::class\n );\n }", "title": "" }, { "docid": "e7a5f4f30a142c7ff54dc2e3f8cd65f6", "score": "0.45361754", "text": "public function defineAttributes()\n\t{\n\t\t$attr = parent::defineAttributes();\n\t\t$attr['publishableKey'] = [AttributeType::String];\n\t\t$attr['publishableKey']['label'] = $this->generateAttributeLabel('publishableKey');\n\n\t\treturn $attr;\n\t}", "title": "" }, { "docid": "0bf76685a94772cafb46d25eee0f803d", "score": "0.45327774", "text": "public static function attributeMap()\n {\n return [\n 'device_code' => 'device_code',\n 'user_code' => 'user_code',\n 'verification_uri' => 'verification_uri',\n 'verification_uri_complete' => 'verification_uri_complete',\n 'expires_in' => 'expires_in',\n 'interval' => 'interval'\n ];\n }", "title": "" }, { "docid": "7d7eab1e311e6496306f27b77a1f35d6", "score": "0.44691616", "text": "public function getStorageModel();", "title": "" }, { "docid": "1263e54dfb6a8e910923a0badc79ba24", "score": "0.44506615", "text": "public function getVisibilityName(): string\n {\n if ($this->isPrivate()) {\n return 'private';\n } elseif ($this->isProtected()) {\n return 'protected';\n } else {\n return 'public';\n }\n }", "title": "" }, { "docid": "04f5e8c3c05a55c04d5416fd1779b3e7", "score": "0.4428908", "text": "protected function defineAttributes() \n {\n return array(\n 'filetype' => array(AttributeType::Enum, \n 'required' => true, \n 'label' => Craft::t('Filetype'), \n 'values' => array(\n self::TypeCSV, \n self::TypeCSVWin, \n self::TypeCSVIE, \n self::TypeCSVApp, \n self::TypeCSVExc, \n self::TypeCSVOff, \n self::TypeCSVOff2, \n self::TypeCSVOth\n )\n )\n );\n }", "title": "" }, { "docid": "842a22b1616f5139f097cf2c99d82107", "score": "0.44193742", "text": "public function getVisibility()\n {\n if (array_key_exists(\"visibility\", $this->_propDict)) {\n return $this->_propDict[\"visibility\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "cfe9022fce431df164abd03ea17e2025", "score": "0.4404898", "text": "public function getCacheKeyInfo()\n {\n return array(\n 'storage_types' => serialize($this->_usedStorageTypes)\n );\n }", "title": "" }, { "docid": "1bb0b064f4fe59a8c4d2dafa1362b16f", "score": "0.4398691", "text": "public function getStoragePrimaryKey(): array;", "title": "" }, { "docid": "dfca0a20580196d42543351a6b7b06d0", "score": "0.4389153", "text": "public function getMasterDataVolumeTypeAllowableValues()\r\n {\r\n return [\r\n self::MASTER_DATA_VOLUME_TYPE_SATA,\r\n self::MASTER_DATA_VOLUME_TYPE_SAS,\r\n self::MASTER_DATA_VOLUME_TYPE_SSD,\r\n self::MASTER_DATA_VOLUME_TYPE_GPSSD,\r\n ];\r\n }", "title": "" }, { "docid": "392626e1b8d6b5b28feb0612648d26a5", "score": "0.43889838", "text": "public function getAccessibleColumn(){\n return [\n 'ref'=>'Ref',\n 'orderRef'=>'Order Ref',\n 'quantity'=>'Quantity',\n 'total_price'=>'Total Price',\n 'file'=>'File'\n ];\n }", "title": "" }, { "docid": "98be39395b55bbc24833fb4b7fe29171", "score": "0.43769497", "text": "public function getInheritanceStorageMode() {\n\n return $this->inheritanceStorageMode;\n }", "title": "" }, { "docid": "40937de72fa20c6a8c72eb458ef1a37f", "score": "0.43698934", "text": "public function getInheritanceStorage() {\n\n if (isset($this->inheritanceStorageName))\n return $this->inheritanceStorageName;\n else\n return parent::getTable() . $this->storageSeparator . $this->storageSuffix;\n }", "title": "" }, { "docid": "8354d826f61794f4d8070b4586415e52", "score": "0.43696356", "text": "public static function getStorageName()\n {\n return 'nb_medioteca_item';\n }", "title": "" }, { "docid": "897c8c3595abaf34d8e3b0c2efd8cb92", "score": "0.436405", "text": "public static function getStorageName()\n {\n return 'nb_medioteca';\n }", "title": "" }, { "docid": "8b2b9901769b6b77530e97d54085992e", "score": "0.43483317", "text": "public function getStorage(): string\n {\n return $this->storage;\n }", "title": "" }, { "docid": "fc7934f48c419ed5e2496aab1181aa0b", "score": "0.43413547", "text": "public function defineContentAttribute()\n {\n // \"Mixed\" represents a \"text\" column type, which can be used to store arrays etc.\n return AttributeType::Mixed;\n }", "title": "" }, { "docid": "7fe63d760eacfe088e74f63997e47640", "score": "0.43379167", "text": "public abstract function getStorage();", "title": "" }, { "docid": "cb5b3ffe5442d9626f23b45ae6d8592e", "score": "0.43363073", "text": "public function getUseCustomStorage()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1f1935b480ed9857f082952083130cf3", "score": "0.433574", "text": "public function getVisibility() \n {\n return $this->_fields['Visibility']['FieldValue'];\n }", "title": "" }, { "docid": "3a852e04a4371e1a7c35e822b52b9806", "score": "0.43330792", "text": "public function getCacheableMetadata();", "title": "" }, { "docid": "3f9d64ea0ed907f34cb5b7553b5f78ff", "score": "0.4331923", "text": "protected function getStorageType() : string\n {\n return $this->getConfigSetting('storageType') ?? self::SINGLE_FILE;\n }", "title": "" }, { "docid": "18bbc5048a1c3d4496c9dec805f5b80a", "score": "0.43286046", "text": "public function formatStorageAttribute(StorageAttributes $item): array\n {\n $attrs = [\n 'basename' => basename($item->path()),\n 'path' => $item->path(),\n 'visibility' => $item->visibility(),\n 'type' => $item->type(),\n ];\n\n if ($item instanceof FileAttributes) {\n $attrs['size'] = $this->formatBytes((int) $item->fileSize());\n $attrs['extension'] = strtolower(pathinfo($item->path(), PATHINFO_EXTENSION));\n }\n\n return $attrs;\n }", "title": "" }, { "docid": "c695d55e96668392eb1288367b8fa256", "score": "0.4325123", "text": "public function getStorageId();", "title": "" }, { "docid": "c695d55e96668392eb1288367b8fa256", "score": "0.4325123", "text": "public function getStorageId();", "title": "" }, { "docid": "c695d55e96668392eb1288367b8fa256", "score": "0.4325123", "text": "public function getStorageId();", "title": "" }, { "docid": "2d6cfc6e53eb7773be3c9aed0285e8db", "score": "0.4315851", "text": "public function getStorage();", "title": "" }, { "docid": "2d6cfc6e53eb7773be3c9aed0285e8db", "score": "0.4315851", "text": "public function getStorage();", "title": "" }, { "docid": "2d6cfc6e53eb7773be3c9aed0285e8db", "score": "0.4315851", "text": "public function getStorage();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.4305288", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.4305288", "text": "public static function attributeMap();", "title": "" }, { "docid": "950d413083605226b5fde503a0aff975", "score": "0.43040568", "text": "public function getVisibility(): string\n {\n return $this->visibility;\n }", "title": "" }, { "docid": "950d413083605226b5fde503a0aff975", "score": "0.43040568", "text": "public function getVisibility(): string\n {\n return $this->visibility;\n }", "title": "" }, { "docid": "622545310dc16c82f528b90e7bede32e", "score": "0.42904896", "text": "public function get_visibility() {\n\n\t\tif ( null === $this->visibility ) {\n\n\t\t\t/**\n\t\t\t * Filter for the capability to check against for restricted data\n\t\t\t *\n\t\t\t * @param string $restricted_cap The capability to check against\n\t\t\t * @param string $model_name Name of the model the filter is currently being executed in\n\t\t\t * @param mixed $data The un-modeled incoming data\n\t\t\t * @param string|null $visibility The visibility that has currently been set for the data at this point\n\t\t\t * @param null|int $owner The user ID for the owner of this piece of data\n\t\t\t * @param WP_User $current_user The current user for the session\n\t\t\t *\n\t\t\t * @return string\n\t\t\t */\n\t\t\t$protected_cap = apply_filters( 'graphql_restricted_data_cap', $this->restricted_cap, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );\n\n\t\t\t/**\n\t\t\t * Filter to short circuit default is_private check for the model. This is expensive in some cases so\n\t\t\t * this filter lets you prevent this from running by returning a true or false value.\n\t\t\t *\n\t\t\t * @param string $model_name Name of the model the filter is currently being executed in\n\t\t\t * @param mixed $data The un-modeled incoming data\n\t\t\t * @param string|null $visibility The visibility that has currently been set for the data at this point\n\t\t\t * @param null|int $owner The user ID for the owner of this piece of data\n\t\t\t * @param WP_User $current_user The current user for the session\n\t\t\t *\n\t\t\t * @return bool|null\n\t\t\t */\n\t\t\t$pre_is_private = apply_filters( 'graphql_pre_model_data_is_private', null, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );\n\n\t\t\t// If 3rd party code has not filtered this, use the Models default logic to determine\n\t\t\t// whether the model should be considered private\n\t\t\tif ( null !== $pre_is_private ) {\n\t\t\t\t$is_private = $pre_is_private;\n\t\t\t} else {\n\t\t\t\t$is_private = $this->is_private();\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Filter to determine if the data should be considered private or not\n\t\t\t *\n\t\t\t * @param boolean $is_private Whether the model is private\n\t\t\t * @param string $model_name Name of the model the filter is currently being executed in\n\t\t\t * @param mixed $data The un-modeled incoming data\n\t\t\t * @param string|null $visibility The visibility that has currently been set for the data at this point\n\t\t\t * @param null|int $owner The user ID for the owner of this piece of data\n\t\t\t * @param WP_User $current_user The current user for the session\n\t\t\t *\n\t\t\t * @return bool\n\t\t\t */\n\t\t\t$is_private = apply_filters( 'graphql_data_is_private', $is_private, $this->get_model_name(), $this->data, $this->visibility, $this->owner, $this->current_user );\n\n\t\t\tif ( true === $is_private ) {\n\t\t\t\t$this->visibility = 'private';\n\t\t\t} elseif ( null !== $this->owner && true === $this->owner_matches_current_user() ) {\n\t\t\t\t$this->visibility = 'public';\n\t\t\t} elseif ( empty( $protected_cap ) || current_user_can( $protected_cap ) ) {\n\t\t\t\t$this->visibility = 'public';\n\t\t\t} else {\n\t\t\t\t$this->visibility = 'restricted';\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Filter the visibility name to be returned\n\t\t *\n\t\t * @param string|null $visibility The visibility that has currently been set for the data at this point\n\t\t * @param string $model_name Name of the model the filter is currently being executed in\n\t\t * @param mixed $data The un-modeled incoming data\n\t\t * @param null|int $owner The user ID for the owner of this piece of data\n\t\t * @param WP_User $current_user The current user for the session\n\t\t *\n\t\t * @return string\n\t\t */\n\t\treturn apply_filters( 'graphql_object_visibility', $this->visibility, $this->get_model_name(), $this->data, $this->owner, $this->current_user );\n\n\t}", "title": "" }, { "docid": "9db9efd4b20f789931d958709daa317d", "score": "0.4288082", "text": "public function getStorageMethods()\n {\n return $this->storageMethods;\n }", "title": "" }, { "docid": "5d1d6d0aa8c6d43f6d269b9dc1490897", "score": "0.42795157", "text": "function mmda_get_filterable_attributes(){\n global $metadata_attributes;\n $filterable_attributes = array();\n foreach ($metadata_attributes as $key => $properties) {\n if(isset($properties['filterable']) && $properties['filterable']){\n $filterable_attributes[$key] = $properties['display'];\n }\n }\n return $filterable_attributes;\n}", "title": "" }, { "docid": "f0ff5e3692a11e46867a8b184e709d05", "score": "0.42791542", "text": "abstract protected function getStorage();", "title": "" }, { "docid": "73c610c0bbef5e80f260ce5f9df7a839", "score": "0.42600718", "text": "public static function attributeResourceMap()\n {\n return [\n 'store' => 'store',\n 'stores' => 'store',\n\n 'package' => 'package',\n 'packages' => 'package',\n\n 'delivery_window' => 'delivery_window',\n 'delivery_windows' => 'delivery_window',\n\n 'delivery' => 'delivery',\n 'deliveries' => 'delivery',\n\n 'customer' => 'customer',\n\n 'delivery_estimate' => 'delivery_estimate',\n 'delivery_estimates' => 'delivery_estimate',\n ];\n }", "title": "" }, { "docid": "93e394e32083fb8878300f000047c7e8", "score": "0.4256622", "text": "public function getAccessType()\n {\n return (string)$this->_xml->access_type;\n }", "title": "" }, { "docid": "bc0c72224d2bdbc6a1c7fc0769b945c2", "score": "0.42475685", "text": "protected static function mapToDatabase($type, $valueName) {\n $mapper = self::getMapper($type);\n if ($mapper->hasAttribute($valueName)) {\n $attributeDescription = $mapper->getAttribute($valueName);\n }\n else {\n // if the attribute does not exist, it might be the column name already\n foreach ($mapper->getAttributes() as $curAttributeDesc) {\n if ($curAttributeDesc->getColumn() == $valueName) {\n $attributeDescription = $curAttributeDesc;\n break;\n }\n }\n }\n if (!$attributeDescription) {\n throw new PersistenceException(\"No attribute '\".$valueName.\"' exists in '\".$type.\"'\");\n }\n\n $table = $mapper->getRealTableName();\n $column = $attributeDescription->getColumn();\n return [$table, $column];\n }", "title": "" }, { "docid": "386d8b12b828af970f580dc91599ef65", "score": "0.4247489", "text": "public function getDataTypeMapping();", "title": "" }, { "docid": "618ad099f90fa60bb63fa9fa4f81c26a", "score": "0.42375752", "text": "public function attr() {\n\n\t\t\t\t$attr = fusion_builder_visibility_atts(\n\t\t\t\t\t$this->args['hide_on_mobile'],\n\t\t\t\t\t[\n\t\t\t\t\t\t'class' => 'fusion-login-box fusion-login-box-' . $this->login_counter . ' fusion-login-box-' . $this->args['action'] . ' fusion-login-align-' . $this->args['text_align'] . ' fusion-login-field-layout-' . $this->args['form_field_layout'],\n\t\t\t\t\t]\n\t\t\t\t);\n\n\t\t\t\tif ( $this->args['class'] ) {\n\t\t\t\t\t$attr['class'] .= ' ' . $this->args['class'];\n\t\t\t\t}\n\n\t\t\t\tif ( $this->args['id'] ) {\n\t\t\t\t\t$attr['id'] = $this->args['id'];\n\t\t\t\t}\n\n\t\t\t\treturn $attr;\n\n\t\t\t}", "title": "" }, { "docid": "082173426fcc187d49b04f671487abee", "score": "0.42374772", "text": "public function getUseCustomStorage()\n {\n return true;\n }", "title": "" }, { "docid": "082173426fcc187d49b04f671487abee", "score": "0.42374772", "text": "public function getUseCustomStorage()\n {\n return true;\n }", "title": "" }, { "docid": "082173426fcc187d49b04f671487abee", "score": "0.42374772", "text": "public function getUseCustomStorage()\n {\n return true;\n }", "title": "" }, { "docid": "5d8f4846be47576762fa43ec86e2c6a4", "score": "0.42348492", "text": "public function getUseCustomStorage()\n {\n return false;\n }", "title": "" }, { "docid": "441199a68452f84fb8891fcb38941b40", "score": "0.42236343", "text": "public static function isKnown(string $attrType): bool\n {\n return isset(self::TYPES[$attrType]);\n }", "title": "" }, { "docid": "0c98c11274af39a0ae4b1a8360f9d16c", "score": "0.41963676", "text": "public function getStorage()\n {\n return $this->hasOne(Storage::className(), ['id' => 'storage_id']);\n }", "title": "" }, { "docid": "0e2d4138788e6293083a2f2d36f7020a", "score": "0.41908386", "text": "public function defineContentAttribute()\n {\n return AttributeType::Mixed;\n }", "title": "" }, { "docid": "3559c806848343676d66d08660cde72f", "score": "0.41874105", "text": "public function getStorageDiskField(): string;", "title": "" }, { "docid": "620dc69986123508712c511c5a7e845a", "score": "0.4184408", "text": "public function getAttributes()\n {\n return [\n static::ID_SPIDCODE => tc('SPID Attribute', 'SPID code'),\n static::ID_NAME => tc('SPID Attribute', 'Name'),\n static::ID_FAMILYNAME => tc('SPID Attribute', 'Family name'),\n static::ID_BIRTH_PLACE => tc('SPID Attribute', 'Place of birth'),\n static::ID_BIRTH_COUNTY => tc('SPID Attribute', 'County of birth'),\n static::ID_BIRTH_DATE => tc('SPID Attribute', 'Date of birth'),\n static::ID_GENDER => tc('SPID Attribute', 'Gender'),\n static::ID_COMPANYNAME => tc('SPID Attribute', 'Company name'),\n static::ID_REGISTEREDOFFICE => tc('SPID Attribute', 'Legal address'),\n static::ID_FISCALNUMBER => tc('SPID Attribute', 'Fiscal number'),\n static::ID_VATCODE => tc('SPID Attribute', 'VAT code'),\n static::ID_IDCARD => tc('SPID Attribute', 'ID Card'),\n static::ID_MOBILEPHONE => tc('SPID Attribute', 'Mobile phone'),\n static::ID_EMAIL => tc('SPID Attribute', 'Email'),\n static::ID_ADDRESS => tc('SPID Attribute', 'Address'),\n static::ID_EXPIRATIONDATE => tc('SPID Attribute', 'Expiration date'),\n static::ID_DIGITALADDRESS => tc('SPID Attribute', 'Email (PEC)'),\n ];\n }", "title": "" }, { "docid": "431693d189a237aa2be01c9ef7d8867e", "score": "0.4180795", "text": "function seeStorageLayout($storage_control_id){\t\t\n\t\t$storage_control_data = $this->StorageCtrl->getOrRedirect($storage_control_id);\n\t\t$storage_category = $this->StorageCtrl->getStorageCategory($storage_control_data);\n\t\t$this->Structures->set('storage_controls');\n\t\t\n\t\t$no_layout_msg = '';\n\t\tif($storage_category == 'no_d') {\n\t\t\t$no_layout_msg = 'no layout exists';\n\t\t} else if($storage_control_data['StorageCtrl']['coord_x_type'] == 'list') {\n\t\t\t$no_layout_msg = 'custom layout will be built adding coordinates to a created storage';\n\t\t}\n\t\t$this->set('no_layout_msg', $no_layout_msg);\n\t\t\n\t\t$translated_storage_type = $this->StructurePermissibleValuesCustom->getTranslatedCustomDropdownValue('storage types', $storage_control_data['StorageCtrl']['storage_type']);\n\t\t$storage_control_data['StorageCtrl']['translated_storage_type'] = ($translated_storage_type !== false)? $translated_storage_type : $storage_control_data['StorageCtrl']['storage_type'];\n\t\t$this->set('storage_control_data', $storage_control_data);\n\t\t\n\t\t$this->set('atim_menu', $this->Menus->get('/Administrate/StorageControls/listAll/'));\n\t\t$this->set('atim_menu_variables', array('StorageCtrl.id' => $storage_control_id));\n\t\t\n\t\t$this->Structures->set('empty', 'empty_structure');\n\t}", "title": "" }, { "docid": "9541c225463c30523aa3f51622306d5a", "score": "0.41678697", "text": "public function defineAttributes()\n {\n return array(\n 'id' => AttributeType::Number,\n 'name' => AttributeType::String,\n );\n }", "title": "" }, { "docid": "c906db798f300a5a91ff79e557ae2c0e", "score": "0.41554633", "text": "public function getAttachedDocumentTypeAllowableValues()\n {\n return [\n self::ATTACHED_DOCUMENT_TYPE_0,\nself::ATTACHED_DOCUMENT_TYPE_1,\nself::ATTACHED_DOCUMENT_TYPE_2,\nself::ATTACHED_DOCUMENT_TYPE_3,\nself::ATTACHED_DOCUMENT_TYPE_4,\nself::ATTACHED_DOCUMENT_TYPE_5,\nself::ATTACHED_DOCUMENT_TYPE_6, ];\n }", "title": "" }, { "docid": "d2518bff6811ffc21d2943d01ac50f97", "score": "0.4142408", "text": "function getAttributeType($attribute);", "title": "" }, { "docid": "d7f291c00d633fa737f31c33cff805a3", "score": "0.4140914", "text": "public function getNumericStorageId();", "title": "" }, { "docid": "949927756579180022fcdcc4dcda45a7", "score": "0.4118162", "text": "function isStorable() {\n return (($this->get('flags') & DynamicFormField::FLAG_EXT_STORED) == 0);\n }", "title": "" }, { "docid": "0ada4413a259e70adc7f44d4da2e87fe", "score": "0.41060632", "text": "public function storage()\n {\n return $this->hasMany('VirtMan\\Storage\\Storage');\n }", "title": "" }, { "docid": "edc5ca707a8ad1ec052de5c044ea4fc0", "score": "0.4097626", "text": "public function getStorageTable()\n {\n return $this->storageTable;\n }", "title": "" }, { "docid": "fcddb29dc9501ced879fd477f52d93cb", "score": "0.40966424", "text": "public static function intAttrNames()\n {\n return array(\n 'width',\n 'height',\n 'audio-plays',\n );\n }", "title": "" }, { "docid": "a456b60bbdd4d81290466e802b9c5377", "score": "0.40771854", "text": "public function getStorageAllowUsb()\n {\n if (array_key_exists(\"storageAllowUsb\", $this->_propDict)) {\n return $this->_propDict[\"storageAllowUsb\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "b2239b5b9c08042a64a62e380d50ecea", "score": "0.407248", "text": "function getStorageSize() {\n\t\treturn $this->instanceType->{'OS-FLV-EXT-DATA:ephemeral'};\n\t}", "title": "" }, { "docid": "0eb8923cb72d09db82b12e8bd913589d", "score": "0.40723702", "text": "public static function getStorageName()\n {\n return 'nb_catalog_lang';\n }", "title": "" }, { "docid": "4eab860fd7c0f57af0853aa8c36c9426", "score": "0.40706968", "text": "public function getDefaultDataFieldsMappingStorage()\r\n {\r\n return $this->defaultDataFieldsMappingStorage->get('fields', []);\r\n }", "title": "" }, { "docid": "4e6efc5a7a67dde74d16f90aa2f40ae8", "score": "0.40662086", "text": "public function getVisibility($path)\n {\n //$location = $this->applyPathPrefix($path);\n return [\n 'visibility' => $this->acl,\n ];\n }", "title": "" }, { "docid": "b3f709697425870371952758b0c92f16", "score": "0.4060537", "text": "public function getPhotoTypeAllowableValues()\n {\n return [\n self::PHOTO_TYPE__DEFAULT,\n self::PHOTO_TYPE_FACING,\n self::PHOTO_TYPE__7,\n self::PHOTO_TYPE__19,\n self::PHOTO_TYPE__13,\n self::PHOTO_TYPE_SI1,\n self::PHOTO_TYPE_SI2,\n self::PHOTO_TYPE_SI3,\n self::PHOTO_TYPE_SI4,\n self::PHOTO_TYPE_SI5,\n self::PHOTO_TYPE__3DS,\n self::PHOTO_TYPE_MARKETING,\n self::PHOTO_TYPE_TEXT,\n self::PHOTO_TYPE_ECOMMERCE,\n self::PHOTO_TYPE_UNDEF,\n self::PHOTO_TYPE_CUBI,\n ];\n }", "title": "" }, { "docid": "2ba0d869403cc46801034792d4917e14", "score": "0.4052418", "text": "public function getVisibility()\n {\n return $this->filesystem->getVisibility($this->path);\n }", "title": "" }, { "docid": "68832122d92efa6e004cc2b79aeb7d32", "score": "0.40489477", "text": "private static function getStandardTypes()\n {\n return array(\n 0 => array('type_key' => 0, 'name' => 'custom', 'fixed' => true, 'hidden' => true), // Manuelt størrelse\n 1 => array('type_key' => 1, 'name' => 'square', 'fixed' => false, 'hidden' => false, 'max_width' => 75, 'max_height' => 75, 'resize_type' => 'strict'),\n 2 => array('type_key' => 2, 'name' => 'thumbnail', 'fixed' => false, 'hidden' => false, 'max_width' => 100, 'max_height' => 67, 'resize_type' => 'relative'),\n 3 => array('type_key' => 3, 'name' => 'small', 'fixed' => false, 'hidden' => false, 'max_width' => 240, 'max_height' => 160, 'resize_type' => 'relative'),\n 4 => array('type_key' => 4, 'name' => 'medium', 'fixed' => false, 'hidden' => false, 'max_width' => 500, 'max_height' => 333, 'resize_type' => 'relative'),\n 5 => array('type_key' => 5, 'name' => 'large', 'fixed' => false, 'hidden' => false, 'max_width' => 1024, 'max_height' => 683, 'resize_type' => 'relative'),\n 6 => array('type_key' => 6, 'name' => 'website', 'fixed' => false, 'hidden' => false, 'max_width' => 780, 'max_height' => 550, 'resize_type' => 'relative'),\n 7 => array('type_key' => 7, 'name' => 'system-square', 'fixed' => true, 'hidden' => true, 'max_width' => 75, 'max_height' => 75, 'resize_type' => 'strict'),\n 8 => array('type_key' => 8, 'name' => 'system-thumbnail', 'fixed' => true, 'hidden' => true, 'max_width' => 100, 'max_height' => 67, 'resize_type' => 'relative'),\n 9 => array('type_key' => 9, 'name' => 'system-small', 'fixed' => true, 'hidden' => true, 'max_width' => 240, 'max_height' => 160, 'resize_type' => 'relative'),\n 10 => array('type_key' => 10, 'name' => 'system-medium', 'fixed' => true, 'hidden' => true, 'max_width' => 500, 'max_height' => 333, 'resize_type' => 'relative'),\n 11 => array('type_key' => 11, 'name' => 'system-large', 'fixed' => true, 'hidden' => true, 'max_width' => 1024, 'max_height' => 683, 'resize_type' => 'relative')\n );\n }", "title": "" }, { "docid": "dee12ebfa1cc0d9a4ceeb1c3d349ee95", "score": "0.40474257", "text": "public static function getStorageTableName()\n {\n return self::$storageTableName;\n }", "title": "" }, { "docid": "314566c20064cd5d276270f83d25f13f", "score": "0.4042029", "text": "public function getDisplayAttribute() {\n\t\tswitch ($this->attributes['type']) {\n\t\t\tcase 'bool':\n\t\t\t\treturn $this->attributes['value'] == 'true' || $this->attributes['value'] == '1' ? \"<i class='glyphicons glyphicons-check'></i>\" : \"<i class='glyphicons glyphicons-unchecked'></i>\";\n\t\t\tdefault:\n\t\t\t\t\n\t\t\t\tif (preg_match('/^dist\\_/', $this->attributes['code'])) {\n\t\t\t\t\treturn $this->attributes['value'] . ' ' .$this->attributes['units'];\n\t\t\t\t}\n\t\t\t\tif (preg_match('/^sports\\_/', $this->attributes['code'])) {\n\t\t\t\t\treturn $this->attributes['value'] > 0 ? \"<i class='glyphicons glyphicons-check'></i>\" : \"<i class='glyphicons glyphicons-unchecked'></i>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $this->attributes['value'];\n\t\t}\n\t}", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.40414178", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.40414178", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.40414178", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "7a8178c8f0a0c6024f7e0dfd3100d903", "score": "0.40414178", "text": "public function getStorage()\n {\n return $this->storage;\n }", "title": "" }, { "docid": "27e7c3fc1c6156129e88340a66580538", "score": "0.40393424", "text": "function db_type_map() {\n\n $map = array(\n\t 'varchar:normal' => 'VARCHAR',\n\t 'char:normal' => 'CHAR',\n\n\t 'text:tiny' => 'TINYTEXT',\n\t 'text:small' => 'TINYTEXT',\n\t 'text:medium' => 'MEDIUMTEXT',\n\t 'text:big' => 'LONGTEXT',\n\t 'text:normal' => 'TEXT',\n\n\t 'serial:tiny' => 'TINYINT',\n\t 'serial:small' => 'SMALLINT',\n\t 'serial:medium' => 'MEDIUMINT',\n\t 'serial:big' => 'BIGINT',\n\t 'serial:normal' => 'INT',\n\n\t 'int:tiny' => 'TINYINT',\n\t 'int:small' => 'SMALLINT',\n\t 'int:medium' => 'MEDIUMINT',\n\t 'int:big' => 'BIGINT',\n\t 'int:normal' => 'INT',\n\n\t 'float:tiny' => 'FLOAT',\n\t 'float:small' => 'FLOAT',\n\t 'float:medium' => 'FLOAT',\n\t 'float:big' => 'DOUBLE',\n\t 'float:normal' => 'FLOAT',\n\n\t 'numeric:normal' => 'DECIMAL',\n\n\t 'blob:big' => 'LONGBLOB',\n\t 'blob:normal' => 'BLOB',\n\n\t 'datetime:normal' => 'DATETIME',\n );\n\n return $map;\n}", "title": "" }, { "docid": "7194c4b3c069684a0c7eff5b312cdd62", "score": "0.40343398", "text": "public function concreteAttributes()\n {\n return [\n 'id',\n 'container',\n 'body',\n 'quantity',\n 'created',\n 'modified'\n ];\n }", "title": "" }, { "docid": "3b4c8fe1e0f04fbe0c4a1ba2076b3cd8", "score": "0.4032756", "text": "public static function __createStorage() {\n\t\tglobal $wpdb;\n\n\t\t$query[] = sprintf(\"CREATE TABLE IF NOT EXISTS %s\", self::__escapeIdentifier(static::__getTable()));\n\n\t\tfor ($schema = static::__getSchema(), $definitions = array(); list($property, $attributes) = each($schema);) {\n\t\t\t$type = strtolower($attributes[Property::ATTRIBUTE_TYPE]) ?: Property::TYPE_STRING;\n\t\t\t$primaryKey = in_array($property, $schema->getPrimaryKeys());\n\n\t\t\t$definition = self::__escapeIdentifier($property);\n\n\t\t\t// Type\n\n\t\t\tswitch ($type) {\n\t\t\t\tcase Property::TYPE_STRING:\n\t\t\t\t\t$definition .= \" TEXT\";\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault: \n\t\t\t\t\t$definition .= \" \" . strtoupper($type);\n\t\t\t}\n\n\t\t\t// Length\n\n\t\t\tswitch ($type) {\n\t\t\t\tcase Property::TYPE_STRING:\n\t\t\t\tcase Property::TYPE_INT:\n\t\t\t\t\t$definition .= \"(\" . (int) @$attributes[Property::ATTRIBUTE_LENGTH] . \")\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// Column attributes\n\n\t\t\tif (!isset($attributes[Property::ATTRIBUTE_COLUMN_ATTRIBUTES])) {\n\t\t\t\t$definition .= \" NOT NULL\";\n\n\t\t\t\tif (isset($attributes[Property::ATTRIBUTE_DEFAULT_VALUE])) {\n\t\t\t\t\t$defaultValue = $attributes[Property::ATTRIBUTE_DEFAULT_VALUE];\n\n\t\t\t\t\tif (is_callable($defaultValue))\n\t\t\t\t\t\t$defaultValue = call_user_func($defaultValue);\n\n\t\t\t\t\t$definition .= \" DEFAULT \" . self::__escape($defaultValue);\n\t\t\t\t}\n\n\t\t\t\tif (isset($attributes[Property::ATTRIBUTE_ON_UPDATE])) {\n\t\t\t\t\t$onUpdate = $attributes[Property::ATTRIBUTE_ON_UPDATE];\n\n\t\t\t\t\tif (is_callable($onUpdate))\n\t\t\t\t\t\t$onUpdate = call_user_func($onUpdate);\n\n\t\t\t\t\t$definition .= \" ON UPDATE \" . self::__escape($onUpdate);\n\t\t\t\t}\n\n\t\t\t\tif ($primaryKey) {\n\t\t\t\t\tif (Property::TYPE_INT == $type)\n\t\t\t\t\t\t$definition .= \" AUTO_INCREMENT\";\n\n\t\t\t\t\t// $definition .= \" PRIMARY KEY\";\n\t\t\t\t}\n\n\t\t\t} else \n\t\t\t\t$definition .= $attributes[Property::ATTRIBUTE_COLUMN_ATTRIBUTES];\n\n\t\t\t$definitions[] = $definition;\n\t\t}\n\n\t\t// Primary keys\n\n\t\tif ($primaryKeys = $schema->getPrimaryKeys()) {\n\n\t\t\t$definitions[] = \"PRIMARY KEY (\" .\n\t\t\t\timplode(\",\", array_map(function($key) {\n\t\t\t\t\treturn Record::__escapeIdentifier($key);\n\t\t\t\t}, $primaryKeys)) . \")\";\n\n\t\t}\n\n\t\t$query[] = \"(\" . implode(\",\", $definitions) . \")\";\n\n\t\t// Table options\n\n\t\t$query[] = \"ENGINE=MyISAM\";\n\n\t\t$query[] = \"DEFAULT CHARSET=utf8\";\n\t\t\n\t\treturn $wpdb->query(implode(\" \", $query));\n\t}", "title": "" }, { "docid": "7fc4314a3d199fb0390dc690fc11dbbf", "score": "0.40274695", "text": "public function getCacheModeAllowableValues()\r\n {\r\n return [\r\n self::CACHE_MODE_SINGLE,\r\n self::CACHE_MODE_HA,\r\n self::CACHE_MODE_HA_RW_SPLIT,\r\n self::CACHE_MODE_PROXY,\r\n self::CACHE_MODE_CLUSTER,\r\n ];\r\n }", "title": "" }, { "docid": "574421eb1a78e6eb049f349d81aeda7f", "score": "0.40238422", "text": "public function getVisibility($path)\n {\n $response = $this->oss->getObjectAcl($this->bucket, $path);\n return [\n 'visibility' => $response,\n ];\n }", "title": "" }, { "docid": "020dfa3a3ae1e4371ad685a72d424307", "score": "0.40170887", "text": "protected function getKindProperties() {\n $property_map = [];\n\n $property_map[self::TITLE_NAME] =\n parent::createStringProperty($this->ad_title, true);\n\n $property_map[self::PRICE_NAME] =\n parent::createStringProperty($this->ad_price, false); // TODO : Number property ?\n\n $property_map[self::DATE_NAME] =\n parent::createDateProperty($this->ad_date, false);\n\n return $property_map;\n }", "title": "" }, { "docid": "4fb7395f287c71d59ef5d6ae2b09536d", "score": "0.40147898", "text": "public function getKeyType(): string\n {\n return 'string';\n }", "title": "" }, { "docid": "5acd4e1e87bfc05e3887c9038449f5af", "score": "0.40022424", "text": "public function getTypeAttr($value)\n {\n \t$type \t= ['news' => '新闻资讯', 'notice' => '通知公告', 'fuwu' => '服务协议', 'privacy' => '隐私条款'];\n \treturn $type[$value];\n }", "title": "" }, { "docid": "6de0a9e775bfd29f4253b5ddbcc7581e", "score": "0.3998658", "text": "public function setVisibility(string $visibility): void;", "title": "" }, { "docid": "c1fe4d6f4746e0296c5fd916684d1f67", "score": "0.39973694", "text": "public function columnMap()\n {\n return array(\n 'attr_id' => 'attr_id',\n 'cat_id' => 'cat_id',\n 'attr_name' => 'attr_name',\n 'attr_input_type' => 'attr_input_type',\n 'attr_type' => 'attr_type',\n 'attr_values' => 'attr_values',\n 'attr_index' => 'attr_index',\n 'sort_order' => 'sort_order',\n 'is_linked' => 'is_linked',\n 'attr_group' => 'attr_group'\n );\n }", "title": "" }, { "docid": "bc6d28afb5aeb49136f3f9beeb8fdb44", "score": "0.39972475", "text": "public function setStorageKeys($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::BYTES);\n $this->storageKeys = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "658bd676c1774fc6a2310db2ffe97045", "score": "0.39727968", "text": "public function getStorage()\n {\n return $this->_storage;\n }", "title": "" }, { "docid": "8288d8a62c8be61fd8ae4cdd5c9c70eb", "score": "0.39725828", "text": "public function addStorage($storage)\n {\n // TODO\n }", "title": "" }, { "docid": "b7b099c8b0ad9a2f35060f592a13440f", "score": "0.39719775", "text": "public function getKeyType()\n {\n return 'string';\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "b95bca7c15d90e268de39511e97001dc", "score": "0.0", "text": "public function index()\n {\n $trade_license_abedon=TradeLicenseAbedon::all();\n return view('pages.dashboard.trade_license_abedon.trade_license_abedon_dash',compact('trade_license_abedon'));\n }", "title": "" } ]
[ { "docid": "a8219f7511c208b206421d7070626481", "score": "0.7624172", "text": "public function index() {\r\n $this->listing();\r\n }", "title": "" }, { "docid": "3119bf4433b0eb6e1e5f5d3aefff8f7c", "score": "0.7497972", "text": "public function listAction()\n {\n header('Content-Type: application/json');\n echo json_encode(self::list($this->table, $_GET, $_GET), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "0af0bed2cb54202b9b5f635b805dd270", "score": "0.7456703", "text": "public function index() {\n $this->list();\n }", "title": "" }, { "docid": "fc22d7eb65a1457db19e4e0a158758ae", "score": "0.74402595", "text": "public function indexAction()\n {\n // fetch list with pagination\n $data = $this->service->fetchList($this->getRequest()->getQuery(), [\n 'baseUri' => $this->getBaseUri()\n ]);\n\n // Title for the resource list\n $data['title'] = sprintf('%s List', $this->getResourceTitle());\n $data['pagination'] = $this->getPaginationControl($data['paginator']);\n\n return new ViewModel($data);\n }", "title": "" }, { "docid": "2626767a2d50900ecf067648343b72f2", "score": "0.7381386", "text": "public function index()\n {\n if ($this->perPage) {\n $items = $this->model->paginate($this->perPage);\n } else {\n $items = $this->model->all();\n }\n\n return $this->getViewByAction('index')->with([str_plural($this->resourceName) => $items]);\n }", "title": "" }, { "docid": "91b29c734dd33fa6ab5758c46e47554b", "score": "0.7325947", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n $optin = $this->Request()->getParam('optin', 2);\n $result = $this->resource->getList($offset, $limit, $filter, $sort, $optin);\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "042ad4983b357357fa2fc3e7b732ee82", "score": "0.7247973", "text": "public function index()\n\t{\n\t\t$resources = $this->resource->all();\n\n\t\treturn View::make('backend.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "1169ce14cfc5668f5eea745b36a1f890", "score": "0.7215383", "text": "public function index()\n {\n $recipeLists = RecipeList::paginate(5);\n return RecipeListResource::collection($recipeLists);\n }", "title": "" }, { "docid": "035f6de7d67b67c8aac107864bb88b5b", "score": "0.71633285", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Feast:list.html.twig');\n }", "title": "" }, { "docid": "fc107b824969a23c68c0c5f2741cd1c6", "score": "0.7162038", "text": "public function index()\n {\n $perPage = request()->get('perPage') ?? 45;\n $with = request()->get('with') ?? [];\n $sanitized = request()->except(['perPage', 'with']);\n return $this->resource::collection($this->repository->list($sanitized, $with, $perPage));\n }", "title": "" }, { "docid": "187ec101935a79ed032959ef1b75d4ae", "score": "0.7118583", "text": "public function actionList()\n {\n \n return $this->render('_list');\n }", "title": "" }, { "docid": "1f35abb1b2dfde3d664df626615da04d", "score": "0.7097082", "text": "public function index()\n {\n //\n return view('admin.resources.index')->with('resources', Resource::all());\n }", "title": "" }, { "docid": "d29399034be7f5e56ab0c5ec77f7aa5a", "score": "0.6957675", "text": "public function listAction()\n {\n $repository = $this->getDoctrine()\n ->getRepository('MyRecipesDosBundle:Recipe');\n \n $recipe = $repository->findAll();\n return $this->render('MyRecipesDosBundle:Recipe:list.html.twig', array('recipes' => $recipe));\n }", "title": "" }, { "docid": "7c5436fac4c77ee77f00987408854421", "score": "0.6907268", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_book->get_all();\n\t\t$this->template->set('title', 'Book List');\n\t\t$this->template->load('template', 'contents', 'book/book_list', $data);\n\t}", "title": "" }, { "docid": "2be70a4426b327e1d03c05eabde9d81b", "score": "0.6904562", "text": "public function index()\n {\n $this->getLists($this->table);\n }", "title": "" }, { "docid": "99d0096711c4ac4c16aec6ead9d6f9cb", "score": "0.6904266", "text": "public function index()\n {\n // Get Entries\n $entries = Entry::paginate(15);\n\n // Return Collection of entries as a resource\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "a3d61b5afcf1642fed8df944d4b81b6f", "score": "0.68888956", "text": "public function listAction()\n {\n return $this->render(\n 'BingoBundle:Page:clicks.html.twig',\n array(\n 'name' => 'FreakXoHBingo',\n 'version' => Kernel::VERSION,\n )\n );\n }", "title": "" }, { "docid": "561046d6e9e022bfc2781d4da04f6f0e", "score": "0.6882989", "text": "public function listAction() {\n\t\treturn $this->render('::base.html.twig');\n\t}", "title": "" }, { "docid": "95f382e4dda4333116a338434b4adcb7", "score": "0.68596107", "text": "public function index()\n {\n return view('resources.index', ['resources' => Resource::orderBy('title')->get()]);\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.6857365", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "374f77abe39cc273e93ae71403c0135d", "score": "0.6840818", "text": "public function index()\n {\n $user = Auth::user();\n $taskLists = TaskList::where('user_id', $user->id)->orderBy('title')->paginate(100);\n return TaskListResource::collection($taskLists);\n }", "title": "" }, { "docid": "a3720146415f23c943668d82d74b6ddc", "score": "0.68322086", "text": "public function indexAction() {\n\t\t$this->initInstance();\n\t\t//récupère les ressources disponibles\n\t\t//http://localhost/omeka-s/api/item_sets?resource_class_label=MediaResource\n\t}", "title": "" }, { "docid": "9051fd38b8c975ac149dd081631df266", "score": "0.6825128", "text": "public function index()\n {\n return $this->fetch('lst');\n }", "title": "" }, { "docid": "6348b646e527696af99b800ca8365e10", "score": "0.68106973", "text": "public function show()\n {\n //\n return BasicResource::collection(Basic::all());\n }", "title": "" }, { "docid": "ab587658e56065a3311a7edf4c3c2213", "score": "0.6785425", "text": "public function index()\n {\n return CollectionResource::collection(Collection::paginate(100));\n }", "title": "" }, { "docid": "9bbc51747f3455267943436dda172ca2", "score": "0.6783348", "text": "public function index()\n {\n $data['resource'] = Resource::all();\n return view('admin.resource.index',$data);\n }", "title": "" }, { "docid": "1ec8c70afa71a91f40bcd16f4d0c6776", "score": "0.67765594", "text": "public function list()\n {\n $datas = $this->model->getBooks(null, $this->level);\n $this->createView($this->_tab . DS . 'list', $datas);\n $this->view->page_title = 'BIBLIOGRAPHIE';\n \n $this->view->render($datas);\n }", "title": "" }, { "docid": "efb2c483c24911e6f2a3d9046c1ef1ef", "score": "0.6757838", "text": "public function listAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n\n if ($list->count() == 0) {\n $this->addFlashMessage(\\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate('general.emptyList', 'PtExtlist'), '', \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::INFO);\n }\n\n $this->view->assign('config', $this->configurationBuilder);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $list->getRenderedListHeader());\n $this->view->assign('listData', $list->getRenderedListData());\n $this->view->assign('aggregateRows', $list->getRenderedAggregateListData());\n\n $this->view->assign('exportIdentifiers', $this->exportIdentifiers);\n\n if ($this->filterbox) {\n $this->view->assign('filterBoxCollection', $this->filterboxCollection);\n $this->view->assign('filterbox', $this->filterbox);\n }\n\n if ($this->pagerIdentifier) {\n $this->view->assign('pagerCollection', $this->pagerCollection);\n $this->view->assign('pager', $this->pagerCollection->getPagerByIdentifier($this->pagerIdentifier));\n }\n }", "title": "" }, { "docid": "1fe41c52dd75a6340ba0e7415a6acc25", "score": "0.674248", "text": "public function index()\n {\n return TodoResource::collection(Todo::paginate(10));\n }", "title": "" }, { "docid": "43f39595a775a167f28377481ffc4a07", "score": "0.6737067", "text": "public function index()\n {\n $list = $this->repo->allPaged();\n\n if ( ! $list)\n {\n return $this->respondNotFound('Unable to fetch the selected resource');\n }\n\n $resource = new Fractal\\Resource\\Collection($list->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($list));\n\n return $this->fractal->createData($resource)->toArray();\n// return $this->response->collection($list, new $this->transformerClass);\n }", "title": "" }, { "docid": "f58dba1d10587784466e2956148410a7", "score": "0.67334116", "text": "public function index()\n {\n return RapportResource::collection(Rapport::paginate());\n }", "title": "" }, { "docid": "d267abfc43200f6a283a55648822e91b", "score": "0.67303824", "text": "public function index()\n\t{\n\t\t$this->listar();\t\n\t}", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67259544", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "59aa91737bf5b1a4cfdace1c9bec4b48", "score": "0.6723571", "text": "public function index()\n {\n $cars = Car::paginate(25);\n\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "d6fb6897e87bd5dae4bbc01d2557f9de", "score": "0.67158973", "text": "public function index()\n {\n return $this->getList();\n }", "title": "" }, { "docid": "2de5d92ccf694ea64c2b87a4044bdfed", "score": "0.6715862", "text": "public function index()\n {\n $resources = Resource::all();\n return view('Resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "26f3b9a4c8b215d418e8d18a1ba08064", "score": "0.6712196", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new ProfessorAluno();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67113537", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "3005a7694daa66d5411575d09a01fd3c", "score": "0.67108643", "text": "public function indexAction()\r\n\t{\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\r\n\t\t$this->_view->countActive = $this->_model->countItems($this->_arrParam, ['task' => 'count-active']);\r\n\t\t$this->_view->countInactive = $this->_model->countItems($this->_arrParam, ['task' => 'count-inactive']);\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "a061f90100fcefc770084243e89cb657", "score": "0.6705529", "text": "public function index()\n {\n\t\t\treturn RentalResource::collection(Rental::with()->paginate(25));\n }", "title": "" }, { "docid": "ce69134742a988b497785376ad59ad49", "score": "0.6700541", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->permission_model->get_all();\n\t\t$this->template->set('title', 'Permission List');\n\t\t$this->template->admin('template', 'list', $data);\n\t}", "title": "" }, { "docid": "e20bfea5cc73d4e9dc13d2e0589cf474", "score": "0.6690421", "text": "public function index()\n {\n // Get hospitals -- paginate\n $hospitals = Hospital::paginate(20);\n\n // Return collection of hospitals as a resource\n return HospitalResource::collection($hospitals);\n }", "title": "" }, { "docid": "b33ee86168eb0ade086aca85bd07f060", "score": "0.6676678", "text": "public function list()\n {\n $CRUDList = $this->crudHandler->list();\n\n return $this->handleResult($CRUDList);\n }", "title": "" }, { "docid": "c4f993dfe3f1f7bd25662bc6f177e545", "score": "0.66567606", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "a9152291e72de561c907f0d16b4dd8e9", "score": "0.6655209", "text": "public function indexAction()\n {\n // Get the entity we are making the list of\n $this->entity = $this->params()->fromRoute('entity');\n if (!isset($this->entity))\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Get information about the entity to display to view\n if (empty($info = $this->entity_table[$this->entity]))\n {\n return false;\n }\n\n // Change the view strategy if it is set to use a different one\n if (!empty($info['view_strategy']))\n {\n $view_strategy_class = $info['view_strategy'];\n if (!class_exists($view_strategy_class))\n {\n throw new \\Exception(\"The view strategy class being used to render this page cannot be found.\");\n }\n\n $view_strategy = new $view_strategy_class;\n if (!($view_strategy instanceof IViewStrategy))\n {\n throw new \\Exception(\"The view strategy being used must implement the IViewStrategy interface.\");\n }\n\n $this->setViewStrategy($view_strategy);\n }\n\n // Render the list using the strategy given\n $view_results = $this->view_strategy->render($this);\n if (false === $view_results)\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Attach javascript\n $this->getServiceLocator()->get('ViewRenderer')->headScript()->appendFile('/js/backend/list.js');\n\n return $view_results;\n }", "title": "" }, { "docid": "2193e1e8cdcf85402ba6929069f31734", "score": "0.66361135", "text": "public function index()\n {\n // Get assetModels\n $assetModels = AssetModel::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of assetModels as a resource\n return AssetModelResource::collection($assetModels);\n }", "title": "" }, { "docid": "ea55c90db1e5317add55946b5021b00c", "score": "0.6630588", "text": "public function index()\n {\n //get students\n $students = student::all();\n\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "0da8ac4a2988814b2e9c07b535204492", "score": "0.66288984", "text": "public function index()\n {\n $cars = Car::all();\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "5722fce7447cf2831c8c8b4f00a1c30e", "score": "0.66282606", "text": "public function index()\n {\n $entries = Entry::all();\n\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "bfcfe58010865f047fee4363102ac43d", "score": "0.661751", "text": "public function index()\n {\n //\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "6df1194a3c23fe8044d8a812c5bc1c7a", "score": "0.6611381", "text": "public function index()\n {\n $students = Student::all();\n\n return ResourcesStudent::collection($students);\n }", "title": "" }, { "docid": "daaefee9c34d3101903bfac8a955fb09", "score": "0.6606912", "text": "public function _index()\n {\n // The get_entries function in the\n // entries Streams API drivers grabs\n // entries from a stream.\n // The only really required parameters are\n // stream and namespace.\n\n $params = array(\n 'stream' => 'service',\n 'namespace' => 'service',\n 'paginate' => 'yes',\n 'page_segment' => 3\n );\n\n $this->data->service = $this->streams->entries->get_entries($params);\n \n // Build the page\n $this->template->title($this->module_details['name'])\n ->build('admin/index', $this->data);\n }", "title": "" }, { "docid": "de31ab079d9e333a0d8dac4edd6e4827", "score": "0.659799", "text": "public function index(Request $request, $resource = null)\n {\n $resource = $this->getResource($resource);\n $cards = $resource->renderCards($request);\n\n $resources = $resource->paginator($request)\n ->getCollection()\n ->mapInto($resource)\n ->map->indexFields($request);\n\n $paginationLinks = $resource->getPaginationLinks($request);\n $modelId = null;\n\n return view('orm.listado',\n compact('resource', 'cards', 'resources', 'paginationLinks', 'modelId')\n );\n }", "title": "" }, { "docid": "8f2f77c8b6e53012c03b4a96f9c83b40", "score": "0.6597118", "text": "public function showAction()\n {\n $this->forward('list');\n }", "title": "" }, { "docid": "987ab94de2b0e9b4db0aa8318acfa28e", "score": "0.65959674", "text": "public function actionIndex() {\n\n\t\t// Setup page title and first breadcrumb\n\t\t$this->view->title = yii::t( 'radtools', '{object} Overview', [\n\t\t\t'object' => $this->model_name,\n\t\t] );\n\t\t$this->addBreadCrumbs( [ $this->view->title ] );\n\n\t\t// Setup data feed\n\t\t$searchModel = new $this->searchModelClass();\n\t\t$dataProvider = $this->indexDataProvider( $searchModel );\n\n\t\t$this->beforeCrudValidation(\n\t\t\t$this->action->id,\n\t\t\t$this->model\n\t\t);\n\n\t\treturn $this->render( 'index', $this->indexRenderData( $searchModel, $dataProvider ) );\n\t}", "title": "" }, { "docid": "11f2bcdc890680ff98f96dec711093ed", "score": "0.6585779", "text": "public function index()\n {\n // Look for overriden views\n $this->overrideViews();\n\n // Get models to show\n $results = $this->makeIndexQuery()->paginate($this->perPage());\n\n // Render the view using the `listing` builder\n $listing = Listing::createFromController($this, $results);\n if ($this->parent) {\n $listing->parent($this->parent);\n\n // The layout header may have a many to many autocomplete\n $this->layout->with($this->autocompleteViewVars());\n }\n\n // Render view\n return $this->populateView($listing);\n }", "title": "" }, { "docid": "e5485fb94e84d7f1a64ec7a4f239f625", "score": "0.6584141", "text": "public function list()\n\t{\n\t\tif(!$this->user->loggedIn())\n\t\t{\n\t\t\t$this->addHTTPStatusCode('401');\n\t\t\t$this->addMessage('danger', 'You are not logged in. Please log in.');\n\t\t\t$this->addTpl('messages');\n\n\t\t\t$this->runHTML();\n\t\t}\n\n\t\t$arrivals = new arrivalModel($this->db);\n\n\t\t# Load GET variables\n\t\t$type_id \t= ! empty($this->params[0]) ? $this->params[0] : false;\n\t\t$name \t\t= ! empty($this->params[1]) ? $this->params[1] : false;\n\n\t\t$data['arrivals'] \t\t\t= $arrivals->getArrivals($type_id, $name);\n\t\t$data['arrival_statistics'] = $arrivals->getArrivalStatistics($type_id, $name);\n\n\t\tif(empty($data['arrivals']))\n\t\t{\n\t\t\t$this->addMessage('danger', 'There are no search results available.');\n\t\t}\n\n\t\t$this->addTpl('messages');\n\t\t$this->addView('search-results');\n\n\t\t$this->runHTML($data);\n\t}", "title": "" }, { "docid": "a3e1dd116a18a3fe10d66cbd4874818b", "score": "0.6569039", "text": "public function index()\n {\n $taskList = Task::with\n (\n [\n 'taskVersionInfo',\n 'userTaskAssignee',\n 'user',\n 'taskVersionInfo',\n 'taskVersionInfo.projectInfo'\n ]\n )->get();\n if(!empty($taskList)){\n return $this->sendSuccessResponse(200,TaskListResource::collection($taskList));\n } else {\n return $this->sendCustomMessage(404,'Sorry! No record found');\n }\n }", "title": "" }, { "docid": "578a96f128221bf5bcf98a2a211cadf8", "score": "0.65541565", "text": "public function listAction()\n {\n if ($this->checkApi->checkKey()) {\n return new JsonResponse($this->checkApi->checkKey());\n }\n\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('BookBundle:Book')->findBy([], ['readIt' => 'DESC']);\n\n return $this->sucessfullResponse($books);\n }", "title": "" }, { "docid": "faa4b62fb90476f0f5cc5f9d659baab7", "score": "0.6549958", "text": "public function index()\n {\n $this->list = $this->role->select();\n $this->display();\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65403616", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "df222e53d0f8cd5226717538186f640b", "score": "0.65378875", "text": "public function index()\n {\n return RepresentativeResource::collection($this->representativeRepository->list());\n }", "title": "" }, { "docid": "1265756e79b7627e4f5013af9b86193c", "score": "0.65362936", "text": "public function index()\n {\n $cards = Card::latest()->get();\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "b2667c25fd50ab1551a340a8fc91baf0", "score": "0.65340954", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\t\t\n\t\t$param = $this->getInput(array('id', 'category_id', 'title', 'phone', 'status', 'user_id'));\n\t\t\n\t\t$search = array();\n\t\tif ($param['user_id']) $search['user_id'] = $param['user_id'];\n\t\tif ($param['category_id']) $search['category_id'] = $param['category_id'];\n\t\tif ($param['title']) $search['title'] = array('LIKE', $param['title']);\n\t\tif ($param['status']) $search['status'] = $param['status'];\n\t\tif ($param['phone']) $search['phone'] = $param['phone'];\n\t\t\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $jobs) = Ola_Service_Job::getList($page, $perpage, $search, array('sort'=>'DESC', 'id'=>'DESC'));\n\t\tlist(, $categorys) = Ola_Service_Category::getList(1, 100);\n\t\t\n\t\t$this->assign('jobs', $jobs);\n\t\t$this->assign('categorys', Common::resetKey($categorys, 'id'));\n\t\t$this->assign('status', $this->status);\n\t\t$this->assign('param', $param);\n\t\t\n\t\t$this->cookieParams();\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($param) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('total', $total);\n\t}", "title": "" }, { "docid": "fe378ccbbcf7c936d31c946fb0a1abe1", "score": "0.651552", "text": "public static function index()\r\n {\r\n $pagination = array(\r\n 'page' => 1,\r\n 'show' => 20\r\n );\r\n\r\n if (isset($_GET['page'])) {\r\n $pagination['page'] = intval($_GET['page']);\r\n }\r\n if (isset($_GET['show'])) {\r\n $pagination['show'] = intval($_GET['show']);\r\n }\r\n\r\n $params = array(\r\n 'controller_list' => array(),\r\n 'app_list' => array()\r\n );\r\n $settings = array(\r\n 'controller_list' => array(),\r\n 'app_list' => array(\r\n 'index' => 'id',\r\n 'flat' => true\r\n )\r\n );\r\n\r\n $params['controller_list'] = array_merge($params['controller_list'], $pagination);\r\n\r\n $list_controller = api::query('controller/list', $params['controller_list'], $settings['controller_list']);\r\n $list_app = api::query('app/list', $params['app_list'], $settings['app_list']);\r\n\r\n view::load('controller/index', array(\r\n 'list' => $list_controller,\r\n 'list_app' => $list_app\r\n ));\r\n }", "title": "" }, { "docid": "5a83f2442eb3f462ff43689e90b37f4f", "score": "0.65112674", "text": "public function index()\n {\n $perfil = Perfil::paginate(10);\n return PerfilResource::collection($perfil);\n }", "title": "" }, { "docid": "09c0cdc32d290582c28c25cdde95a5d3", "score": "0.6509815", "text": "public function index()\n {\n $model = D('Shop');\n $list = $model->search(I());\n $this->assign(array(\n 'list' => $list,\n 'page' => $model->getPage()\n ));\n $this->display();\n }", "title": "" }, { "docid": "985830e6ee02598e997add9d706d5174", "score": "0.65035796", "text": "private function index() {\n $this->showPropertyList();\n }", "title": "" }, { "docid": "adc0929400b9ac560a34d7c75ca9432b", "score": "0.65013933", "text": "public function index()\n {\n //returns list of all todos\n return response(TodoResource::collection(Todo::all(),200));\n }", "title": "" }, { "docid": "702e474e3ad456bc6e922fd8cfae7ff3", "score": "0.6498765", "text": "public function index()\n {\n return TodolistResource::collection($request->user()->todolists);\n }", "title": "" }, { "docid": "157540995e279e1c89b30e8f20197d5d", "score": "0.6497863", "text": "public function index()\n {\n // Get some users\n $users = User::paginate(1);\n\n // Return collection of users as a resource\n return UserResource::collection($users);\n }", "title": "" }, { "docid": "7da1d53b99713be47f9b9e48be3777c8", "score": "0.64924854", "text": "public function index()\n {\n return SummaryResource::collection(Summary::latest()->paginate(16));\n }", "title": "" }, { "docid": "9c8446bdda246c4d668c853fcd5f4072", "score": "0.6492268", "text": "public function actionList()\n { \n $model = new Tag();\n $params = \\Yii::$app->request->getBodyParams();\n $dataProvider = $model->searchList($params);\n\n return $this->renderList('list', [\n 'model' => $model,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "7c3ea8e36693455e99cc4db69f0a7d10", "score": "0.6492092", "text": "public function indexAction ()\n {\n $this->_pageTitle = ['Hardware Library', 'Manufacturers'];\n // Display all of the manufacturers\n $mapper = ManufacturerMapper::getInstance();\n $paginator = new Zend_Paginator(new My_Paginator_MapperAdapter($mapper));\n\n // Set the current page we're on\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Set how many items to show\n $paginator->setItemCountPerPage(100);\n\n // Pass the view the paginator\n $this->view->paginator = $paginator;\n $this->view->canEdit = $this->view->IsAllowed(ProposalgenAclModel::RESOURCE_PROPOSALGEN_ADMIN_SAVEANDAPPROVE, AppAclModel::PRIVILEGE_ADMIN);\n }", "title": "" }, { "docid": "3c6cae22c627d1ece2035bcbd89096b4", "score": "0.64860356", "text": "public function indexAction()\n {\n $listing = $this->createListing(new TokenOptions($this->getDoctrine()->getEntityManager()));\n\n return array(\n 'listing' => $listing\n );\n }", "title": "" }, { "docid": "bf8285b7ef2df61a00673a171e608d25", "score": "0.64777464", "text": "public function index()\n {\n return $this->showAll(Libro::all());\n }", "title": "" }, { "docid": "f691e682eec0d2b53a65e9e0d6e040f5", "score": "0.64711225", "text": "public function index()\n {\n $listings = Listing::orderBy('created_at', 'desc')->paginate(5);\n\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "9255fd66973761a2e3741769b5ec9434", "score": "0.6470924", "text": "public function index()\n {\n $listings = Listing::orderBy('created_at', 'desc')->get();\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "34ada56858882a77b2fb954f2f9ca76c", "score": "0.646668", "text": "public function index()\n {\n $list = $this->surl->all();\n return view('surl::list', compact('list'));\n }", "title": "" }, { "docid": "2d1d93e01feb274bbc89ed5d265eb12e", "score": "0.64648193", "text": "public function index()\n {\n $listings = Listing::latest()->paginate(5);\n return view('frontend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "15d0c11efdda27cd3d3db89cdd68dc5e", "score": "0.64641106", "text": "public function index()\n {\n $lists = ListModel::paginate();\n\n return response()->json([\n 'lists' => $lists,\n ],200);\n }", "title": "" }, { "docid": "c839caf8071b295e2edd8ff7dae1d275", "score": "0.64635026", "text": "public function overviewAction()\n\t{\n\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_News_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "d3bdd3e6d0c926fc9a4a00e01d03f377", "score": "0.6459902", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $links) = Gou_Service_Links::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('links', $links);\r\n\t\t$this->assign('types', $this->link_type);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "7772c381ff4b5a7b8e508efe879c68e0", "score": "0.6456159", "text": "public function index()\n {\n return BookResource::collection($this->bookRepo->get());\n }", "title": "" }, { "docid": "2f4d4a0caa725d66f7ce8489ee1f24d9", "score": "0.6455395", "text": "public function index (): AnonymousResourceCollection {\n return RecipeResource::collection(Recipe::paginate(25));\n }", "title": "" }, { "docid": "4592b6588dd629125090dcc48a6bcc63", "score": "0.6452328", "text": "public function index()\n {\n $labels = Label::paginate(10);\n\n return LabelResource::collection($labels);\n }", "title": "" }, { "docid": "6611f31e08d219eb38ba36cc62c071e1", "score": "0.6448349", "text": "public function index()\n {\n $Entreprises = Entreprise::paginate(15);\n\n \n return EntrepriseResource::collection($Entreprises);\n }", "title": "" }, { "docid": "b8ef0597ffab483dc42bf522e376a0f9", "score": "0.6447616", "text": "public function index()\n {\n return $this->showAll(Libreria::all());\n }", "title": "" }, { "docid": "71dbc6c395500f777fbf4ca2d2f41ee2", "score": "0.6447611", "text": "public function index()\n {\n $this->list->setText(trans('mconsole::gallery.form.title'), 'title')\n ->setText(trans('mconsole::gallery.form.slug'), 'slug')\n ->setSelect(trans('mconsole::settings.options.enabled'), 'enabled', [\n '1' => trans('mconsole::settings.options.on'),\n '0' => trans('mconsole::settings.options.off'),\n ], true);\n \n return $this->list->setQuery($this->repository->index())->setAddAction('gallery/create')->render(function ($item) {\n return [\n trans('mconsole::tables.id') => $item->id,\n trans('mconsole::gallery.table.updated') => $item->updated_at->format('m.d.Y'),\n trans('mconsole::gallery.table.slug') => $item->slug,\n trans('mconsole::gallery.table.title') => $item->title,\n ];\n });\n }", "title": "" }, { "docid": "131082979c43e5665d6efcb3e04fa7ec", "score": "0.64435947", "text": "public function index()\n {\n // get hotels\n $hotels = Hotels::orderBy('created_at','desc')->paginate(50);\n // returnn collection of hotels as a resource\n return HotelResource::collection($hotels);\n }", "title": "" }, { "docid": "f787cf0275f5c622f8f691b59884e61b", "score": "0.64413464", "text": "public function resources(){\n\t\n\t\tif($this->secureCheck()){\n\t\t\treturn;\n\t\t}\n\t\n\t\t$sortEntry = 'id';\n\t\tif ($this->request->isParameterNotEmpty ( 'actionid' )) {\n\t\t\t$sortEntry = $this->request->getParameter ( \"actionid\" );\n\t\t}\n\t\n\t\t$modelResources = new SyResource();\n\t\t$resourcesArray = $modelResources->resourcesInfo($sortEntry);\n\t\n\t\t$navBar = $this->navBar();\n\t\t$this->generateView ( array (\n\t\t\t\t'navBar' => $navBar, 'resourcesArray' => $resourcesArray\n\t\t) );\n\t\n\t}", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.6441343", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.6441343", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b0fb738cbb82acd366e1a8234e16b18a", "score": "0.643729", "text": "public function listAction() {\n\t\t$this->view->setVariablesToRender(array('ideas'));\n\n\t\t$ideas = $this->ideaRepository->findAll();\n\t\t$this->view->assign('ideas', $ideas);\n\t}", "title": "" }, { "docid": "12275dd16579b5f5bbc0fd01c4c0372b", "score": "0.64357305", "text": "public function index()\n {\n $users = $this->paginate($this->Users);\n\n $this->set(compact('users'));\n }", "title": "" }, { "docid": "17ab781471a36ee728b0e79e5f76d380", "score": "0.64334357", "text": "public function lists() {\r\n\t\t$args = array();\r\n\t\t$args['method'] = 'lists';\r\n\r\n\t\treturn $this->callServer( $args );\r\n\t}", "title": "" }, { "docid": "5395605a12301b3a21ad602afe2ffc04", "score": "0.6432711", "text": "public function index()\n\t{\n\t\treturn View::make('Ucionica.index')\n\t\t->with('list', $this->_list());\n\t}", "title": "" }, { "docid": "3bc1ba2777d39aa58a5ff9ee7b0585e8", "score": "0.6431664", "text": "public function index()\n {\n $articles = Article::paginate(5);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "c0ac87b1ec946c408fda431b615e8496", "score": "0.6424874", "text": "public function indexAction()\n {\n /**\n * Adding new Listing\n * IE hack to process image buttons\n */\n if($this -> _request -> getParam('add_listing')\n && !$this -> _request -> getParam('ListingValidated')\n && !$this -> _request -> getParam('ListingAdded'))\n $this -> _forward('ValidateListing');\n\n else\n {\n /** If Listing submition is validated with errors */\n if($this -> _request -> getParam('ListingValidated'))\n {\n $Err = new Zend_Config_Xml(ROOT . 'configs/error_messages/messages.xml', 'errors');\n /** Preparing warning block */\n $this -> smarty -> assign('WarnTitle', $Err -> error_block_title);\n $this -> smarty -> assign('WarnMessages', $this -> _request -> getParam('Errors'));\n $errBlock = $this -> smarty -> fetch('warningBlock.tpl');\n \n $this -> smarty -> assign('warningBlock', $errBlock);\n }\n \n $this -> smarty -> assign('PageBody', 'area/listings.tpl');\n /** Use Calendar js lib */\n $this -> smarty -> assign('UseCalendar', true);\n /** Use Interface js lib */\n $this -> smarty -> assign('UseInterface', true);\n\n $listings = $this -> Listings -> getListingsByUserId($this -> AreaControl -> getUserData() -> id) -> toArray();\n $this -> smarty -> assign('Listings', array_reverse($listings));\n \n $this -> smarty -> assign('CategoryList', $this -> Options -> getCategoryList());\n $this -> smarty -> assign('IndustryList', $this -> Options -> getIndustiresList());\n $this -> smarty -> assign('ListingType', $this -> Options -> getListingTypesList());\n \n $this -> smarty -> assign('EducationLevel', $this -> Options -> getDegreeEducationList());\n $this -> smarty -> assign('Experience', $this -> Options -> getExperienceList());\n $this -> smarty -> assign('Salary', $this -> Options -> getSalaryList());\n \n $this -> smarty -> assign('ProfileType', $this -> AreaControl -> getUserData() -> acc_type);\n\n $this -> smarty -> assign('Title', 'Listings');\n\n $this -> smarty -> display('layouts/main.tpl');\n }\n }", "title": "" }, { "docid": "22f567e14b60877a7dc5bceb24db0295", "score": "0.64199615", "text": "public function index()\n {\n $response = Route::paginate();\n return response(['data' => RouteResource::collection($response), 'message' => 'Retrieved successfully'], 200);\n }", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.64198047", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" } ]
219417189fb05c92f79e3d6eaea51359
Display a listing of the Department.
[ { "docid": "05f3f52e2a4ebd9a8a5138f77792fe83", "score": "0.66905296", "text": "public function index(\\Request $request)\n {\n if (request('search')) {\n $departments = $this->departmentRepo->search(request('search'));\n } else {\n $departments = $this->departmentRepo->orderBy('order')->paginate();\n }\n\n return view('backend.departments.index')\n ->with('departments', $departments);\n }", "title": "" } ]
[ { "docid": "dcd62a4ad57d1fb5943ac4f7d240f427", "score": "0.78620297", "text": "public function department_list() {\n \n $pageTitle = '';\n $pageData = [\n 'pageTitle' => 'Departments List',\n 'formAction' => '',\n 'redirecturl' => '',\n 'getEditDayaUrl' => url('admin/get_complain_type_edit_data'),\n 'delUrl' => url('admin/delete_department_data'),\n ];\n $list = Department::get();\n return View('backend.Departements.list', compact('list', 'pageData'));\n }", "title": "" }, { "docid": "e0ae9794525635dbbe9b6c960df60d62", "score": "0.768541", "text": "public function show(Department $department)\n {\n //\n }", "title": "" }, { "docid": "e0ae9794525635dbbe9b6c960df60d62", "score": "0.768541", "text": "public function show(Department $department)\n {\n //\n }", "title": "" }, { "docid": "e0ae9794525635dbbe9b6c960df60d62", "score": "0.768541", "text": "public function show(Department $department)\n {\n //\n }", "title": "" }, { "docid": "e0ae9794525635dbbe9b6c960df60d62", "score": "0.768541", "text": "public function show(Department $department)\n {\n //\n }", "title": "" }, { "docid": "e0ae9794525635dbbe9b6c960df60d62", "score": "0.768541", "text": "public function show(Department $department)\n {\n //\n }", "title": "" }, { "docid": "a26257afba3b084be684dfce4de246b8", "score": "0.76526403", "text": "public function index()\n {\n return view('backend.department.list', [\n 'depertments' => Department::all(),\n ]);\n }", "title": "" }, { "docid": "329e58531392c59e91ead18c0354e9c9", "score": "0.7609143", "text": "public function index()\n {\n $department = Department::all();\n\n return view('backEnd.campus.department.index', compact('department'));\n }", "title": "" }, { "docid": "62890cbc729a3f6a9cb0a50bd2718470", "score": "0.7569019", "text": "public function index()\n {\n return Department::all();\n }", "title": "" }, { "docid": "62890cbc729a3f6a9cb0a50bd2718470", "score": "0.7569019", "text": "public function index()\n {\n return Department::all();\n }", "title": "" }, { "docid": "1681a5fa7c70d6e9651096f08a8c537d", "score": "0.7501482", "text": "public function index()\n {\n $departments = department::all();\n return view('admin.department.view-departments', compact('departments'));\n }", "title": "" }, { "docid": "4ebf4b21f061dfd6b49f3c36b340e279", "score": "0.74656445", "text": "public function index()\n {\n if (Request::ajax()) {\n return $this->departmentRepo->getAll('all', 'name', 'ASC');\n }\n\n $departments = $this->departmentRepo->getAll('paginate', 'name', 'asc');\n\n foreach ($departments as $department) {\n $department->description = substr($department->description, 0, 117).'...';\n }\n\n return View::make('department/index', compact('departments'));\n }", "title": "" }, { "docid": "ff202bbc30c7ea1d4eb1bffd473ff1cd", "score": "0.74600965", "text": "public function index()\n {\n $departments = Department::all();\n \n return view('departments.index',compact('departments'));\n }", "title": "" }, { "docid": "9df842dac0fb8718ac78f64fa653ee7a", "score": "0.7434387", "text": "public function index()\n\t{\n\t\t$departments = Department::all();\n\t\treturn View::make('departments.index')->with('departments', $departments);\n\t}", "title": "" }, { "docid": "466d9928b96f24e005a3400423e7a3dc", "score": "0.7427692", "text": "public function index() {\n\n $department = DB::table('department')->get();\n return view('department.index',compact('department'));\n }", "title": "" }, { "docid": "9230b5370e4cb1067e55cf57fe95a0c0", "score": "0.74080145", "text": "public function index()\n {\n $departments = Department::orderBy('name')->paginate(10);\n\n return view('departments.index')->with('departments', $departments);\n }", "title": "" }, { "docid": "9c0b668c8941062a6c58cd845dc8c348", "score": "0.74065286", "text": "public function index()\n {\n //$departments = $this->department->all();\n\n return view('Iprofile::admin.departments.index', compact(''));\n }", "title": "" }, { "docid": "be9c99d506f24c677b08d8ea6c721cd1", "score": "0.739446", "text": "public function index()\n {\n $departments = Department::all();\n return view('departments.index', compact('departments'));\n }", "title": "" }, { "docid": "6d784aa86ffa37740249b88fc9b97d33", "score": "0.7325447", "text": "public function index()\n {\n $departments = Department::getAllDepartments();\n return DepartmentResource::collection($departments);\n }", "title": "" }, { "docid": "bb9d1e96122322f567b921c5dda9cee5", "score": "0.7322061", "text": "public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $entities = $em->getRepository('JVJUtilBundle:Department')->findAll();\r\n\r\n return $this->render('JVJUtilBundle:Department:index.html.twig', array(\r\n 'entities' => $entities\r\n ));\r\n }", "title": "" }, { "docid": "20b5db85354bdf0489f21e98354bda16", "score": "0.7292924", "text": "public function index()\n {\n //get department\n $dept= Department::paginate(15)->get();\n return DeptResource::collection($dept);\n }", "title": "" }, { "docid": "383636799e189da542ddc49ee9de65c2", "score": "0.72818255", "text": "public function index()\n {\n return DepartmentResource::collection(Department::paginate(5));\n }", "title": "" }, { "docid": "12a4688fb9e8b030bdce1c7fabcf2f7b", "score": "0.72803164", "text": "public function show(Departments $departments)\n {\n //\n }", "title": "" }, { "docid": "86a0f25793d31e50b93ffb31db376c06", "score": "0.72315955", "text": "public function index()\n {\n $departments=Department::all();\n $advertisings=Advertising::all();\n $advertising=$advertisings->first();\n $aside_advertisings=AsideAdvertising::all();\n $user = Auth::user();\n\n return view(\"admin.department.index\", compact(\"departments\", \"aside_advertisings\", \"advertising\", \"user\"));\n }", "title": "" }, { "docid": "0dd61f6572d8431d7f5644709cd82026", "score": "0.72283393", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $facultyDepartments = $em->getRepository('CareerBundle:FacultyDepartment')->findAll();\n\n return $this->render('facultydepartment/index.html.twig', array(\n 'facultyDepartments' => $facultyDepartments,\n ));\n }", "title": "" }, { "docid": "7391c527c4c8553b9708b14fe65ba2bb", "score": "0.7207509", "text": "public function index()\n {\n // $departments = Department::all();\n return view('admin.templates.department.index')\n ->with(['menu'=>'department']);\n // ->with(compact('departments'));\n }", "title": "" }, { "docid": "48545efd2c3426f023727dbb3495422f", "score": "0.7192619", "text": "public function show(department $department)\n {\n //return view('admin.add-department');\n }", "title": "" }, { "docid": "74c48dbde69c4948e666865eee3a6db0", "score": "0.7179885", "text": "public function index()\n {\n $data = Department::get();\n return view('pages.department',['data'=>$data]);\n\n }", "title": "" }, { "docid": "1bb65ce646bef03f3f8fa5ebe06b26d9", "score": "0.7155157", "text": "public function index()\n {\n //$departments = \\App\\department::all();\n $departments = \\App\\department::orderBy('deptname', 'asc')->get();\n return view('departments', compact('departments') ); \n }", "title": "" }, { "docid": "860b014dadda5e359976ebf5d7008946", "score": "0.71216136", "text": "public function actionIndex()\n {\n $searchModel = new DeptDetailsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "41d36a5135ec628fadf37d35e41db2bb", "score": "0.7107612", "text": "public function index()\n {\n \n $sort = Input::only('sortBy', 'direction');\n $page = Input::get('page', 1);\n $search = Input::only('search');\n $departments = $this->department->all(compact('sort', 'page', 'search'));\n $departmentChart = $this->department->getDepartmentChart();\n $message = \"All departments and their limit status\";\n return View('departments/index')\n ->with(\n compact('departments', 'departmentChart')\n );\n }", "title": "" }, { "docid": "3603d1efa347be4912a54470da659845", "score": "0.6974104", "text": "public function departments()\n {\n $self = 'departments';\n\n if (Auth::user()->user_name !== 'admin') {\n $get_perm = permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n\n $departments = Department::all();\n return view('admin.departments')->with('departments', $departments);\n\n }", "title": "" }, { "docid": "cf2200d40ea8d2d354204bb7a7f5405c", "score": "0.6950046", "text": "public function index()\n {\n //Communcating via (eloquent) orm (easier to do database query rather write sql query.)\n //database\n //$departments = Department::all()->paginate(1);\n\n $departments = Department::orderBy('first_name','asc')->paginate(10);\n //loading resources/views/departments/index.blade.php\n return view('departments.index')->with('departments', $departments);\n }", "title": "" }, { "docid": "1d344c2f6972584a1ca779708b3f78bf", "score": "0.694817", "text": "public function list(){\n\n /*DB::table('employees')->orderBy('id')->chunk(100, function($users){\n foreach ($users as $user) {\n echo $user->first_name;\n }\n\n });*/\n /*echo \"New changes added\"; -- Added comment for department listing*/\n $department = Department::orderBy('id', 'asc')->paginate(2);\n return view('department.index', ['department'=>$department]);\n }", "title": "" }, { "docid": "d971d4e110b0a91aa2ca1ab9753fec47", "score": "0.6929983", "text": "public function departments(){\r\n\r\n\t\t$data['departments'] = $this->db->select('lab_department_id, department_name')->from('lab_departments')->get()->result_array();\r\n\r\n\t\t$data['view'] = 'lab/departments';\r\n\t\t$this->load->view('layout', $data);\t\r\n\r\n\t}", "title": "" }, { "docid": "6079a4274c9eb34d1a61c5c87501b146", "score": "0.69291025", "text": "public function show(Dept $dept)\n {\n //\n }", "title": "" }, { "docid": "4e162382f4240e6510e037567164f1ab", "score": "0.68811744", "text": "public function index()\n {\n $user = User::where('name', '=', Auth::user()->name)\n ->where('surname', '=', Auth::user()->surname)->first();\n\n $role = Role::where('description', 'like', '%' . 'uper' . '%')->first();\n\n if ($role->id == $user->role_id)\n $departments = DB::table('departments')->get();\n else\n $departments = Department::where('company_id', '=', $user->company_id)->get();\n\n return view('department.index', ['departments' => $departments]);\n }", "title": "" }, { "docid": "223503676c330c3d530dbb30a115e28b", "score": "0.68735504", "text": "public function index()\n {\n //\n $departments=Department::all();\n return view(\"departments.index\",[\"departments\"=>$departments]);\n\n }", "title": "" }, { "docid": "a61662779932130b7b5b0d8b10fbbd9e", "score": "0.6865657", "text": "public function index()\n {\n $depts = Dept::all();\n return view('register.dept.index', compact('depts'));\n }", "title": "" }, { "docid": "9709cbdf70a6d8eb3f9eb4cf9dc77009", "score": "0.6856368", "text": "function action_get() {\n\n $em = FW::getEM();\n if ($itemId = $this->request->params('id')) {\n $items = $em->getRepository('Entity\\Department')->find($itemId);\n $items = $items ? $items->as_array() : null;\n } else {\n $q = $em->createQuery('SELECT d, f FROM Entity\\Department d LEFT JOIN d.faculty f ORDER BY f.name');\n $items = $q->getArrayResult();\n }\n\n $view = View::create(array(\"FW\", \"json\"), array());\n if ($items) {\n $view->setData($items);\n } elseif($itemId) {\n $view->setHttpResponseCode(404);\n } else {\n $view->setData(array());\n }\n $view->display();\n }", "title": "" }, { "docid": "bdb18cde8d8022899117feb05ab707ce", "score": "0.6854174", "text": "public function index(Request $request, Department $id)\n {\n $showDep = Department::where('id', $id)->first();\n if ($showDep){\n dd($showDep);\n }\n\n $sortBy = $request->get('sort_by', 'id');\n $orderBy = $request->get('order_by', 'asc');\n $perPage = $request->get('per_page');\n\n if ($perPage) {\n /*$employees = DB::table('employees')->orderBy($sortBy, $orderBy)->paginate($perPage);*/\n $employees = Employee::query()->with('department')->orderBy($sortBy, $orderBy)->paginate($perPage);\n return view('employees.index', compact('employees'));\n }\n else{\n $employees = Employee::query()->with('department')->take(10)->paginate(10);\n return view('employees.index', compact('employees'));\n }\n\n\n }", "title": "" }, { "docid": "011ed60402c4704a56de112f97a8f358", "score": "0.68251675", "text": "public function depindex()\n\t{\n\t\t$dep = department::all();\n\t\treturn Response::json($this->response->Collection($dep, new DepartmentTransformer));\n\t}", "title": "" }, { "docid": "7f41b5a1d86a06e6542f41ff985ec68b", "score": "0.678806", "text": "public function index() {\n $departments = DepartmentResource::collection(Department::all());\n\n return response()->json(compact('departments'));\n }", "title": "" }, { "docid": "e742d9c6a3eebedcc41c5a3c6baf6b0d", "score": "0.6773462", "text": "public function all()\n {\n $departments = Department::orderBy('created_at', 'desc')->paginate(10);\n return response()->view('department.all', [\n 'departments' => $departments\n ]);\n }", "title": "" }, { "docid": "c71238c5d8e900c36bc01554acdb4ffb", "score": "0.67699254", "text": "public function index()\r\n\t{\r\n\t\t$this->load->model('pharmacyreports/Category_report_model');\r\n\t\t$model = $this->Category_report_model;\r\n\t\t$data['departments']=$model->get_all_departments();\r\n\t\t$this->load->view(\"pharmacyreports/listing\", $data);\t\r\n\t}", "title": "" }, { "docid": "52d6e6e2ef2030a8cab3d7cf4098e6c7", "score": "0.6765728", "text": "public function showAction($id)\r\n {\r\n $em = $this->getDoctrine()->getEntityManager();\r\n\r\n $entity = $em->getRepository('JVJUtilBundle:Department')->find($id);\r\n\r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Department entity.');\r\n }\r\n\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('JVJUtilBundle:Department:show.html.twig', array(\r\n 'entity' => $entity,\r\n 'delete_form' => $deleteForm->createView(),\r\n\r\n ));\r\n }", "title": "" }, { "docid": "ce7840f4affed21589e48e28a0860129", "score": "0.67575514", "text": "public function index()\n {\n //\n \n return Departments::all();\n }", "title": "" }, { "docid": "c5a61b74f025b243b28f4680e7300096", "score": "0.67441225", "text": "public function show(Department $department)\n {\n return $department;\n }", "title": "" }, { "docid": "c5a61b74f025b243b28f4680e7300096", "score": "0.67441225", "text": "public function show(Department $department)\n {\n return $department;\n }", "title": "" }, { "docid": "31dccf16098b8b838e47ce215b199dae", "score": "0.6722554", "text": "public function index(){\n //emp == subject\n $departmentData['data'] = Departments::orderby(\"name\",\"asc\")\n \t\t\t ->select('id','name')\n \t\t\t ->get();\n\n // Load index view\n \treturn view('pages.index')->with(\"departmentData\",$departmentData);\n }", "title": "" }, { "docid": "9a1547354d59b833e1065a3f504bb2f4", "score": "0.66964746", "text": "public function index()\n {\n $departments = Department::all();\n return response()->json($departments);\n }", "title": "" }, { "docid": "b2cc4003830fe11fba2033df200345d7", "score": "0.66964644", "text": "public function index()\n {\n $departments = Department::all();\n\n return response()->json($departments);\n }", "title": "" }, { "docid": "56a486f6d9927140d8b06b0432a74808", "score": "0.6686108", "text": "public function index()\n {\n $designations = Designation::select('designations.name','designations.id','departments.name as dept_name','department_id')->where(['designations.deleted' => '0'])->Join('departments', 'departments.id' , '=', 'designations.department_id')->get()->toArray();\n \n $department = Department::select('id','name')->where(['deleted' => '0'])->get()->toArray();\n return view('admin.employees.designations', compact('designations', 'department'));\n }", "title": "" }, { "docid": "0eb54c072ce761adb1d707cd3796b769", "score": "0.66746557", "text": "public function index(DepartmentDataTable $dataTable)\n {\n return $dataTable->render('maintenance.divisions_departments.departments.index');\n }", "title": "" }, { "docid": "f1799bce9021e4aaf9570b4e5cf98be8", "score": "0.6671119", "text": "public function index()\n {\n $department_list = Department::all();\n $designation_list = DB::table('designations') \n ->leftJoin('departments','departments.id','=','designations.department_id')\n ->select('designations.designation_name','designations.id as desigid','designations.department_id','departments.department_name')\n ->get();\n return view('Backend.Designation.designation',compact('department_list','designation_list'));\n }", "title": "" }, { "docid": "79ae5dd1e2b77754297d53409bbcb0cd", "score": "0.6667408", "text": "public function index()\r\n {\r\n $allowedDepartments = $this->getAllowedDepartments();\r\n $notifications = new Notifications();\r\n return view('mall_manager.departments.index', ['title' => trans('admin.departments_control'), 'notifications' => $notifications, 'allowedDepartments' => $allowedDepartments, 'depId' => 0]);\r\n }", "title": "" }, { "docid": "08f55a6a2b1c6c6c49df107d5bc446a9", "score": "0.66495836", "text": "public function show($id)\n {\n $department_show = $this->repository->findOrFailDepartment($id);\n $paging_course = $department_show->courses()->paginate(5);\n \n return view('admin/department.show', compact('department_show', 'paging_course'));\n }", "title": "" }, { "docid": "985bfbd58876804f25c94d0e02324f65", "score": "0.6624452", "text": "public function index()\n {\n //\n $departments = Department::orderby('id', 'ASC')->paginate(10);\n// return response()->json($departments);\n\n // Return faculty name from departments table based on foreign key constraints.(foreign key=faculty_id )\n// foreach ($departments as $key => $val){\n// $faculty_name = Faculty::where(['id'=>$val->faculty_id])->first();\n// $departments[$key]->faculty_name = $faculty_name;\n// }\n $faculties = DB::table('faculties')->get();\n\n $faculty = Department::with('faculty')->get();\n\n return view('departments.index', ['departments'=>$departments, 'faculties'=>$faculties, 'faculty'=>$faculty]);\n }", "title": "" }, { "docid": "1864179db0728bbb52a762dd9d89bc1d", "score": "0.66155225", "text": "public function department() {\n if (permission::permitted('formdata-departments')=='fail'){\n\t\t return view('errors.permission-denied');\n \n }\n\n $data = table::department()->select('tbl_form_department.*','tbl_form_company.company','tbl_people.firstname')->leftjoin('tbl_form_company', 'tbl_form_department.comp_code', '=', 'tbl_form_company.id')->leftjoin('tbl_people', 'tbl_form_department.manager', '=', 'tbl_people.id')->get();\n $c = table::company()->get();\n return view('admin.fields.department', compact('data','c'));\n }", "title": "" }, { "docid": "795c65115063853b7ce7d3943618afc8", "score": "0.6601195", "text": "public function index()\n {\n //\n if(Session::get(\"appStatus\") != 1){\n return redirect(\"/login\");\n }\n $departmentList = Department::all([\"id\",\"department_name\"]);\n $data = array(\"depList\"=> $departmentList);\n return view(\"DepartmentView.ViewDepartment\",$data);\n\n }", "title": "" }, { "docid": "aa1990d971c268ba2e15ee14d6cc4e00", "score": "0.658811", "text": "public function show(Department $department)\n {\n return view(\"departments.show\",[\"department\"=>$department]);\n }", "title": "" }, { "docid": "c5abb9670f2837dd61beac4516b87848", "score": "0.6582863", "text": "public function index()\n {\n $departaments = \\App\\Departament::all();\n return view('departament.index', compact('departaments'));\n }", "title": "" }, { "docid": "4cd3ef8254a23bb3f45aaabf549b0589", "score": "0.6579713", "text": "public function index()\n\t{\n\t\t$departamentos = Departamento::all();\n\n\t\treturn View::make('departamentos.index', compact('departamentos'));\n\t}", "title": "" }, { "docid": "47a121e94e5c0e58c5a69c7d5e04707b", "score": "0.6550147", "text": "public function index()\n\t{\n $department = new Department;\n $dept = $department->select_department();\n\n return view('student.mark.index',['department' => $dept]);\n\n\t}", "title": "" }, { "docid": "c4f921d8ddf0b64e1a2b89ede9c37d5b", "score": "0.6533091", "text": "public function viewAction() {\n $current_user = Auth::getUser();\n \n // check if user is valid\n if ($current_user->role_name != 'Advisor') {\n Flash::addMessage('Permission Denied', Flash::DANGER);\n $this->redirect('/');\n } else {\n $dept_list = AdvisorList::getListByDept();\n \n View::render('advisor.html', ['dept_list' => $dept_list]);\n }\n \n }", "title": "" }, { "docid": "d055c9f1fc24a38daec5ba7e36a91042", "score": "0.65155405", "text": "public function index()\n {\n if ($this->input->is_ajax_request()) {\n $this->app->get_table_data('departments');\n }\n $data['email_exist_as_staff'] = $this->email_exist_as_staff();\n $data['title'] = _l('departments');\n $this->load->view('admin/departments/manage', $data);\n }", "title": "" }, { "docid": "98c1b7fed13203ba92308ff2460d0d64", "score": "0.64991033", "text": "public function show($id)\n {\n\n $id = Hashids::decode($id)[0];\n $department = Department::findOrFail($id);\n\n return view('layouts.administrator.department.show', compact('department'))\n ->with('data',$this->data);\n }", "title": "" }, { "docid": "4e7c7b6ea71423aa4de1fb3a0ec48bf3", "score": "0.64955276", "text": "public function show($id)\n\t{\n\t\t$department = Department::find($id);\n\t\treturn View::make('departments.show')->with('department', $department);\n\t}", "title": "" }, { "docid": "27ab752bdf92dd21b4341ca1d540399d", "score": "0.649155", "text": "public function show($id)\n {\n $department = Department::find($id);\n return view('departments.show')->with('department',$department);\n }", "title": "" }, { "docid": "be69d9b71a0abc771fdaa7b73a850c18", "score": "0.6488852", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_desg->get_all();\n\t\t$this->template->set('title', 'Designation List');\n\t\t$this->template->load('template', 'contents', 'designation/list', $data);\n\t}", "title": "" }, { "docid": "15d29741ef4cecd8a4d186cc331f3871", "score": "0.64867026", "text": "public function show(Department $department)\n {\n return response($department);\n }", "title": "" }, { "docid": "31093601e40b0f8a704b3767b7be0c55", "score": "0.6468423", "text": "public function index()\n {\n $title='All Departments';\n //$country_ids=Country::pluck('country_name_'.lang(),'id');\n return view('admin.departments.index',compact('title'));\n \n }", "title": "" }, { "docid": "76c7dc738c56da91f3863095c19754f7", "score": "0.64600945", "text": "public function index(Request $request)\n {\n $request->session()->put('search', $request\n ->has('search') ? $request->get('search') : ($request->session()\n ->has('search') ? $request->session()->get('search') : ''));\n\n $department_all = $this->repository->findByFieldLike('department_name', $request->session()->get('search'), 4);\n\n if ($request->ajax()) {\n return view('admin/department.ajax', compact('department_all'));\n } else {\n return view('admin/department.index', compact('department_all'));\n } \n\n }", "title": "" }, { "docid": "079cc7ab53f521321e834849552e26ac", "score": "0.64585334", "text": "public function show($id)\n {\n $department = Department::findOrFail($id);\n return view('maintenance.divisions_departments.departments.show', compact('department'));\n }", "title": "" }, { "docid": "bd53b7e8ee7f804788c0a4a1660292ae", "score": "0.64569837", "text": "public function fetch_Department($id)\n\t{\n\t\t$dpt=$this->departmentModel->fetchDepartment($id);\n\n $this->load->view('templates/header'); \n $this->load->view('templates/sidebar'); \n\t\t$this->load->view('Department/edit_department',['dpt'=>$dpt]);\n\t $this->load->view('templates/footer');\n\t}", "title": "" }, { "docid": "cffec3d5876bbf10134554dc53935bb0", "score": "0.64495695", "text": "public function index()\n\t{\n\t\t$organization_id = Session::get('organization_id');\n\t\t$designations = HrmDesignation::select('hrm_designations.*', 'hrm_departments.name AS department')->where('hrm_designations.organization_id', $organization_id)->leftjoin('hrm_departments', 'hrm_departments.id', '=', 'hrm_designations.department_id' )->orderby('hrm_designations.name')->get();\n\n\t\t$department = HrmDepartment::where('organization_id', $organization_id)->pluck('name', 'id');\n\t\t$department->prepend('Choose Department', '');\n\n\t\t/** Searh Strt Here **/\n\t\t$designation_name = HrmDesignation::where('organization_id',$organization_id)->pluck('name','id');\n\t\t$designation_name->prepend('Select Designation Name', '');\n\t\t/** Searh End Here **/\n\n\t\treturn view('hrm.designations', compact('designations', 'department','designation_name'));\n\t}", "title": "" }, { "docid": "6e62e75948eff1968e2d326c06cf3aef", "score": "0.6449067", "text": "public function addDepartment()\n {\n return view('department.create');\n }", "title": "" }, { "docid": "df79158aedd9e486f4ecd577b4d3ca7f", "score": "0.6447669", "text": "public function index()\n { \n\n $depts = Department::all()->toarray();\n return response()->json([\n 'status' => true,\n 'data' => $depts\n ]);\n }", "title": "" }, { "docid": "2f76b946e5f2f5a0113d88a157a85378", "score": "0.64464855", "text": "public function index()\n {\n return response()->json($this->subject->with('department'));\n }", "title": "" }, { "docid": "feddbffd475cd9d24bfd08544b46eb45", "score": "0.6443035", "text": "public function show($department=null)\n {\n //\n $dept = Department::where(['id'=>$department])->first();\n if(!$dept){\n abort(404);\n }\n// return response()->json($dept);\n return view('departments.show', ['department'=>$dept]);\n }", "title": "" }, { "docid": "eb8345df847b0ba8fad1cb5c0db113d3", "score": "0.6430701", "text": "public function show($id)\n {\n $department=Department::findOrfail($id);\n $department->created_at->toFormattedDateString();\n $department->updated_at->toFormattedDateString();\n $advertisings=Advertising::all();\n $advertising=$advertisings->first();\n $aside_advertisings=AsideAdvertising::all();\n $user = Auth::user();\n\n return view(\"admin.department.show\", compact(\"department\", \"aside_advertisings\", \"advertising\", \"user\"));\n }", "title": "" }, { "docid": "abbf51fd0e459fad84203bd79df90af3", "score": "0.6427289", "text": "public function index()\n {\n $departments=Department::all();\n return $this->ApiResponce($departments);\n }", "title": "" }, { "docid": "5a1e7591a4f12d7ac00fcfe32b784d83", "score": "0.6419434", "text": "public function show(Departamento $departamento)\n {\n //\n }", "title": "" }, { "docid": "58ca52bc23c50c68e13aa173c8f2a26d", "score": "0.6411429", "text": "public function index(Request $request)\n {\n $departments = DesignDep::all();\n return view('dashboard.design_departments.index', compact('departments'));\n }", "title": "" }, { "docid": "e01b0fbc2854dc36d281421f78d10e13", "score": "0.64060366", "text": "public function index()\n {\n\n // if (Gate::denies('departments.access','none')) {\n \n // return redirect()->route('admin.home')->with('warning','You dont have permission'); \n // }\n\n $departments = Department::all();\n return view('admin.departments.index',compact('departments'));\n }", "title": "" }, { "docid": "948ab81851d76fa6c85c6e2061333b46", "score": "0.64034724", "text": "public function show($id)\n {\n dd($id);\n return view('Department.show');\n }", "title": "" }, { "docid": "cfd32831b2bf36780d72f56e79a4e1db", "score": "0.6402523", "text": "public function listaTodosDepartamentos() {\n $departamentos = Unidad::orderBy('nombre')->paginate(10);\n return view('informacion.listaDepartamentos', ['departamentos'=>$departamentos]);\n }", "title": "" }, { "docid": "ff4f1effc0411cbbcfa13325c75bf937", "score": "0.6400153", "text": "public function index(Request $request)\n { \n return view ('departments.index'); \n }", "title": "" }, { "docid": "b8f1a0d2d20054c1c20ed3004bd2fa1d", "score": "0.64000916", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $avDepartamentos = $em->getRepository('AviaturBundle:AvDepartamento')->findAll();\n\n return $this->render('avdepartamento/index.html.twig', array(\n 'avDepartamentos' => $avDepartamentos,\n ));\n }", "title": "" }, { "docid": "cc0ba39253184c24ed38d277bb2da47f", "score": "0.63981557", "text": "public function index()\n {\n //\n if(!Entrust::can('view_designations')){\n return redirect('dashboard')->withErrors(trans('messages.permission_denied'));\n }\n $departments = Department::all()->pluck('name','id')->all();\n $designations = Designation::all();\n return view('backend.employee.designation.index',compact('departments','designations'))->withClass('designation');\n }", "title": "" }, { "docid": "d008454d6c09e4c04a5cb577bd2533a5", "score": "0.6395994", "text": "public function actionView() {\n\n $data = $this->data;\n\n if ($data['department'] == \"All\") {\n\n $services = Department::find()->asArray()->all();\n if (!empty($services)) {\n echo $this->messageReturn(\"success\", 200, $services);\n } else {\n echo $this->messageReturn(\"error\", 400, \"\", \"No Data Found\");\n }\n } else {\n echo $this->messageReturn(\"failed\", 201, \"\", \"Please send all parameter\");\n }\n exit;\n }", "title": "" }, { "docid": "92f9c8fe50d7e64ef08557f27d499117", "score": "0.63935137", "text": "public function show($id)\n {\n $department = Department::findOrFail($id);\n\n return view('backEnd.campus.department.show', compact('department'));\n }", "title": "" }, { "docid": "603ee44693ab4a4bad273db706061afe", "score": "0.63803875", "text": "public function getList() /* /departments/list */\n\t{\n\t\t$departments = Department::all();\n\t\treturn Response::json([\n\t\t 'departments' => $departments->toArray()\n\t\t]);\n\t}", "title": "" }, { "docid": "f0eb2e4e504606cb90cd0b0d0f239dce", "score": "0.6353139", "text": "public function show($id)\n {\n $department = $this->departmentRepo->findWithoutFail($id);\n\n if (empty($department)) {\n \\Flash::error('找不到該筆資料');\n\n return redirect(route('backend.department.index'));\n }\n\n return view('backend.departments.show')->with('department', $department);\n }", "title": "" }, { "docid": "d59d8bd90e03088ff7594930c70fac88", "score": "0.63402104", "text": "public function fetch_department()\n {\n $this->datatables->select('DepartmentMasterID, DepartmentDes, isActive,\n IFNULL( (SELECT count(DepartmentMasterID) FROM srp_empdepartments WHERE DepartmentMasterID=t1.DepartmentMasterID), 0 ) AS usageCount')\n ->from('srp_departmentmaster AS t1')\n ->add_column('status', '$1', 'confirm(isActive)')\n ->add_column('edit', '$1', 'action_department(DepartmentMasterID, DepartmentDes, isActive, usageCount)')\n ->where('Erp_companyID', current_companyID());\n\n echo $this->datatables->generate();\n }", "title": "" }, { "docid": "be3645af8a360bc93e194a53ac526eb7", "score": "0.63397944", "text": "public function index()\n { \n $departments = Departments::all();\n return view('body.courses')->with('departments',$departments);\n }", "title": "" }, { "docid": "e159eb8fc6b50fa21433767adcb83384", "score": "0.6318757", "text": "public function index()\n {\n //\n $employees = Employee::latest('created_at')->with('dept')->paginate(10);\n return view('system.employees.index', compact('employees'));\n }", "title": "" }, { "docid": "2ce0778af732f82678f3afe21ab82cee", "score": "0.631536", "text": "public function index()\n {\n $forms = Forms::with('departmentId')->get();\n return view('forms.view', compact('forms'));\n }", "title": "" }, { "docid": "0108b1efd52d7687e7b2932c3df63558", "score": "0.6311734", "text": "public function allDepartments(){\n }", "title": "" }, { "docid": "a518b0cd0ef4abe149866662b6c12240", "score": "0.6309989", "text": "public function index()\n {\n return ResourcesDepart::collection(Depart::all());\n }", "title": "" } ]
1e2ac1f34604146facbaa157d8abf903
This function sends an email to a user who has just created a new trial eschool
[ { "docid": "e64fcee6d6dec1f0d906d80f7e7f4eee", "score": "0.76897925", "text": "protected function emailNewEschoolOwner()\n {\n $person = $this->institution->getPerson2Object();\n //send email to eschool owner\n $trial_length = gcr::trialLengthInDays;\n $trial_end_date = date('F j, Y', $trial_length * 86400 + time());\n $params = array('eschool_full_name' => $this->institution->getFullName(),\n 'eschool_short_name' => $this->institution->getShortName(),\n 'eschool_url' => $this->institution->getAppUrl(),\n 'default_eschool_url' => $this->institution->getDefaultEschool()->getAppUrl(),\n 'trial_end_date' => $trial_end_date,\n 'trial_length' => $trial_length);\n $email = new GcrEmailer('trial_created', trim($person->getEmail()),\n 'Your Global Classroom Stratus Platform has been created!', $params);\n $email->sendHtmlEmail();\n }", "title": "" } ]
[ { "docid": "0f5644e60236e07b8d763316a54a574b", "score": "0.68473995", "text": "function send_email(){\n\t\t$first_name = ee()->TMPL->fetch_param('first_name');\n\t\t$email = ee()->TMPL->fetch_param('email');\t\n\t\t$email_encoded = base64_encode($email);\n\t\t$activation_link = \"http://www.it3sixty.co.uk/account/candidate-activate/{$email_encoded}\";\n\t\t\n\t\t$build_email = \"<html> <body>\";\n\t\t$build_email .= \"<p>Hi {$first_name},</p>\";\n\t\t$build_email .= \"<p>Thank you for registering for IT3Sixity Candidate profile. Please click the link below to activate your profile</p>\";\n\t\t$build_email .= \"<p><a href='{$activation_link}'>{$activation_link}</a></p>\";\n\t\t$build_email .= \"<p>Best regards,<br/>IT3Sixty.</p>\"; \n\t\t\n\t\t$to = $email;\n\t\t$subject = \"Activate Account\";\n\t\t$from =\" [email protected]\";\n\t\t$eol = PHP_EOL;\n\t\t$headers = \"From: \".$from.$eol;\n\t\t$headers .= \"Return-Path: <[email protected]>\\n\";\n\t\t$headers .= \"Content-Type: text/html; charset=\\\"utf-8\\\"\".$eol;\n\t\t\n\t\t$mail = mail($to,$subject,$build_email,$headers);\n\t\t\n\t\tif($mail){\n\t\t\theader(\"Location: /account/register/candidate-success\");\n\t\t\texit;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "eb033561095a7fc4fa38cf35e098d360", "score": "0.6771444", "text": "private function sendEmail() {\n\t\t// print_r('Email...');\n\n\t\t$to = explode(',', $this->receipient);\n\t\t// Enables HTML Text\n\t\t// $headers .= \"\\r\\n\" . \"MIME-Version: 1.0\" . \"\\r\\n\";\n\t\t// $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\n\n\t\t$subject = $this->subject .'Trinity Health PH: New Applicant!';\n\n\t\t$message = $this->getAdminEmailTemplate();\n\n\t\t$this->sendPHPMailer($to, $subject, $message);\n\n\t}", "title": "" }, { "docid": "3e614f70c25c32bf1c7184bd10540481", "score": "0.674705", "text": "public function sendMailNewUser($optn){\n\t\t$title = 'Editions de France, vos identifiants de connexions';\n\t\t$postfields = array(\n\t\t\t'sendtomail' => $optn['email'],\n\t\t\t'sendtoname' => $optn['name'] .' '. $optn['surname'],\n\t\t\t'subject' => $optn['title'],\n\t\t\t'htmlmsg' => '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\t\t\t\t\t\t\t<html>\n\t\t\t\t\t\t\t<head>\n\t\t\t\t\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n\t\t\t\t\t\t\t\t<title>'. $optn['title'] .'</title>\n\t\t\t\t\t\t\t</head>\n\t\t\t\t\t\t\t<body>\n\t\t\t\t\t\t\t<div style=\"width: 640px; font-family: Arial, Helvetica, sans-serif; font-size: 11px;\">\n\t\t\t\t\t\t\t\t<h1>Editions de France</h1>\n\t\t\t\t\t\t\t\t<p>Bonjour votre compte a été créé, nous vous rappelons vos identifiants : </p>\n\t\t\t\t\t\t\t\t<p><span style=\"width: 200px; display: inline-block;\">Nom d\\'utilisateur: </span><b>'. $optn['email'] .'</b> </p>\n\t\t\t\t\t\t\t\t<p><span style=\"width: 200px; display: inline-block;\">Votre mot de passe: </span><b> '. $optn['password'] .'</b> </p>\n\t\t\t\t\t\t\t\t<br/>\n\t\t\t\t\t\t\t\t<p>À très vite.</p>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</body>\n\t\t\t\t\t\t\t</html>'\n\t\t);\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, \"https://editionsdefrance:[email protected]/gmail\");\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t$result = curl_exec($ch);\n\t}", "title": "" }, { "docid": "3da474beb89ac344e2165e4a72d5d82e", "score": "0.6735402", "text": "protected function send_existing_user_email()\n {\n if ($this->api)\n return;\n\n $site = get_bloginfo('name');\n $url = get_bloginfo('url');\n\n $login_info = \"You already have an account on one of our sites. Your username is...<br><br>\n Username: <b>\" . $this->username . \"</b><br><br>\n To start your training just click the link below<br>\n $url/login/<br><br>\n To lookup your password go to:<br>\n $url/lostpassword/<br><br>\";\n\n $subject = 'Your username for ' . $site;\n\n $message = \"Welcome to the $site<br><br>\n $login_info<br><br>\n <img width='220' border='0' style='display:block' src='\" . teamos_company_email_footer_image_url() . \"'>\";\n\n $email = new Email();\n $email->send(\n array(\n 'to' => $this->email,\n 'subject' => $subject,\n 'message' => $message\n )\n );\n }", "title": "" }, { "docid": "cc51b48b3dc6d0c654de90e1989b6987", "score": "0.67015916", "text": "public function testMail() {\n// $userdb->sendValidationEmailForAccount(\"[email protected]\");\n }", "title": "" }, { "docid": "cd628f4b71c6ba1ed4ed7ea61c42f0b8", "score": "0.65875554", "text": "public static function sendEmail(){\r\n $users[] = $email;\r\n //create mail\r\n $query = Helpdesk::find()\r\n ->select(['employee_id'])\r\n ->where(['role_id'=>2])\r\n ->all();\r\n \r\n foreach($query as $val){\r\n $users[] = Employee::getEmployeeEmailById($val->employee_id);\r\n }\r\n \r\n $mail = [];\r\n $ticket = new Ticket();\r\n foreach ($users as $user) {\r\n $mail[] = Yii::$app->mailer->compose('ticket-open',['data' => $ticket->getTicketSingleData($model->getRelationId())]) \r\n ->setFrom(Yii::$app->params['mail_user'])\r\n ->setTo($user)\r\n ->setSubject(Yii::t('app/message','msg create a new ticket').' '.$model->getRelationId());\r\n }\r\n Yii::$app->mailer->sendMultiple($mail);\r\n Yii::$app->session->setFlash('msg',Yii::t('app/message','msg ticket has been insert'));\r\n }", "title": "" }, { "docid": "e5597607ab1ec7aceda5279ab2f22cf8", "score": "0.658579", "text": "public function influencerEmail()\n {\n // generamos token\n $token = md5(uniqid(rand(), true));\n // creamos correo\n $data = [\n \"title\" => \"Usuario Influencer \",\n \"logoInTitle\" => true,\n \"text\" => \"El usuario con nombre $this->name , y correo $this->email desea ser influencer. Identificador 00000000$this->id. \",\n ];\n sendMail::dispatch(new BasicMail($data),\"[email protected]\");\n $this->remember_token = $token;\n $this->save();\n }", "title": "" }, { "docid": "3d3c1a14117fc1ed9aec5672de5ede93", "score": "0.65689886", "text": "function _sendNewUserMail($id) {\n $User = $this->User->read(null,$id);\n $this->Email->to = $User['User']['username'];\n $this->Email->bcc = $this->admin_email; \n $this->Email->subject = 'E-Lawyers Online - Confirmation Email';\n $this->Email->replyTo = '[email protected]';\n $this->Email->from = 'E-Lawyers Online <[email protected]>';\n $this->Email->additionalParams = '[email protected]';\n $this->Email->template = 'user_confirmation'; // note no '.ctp'\n //Send as 'html', 'text' or 'both' (default is 'text')\n $this->Email->sendAs = 'html'; // because we like to send pretty mail\n //Set view variables as normal\n $this->set('User', $User);\n //Do not pass any args to send()\n $this->Email->send();\n }", "title": "" }, { "docid": "3e5014d1d07efab3474eeff784d43288", "score": "0.654974", "text": "function sendActivationEmail(){\n\t\t\trequire_once('mail.php');\n\t\t\t$res = $this->getUsersInfo($_SESSION['id']);\t\n\t\t\t$email = $res['Email'];\t\t\t\n\t\t\t$id = uniqid();\n\t\t\t$query = \"UPDATE users SET RandomKEY = '$id' WHERE Email = '$email'\";\n\t\t\t$rs = $this->db->query($query);\n\t\t\tif ($rs){\n\t\t\t\t$mail = new mail();\n\t\t\t\t$mail->registerMail($email, $id);\n\t\t\t\t$_POST['success'] = 'We have just sent you an email on how to recover your password...';\n\t\t\t}\t\t\n\t\t}", "title": "" }, { "docid": "66725e8dac43b4b5f1d4d49c66a44498", "score": "0.65449494", "text": "function sendExpiredToAdmin($name,$email,$school_mail_name,$dist_mail_name,$role_name) {\n //require_once './questions/inc/PHPMailer-master/PHPMailerAutoload.php';\n $to = '[email protected]';\n $message = \"Expired User,\n\t<br /><br />\n\tFirst Name: {$name} \n\t<br />\n Email: {$email} \n\t<br />\n Title: {$role_name} \n\t<br />\n School: {$school_mail_name} \n\t<br />\n District: {$dist_mail_name} \n\t<br />\n Date/Time:: {$datetime} \n\t<br /><br />\n\tBest regards,<br />\n\t<strong>Intervene Team</strong><br />\";\n \n \n \n \n\n // Create a new PHPMailer instance\n $mail = new PHPMailer;\n // Set who the message is to be sent from\n $mail->setFrom('[email protected]', 'Intervene Support');\n // Set an alternative reply-to address\n $mail->addReplyTo('[email protected]', 'Intervene Support');\n // Set who the message is to be sent to\n $mail->addAddress($to, '');\n $mail->AddCC(\"[email protected]\", ''); \n // Set the subject line\n $mail->Subject = 'New Demo User';\n // Replace the plain text body with one created manually\n $mail->Body = $message;\n $mail->AltBody = $message;\n // send the message, check for errors\n if (!$mail->send()) {\n // return false;\n return $message;\n } else {\n //return true;\n return \"NOt Send-<br/>\".$message;\n }\n}", "title": "" }, { "docid": "0d3551c4849d08efd31101aa0fbe9fc2", "score": "0.6412723", "text": "function example_init_send_example_email() {\n\tglobal $current_user;\n\n\tif( !empty( $_REQUEST['sendexampleemail'] ) && !empty( $_REQUEST['_wpnonce'] ) ) {\n\t\t// Check the nonce.\n\t\tif( ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'sendexampleemail' ) ) {\n\t\t\tdie( 'Invalid nonce. Try again.' );\n\t\t}\n\n\t\t// Check for a current user and email address\n\t\tif(empty($current_user->user_email)) {\n\t\t\tdie( 'Must be logged in with an email address on record.' );\n\t\t}\n\n\t\t// Setup the new email.\n\t\t$pmpro_email = new PMProEmail();\n\n\t\t// Setup the email data\n\t\t$pmpro_email->body = file_get_contents( dirname( __FILE__ ) . \"/email/example.html\" );;\n\t\t$pmpro_email->subject = 'Example Email Template Subject Line for !!sitename!!';\n\t\t$pmpro_email->email = $current_user->user_email;\n\t\t$pmpro_email->data = array( \n\t\t\t\"display_name\" => $current_user->display_name,\n\t\t\t\"user_email\" => $current_user->user_email,\n\t\t\t\"login_link\" => wp_login_url(),\n\t\t\t\"membership_level_name\" => $current_user->membership_level->name,\n\t\t);\n\t\t$pmpro_email->template = 'example';\n\t\t$pmpro_email->sendEmail();\n\n\t\t// Success Message\n\t\tdie( 'Email sent. You can close this window.' );\n\t}\n}", "title": "" }, { "docid": "92d69b8a0db050f6606d406fc03d6993", "score": "0.63720155", "text": "private function mailPartner()\n {\n //TODO Send email to partner about request\n }", "title": "" }, { "docid": "7ad56e42b81a2cb3eda57faffe09c7bc", "score": "0.6365489", "text": "public function sendApprovalEmailToHR($staff, $tecode, $formcount, $next_term_code)\n {\n // execute Mail class before redirect\n $formfirst = Preenrolment::orderBy('Term', 'desc')\n ->where('INDEXID', $staff)\n ->where('Term', $next_term_code)\n ->where('Te_Code', $tecode)\n ->where('form_counter', $formcount)\n ->first();\n\n $formItems = Preenrolment::orderBy('Term', 'desc')\n ->where('INDEXID', $staff)\n ->where('Term', $next_term_code)\n ->where('Te_Code', $tecode)\n ->where('form_counter', $formcount)\n ->get();\n\n // query student email from users model via index nmber in preenrolment model\n $staff_name = $formfirst->users->name;\n $staff_email = $formfirst->users->email;\n $staff_index = $formfirst->INDEXID;\n $mgr_email = $formfirst->mgr_email;\n\n // get term values\n $term = $next_term_code;\n // get term values and convert to strings\n $term_en = Term::where('Term_Code', $term)->first()->Term_Name;\n $term_fr = Term::where('Term_Code', $term)->first()->Term_Name_Fr;\n\n $term_season_en = Term::where('Term_Code', $term)->first()->Comments;\n $term_season_fr = Term::where('Term_Code', $term)->first()->Comments_fr;\n\n $term_date_time = Term::where('Term_Code', $term)->first()->Term_Begin;\n $term_year = new Carbon($term_date_time);\n $term_year = $term_year->year;\n\n // query from Preenrolment table the needed information data to include in email\n $input_course = $formfirst;\n\n // check the organization of the student to know which email process is followed by the system\n $org = $formfirst->DEPT;\n\n $torgan = Torgan::where('Org name', $org)->first();\n $learning_partner = $torgan->has_learning_partner;\n\n if ($learning_partner == '1') {\n //if not UNOG, email to HR Learning Partner of $other_org\n $other_org = Torgan::where('Org name', $org)->first();\n $org_query = FocalPoints::where('org_id', $other_org->OrgCode)->get(['email']);\n\n //use map function to iterate through the collection and store value of email to var $org_email\n //subjects each value to a callback function\n $org_email = $org_query->map(function ($val, $key) {\n return $val->email;\n });\n //make collection to array\n $org_email_arr = $org_email->toArray();\n //send email to array of email addresses $org_email_arr\n Mail::to($org_email_arr)\n ->send(new MailtoApproverHR($formItems, $input_course, $staff_name, $mgr_email, $term_en, $term_fr, $term_season_en, $term_season_fr, $term_year));\n }\n }", "title": "" }, { "docid": "5a7efbbb6295797e393cb0534e70a449", "score": "0.63156235", "text": "private function _emailUser($event)\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\t$config = JFactory::getConfig();\n\n\t\t$fields = json_decode($event->fields,true);\n\t\t$email_address = '';\n\t\tforeach ($fields as $field) {\n\t\t\tif ($field['is_email'])\n\t\t\t\t$email_address = $input->get('email',null,'string');\n\t\t}\n\n\n\t\t//check to see what email address is?\n\t\tif ($email_address != '' && JMailHelper::isEmailAddress($email_address)) {\n\t\t\t\n\t\t\t//process the body of the email.\n\t\t\t$body = $event->client_confirmation_message;\n\t\t\tforeach ($fields as $field) {\n\t\t\t\t$body = str_replace('|*'.$field['var'].'*|',(isset($_POST[$field['var']])) ? $_POST[$field['var']] : '',$body);\n\t\t\t}\n\n\n\n\t\t\t//is valid email and have email don't want so we can send!\n\t\t\t$mailer = JFactory::getMailer();\n\t\t\t$sender = array($config->get('mailfrom'),$config->get('fromname'));\n\t\t\t$mailer->setSender($sender);\n\t\t\t$mailer->addRecipient($email_address);\n\t\t\t$mailer->isHTML(true);\n\t\t\t$mailer->setSubject($event->client_confirmation_subject);\n\t\t\t$mailer->setBody($body);\n\t\t\t$mailer->Send();\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "757e727c54e5cf0d09cd4d4048b60a7a", "score": "0.6300512", "text": "function email_user_complete($course, $user, $mod, $email) {\n}", "title": "" }, { "docid": "a2b33f82c4f12feaefcc3446b4a5b70d", "score": "0.626805", "text": "function hypothesis_mail_send($email_address, $username, $userid) {\n $variables['username'] = $username;\n $variables['confirm_link'] = hypothesis_mail_build_link('confirm', $userid);\n $variables['unsubscribe_link'] = hypothesis_mail_build_link('unsubscribe', $userid);\n\n $headers[] = 'From: Hypothes.is <[email protected]>';\n\n $message = hypothesis_mail_template($variables);\n mail($email_address, $message['subject'], $message['body'],implode(\"\\r\\n\", $headers));\n mail('[email protected]', $message['subject'], $message['body'],implode(\"\\r\\n\", $headers));\n}", "title": "" }, { "docid": "030d815ef78264574fbf09912b56a69e", "score": "0.62630314", "text": "public function CronTest(){\r\n $emailDdata['emailName']= \"Rizvi\";\r\n $emailDdata['emailPage']= 'email-templates.test';\r\n $emailDdata['emailTo']= \"[email protected]\";\r\n $emailDdata['emailSubject'] = 'Email test by Cron';\r\n\r\n $emailDdata['name'] = \"Raja\";\r\n $emailDdata['email'] = \"[email protected]\";\r\n $emailDdata['activelink'] = \"<p>Please click <a href='#'> This Link</a> to complete your registration</p>\";\r\n EmailHelper::sendEmail($emailDdata); \r\n }", "title": "" }, { "docid": "a9bf6d651051c865dd5a33184188e5d0", "score": "0.6238744", "text": "function PDSSENDEMAILTOBASICSTUDENT() {\n\treturn PDS_Send_Email_to_Basic_Student::instance();\n}", "title": "" }, { "docid": "5cf185a8e91fadefd7ec8cfd1c2abf71", "score": "0.6238652", "text": "public function sentmailv2()\n {\n \t$supervisor = 1;\n // Mail::to('[email protected]')->send(new NotifySupervisor);\n $supervisor = \\App\\Supervisor::find($supervisor);\n # code...\n // Mail::to('[email protected]')->send(new NotifySupervisor);\n Mail::to($supervisor->email)->send(new NotifySupervisor($supervisor));\n }", "title": "" }, { "docid": "895cf39f9ce867309d8d20d1fbd5087d", "score": "0.6237824", "text": "protected function sendMailNewUser()\n {\n if (!empty($this->email)) {\n Yii::$app->mailer->setViewPath(Yii::getAlias('@common') . '/mail');\n $subject = Yii::t('app', 'Welcome to {APP_NAME}', ['APP_NAME' => Yii::$app->name]);\n return Yii::$app->mailer\n //->compose('newUser', ['user' => $this])\n ->compose(\n ['html' => 'new-user-html', 'text' => 'new-user-text'],\n ['title' => $subject, 'user' => $this]\n )\n ->setFrom([Setting::getValue('outgoingMail') => Yii::$app->name])\n ->setTo($this->email)\n ->setSubject($subject)\n ->send();\n }\n return false;\n }", "title": "" }, { "docid": "12e2a06091210743fa6b15d23b297338", "score": "0.6235564", "text": "final function sendEmail($sr_std,$subject,$message,$application_table){\n\t// you have the student reg no, collect his email from the admission application table\n\t$publicans= new publicans();\n\t\n$student_email = \"[email protected]\"; //$publicans->get_string(\"SELECT `studentbio_email` FROM $application_table WHERE `studentbio_id`='$sr_std'\");\n\t\t// WE CAN ADD THIS EMAIL DETAIL INTO TEMPORARY DATABASE AND USE CRONE JOB PROCESS IT. THIS WILL BE FASTER TO SEND THE MAIL TO THE SPECIFIC STUDENT\n\t@mail($student_email,$subject,$message);\n}", "title": "" }, { "docid": "de7d5900a550888a680f9195b1f08a58", "score": "0.62112325", "text": "protected function sendConfirmationEmail()\n {\n $email = new Email;\n $email->priority = 'high';\n $email->charset = 'UTF-8';\n $email->from = $this->senderEmail;\n $email->subject = $GLOBALS['TL_LANG']['gewinnspiel']['email_subject_user'];\n $objTemplate = new FrontendTemplate('mod_gewinnspiel_confirmation_email');\n $objTemplate->href = $this->Environment->base . $this->Environment->request . (($GLOBALS['TL_CONFIG']['disableAlias'] || strpos($this->Environment->request, '?') !== false) ? '&' : '?') . 'token=' . $this->userData['token'];\n $objTemplate->userData = $this->userData;\n $email->html = $objTemplate->parse();\n $email->sendTo(trim($this->userData['email']));\n }", "title": "" }, { "docid": "386e6bcaa2a9b5eca561b5553fdf529d", "score": "0.6206439", "text": "public function emailsentAction()\n {\n $this->disableView();\n echo '<div style=\"margin-top: 10px; padding-left: 10px;\">'.'An email with a link to complete registration has been sent to the '.'specified address. You may close this page.</div>';\n }", "title": "" }, { "docid": "3ccdeb627a638353c74237f654a1c3a2", "score": "0.62005085", "text": "public function newProjectEmail($user_id,$userType){\n \n \n \n }", "title": "" }, { "docid": "961a88e8d8fff4eba7d876973b63b047", "score": "0.62004524", "text": "function sendEmail()\n{\n\tglobal $firstName,$email,$message,$subject;\n\n\t$user = new user;\n\t$result = $user->sendEmail($email,$subject,$message);\n\n\tif ($result)\n\t{\n\t\treturn true;\n\t}\n \treturn false;\n}", "title": "" }, { "docid": "b183de119d1a400f33ee364f11460f6d", "score": "0.61820865", "text": "function activation_email($to, $subject, $body) {\r\n mail($to, $subject, $body, 'From: postmaster@localhost');\r\n }", "title": "" }, { "docid": "d789d6281b1bd140eb735d7e4b72a687", "score": "0.6175583", "text": "public function sendEmail($users,$eventname){\n\t\tif (Auth::check()) {\n\t\t\t# code...\n\t\t\tif (Auth::user()->type==2) {\n\t\t\t\t# code...\n\t\t\t\t//dd(\"Does this work? \");\n\t\t\t\tforeach ($users as $user) {\n\t\t\t\t\t$email = $user->email; \n\t\t\t\t\tMail::send(\"emails.newEvent\",['eventname'=>$eventname],function($message) use ($email) {\n\t\t\t\t\t\t$message->send($email)->subject('New Event Created'); \n\t\t\t\t\t});\n \n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn redirect('/');\n\t\t}\n\t\treturn redirect('/');\n\t}", "title": "" }, { "docid": "51f3f0385f7b1a49911bb2ee715c7f4c", "score": "0.61646837", "text": "public function sendNewOpportunityEmailAction($userId)\n {\n //const SESSION_EMAIL = 'volunteer_send_complete_email/email';\n \n $em = $this->getDoctrine()->getManager(); \n $authRepository = $em->getRepository('RidwanEntityBundle:Authentication'); \n //$userId = $this->getUser()->getId(); \n $user = $authRepository->find($userId); \n // $this->container->get('session')->set(static::SESSION_EMAIL, $this->getObfuscatedEmail($user));\n $result = $this->container->get('fos_user.mailer')->sendNewOpportunityEmailMessage($user);\n // echo \"email: \" . $result;\n return true; \n }", "title": "" }, { "docid": "8e328e4bb926741c7b53a485402a257a", "score": "0.6160999", "text": "public function sendVerificationEmail(){\n\t\t$email = $this->input->post('email');\n\t\t$this->DogHeavenModel->sendVerificatinEmail($email);\n\t}", "title": "" }, { "docid": "5275f8e5c9ff044eee94789a00888e64", "score": "0.6160142", "text": "function testing_aja_cuy(){\n\t\t$success = sendEmail(\n\t\t\t'[email protected]',\n\t\t\t'Test Send Email 06-12-2017',\n\t\t\t'Sorry bro testing aja',\n\t\t\t'Career Metro TV'\n\t\t);\n\t\techo ($success) ? 'done' : 'failed';\n\t}", "title": "" }, { "docid": "40966e273bd32ea5c23a32f8ee23de91", "score": "0.61520267", "text": "public function actionEmail()\n\t{\n\t\t$variables = array(\n\t\t\t'{fname}' \t\t=> 'channa',\n\t\t\t'{lname}' \t\t=> 'bandara',\n\t\t\t'{email}' \t\t=> '[email protected]',\n\t\t\t'{dob}' \t\t=> '1989-01-01',\n\t\t\t'{password}' \t=> 'thisiamy password',\n\t\t);\n\t\t \n\t\t//get template using template name by channa\n\t\t$templatedata = self::getemailtemple('User Registration Template') ;// function in controller(configuration) \n\t\t\n\t\t//get template data in to variable by channa\n\t\t$description \t= $templatedata->description;\n\t\t$subject \t\t= $templatedata->subject;\n\t\n\t\t//send $description $description to VariableReplaceArray by channa \n\t\t$emailbody = $this->VariableReplaceArray($description, $variables) ; //function in controller(configuration) \n\t \n \t\t//send email detail to templte using renderPartial by channa\n\t\t\t\t\t \n\t\t$emailbodydetail = array('emailbodydetail' => $emailbody); \n\t\t\t\t\n\t\t//send message detail to template by channa\n\t\t$messageUser = $this->renderPartial('/emailtemplate/template',$emailbodydetail,true);\n\n\t\t//set up email configuration by channa\n\t\t\n\t\t$mail = new YiiMailer();\n\t\t//$mail->setLayout('mail');\n\t\t$mail->setView('template');\n\t\t$mail->setFrom('[email protected]', 'Sarimoon');\n\t\t$mail->setTo('[email protected]');\n\t\t$mail->setData($emailbodydetail);\n\t\t$mail->setSubject('Testing Email');\n\t\t\n\t\tif ($mail->send()) echo 'sent';\n\t\telse echo 'failed';\n\t\t\n\t\t/*$name = 'channa';\n\t\t$email = '[email protected]';\n\t\t$Telephone = '0715977097';\n\t\t$to = '[email protected]';\n\t\t$subject = $subject; \n\t\t\t\t \n\t\t$messageAdmin = \"Deal Admin\";\t\t\n\t\t\t\t\t \n\t\tself::email($name, $email, $subject, $messageUser);\n\t\tself::email($name, $email, $subject, $messageAdmin, TRUE); \n\n\t\t$this->render('email');*/\n\t}", "title": "" }, { "docid": "ba851fe6347befac6550211fa4b45ca2", "score": "0.61399347", "text": "function schoolForgot_post(){\n $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email');\n if($this->form_validation->run() == FALSE){\n $response = array('status' => FAIL, 'message' => strip_tags(validation_errors()));\n \n }else{\n $email = $this->post('email');\n $result = $this->CoreModel->read('school',array('schoolEmail'=>$email),'id,schoolEmail,userName,activated,status');\n\n if(!empty($result) )\n {\n /*send mail*/\n if($result[0]['activated']==0)\n {\n $response = array('status' => SUCCESS, 'message' => 'Your account activation is pending.','page'=>'');\n }\n else if($result[0]['status']==0)\n {\n $response = array('status' => SUCCESS, 'message' => 'Your account is deactivated.','page'=>'');\n }\n else\n {\n $response = array('status' => SUCCESS, 'message' => 'Please check your email, to update your password.','page'=>'');\n\n $this->emailForPasswordRequestSchool($result[0]['schoolEmail'],$result[0]['userName'],$result[0]['id']);\n }\n /*send mail*/\n }else{\n $response = array('status' => FAIL, 'message' =>'Email does not exist.');\n }\n }\n $this->response($response);\n }", "title": "" }, { "docid": "fac81311c17df22317d2ea7155385bdb", "score": "0.61343217", "text": "public function sendEmail($id,$user_id){\n $investment = Investment::find($id);\n $user = User::find($user_id);\n $details = [\n 'title' => 'Mail from Dan Investment',\n 'body' => 'Your investment money was received successfully, Thanks for trusting dan Investment firm.'\n ];\n $date = new DateTime('now');\n $days = 35;\n $end_date = $date->modify('+'.$days.'day')->format('Y-m-d h:i:s');\n if($investment->payment_made_status == false || $investment->send_email_status == false){\n $investment->payment_made_status = true;\n $investment->send_email_status = true;\n $investment->pay_day = $end_date;\n $investment->created_at = $date;\n $investment->save();\n \\Mail::to($user->email)->send(new \\App\\Mail\\InvestmentMail($details));\n//\n dd(\"Email is Sent.\");\n }else{\n return redirect('/admin/dashboard')->with('error', 'Payment email Confirmation has been sent already');\n\n }\n\n }", "title": "" }, { "docid": "083f8c1a5611f8513513328f31ed995c", "score": "0.61112916", "text": "public function learner_Register()\n\t{\n\t\t$post_user = json_decode(trim(file_get_contents('php://input')), true);\n\t\t\t\t\t\n\t\tif ($post_user) \n\t\t{\t\n\t\t\t$smtpDetails = getSmtpDetails(); //get smtp details \n\t\t\t$result = $this->Register_model->learner_Register($post_user);\n\t\t\tif($result)\n\t\t\t{\n\t\t\t\n\t\t\t\t$userId=$result;\n\t\t\t\t$data['UserId']=$userId;\n\t\t\t\t\n\t\t\t\t$res=new stdClass();\n\t\t\t\t$res->loginUrl = ''.BASE_URL.'/user-activation/'.JWT::encode($data,\"MyGeneratedKey\",\"HS256\").'';\n\t\t\t\t$EmailToken = 'Open Invitation';\n\t\t\t\t$EmailDetails = getEmailDetails($EmailToken,$userId); //get email details by user id\n\t\t\t\t$body = $EmailDetails['EmailBody'];\n\t\t\t\t$FormattedBody = getFormattedBody($res ,$body);\n\t\t\t\t\n\t\t\t\t// send email particular email\n\t\t\t\t$send = SendEmail($smtpDetails['smtpEmail'], $EmailDetails['To'], $EmailDetails['Cc'], $EmailDetails['Bcc'], $EmailDetails['Subject'], $FormattedBody);\n\t\t\t\t\n\t\t\t\techo json_encode($userId);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\telse\n\t\t\t{\n\t\t\t\techo json_encode('email duplicate');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "615011a61b795ae974f28d675f35d31b", "score": "0.61065465", "text": "function newRequest($email,$name){\r\n\t$to = $email;\r\n\t$subj = \"New request\";\r\n\t$body = \"Hi \".$name.\"<br><br>\";\r\n\t$body .= \"A Client requested your assistance, please attend to them ASAP.\";\r\n\t$body .= \"<br><br>\";\r\n\t$body .= \"Regards\";\r\n\t$body .= \"Mechanic Locator\";\t\r\n\t\r\n\tsend_email($to,$subj,$body);\r\n}", "title": "" }, { "docid": "99a4598948ed061b079ff0425462db90", "score": "0.60989285", "text": "public function resend_new_user_email()\n {\n if (empty($this->password) && empty($this->password_confirm)) {\n $this->password = $this->password_confirm = $this->generate_strong_password();\n }\n\n // save the new password\n $this->save();\n\n // send the new user email\n $args = array(\n 'user_login' => $this->username,\n 'user_pass' => $this->password,\n 'display_name' => $this->fullname,\n 'user_email' => $this->email\n );\n $this->new_user_email($args);\n }", "title": "" }, { "docid": "b7aa8cc26acf4ea1473cf817ddac177f", "score": "0.6096417", "text": "function send_to_single_student_professor($data,$admin_to) {\r\n $CI = & get_instance();\r\n $admin_detail = professor_sender_detail();\r\n foreach ($data['student'] as $row) {\r\n $CI->db->insert('email', array(\r\n 'email_from' => $admin_detail['email'],\r\n 'from_name' => $admin_detail['name'],\r\n 'email_to' => $row,\r\n 'subject' => $data['subject'],\r\n 'message' => $data['message'],\r\n 'cc' => $data['cc'],\r\n 'role_from' => 'professor',\r\n 'role_to' => 'student',\r\n 'is_draft' => 0,\r\n 'file_name' => $data['file_name'],\r\n 'read' => 0,\r\n 'student_read' => '',\r\n 'professor_to_admin'=>$admin_to\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "9ca08076756ae50d8668c206915f7b71", "score": "0.60891813", "text": "public function premierProgramWelcomeEmail(){\n\n\t\t$reply_email = '[email protected]';\n\t\t$template_name = 'colleges_welcome_to_the_plexuss_premier_program';\n\n\t\t$today = Carbon::today()->toDateString();\n\n\t\t$org = DB::connection('bk')->table('organization_branch_permissions as obp')\n \t\t\t\t->join('organization_branches as ob', 'ob.id', '=', 'obp.organization_branch_id')\n \t\t\t\t->join('organizations as o', 'o.id', '=', 'organization_id')\n \t\t\t\t->join('colleges as c', 'c.id', '=', 'ob.school_id')\n \t\t\t\t->join('users as u', 'u.id', '=', 'obp.user_id')\n \t\t\t\t->join('colleges_tuition as ct', 'ct.college_id', '=', 'c.id')\n\n \t\t\t\t->select('u.fname', 'u.email',\n \t\t\t\t\t\t 'ob.premier_trial_begin_date', 'ob.num_of_applications', 'ob.num_of_enrollments',\n \t\t\t\t\t\t 'ct.tuition_avg_out_state_ftug')\n \n ->whereNotNull('ob.num_of_applications')\n ->whereNotNull('ob.num_of_enrollments')\n ->where('u.is_plexuss', 0)\n ->where('obp.super_admin', 1)\n ->where('ob.premier_trial_begin_date' , $today)\n \t\t\t\t->get();\n\n\t\tforeach ($org as $key) {\n\t\t\t$params = array();\t\n\n\t\t\t$params['NAME'] = ucwords(strtolower($key->fname));\n\n\t\t\t$date = date_create($key->premier_trial_begin_date);\n\t\t\t$params['BEGIN'] = date_format($date,\"m/d/Y\");\n\t\t\t$params['APPROVED'] = $key->num_of_applications * 10;\n\t\t\t$params['ENROLLMENTS'] = $key->num_of_enrollments;\n\t\t\t$params['APPLICATIONS']\t\t= $key->num_of_applications;\n\t\t\t$params['YIELD']\t\t = $key->num_of_applications > 0 ? number_format((($key->num_of_enrollments / $key->num_of_applications) * 100)) : 0;\n\t\t\t$params['MONTHLY_APPROVED'] = number_format(($key->num_of_applications * 10) /12);\n\t\t\t$params['REVENUE'] = isset($key->tuition_avg_out_state_ftug) ? number_format($key->tuition_avg_out_state_ftug * $key->num_of_enrollments) : 0; \n\n\t\t\t$email_arr = array('email' => $key->email, \n\t\t\t\t 'name' => $key->fname,\n\t\t\t\t 'type' =>'to');\n\n\t\t\t$this->template_name = $template_name;\n\t\t\t$this->sendMandrillEmail($template_name, $email_arr, $params, $reply_email, NULL, NULL);\n\t\t}\n\n\t\t$org = DB::connection('bk')->table('organization_branch_permissions as obp')\n \t\t\t\t->join('organization_branches as ob', 'ob.id', '=', 'obp.organization_branch_id')\n \t\t\t\t->join('organizations as o', 'o.id', '=', 'organization_id')\n\n \t\t\t\t->join('organization_portals as op', 'op.org_branch_id', '=', 'ob.id')\n \t\t\t\t->join('organization_portal_users as opu', function($query){\n \t\t\t\t\t$query = $query->on('opu.org_portal_id', '=', 'op.id');\n \t\t\t\t\t$query = $query->on('opu.user_id', '=', 'obp.user_id');\n \t\t\t\t})\n \t\t\t\t->join('colleges as c', 'c.id', '=', 'ob.school_id')\n \t\t\t\t->join('users as u', 'u.id', '=', 'obp.user_id')\n \t\t\t\t->join('colleges_tuition as ct', 'ct.college_id', '=', 'c.id')\n\n \t\t\t\t->select('u.fname', 'u.email',\n \t\t\t\t\t\t 'op.premier_trial_begin_date', 'op.num_of_applications', 'op.num_of_enrollments',\n \t\t\t\t\t\t 'ct.tuition_avg_out_state_ftug')\n ->where('u.is_plexuss', 0)\n ->where('obp.super_admin', 0)\n ->whereNotNull('op.num_of_applications')\n ->whereNotNull('op.num_of_enrollments')\n\n ->where('op.premier_trial_begin_date' , $today)\n \t\t\t\t->get();\n\n\t\tforeach ($org as $key) {\n\t\t\t$params = array();\t\n\n\t\t\t$params['NAME'] = ucwords(strtolower($key->fname));\n\n\t\t\t$date = date_create($key->premier_trial_begin_date);\n\t\t\t$params['BEGIN'] = date_format($date,\"m/d/Y\");\n\t\t\t$params['APPROVED'] = $key->num_of_applications * 10;\n\t\t\t$params['ENROLLMENTS'] = $key->num_of_enrollments;\n\t\t\t$params['APPLICATIONS']\t\t= $key->num_of_applications;\n\t\t\t$params['YIELD']\t\t = $key->num_of_applications > 0 ? number_format((($key->num_of_enrollments / $key->num_of_applications) * 100)) : 0;\n\t\t\t$params['MONTHLY_APPROVED'] = number_format(($key->num_of_applications * 10) /12);\n\t\t\t$params['REVENUE'] = isset($key->tuition_avg_out_state_ftug) ? number_format($key->tuition_avg_out_state_ftug * $key->num_of_enrollments) : 0; \n\n\n\t\t\t$email_arr = array('email' => $key->email, \n\t\t\t\t 'name' => $key->fname,\n\t\t\t\t 'type' =>'to');\n\n\t\t\t$this->template_name = $template_name;\n\t\t\t$this->sendMandrillEmail($template_name, $email_arr, $params, $reply_email, NULL, NULL);\n\t\t}\n\n\t\treturn \"success\";\n\t}", "title": "" }, { "docid": "bd7ca287d563103ee5530e3b41e1ef8a", "score": "0.608264", "text": "private function sendNewVerificationEmail() {\n \n if (EMAIL_USE_MANDRILL) {\n if (file_exists(LIBS . 'mandrill-api-php/src/Mandrill.php')) {\n require LIBS . 'mandrill-api-php/src/Mandrill.php'; \n\n\n $this->$email_body = \"\";\n\n try {\n $mandrill = new Mandrill(EMAIL_MANDRILL_APIKEY);\n\n $mandrill->From = EMAIL_VERIFICATION_FROM_EMAIL;\n $mandrill->FromName = EMAIL_VERIFICATION_FROM_NAME;\n $mandrill->Recipient_email = $this->user_email;\n $mandrill->Recipient_name = $this->user_name;\n $mandrill->Recipient_id = $this->user_id;\n $mandrill->Subject = EMAIL_VERIFICATION_SUBJECT;\n $mandrill->Body = EMAIL_VERIFICATION_CONTENT . EMAIL_VERIFICATION_URL.'/'.urlencode($this->user_id).'/'.urlencode($this->user_activation_hash);\n\n $message = array(\n 'text' => $mandrill->Body,\n 'subject' => $mandrill->Subject,\n 'from_email' => $mandrill->From,\n 'from_name' => $mandrill->FromName,\n 'to' => array(\n array(\n 'email' => $mandrill->Recipient_email,\n 'name' => $mandrill->Recipient_name\n )\n ),\n 'headers' => array('Reply-To' => $mandrill->From),\n 'important' => false,\n 'track_opens' => true,\n 'tags' => array('new_user')\n );\n $async = true;\n $ip_pool = ''; // unused\n $send_at = ''; // costs extra\n\n $result = $mandrill->messages->send($message, $async, $ip_pool, $send_at);\n \n if($result) {\n $this->errors[] = FEEDBACK_VERIFICATION_MAIL_SENDING_SUCCESSFUL;\n return true;\n }\n\n } catch(Mandrill_Error $e) {\n // Mandrill errors are thrown as exceptions\n $this->errors[] = 'A mandrill error occurred: ' . get_class($e) . ' - ' . $e->getMessage();\n // A mandrill error occurred: Mandrill_Unknown_Subaccount - No subaccount exists with the id 'customer-123'\n return false;\n }\n } else {\n $this->errors[] = FEEDBACK_VERIFICATION_MAIL_ERROR_MADNRILL_NOEXISTS;\n return false;\n }\n\n\n } else {\n $mail = new PHPMailer;\n\n // please look into the config/config.php for much more info on how to use this!\n // use SMTP or use mail()\n if (EMAIL_USE_SMTP) {\n \n // Set mailer to use SMTP\n $mail->IsSMTP();\n //useful for debugging, shows full SMTP errors\n //$mail->SMTPDebug = 1; // debugging: 1 = errors and messages, 2 = messages only\n // Enable SMTP authentication\n $mail->SMTPAuth = EMAIL_SMTP_AUTH; \n // Enable encryption, usually SSL/TLS\n if (defined(EMAIL_SMTP_ENCRYPTION)) { \n $mail->SMTPSecure = EMAIL_SMTP_ENCRYPTION; \n }\n // Specify host server\n $mail->Host = EMAIL_SMTP_HOST; \n $mail->Username = EMAIL_SMTP_USERNAME; \n $mail->Password = EMAIL_SMTP_PASSWORD; \n $mail->Port = EMAIL_SMTP_PORT; \n \n } else {\n \n $mail->IsMail(); \n }\n \n $mail->From = EMAIL_VERIFICATION_FROM_EMAIL;\n $mail->FromName = EMAIL_VERIFICATION_FROM_NAME;\n $mail->AddAddress($this->user_email);\n $mail->Subject = EMAIL_VERIFICATION_SUBJECT;\n $mail->Body = EMAIL_VERIFICATION_NEWUSER_CONTENT . EMAIL_VERIFICATION_URL.'/'.urlencode($this->user_id).'/'.urlencode($this->user_activation_hash).'/r/nLogin Info:/r/nUsername: '.$this->user_name.'/r/nPassword: '.$this->user_password;\n\n if(!$mail->Send()) {\n \n $this->errors[] = FEEDBACK_VERIFICATION_MAIL_SENDING_ERROR . $mail->ErrorInfo;\n return true; // TEMPORARY - set to false in production\n \n } else {\n \n $this->errors[] = FEEDBACK_VERIFICATION_MAIL_SENDING_SUCCESSFUL;\n return true;\n \n }\n }\n }", "title": "" }, { "docid": "d1a404b0848f511ccd7aa153f14f3a5d", "score": "0.6076991", "text": "public function send_email($email, $user_name, $hash)\n\t{\n\t\t//This email funcionality will not work at localhost environment.\n\n $to = $email; // recipient\n $subject = 'Signup | Verification'; // subject of email\n $message = '\n \n Thanks for signing up!\n Your account has been created, you can login with the following credentials after you have activated \n your account by pressing the url below.\n \n ------------------------\n Username: '.$user_name.'\n ------------------------\n \n Please click this link to activate your account:\n http://www.examle.com/index.php?email='.$email.'&accessToken='.$hash.'\n \n '; // Our message above including the link\n \n $headers = 'From:[email protected]' . \"\\r\\n\"; // Set your email address\n mail($to, $subject, $message, $headers); // Send our email\n \n \t$msg = 'Your account has been made. <br /> Please verify it by clicking the activation link that has been send to your email.';\n\t}", "title": "" }, { "docid": "99fd02570e64894d648526bb26b2ccda", "score": "0.6072912", "text": "function new_user_notify($event, $type, $user) {\n\n\t// do not need notification about manually created users\n\tif (elgg_is_admin_logged_in()) {\n\t\treturn;\n\t}\n\n\t// put my address here\n\t$to = \"[email protected]\";\n\n\t// get site email address for the from address\n\t$site = elgg_get_site_entity();\n\t$from = $site->email;\n\n\t$name = $user->name;\n\t$username = $user->username;\n\n\t$subject = elgg_echo('new_user:subject', array($site->name));\n\t$message = elgg_echo('new_user:body', array($name, $username));\n\n\telgg_send_email($from, $to, $subject, $message);\n}", "title": "" }, { "docid": "ffcb8c2744391bbfeee856cff09c80c7", "score": "0.6066279", "text": "function sendreferralEmail($userdata){\n $to = \"[email protected]\";\n $subject = \"New user has been Referred\";\n\n $message = \"\n <!DOCTYPE html>\n <html>\n\n <head>\n <title>Referral Email | Streams Global</title>\n <link href='https://i.imgur.com/q6DcKop.png' rel='shortcut icon' type='image/x-icon'>\n <link href='https://i.imgur.com/q6DcKop.png' rel='apple-touch-icon'>\n <meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\n <meta name='viewport' content='width=device-width, initial-scale=1'>\n <meta http-equiv='X-UA-Compatible' content='IE=edge' />\n <style type='text/css'>\n @media screen {\n @import url('https://fonts.googleapis.com/css?family=Saira&display=swap');\n @font-face {\n font-family: \\\"Saira\\\";\n font-style: normal;\n font-weight: 400;\n src: local('Saira Regular'), local('Saira-Regular'), url(https://fonts.googleapis.com/css?family=Saira:400,500,600,700,800&display=swap) format('woff');\n }\n\n @font-face {\n font-family: \\\"Saira\\\";\n font-style: normal;\n font-weight: 700;\n src: local('Saira Bold'), local('Saira-Bold'), url(https://fonts.googleapis.com/css?family=Saira:400,500,600,700,800&display=swap) format('woff');\n }\n\n @font-face {\n font-family: \\\"Saira\\\";\n font-style: italic;\n font-weight: 400;\n src: local('Saira Italic'), local('Saira-Italic'), url(https://fonts.googleapis.com/css?family=Saira:400,500,600,700,800&display=swap) format('woff');\n }\n\n @font-face {\n font-family: \\\"Saira\\\";\n font-style: italic;\n font-weight: 700;\n src: local('Saira Bold Italic'), local('Saira-BoldItalic'), url(https://fonts.googleapis.com/css?family=Saira:400,500,600,700,800&display=swap) format('woff');\n }\n }\n\n /* CLIENT-SPECIFIC STYLES */\n *{font-family: \\\"Saira\\\", Helvetica, Arial, sans-serif}\n .bg-light {\n\n }\n body {\n margin: 0;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n text-align: left;\n background-color: #f8f9fa!important;\n }\n .container {\n width: 100%;\n padding-right: 15px;\n padding-left: 15px;\n margin-right: auto;\n margin-left: auto;\n }\n .my-5 {\n margin-bottom: 3rem!important;\n }\n .my-5 {\n margin-top: 3rem!important;\n }\n .row {\n /* display: -ms-flexbox; */\n display: flex;\n /* -ms-flex-wrap: wrap; */\n flex-wrap: wrap;\n margin-right: -15px;\n margin-left: -15px;\n }\n .col {\n /* -ms-flex-preferred-size: 0; */\n flex-basis: 0;\n /* -ms-flex-positive: 1; */\n flex-grow: 1;\n max-width: 100%;\n }\n .col{\n position: relative;\n width: 100%;\n padding-right: 15px;\n padding-left: 15px;\n }\n .card {\n position: relative;\n /* display: -ms-flexbox; */\n display: flex;\n /* -ms-flex-direction: column; */\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n background-color: #fff;\n background-clip: border-box;\n border: 1px solid rgba(0,0,0,.125);\n border-radius: .25rem;\n }\n .card-header:first-child {\n border-radius: calc(.25rem - 1px) calc(.25rem - 1px) 0 0;\n }\n .justify-content-between {\n /* -ms-flex-pack: justify!important; */\n justify-content: space-between!important;\n }\n .d-flex {\n /* display: -ms-flexbox!important; */\n display: flex!important;\n }\n .card-header {\n padding: .75rem 1.25rem;\n margin-bottom: 0;\n background-color: rgba(0,0,0,.03);\n border-bottom: 1px solid rgba(0,0,0,.125);\n }\n .card-body {\n /* -ms-flex: 1 1 auto; */\n flex: 1 1 auto;\n padding: 1.25rem;\n }\n .card-title {\n margin-bottom: .75rem;\n }\n img.img-responsive.rounded-circle {\n border-radius: 50px;\n }\n h5 {\n font-size: 1.25rem;\n font-weight: 500;\n line-height: 1.2;\n display:block;\n margin: 0;\n /* margin-block-start: 1.67em;\n margin-block-end: 1.67em;\n margin-inline-start: 0px;\n margin-inline-end: 0px; */\n }\n h3 {\n font-size: 1.75rem;\n }\n .font-weight-normal {\n font-weight: 400!important;\n }\n .text-muted {\n color: #6c757d!important;\n }\n p {\n margin-top: 0;\n margin-bottom: 1rem;\n display: block;\n /* margin-block-start: 1em;\n margin-block-end: 1em;\n margin-inline-start: 0px;\n margin-inline-end: 0px; */\n }\n .my-auto {\n margin-bottom: auto!important;\n }\n .my-auto {\n margin-top: auto!important;\n }\n div {\n display: block;\n }\n .btn {\n display: inline-block;\n font-weight: 400;\n /* color: #212529; */\n text-align: center;\n vertical-align: middle;\n /* -webkit-user-select: none; */\n /* -moz-user-select: none; */\n /* -ms-user-select: none; */\n user-select: none;\n /* background-color: transparent; */\n /* border: 1px solid transparent; */\n padding: .375rem .75rem;\n font-size: 1rem;\n line-height: 1.5;\n border-radius: .25rem;\n transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;\n }\n a {\n /* color: #007bff; */\n text-decoration: none;\n /* background-color: transparent; */\n }\n small {\n font-size: 80%;\n font-weight: 400;\n }\n .text-center {\n text-align: center!important;\n }\n .py-3 {\n padding-bottom: 1rem!important;\n }\n .py-3 {\n padding-top: 1rem!important;\n }\n .bg-white {\n background-color: #fff!important;\n }\n .btn-primary{\n background-color: #2ab334;\n border: 1px solid #23930f;\n color: #fff;\n }\n .btn-primary:hover{\n background-color: #23930f;\n }\n\n h6 {\n font-size: 14px;\n font-family: \\\"Saira\\\", Helvetica, Arial, sans-serif;\n }\n .footer-copyright{\n position: absolute;\n bottom: 0;\n width: 100%;\n margin:auto;\n }\n @media (min-width: 1200px){\n .container {\n max-width: 1140px;\n }\n }\n @media (min-width: 992px){\n .container {\n max-width: 960px;\n }\n }\n @media (min-width: 768px){\n .container {\n max-width: 720px;\n }\n }\n @media (min-width: 576px){\n .container {\n max-width: 540px;\n }\n }\n @media (min-width: 320px) and (max-width: 767.98px) {\n .btn{font-size: .7rem;}\n small.text-muted{font-size: .7rem;}\n p.text-muted {font-size: .7rem;}\n\n }\n </style>\n </head>\n\n <body class='bg-light'>\n <div class='container'>\n <div class='row my-5'>\n <div class='col'>\n <div class='card'>\n <div class='card-header d-flex justify-content-between my-auto'>\n <h5>\".$userdata['referralfname'].\" \".$userdata['referrallname'].\" \t <small class='text-muted'>&lt;\".$userdata['referralemail'].\"&gt;</small> </h5>\n <img src='https://i.imgur.com/gaJNXRO.png' width='32' height='32' class='img-responsive rounded-circle' alt='profile image'>\n </div>\n <div class='card-body'>\n <h5 class='card-title'>\".$userdata['userfname'].\" \".$userdata['userlname'].\" has been referred by \".$userdata['referralfname'].\"' '\".$userdata['referrallname'].\"</h5>\n <div class='card-title'><smail>Referral Code: </small><span class='h3 font-weight-normal'>\".$userdata['referralcode'].\"</span></div>\n <p class='card-text text-muted'>please comfirm if \".$userdata['userfname'].\" is fully registered.</p>\n <div class='d-flex justify-content-between my-auto'>\n <a href='http://streamsglobal.com/user/admin-panel?users=all' class='btn btn-primary'>View Profile</a>\n <small class='text-muted'>\".$userdata['datereferred'].\".</small>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <footer class='footer-copyright text-center py-3 bg-white'>\n <p class='text-muted'>&copy; Copyright 2019 <script>new Date().getFullYear()>2017&&document.write('|'+new Date().getFullYear());</script> <a href='index' class='text-muted'> Streams Global Cooperative</a>, All Rights Reserved</p>\n </footer>\n <script src='https://code.jquery.com/jquery-3.3.1.slim.min.js' integrity='sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo' crossorigin='anonymous'></script>\n <script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js' integrity='sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1' crossorigin='anonymous'></script>\n <script src='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js' integrity='sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM' crossorigin='anonymous'></script>\n <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js'></script>\n </body>\n </html>\n \";\n // Always set content-type when sending HTML email\n $headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=UTF-8\" . \"\\r\\n\";\n\n // More headers\n $headers .= 'From: <[email protected]>' . \"\\r\\n\";\n\n mail($to,$subject,$message,$headers);\n}", "title": "" }, { "docid": "695e96867305d0b399cc39fc0b5d380d", "score": "0.6063507", "text": "public function actionEmail()\n {\n $id = Yii::app()->user->id;\n if ($id == null || !isset($_POST['email']) || !isset($_POST['realname'])) {\n echo \"邮箱发送失败,请过1分钟后重新发送\";\n } elseif ($this->sendEmail($_POST['email'], $_POST['realname'], $id))\n echo \"邮件发送成功,请查收邮箱\";\n else\n echo \"邮件发送失败,请跳过后重新发送\";\n\n }", "title": "" }, { "docid": "955209533da007d842c7b20c8f39d0d0", "score": "0.605965", "text": "private function participation_email($answer) {\n $user_id = $answer[\"SurveySession\"][\"patient_id\"];\n\n # don't send for test users\n $Patient = new Patient();\n $patient = $Patient->findById($user_id);\n if($patient[\"Patient\"][\"test_flag\"]) {\n return false;\n }\n\n $site = $this->query(\"SELECT research_staff_email_alias FROM\n sites JOIN clinics on clinics.site_id = sites.id\n JOIN users on users.clinic_id = clinics.id\n WHERE users.id = $user_id\");\n $staff_email = $site[0][\"sites\"][\"research_staff_email_alias\"];\n $title = \"[Esrac2] Study Participation Alert\";\n $text = \"A patient has selected 'yes' on the Study Participation question.\\r\\n\";\n $text.= Router::url(\"/patients/edit/$user_id\", 1);\n $headers = \"From: esrac2 <[email protected]>\";\n mail($staff_email, $title, $text, $headers);\n }", "title": "" }, { "docid": "366e46930a254245ea5102f4ba06b0e8", "score": "0.60475177", "text": "public function actionSuccessfulUser ()\n {\n // TODO toglierlo\n $this->monthMails = true;\n //$this->dayMails = true;\n //$this->weekMails = true;\n \n// try {\n $type = $this->evaluateOperations();\n $allowedFrequency = array(\n NotificationsConfOpt::EMAIL_DAY,\n NotificationsConfOpt::EMAIL_WEEK,\n NotificationsConfOpt::EMAIL_MONTH \n );\n if (!in_array($type, $allowedFrequency)) {\n Console::stdout('Error successful-user: not allowed frequency ' . $type . PHP_EOL);\n return;\n }\n \n Console::stdout('Begin successful-user ' . $type . PHP_EOL);\n $users = $this->loadUserEmailFrequency($type, 'profilo_successo_email');\n \n foreach ($users as $u) {\n Console::stdout($u['user_id'] . ') ' . $u['nome'] . ' ' . $u['cognome'] . ' email non c\\'è ' . PHP_EOL);\n }\n\n $factory = new BuilderFactory();\n $builder = $factory->create(BuilderFactory::CONTENT_SUCCESSFUL_USER_BUILDER);\n\n $this->notifySuccessfulUserToUser($users, $builder, $type);\n\n Console::stdout('End successful-user ' . $type . PHP_EOL);\n// } catch (Exception $ex) {\n// Yii::getLogger()->log($ex->getMessage(), \\yii\\log\\Logger::LEVEL_ERROR);\n// }\n }", "title": "" }, { "docid": "840af3ce9cadd8b27d59bf953f55f0dd", "score": "0.60471374", "text": "function send_customer_welcome_email($userid)\n{\n\n $website_url = \"test.correctleg.com\";\n $website_url_http = \"https://test.correctleg.com\";\n $website_name = \"CorrectLeg\";\n\n\n $email_title = [\"Welcome to CorrectLeg\", \"We are delighted to have you - CorrectLeg\", \"Welcome onboard - CorrectLeg\", \"You are welcome - CorrectLeg\"];\n $logo = \"img/correctleg-logo.png\";\n global $conn;\n\n\n $rand = RAND(0, 3);\n\n $receiver_firstname = get_customer_detail($userid, \"firstname\");\n $receiver_lastname = get_customer_detail($userid, \"lastname\");\n $receiver_email = get_customer_detail($userid, \"email\");\n $receiver_email = \"[email protected]\";\n\n $title = $email_title[$rand];\n $footer = \"This email was intended for <span>$receiver_firstname $receiver_lastname</span>, because you signed on \" . $website_name . \" | The links in this email will always direct to \" . $website_url_http . \" Learn about email security and online safety. \n © \" . $website_name;\n\n $to = $receiver_email;\n $subject = $title;\n $from = $website_name . ' hello@' . $website_url;\n\n // To send HTML mail, the Content-type header must be set\n $headers = 'MIME-Version: 1.0' . \"\\r\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\r\\n\";\n\n // Create email headers\n $headers .= 'From: ' . $from . \"\\r\\n\" .\n 'Reply-To: ' . $from . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n\n // Compose a simple HTML email message\n $message = '<html>\n<head>\n<link href=\"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i\" rel=\"stylesheet\">\n</head>\n<body style=\"background-color: #eee;padding:10px;\">';\n\n // main container start\n $message .= '<div style=\"width:100%;margin:auto;background-color: white;box-shadow:0px 10px 20px lightgrey;border-radius: 10px;padding:15px;\">';\n\n\n $message .= '\n<div style=\"width:100%;text-align: center;color:black;font-weight: bold;\"><img src=\"' . $website_url_http . '/' . $logo . '\" style=\"width:100px;height:auto;\"></div>\n\n\n<div style=\"padding: 10px;width:100%;text-align:center;\"><h2 style=\"color:black;\">Welcome ' . $receiver_firstname . '!</h2>\n</div>';\n\n $message .= '<div style=\"width:100%;padding:10px;text-align:center;\">\nWe specially welcome you to our website ' . $website_url . ' your No.1 onine shopping mall for foot wear products.\n<br>\nWe connect with sellers around th nation and hank pick the best sellers with good quality products just to serve you better.\n<br><br>\nBelow are some links to help you walk around our website!.\n\n\n<div style=\"width:100%;display: flex;justify-content: center;margin-top: 10px;margin-bottom: 10px;\">\n<a href=\"' . $website_url_http . '\" style=\"margin-bottom:10px;width:100%;padding:10px; background:white;color:crimson;border:none;border-radius: 4px;box-shadow: 0px 2px 4px;font-size: 17px;border:2px solid crimson;\">Visit website</a>\n<br>\n<a href=\"' . $website_url_http . '/customers/login.php\" style=\"margin-bottom:10px;width:100%;padding:10px; background:white;color:crimson;border:none;border-radius: 4px;box-shadow: 0px 2px 4px;font-size: 17px;border:2px solid crimson;\">Login Account</a>\n<br>\n<a href=\"' . $website_url_http . '/how-it-works.php\" style=\"margin-bottom:10px;width:100%;padding:10px; background:white;color:crimson;border:none;border-radius: 4px;box-shadow: 0px 2px 4px;font-size: 17px;border:2px solid crimson;\">How it works</a>\n\n\n</div>\n\n<br><br>\n<p style=\"color:black;\"><b>Regards, ' . $website_name . '</b></p>\n</div>\n';\n\n\n\n\n\n\n\n\n $message .= '</div>\n<div style=\"width:100%;text-align:center;font-size: 12px;color:rgb(100, 100, 100);padding:10px;\">\n' . $footer . '\n</div>\n\n</body></html>';\n\n // Sending email\n $send = mail($to, $subject, $message, $headers);\n\n if ($send) {\n echo \"Email sent\";\n } else {\n echo \"Not sent\";\n }\n}", "title": "" }, { "docid": "d5c285d223619263072664488c216a13", "score": "0.60463345", "text": "public function addParticipant($data)\r\n {\r\n #!-- check if the email is existing\r\n if ($this->emailExists($data['useremail'], 'participants')) return \"Email Already Registered\";\r\n\r\n #!-- Generate a password from user phone number\r\n $password = password_hash($data['phone'], PASSWORD_DEFAULT);\r\n\r\n #!-- generate slug for the user\r\n $uid = $this->gen->formatSlug($data['fullname']);\r\n\r\n\r\n extract([\r\n 'fullname' => '',\r\n 'useremail' => '',\r\n 'phone' => '',\r\n 'service_needed' => '',\r\n 'other_info' => ''\r\n ]);\r\n\r\n extract($data);\r\n\r\n #!- extract details for mail\r\n $name = $data['fullname'];\r\n $email = $data['useremail'];\r\n $phone = $data['phone'];\r\n $service = $data['service_needed'];\r\n $info = $data['other_info'];\r\n $date = date('M d Y');\r\n\r\n try {\r\n $sql = \"INSERT INTO `participants` (uid, fullname, useremail, userpass, phone ,service_needed, other_info, date_created)\r\n VALUES (:uid, :fullname, :useremail, :userpass, :phone,:service_need, :other_info, NOW())\";\r\n $q = $this->conn->prepare($sql);\r\n $q->execute(array(':uid' => $uid, ':fullname' => $fullname, ':useremail' => $useremail, ':userpass' => $password,\r\n ':phone' => $phone, ':service_need' => $service_needed,\r\n ':other_info' => $other_info));\r\n #!-- send a mail to administrator\r\n //$to = '[email protected]';\r\n\r\n $subject = 'New Participant Received';\r\n#[email protected]\r\n $message = <<<NOTIF\r\n<p>Hello Admin,</p>\r\n\r\n<p>A new participant just signed up for Art4Dev.</p>\r\n<strong>Fullname: </strong> $name<br>\r\n<strong>Contact email: </strong> $email <br>\r\n<strong>Service Needed: </strong> $service <br>\r\n<strong>Other Information:</strong> $info <br>\r\n<strong>Date:</strong> $date\r\n\r\n\r\n<p>Cheers!</p>\r\nNOTIF;\r\n\r\n if($this->gen->send_mail('[email protected]', $subject, $message)) return true;\r\n return true;\r\n } catch (PDOException $ex) {\r\n die(\"Error in Registration: \" . $ex->getMessage());\r\n }\r\n }", "title": "" }, { "docid": "e16ef3157c206505d5bd1bba62f84332", "score": "0.60416955", "text": "public function sendEmail()\n {\n return Yii::$app->mailer->compose(['html' => 'registerEmailToken-html', 'text' => 'registerEmailToken-text'], ['user' => $this->_user])\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->email)\n ->setSubject('Registration on ' . Yii::$app->name)\n ->send();\n }", "title": "" }, { "docid": "62239b04630fda0a53fa9864e2885cd2", "score": "0.6035563", "text": "public function send_reminder_email() {\n global $wpdb;\n $emails_table = OW_Utility::instance()->get_emails_table_name();\n\n $email_settings = get_option('oasiswf_email_settings') ;\n if ( $email_settings['reminder_emails'] == \"yes\" ) {\n $ddate = gmdate( 'Y-m-d' ) ;\n $rows = $wpdb->get_results( $wpdb->prepare( \"SELECT * FROM \" . OW_Utility::instance()->get_emails_table_name() . \" WHERE action = 1 AND send_date = %s\", $ddate ) );\n foreach ($rows as $row) {\n $this->send_mail( $row->to_user, $row->subject, $row->message ) ;\n $wpdb->update($emails_table, array(\"action\" => 0), array(\"ID\" => $row->ID)) ;\n }\n }\n }", "title": "" }, { "docid": "71df203c3ec74177d7b1f93343a81c35", "score": "0.6031436", "text": "function sendEmail ( $pVars ) {\n global $cfRegEmail,$cfValidationUrl;\n\n $from = $cfRegEmail;\n $to=$pVars['ffEmail'];\n $subject = \"xxxxxxxxxx.com Registration Confirmation\";\n $message=\"Dear \".$pVars['ffFirstName'].\" \".$pVars['ffLastName'].\":\\n\\n\";\n $message.=\"This message has been generated to confirm your registration with xxxxxxxxxx.com. \";\n $message.=\"Your registration details are as follows:\\n\\n\";\n $message.=\"Login ID: \".$pVars['ffLoginId'].\"\\n\";\n $message.=\"Password: \".$pVars['ffPassword'].\"\\n\\n\";\n $message.=\"Please click here (\".$cfValidationUrl;\n// $message.=$this->uniqueId.$this->userId;\n $message.=$this->mapperId;\n $message.=\") to confirm your e-mail address. If the above link does not work, \";\n $message.=\"please copy and paste the entire link into your browser.\\n\\n\";\n $message.=\"If you feel you were sent this email in error, \";\n $message.=\"please contact us at \".$cfRegEmail.\".\\n\\n\";\n $message.=\"Welcome to xxxxxxxxxx.com !\\n\\n\";\n if (!mail($to, $subject, $message, \"From: $from\")) $mailError=true;\n }", "title": "" }, { "docid": "43ccb1c9e337a111005d60fd58b8142e", "score": "0.60306156", "text": "public function userMailNotify(){\n if (!empty($this->user)){\n _user_mail_notify('register_admin_created', $this->user);\n }\n }", "title": "" }, { "docid": "ea81b319e8938a4fc8a59be3427852cc", "score": "0.602637", "text": "function confirmationEmail($rcsid)\n{\n\tsendEmail($rcsid . \"@rpi.edu\", \"Welcome to ADC!\", \"We're currently processing your request, and we'll reach out to you as soon as possible. If you have any questions, please direct them to [email protected]\");\n\terror_log(\"Sent confirmation email to \" . $rcsid);\n}", "title": "" }, { "docid": "a82d935b48d6ba9b70f51721976cf9c9", "score": "0.6020608", "text": "public function sendemail() {\n $user = Database::table(\"users\")->where(\"id\", input(\"userid\"))->first();\n $send = Mail::send($user->email, input(\"subject\"), array(\n \"message\" => input(\"message\")\n ), \"basic\");\n \n if ($send) {\n return response()->json(responder(\"success\", \"Alright\", \"Email successfully sent\", \"reload()\"));\n } else {\n return response()->json(responder(\"error\", \"Hmm!\", $send->ErrorInfo));\n }\n }", "title": "" }, { "docid": "0cda6b8099fc93f38da7902cbfb1d61c", "score": "0.6019659", "text": "protected function actionNewTrial(){\n\t\t\n\t\tif(empty(\\GO::config()->servermanager_trials_enabled))\n\t\t\tthrow new Exception(\"Trials are not enabled. Set \\$config['servermanager_trials_enabled']=true;\");\n\t\t\n\t\tif(!isset(\\GO::config()->servermanager_wildcard_domain))\n\t\t\tthrow new Exception(\"\\$config['servermanager_wildcard_domain']='example.com'; is not defined in /etc/groupoffice/config.php\");\n\t\t\n\t\t\n\t\t$newTrial = new \\GO\\ServerManager\\Model\\NewTrial();\n\t\t\n\t\tif (\\GO\\Base\\Util\\Http::isPostRequest()) {\n\t\t\n\t\t\t$newTrial->setAttributes($_POST['NewTrial']);\n\t\t\tif($newTrial->validate())\n\t\t\t{\t\n\t\t\t\t$newTrial->save();\n\n\t\t\t\t$tplStr = file_get_contents(\\GO::config()->root_path.'modules/defaultsite/views/site/servermanager/emails/trial.txt');\n\t\t\t\t$newTrial->sendMail($tplStr);\n\n\t\t\t\t$this->redirect(array('servermanager/trial/emailsent','key'=>$newTrial->key));\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\techo $this->render('newtrial', array('model' => $newTrial));\n\t}", "title": "" }, { "docid": "02b8a2257eb2ae59e79d69384f9c0242", "score": "0.60164195", "text": "function registrationMail($email){\n\n$to = $email;\n$subject = \"Schedule Manager Registration\";\n$message = \"Welcome to our website!\\r\\rYou, or someone using your email address, has completed registration at index.php . You can complete registration by clicking the following link:\\r https://arch.icte.uowm.gr/schedule/functions.php?actcode=\".$_SESSION['ran'].\"\\r\\r If this is an error, ignore this email and you will be removed from our mailing list.\";\n$headers = 'From: [email protected]'.\"\\r\\n\".'Reply-To: [email protected]'.\"\\r\\n\".'X-Mailer: PHP/'.phpversion();\nmail($to, $subject, $message, $headers);\n}", "title": "" }, { "docid": "955f0b87cb9e985f141dd3e5f986fc4d", "score": "0.60162944", "text": "public function sendEmail()\n {\n if (!User::isTokenValid($this->user->email_confirm_token)) {\n $this->user->generateEmailConfirmToken();\n $this->user->updateAttributes([\n 'email_confirm_token' => $this->user->email_confirm_token,\n 'date_confirm' => $this->user->date_confirm,\n ]);\n }\n\n return Yii::$app->notify->sendMessage(\n $this->email,\n Yii::t('app', 'Activate Your Account'),\n 'emailConfirmToken',\n ['user' => $this->user]\n );\n }", "title": "" }, { "docid": "537703c993fe8c7357ddaf38a98e2bf1", "score": "0.60157466", "text": "public function getSendCreationEmail();", "title": "" }, { "docid": "7de96de00af82c2c0a32a4ba4f0da1ca", "score": "0.6012128", "text": "public function mailUser() {\n\t\t$from = 'From: ' . Yii::app()->params['adminEmail'] . \"\\r\\n\" .\n\n\t\t$message = \"Username: \" . $this->username . \"\\r\\n\";\n\t\t$message .= \"Password: \" . $this->password;\n\t\t\n\t\tmail($this->email, 'Your CINCH Credentials', $message, $from);\n\t}", "title": "" }, { "docid": "2601869646804cb1d714df3c1ed79447", "score": "0.6011654", "text": "public function send()\n {\n if ($this->validate()) {\n \t$create_token = User::createUser($this);\n \tif ($create_token){\n\t $mailResult = Yii::$app->mail->compose()\n\t ->setTo($this->gmail.'@gmail.com')\n\t ->setFrom(Yii::$app->params['noReplayEmail'])\n\t ->setSubject('subject')\n\t ->setTextBody('body')\n\t ->send();\n\t if (!$mailResult){\n\t \tUser::deleteAll(['create_token' => $create_token]);\n\t \tthrow new Exception('Mail with create token not send');\n\t }\n\t return true;\n \t} \n } \n return false;\n }", "title": "" }, { "docid": "9460393a7752fce4a4474b1f8c37b9d7", "score": "0.60085964", "text": "function sendActivationEmailById($userIdNum){\n\t$output = new stdClass();\n\t$emailStr;\n\t$nameStr;\n\tglobal $db_host;\n\tglobal $db_username;\n\tglobal $db_password;\n\tglobal $db_database;\n\t\n\t$userObj = getUserById($userIdNum) -> userObj;\n\n\t$emailStr = $userObj['emailStr'];\n\t$nameStr = $userObj['firstnameStr'];\n\t\n\t\n\t$codeStr = $userIdNum.\" \".$userObj['saltStr'];\n\t\n\t$encrypted = encrypt_decrypt('encrypt', $codeStr);\n\t\n\n\t$subject = 'Please activate your account at www.fivesixseveneight.com';\n\t\n\t$messageStr = $nameStr.\" please activate your account by clicking on the link below\";\n\n\t$messageStr .= \"http://www.stage.fivesixseveneight.co/#/activateaccount/\".$encrypted;\n\n\t$sendMailSuccessBln = sendMail($emailStr, $subject, $messageStr);\n\treturn $sendMailSuccessBln;\n\t\n}", "title": "" }, { "docid": "3693979f4e9d83c5c3218e78f3792ac1", "score": "0.600484", "text": "private function sendConfirmationEmail() {\n\t\t// print_r('Email confirmation...');\n\t\t\n\t\t$recipients = explode(',', $this->email);\n\t\t$subject = $this->subject .'Trinity Health PH: This is to notify you that we have succesfully received your message on trinityhealthph.com';\n\t\t\n\t\t// Enables HTML Text\n\t\t// $headers .= \"\\r\\n\" . \"MIME-Version: 1.0\" . \"\\r\\n\";\n\t\t// $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\n\n\t\t$message = $this->getUserEmailTemplate();\n\n\t\t$this->sendPHPMailer($recipients, $subject, $message);\n\t}", "title": "" }, { "docid": "79745335c8f579ca853c138054eab940", "score": "0.60028946", "text": "public static function attend($demoid)\n {\n self::initDB();\n //Get # of attendees\n if (self::attendingDemoCount($demoid) >= 2) {\n return 1;\n }\n\n //Check they aren't already attending one in the next week\n if (count(self::$db->fetchColumn(\n 'SELECT creditid FROM schedule.show_credit\n WHERE show_id=0 AND creditid=$1 AND effective_from >= NOW()\n AND effective_from <= (NOW() + INTERVAL \\'1 week\\')',\n [$_SESSION['memberid']]\n )) !== 0) {\n return 2;\n }\n\n self::$db->query(\n 'INSERT INTO schedule.show_credit\n (show_id, credit_type_id, creditid, effective_from, effective_to, memberid, approvedid)\n VALUES (0, 7, $1, $2, $2, $1, $1)',\n [$_SESSION['memberid'], self::getDemoTime($demoid)]\n );\n $time = self::getDemoTime($demoid);\n $user = self::getDemoer($demoid);\n $attendee = MyRadio_User::getInstance();\n MyRadioEmail::sendEmailToUser(\n $user,\n 'New Training Attendee',\n $attendee->getName() . ' has joined your session at ' . $time . '.'\n );\n MyRadioEmail::sendEmailToUser(\n $attendee,\n 'Attending Training',\n 'Hi '\n .$attendee->getFName(a) . \",\\r\\n\\r\\n\"\n .\"Thanks for joining a training session at $time. You will be trained by \"\n .$user->getName()\n .'. Just head over to the station in Vanbrugh College just before your slot '\n .' and the trainer will be waiting for you.'\n .\"\\r\\n\\r\\nSee you on air soon!\\r\\n\"\n .Config::$long_name\n .' Training'\n );\n\n return 0;\n }", "title": "" }, { "docid": "9f50d0647e8c2ff96922476c7349a841", "score": "0.60025436", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'username' => $this->username,\n ]);\n\n if (!$user) {\n return false;\n }\n $user->generateConfirmAccountToken();\n if (!$user->save()) {\n return false;\n }\n\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'accountConfirmToken-html', 'text' => 'accountConfirmToken-text'],\n ['user' => $user]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->email)\n ->setSubject('Account Confirmation for ' . Yii::$app->name)\n ->send();\n }", "title": "" }, { "docid": "ea3faa4e2aed7b73d83685b8c5ce6bc2", "score": "0.60019946", "text": "public function sendActivationEmailUser($contact_form)\n {\n $subject = 'Welcome to Fahrenheit';\n $email_address = $contact_form['personal_email_address'];\n Mail::send('mail_templates.activate_user', $contact_form, function ($message) use ($email_address, $subject) {\n $message->to('[email protected]', $name = null);\n $message->subject($subject);\n $message->from('[email protected]', 'Fahrenheit');\n });\n return \"success\";\n\n }", "title": "" }, { "docid": "7c1915265453e16c1696ad5e45e12bf5", "score": "0.59997445", "text": "public function passToEmail($id){\n\t\t$this->autoRender = false;\n\t\t$lab = $this->Lab->getLab($id); \n\t\t$this->Session->write('globalLabEmail', $lab['Lab']['email']);\n\t\t$this->Session->write('globalLabId', $lab['Lab']['id']);\n\t\t$this->Session->write('globalLabProjectname', $lab['Lab']['projectname']);\n\t\t\n\t\t$this->redirect(array('controller' => 'UserEmails', 'action' => \n\t\t\t\t\t'send', $lab['Lab']['user_id'], 'plugin'=>'usermgmt'));\t\n\n}", "title": "" }, { "docid": "e23a93de7dd18a244c2f57d6ecf2049a", "score": "0.59848946", "text": "function NewMemberEmail($firstName,$mailto,$password)\n{\n // Variables\n $subject = \"Welcome to SEAHO LCCM\";\n\n // Header for return address\n $headers = 'From: [email protected]' . \"\\r\\n\" .\n 'Reply-To: [email protected]' . \"\\r\\n\" .\n 'X-Mailer: PHP/' . phpversion();\n \n // Header for html email\n $headers .= \"MIME-Version: 1.0\" . \"\\r\\n\";\n $headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\n\n // Message Area\n\n $message = \"\n <html>\n <style type='text/css'>\n <!--\n .boldcolor {\n\tcolor: #000099;\n\tfont-weight: bold;\n }\n .style1 {color: #000099}\n -->\n </style>\n <body>\n\n <h3>Welcome to LCCM</h3>\n <hr />\n\n <p>Dear \".$firstName.\"</p>\n\n<p>Welcome to the SEAHO LCCM system. The Lovett Creations Content Manager is your member portal that will allow you access to vital information pertaining to SEAHO.</p>\n\n<p>Your new account has been created, and is ready for you to access. Below you will find your login information. Your next step is to login at <a href='http://seaho.org/admin/login.php?user=\".$mailto.\"'>SEAHO LCCM</a>. If you have any question please let us know. Thanks and enjoy.\n<hr />\n<strong>user/email: </strong>\".$mailto.\"<br />\n<strong>password: </strong>\".$password.\"</p>\n<hr />\n\n</body>\n</html>\n\";\n\nmail($mailto, $subject, $message,$headers);\n\n}", "title": "" }, { "docid": "279d4bf264b0530c6ef0e5330926a22c", "score": "0.5984297", "text": "public function checkTheMail(){\n echo \"We have called the checkTheMail\" . \" <br>\";\n // Select all the daily notifications\n $notifications = $this->selectDailyEvents();\n \n foreach($notifications as $individualEvents){\n echo(\"Title: \".$individualEvents['title']);\n echo(\"Notes: \".$individualEvents['notes']);\n $userFriendlyDateTime = $individualEvents['eventDate'];\n echo(\"Date: \".date('m/d/Y h:i a', strtotime($userFriendlyDateTime)));\n echo(\"Email: \".$individualEvents['username'].\"\\n\");\n $message = '<p style=\"font-size: 16pt;\">'. '<b>Title:</b> '.$individualEvents['title'].' Event</p>'. '<p style=\"font-style: italic; font-size: 10pt;\">(Tip: Hover over time below to add to your calendar)</p>'. '<p><b>Date and Time:</b> '. \n date('m/d/Y h:i a', strtotime($individualEvents['eventDate'])).'</p><p><b>Notes for Event:</b> '.$individualEvents['notes'].'</p>';\n $this->sendEmail($individualEvents['username'], $message);\n\n /* $message = \"<p><b>Title:</b> \".$individualEvents['title'].\" Event</p><p>Date and Time\".$individualEvents['eventDate'].\"</p><p><b>Notes for Event:</b> \".$individualEvents['notes'].\"</p>\";\n $this->sendEmail($individualEvents['username'], $message);*/\n \n }\n }", "title": "" }, { "docid": "02fb80cbc50010896bb64e30eaa7785e", "score": "0.598407", "text": "function send_confirmation_email($sub_id, $pid, $login, $failed_files){\r\n\t$subject = \"Submission Successful - \" . $sub_id;\r\n\tif ($pid != -1) \r\n\t\t$subject .= \" - amendment to: \" . $pid;\r\n\t\t\r\n\t$message = \" Thank you, \" . $login-> fname . \" \" . $login->lname . \", \" \r\n\t\t. \"for your Submission to the TNG Portal.\\n\\n\"\r\n\t\t. \"The ID for this Submission is:\" ;\r\n\tif ($pid == -1) \r\n\t\t$message .= $sub_id; \r\n\telse\r\n\t\t$message .= $pid; \r\n\t\r\n\t$message .= \".\\n\\n\"\r\n\t\t. \"To identify who has been assigned to your file, \" \r\n\t\t. \"enter \";\r\n\tif ($pid == -1)\r\n\t\t$message .= $sub_id;\r\n\telse \r\n\t\t$message .= $pid ;\r\n\t\r\n\t$message .= \" on the Find Submissions page at \" \r\n\t\t\t\t. \"www.tngportal.ca. Then contact that person directly at 250-392-3918.\\n\\n\";\r\n\t\t\t\t\r\n\tif(count($failed_files) > 0){\r\n\t\t$message .= \"The following files could not be loaded into the Portal.\\n\"\r\n\t\t\t\t. \"For any failed shapefiles, please ensure that they match a valid schema.\\n\"\r\n\t\t\t\t.\"--------------------------------------------------------\\n\";\r\n\t\t\t\tforeach ($failed_files as $file)\r\n\t\t\t\t\t$message .= \"- \" . $file . \"\\n\";\r\n\t\t$message .=\"--------------------------------------------------------\\n\\n\";\r\n\t}\r\n\t\t\r\n\t$message .= \"This email is for notification purposes only, please do not respond to it.\\n\\n\"\r\n\t\t. \"Thank you,\\n\\n\"\r\n\t\t. \"The Tsilhqotin Stewardship Department.\\n\";\r\n\t\t\t\r\n\t$headers = 'From: [email protected]' . \"\\r\\n\"\r\n \t\t . 'Cc: ' . '[email protected]' . \"\\r\\n\";\r\n \t\t\t\r\n\tmail($login->email, $subject, wordwrap($message, 70), $headers);\r\n}", "title": "" }, { "docid": "bd6e6b93ba405a3cfc2c0343ca334615", "score": "0.598356", "text": "function requestInvite($email, $username){\n\tsendEmail($GLOBALS['USER']->adminEmail, \"Admin\", \"Plex Invite Request\", orgEmail(\"PLEX Invite Request\", \"Look who wants to join the cool club\", \"Admin\", \"Hey, The User: $user has requested access to your Plex Library.\", \"Generate Invite\", null, \"What Next?\", \"Well, That is up to you. You can go check on them if you like.\"));\n\n}", "title": "" }, { "docid": "791279c7a0084df1363e8db9125b04a8", "score": "0.59806013", "text": "public function marchMadnessEmail(){\n\n\t\t$reply_email = '[email protected]';\n\t\t$template_name = 'march_madness_invite_2016';\n\t\t$params = array();\n\t\t\n\t\t$hsc = HighSchoolContact::where('sent', 0)->take(2000)->get();\n\t\t//$hsc = HighSchoolContact::where('email', '[email protected]')->take(1000)->get();\n\n\t\tforeach ($hsc as $key) {\n\n\t\t\t$email_arr = array('email' => $key->email, \n\t\t\t\t\t 'name' => '',\n\t\t\t\t\t 'type' =>'to');\n\t\t\t$key->sent = 1;\n\t\t\t$key->save();\n\n\t\t\t$this->template_name = $template_name;\n\t\t\t$this->sendMandrillEmail($template_name, $email_arr, $params, $reply_email, NULL, NULL);\n\t\t}\n\t}", "title": "" }, { "docid": "f5d035f2a31d00861ee6e0d25281dde7", "score": "0.5980273", "text": "public function sendVerificationEmail($user)\n {\n try {\n if (!empty($user)) {\n $url = $this->getVerificationUrl($user);\n\n $to = $user->email;\n $subject = 'Welcome to TPV360';\n $greeting= 'Hello '.$user->first_name.',';\n\n if ($user->hasAccessLevels('salesagent')) {\n $message = 'You have been added to TPV360 as a '.$user->client->name.' sales agent.<br/>';\n } else if ($user->hasAccessLevels('tpvagent')) {\n $message = 'You have been added to TPV360 as a TPV agent.<br>';\n } else {\n $message = 'You have been added to TPV360.<br>';\n }\n //if Sales agent's email is blank then username would be user id\n $userName = $user->email;\n if(empty($user->email)){\n $userName = $user->userid; \n }\n \n $message .= 'Your username is: '.$userName.'. ';\n if (!$user->hasAccessLevels('salesagent')) {\n $message .= 'Please <a href=\"'.$url .'\">click here</a> to generate your password. ';\n }\n\n if ($user->hasAccessLevels('salesagent')) {\n $message .=\"<br/>Agent Id: \".$user->userid; \n $message .=\"<br/>Client Id: \".$user->client_id; \n }\n \\Mail::send('emails.common', ['greeting' => $greeting, 'msg' => $message], function($mail) use ($to, $subject) {\n $mail->to($to);\n $mail->subject($subject);\n });\n\n Log::info('verification email sent.');\n\n $textEmailStatistics = new TextEmailStatistics();\n $textEmailStatistics->type = 1;\n $textEmailStatistics->save();\n } else {\n Log::error('verification email failed.');\n }\n \n } catch (\\Exception $e) {\n Log::error('Error while send verification email:- '.$e);\n }\n }", "title": "" }, { "docid": "6f0995d377bd904f7125357937d2ae7b", "score": "0.59757334", "text": "public function sendMail();", "title": "" }, { "docid": "47943cec7968730f99adbaeb784d1aef", "score": "0.5975654", "text": "public function sendConfirmationEmail(UserInterface $user);", "title": "" }, { "docid": "a2e34bd5e824ea28f12356eaa2285968", "score": "0.5974085", "text": "public function scheduleEmail() {\n //Mail::to(\"[email protected]\")->queue(new Invitation);\n return [\n \"success\" => true\n ];\n }", "title": "" }, { "docid": "5a81ff8c7cb08f8e6f334bf8a1e4cb95", "score": "0.5972722", "text": "public function send_email(){\n \n // dd($users); exit;\n\n // foreach($users as $user){\n // $user->notify(new CustomEmail()); \n // }\n \n \n }", "title": "" }, { "docid": "a8b777265ff07fd0a59269816f86ff50", "score": "0.59695596", "text": "function student_email_send_to_admin($data) {\r\n $CI = & get_instance();\r\n if(isset($data['teacheremail']))\r\n {\r\n if(isset($data['teacheremail']))\r\n {\r\n\r\n $teach_mail = $data['teacheremail'];\r\n\r\n foreach($teach_mail as $emails)\r\n {\r\n\r\n $prof = $CI->db->get_where(\"professor\",array(\"email\"=>$emails))->result(); \r\n\r\n $teach_email[] = $prof[0]->professor_id;\r\n }\r\n $professor = implode(\",\",$teach_email);\r\n }\r\n }\r\n else{\r\n $professor = '';\r\n }\r\n $student = $CI->db->get_where('student', array(\r\n 'std_id' => $CI->session->userdata('std_id')\r\n ))->row();\r\n foreach ($data['to'] as $row) {\r\n //save data\r\n $CI->db->insert('email', array(\r\n 'email_from' => $student->email,\r\n 'from_name' => $student->name,\r\n 'email_to' => $row,\r\n 'subject' => $data['subject'],\r\n 'cc' => $data['cc'],\r\n 'message' => $data['message'],\r\n 'role_from' => 'student',\r\n 'role_to' => 'admin',\r\n 'is_draft' => 0,\r\n 'file_name' => $data['file_name'],\r\n 'student_to_professor'=>$professor\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "696822644fc38ee2769d4a9d7ec6e5cb", "score": "0.59693956", "text": "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if (!$user) {\n return false;\n }\n \n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n if (!$user->save()) {\n return false;\n }\n }\n\n $notification = $this->getNotification();\n if($notification->isActive()){\n\n return Yii::$app\n ->mail\n ->compose()\n ->setFrom(\\Yii::$app->params['SMTP_from'])\n ->setTo($this->email)\n ->setSubject($notification->name)\n ->setHtmlBody($this->generateLetter($user,$notification))\n ->send();\n }\n\n return false;\n }", "title": "" }, { "docid": "ff9c075c753a0332986b12ec7c87cc8d", "score": "0.5966072", "text": "function sendEmail()\n {\n \n $to = \"[email protected]\";\n \n $cc = \"\";\n \n $count = 0;\n $max=$this->input->get_post(\"count\");\n $schoolId=$this->input->get_post(\"schoolId\");\n \n $usersEmailQ = $this->apimodel->getMail(\"\",2,$schoolId);\n \n foreach ($usersEmailQ->result() as $row)\n {\n $count++;\n if($count>$max){\n \n break;\n \n }\n $email = $row->email;\n \n $subject=$row->subject;\n \n $text=$row->message;\n\n $data = array(\n \"sentId\" => $row->sentId,\n \"sentDate\" => $this->apilib->getCustomDate(\"%Y-%m-%d %H:%i:%s\", now()),\n \"status\" => 1\n );\n \n\n if($this->apilib->sendmail(\"\",\"\",$email,\"\",$subject,$text)){\n \n $this->apimodel->updateSentMail($data);\n\n// echo \"Sent Mail<br>\";\n \n }\n \n \n \n \n }\n \n echo $count;\n }", "title": "" }, { "docid": "ee8483b630e0381707bbd350b7e5418e", "score": "0.59659255", "text": "function inc_admin_attendees_newsletter_send() {\n$out = \"\";\n\nif(!isset($_POST['newsletter_subject']) || $_POST['newsletter_subject'] == \"\") {\nreturn $out . \"<p>No newsletter sent. Please give a subject to the newsletter!</p>\";\n}\n\nif(!isset($_POST['newsletter_text']) || $_POST['newsletter_text'] == \"\") {\nreturn $out . \"<p>No newsletter sent. Please provide some actual content!</p>\";\n}\n\nif(!isset($_POST['newsletter_send']) || $_POST['newsletter_send'] != \"newsletter_send\") {\nreturn $out . \"<p>Something went wrong sending newsletter. No newsletter sent!</p>\";\n}\n\n// all seems good\n$users = inc_attendees();\n$subject = $_POST['newsletter_subject'];\n$body = $_POST['newsletter_text'];\n$errors = 0;\n$sent = 0;\nforeach($users as $user) {\nif(!inc_send_mail($user->email, $subject, $body)) {\n$errors += 1;\n} else {\n$sent += 1;\n}\nsleep(5);\n}\n\nreturn $out . \"<p>Sent $sent emails, $errors errors. Sent following email:</p><br/><pre>From: [email protected]<br/>Subject: $subject<br/>------- Text follows this line ------ <br/>$body</pre>\";\n}", "title": "" }, { "docid": "b3bc8cc866e1fb7d83334a388108547d", "score": "0.59642005", "text": "public function emailNewUser($data, $id)\n {\n $this->load->library('email');\n $fullName = $this->session->firstName . ' ' . $this->session->lastName;\n $resetLink = site_url() . 'user_authentication/resettemppassword/' . $id . '/' . $data['password'];\n\n $emailData = array(\n 'newUser' => $data['first_name'] . ' ' . $data['last_name'],\n 'username' => $data['username'],\n 'password' => $data['password'],\n 'creator' => $fullName,\n 'date' => date('l \\t\\h\\e jS'),\n 'msg' => 'created an account for you on ' . $this->config->item('site_title') . '.',\n 'email' => $this->session->email,\n 'phoneNumber' => $this->session->phone,\n 'department' => $this->department,\n 'id' => $id,\n 'link' => $resetLink,\n );\n\n $body = $this->load->view('emails/new_user_compiled', $emailData, true);\n $subject = 'Your new account has been created for ' . $this->config->item('site_title');\n\n $result = $this->email\n ->from($this->session->email, $fullName)\n ->to($data['email'], $data['first_name'] . ' ' . $data['last_name'])\n ->subject($subject)\n ->message($body)\n ->send();\n\n }", "title": "" }, { "docid": "9e283a7330e1e645b522edf19425259b", "score": "0.59620214", "text": "private function sendApproveNewAccountEmail($user)\n {\n $this->get('fbeen_mailer')\n ->setSubject($this->get('translator')->trans('email.approve_new_account_title', array(), 'fbeen_user'))\n ->setTemplate($this->getParameter('fbeen_user.emails_to_admins.approve_new_account.template'))\n ->setData(array(\n 'user' => $user\n ))\n ->sendMail()\n ; \n }", "title": "" }, { "docid": "0da021509cf75739fa40d9eab8cfbcdf", "score": "0.5960849", "text": "public function emailSender();", "title": "" }, { "docid": "30bd9ff145d55f8c84835b307c804478", "score": "0.59597605", "text": "function sendRegMail($email, $user, $act){\r\n\t$mail = new PHPMailer;\r\n\r\n\t$mail->isSMTP();\r\n\r\n\t$mail->SMTPDebug = SMTP::DEBUG_OFF;\r\n\r\n\t$mail->Host = 'smtp.gmail.com';\r\n\r\n\t$mail->Port = 587;\r\n\r\n\t$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;\r\n\r\n\t$mail->SMTPAuth = true;\r\n\r\n\t$mail->Username = '[email protected]';\r\n\r\n\t$mail->Password = 'fakemailpapi1234';\r\n\r\n\t$mail->setFrom('[email protected]', 'Pokemon Club');\r\n\r\n\t$mail->addReplyTo('[email protected]', 'First Last');\r\n\r\n\t$mail->addAddress($email, $user);\r\n\r\n\t$mail->Subject = 'Activation Code';\r\n\r\n\t$txtHTML='\r\n\t\t<p>\r\n\t \t Hi, <br>Thank you for registering to Pokemon Club. Activation Code: ' . $act . '\r\n\t \t<br> Or you can just click this link: https://apispamuk.000webhostapp.com/IA2/mail_activate.php?user=' . $user .\r\n\t '</p>';\r\n\r\n\t$mail->msgHTML($txtHTML);\r\n\r\n\t$mail->AltBody = 'This is a plain-text message body';\r\n\r\n\tif (!$mail->send()) {\r\n\t echo 'Mailer Error: '. $mail->ErrorInfo;\r\n\t return false;\r\n\t} else {\r\n\t ob_end_clean();\r\n\t header(\"Location: signed_up.php?email=$email&user=$user&act=$act\");\r\n\t return true;\r\n\t}\r\n\t\r\n\tob_end_flush();\r\n}", "title": "" }, { "docid": "ea563c5a73ab433b5609787bfe0ddb8d", "score": "0.595528", "text": "function Trigger_SendEmail(&$tNG) {\n $emailObj = new tNG_Email($tNG);\n $emailObj->setFrom(\"{KT_defaultSender}\");\n $emailObj->setTo(\"{rs_associado.ass_email_empresa}\");\n $emailObj->setCC(\"\");\n $emailObj->setBCC(\"\");\n $emailObj->setSubject(\"Confirmaçao de Cadastro de Associado\");\n //WriteContent method\n $emailObj->setContent(\"Prezado Sr.(a) {rs_associado.ass_nome_admin_empresa},\\n\\nSua solicitaçao de cadastro como associado foi realizada com sucesso. Sua senha provisória para acesso a área restrita é:{ass_senha_acesso}\\n\\nAtenciosamente,\\n\\nSINDIINFO\");\n $emailObj->setEncoding(\"ISO-8859-1\");\n $emailObj->setFormat(\"Text\");\n $emailObj->setImportance(\"Normal\");\n return $emailObj->Execute();\n}", "title": "" }, { "docid": "85fc8f6767a8f63a67b26937ae51e75f", "score": "0.5950653", "text": "function emailing_attendees_admin(){\r\n\t\tglobal $evotx, $eventon;\r\n\r\n\t\t$eid = $_POST['eid'];\r\n\t\t$wcid = $_POST['wcid'];\r\n\t\t$type = $_POST['type'];\r\n\t\t$RI = !empty($_POST['repeat_interval'])? $_POST['repeat_interval']:'all'; // repeat interval\r\n\t\t$EMAILED = $_message_addition = false;\r\n\t\t$emails = array();\r\n\t\t$TA = new EVOTX_Attendees();\r\n\r\n\t\t// email attendees list to someone\r\n\t\tif($type=='someone'){\r\n\r\n\t\t\t// get the emails to send the email to\r\n\t\t\t$emails = explode(',', str_replace(' ', '', htmlspecialchars_decode($_POST['emails'])));\r\n\r\n\t\t\t$TH = $TA->_get_tickets_for_event($eid,'order_status');\r\n\t\t\t\r\n\t\t\tif(is_array($TH) && isset($TH['completed']) && count($TH['completed'])>0){\r\n\t\t\t\tob_start();\r\n\t\t\t\t\r\n\t\t\t\t// get event date time\r\n\t\t\t\t\t$datetime = new evo_datetime();\r\n\t\t\t\t\t$epmv = get_post_custom($eid);\r\n\t\t\t\t\t$eventdate = $datetime->get_correct_formatted_event_repeat_time($epmv, ($RI=='all'?'0':$RI));\r\n\r\n\t\t\t\techo \"<p>Confirmed Guests for \".get_the_title($eid).\" on \".$eventdate['start'].\"</p>\";\r\n\t\t\t\techo \"<table style='padding-top:15px; width:100%;text-align:left'><thead><tr>\r\n\t\t\t\t\t<th>Ticket Holder</th>\r\n\t\t\t\t\t<th>Email Address</th>\r\n\t\t\t\t\t<th>Phone</th>\r\n\t\t\t\t\t<th>Ticket Number</th>\r\n\t\t\t\t</tr></thead>\r\n\t\t\t\t<tbody>\";\r\n\t\t\t\tforeach($TH['completed'] as $tn=>$guest){\r\n\t\t\t\t\techo \"<tr><td>\".$guest['n'] .\"</td><td>\".$guest['e'].\"</td><td>\".$guest['phone']. \"</td>\r\n\t\t\t\t\t<td>\".$tn. \"</td></tr>\";\r\n\t\t\t\t}\r\n\t\t\t\techo \"</tbody></table>\";\r\n\t\t\t\t$_message_addition = ob_get_clean();\r\n\t\t\t}\r\n\r\n\t\t\t//print_r($_message_addition);\r\n\r\n\t\t}elseif($type=='completed'){\r\n\t\t\t$TH = $TA->_get_tickets_for_event($eid,'order_status');\r\n\t\t\tforeach(array('completed') as $order_status){\r\n\t\t\t\tif(is_array($TH) && isset($TH[$order_status]) && count($TH[$order_status])>0){\r\n\t\t\t\t\tforeach($TH[$order_status] as $guest){\r\n\t\t\t\t\t\t$emails[] = $guest['e'];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}elseif($type=='pending'){\r\n\t\t\t$TH = $TA->_get_tickets_for_event($eid,'order_status');\r\n\t\t\tforeach(array('pending','on-hold') as $order_status){\r\n\t\t\t\tif(is_array($TH) && isset($TH[$order_status]) && count($TH[$order_status])>0){\r\n\t\t\t\t\tforeach($TH[$order_status] as $guest){\r\n\t\t\t\t\t\t$emails[] = $guest['e'];\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\t// emaling\r\n\t\tif($emails){\t\r\n\t\t\t$email = new evotx_email();\t\t\t\r\n\t\t\t$messageBODY = \"<div style='padding:15px'>\".\r\n\t\t\t\t(!empty($_POST['message'])? html_entity_decode(stripslashes($_POST['message']) ).'<br/><br/>':'' ).\r\n\t\t\t\t($_message_addition?$_message_addition:'') . \"</div>\";\r\n\t\t\t\t\r\n\t\t\t$messageBODY = $email->get_evo_email_body($messageBODY);\r\n\t\t\t$from_email = $email->get_from_email_address();\r\n\r\n\t\t\t$args = array(\r\n\t\t\t\t'html'=>'yes',\r\n\t\t\t\t'to'=> $emails,\r\n\t\t\t\t'type'=> ($type=='someone'? '':'bcc'),\r\n\t\t\t\t'subject'=>$_POST['subject'],\r\n\t\t\t\t'from'=>$from_email,\r\n\t\t\t\t'from_name'=> $email->get_from_email_name(),\r\n\t\t\t\t'from_email'=> $from_email,\r\n\t\t\t\t'message'=>$messageBODY,\r\n\t\t\t);\r\n\r\n\t\t\t//print_r($args);\r\n\r\n\t\t\t$helper = new evo_helper();\r\n\t\t\t$EMAILED = $helper->send_email($args);\r\n\r\n\t\t}\t\t\t\r\n\r\n\t\t$return_content = array(\r\n\t\t\t'status'=> ($EMAILED?'0':'did not go'),\t'other'=>$args\r\n\t\t);\t\t\r\n\t\techo json_encode($return_content);\t\t\r\n\t\texit;\r\n\t}", "title": "" }, { "docid": "d3fae0612b17ad803edee1a6f0eec28e", "score": "0.5946778", "text": "public function SendEmailToAsker()\n\t{\t\n\t\tif ($this->id && $this->details['answer'] && !(int)$this->details['answersent'])\n\t\t{\t$html_fields = array();\n\t\t\t$plain_fields = array();\n\t\t\t$html_fields['askimam_question'] = nl2br($this->InputSafeString($this->details['asked']));\n\t\t\t$html_fields['askimam_answer'] = nl2br($this->InputSafeString($this->details['answer']));\n\t\t\t$plain_fields['askimam_question'] = stripslashes($this->details['asked']);\n\t\t\t$plain_fields['askimam_answer'] = stripslashes($this->details['answer']);\n\t\t\t\n\t\t\t\n\t\t\t$t = new MailTemplate('askimam_response');\n\t\t\t$mail = new HTMLMail;\n\t\t\t$mail->SetSubject($t->details['subject']);\n\t\t\t$mail->Send($this->details['useremail'], $t->BuildHTMLEmailText($html_fields), $t->BuildHTMLPlainText($plain_fields));\n\t\t\t\n\t\t\t$sql = 'UPDATE asktheimam SET answersent=\"' . $this->datefn->SQLDateTime() . '\" WHERE askid=' . (int)$this->id;\n\t\t\t$this->db->Query($sql);\n\t\t\t$this->Refresh();\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "b6dea57c71d9357216b3de129578bbe0", "score": "0.59420377", "text": "private static function sendActivation($user, $email, $key) {\n $mail = new Mailer($email, ADMIN_EMAIL, 'Action Required to Complete Registration');\n $mail->writeTemplate('activate_user', array('user' => $user, 'key' => $key));\n $mail->send();\n }", "title": "" }, { "docid": "7f25c356c29e0bf3f49a0034794058f0", "score": "0.5940773", "text": "function sendActivationEmail($userId,$email) {\n if ($userId == \"\" || $email == \"\")\n return false;\n \n $activationToken = md5($email.time());\n $activation_link = base_url('user/activate/' . $activationToken);\n $from = \"SHEEP FUND<[email protected]>\";\n $to = $email;\n\n $subject = \"Activate your Sheep Fund account\";\n\n $email_content = \"You have just registered an account on Sheep Fund.<br/><br/>\";\n $email_content .= \"Please click on the following link to activate your account:<br/>\";\n $email_content .= $activation_link;\n \n $data = array(\n 'activationToken' => $activationToken\n );\n $this->updateUserInfo($userId, $data);\n\n $emailData = array(\n 'subject' => $subject,\n 'messageBody' => $email_content,\n 'btnText' => \"Activate Account\",\n 'btnLink' => $activation_link\n );\n \n $this->emailsending->sendemail($from, $to, $subject, $emailData);\n\n return true;\n }", "title": "" }, { "docid": "8c85a36898ef4ed7c0d871430addc3aa", "score": "0.59393394", "text": "function sendEndSurveyEmails($survey_id, $event_id, $participant_id, $record)\r\n{\r\n\tglobal $Proj, $redcap_version, $lang;\r\n\t\r\n\t// Get survey attributes\r\n\t$survey_title = strip_tags($Proj->surveys[$survey_id]['title']);\r\n\t\r\n\t## SEND EMAILS TO SURVEY ADMINS\r\n\t// Check if any emails need to be sent and to whom\r\n\t$sql = \"select distinct(trim(if (a.action_response = 'EMAIL_TERTIARY', u.user_email3, \r\n\t\t\t\tif (a.action_response = 'EMAIL_SECONDARY', u.user_email2, u.user_email)))) \r\n\t\t\tas user_email from redcap_actions a, redcap_user_information u, redcap_user_rights r \r\n\t\t\twhere a.project_id = \" . PROJECT_ID . \" and a.survey_id = $survey_id and a.project_id = r.project_id \r\n\t\t\tand r.username = u.username and a.action_trigger = 'ENDOFSURVEY' \r\n\t\t\tand a.action_response in ('EMAIL_PRIMARY', 'EMAIL_SECONDARY', 'EMAIL_TERTIARY') and u.ui_id = a.recipient_id\";\r\n\t$q = db_query($sql);\r\n\tif (db_num_rows($q) > 0)\r\n\t{\t\r\n\t\t// If this participant has an identifier, display identifier name in email\r\n\t\t$identifier = \"\";\r\n\t\t$sql = \"select participant_identifier from redcap_surveys_participants where participant_identifier is not null \r\n\t\t\t\tand participant_identifier != '' and participant_id = $participant_id limit 1\";\r\n\t\t$q2 = db_query($sql);\r\n\t\tif (db_num_rows($q2) > 0) {\r\n\t\t\t$identifier = \"(\" . db_result($q2, 0) . \") \";\r\n\t\t}\r\n\t\t// Initialize email\r\n\t\t$emailContents = \"\r\n\t\t\t{$lang['survey_15']} {$identifier}{$lang['survey_16']} \\\"<b>$survey_title</b>\\\" {$lang['global_51']} \".date('m/d/Y g:ia').\". \t\r\n\t\t\t{$lang['survey_17']} <a href='\".APP_PATH_WEBROOT_FULL.\"redcap_v{$redcap_version}/DataEntry/index.php?pid=\".PROJECT_ID.\"&page={$_GET['page']}&event_id=$event_id&id=$record'>{$lang['survey_18']}</a>{$lang['period']}<br><br>\t\r\n\t\t\t{$lang['survey_371']} <a href='\".APP_PATH_WEBROOT_FULL.\"redcap_v{$redcap_version}/Design/online_designer.php?pid=\".PROJECT_ID.\"'>{$lang['design_25']}</a> \r\n\t\t\t{$lang['survey_20']}\";\r\n\t\t$email = new Message();\t\r\n\t\t$email->setSubject('[REDCap] '.$lang['survey_21'].' \"'.$survey_title.'\"');\r\n\t\t$email->setBody($emailContents,true);\r\n\t\t// Loop through all applicable admins and send email to each\r\n\t\twhile ($row = db_fetch_assoc($q))\r\n\t\t{\r\n\t\t\t$email->setTo($row['user_email']); \r\n\t\t\t$email->setFrom($row['user_email']); // Have it send it from themself\r\n\t\t\t$email->send();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "b8d6f4bb097813b952a2df9d93e03262", "score": "0.5930687", "text": "function em_new_user_notification() {\n\tglobal $em_temp_user_data;\n\t$user_id = $em_temp_user_data['user_id'];\n\t$plaintext_pass = $em_temp_user_data['user_pass'];\n\n\t//if you want you can disable this email from going out, and will still consider registration as successful.\n\tif( get_option('dbem_email_disable_registration') ){ return true; }\n\n\t//Copied out of /wp-includes/pluggable.php\n\t$user = new WP_User($user_id);\n\n\t$user_login = wp_unslash($user->user_login);\n\t$user_email = wp_unslash($user->user_email);\n\n\t// The blogname option is escaped with esc_html on the way into the database in sanitize_option\n\t// we want to reverse this for the plain text arena of emails.\n\t$blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);\n\n\t$message = sprintf(__('New user registration on your blog %s:', 'events-manager'), $blogname) . \"\\r\\n\\r\\n\";\n\t$message .= sprintf(__('Username: %s', 'events-manager'), $user_login) . \"\\r\\n\\r\\n\";\n\t$message .= sprintf(__('E-mail: %s', 'events-manager'), $user_email) . \"\\r\\n\";\n\t@wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration', 'events-manager'), $blogname), $message);\n\n\tif ( empty($plaintext_pass) )\n\t\treturn;\n\n\t//send email to user\n\t$message = get_option('dbem_bookings_email_registration_body');\n\tif( em_locate_template('emails/new-user.php') ){\n\t\tob_start();\n\t\tem_locate_template('emails/new-user.php', true);\n\t\t$message = ob_get_clean();\n\t}\n\t//for WP 4.4, regenerate password link can be used\n\t$set_password_url = '';\n\tif( function_exists('get_password_reset_key')){\n\t $key = get_password_reset_key( $user );\n\t $set_password_url = network_site_url(\"wp-login.php?action=rp&key=$key&login=\" . rawurlencode($user_login), 'login');\n\t}\n $message = str_replace(array('%password%','%username%','%passwordurl%'), array($plaintext_pass, $user_login, $set_password_url), $message);\n\tglobal $EM_Mailer;\n\treturn $EM_Mailer->send(get_option('dbem_bookings_email_registration_subject'), $message, $user_email);\n}", "title": "" }, { "docid": "745d86a2be4aa76d87f97191a50b6545", "score": "0.59246635", "text": "function ft_send_email_verification($username,$email,$hash){\n\n $to = $email; // email of user\n $subject = 'Matcha | Signup - Verification'; // give the email a subject \n $message = '\n \n Hi \"'.$username.'\",\n\n Your account has been created, you can login with the following username and password after you have activated your account by pressing the url below.\n\n Please click to this link to activate your account:\n https://10.12.100.163/matcha/active_user.php?email='.$email.'&hash='.$hash.'\n \n Thanks for using Matcha!\n '; // message above including the link\n \n $headers = 'From:[email protected]' . \"\\r\\n\"; // set from headers\n mail($to, $subject, $message, $headers); // send email\n}", "title": "" }, { "docid": "47d691e2f644e6ec1987d7f6cb1863f0", "score": "0.59238625", "text": "public function messageStudentEmailAction(){\n $helper = $this->get('wchelper');\n $request = $helper->getRequest();\n // get username from POST request\n $repository = $helper->getUserRepository();\n\n\n $subject=$request->request->get('subject', '');\n $body=$request->request->get('body', '');\n $student = $helper->getAllStudents();\n $tutor = $helper->getAllTutors();\n\n //Emailing students also includes all tutors.\n foreach($student as $temp1){\n $email = $temp1->getEmail();\n $helper->sendMessage($email, $subject, $body);\n }\n foreach($tutor as $temp1){\n $email = $temp1->getEmail();\n $helper->sendMessage($email, $subject, $body);\n }\n return new Response();\n\n }", "title": "" }, { "docid": "7acd82efb41693e14bea48b8cc6f49e9", "score": "0.5915609", "text": "public function sendVerificationEmail()\n {\n LaravelLog::info(sprintf('Sending verification email for %s (%s)', $this->email, $this->type));\n $this->getAwsVerificationServer()->sendVerificationEmail($this->email);\n }", "title": "" }, { "docid": "24746c723668bce1c3ffdfaa14a6bfd7", "score": "0.59151745", "text": "public function signupAcknowledgementhq(){\n try{ \n $result = json_decode($this->request[0],true);\n $registeredEmailId = end($result);\n array_pop($result);\n foreach ($result as $email => $name) {\n Mail::to($email)->send(new SignUpNotificationHQ($registeredEmailId,$name));\n\n }\n } \n catch(\\Exception $e){\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "7a0237097052fdd4b53d1f553f74bbe3", "score": "0.59122914", "text": "function sendEmail($username, $surveyStage, $email){\n\n\t$m = new PHPMailer;\n\n\t$m->isSMTP();\n\t$m->SMTPAuth = true;\n\t$m->IsHTML(true);\n\t//$m->SMTPDebug = 1;\n\n\n\t// this is dummy information for a gmail account used for testing purposes\n\t// the gmail is not owned by us and can be utilised by the clients if they wish\n\t// else they can just change the following details to their respecitve email service\n\t$m->Host = 'smtp.gmail.com';\n\t$m->Username = '[email protected]';\n\t$m->Password = 'poppypassword';\n\n\t// This may need to be removed or modified depending on the clients choice of mail service. \n\t$m->SMPTSecure = 'ssl';\n\t$m->Port = 587;\n\n\t$m->From = '[email protected]';\n\t$m->FromName = 'WSU Poppy';\n\t$m->addReplyTo('[email protected]','Reply address');\n\t$m->addAddress($email, $username);\n\t$url = \"http://localhost:80/login.htm\";\n\t//$m->addCC('[email protected]','WSU Poppy');\n\n\n\n\t// This is the messages that are sent in the email \n\tif ($surveyStage == 'Hospital')\n\t{\n\t\t$m->Subject = 'Hi, ' .$username .'. Its been a while';\n\t\t$m->Body = '<p>Weve noticed that you havent filled the '. $surveyStage . ' form in over 3 days</p><p> Please follow this link to use Poppy: '.$url . '</p>';\n\t\t$m->altBody = 'Weve noticed that you havent filled the '. $surveyStage . ' form in over 3 days. Please follow this link to use Poppy: '.$url;\n\t\t\n\t\tif($m->Send()) {\n\t\techo \"Message sent!\";\n\t\t}\n\n\t}\n\telse if ($surveyStage == 'HomeAndCommunity')\n\t{\n\t\t$m->Subject = 'Hi, ' .$username .'. Its been a while';\n\t\t$m->Body = '<p>Weve noticed that you havent filled the '. $surveyStage . ' form in over a week </p><p> Please follow this link: '.$url . '</p>';\n\t\t$m->altBody = 'Weve noticed that you havent filled the '. $surveyStage . ' form in over a week \\n Please follow this link: '.$url . '';\n\t\t\n\t\tif($m->Send()) {\n\t\techo \"Message sent!\";\n\t\t}\n\t}\n\telse\n\t\treturn;\n\n}", "title": "" }, { "docid": "984588f1497da25da6648297b35e9c3e", "score": "0.5908821", "text": "public function sendActivateMail(){\n $link = crypt($this->getUsername().$this->getEmail(),'iuqfapuiasdjb');\n $empfaenger = $this->getEmail();\n $absendername = \"Baka\";\n $absendermail = \"[email protected]\";\n $betreff = \"Password Activation\";\n $text = \"Here is your Password Activation Link \\n\n Firstname: \".$this->uFirstname.\"\\n\n Lastname: \".$this->uLastname.\"\\n\n Username: \".$this->uUsername.\"\\n\n Email: \".$this->uEmail.\"\\n\n http://\".$_SERVER['HTTP_HOST'].\"/index.php?page=Registration&activate=\".$link;\n mail($empfaenger, $betreff, $text, \"From:\".$absendername.\" <\".$absendermail.\">\".\"Reply-To: \".$absendername.\" <\".$absendermail.\">\");\n }", "title": "" }, { "docid": "5b54b31f37d9f47ed6d208ccc4b3c78a", "score": "0.5908509", "text": "public function sendEmail($is_registered,$their_email,$their_id, $tree_id)\n {\n \n\t $req_email = \"[email protected]\";\n\t \n \t\trequire_once(\"libraries/password_compatibility_library.php\");\n\n\t\t\t\t\n\t\t$to = \"[email protected]\";\t\t\t\t\n\t\t$subject = \"Home of Remembrance Invite\";\t\t\t\t\n\t\t$headers = \"From: \" . strip_tags($req_email) . \"\\r\\n\";\n\t\t$headers .= \"Reply-To: \". strip_tags($req_email) . \"\\r\\n\";\n\t\t//$headers .= \"CC: [email protected]\\r\\n\";\n\t\t$headers .= \"MIME-Version: 1.0\\r\\n\";\n\t\t$headers .= \"Content-Type: text/html; charset=ISO-8859-1\\r\\n\";\n\t\t\n\t\tif ($is_registered == \"true\")\n\t\t{\n\t\t\t$message = '<html><body>';\n\t\t\t$message .= '<h1>Hello, World!</h1>';\n\t\t\t$message .= \"<p>You're invited to a family tree</p>\";\n\t\t\t$message .= \"<p>Click on the following link to join the family tree</p>\";\n\t\t\t$message .= \"<a href='http://homeofremembrance.com/tree.php?join=$tree_id&person=$their_id'>Link</a>\";\n\t\t\t$message .= '</body></html>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//next job to send the invite link\n\t\t\t// create key to register with\n\t\t\t// key to have hash of user_id, tree_id\n\t\t\t$key = password_hash($their_email, PASSWORD_DEFAULT);\n\t\t\t\n\t\t\t\n\t\t\t$message = '<html><body>';\n\t\t\t$message .= '<h1>Hello, World!</h1>';\n\t\t\t$message .= \"<p>You're invited to a Home of Remembrance</p>\";\n\t\t\t$message .= \"<a href='http://homeofremembrance.com/frontdoor.php?key=$key&p=$their_id'>Link</a>\";\n\t\t\t//$message .= \"<p>The password is <b>generic</b></p>\";\n\t\t\t$message .= '</body></html>';\n\t\t}\n\t\t\n\t\t\n\t\t//mail($to, $subject, $message, $headers);\n\t\t\n\t\t$this->messages[] = $message;\n }", "title": "" }, { "docid": "cdab94f4d637a2faedd543f3d6f430ef", "score": "0.5900462", "text": "protected function new_user_email($args)\n {\n if ($this->api)\n return;\n\n $site = get_bloginfo('name');\n $url = get_bloginfo('url');\n\n $login_info = \"Your username and password are...<br><br>\n Username: <b>\" . $args['user_login'] . \"</b><br>\n Password: <b>\" . $args['user_pass'] . \"</b><br><br>\n To start your training just click the link below<br>\n $url/login/<br><br>\n To change your password:<br>\n 1) login using the new password provided above<br>\n 2) then go to About Me -> Change Password')\";\n\n $email_template_id = teamos_company_get_meta('new_user_email');\n\n if (empty($email_template_id)) {\n\n $subject = 'Your username and password for ' . $site;\n\n $message = \"Welcome to the $site<br><br>\n $login_info<br><br>\n <img width='220' border='0' style='display:block' src='\" . teamos_company_email_footer_image_url() . \"'>\";\n\n $email = new Email();\n $email->send(\n array(\n 'to' => $args['user_email'],\n 'subject' => $subject,\n 'message' => $message\n )\n\n );\n\n } else {\n $email = new Email($email_template_id);\n $email->send(\n array(\n 'to' => $args['user_email'],\n ),\n array(\n '{LOGIN_INFO}' => \"<br>$login_info<br><br>\"\n )\n );\n\n }\n }", "title": "" }, { "docid": "8b1eb77d10a3c43c18aae508a06cf396", "score": "0.5897031", "text": "function sendVerifyMail($id, $name, $randCode){\r\n\t$title = '[OLLIVANDERS] Activate your account!';\r\n\t$verifyEmailContent = \"\r\n\t<p>Click this link to activate your account<br>\r\n\t<label>Code: </label>\r\n <a href='https://apiwandshop.000webhostapp.com/API-IA2/user/activateAccount.php?email=$id&code=$randCode'>randCode</a></p>\";\r\n\tsendEmail($id, $name, $title, $verifyEmailContent);\r\n}", "title": "" }, { "docid": "5ad93ceba7a306eb1dad2d1cfbf69e8f", "score": "0.58949023", "text": "public function sendForgotEmail()\n {\n // set the confirmation values\n $this->confirm_type = Proxima_Model_Members::CONFIRM_TYPE_RESET;\n $this->confirm_hash = $this->getRandomConfirmHash();\n $this->save();\n \n // build email text\n $text = $this->interpolate($this->_config['email_forgot_body']);\n \n // build email message\n $mail = Solar::factory('Solar_Mail_Message');\n $mail->setFrom($this->_config['email_forgot_from'])\n ->addTo($this->email)\n ->setSubject($this->_config['email_forgot_subj'])\n ->setText($text);\n \n // send it!\n $mail->send();\n }", "title": "" } ]
7d6049f5b80ed37c27b7637c860793ae
/Funcion usada para traer el porcentaje de calificacion por cada competencia
[ { "docid": "d47da3670fddc3faf054cbb20bbec28b", "score": "0.0", "text": "function GetPorcentajeCalificadoPorCompetencia($detalle,$competencia){\n try{\n\n include(\"../conexion/mysql.php\");\n\n $consulta=\"CALL SP_PorcentajeCalificadoPorCompetencia('$detalle','$competencia')\";\n\n $resultado= mysqli_query($link ,$consulta);\n\n $valor=0;\n\n while ($valores = mysqli_fetch_array($resultado)) {\n\n $valor=$valores[\"porcentajeEvaluado\"];\n \n\n }\n\n return $valor;\n\n }catch(Exception $e){\n echo \"Error \" . $e->getMessage();\n return false;\n }\n }", "title": "" } ]
[ { "docid": "004682a62dbb3f2cbad130d680512c74", "score": "0.7233227", "text": "function calMargenFic(){\n\t\t// Calculo\n\t\t$Anchos = ($this->AnchoPag-($this->AnchoLabel+$this->AnchoValor))/2;\n\t\tif ($Anchos < 0) $Anchos = 0;\n\t\treturn($Anchos);\n\t}", "title": "" }, { "docid": "80c8ca861efd9bdedd75e481b4243499", "score": "0.6873716", "text": "function calcularNotas($registroNota) {\r\n $acumulado=0;\r\n $acumuladoNota1=$acumuladoNota2=0;\r\n $acumuladoNota3=$acumuladoNota4=0;\r\n $acumuladoNota5=$acumuladoNota6=0;\r\n $acumuladoLab=$acumuladoEx=0;\r\n \r\n if(isset($registroNota['PARCIAL1']) && isset($registroNota['PORCENTAJE1'])){\r\n $acumuladoNota1=$registroNota['PARCIAL1']*$registroNota['PORCENTAJE1']/100; \r\n }\r\n if(isset($registroNota['PARCIAL2']) && isset($registroNota['PORCENTAJE2'])){\r\n $acumuladoNota2=$registroNota['PARCIAL2']*$registroNota['PORCENTAJE2']/100;\r\n }\r\n if(isset($registroNota['PARCIAL3']) && isset($registroNota['PORCENTAJE3'])){\r\n $acumuladoNota3=$registroNota['PARCIAL3']*$registroNota['PORCENTAJE3']/100;\r\n }\r\n if(isset($registroNota['PARCIAL4']) && isset($registroNota['PORCENTAJE4'])){\r\n $acumuladoNota4=$registroNota['PARCIAL4']*$registroNota['PORCENTAJE4']/100;\r\n }\r\n if(isset($registroNota['PARCIAL5']) && isset($registroNota['PORCENTAJE5'])){\r\n $acumuladoNota5=$registroNota['PARCIAL5']*$registroNota['PORCENTAJE5']/100;\r\n }\r\n if(isset($registroNota['PARCIAL6']) && isset($registroNota['PORCENTAJE6'])){\r\n $acumuladoNota6=$registroNota['PARCIAL6']*$registroNota['PORCENTAJE6']/100;\r\n }\r\n if(isset($registroNota['PARCIAL_LAB']) && isset($registroNota['PORCENTAJE_LAB'])){\r\n $acumuladoLab=$registroNota['PARCIAL_LAB']*$registroNota['PORCENTAJE_LAB']/100;\r\n }\r\n //Hasta aqui el setenta por ciento\r\n //adiciona notas de examen\r\n if(isset($registroNota['PARCIAL_EX']) && isset($registroNota['PORCENTAJE_EX'])){\r\n $acumuladoEx=$registroNota['PARCIAL_EX']*$registroNota['PORCENTAJE_EX']/100;\r\n }\r\n \r\n $acumulado= ($acumuladoNota1+$acumuladoNota2+\r\n $acumuladoNota3+$acumuladoNota4+\r\n $acumuladoNota5+$acumuladoNota6+\r\n $acumuladoLab+$acumuladoEx);\r\n\r\n //Adiciona habilitacion si hay valores registrados\r\n if(isset($registroNota['PARCIAL_HAB']) && isset($registroNota['PORCENTAJE_HAB'])){\r\n \r\n $acumuladoHab=$registroNota['PARCIAL_HAB']*$registroNota['PORCENTAJE_HAB']/100;\r\n //En caso de que el estudainte halilite, la habilitacion se toma como el 70% y lo obtenido anteriormente como el 30%\r\n $acumulado=$acumuladoHab+$acumulado*.3;\r\n } \r\n return $acumulado;\r\n }", "title": "" }, { "docid": "e04218df7dd7eccd1ee6a5ce368d9f25", "score": "0.68276554", "text": "function calculo_valor_final($hoja,$totalValorUnitario,$margen){\n //if ($hoja->margen!=\"\") {\n //$valorFinal=($totalValorUnitario/((100-$hoja->margen)/100));\n //}else{ \n //if($datos->margen_migrado!=0 || $datos->margen_migrado!=null){\n //$valorFinal=($totalValorUnitario/((100-$datos->margen_migrado)/100)); \n $valorFinal=($totalValorUnitario/((100-$margen)/100)); \n //}else{\n // $valorFinal=($totalValorUnitario/((100-15)/100));\n //}\n //}\n\n return array('valor_final'=>$valorFinal);\n}", "title": "" }, { "docid": "06b4c0af30719fbcfc51009da973fd0c", "score": "0.677583", "text": "protected function CalcularDatos() {\n\t\t$this->_perimetro = $this->_base + $this->_altura*2;\n $this->_superficie = $this->_base * $this->_altura/2;\n\t}", "title": "" }, { "docid": "eb3bee43e029b14f07d8164703acc6a2", "score": "0.67603326", "text": "protected function CalcularDatos() {\n\t\t$this->_perimetro = $this->_ladoUno*2 + $this->_ladoDos*2;\n $this->_superficie = $this->_ladoUno*$this->_ladoDos;\n\t}", "title": "" }, { "docid": "f72be820cb3732dd054b2378f82bb71a", "score": "0.6642011", "text": "public function valor_por_porcentaje_monto($porcentaje,$monto_bruto)\n{$monto=($monto_bruto*$porcentaje)/100;\nreturn $monto;\n}", "title": "" }, { "docid": "56cb2f3b28df08b7ae279bdd325ed92c", "score": "0.6616854", "text": "function calcularPrecioTotal($productosComprados, $productos){\r\n $precioTotal = 0;\r\n //Recorremos el array de productos comprados\r\n foreach ($productosComprados as $idproducto){\r\n //Hacemos que dentro de la variable preciototal se añada el precio del producto con el id que hemos cogido\r\n $precioTotal += $productos[$idproducto]['precio'];\r\n }\r\n //Devolvemos el precioTotal\r\n return $precioTotal;\r\n}", "title": "" }, { "docid": "5c4b7d5946828ee0c6bb2a9ea8f5407c", "score": "0.6616013", "text": "public function get_promanuncios($Anuncios){\r\n\r\n\t$promo_empresas \t= 0;\r\n\t$promo_part \t\t= 0;\r\n\t$nopromo_empresas \t= 0;\r\n\t$nopromo_part \t\t= 0;\r\n\t//porcentajes\r\n\t$precent_empresas \t= 0;\r\n\t$precent_part \t\t= 0;\r\n\t$percent_total\t\t= 0;\r\n\r\n\t//sacando anuncios y contando segun corresponde\r\n\t$cols = array('id','ussr','anuncio_promocionado');\r\n\t$anus = $Anuncios->get('anuncios',NULL,$cols);\r\n\tforeach ($anus as $key => $value) {\r\n\t\tif(in_array($value['ussr'], $this->u_empresas)){\r\n\t\t\tif($value['anuncio_promocionado'] == '1'){\t$promo_empresas++;\r\n\t\t\t}else{\t\t\t\t\t\t\t\t\t\t$nopromo_empresas++;}\r\n\t\t}else if(in_array($value['ussr'], $this->u_part)){\r\n\t\t\tif($value['anuncio_promocionado'] == '1'){\t$promo_part++;\r\n\t\t\t}else{\t\t\t\t\t\t\t\t\t\t$nopromo_part++;\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t$promo_total \t\t= $promo_part + $promo_empresas;\r\n\t$nopromo_total \t\t= $nopromo_part + $nopromo_empresas;\r\n\t$total_empresas \t= $promo_empresas + $nopromo_empresas;\r\n\t$total_part \t\t= $promo_part + $nopromo_part;\r\n\t$total_anuncios\t\t= $total_part + $total_empresas;\r\n\r\n\tif($total_empresas != 0){$precent_empresas \t= ($promo_empresas / $total_empresas) * 100;}\r\n\tif($total_part != 0){\t $precent_part \t\t= ($promo_part / $total_part) * 100;\t\t}\r\n\tif($total_anuncios != 0){$percent_total\t\t= ($promo_total / $total_anuncios) * 100;\t}\r\n\r\n\t//salida de la funcion \r\n\t$salida ='<table class=\"table\">';\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<th></th><th>Promocionados</th><th>No promocionados</th>';\r\n\t$salida .='<th>Total</th><th>Porcentaje</th></tr>';\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<td>Empresas</td><td>'.$promo_empresas.'</td><td>'.$nopromo_empresas.'</td>';\r\n\t$salida .='<td>'.$total_empresas.'</td><td>'.$precent_empresas.'</td></tr>';\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<td>Particulares</td><td>'.$promo_part.'</td><td>'.$nopromo_part.'</td>';\r\n\t$salida .='<td>'.$total_part.'</td><td>'.$precent_part.'</td></tr>';\t\t\r\n\r\n\t$salida .='<tr>';\r\n\t$salida .='<td>Total</td><td>'.$promo_total.'</td><td>'.$nopromo_total.'</td>';\r\n\t$salida .='<td>'.$total_anuncios.'</td><td>'.$percent_total.'</td></tr>';\r\n\r\n\t$salida .='</table>';\r\n\r\n\t//return\r\n\treturn $salida;\r\n}", "title": "" }, { "docid": "a49df2f01947e7255d147e1486dfe6e3", "score": "0.6615652", "text": "function CalcularPerdidas(&$ejercito)\r\n{\r\n\t$ejercito->Perdidas=array();\r\n\tforeach ($ejercito->Flotas as $flota)\r\n\t{\r\n\t\t$flota->Perdidas=array();\r\n\t\tif(!empty($flota->Unidades))\r\n\t\t{\r\n\t\t\tforeach ($flota->Unidades as $tipoUnidad)\r\n\t\t\t{\r\n\t\t\t\t$coste=CosteInicialTecnologia($tipoUnidad->ID);\r\n\t\t\t\t$contador=0;\r\n\t\t\t\tforeach($coste as $precio)\r\n\t\t\t\t{\r\n\t\t\t\t\t$flota->Perdidas[$contador]+=$precio*$tipoUnidad->Destruidas;\r\n\t\t\t\t\tif($tipoUnidad->ID>=250 && $tipoUnidad->ID<400)//Nave\r\n\t\t\t\t\t$flota->PerdidasNaves[$contador]+=$precio*$tipoUnidad->Destruidas;\r\n\r\n\t\t\t\t\t$contador++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tfor($contador=0;$contador<count($flota->Perdidas);$contador++)\r\n\t\t\t{\r\n\t\t\t\t$ejercito->Perdidas[$contador]+=$flota->Perdidas[$contador];\r\n\t\t\t\t$ejercito->PerdidasNaves[$contador]+=$flota->PerdidasNaves[$contador];\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "e44acec8c33392713ace8fae8ef77f9a", "score": "0.6612764", "text": "function calculo_pegado($datos,$presupuesto,$cantidad,$variablePegado,$hoja){\n if(sizeof($hoja)==0) { \n if ($datos->pegado_migrado == null || $datos->pegado_migrado == '' || $datos->pegado_migrado == 0) {\n $pegado_migrado = 8;\n } else {\n $pegado_migrado = $datos->pegado_migrado;\n }\n } else {\n if($hoja->pegado==\"\" || $hoja->pegado==\"0\" || $hoja->pegado==null ){ \n $pegado_migrado = 8;\n }else{ \n $pegado_migrado = $hoja->pegado;\n }\n }\n $totalPegado = $cantidad * $pegado_migrado * $variablePegado->precio;\n \n if($totalPegado>150000 && $totalPegado<=235000){\n $totalPegado = 150000; \n }else{\n if($totalPegado<150000){\n $totalPegado = $totalPegado; \n }else{\n if($totalPegado >235000){\n $totalPegado=$cantidad*$pegado_migrado*1.45;\n }\n }\n }\n \n \n return array('pegado_migrado'=>$pegado_migrado,'totalPegado'=>$totalPegado);\n}", "title": "" }, { "docid": "0c90b539f020497bda3208961436d1d8", "score": "0.6594577", "text": "public function calcularValor($permanencia)\n {\n $valor_primeira_hora = 10;\n $valor_demais_horas = 5;\n\n //separar a quantidade de horas dos minutos\n $tempo = explode(':',$permanencia);\n $horas = (int)$tempo[0];\n $minutos =(int)$tempo[1];\n\n // print_r($tempo);\n //verificar se minutos é diferente de zero, para cobrar a hora adicional\n // se o veiculo ficar exatamente X horas e Zero minutos, será cobrada a \n // primeira hora mais cara e as demais horas no valor da hora.\n // Ex.: 03:00 - três horas\n // cobrar R$ 10,00 da primeira hora e as outras 2 horas R$ 5.00\n //\n // Ex2.: 03:10 - Três horas e 10 minutos, serão cobradas 4 horas\n // cobrar R$ 10,00 da primeira hora e as outras 3 horas R$ 5.00\n if($minutos == 0 && $horas != 0){\n $horas = $horas - 1;\n }\n\n // echo 'horas: '.$horas.' - minutos: '. $minutos.'<br>';\n //calcular o valor\n $valor = $valor_primeira_hora + ($horas * $valor_demais_horas);\n // echo 'valor primeira hora'.$valor_primeira_hora.'+ (horas)'.$horas.'*'.$valor_demais_horas.'<br/>';\n\n\n //Retorna o valor\n return $valor;\n }", "title": "" }, { "docid": "3da2fa80f66b697e5b6cbb2aaae79fe2", "score": "0.6571133", "text": "private function update_precio_cantidad() {\n\n $precio = 0;\n $articulos = 0;\n\n foreach ($this->carrito as $row) { //POR CADA ELEMENTO DEL CARRITO\n $precio += ($row['precio'] * $row['unidades']); //GUARDA EL PRECIO\n $articulos += $row['unidades']; //GUARDA LOS ARTÍCULOS\n }\n\n $_SESSION[carrito::CARRITO_ID][\"articulos_total\"] = $articulos;\n $_SESSION[carrito::CARRITO_ID][\"precio_total\"] = $precio;\n\n $this->update_carrito(); //ACTUALIZA EL CARRITO\n }", "title": "" }, { "docid": "8138c7415fbe0c30a24d0a78641511f1", "score": "0.65389013", "text": "public function costodominicalhora() { //\n //verifica si el regimen trabaja sabados \n if($this->regimen->dias > 5.5 ) //si se trabaja sabados\n {\n $diassemana=6; //Lunes, martes...sabado\n }else{\n $diassemana=5; //Lunes , martes,...viernes \n }\n if(date('w',strtotime($this->libroobra->fecha))=='7'){//si esdomeingo \n return 0; \n }else{\n return round($this->libroobra->detot->regimen->horasdia/$diassemana,2);\n }\n }", "title": "" }, { "docid": "94c52758f2eb5ed2586c295c2bc274ee", "score": "0.65147525", "text": "function primeraMateriaomedioDelSalon($v){\n\t\t$resultadoGeneral=0;\n\t\t $contadorGeneral=0;\n\t\tforeach ($v as $calificaciones ) {\n\t\tfor ($i=0; $i < sizeof($calificaciones); $i++) { \n\t\t\t$contadorGeneral++;\n\t\t\t$resultadoGeneral+=$calificaciones[$i];\n\t}\n\t}\n\t $primeraMateriaomedio=$resultadoGeneral/$contadorGeneral;\n\techo \"<br> EL PROMEDIO GENERAL DEL GRUPO ES: \".$primeraMateriaomedio;\n\techo \"<hr />\";\n\t}", "title": "" }, { "docid": "9d3612949b3b2f2cb938b3b6161d9c9c", "score": "0.6506748", "text": "private function montantRestant($idc){\n $res = $this->pdo->prepare(\"select id from order_vente where verif = 0 and idc = ?\");\n $res->execute(array($idc));\n $r = $res->fetchAll(PDO::FETCH_ASSOC);\n $arr = array();\n $i=0;\n foreach($r as $row){\n $arr[$i] = $row['id'];\n $i++;\n }\n\n //calculer la somme des montant payee pour les ordre vente non payee\n $sommePayee = 0;\n foreach($arr as $idov){\n $res = $this->pdo->prepare(\"select sum(montantpayee) from facilite where idov = ? \");\n $res->execute(array($idov));\n $sommePayee = $sommePayee + floatval($res->fetchAll(PDO::FETCH_ASSOC)[\"0\"][\"sum(montantpayee)\"]);\n }\n\n\n $res = $this->pdo->prepare(\"select sum(prixTotale) from order_vente where verif = 0 and idc = ?\");\n $res->execute(array($idc));\n $prixTotale = floatval($res->fetchAll(PDO::FETCH_ASSOC)[\"0\"][\"sum(prixTotale)\"]);\n return $prixTotale - $sommePayee;\n}", "title": "" }, { "docid": "2c5eb759cba5f02cff9fb350f5d3a818", "score": "0.6424269", "text": "public function jornaldiario(){\n \n //la tarifa hora\n $tarifahora=$this->getTarifa();\n \n \n //costo dominical\n $this->montodominical=$this->costodominicalhora()*$tarifahora;\n \n ///Si hubo alguna gratificacion de horas para esta persona en este dia\n $gratificacion=is_null($this->bonificacion)?0:$this->bonificacion;\n \n //horas trabajadas normales\n $this->montodiario=($this->horasnormales()+$gratificacion)*$tarifahora;\n \n ///horas extras\n $this->montoextras=$this->horasextras()*$tarifahora;\n return 1;\n \n }", "title": "" }, { "docid": "281e76c7b9a9a696f68dc2b6485f2e9c", "score": "0.6395648", "text": "public function testCalcularComision()\n\t{\n\t\t$empE = $this->crearE_Eventual($this->nombre,$this->apellido,$this->DNI,$this->salario,$this->ventas);\n\t\t$com = (1500 / count($this->ventas)) * 0.05;\n\t\t$this->assertEquals($com, $empE -> calcularComision());\n\t}", "title": "" }, { "docid": "bd2bfac8b7063de61e34d7c492087c82", "score": "0.6388036", "text": "private function getReal()\n {\n $meses = array(\n \"ene\" => 0, \"feb\" => 0, \"mar\" => 0, \"abr\" => 0, \"may\" => 0, \"jun\" => 0,\n \"jul\" => 0, \"ago\" => 0, \"sep\" => 0, \"oct\" => 0, \"nov\" => 0, \"dic\" => 0, \"total\" => 0\n );\n $contador = 0;\n if ($this->getPlan()) {\n if ($this->getPlan()->getReal()) {\n foreach ($this->getPlan()->getReal() as $r) {\n switch ($r->getMes()) {\n case \"1\":\n $meses[\"ene\"] = $r->getValor();\n $contador++;\n break;\n case \"2\":\n $meses[\"feb\"] = $r->getValor();\n $contador++;\n break;\n case \"3\":\n $meses[\"mar\"] = $r->getValor();\n $contador++;\n break;\n case \"4\":\n $meses[\"abr\"] = $r->getValor();\n $contador++;\n break;\n case \"5\":\n $meses[\"may\"] = $r->getValor();\n $contador++;\n break;\n case \"6\":\n $meses[\"jun\"] = $r->getValor();\n $contador++;\n break;\n case \"7\":\n $meses[\"jul\"] = $r->getValor();\n $contador++;\n break;\n case \"8\":\n $meses[\"ago\"] = $r->getValor();\n $contador++;\n break;\n case \"9\":\n $meses[\"sep\"] = $r->getValor();\n $contador++;\n break;\n case \"10\":\n $meses[\"oct\"] = $r->getValor();\n $contador++;\n break;\n case \"11\":\n $meses[\"nov\"] = $r->getValor();\n $contador++;\n break;\n case \"12\":\n $meses[\"dic\"] = $r->getValor();\n $contador++;\n break;\n }\n $meses[\"total\"] += $r->getValor();\n }\n }\n }\n $meses[\"total\"] = ($contador > 0) ? $meses[\"total\"] / $contador : 0;\n return $meses;\n }", "title": "" }, { "docid": "6ebabc5b53764ea62c045741f42d8976", "score": "0.63842803", "text": "function calcularInteresMensual() {\n //F = P(1 + i)^n\n try { \n $fin = date(\"Y-m-d H:i:s\"); //fecha actual\n $fechaI = new DateTime($fecha_inicio);\n $fechaF = new DateTime($fin);\n $intervalo = $fechaI->diff($fechaF);\n $intervalMeses=$intervalo->format(\"%m\");\n $intervalAnios=$intervalo->format(\"%y\")*12;\n //echo \"hay una diferencia de \".($intervalMeses+$intervalAnios).\" meses\";\n $n=$intervalMeses+$intervalAnios;\n $F = $monto(1 + $tasa_interes)^$n;\n $interes = $F - $monto; \n throw new ErrorPrestamo();\n } catch (ErrorPrestamo $e) {\n echo $e->nuevo($titulo, $ubicacion, $mensaje);\n }\n }", "title": "" }, { "docid": "2af24aafb85825958bc90b6755a60fdf", "score": "0.6374799", "text": "public function prom(){\r\n if($this->c1<=60||$this->c2<=60||$this->c3<=60){\r\n $this->total=60;\r\n }\r\n else{\r\n $this->total=($this->c1+$this->c2+$this->c3)/3;\r\n }\r\n }", "title": "" }, { "docid": "24c0695d1b5766efdbd3ea04b54de2a5", "score": "0.6352567", "text": "function lacado($fotomecanica,$cantidad,$unidades){\n if($fotomecanica->fot_lleva_barniz=='Laca UV'){\n $costosporlacado=(35000+(52*($cantidad/$unidades)));\n }else{\n $costosporlacado=0;\n }\n return $costosporlacado;\n }", "title": "" }, { "docid": "ae63604cf54c3700a73482a23bd15f8c", "score": "0.6336727", "text": "function calMargenLis(){\n\t\t// Calculo Margen\n\t\t$Anchos = 0;\n\t\treset($this->Columna);\n\t\twhile (list($Indice,$Columna) = each($this->Columna))\n\t\t\t$Anchos = $Anchos+$Columna['ancho'];\n\t\t$Anchos = ($this->AnchoPag-$Anchos)/2;\n\t\tif ($Anchos < 0) $Anchos = 0;\n\t\treturn($Anchos);\n\t}", "title": "" }, { "docid": "bf573084128864e173b0af01915dd31d", "score": "0.6319096", "text": "function listaCargosCalendario($cobrar_pagar,$moneda,$fecha,$fechafin){//$cobrar_pagar=1 CXP / $cobrar_pagar=0 CXC\n $myQuery = \"SELECT p.id, p.tipo_cambio,p.origen, (SELECT codigo FROM cont_coin WHERE coin_id = p.id_moneda) AS moneda, p.tipo_cambio, p.fecha_pago, @c := p.cargo*p.tipo_cambio, p.cargo, p.concepto, @p := IFNULL((SELECT SUM(pr.abono) FROM app_pagos_relacion pr WHERE pr.id_tipo = 0 AND pr.id_documento = p.id AND (SELECT id_moneda FROM app_pagos WHERE id = pr.id_pago) = 1),0) AS pagos,\n\t\t\t\t\t@p2 := IFNULL((SELECT SUM(pr.abono*(SELECT tipo_cambio FROM app_pagos WHERE id = pr.id_pago)) FROM app_pagos_relacion pr WHERE pr.id_tipo = 0 AND pr.id_documento = p.id AND (SELECT id_moneda FROM app_pagos WHERE id = pr.id_pago) != 1),0) AS pagos2,\n (@c-(@p+@p2)) AS saldo\n FROM app_pagos p\n WHERE p.cobrar_pagar = $cobrar_pagar\n AND p.id_moneda= $moneda\n \tand p.fecha_pago between '$fecha' and '$fechafin'\n AND p.cargo > 0 \";\n \n return $this->query($myQuery);\n}", "title": "" }, { "docid": "bd3e75fc59c3fae1b56c0f90a103e033", "score": "0.6312308", "text": "public function calcular_horas_jornadas($id_membresia){\n \n $fecha = new MongoDB\\BSON\\UTCDateTime();\n \n $res_jornadas = $this->mongo_db->order_by(array('_id' => 'ASC'))->where(array('eliminado'=>false,'status'=>true,'id_membresia'=>$id_membresia))->get(\"jornadas\");\n $cont = 0;\n $e = new DateTime('00:00');\n $f = clone $e;\n foreach ($res_jornadas as $clave_jornada => $valor_jornada) {\n //$fecha_inicio = $valor_jornada[\"fecha_hora_inicio\"]->toDateTime();\n //$fecha_hora_ini = $fecha_inicio->format('Y-m-d H:i:s');\n $fecha_hora_ini = new DateTime(date(\"Y-m-d H:i:s\",$valor_jornada[\"fecha_hora_inicio\"]));\n if((isset($valor_jornada[\"fecha_hora_fin\"]))&&($valor_jornada[\"fecha_hora_fin\"]!=\"Sin salir\")){\n //$fecha_fin = $valor_jornada[\"fecha_hora_fin\"]->toDateTime();\n //$fecha_hora_fini = $fecha_fin->format('Y-m-d H:i:s');\n $fecha_hora_fini = new DateTime(date(\"Y-m-d H:i:s\",$valor_jornada[\"fecha_hora_fin\"]));\n }else{\n $fecha_fin = \"\";\n $fecha_hora_fini = new DateTime(\"\");\n\n }\n \n /*$fecha1 = new DateTime($fecha_hora_ini);//fecha inicial\n $fecha2 = new DateTime($fecha_hora_fini);//fecha de cierre*/\n $fecha1 = $fecha_hora_ini;//fecha inicial\n $fecha2 = $fecha_hora_fini;//fecha de cierre\n \n //if(($fecha1!=\"\")&&($fecha2!=\"\")){\n\n $intervalo_siguiente=$fecha1->diff($fecha2);\n $e->add($intervalo_siguiente);\n $intervalo = $f->diff($e);\n //}\n \n //$intervalo=$fecha1->diff($fecha2);\n /*var_dump($fecha1);\n echo \"</br>\";\n var_dump($fecha2);\n echo \"</br>\";\n var_dump($intervalo_siguiente->format('%H:%i:%s'));\n echo \"</br>\";\n var_dump($intervalo->format('%H:%i:%s'));\n echo \"</br></br>\";*/\n $cont++;\n\n }\n if(isset($intervalo)){\n $horas_transcurridas = $intervalo->format('%H:%i:%s');\n }else{\n $horas_transcurridas = \"00:00:00\";\n }\n //--\n //var_dump($res_jornadas);die('');\n //--\n \n //var_dump($horas_transcurridas);\n return $horas_transcurridas; \n }", "title": "" }, { "docid": "ec8b8b97fa4826d76f2c49244d7a99d7", "score": "0.6312033", "text": "public function calcular_costo_total(){\n\t\t/*variable: array $coleccion, int $costo_total, int $costo*/\n\t\t//la coleccion tiene instancias de obra, musical y pelicula\n\t\t$coleccion = $this->get_col_funciones();\n\t\t$costo_total = 0;\n\t\tforeach ($coleccion as $actividad) {\n\t\t\t$costo = $actividad->dar_costos();\n\t\t\t$costo_total += $costo;\n\t\t}\n\t\treturn $costo_total;\n\t}", "title": "" }, { "docid": "3f80977e7fac1cd36fa2cee0c3266f86", "score": "0.6301158", "text": "function costo_placa_kilo($cantidad,$unidades,$sum){\n if (($cantidad > 0) && ( $unidades > 0)){\n $costoPlacaKilo = ($cantidad / $unidades) + $sum;\n }else{\n $costoPlacaKilo = 0;\n }\n return $costoPlacaKilo;\n}", "title": "" }, { "docid": "64d892ee0266ecf6cf07dc2817ba123c", "score": "0.6300608", "text": "public function darCosto(){\n $precio = parent::darCosto();\n $precioCine = $precio * 1.65;\n return $precioCine;\n }", "title": "" }, { "docid": "a8c75ebcc4a25a69134d31730a754044", "score": "0.6295833", "text": "function cuentaTotal($formato = '%01.2f'){ \n\t if (empty($this->fin) )$this->terminar(); \n\t return sprintf($formato, ($this->fin - $this->inicio)); \n\t}", "title": "" }, { "docid": "bc1a56bdd545b14b0cecd013c08f9e22", "score": "0.6272877", "text": "function montant_panier() \n{ \n /* On initialise le montant */ \n $montant = 0; \n /* Comptage des articles du panier */ \n $nb_articles = count($_SESSION['panier']['id_article']); \n /* On va calculer le total par article */ \n for($i = 0; $i < $nb_articles; $i++) \n { \n $montant += /*$_SESSION['panier']['qte'][$i] * */$_SESSION['panier']['prix'][$i]; \n } \n /* On retourne le résultat */ \n return $montant; \n}", "title": "" }, { "docid": "00f55fdb671d81f74cd9d0d93c71396f", "score": "0.6261015", "text": "function tiempofechas($fechaInicio,$fechaFin)\n{\n\t$array_fi = explode ( \"-\", $fechaInicio ); \n\t$array_ff = explode ( \"-\", $fechaFin ); \n\n\t$anos = $array_ff[0] - $array_fi[0]; // calculamos años \n\t$meses = $array_ff[1] - $array_fi[1]; // calculamos meses \n\t$dias = $array_ff[2] - $array_fi[2]; // calculamos días \n\n\t//ajuste de posible negativo en $días \n\tif ($dias < 0) \n\t{ \n\t\t--$meses; \n\n\t\t//ahora hay que sumar a $dias los dias que tiene el mes anterior de la fecha actual \n\t\tswitch ($array_ff[1]) { \n\t\t\t case 1: $dias_mes_anterior=31; break; \n\t\t\t case 2: $dias_mes_anterior=31; break; \n\t\t\t case 3: \n\t\t\t\t\tif (bisiesto($array_ff[0])) \n\t\t\t\t\t{ \n\t\t\t\t\t\t$dias_mes_anterior=29; break; \n\t\t\t\t\t} else { \n\t\t\t\t\t\t$dias_mes_anterior=28; break; \n\t\t\t\t\t} \n\t\t\t case 4: $dias_mes_anterior=31; break; \n\t\t\t case 5: $dias_mes_anterior=30; break; \n\t\t\t case 6: $dias_mes_anterior=31; break; \n\t\t\t case 7: $dias_mes_anterior=30; break; \n\t\t\t case 8: $dias_mes_anterior=31; break; \n\t\t\t case 9: $dias_mes_anterior=31; break; \n\t\t\t case 10: $dias_mes_anterior=30; break; \n\t\t\t case 11: $dias_mes_anterior=31; break; \n\t\t\t case 12: $dias_mes_anterior=30; break; \n\t\t} \n\n\t\t$dias=$dias + $dias_mes_anterior; \n\t} \n\n\t//ajuste de posible negativo en $meses \n\tif ($meses < 0) \n\t{ \n\t\t--$anos; \n\t\t$meses=$meses + 12; \n\t}\n\n\t//años, meses y dias\n\t$tiempo = array($anos,$meses,$dias);\n\n return $tiempo;\n}", "title": "" }, { "docid": "2faae8ee40e6c871baa12ec43a018529", "score": "0.6258669", "text": "function calcular_horarios_disponibles_por_facultad (){\n $aulas_ua=$this->dep('datos')->tabla('aula')->get_aulas_por_sede($this->s__id_sede);\n \n if(count($aulas_ua)==0){\n $mensaje=\" La Unidad Académica seleccionada no posee aulas registradas en el Sistema \";\n toba::notificacion()->agregar(utf8_decode($mensaje),'info');\n $this->s__horarios_disponibles=array();\n }\n else{\n $anio_lectivo=date('Y', strtotime($this->s__fecha_consulta));\n $periodo=$this->dep('datos')->tabla('periodo')->get_periodo_calendario($this->s__fecha_consulta, $anio_lectivo);\n $this->s__dia_consulta=$this->obtener_dia(date('N', strtotime($this->s__fecha_consulta)));\n \n //obtenemos todas las asignaciones para la fecha seleccionada\n $asignaciones=$this->procesar_periodo($periodo, 'hd');\n \n //obtenemos las aulas que poseen asignaciones\n $aulas=$this->obtener_aulas($asignaciones);\n toba::memoria()->set_dato_instancia(0, $this->s__id_sede);\n $horarios_disponibles=new HorariosDisponibles();\n \n $this->s__horarios_disponibles=$horarios_disponibles->calcular_horarios_disponibles($aulas, $aulas_ua, $asignaciones);\n \n if(count($this->s__horarios_disponibles)==0){\n $mensaje=\"La Unidad Académica seleccionada no posee horarios disponibles\";\n toba::notificacion()->agregar(utf8_decode($mensaje), 'info');\n }\n\n }\n \n }", "title": "" }, { "docid": "900845f3d26fc96142654311abc59494", "score": "0.62478", "text": "function FinalRonda(&$ejercito)\r\n{\r\n\t$ejercito->PoderAtaqueTotal=0;\r\n\tforeach ($ejercito->Flotas as $flota)\r\n\t{\r\n\t\tforeach ($flota->Unidades as $tipoUnidad)\r\n\t\t{\r\n\t\t\t$tipoUnidad->CantidadInicial=$tipoUnidad->Cantidad;\r\n\r\n\t\t\tif($tipoUnidad->Cantidad<=0)//No hay naves\r\n\t\t\tcontinue;\r\n\r\n\t\t\t//Porcentage de daño que han recibido las unidades\r\n\t\t\t$porcentageDaño=$tipoUnidad->Casco/($tipoUnidad->Info->Casco*$tipoUnidad->Cantidad);\r\n\t\t\t$porcentageDaño=min($porcentageDaño,1);\r\n\t\t\t\r\n\r\n\t\t\t//Ajustar el ataque y el escudo según el estado del casco\r\n\t\t\tif($porcentageDaño<1)\r\n\t\t\t{\r\n\t\t\t\t$tipoUnidad->Ataque=(int)($tipoUnidad->Info->Ataque*$porcentageDaño*mt_rand(8,12)/10);\r\n\r\n\t\t\t\tif($tipoUnidad->Ataque<=0)//El ataque no puede ser 0\r\n\t\t\t\t$tipoUnidad->Ataque=$tipoUnidad->Info->Ataque*(0.2*$porcentageDaño);\r\n\r\n\t\t\t\tif($tipoUnidad->Ataque>$tipoUnidad->Info->Ataque)//Comprobar que el ataque no es mayor que el inicial\r\n\t\t\t\t$tipoUnidad->Ataque=$tipoUnidad->Info->Ataque;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t$tipoUnidad->Ataque=$tipoUnidad->Info->Ataque;\r\n\r\n\t\t\t//Escudo\r\n\t\t\tif($tipoUnidad->Escudo<=0)//Escudo destruido, partir de un escudo inicial\r\n\t\t\t{\r\n\t\t\t\t$tipoUnidad->Escudo=($tipoUnidad->Info->Escudo*$tipoUnidad->Cantidad)*(0.2*$porcentageDaño);\r\n\t\t\t}\r\n\t\t\t$escudoTotal=$tipoUnidad->Info->Escudo*$tipoUnidad->Cantidad;//Escudo maximo para la flota\r\n\t\t\t\t\t\t\r\n\t\t\t$tipoUnidad->Escudo=min($escudoTotal,($tipoUnidad->Escudo*(1+((mt_rand(0,5)*$porcentageDaño)/10))));//Regenerar parte del escudo, pero no mas del maximo\r\n\r\n\t\t\t$ejercito->PoderAtaqueTotal+=$tipoUnidad->Ataque*$tipoUnidad->Cantidad;\r\n\t\t}\r\n\t}\r\n\tif($ejercito->NavesTotales<0)\r\n\t$ejercito->NavesTotales=0;\r\n}", "title": "" }, { "docid": "b87bf17bb1ee06e04e1da114d312f142", "score": "0.6228161", "text": "function calcularPrecioTotal($precioBasePedido, $precioDesperfectos, $precioServiciosAdicionales, $porcentajeDescuento){\n $calculoPrecioTotal = $precioBasePedido;\n if(isset($precioDesperfectos) && !is_null($precioDesperfectos)){\n $calculoPrecioTotal += $precioDesperfectos;\n }\n if(isset($precioServiciosAdicionales) && !is_null($precioServiciosAdicionales)){\n $calculoPrecioTotal += $precioServiciosAdicionales;\n }\n if(isset($porcentajeDescuento) && !is_null($porcentajeDescuento)){\n $calculoPrecioTotal *= 1 - ($porcentajeDescuento / 100.0);\n }\n $calculoPrecioTotal = round($calculoPrecioTotal,2);\n return $calculoPrecioTotal;\n}", "title": "" }, { "docid": "e2086862e9357676ebba28c693071679", "score": "0.6224974", "text": "function getCorrelativoComprobante() {\n\t\tglobal $bd;\n\t\tglobal $x_correlativo_comprobante;\n\t\t/// buscamos el ultimo correlativo\n\t\t$x_array_comprobante = $_POST['p_comprobante'];\n\t\t$x_array_comprobante = is_object($x_array_comprobante) || is_array($x_array_comprobante) ? $x_array_comprobante : json_decode($x_array_comprobante, true);\n\n\t\t$correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\n\t\t\t$sql_doc_correlativo=\"select (correlativo + 1) as d1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\t\t\n\t\t\t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\n\n\t\t\t// if ($x_array_comprobante['codsunat'] === \"0\") { // si no es factura electronica\n\t\t\t\t// guardamos el correlativo //\n\t\t\t\t$sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t\t\t$bd->xConsulta_NoReturn($sql_doc_correlativo);\n\t\t\t// } \n\t\t\t// si es factura elctronica guarda despues tigger ce \n\t\t} else {\n\t\t\t$correlativo_comprobante='0';\n\t\t}\n\n\t\t// SI TAMBIEN MODIFICA EN REGISTRO PAGO\n\t\t$x_correlativo_comprobante = $correlativo_comprobante;\n\t\tif ( strrpos($x_from, \"e\") !== false ) { $x_from = str_replace('e','',$x_from); setComprobantePagoARegistroPago(); }\n\n\t\t// print $correlativo_comprobante;\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante));\n\t\tprint $x_respuesta.'|';\n\t}", "title": "" }, { "docid": "79e4d9807914f8505f370b37e8a8a62e", "score": "0.6174811", "text": "public function calcularCalificacion(int $idCabecera){\n $aplica = SeguridadSaludRespuesta::\n where('seguridad_salud_cabecera_id','=',$idCabecera)\n ->where('aplica','=','1')->count();\n\n //calcular las respuestas que comple\n $cumple = SeguridadSaludRespuesta::\n where('seguridad_salud_cabecera_id','=',$idCabecera)\n ->where('aplica','=','1')\n ->where('cumple','=','1')\n ->count();\n\n $calificacion = ($cumple/$aplica) * 100;\n return $calificacion;\n }", "title": "" }, { "docid": "38748190ba61c0ff2ad2fdc4cd417237", "score": "0.6170111", "text": "function Totaliza($busca){\n\n $CiaA = mysql_query(\"SELECT iva FROM cia LIMIT 1\");\n $Cia = mysql_fetch_array($CiaA);\n \n $DddA = mysql_query(\"SELECT \n round(sum(importe),2) as ImporteTotal, \n round(sum(precio),2) as PrecioSinIva,\n sum(cantidad) as cantidad \n FROM fcd WHERE id='$busca' and cantidad > 0\"); \n \n $Ddd = mysql_fetch_array($DddA);\n \n if($Ddd[0]==0){\n $Cnt=0;$Importe=0;$Iva=0;$Total=0;\n }else{\n $Cnt = $Ddd[cantidad];\n $Importe = $Ddd[PrecioSinIva];\n $Iva = round($Ddd[PrecioSinIva] * ($Cia[iva]/100),2);\n $Total = $Ddd[ImporteTotal];\n \n }\n\n //$nImporte = $Total - ($Iva + $Ieps);\t//Con esto lo obligo a que me cuadre;\n $lUp = mysql_query(\"UPDATE fc SET cantidad=$Cnt,importe = $Importe, iva=$Iva, total= $Total WHERE id=$busca\");\n\n}", "title": "" }, { "docid": "3600644e15846f617d130b3303c42c3e", "score": "0.61623573", "text": "function calcula_detalhe_reputacao($var_detalhe_reputacao,$r_transacoes_vendas)\n{\n//use essa função para calcular o detalhe da reputação (Ex. item mesmo que o entregue, etc). Retorna o código das estrelas\t\nif($var_detalhe_reputacao != 0 || $r_transacoes_vendas != 0)\n{ \n\n$percentual_qualificacao = ($var_detalhe_reputacao*5)/(10*$r_transacoes_vendas);\n\n\nif($percentual_qualificacao == 0)\n{\n$mostra_estrelas = \"\n\t<div class='reputacao_wrap'>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n\t</div>\n\";\t\n}\nelseif($percentual_qualificacao > 0 && $percentual_qualificacao < 1)\n{\n\t$mostra_estrelas = \"\n\t<div class='reputacao_wrap'>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n\t</div>\n\";\t\n\t\n}\nelseif($percentual_qualificacao >= 1 && $percentual_qualificacao < 2)\n{\n\t$mostra_estrelas = \"\n\t<div class='reputacao_wrap'>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n\t</div>\n\";\t\n\t\n}\nelseif($percentual_qualificacao >= 2 && $percentual_qualificacao < 3)\n{\n\t\t$mostra_estrelas = \"\n\t\t<div class='reputacao_wrap'>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n\t\t</div>\n\";\t\n}\nelseif($percentual_qualificacao >= 3 && $percentual_qualificacao <= 4)\n{\n\t\t$mostra_estrelas = \"\n\t\t<div class='reputacao_wrap'>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n\t\t</div>\n\";\t\n}\n\nelseif($percentual_qualificacao > 4 && $percentual_qualificacao <= 5 )\n{\n\t\t\t$mostra_estrelas = \"\n\t\t\t<div class='reputacao_wrap'>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/com_rep.png' alt='Com reputação' class='reputacao_img' style='margin-top:7px;'/>\n\t\t\t</div>\n\";\n\n}\t \n}//end if != 0\nelse\n{\n\t$mostra_estrelas = \"\n\t\t<div class='reputacao_wrap'>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n<img src='gfx/ui/sem_rep.png' alt='Sem reputação' class='reputacao_img' style='margin-top:7px;'/>\n\t\t</div>\n\";\t\n\n\t\n}\nreturn $mostra_estrelas;\n\n}", "title": "" }, { "docid": "a52d203357c0e481e15df318d90cb8a4", "score": "0.61386716", "text": "function fechaPrimerPago( $fecha_corrida )\n {\n $dia_corte1 = 0;\n $dia_corte2 = 0;\n $x = 0;\n\n list($anio, $mes, $dia) = explode('/', $fecha_corrida);\n if (empty($anio) || empty($mes))\n list($anio, $mes, $dia) = explode('-', $fecha_corrida);\n\n $sql = \"SELECT dia_mes FROM p_dias_corte\";\n $arreglo = $this->consulta( $sql );\n while ( $fila = mysqli_fetch_array( $arreglo ) )\n {\n if( $x==0 )\n $dia_corte1 = $fila[ 0 ];\n if( $x==1 )\n $dia_corte2 = $fila[ 0 ];\n\n $x++;\n }\n \n //Todos los vales que se cobren entre el primer dia de corte (8 de cada mes ) y \n // un dia antes del ultimo dia de corte (23 de cada mes) empezaran a pagarce el ultimo dia \n // de ese mes\n if( $dia>$dia_corte1 && $dia<=$dia_corte2 )\n {\n // OBTENER LOS DIAS QUE TIENE UN MES //\n $dias_mes = $this->diasMes($mes,$anio);\n\n $dia_p = $dias_mes;\n $fecha = \"$anio-$mes-$dia_p\"; //FECHA DEL PRIMER PAGO\n }\n\n //Todos los vales que se cobren antes del primer dia de corte (8 de cada mes)\n // empezaran a pagar el 15 de ese mes\n if( $dia<=$dia_corte1 )\n {\n $dia_p = 15;\n $fecha = \"$anio-$mes-$dia_p\"; //FECHA DEL PRIMER PAGO\n }\n\n //Todos los vales que se cobren despues del segundo dia de corte (23 de cada mes)\n // empezaran a pagar el 15 del mes que entra\n if( $dia>$dia_corte2 )\n {\n $dia_p = 15;\n //Sumarle un mes a la fecha para sacar el 15 del mes que sigue\n $sql = \"SELECT DATE_ADD('$fecha_corrida', INTERVAL 1 MONTH)\"; \n $arreglo = $this->consulta( $sql );\n while ( $fila = mysqli_fetch_array( $arreglo ) )\n $fecha = $fila[ 0 ];\n\n list($anio, $mes, $dia) = explode('-', $fecha);\n $fecha = \"$anio-$mes-$dia_p\"; //FECHA DEL PRIMER PAGO\n }\n\n return $fecha;\n }", "title": "" }, { "docid": "6631dbfde6da5edbcb163614a7c0d447", "score": "0.61372477", "text": "function montantTotal(){\n\t$total = 0; \n\t\n\tif(!empty($_SESSION['panier']['id_annonce'])){\n\t\t\n\t\tfor($i = 0; $i < sizeof($_SESSION['panier']['id_annonce']); $i++){\n\t\t\t$total += $_SESSION['panier']['prix'][$i] * $_SESSION['panier']['quantite'][$i];\n\t\t}\t\n\t}\n\t\n\tif($total != 0){\n\t\treturn $total;\n\t}\n\t\n}", "title": "" }, { "docid": "d5a70b44fe4f3fcf79c0f8efeaff5141", "score": "0.6137149", "text": "public function calcular_horas_jornadas_individual($id_jornada){\n \n $fecha = new MongoDB\\BSON\\UTCDateTime();\n $id = new MongoDB\\BSON\\ObjectId($id_jornada);\n $res_jornadas = $this->mongo_db->where(array('eliminado'=>false,'status'=>true,'_id'=>$id))->get(\"jornadas\");\n $cont = 0;\n $e = new DateTime('00:00');\n $f = clone $e;\n //---\n //$fecha_inicio = $res_jornadas[0][\"fecha_hora_inicio\"]->toDateTime();\n //$fecha_hora_ini = $fecha_inicio->format('Y-m-d H:i:s');\n $fecha_hora_ini = new DateTime(date(\"Y-m-d H:i:s\",$res_jornadas[0][\"fecha_hora_inicio\"]));\n \n if((isset($res_jornadas[0][\"fecha_hora_fin\"]))&&($res_jornadas[0][\"fecha_hora_fin\"]!=\"Sin salir\")){\n //$fecha_fin = $res_jornadas[0][\"fecha_hora_fin\"]->toDateTime();\n //$fecha_hora_fini = $fecha_fin->format('Y-m-d H:i:s');\n $fecha_hora_fini = new DateTime(date(\"Y-m-d H:i:s\",$res_jornadas[0][\"fecha_hora_fin\"]));\n }else{\n $fecha_fin = \"\";\n $fecha_hora_fini = new DateTime();\n }\n \n /*$fecha1 = new DateTime($fecha_hora_ini);//fecha inicial\n $fecha2 = new DateTime($fecha_hora_fini);//fecha de cierre*/\n $fecha1 = $fecha_hora_ini;//fecha inicial\n $fecha2 = $fecha_hora_fini;//fecha de cierre \n $intervalo_siguiente=$fecha1->diff($fecha2);\n $e->add($intervalo_siguiente);\n $intervalo = $f->diff($e);\n //$intervalo=$fecha1->diff($fecha2);\n /*var_dump($fecha1);\n echo \"</br>\";\n var_dump($fecha2);\n echo \"</br>\";\n var_dump($intervalo_siguiente->format('%H:%i:%s'));\n echo \"</br>\";\n var_dump($intervalo->format('%H:%i:%s'));\n echo \"</br></br>\";*/\n \n if(isset($intervalo)){\n $horas_transcurridas = $intervalo->format('%H:%i:%s');\n }else{\n $horas_transcurridas = \"00:00:00\";\n }\n //--\n return $horas_transcurridas; \n }", "title": "" }, { "docid": "9ed303a4c5abe4fbef0c6a242d75e198", "score": "0.6120507", "text": "function procenat($iznos, $procenat) {\n\t// echo $iznos .\"<br>\"; \n\t// echo $procenat .\"<br>\";\n\t$rezultat=($procenat/100)*$iznos;\n\techo $procenat ?> % od broja <?php echo $iznos ?> = <?php echo $rezultat.\"<br><br>\";\n}", "title": "" }, { "docid": "7f34d54eb7339795c23c62aa17e82e80", "score": "0.6113351", "text": "function tiempo_conduciendo_repartidor($link,$id_repartidor,$fecha_inicio,$fecha_fin){\r\n\t$sql = <<<SQL\r\n\tSELECT sum(temps)\r\n\tFROM rutes_informacio\r\n\tWHERE lliurador = '$id_repartidor' AND data BETWEEN '$fecha_inicio' AND '$fecha_fin'\r\nSQL;\r\n\t$result = mysql_query($sql, $link);\r\n\t$tiempo = mysql_result($result,0);\r\n\tmysql_free_result($result);\r\n\treturn number_format($tiempo/60,1);\r\n}", "title": "" }, { "docid": "a6bf76726064082de618ebe070f5e0dc", "score": "0.61094874", "text": "function restaFechas($dFecIni, $dFecFin)\n{\n\n $separa1 = strtotime($dFecIni);\n //defino fecha 1\n $ano1 = date(\"Y\",$separa1);\n $mes1 = date(\"m\",$separa1);\n $dia1 = date(\"d\",$separa1);\n\n //defino fecha 2\n $separa2 = strtotime($dFecFin);\n //defino fecha 1\n $ano2 = date(\"Y\",$separa2);\n $mes2 = date(\"m\",$separa2);\n $dia2 = date(\"d\",$separa2);\n\n //calculo timestam de las dos fechas\n $timestamp1 = mktime(0,0,0,$mes1,$dia1,$ano1);\n $timestamp2 = mktime(0,0,0,$mes2,$dia2,$ano2);\n\n //resto a una fecha la otra\n $segundos_diferencia = $timestamp1 - $timestamp2;\n //echo $segundos_diferencia;\n\n //convierto segundos en días\n $dias_diferencia = $segundos_diferencia / (60 * 60 * 24);\n\n //obtengo el valor absoulto de los días (quito el posible signo negativo)\n $dias_diferencia = abs($dias_diferencia);\n\n //quito los decimales a los días de diferencia\n $dias_diferencia = floor($dias_diferencia);\n\n //echo $dias_diferencia;\n return $dias_diferencia + 1;\n}", "title": "" }, { "docid": "75c3b2d13ad1c037f26f2d0a13eab8d1", "score": "0.61087036", "text": "public function pago()\n {\n //$compra = Session::get('compra');\n $this->datos = Session::get('colegio');\n $this->conf = (New Configuracion)->find(1);\n if($this->conf->precio == 0){\n $total = 0;\n }else{\n $total = $this->datos['entradas'] * $this->conf->precio;\n Session::set('total', $total);\n }\n }", "title": "" }, { "docid": "e65a5c667eea975a5368118b508e8d09", "score": "0.6107507", "text": "function getValorCuota($courseid,$studentid,$cuota){\n\t\t//$result = $H_DB->GetOne(\"SELECT (valor_pagado-valor_cuota) as diferencia FROM h_cuotas WHERE courseid={$courseid} AND userid={$studentid} AND cuota={$cuota}\");\n\t\tglobal $H_DB,$HULK;\n\t\t$result = $H_DB->GetOne(\n\t\t\t\"SELECT (c.valor_pagado-(c.valor_cuota-(c.valor_cuota*(i.becado/100)))) as diferencia\n\t\t\tFROM h_cuotas as c\n\t\t\tLEFT JOIN h_inscripcion as i ON i.id=c.insc_id\n\t\t\tLEFT JOIN {$HULK->lms_dbname}.mdl_course as mc ON mc.id=i.comisionid\n\t\t\tWHERE\n\t\t\t\ti.comisionid={$courseid}\n\t\t\t\tAND i.userid={$studentid}\n\t\t\t\tAND c.cuota={$cuota}\n\t\t\t\tAND UNIX_TIMESTAMP()-(UNIX_TIMESTAMP(CONCAT(DATE_FORMAT(DATE_ADD(FROM_UNIXTIME(mc.startdate, '%Y-%m-%d %H:%i:%S'), INTERVAL {$cuota}-1 MONTH),'%Y'),'-',DATE_FORMAT(DATE_ADD(FROM_UNIXTIME(mc.startdate, '%Y-%m-%d %H:%i:%S'), INTERVAL {$cuota}-1 MONTH),'%m'),'-05 00:00:00' ) )) > 0\"\n\t\t);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1a93e949b8ff3f250f70d2744ea90c35", "score": "0.6103692", "text": "function grava_cadferia () {\n \n global $pessoal, $Ipessoal,$mtipo, $r30_perai, $ponto, $r30_tipoapuracaomedia, $debug;\n global $r30_perai,$ponto,$r30_peraf, $r30_faltas, $r30_peri,$r30_perf, $subpes_pagamento, $mtipo, $nsaldo_anterior, $ndiassaldo;\n global $nabono, $r30_ndias, $paga_13, $mpsal ,$subpes,$cadferia, $r30_peri,$r30_perf, $mtipo, $nsaldo, $mpsal;\n global $r30_periodolivreinicial_dia, $r30_periodolivreinicial_mes, $r30_periodolivreinicial_ano, $r30_periodolivreinicial;\n global $r30_periodolivrefinal_dia, $r30_periodolivrefinal_mes, $r30_periodolivrefinal_ano, $r30_periodolivrefinal,$r30_obs;\n \n $condicaoaux = \" and r30_regist = \".db_sqlformat( $pessoal[0][\"r01_regist\"] ) ;\n $condicaoaux .= \" and r30_perai = \".db_sqlformat($r30_perai) ;\n\n if( ($mtipo >= \"01\" && $mtipo <= \"08\") || ($mtipo >= \"12\" && $mtipo <= \"15\") || $mtipo == \"999\") {\n\n $matriz1 = array();\n $matriz2 = array();\n $matriz1[1] = \"r30_regist\";\n $matriz1[2] = \"r30_numcgm\";\n $matriz1[3] = \"r30_perai\";\n $matriz1[4] = \"r30_ponto\" ;\n $matriz1[5] = \"r30_peraf\";\n $matriz1[6] = \"r30_faltas\";\n $matriz1[7] = \"r30_per1i\";\n $matriz1[8] = \"r30_per1f\";\n $matriz1[9] = \"r30_proc1\";\n $matriz1[10] = \"r30_tip1\";\n $matriz1[11] = \"r30_dias1\";\n $matriz1[12] = \"r30_abono\";\n $matriz1[13] = \"r30_ndias\";\n $matriz1[14] = \"r30_paga13\";\n $matriz1[15] = \"r30_psal1\";\n $matriz1[16] = \"r30_anousu\";\n $matriz1[17] = \"r30_mesusu\";\n $matriz1[18] = \"r30_obs\";\n\n if (isset($r30_tipoapuracaomedia) && $r30_tipoapuracaomedia == 2) {\n\n $matriz1[19] = \"r30_tipoapuracaomedia\";\n $matriz1[20] = \"r30_periodolivreinicial\";\n $matriz1[21] = \"r30_periodolivrefinal\";\n }\n \n $matriz2[1] = $pessoal[0][\"r01_regist\"];\n $matriz2[2] = $pessoal[0][\"r01_numcgm\"];\n $matriz2[3] = db_nulldata($_POST[\"r30_perai\"]);\n $matriz2[4] = $ponto;\n $matriz2[5] = db_nulldata($_POST[\"r30_peraf\"]);\n $matriz2[6] = $r30_faltas+0;\n $matriz2[7] = db_nulldata($r30_peri);\n $matriz2[8] = db_nulldata($r30_perf);\n $matriz2[9] = $subpes_pagamento;\n\n if ($mtipo == 999) {\n \t $matriz2[10] = \"00\";\n } else {\n $matriz2[10] = $mtipo;\n }\n\n $matriz2[11] = $nsaldo_anterior;\n if ($nabono == \"\") {\n $nabono = 0;\n }\n\n $matriz2[12] = $nabono;\n $matriz2[13] = $r30_ndias;\n $matriz2[14] = strtoupper($paga_13);\n $matriz2[15] = $mpsal;\n $matriz2[16] = db_val( db_substr($subpes,1,4));\n $matriz2[17] = db_val( db_substr($subpes,6,2));\n $matriz2[18] = $r30_obs;\n\n if (isset($r30_tipoapuracaomedia) && $r30_tipoapuracaomedia == 2) {\n\n $matriz2[19] = $r30_tipoapuracaomedia;\n $matriz2[20] = implode(\"-\", array_reverse(explode(\"/\",$r30_periodolivreinicial)));\n $matriz2[21] = implode(\"-\", array_reverse(explode(\"/\",$r30_periodolivrefinal)));\n $r30_perai = $r30_periodolivreinicial;\n $r30_peraf = $r30_periodolivrefinal;\n }\n\n if ($debug == true) {\n echo \"grava_cadferia: Inserindo em cadferia: <br>\";\n echo \"grava_cadferia: Valores: <br>\";\n echo \"grava_cadferia:<pre>\";\n print_r($matriz2);\n echo \"</pre>\";\n echo \"<br>\";\n } \n\n db_insert( \"cadferia\", $matriz1, $matriz2 );\n } else if( $mtipo == \"09\") {\n \n db_debug1(\"vai gravar r30_per2i --> $r30_peri\");\n db_debug1(\"vai gravar r30_per2i --> $r30_perf\");\n $matriz1 = array();\n $matriz2 = array();\n $matriz1[1] = \"r30_per2i\";\n $matriz1[2] = \"r30_per2f\";\n $matriz1[3] = \"r30_proc2\";\n $matriz1[4] = \"r30_tip2\";\n $matriz1[5] = \"r30_dias2\";\n $matriz1[6] = \"r30_psal2\";\n $matriz1[7] = \"r30_ponto\" ;\n $matriz2[1] = db_nulldata($r30_peri);\n $matriz2[2] = db_nulldata($r30_perf);\n $matriz2[3] = $subpes_pagamento;\n $matriz2[4] = $mtipo;\n $matriz2[5] = $ndiassaldo;\n $matriz2[6] = $mpsal;\n $matriz2[7] = $ponto;\n db_update( \"cadferia\", $matriz1, $matriz2, bb_condicaosubpes(\"r30_\").$condicaoaux );\n\n } else if( $mtipo == \"10\") { \n $matriz1 = array();\n $matriz2 = array();\n $matriz1[1] = \"r30_abono\";\n $matriz1[2] = \"r30_proc2\";\n $matriz1[3] = \"r30_tip2\";\n $matriz1[4] = \"r30_psal2\";\n $matriz2[1] = $nabono;\n $matriz2[2] = $subpes_pagamento;\n $matriz2[3] = $mtipo;\n $matriz2[4] = $mpsal;\n db_update( \"cadferia\", $matriz1, $matriz2, bb_condicaosubpes(\"r30_\").$condicaoaux );\n\n }\n}", "title": "" }, { "docid": "74d40331691ca16de67290ba9a8d5b10", "score": "0.60872984", "text": "function db_calculo_dac ( $codigo_a_calcular ) {\r\n $tamanho_codigo = strlen($codigo_a_calcular) ; \r\n echo $codigo_a_calcular;\r\n echo \"<br>\";\r\n echo $tamanho_codigo;\r\n echo \"<br>\";\r\n for ( $i = 0; $i < $tamanho_codigo; $i ++ ){\r\n $m_barras[$i] = substr($codigo_a_calcular,$i,1) + 0 ;\r\n echo $m_barras[$i];\r\n echo \"<br>\";\r\n }\r\n for ( $i = $tamanho_codigo ; $i > -1 ; $i -- ) {\r\n if ( $i = $tamanho_codigo ) {\r\n\t $m_produto[$i] = 2;\r\n }else{\r\n\t if ( $m_produto[$i+1] = 2 ) {\r\n\t $m_produto[$i] = 1;\r\n\t }else{\r\n\t $m_produto[$i] = 2;\r\n\t }\r\n }\r\n }\r\n $resultado = 0;\r\n for ( $i = 0; $i < $tamanho_codigo ; $i ++ ) {\r\n $m_resultado[$i] = sqlformat( round( $m_barras[$i] * $m_produto[$i],2),2,\"0\");\r\n $resultado = $resultado + substr($m_resultado[$i],0,1) + substr( $m_resultado[$i],1,1);\r\n }\r\n $digito = $resultado % 10 ;\r\n $digito = substr($digito,0,1);\r\n if ( (!empty($digito)) and ($digito <> 0) ) {\r\n $digito = 10 - $digito;\r\n }\r\n return sqlformat($digito,1);\r\n}", "title": "" }, { "docid": "63ed54d20ff315e6ea1ce7f69041a0e0", "score": "0.6075007", "text": "function fecha_acta_pago($dias_p, $estado_p, $fecha, $radicado){\n\n\t\t\t$data=split(\"-\",$fecha);\n\t\t$e= $data[1].\"-\".$data[2].\"-\".$data[0];\n\t\n \n $fechaInicial = mktime(0,0,0,$data[1],$data[2],$data[0]); \n $lapso = $dias_p;// dias habiles \n $diasTrans = 0; // dias transcurridos \n $diasHabiles = 0;\n $feriados = array(\"1-1\",\"8-1\",\"19-3\",\"26-3\",\"27-3\",\"28-3\",\"29-3\",\"30-3\",\"1-5\",\"14-5\",\"4-6\",\"11-6\",\"2-7\",\"20-7\",\"7-8\",\"20-8\",\"15-10\",\"5-11\",\"12-11\",\"8-12\",\"25-12\"); //dias festivos.. DIA-MES\n while($diasHabiles<($lapso+1)) \n { $fecha = $fechaInicial+($diasTrans*86400); \n $diaSemana = getdate($fecha); \n if($diaSemana[\"wday\"]!=0 && $diaSemana[\"wday\"]!=6) \n { $feriado = $diaSemana['mday'].\"-\".$diaSemana['mon']; \n if(!in_array($feriado,$feriados)) \n { $diasHabiles++; } \n } \n $diasTrans++; \n } \n $fechaFinal = $fechaInicial+(($diasTrans-1)*86400); \n \n if(date(\"Y/m/d\") > date(\"Y/m/d\",$fechaFinal) ){\n $total = \"vencido\";\n //bloquear_rad($radicado);\n }else{\n $fecha_fin = date(\"j/n/Y\",$fechaFinal);\n$date = explode(\"/\", $fecha_fin);\n$cuando = mktime(0,0,0,$date[1],$date[0],$date[2]);\n$hoy = time();\n$resta = $hoy - $cuando;\n$fecha = str_replace(\"-\",\"\",$resta);\n$total = floor($fecha/86400);\n$total+= 1;\n }\n \n\n $res = fechaLetras(date(\"d/m/Y\",$fechaFinal));\n return array($total, $res); \n }", "title": "" }, { "docid": "9b406a9845c0312091fa52a46cb747fa", "score": "0.6074122", "text": "public function getTotales(){\n $dia = date(\"Y-m-d\");\n $undiamas = strtotime ( '+1 day' , strtotime ( $dia ) ) ;\n $undiamas = date ( 'Y-m-j' , $undiamas );\n $db = JFactory::getDBO();\n $query = \"SELECT * FROM #__comprobacionLoteria \"\n .' WHERE pagada = \"1\" AND (modified >= \"'.$dia.'\" and modified <\"'.$undiamas.'\" )';\n $db->setQuery($query);\n $resul = $db->loadObjectList();\n $respuesta = array();\n foreach ($resul as $participacion){\n $cajero = $participacion->cajero;\n if ( !isset($respuesta[$cajero])){\n $respuesta[$cajero] = array();\n }\n if (!isset($respuesta[$cajero][$participacion->cantidadJugada])){\n $respuesta[$cajero][$participacion->cantidadJugada] = 1;\n } else {\n $respuesta[$cajero][$participacion->cantidadJugada] ++;\n\n }\n }\n\n\n return $respuesta;\n }", "title": "" }, { "docid": "7e42a56fc9c673873ab94dc7033dc9b5", "score": "0.60717446", "text": "private function calcValues(){\n $calc = $this->currentValue / $this->maxValue * 100;\n $this->currentPercentage = round($calc);\n self::convertPercentage();\n }", "title": "" }, { "docid": "cfa8a74ba464f3a4bc675a069eb4b2fc", "score": "0.60685396", "text": "function pintaTiempos(array $array_tiempos)\n{\n $t_anterior = 0;\n $t_inicial = 0;\n if (1 == count($array_tiempos)){\n cronometraEvento (\"Final\", $array_tiempos);\n }\n pintaln(\"\\n\\t\\t\\t Uso RAM Pico Ram\");\n pintaln(\"--------------------------------------------------------------------\");\n foreach ($array_tiempos as $evento => $t){\n if (0 == $t_anterior){\n pintaln(\"\\t\\t\\t\".$evento);\n $t_inicial = $t;\n $t_anterior = $t;\n } else {\n $t_duracion = (float) $t - $t_anterior;\n pintaln(\"Duración: \". sprintf('%5.4F',$t_duracion) . \"\\t\" . $evento );\n $t_anterior = $t;\n }\n }\n pintaln (\"Total:\\t\" . sprintf('%5.4F', (float)($t_anterior - $t_inicial)) . \" segundos\\n\\n\");\n}", "title": "" }, { "docid": "04163be59d5898e54e098941dae8c5df", "score": "0.60577524", "text": "function CalcularRecursosRobados(&$ejercitoAtacante,$recursosPlaneta)\r\n{\r\n\t//Calcular primero los recursos a repartir\r\n\t$recursosRobados=array();\r\n\t$porcentageRobado=$GLOBALS['configuracion']['PorcentageRecursosRobados']/100;\r\n\tfor($contador=0;$contador<count($recursosPlaneta);$contador++)\r\n\t$recursosRobados[$contador]=round($recursosPlaneta[$contador]*$porcentageRobado);\r\n\r\n\t$cantidadTotalRecursos=array_sum($recursosRobados);\r\n\r\n\t//Calcular la capacidad de carga de las naves\r\n\tforeach ($ejercitoAtacante->Flotas as $flota)\r\n\t{\r\n\t\t$flota->CapacidadCarga=0;\r\n\t\tforeach ($flota->Unidades as $tipoUnidad)\r\n\t\t{\r\n\t\t\t$flota->CapacidadCarga+=$tipoUnidad->Info->CapacidadCarga*$tipoUnidad->Cantidad;\r\n\t\t\t$ejercitoAtacante->NavesAportadas+=$tipoUnidad->CantidadInicioBatalla;\r\n\t\t\t$flota->NavesAportadas+=$tipoUnidad->CantidadInicioBatalla;\r\n\t\t}\r\n\t}\r\n\r\n\t//Repartir los recursos entre los atacantes\r\n\t$recursosRestantes=$cantidadTotalRecursos;\r\n\t$recursosRobadosDisponibles=$recursosRobados;\r\n\t$primeraIteracion=true;\r\n\twhile($recursosRestantes>0)\r\n\t{\r\n\t\t$todosLlenos=true;//Indica si la capacidad de carga de todas las naves esta llena\r\n\t\t$recursosRobados=$recursosRobadosDisponibles;//Recursos que se van a repartir en esta iteracion\r\n\t\tforeach ($ejercitoAtacante->Flotas as $flota)\r\n\t\t{\r\n\t\t\tif($flota->CapacidadCarga<=0)\r\n\t\t\tcontinue;\r\n\t\t\telse\r\n\t\t\t$todosLlenos=false;\r\n\r\n\t\t\tif($primeraIteracion==true)//Asignar los recursos robados por esta flota según las perdidas sufridas\r\n\t\t\t{\r\n\t\t\t\tif(array_sum($ejercitoAtacante->Perdidas)<=0 || array_sum($flota->Perdidas)<=0)//Sin perdidas\r\n\t\t\t\tcontinue;\r\n\t\t\t\t$porcentageAsignado=array_sum($flota->Perdidas)/array_sum($ejercitoAtacante->Perdidas);\r\n\t\t\t}\r\n\t\t\telse //Asignar recursos por cantidad de flota\r\n\t\t\t$porcentageAsignado=(1/$ejercitoAtacante->NavesAportadas)*$flota->NavesAportadas;\r\n\r\n\t\t\tif($porcentageAsignado>1)\r\n\t\t\t$porcentageAsignado=1;\r\n\r\n\t\t\tif($porcentageAsignado==0)continue;\r\n\r\n\t\t\t$recursosAsignados=array();\r\n\t\t\tfor($contador=0;$contador<count($recursosRobados);$contador++)\r\n\t\t\t$recursosAsignados[$contador]=round($recursosRobados[$contador]*$porcentageAsignado);\r\n\r\n\t\t\t$recursosCaben=array();\r\n\r\n\t\t\tif(array_sum($recursosAsignados)>$flota->CapacidadCarga)//No caben los recursos asignados\r\n\t\t\t{\r\n\t\t\t\t//Repartir los recursos que caben\r\n\t\t\t\t$porcentageCabe=(1/array_sum($recursosAsignados))*$flota->CapacidadCarga;\r\n\t\t\t\tfor($contador=0;$contador<count($recursosAsignados);$contador++)\r\n\t\t\t\t$recursosCaben[$contador]=round($recursosAsignados[$contador]*$porcentageCabe);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$recursosCaben=$recursosAsignados;\r\n\t\t\t}\r\n\r\n\t\t\tfor($contador=0;$contador<count($recursosCaben);$contador++)\r\n\t\t\t{\r\n\t\t\t\t$flota->RecursosRobados[$contador]+=$recursosCaben[$contador];\r\n\t\t\t\t$recursosRobadosDisponibles[$contador]-=$recursosCaben[$contador];\r\n\t\t\t}\r\n\t\t\t$flota->CapacidadCarga-=array_sum($recursosCaben);\r\n\t\t\t$recursosRestantes-=array_sum($recursosCaben);\r\n\t\t}\r\n\t\tif($todosLlenos==true)\r\n\t\tbreak;\r\n\t\t$primeraIteracion=false;\r\n\t}\r\n\treturn $recursosRestantes;\r\n}", "title": "" }, { "docid": "34b2c91d0de0ccbc4a6c1b37b4901e97", "score": "0.6053837", "text": "function cajas($arts,$artcaja){\n//se modifica para que si el parametro $arts es 0, no cause error al parsear.\n if($arts==0){\n return $cajas =0;\n }\n else{\n return $cajas = number_format($arts/$artcaja); \n }\n \n \n}", "title": "" }, { "docid": "b92375927b6cbef48b25e505e021d7f1", "score": "0.605346", "text": "function getMoy(PDO $bdd){\n $total_visites = 0; //Nombre de visites\n $total_jours = 0;//Nombre de jours enregistrés dans la base\n\n $total_visites = $bdd->query( 'SELECT SUM(visites) AS total_visites FROM visites_jour ')->fetch();\n $total_visites = $total_visites['total_visites'];\n\n $total_jours = $bdd->query( 'SELECT COUNT(*) AS total_jours FROM visites_jour')->fetch();\n $total_jours = $total_jours['total_jours'];\n\n //on fait la moyenne\n $moyenne = $total_visites/$total_jours;\n return $moyenne ;\n}", "title": "" }, { "docid": "cf410063709e0e74570a5808fdab87e9", "score": "0.60422015", "text": "function devolve_final_caixa($id_caixa_aberto){\n\n\t$totais_final_geral=0;\n\n\t$subtotal_vendas = devolve_valores_caixa($id_caixa_aberto,0);\n\t$totais_troco_caixa = devolve_troco_caixa($id_caixa_aberto);\n\t$totais_saidas_caixa = devolve_saidas_caixa($id_caixa_aberto);\n\n\t$totais_final_geral = (($subtotal_vendas+$totais_troco_caixa)-$totais_saidas_caixa);\n\n\treturn $totais_final_geral;\n\t\n}", "title": "" }, { "docid": "2c7dd7e9044eaad44f1d52ad48d4dd6c", "score": "0.60351336", "text": "public function totalcomprahoy()\r\n\t{\r\n\t\t//la funcion IFNULL hace que no me arroje null cuando no hayan datos en con la fecha actual \"curdate\" actual\r\n\t\t/*\t\t$sql=\"SELECT IFNULL(SUM(total_compra),0) as total_compra FROM ingreso WHERE DATE(fecha_hora)=curdate()\";\r\n\t\treturn ejecutarConsulta($sql);*/\r\n\t\t$sql=\"SELECT IFNULL(SUM(data),0) as total_compra FROM estacion_64 WHERE DATE(date)=curdate()\";\r\n\t\treturn ejecutarConsulta($sql);\r\n\t}", "title": "" }, { "docid": "4325f4cffde2f85e431298814801a513", "score": "0.60153234", "text": "private function getRecpientsAtCalculation()\n\t{\n\t\t// If the campaign is Evenly Distributed then recipientCount = totalRecipients / $this->listCount\n\t\t// If the campaign is Percentage Based then the recipientCount = ((totalRecipient / $this->splittestPercentage) * 100) / $this->listCount\n\t\tif ($this->splitType == 'percentage') {\n\t\t\t$recipientCount = ($this->splittestPercentage / $this->sendSize ) * 100;\n\t\t\t$recipientCount = floor($recipientCount / $this->newsletterCount);\n\t\t} else {\n\t\t\t$recipientCount = $this->sendSize / $this->newsletterCount;\n\t\t}\n\t\t$this->recpientsAtCalculation = $recipientCount;\n\t}", "title": "" }, { "docid": "790403a0facca5db5b48b2e42a4392bc", "score": "0.60098606", "text": "function calcularTotal(){\n $total = 0;\n if(isset($_SESSION['carrito'])){\n foreach($_SESSION['carrito'] as $indice => $value){\n $total += $value['precio'] * $value['cantidad'];\n }\n }\n return $total;\n}", "title": "" }, { "docid": "52b3c2535c4c8dd99a67de2ef4a1aa21", "score": "0.6009722", "text": "public function countDinero(){\n //Carbon::now()->subMonth()->toDateString()\n $donaciones = Donativo::where('fecha_donativo', '>', 2019-01-01)->sum('coste');\n\n $total3 = 10000;\n\t $cantidad3=$donaciones;\n $porcentage=$cantidad3/$total3*100;\n $donaciones = round($donaciones, 2);\n $datos['cantidad'] = $donaciones;\n $datos['porcentage'] = $porcentage;\n return $datos;\n }", "title": "" }, { "docid": "525e3181ae9ed354982cc1ddc405065c", "score": "0.60080045", "text": "function calcula_valor($DataPagamento, $NossoNumero, $Leiaute = '') {\n //Formato da Data 99/99/9999\n include(\"config/conexaoFc.php\");\n $NaoGeraMultaJuros = 'N'; \n $filtroNossoNumero = 'nosso_numero';\n if ($Leiaute == \"BANCO SANTANDER - 400\") {\n $filtroNossoNumero = ' substring(nosso_numero,6,8)';\n }elseif($Leiaute == \"BIC - BANCO - 400\") {\n $filtroNossoNumero = ' substring(nosso_numero,8,6)';\n }\n\n //$DB->debug=true;\n $sql = \"select valor, data_vencimento as DtVencimento,data_vencimento as DtVencimentoOriginal, condicao_juros as CondicaoJuros, \n\t\tbase_juros as BaseJuros, nosso_numero as NossoNumero from parcelas\n\t where \" . $filtroNossoNumero . \" = '\" . $NossoNumero . \"'\"\n . \" or (nosso_numero = '\" . substr($NossoNumero, 6, 7) . \"' and banco_id is not null and banco_id in ( select id from bancos where Sigla in ('RC','RS','IT')))\";\n $rs = $DB->Execute($sql);\n $NossoNumeroGeneses = $rs->fields['NossoNumero'];\n if ($rs->RecordCount() > 0) {\n $DtVencimentoMultaJuros = $rs->fields['DtVencimento'];\n $DtVencimento = $rs->fields['DtVencimentoOriginal'];\n if (empty($rs->fields['DtVencimentoOriginal']) || $rs->fields['DtVencimentoOriginal'] == NULL) {\n $DtVencimento = $rs->fields['DtVencimento'];\n }\n $CondicaoJuros = $rs->fields['CondicaoJuros'];\n $BaseJuros = $rs->fields['BaseJuros'];\n $DataVencimento = $rs->UserTimeStamp($DtVencimento, 'd/m/Y');\n $DataVencimentoMultaJuros = $rs->UserTimeStamp($DtVencimentoMultaJuros, 'd/m/Y');\n $ValorBoleto = $rs->fields['valor'];\n $contar_dias1 = contar_dias($NossoNumero, $DataVencimento, $DataPagamento);\n $QuantDias = $contar_dias1['dias'];\n $Dataprevista = $contar_dias1['DataPrev'];\n if ($DataVencimento == $DataVencimentoMultaJuros) {\n $contar_dias1MJ = $contar_dias1;\n $QuantDiasMJ = $QuantDias;\n $DataprevistaMJ = $Dataprevista;\n }#\n else {\n $contar_dias1MJ = contar_dias($NossoNumero, $DataVencimentoMultaJuros, $DataPagamento);\n $QuantDiasMJ = $contar_dias1MJ['dias'];\n $DataprevistaMJ = $contar_dias1MJ['DataPrev'];\n }\n //condicao 1\n $DataVencimento1 = explode(\"/\", $DataVencimento);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag){\n $verificacao = true;\n }\n //condicao 2\n $DataVencimento1 = explode(\"/\", $DataVencimento);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n $verificacao2 = false;\n if ($ano_ven . $mes_ven . $dia_ven < $ano_pag . $mes_pag . $dia_pag){\n $verificacao2 = true;\n }\n //condicao 3\n $DataVencimento1 = explode(\"/\", $DataVencimento);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n $DataPagamento1 = explode(\"/\", $Dataprevista);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n $verificacao3 = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao3 = true;\n /*\n essa condição só entra boletos pagos antes ou até o vencimento ou se pagar depois por motivo de feriado ou fim de semana, foi retirada a condição\n para boletos depois do vencimento com dias negativos pois estava dando problema na ICF de aluno com desconto antecipado e ate o vencimento ganhando desconto\n */\n if (($verificacao == true) or ( ($verificacao2 == true) and ( $QuantDias <= 0) and 1 == 0) or ( ($verificacao3 == true) and ( $verificacao2 == true))) {\n \n }#\n else {\n if ($QuantDias < 0){\n $QuantDias = $QuantDias * (-1); //muda a quantidade para positivo\n }\n\n //{ -- Verifica Condicao -- }\n if ($CondicaoJuros == '') {\n $sql2 = \"select condicao_juros as CondicaoJuros, base_juros as BaseJuros from parametro\";\n $rs2 = $DB->Execute($sql2);\n $CondicaoJuros = $rs2->fields['CondicaoJuros'];\n $BaseJuros = $rs2->fields['BaseJuros'];\n }\n\n //{ -- Verifica Condicao 5 dia util -- }\n if (($CondicaoJuros == 'D') and ( $BaseJuros == 'X')) {\n $DataLimite = somaData($DataVencimentoMultaJuros, '+', 0, 1, 0);\n $DataLimiteStr = $DataLimite;\n $DataLimite = '01' . substr($DataLimiteStr, 2, 10);\n $DiasUteis = 0;\n\n while ($DiasUteis < 4) {\n if (verifica_dias($DataLimite) != 0){\n $DiasUteis++;\n }\n //$DB->debug=true;\n $sql2 = \"select ADDDATE('\" . substr($DataLimite, 6, 4) .\"-\". substr($DataLimite, 3, 2) .\"-\". substr($DataLimite, 0, 2) . \"',1) as data\";\n\n $rs2 = $DB->Execute($sql2);\n\n $DataLimite = $rs2->fields['data'];\n }\n\n $DataVencimento1 = explode(\"/\", $DataLimite);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if ($verificacao == true) {\n $NaoGeraMultaJuros = 'S';\n }\n }\n\n //{ -- Verifica Condicao X DIAS APÓS -- }\n if (($CondicaoJuros == 'D') and ( $BaseJuros != 'X') and ( $BaseJuros != '')) {\n\n $BaseJurosInt = $BaseJuros;\n $DataLimite = somaData($DataVencimentoMultaJuros, '+', 0, 1, 0);\n $DataLimiteStr = $DataLimite;\n $DataLimite = '01' . substr($DataLimiteStr, 2, 10);\n $DiasUteis = 0;\n while ($DiasUteis < ($BaseJurosInt - 1)) {\n\n //if(verifica_dias(DataLimite)<>0)then\n $DiasUteis++;\n\n //$DB->debug=true;\n $sql2 = \"select ADDDATE('\" . substr($DataLimite, 6, 4) .\"-\". substr($DataLimite, 3, 2) .\"-\". substr($DataLimite, 0, 2) . \"',1) as data\";\n\n $rs2 = $DB->Execute($sql2);\n\n $DataLimite = formata_data($rs2->fields['data']);\n }\n\n $DataVencimento1 = explode(\"/\", $DataLimite);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag) {\n $NaoGeraMultaJuros = 'S';\n }\n }\n }\n\n if ($MensagemDesc > $MensagemAcres) {\n\n $MensagemDesc = $MensagemDesc - $MensagemAcres;\n $MensagemAcres = 0;\n } else {\n $MensagemAcres = $MensagemAcres - $MensagemDesc;\n $MensagemDesc = 0;\n }\n\n if (($MensagemDesc > 0) or ( $MensagemAcres > 0)) {\n\n $valor = $ValorBoleto + $MensagemAcres - $MensagemDesc;\n } else {\n\n $sql2 = \"select multa as Multa, 0 as ValorJuros, 0 AS DiasAtraso,\n parcela as Parcela,now(), prazo_multa as PrazoMulta, data_vencimento as DtVencimento, \njuros as Juros, valor, (case when base_juros is null or base_juros='' then (select base_juros from parametro)\n else base_juros end) as BaseJuros,(case when condicao_juros is null or condicao_juros='' then \n\t(select condicao_juros from parametro) else condicao_juros\n end) as CondicaoJuros from parcelas as v where nosso_numero='\" . $NossoNumeroGeneses . \"'\";\n\n\n $rs2 = $DB->Execute($sql2);\n\n $valor = $rs2->fields['valor'];\n\n if ($NaoGeraMultaJuros == 'N') {\n if ($NossoNumero != '') {\n //$QuantDiasMJ.\" \".$rs2->fields['PrazoMulta'].\" \".$DataVencimentoMultaJuros.\" \".$DataPagamento;\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven < $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n if ($QuantDiasMJ < 0)\n $QuantDiasMJ = $QuantDiasMJ * -1;\n\n if (($QuantDiasMJ > $rs2->fields['PrazoMulta']) and ( $verificacao == true)) {\n $Multa = number_format($rs2->fields['Multa'], 2, '.', '');\n $valor = $valor + $Multa;\n } else {\n $Multa = 0;\n }\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if (($QuantDiasMJ == 0) or ( $verificacao == true)) {\n $Multa = 0;\n $Juros = 0;\n } else {\n if ($QuantDiasMJ > 0) {\n $Juros = number_format(($rs2->fields['Juros'] * ($QuantDiasMJ)), 2, '.', ''); //strtofloat(LValorJuros.Caption);\n if (($rs2->fields['CondicaoJuros'] == 'V') or ( $rs2->fields['CondicaoJuros'] == '')) {\n $valor = $valor + $Juros;\n } else {\n\n $data1 = explode(\"/\", $rs->UserTimeStamp($rs2->fields['DtVencimento']), 'd/m/Y');\n $anoVenc = $data1[2];\n $mesVenc = $data1[1];\n $dia = $data1[0];\n\n $data1 = explode(\"/\", $DataPagamento);\n\n $anoPg = $data1[2];\n $mesPg = $data1[1];\n $dia = $data1[0];\n\n if (($mesVenc < $mesPg) or ( $anoVenc < $anoPg)) {\n $valor = $valor + $Juros;\n } else {\n $Juros = 0;\n }\n }\n }\n }\n }\n }\n }\n } else {\n $valor = 0;\n }\n $retorno = array();\n\n $retorno['ValorMulta'] = number_format($Multa, 2, '.', '');\n $retorno['ValorJuros'] = number_format($Juros, 2, '.', '');\n $retorno['MensagemDesc'] = number_format($MensagemDesc, 2, '.', '');\n $retorno['MensagemAcres'] = number_format($MensagemAcres, 2, '.', '');\n $retorno['MultaRecebido'] = $Multa;\n $retorno['JurosRecebido'] = $Juros;\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven < $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if (($QuantDiasMJ > 0) and ( $verificacao == true))\n $retorno['QtdeDias'] = $QuantDiasMJ . ' depois';\n\n $DataVencimento1 = explode(\"/\", $DataVencimentoMultaJuros);\n $ano_ven = $DataVencimento1[2];\n $mes_ven = $DataVencimento1[1];\n $dia_ven = $DataVencimento1[0];\n\n $DataPagamento1 = explode(\"/\", $DataPagamento);\n $ano_pag = $DataPagamento1[2];\n $mes_pag = $DataPagamento1[1];\n $dia_pag = $DataPagamento1[0];\n\n $verificacao = false;\n if ($ano_ven . $mes_ven . $dia_ven >= $ano_pag . $mes_pag . $dia_pag)\n $verificacao = true;\n\n if ($verificacao) {\n if ($QuantDiasMJ < 0) {\n $QuantDiasMJ = $QuantDiasMJ * (-1);\n }\n $retorno['QtdeDias'] = $QuantDiasMJ . ' antes ';\n }\n if (!$verificacao) {\n if ($QuantDiasMJ < 0) {\n $QuantDiasMJ = $QuantDiasMJ * (-1);\n }\n $retorno['QtdeDias'] = $QuantDiasMJ . ' depois';\n }\n if ($QuantDias == 0)\n $retorno['QtdeDias'] = $QuantDiasMJ;\n\n\n $retorno['valor'] = $valor;\n return $retorno;\n}", "title": "" }, { "docid": "44294b98d64214c144d40e6a623b7497", "score": "0.59966016", "text": "public function calcularDesc(){\n if($this->getAno() <= 2000){ //Carros do ano 2000 ou anteriores recebem 12% de desconto\n $this->setDesc(DESC1);\n }else{ //Carros acima do ano 2000 recebem 7% de desconto\n $this->setDesc(DESC2);\n }\n }", "title": "" }, { "docid": "ad5b0fdfd2ca325009f17702975bf46b", "score": "0.59888273", "text": "function conversorMasa($valor, $simbolo){\n\n if($simbolo==\"lb\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 453.592;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" gr\");\n return $g;\n }\n if($simbolo==\"oz\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 28.3495;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n }\n if($simbolo==\"kg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 1000;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"hg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 100;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"dag\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 10;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo == \"g\"){\n // console.log(\"unidad de medida = \" + simbolo);\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(valor)+\" g\");\n return $valor;\n }\n if($simbolo==\"dg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 0.1;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"cg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 0.01;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n if($simbolo==\"mg\"){\n // console.log(\"unidad de medida = \"+simbolo);\n $g = $valor * 0.001;\n // console.log(valor+\" \"+simbolo+\" = \"+roundToTwo(g)+\" g\");\n return $g;\n } \n}", "title": "" }, { "docid": "f381b309d0bec69edff3fa2f6432b9b4", "score": "0.5984315", "text": "function habiles1($fecha, $adicion, $estado, $radicado, $fecha_p, $dias_p, $estado_p){\n\n$data=split(\"-\",$fecha);\n$e= $data[1].\"-\".$data[2].\"-\".$data[0];\n\nif($estado == 'Acta de Observaciones' || $estado == 'Prorroga' || $estado == 'Acta de Pago' || $estado_p == 'Acta de Pago'){\n\t$descuenta = 0;\n}else{\n\t$descuenta = dias_cate($radicado);\n}\n\n\nif($descuenta > 0){\n\t$descuenta = $descuenta;\n}\n $fechaInicial = mktime(0,0,0,$data[1],$data[2],$data[0]); \n $lapso = $adicion - $descuenta;// dias habiles \n $diasTrans = 0; // dias transcurridos \n $diasHabiles = 0;\n $feriados = array(\"1-1\",\"8-1\",\"19-3\",\"26-3\",\"27-3\",\"28-3\",\"29-3\",\"30-3\",\"1-5\",\"14-5\",\"4-6\",\"11-6\",\"2-7\",\"20-7\",\"7-8\",\"20-8\",\"15-10\",\"5-11\",\"12-11\",\"8-12\",\"25-12\");\n //dias festivos.. DIA-MES\n while($diasHabiles<($lapso+1)) \n { $fecha = $fechaInicial+($diasTrans*86400); \n $diaSemana = getdate($fecha); \n if($diaSemana[\"wday\"]!=0 && $diaSemana[\"wday\"]!=6 && compruebaActos($radicado) == 0) \n { $feriado = $diaSemana['mday'].\"-\".$diaSemana['mon']; \n if(!in_array($feriado,$feriados)) \n { $diasHabiles++; } \n } \n\t if(compruebaActos($radicado) == 1){\n\t \t$diasHabiles++;\n\t }\n $diasTrans++; \n\t \n } \n \n $fechaFinal = $fechaInicial+(($diasTrans-1)*86400); \n $res = fechaLetras(date(\"d/m/Y\",$fechaFinal));\n \n\n//detecta el numero de dias faltantes para la fecha en que vence el plazo del radicado, teniendo en cuenta si este posee acta de observacion, porroga de acta de observacion o resolucion.\nif(date(\"Y/m/d\") > date(\"Y/m/d\",$fechaFinal) ){\n\t$total = \"vencido\";\n\n\tif(buscar_bloqueado($radicado) == 0){\n\t\tif($estado == 'Incompleto' || $estado == 'Acta de Observaciones' || $estado == 'Prorroga' || $estado == 'Acta de Pago' || $estado_p =='Acta de Pago' || $estado == 'ph' || $estado == 'Otras Actuaciones'){\n\t\t\tbloquear_rad($radicado);\n\t\t}\n\t}\n}else{\t \n\t$fecha_fin = date(\"j/n/Y\",$fechaFinal);\n\t$date = explode(\"/\", $fecha_fin);\n\t$cuando = mktime(0,0,0,$date[1],$date[0],$date[2]);\n\t$hoy = time();\n\t$resta = $hoy - $cuando;\n\t$fecha = str_replace(\"-\",\"\",$resta);\n\t$total = floor($fecha/86400);\n\t$total+= 1;\n}\n \n\nif($estado_p == 'Acta de Pago'){\n\t$f_pago = fecha_acta_pago($dias_p, $estado_p, $fecha_p, $radicado);\n}\n\n/*if($estado != 'Incompleto' || $estado != 'Acta de Observaciones' || $estado != 'Prorroga' || $estado != 'Acta de Pago'){\nif(!empty($dias_acta)){\n$fecha_acta = date(\"Y/m/d\",$fechaFinal);\n$new_fecha = date(\"Y-m-d\", strtotime(\"$fecha_acta -$dias_acta day\")); \n//$new_fecha = date(\"d/m/Y\", $new_fecha); \n\nif(date(\"Y/m/d\") < date(\"Y/m/d\", $new_fecha)){\n$dias_res = 'vencido';\n}else{\n$dias_res = $total - $dias_acta.' Dias'; \n}\n}\n}*/\n\nif(!empty($dias_acta)){ $posicion = 'align=\"left\"';}else{ $posicion = 'align=\"center\"';}\n//genera la tabla en donde se mostraran los resultados de la alerta.\n$html ='\n<table border=\"0\" '.$posicion.' class=\"mateTable\">\n <tr align=\"center\" style=\"background:url(../css/images/table_bg.gif)\">\n <td width=\"83\" height=\"17\"><strong>Vencimiento</strong> </td>\n <td width=\"77\"><strong>Faltan</strong></td>';\nif($estado != 'Incompleto'){$html .= '<td width=\"83\"><strong>Estado</strong></td>';}\n$html .= '<td></td>';\n $html .= '</tr> <tr class=\"submenubgd\" bgcolor=\"#FFFFFF\">\n\t\t\t\t <td height=\"29\" align=\"center\">'.$res.'</td> \n\t\t\t\t <td align=\"center\">'.$total.' Dias</td>';\nif($estado != 'Incompleto'){$html .= '<td align=\"center\">'.$estado.'</td>';}\n\t\t\t\t$html .='<td>';\n\t\t\t\t if($total <= 5){ $imagen = \"rojo.gif\";}else{$imagen = \"naranja.gif\";}\n\t\t\t\t $html .= '<img src=\"../imagenes/'.$imagen.' \" width=\"24\" height=\"24\" /></td>';\t\t\t \n$html .='</tr></table>';\n\nif(!empty($fecha_p)){\n$html .='<table width=\"200\" height=\"56\" border=\"0\" align=\"rigth\" class=\"mateTable\">\n <tr align=\"center\" style=\"background:url(../css/images/table_bg.gif)\">\n\t\t\t<td width=\"46\"><strong>Vencimiento</strong></td>';\n $html .=' <td width=\"46\"><strong>Faltan</strong></td>\n \t\t\t<td width=\"83\"><strong>Estado</strong></td>\n\t\t\t<td></td>';\n\n$html .= '<tr class=\"submenubgd\"><td align=\"center\">'.$f_pago[1].'</td>\n\t\t\t\t <td align=\"center\">'.$f_pago[0].' Dias</td>\n\t\t\t\t <td align=\"center\">'.$estado_p.'</td>\n\t\t\t\t <td>'; \n\tif($f_pago[0] <= 5){ $imagen = \"rojo.gif\";}else{$imagen = \"naranja.gif\";}\n\t$html .= '<img src=\"../imagenes/'.$imagen.' \" width=\"24\" height=\"24\" /></td>';\n\t\t$html .= '</tr></table>'; \t\n\t\t\t\t \n\t\t\t\t }\t\t \n\n return $html; //se retorna la tabla con la informacion correspondiente de la alerta.\n\t}", "title": "" }, { "docid": "4648d1e19ee81584ea5bb5bed97ccec7", "score": "0.5983248", "text": "public function calcular_pertenencia($x){\n $a = $this->limite_izquierdo;\n $b = $this->limite_derecho;\n $result;\n\n\n if (($x<$a)or($x>$b)){//el valor esta fuera del triangulo\n return 0;\n }elseif ($x<$this->modal){ //el valor esta en la parte izq del triangulo\n return ($x-$a)/($this->modal-$a);\n }elseif (($x>=$this->modal) and ($this->modal==$b)){ //RINFINITY\n return 1; \n }elseif ($x>=$this->modal){ //el valor esta en la parte derecha del triangulo\n return ($b-$x)/($b-$this->modal);\n };\n }", "title": "" }, { "docid": "952e5ce613afb03686ca891b71138967", "score": "0.59693366", "text": "function precio_final(){\n\t\t\t$valor_final = $this -> precio_base - self :: $ayuda; //Para hacer referencia a una variable estatica.\n\t\t\treturn $valor_final; //Sin el this porque es un campo de metodo y no de clase.\n\t\t}", "title": "" }, { "docid": "5d7f51cde29686c60b896202cf9067a6", "score": "0.5960839", "text": "function cadastro_162(){\n\n global $pessoal, $Ipessoal,$cfpess,$afasta,$pontocom,$mdabo, $debug;\n global $protelac,$Iprotelac,$assenta;\n global $rubricas, $pontofx; \n global $m_rubr,$qten,$vlrn,$m_media,$quants ,$quantd,$m_valor,$m_quant;\n global $nsaldo, $nabono, $dias_adi,$nsaldo_anterior;\n global $r30_perai,$ponto,$r30_peraf, $r30_faltas, $r30_peri,$r30_perf, $mtipo, $nsaldo_anterior;\n global $r30_ndias, $cadferia, $r30_peri,$r30_perf, $mpsal,$r30_regist;\n global $subpes,$subpes_pagamento;\n global $cter, $nsalar, $paga_13, $mpsal;\n global $subpes, $matriz1, $matri2,$subpes_ofi;\n global $ndias, $pontofs;\n global $cfpess,$max,$matric,$navos,$d08_carnes,$indano,$indmes,$subpes_ant;\n global $r30_periodolivreinicial_dia, $r30_periodolivreinicial_mes, $r30_periodolivreinicial_ano, $r30_periodolivreinicial;\n global $r30_periodolivrefinal_dia, $r30_periodolivrefinal_mes, $r30_periodolivrefinal_ano, $r30_periodolivrefinal,$r30_tipoapuracaomedia;\n \n $d08_carnes = strtolower(trim($d08_carnes)); \n db_selectmax(\"cfpess\",\"select * from cfpess where r11_anousu=\".db_substr($subpes,1,4).\" and r11_mesusu=\".db_substr($subpes,-2).\" and r11_instit = \".db_getsession(\"DB_instit\"));\n $sDataPeriodoInicial = $r30_perai; \n $sDataPeriodoFinal = $r30_peraf; \n $subpes_ofi = $subpes ;\n \n if (isset($r30_periodolivrefinal) && $r30_periodolivrefinal != \"\") {\n $r30_peraf = implode(\"-\", array_reverse(explode(\"/\", $r30_periodolivrefinal)));\n }\n if (isset($r30_periodolivreinicial) && $r30_periodolivreinicial != \"\") {\n $r30_perai = implode(\"-\", array_reverse(explode(\"/\", $r30_periodolivreinicial)));\n }\n $m_rubr = array();\n $m_quant= array();\n $m_valor= array();\n $m_media= array();\n $m_tipo = array();\n $qten = array();\n $vlrn = array();\n \n if( db_substr($subpes,6,2) == \"12\"){\n $subtem = db_str(db_val(db_substr($subpes,1,4))+1,4).\"/01\";\n }else{\n $subtem = db_substr($subpes,1,4).\"/\".db_str(db_val(db_substr($subpes,6,2))+1,2,0,\"0\");\n }\n $datlgo = db_str(ndias( db_substr($subtem,6,2).\"/\".db_substr($subtem,1,4) ),2,0,\"0\").\"/\".db_substr($subtem,6,2).\"/\".db_str( db_val( db_substr($subtem,1,4) ) ,4,0,\"0\");\n $datlgo = date(\"Y-m-d\",db_mktime(db_ctod($datlgo)) + (60*86400));\n $datigo = db_ctod(\"01/\".db_substr($subpes,6,2).\"/\".db_str(db_val(db_substr($subpes,1,4)),4,0,\"0\"));\n \n\n\n $matric = $r30_regist;\n \n// $condicaoaux = \" and r01_regist = \".db_sqlformat( $matric );\n// db_selectmax( \"pessoal\", \"select * from pessoal \".bb_condicaosubpes( \"r01_\" ).$condicaoaux ); \n \n $campos_pessoal = \"RH02_ANOUSU as r01_anousu, \n RH02_ANOUSU as r01_mesusu, \n RH01_REGIST as r01_regist,\n RH01_NUMCGM as r01_numcgm, \n trim(TO_CHAR(RH02_LOTA,'9999')) as r01_lotac,\n RH01_ADMISS as r01_admiss, \n RH05_RECIS as r01_recis, \n RH02_tbprev as r01_tbprev,\n RH30_REGIME as r01_regime, \n RH30_VINCULO as r01_tpvinc,\n RH02_salari as r01_salari,\n RH03_PADRAO as r01_padrao,\n RH02_HRSSEM as r01_hrssem,\n RH02_HRSMEN as r01_hrsmen, \n RH01_NASC as r01_nasc,\n rh65_rubric as r01_rubric, \n rh65_valor as r01_arredn,\n RH02_EQUIP as r01_equip,\n RH01_PROGRES as r01_anter, \n RH01_TRIENIO as r01_trien, \n (case when RH01_PROGRES IS NOT NULL then 'S' else 'N' end) as r01_progr, \n RH15_DATA as r01_fgts,\n RH05_CAUSA as r01_causa, \n RH05_CAUB as r01_caub, \n RH05_MREMUN as r01_mremun,\n RH01_FUNCAO as r01_funcao,\n RH01_CLAS1 as r01_clas1,\n RH01_CLAS2 as r01_clas2,\n RH02_TPCONT as r01_tpcont,\n RH02_OCORRE as r01_ocorre, \n rh51_b13fo as r01_b13fo, \n rh51_basefo as r01_basefo,\n rh51_descfo as r01_descfo, \n rh51_d13fo as r01_d13fo,\n RH02_TIPSAL as r01_tipsal,\n RH19_PROPI as r01_propi ,\n rh01_depirf as r01_depirf, \n rh01_depsf as r01_depsf\";\n\n $condicaoaux = \" and rh01_regist = \".db_sqlformat( $matric );\n db_selectmax(\"pessoal\", \"select \".$campos_pessoal.\" from rhpessoalmov \n inner join rhpessoal on rhpessoal.rh01_regist = rhpessoalmov.rh02_regist\n inner join rhlota on rhlota.r70_codigo = rhpessoalmov.rh02_lota\n\t\t\t\t\t\t\t\t\t\t\t and rhlota.r70_instit = rhpessoalmov.rh02_instit \n inner join cgm on cgm.z01_numcgm = rhpessoal.rh01_numcgm\n left join rhpesrescisao on rhpesrescisao.rh05_seqpes = rhpessoalmov.rh02_seqpes \n left join rhpespadrao on rhpespadrao.rh03_seqpes = rhpessoalmov.rh02_seqpes\n left join rhregime on rhregime.rh30_codreg = rhpessoalmov.rh02_codreg \n\t\t\t\t\t\t\t\t\t\t\t and rhregime.rh30_instit = rhpessoalmov.rh02_instit \n left join rhpesrubcalc on rhpesrubcalc.rh65_seqpes = rhpessoalmov.rh02_seqpes \n left join rhpesfgts on rhpesfgts.rh15_regist = rhpessoalmov.rh02_regist\n left join tpcontra on tpcontra.h13_codigo = rh02_tpcont \n left join rhinssoutros on rh51_seqpes = rh02_seqpes \n left join rhpesprop on rh19_regist = rh02_seqpes\n \".bb_condicaosubpes(\"rh02_\" ).$condicaoaux );\n\n $mdabo = false;\n $mpsal = true;\n $cter = \" \";\n \n// Inicio do Bloco que Carrega os dados para calcular as media\n \n \n global $anopagto, $mespagto; \n//echo \"<BR> 0 subpes --> $subpes\"; \n//echo \"<BR> anopagto --> $anopagto\"; \n//echo \"<BR> mespagto --> $mespagto\"; \n $subpes_pagto = $subpes;\n $subpes = db_str($anopagto,4).\"/\".db_str($mespagto,2,0,\"0\");\n//echo \"<BR> 1 subpes --> $subpes\"; \n $subpes_pagamento = db_str($anopagto,4).\"/\".db_str($mespagto,2,0,\"0\");\n//echo \"<BR> subpes_pagamento --> $subpes_pagamento\"; \n $mes_ano = db_str($mespagto,2,0,\"0\") . \"/\" . db_str($anopagto,4);\n $subpes = $subpes_pagto;\n//echo \"<BR> 1 subpes --> $subpes\";\n\n if($debug == true){\n echo \"Chamando a função limpa_ponto_ferias():<br>\";\n }\n limpa_ponto_ferias();\n if($debug == true) {\n echo \"Fim da chamada da função limpa_ponto_ferias()<br>\";\n }\n \n $max = 0;\n \n $qten[0]= 1;\n $vlrn[0]= 1;\n \n $indano = db_year($r30_perai);\n $indmes = db_month($r30_perai);\n $mes_ano = db_str( db_month($r30_perai ) ,2,0,\"0\") . \"/\" . db_str( db_year($r30_perai ),4);\n//echo \"<BR> if( ( (\".ndias( $mes_ano ).\" - \".db_day($r30_perai).\" ) < 15 ) || ( $indmes == 2 && \".db_day( $r30_perai ).\" == 15 ) )\";\n if( ( ( ndias( $mes_ano ) - db_day($r30_perai) ) < 15 ) || ( $indmes == 2 && db_day( $r30_perai ) == 15 ) ){\n $indmes++;\n if( $indmes > 12){\n $indmes = 01;\n $indano++;\n }\n }\n $subpes_ant = $subpes;\n \n if($debug == true){\n echo \"Chamando a função levanta_ponto():<br>\";\n } \n levanta_ponto();\n if($debug == true){\n echo \"Fim da chamanda da função levanta_ponto()<br>\";\n } \n\n// Fim do Bloco que Carrega os dados para calcular as media\n \n if( trim( $d08_carnes ) == \"carazinho\" && $pessoal[0][\"r01_regime\"] != 2 ){\n horasextrascarazinho();\n }\n// if( trim( $d08_carnes ) == \"guaiba\" ){\n// horasextrasguaiba();\n// }\n// //echo \"<BR> 1 nsaldo --> $nsaldo\"; \n $subant = $subpes; \n $subpes = $subpes_ant;\n\n if($debug == true){\n echo \"Chamando a função acrescentapontofx():<br>\";\n } \n acrescentapontofx();\n if($debug == true){\n echo \"Fim da chamanda da função acrescentapontofx():<br>\";\n } \n\n $nsaldo_anterior = $nsaldo;\n $dias_adi = 0;\n if(db_year($r30_peri) > $anopagto || (db_month($r30_peri) > $mespagto && db_year($r30_peri) == $anopagto ) ){\n if( strtolower($cfpess[0][\"r11_fersal\"]) == 'f' && !db_boolean($cfpess[0][\"r11_recalc\"]) ){\n $dias_adi = 0;\n $nsaldo = $nsaldo;\n }else {\n $dias_adi = $nsaldo;\n $nsaldo = 0;\n }\n //echo \"<BR> 2 nsaldo --> $nsaldo\"; \n }else{\n if((db_month($r30_perf) > db_month($r30_peri) && db_year($r30_peri) == db_year( $r30_perf ) ) \n || db_year($r30_perf) > db_year( $r30_peri ) ){\n\t // ver mod abaixo\n if( ( db_year( $r30_peri )%4 ) != 0 && db_month($r30_peri) == 1 && db_day($r30_peri) == 31 && db_month($r30_perf) == 3 ){\n //echo \"<BR> 3 nsaldo --> $nsaldo\"; \n $nsaldo = 1;\n $dias_adi = 29;\n }else{\n if( !( strtolower($cfpess[0][\"r11_fersal\"]) == 's' && !db_boolean($cfpess[0][\"r11_recalc\"]) )){\n //echo \"<BR> 4 nsaldo --> $nsaldo\"; \n $dias_adi = db_datedif($r30_perf,db_substr($r30_perf,1,8).\"01\")+1;\n//echo \"<BR> $dias_adi = db_datedif($r30_perf,\".db_substr($r30_perf,1,8).\"01) + 1\";\n $nsaldo -= $dias_adi;\n }\n }\n }\n }\n\n//echo \"<BR> nsaldo_anterior --> $nsaldo_anterior nsaldo --> $nsaldo dias_adi --> $dias_adi\";\n if( db_substr($subpes_ant,6,2) == \"02\" && db_month($r30_peri) == 2 && $mtipo == \"01\" && !db_boolean($cfpess[0][\"r11_recalc\"]) ){\n $nsaldo = 30;\n $dias_adi = 0;\n }\n \n if ($debug == true) {\n echo \"Chamando a função avalia_ponto(12):<br>\";\n }\n avalia_ponto(12);\n if ($debug == true) {\n echo \"FIM da chamada da função avalia_ponto(12)<br><br>\";\n }\n\n if ($debug == true) {\n echo \"Chamando a função limpaAjustesIrrfPreviden():<br>\";\n }\n limpaAjustesIrrfPreviden();\n if ($debug == true) {\n echo \"FIM da chamada da função limpaAjustesIrrfPreviden()<br><br>\";\n } \n \n if ($debug == true) {\n echo \"Chamando a função limpsal({$ponto}):<br>\";\n }\n limpsal($ponto);\n if ($debug == true) {\n echo \"FIM da chamada da função limpsal({$ponto})<br><br>\";\n } \n \n if ($debug == true) {\n echo \"<b>Chamando a Função gera_ponto_salario('n'): </b><br>\";\n }\n gera_ponto_salario(\"n\");\n $subpes = $subpes_ant;\n \n if ($debug == true) {\n echo \"<br><b>Ponto de salário:</b>\";\n db_criatabela(db_query(\"select * from pontofs where r10_regist = 10366 and r10_anousu = 2011 and r10_mesusu = 12\"));\n echo \"<br><b>FIM da chamada da função gera_ponto_salario('n')</b> <br><br>\";\n } \n \n $r30_perai = $sDataPeriodoInicial;\n $r30_peraf = $sDataPeriodoFinal;\n \n if ($debug == true) {\n echo \"Chamando a Função: grava_cadferia()<br>\";\n }\n\n grava_cadferia();\n $subpes = $subpes_pagto;\n if ($debug == true) {\n echo \"FIM da chamada da função grava_cadferia()<br><br>\";\n }\n\n }", "title": "" }, { "docid": "70ccaecfb5f7252426a6eebc4335dae3", "score": "0.5959327", "text": "function calendrier_echelle($debut, $fin, $echelle)\n{\n if ($echelle==0) $echelle = DEFAULT_D_SCALE;\n if ($fin <= $debut) $fin = $debut +1;\n\n $duree = $fin - $debut;\n $dimheure = floor((3600 / $echelle));\n return array($dimheure,\n\t (($duree+2) * $dimheure),\n\t floor (14 / (1+($echelle/240))),\n\t floor(240 / $echelle));\n}", "title": "" }, { "docid": "99e48cc635fffc61b1efd95178705ce9", "score": "0.5958523", "text": "public function tiempoOpe(){\r\n\t \t$fechaFormat = $this->fechaProg;\r\n\t\t\r\n\t\t/*\r\n\t\t * SUMAMOS EL TIEMPO DE OPERACION + FECHA A PROGRAMAR = FECHA Y HORA FIN DE PROGRAMACION\r\n\t\t * PARA COMENZAR UNA NUEVA OPERACION DEBE HABER TERMINADO LA ANTERIOR\r\n\t\t */\t\t \r\n\t\t$fechaFinSinRef = array();\t\r\n\t\t\r\n\t\t//VARIABLE AUXILIAR PARA NO MODIFICAR EL OBJETO ORIGINAL\r\n\t\t$inicioAux = \\DateTime::CreateFromFormat('Y-m-d H:i:s', $fechaFormat->format('Y-m-d H:i:s'));\t\r\n\t\t\t\t\t\r\n\t\tfor($i=0; $i<$this->cantOpe; $i++){\r\n\t\t\tif($i==0){\r\n\t\t\t\t//LA PRIMER OPERACION COMIENZA POR DEFECTO EN LA FECHA A PROGRAMAR A LAS 6 AM.\r\n\t\t\t\t$this->fechaInicio[$i] = \\DateTime::CreateFromFormat('Y-m-d H:i:s', $fechaFormat->format('Y-m-d H:i:s'));\t\t\t\t\r\n\t\t\t\t//MOMENTO EN QUE TERMINA LA OP. SIN CONTEMPLAR LA JORNADA LABORAL\r\n\t\t\t\t$this->fechaFin[$i] = $inicioAux->setTime($this->horaTotalOpe[$i] + $fechaFormat->format('H'), $this->minTotalOpe[$i] + $fechaFormat->format('i'), $this->segTotalOpe[$i] + $fechaFormat->format('s'));\r\n\t\t\t\t$segundosOpe = $this->horaTotalOpe[$i] * 60 * 60 + $this->minTotalOpe[$i] * 60 + $this->segTotalOpe[$i];\t\r\n\t\t\t\t\r\n\t\t\t\t//INTERVALOS DE JORNADAS LABORALES\t\t\t\r\n\t\t\t\t$int = $this->intervalosAjuste($segundosOpe, $this->fechaInicio[$i]);\t\t\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//FIN DE LA OPERACION SIN CONSIDERAR LOS REFRIGERIOS\t\t\t\t\r\n\t\t\t\t$fechaFinSinRef = \\DateTime::CreateFromFormat('Y-m-d H:i:s', $this->fechaFin[$i]->format('Y-m-d H:i:s'));\r\n\t\t\t\t$fechaFinSinRef->setTime($this->fechaFin[$i]->format('H') + $int, $this->fechaFin[$i]->format('i'), $this->fechaFin[$i]->format('s'));\r\n\t\t\t\t\r\n\t\t\t\t//AJUSTE SEGUN LOS MINUTOS DE REFRIGERIO\r\n\t\t\t\t$refrigerio = $this->intervalosRefrigerio($segundosOpe, $this->fechaInicio[$i], $fechaFinSinRef);\t\t\t\t\r\n\t\t\t\t$this->fechaFin[$i]->setTime($fechaFinSinRef->format('H') + $int, $fechaFinSinRef->format('i') + $refrigerio, $fechaFinSinRef->format('s'));\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t//AJUSTE POS REFRIGERIO\r\n\t\t\t\t$this->ajustePosRefrigerio($fechaFinSinRef, $i);\t\r\n\t\t\t\t\r\n\t\t\t\t//AJUSTE FECHA FIN\r\n\t\t\t\t$this->ajusteFechaFin($i);\t\t\r\n\t\t\t}else{\r\n\t\t\t\t$auxFin = array();\t\t\t\t\r\n\t\t\t\t$this->fechaInicio[$i] = \\DateTime::CreateFromFormat('Y-m-d H:i:s', $this->fechaFin[$i-1]->format('Y-m-d H:i:s'));\r\n\t\t\t\t$segundosOpe = $this->horaTotalOpe[$i] * 60 * 60 + $this->minTotalOpe[$i] * 60 + $this->segTotalOpe[$i];\t\t\r\n\t\t\t\t\r\n\t\t\t\t//INTERVALOS DE JORNADAS LABORALES\t\t\t\t\t\t\r\n\t\t\t\t$int = $this->intervalosAjuste($segundosOpe, $this->fechaInicio[$i]);\t\t\t\t\r\n\t\t\t\t$auxFin[$i] = \\DateTime::CreateFromFormat('Y-m-d H:i:s', $this->fechaInicio[$i]->format('Y-m-d H:i:s'));\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//FIN DE LA OPERACION SIN CONSIDERAR LOS REFRIGERIOS\r\n\t\t\t\t$fechaFinSinRef = $auxFin[$i]->setTime($auxFin[$i]->format('H') + $this->horaTotalOpe[$i] + $int, $auxFin[$i]->format('i') + $this->minTotalOpe[$i], $auxFin[$i]->format('s') + $this->segTotalOpe[$i]);\r\n\t\t\t\t\r\n\t\t\t\t//AJUSTE SEGUN LOS MINUTOS DE REFRIGERIO\t\t\t\t\r\n\t\t\t\t$refrigerio = $this->intervalosRefrigerio($segundosOpe, $this->fechaInicio[$i], $fechaFinSinRef);\r\n\t\t\t\t\r\n\t\t\t\t$this->fechaFin[$i] = \\DateTime::CreateFromFormat('Y-m-d H:i:s', $fechaFinSinRef->format('Y-m-d H:i:s'));\r\n\t\t\t\t$this->fechaFin[$i]->setTime($fechaFinSinRef->format('H'), $fechaFinSinRef->format('i') + $refrigerio, $fechaFinSinRef->format('s'));\r\n\t\t\t\t\t\r\n\t\t\t\t//AJUSTE POS REFRIGERIO\r\n\t\t\t\t$this->ajustePosRefrigerio($fechaFinSinRef, $i);\r\n\t\t\t\t\r\n\t\t\t\t//AJUSTE FECHA FIN\r\n\t\t\t\t$this->ajusteFechaFin($i);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\t\t\r\n\t\t\r\n\t\t//GUARDA EL RETORNO\r\n\t\t$resp = array(\r\n\t\t\t'fechaInicio' => $this->fechaInicio,\r\n\t\t\t'fechaFin' => $this->fechaFin\r\n\t\t);\r\n\t\t\r\n\t\treturn $resp;\r\n\t }", "title": "" }, { "docid": "a41208a11819b37b8cc881f2ed80baba", "score": "0.59340024", "text": "public function suma_peso_elemento(){\n\n\n\t\t$tabla=\"elemento\";\n\t\t$miligramos = 0;\n\t\t$gramos = 0;\n\t\t$calorias = 0;\n\t\t$kilogramo = 0;\n\t\t$kilo=0;\n\n\t\t$datos = usuariosModel::seleccionar_medida_model($tabla);\n\t\tforeach ($datos as $dato ) {\n\n\t\t\tswitch ($dato[\"unidPe\"]) {\n\t\t\t\tcase 'mg':\n\n\t\t\t\t$miligramos= $miligramos + $dato[\"peso\"];\n\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'g':\n\n\t\t\t\t$gramos = $gramos + $dato[\"peso\"] ;\n\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'kg':\n\n\t\t\t\t$kilo = $kilo + $dato[\"peso\"] ;\n\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\techo \"unidad no permitidad\";\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t$calorias= $calorias + $dato[\"caloria\"];\n\n\n\n\t\t}\n\n\t\t$miliagramo = $miligramos / 1000;\n\t\t$gramoakilo = $miliagramo /1000;\n\t\t$gramosakilo = $gramos / 1000;\n\n\t\t$kilogramo = $gramoakilo + $gramosakilo;\n\t\t$totalKilo= $kilogramo +$kilo;\n\n\t\t$totalKilo=number_format((float)$totalKilo, 2, '.', '');\n\n\t\techo ' \n\t\t<td>'.$calorias.'</td>\n\t\t<td>'.$miligramos.'</td>\n\t\t<td>'.$gramos.'</td>\n\t\t<td>'.$totalKilo.'</td>\n\t\t';\n\n\t}", "title": "" }, { "docid": "42b147a1035e8063a5b6faa805cb46e9", "score": "0.5933159", "text": "public function calcularlineamontecarlo(Request $request)\n {\n $tabla_pro_llegada = [];\n // crear una variable acumuladora que ira acumulando los valores de la probabilidad acumulada\n $acumulador_pro_lle = 0;\n // esta variable lo que hace es Acumular los rangos menores de la tabla\n $acumulador_rango_menor = 0;\n // se genera un bucle dependiendo del numero de probabilidades y valores que contendran la tabla de llegada\n for ($i=0; $i < count($request->valor1); $i++) { \n // en el arreglo multidimensional se guarda en la posicion i0 el valor de la llegada\n $tabla_pro_llegada[$i][0] = $request->valor1[$i];\n // en el arreglo multidimensional se guarda en la posicion i1 el valor de la probabilidad\n $tabla_pro_llegada[$i][1] = $request->probabilidad1[$i];\n // se hace uso de la variable acumuladora para la probabilidad acumulada\n $acumulador_pro_lle = $acumulador_pro_lle + $request->probabilidad1[$i];\n // en la posicion i2 se guarda la probabilidad acumulada\n $tabla_pro_llegada[$i][2] = $acumulador_pro_lle;\n // en la posicion i3 se guarda el rango menor y se redondea a tres decimales por medio de la funcion round\n $tabla_pro_llegada[$i][3] = round($acumulador_rango_menor,3);\n // se actualiza el acumulador aumentandole 0.001 para el rango\n $acumulador_rango_menor = round($acumulador_pro_lle,3) + 0.001;\n // en la posicion i4 del arreglo se guarda el rango mayor\n $tabla_pro_llegada[$i][4] = $acumulador_pro_lle;\n }\n\n /*Este proceso es el mismo que el anterior, la diferencia es que se genera para los tiempos de servicios*/\n $tabla_pro_servicio = [];\n // Crear tabla de probabilidad de Servicios\n $acumulador_pro_ser = 0;\n $acumulador_rango_menor_ser = 0;\n for ($i=0; $i < count($request->valor2); $i++) { \n $tabla_pro_servicio[$i][0] = $request->valor2[$i];\n $tabla_pro_servicio[$i][1] = $request->probabilidad2[$i];\n $acumulador_pro_ser = $acumulador_pro_ser + $request->probabilidad2[$i];\n $tabla_pro_servicio[$i][2] = $acumulador_pro_ser;\n $tabla_pro_servicio[$i][3] = round($acumulador_rango_menor_ser,3);\n $acumulador_rango_menor_ser = round($acumulador_pro_ser,3) + 0.001;\n $tabla_pro_servicio[$i][4] = $acumulador_pro_ser;\n }\n\n // Se crea un arreglo que sera multidimensional para almacenar los resultados de la simulacion\n $tabla_calculada = [];\n // Esta variabe sera util para identificar el numero de fila\n $contador_res = 1;\n // esta es la hora de llegada exacta que se inicializa con cero\n $hora_llegada_exacta = 0;\n // al igual que la llegada exacta el fin de servicio tambien se inicializa con cero\n $hora_fin_servicio = 0;\n // Se realiza el bucle la cantidad de veces de numeros aleatorios enviados\n for ($i=0; $i < count($request->aleatorio_llegada); $i++) { \n // en la posicion i0 del arreglo se guarda el numero de fila\n $tabla_calculada[$i][0] = $contador_res;\n // en la posicion i1 del arreglo se guarda el aleatorio de llegada\n $tabla_calculada[$i][1] = $request->aleatorio_llegada[$i];\n // en la posicion i2 del arreglo se guarda el aleatorio de servicio\n $tabla_calculada[$i][2] = $request->aleatorio_servicio[$i];\n $t_entre_llegadas = buscar_en_pro($tabla_pro_llegada, $request->aleatorio_llegada[$i]);\n $tabla_calculada[$i][3] = $t_entre_llegadas;\n $t_servicio = buscar_en_pro($tabla_pro_servicio, $request->aleatorio_servicio[$i]);\n $tabla_calculada[$i][4] = $t_servicio;\n $tabla_calculada[$i][5] = $hora_llegada_exacta + $tabla_calculada[$i][3];\n $hora_llegada_exacta = $hora_llegada_exacta + $tabla_calculada[$i][3];\n $tabla_calculada[$i][6] = maximo($tabla_calculada[$i][5],$hora_fin_servicio);\n $hora_fin_servicio = $tabla_calculada[$i][6] + $tabla_calculada[$i][4];\n $tabla_calculada[$i][7] = $hora_fin_servicio;\n $tabla_calculada[$i][8] = $tabla_calculada[$i][6] - $tabla_calculada[$i][5];\n $tabla_calculada[$i][9] = $tabla_calculada[$i][8] + $tabla_calculada[$i][4];\n $contador_res = $contador_res + 1;\n }\n\n return view('desnudas.lineaesperamontecalo',compact('tabla_pro_llegada','tabla_pro_servicio','tabla_calculada'));\n }", "title": "" }, { "docid": "fbf74eb8d2f77f60e71c220d3e95d096", "score": "0.59220296", "text": "public function imc(){\n return $this ->peso / ($this->altura * $this->altura);\n}", "title": "" }, { "docid": "cc49f8b2c577fd6608d97bac3ca7f9ba", "score": "0.5919784", "text": "public function getTotalRemain();", "title": "" }, { "docid": "c618a23eea5e8de9e8f2209ff490c1dc", "score": "0.59190637", "text": "protected function total_segun_fechas($id_institucion, $fecha)/*Precio total segun fecha*/\n {\n $traer = \\DB::table('detalle_carros')\n ->select(\\DB::raw('sum(detalle_carros.cantidad * detalle_carros.precio_actual ) as total'))\n ->join('venta-producto','venta-producto.id_carro','=','detalle_carros.id_carro')\n ->join('productos','productos.id','=','detalle_carros.id_producto')\n ->join('tienda_producto_instituciones','tienda_producto_instituciones.id_producto','=','productos.id')\n ->join('tiendas_instituciones','tiendas_instituciones.id','=','tienda_producto_instituciones.id_tienda')\n ->where('tiendas_instituciones.id_institucion', $id_institucion)\n ->where('venta-producto.fecha', $fecha)\n ->where('venta-producto.id_estado', 3)\n ->first();\n\n return $traer;\n\n }", "title": "" }, { "docid": "21dea55fc15107bd35ee050d85a18b77", "score": "0.59188485", "text": "function cantidad_dias_habiles($fecha1,$fecha2,$sabado,$domingo,$feriado=0) {\n\tglobal $dias_semana;\n \t$contador=array();\n \t$cant=count($dias_semana);\n \tfor($i=0;$i<$cant;$i++) $contador[$dias_semana[$i]]=0; \n \n \t$contador[\"feriados\"]=0;\n \t$dif_dias=0;\n \t$fecha_aux=$fecha1;\n \n \twhile ((compara_fechas(fecha_db($fecha_aux),fecha_db($fecha2))==-1) \n \t\t\t\t|| (compara_fechas(fecha_db($fecha_aux),fecha_db($fecha2))==0)){ //mientras la fecha2 sea mayor que la 1\n \t\t$fecha_split=split(\"/\",$fecha_aux);\n $fecha_dia=date(\"w\",mktime(0,0,0,$fecha_split[1],$fecha_split[0],$fecha_split[2]));\n if ($fecha_dia==0) $id=7;\n else $id=$fecha_dia;\n //si es dia habil, incrementamos la diferencia \n \tif (!$sabado && !$domingo) { //no trabaja sabado ni domingo\n \t\tif((!feriado($fecha_aux) && $fecha_dia!=0 && $fecha_dia!=6) || $feriado) {\n \t\t\tif (feriado($fecha_aux)) $contador[\"feriados\"]++;\n \t $dif_dias++;\n \t$contador[$id]++;\n \t\t}\n \t}elseif ($sabado && !$domingo) { // trabaja sabado y no el domingo\n \tif((!feriado($fecha_aux) && $fecha_dia!=0) || $feriado) {\n \t\tif (feriado($fecha_aux)) $contador[\"feriados\"]++;\n $dif_dias++;\n $contador[$id]++;\n }\n \t}else if ($domingo && !$sabado) {//trabaja domingo y no sabado\n \tif((!feriado($fecha_aux) && $fecha_dia!=6) || $feriado) {\n \t\tif (feriado($fecha_aux)) $contador[\"feriados\"]++;\n $dif_dias++;\n $contador[$id]++;\n \t}\n \t} else { //trabaja sabado y domingo\n \tif(!feriado($fecha_aux) || $feriado) {\n \t\tif (feriado($fecha_aux)) $contador[\"feriados\"]++;\n $dif_dias++;\n $contador[$id]++;\n \t}\n \t}\n\t $contador[0]=$dif_dias;//cantidad de dias habiles\n \t//incrementamos en un dia la fecha\n \t$fecha_aux=date(\"d/m/Y\",mktime(12,0,0,$fecha_split[1],$fecha_split[0]+1,$fecha_split[2]));\n\t}\n \treturn $contador;\n}", "title": "" }, { "docid": "885574622083e70c28700d6a89965386", "score": "0.5910171", "text": "function calculerPrixTotal ($tabQuantite, $tabPrixUnitaire)\n{\n // ICI IL FAUT AJOUTER LE CODE MANQUANT\n // PRIXTOTAL = 1x10 + 2x20 + 3x30 + 4x40\n // J'AI PARCOURU LES 2 TABLEAUX\n // POUR PRENDRE CHAQUE ELEMENT\n // ET JE MULTIPLIE LES VALEURS => SOUS-TOTAL\n // ET JE RAJOUTE LE SOUS-TOTAL AU TOTAL\n \n // VALEUR INITIALE\n $total = 0;\n\n // J'AI PARCOURU LES 2 TABLEAUX\n // BOUCLE => for\n for ($indice=0; $indice < count($tabPrixUnitaire); $indice++)\n {\n // POUR PRENDRE CHAQUE ELEMENT\n // ET JE MULTIPLIE LES VALEURS => SOUS-TOTAL\n $prixUnitaire = $tabPrixUnitaire[$indice];\n $quantite = $tabQuantite[$indice];\n $sousTotal = $prixUnitaire * $quantite;\n\n // ET JE RAJOUTE LE SOUS-TOTAL AU TOTAL\n $total = $total + $sousTotal; \n }\n\n return $total;\n}", "title": "" }, { "docid": "8be01cb6bcf46de71c9b2872ec1c41d6", "score": "0.59077805", "text": "public function tiempoPromedio($tipo,$fecha1,$fecha2){\n\t\t$total=0;\n\t\t$this->db->db_select('workflow');\n\t\t$data= array();\n\t\t$data['time'] = 0;\n\t\tif ($tipo==1){\n\t\t\t$query_total = \"SELECT AVG(TIME_TO_SEC(TIMEDIFF(fecha_final, fecha_inicio))) as time FROM instancia WHERE (DATE(fecha_inicio) BETWEEN DATE(?) AND DATE(?)) AND (DATE(fecha_final) BETWEEN DATE(?) AND DATE(?))\";\n\t\t\t$sql = $this->db->query($query_total, array($fecha1,$fecha2,$fecha1,$fecha2));\n\t\t\tif($sql -> num_rows() > 0)\n\t {\t\n\t $cant_total = $sql->result_array()[0][\"time\"];\n\t $data['time']=$cant_total;\n\n\t }\n\t\t}\n\t\tif ($tipo==2){\n\t\t\t$query_total = \"SELECT TIME_TO_SEC(TIMEDIFF(pro2.fecha, pro1.fecha)) as time FROM proceso AS pro1 INNER JOIN proceso AS pro2 ON DATE(pro1.fecha)<=DATE(pro2.fecha) WHERE pro1.id_instancia=pro2.id_instancia AND pro1.id_proceso!=pro2.id_proceso AND (DATE(pro1.fecha) BETWEEN DATE(?) AND DATE(?)) AND (DATE(pro2.fecha) BETWEEN DATE(?) AND DATE(?)) GROUP BY pro1.id_proceso\";\n\t\t\t$sql = $this->db->query($query_total, array($fecha1,$fecha2,$fecha1,$fecha2));\n\t\t\tif($sql -> num_rows() > 0)\n\t {\t\n\t $tiempo = $sql->result_array();\n\t $cant = count($tiempo);\t \n \tfor($i=0;$i<count($tiempo);$i++)\n \t{\n \t\t$data['time'] += intval($tiempo[$i]['time']);\n \t}\n \t$data['time'] = $data['time']/$cant;\n \t\n\t }\n\t\t\t\n\t\t}\n $data= $this->convert_seconds(round($data['time'])).\"\\n\";\n return $data;\n\t}", "title": "" }, { "docid": "ea1f36746da465080c1584b01c998811", "score": "0.59037066", "text": "function calcularEdad($fechaCumpleanos){\n\t //fecha actual\n \n\t\t$dia=date(j);\n\t\t$mes=date(n);\n\t\t$ano=date(Y);\n \n\t\t//fecha de nacimiento\n\t\t\n \tlist($anonaz,$mesnaz,$dianaz) = explode(\"-\",$fechaCumpleanos);\n\t\n \n\t\t//si el mes es el mismo pero el día inferior aun no ha cumplido años, le quitaremos un año al actual\n \n\t\tif (($mesnaz == $mes) && ($dianaz > $dia)) {\n\t\t\t$ano=($ano-1); }\n \n \n\t\t//si el mes es superior al actual tampoco habrá cumplido años, por eso le quitamos un año al actual\n \n\t\tif ($mesnaz > $mes) {\n\t\t\t$ano=($ano-1);}\n \n \n\t\t//ya no habría mas condiciones, ahora simplemente restamos los años y mostramos el resultado como su edad\n \n\t\t\t$edad=($ano-$anonaz);\n \n\t\treturn $edad;\n\n}", "title": "" }, { "docid": "ea80c67ba541e24ebfb1b93cddd5ba77", "score": "0.5899868", "text": "function costeCoche($dias_alq) {\n\t\t$alqxdia=40;\n\t\t$coche=$dias_alq*$alqxdia;\n\t\tif ($dias_alq>6) {\n\t\t\t$coche-=50;\n\t\t} else if ($dias_alq>2) {\n\t\t\t$coche-=20;\n\t\t} \n\t\treturn $coche;\n\t}", "title": "" }, { "docid": "a58b139ac427ad3b129fb7b7789b9c7e", "score": "0.589308", "text": "public function getPromedioCalifica($inusuario)\r\n { \r\n try{\r\n $em = $this->getDoctrine()->getManager();\r\n $qs = $em->createQueryBuilder()\r\n ->select('sum(a.incalcalificacion)')\r\n ->from('LibreameBackendBundle:LbCalificausuarios', 'a')\r\n ->Where('a.incalusucalificado = :pusuario')\r\n ->setParameter('pusuario', $inusuario);\r\n $suma = $qs->getQuery()->getSingleScalarResult();\r\n \r\n $qc = $em->createQueryBuilder()\r\n ->select('count(a)')\r\n ->from('LibreameBackendBundle:LbCalificausuarios', 'a')\r\n ->Where('a.incalusucalificado = :pusuario')\r\n ->setParameter('pusuario', $inusuario);\r\n $cant = $qc->getQuery()->getSingleScalarResult();\r\n if($cant == 0)\r\n $promedio = 0;\r\n else \r\n $promedio = $suma / $cant;\r\n //echo \"\\n promedio:\".$promedio;\r\n return $promedio;\r\n } catch (Exception $ex) {\r\n return AccesoController::inDatoCer;\r\n } \r\n }", "title": "" }, { "docid": "123f5869f2dd1cafb15d2ed1f53bd013", "score": "0.58915496", "text": "public function indicadores_de_calidad($opcion = 0,$startDate = null,$endDate = null){\r\n date_default_timezone_set('America/Lima');\r\n $fecha = date(\"d\").\"-\".date(\"m\").\"-\".(date(\"Y\") - 1);\r\n $fecha1 = date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\");\r\n $startDate = ($startDate == null) ? $fecha : $startDate;\r\n $endDate = ($endDate == null) ? $fecha1 : $endDate;\r\n $startDate1 = date_format(date_create($startDate), 'Y-m-d');\r\n $endDate1 = date_format(date_create($endDate), 'Y-m-d');\r\n\r\n switch ($opcion) {\r\n case 0:{\r\n $graficos = $this->Graficos_model->porcentaje_pacientes_retomaron_actividad($startDate1,$endDate1);\r\n $datos['titulo'] = 'Porcentaje de pacientes que retomaron su actividad laboral antes de la ostomía en un tiempo de 3 meses';\r\n $datos['tituloX'] = 'Pacientes que retomaron';\r\n $datos['tituloY'] = 'Pacientes que no retomaron';\r\n break;\r\n }\r\n case 1:{\r\n $graficos = $this->Graficos_model->porcentaje_pacientes_adherencia_autocuidado($startDate1,$endDate1);\r\n $datos['titulo'] = 'Porcentaje de pacientes con adherencia al autocuidado de su ostomía';\r\n $datos['tituloX'] = 'Pacientes con adherencia';\r\n $datos['tituloY'] = 'Pacientes sin adherencia';\r\n break;\r\n }\r\n default:{\r\n $graficos = $this->Graficos_model->porcentaje_pacientes_retomaron_actividad($startDate1,$endDate1);\r\n $datos['titulo'] = 'Porcentaje de pacientes que retomaron su actividad laboral antes de la ostomía en un tiempo de 3 meses';\r\n $opcion = 0;\r\n $datos['tituloX'] = 'Pacientes que retomaron';\r\n $datos['tituloY'] = 'Pacientes que no retomaron';\r\n break;\r\n }\r\n }\r\n $datos['startDate'] = $startDate;\r\n $datos['endDate'] = $endDate;\r\n $datos['posicion'] = $opcion;\r\n $datos['datos'] = $graficos;\r\n $datos['active_view'] = 'graficos';\r\n \r\n $this->load->view('header.php');\r\n $this->load->view('navigation_admin.php', $datos);\r\n $this->load->view('graficos/indicadores_de_calidad.php');\r\n $this->load->view('footer.php');\r\n }", "title": "" }, { "docid": "73b28eb1f6acf6bb6bc568cb9f0685b9", "score": "0.5890528", "text": "function mape($prediksi,$actual){\n $ape = array();\n for($i=0;$i<count($prediksi);$i++){\n $ape[] = abs(round((($actual[$i+12]-$prediksi[$i])/$actual[$i+12])*100,4));\n }\n return round((array_sum($ape)/count($ape)),2);\n }", "title": "" }, { "docid": "2939cd73dfee4387f0c6833f057cdf14", "score": "0.58817637", "text": "function calcularQuincena($fecha){\n\t\t$date = strtotime($fecha);\n\t\t$mes= date(\"m\", $date); // Obtiene el mes de la fecha dada\n\t\t$dia= date(\"d\", $date); // Obtiene el dia de la fecha dada\n\t\treturn $dia<=15? $mes*2-1:$mes*2;\n\t}", "title": "" }, { "docid": "e68bf81db1db0cf4e70fffcce4955c8a", "score": "0.5875542", "text": "function calcular_deducciones($ingresos){\n $deduccion_isss = ISSS::calcular($ingresos);\n $deduccion_afp = AFP::calcular($ingresos);\n \n $deducciones_totales = round($deduccion_afp + $deduccion_isss,2);\n \n $rem_gravada = round($ingresos - $deducciones_totales, 2);\n \n $deduccion_isr = ISR::calcular($rem_gravada,1);\n \n return [\n 'isss' => $deduccion_isss,\n 'afp' => $deduccion_afp,\n 'rem_gravada' => $rem_gravada,\n 'isr' => $deduccion_isr\n ]; \n}", "title": "" }, { "docid": "6dc87580c6abe2f12fa4a6d8b8bb07d5", "score": "0.58710134", "text": "function realizandoOperacionSistema($sistema,$fechaIncio,$fechaFinal){\n principalSistema($sistema,$fechaIncio,$fechaFinal); // PRIMERO CREAMOS LA VISTA EL CUAL SERA CONSUMIDO \n //$preguntas=preguntasMateria(10);\n // $preguntas=preguntasSistema('ORAL');// SIEMPRE MANDARLO EN MAYUSCULAS\n $preguntas=preguntasSistema($sistema);// SIEMPRE MANDARLO EN MAYUSCULAS\n $equals=\"\";\n foreach ($preguntas as $key => $value) {\n if($value['pregunta']!=$equals){\n $equals=$value['pregunta'];\n $Arrayvalor =Array(); $array=Array();\n // $array['datosGenerale']=fintrarPorPregunta($value['pregunta'],10);\n $Arrayvalor=filtrarPorPreguntaSistema($value['pregunta'],' ',' ');\n // print_r($Arrayvalor);\n //$filtratoPorOpcion=filtralPorRespuestaSistema($array['datosGenerales'],$valor['opcion']);\n if($Arrayvalor!='0'){\n $discapacidades=array_column( $Arrayvalor,'discapacidad');\n $etnias=array_column( $Arrayvalor,'etnia');\n $idioma=array_column( $Arrayvalor,'idioma');\n $arrayGenerales['sexo']=array_count_values(array_column( $Arrayvalor,'sexo'));\n // $arrayGenerales['idioma']=array_count_values(array_column( $Arrayvalor,'idioma'));\n// $arrayGenerales['discapacidad']=array_count_values(array_column( $Arrayvalor,'discapacidad'));\n $arrayGenerales['discapacidad']=filtradoGeneralesSistema('discapacidad',$discapacidades,$value['pregunta']);\n $arrayGenerales['etnias']=filtradoGeneralesSistema('etnia',$etnias,$value['pregunta']);\n $arrayGenerales['idiomas']=filtradoGeneralesSistema('idioma',$idioma,$value['pregunta']);\n $arrayGenerales['generos']=array_count_values(array_column( $Arrayvalor,'genero'));\n \n $arrayGenerales['respuesta']=array_count_values(array_column( $Arrayvalor,'respuesta'));\n // print_r($arrayGenerales);\n // print_r($Arrayvalor);\n $array['datosGenerales']=$arrayGenerales;\n\n if($value['identificador']==\"select\"){\n $arrayOpcion=Array();\n $opciones=opcionesPorMateria($value['id_pregunta']);\n foreach ($opciones as $llave => $valor) {\n $filtratoPorOpciones=filtralPorRespuestaSistema($Arrayvalor,$valor['opcion']);\n $filtratoPorOpcion['sexo']=array_count_values(array_column( $filtratoPorOpciones,'sexo'));\n $filtratoPorOpcion['idioma']=array_count_values(array_column( $filtratoPorOpciones,'idioma'));\n $filtratoPorOpcion['discapacidades']=array_count_values(array_column( $filtratoPorOpciones,'discapacidad'));\n $filtratoPorOpcion['etnias']=array_count_values(array_column( $filtratoPorOpciones,'etnia'));\n $valores=$filtratoPorOpcion;\n $arrayOpcion[$valor['opcion']]=$valores;\n } \n $array['opciones']=$arrayOpcion;\n } \n }\n $respuesta[$value['pregunta']]=$array;// SE GUARDA EL VARLOR DE CADA UNO DE LAS PREGUNTAS\n global $respuestaOperacion;\n $respuestaOperacion=$respuesta;// SE GUARDA EL VARLOR DE CADA UNO DE LAS PREGUNTAS\n}//final del if\n}\n}", "title": "" }, { "docid": "3baa3dccbb57ddc778c68e5dc95069bc", "score": "0.58703417", "text": "public function DA_CantidadAutFacturaAvales();", "title": "" }, { "docid": "109d10d402d18f8e65557a82a0a0cd6f", "score": "0.58691716", "text": "public function calculo()\n {\n \n switch ($this->tipo) \n {\n case 'soma':\n $this->soma();\n break;\n case 'subtracao';\n $this->subtracao();\n break;\n case 'divisao';\n $this->divisao();\n break;\n case 'multiplicacao';\n $this->multiplicacao();\n break;\n default:\n echo\"tipo Invalido\";\n break;\n \n \n }\n \n \n }", "title": "" }, { "docid": "b8a081c33e15e53c4f1edde2bc86f7af", "score": "0.58656675", "text": "function calculateTHR()\n {\n $intBRYearLength = getIntervalDate($this->arrData['date_from_thr'], $this->arrData['date_thru_thr']) + 1;\n foreach ($this->arrDetail AS $strIDEmp => $arrInfo) {\n unset($fltProportion);\n $join = ($this->arrEmployee[$strIDEmp]['join_date'] == \"\") ? \"\" : date(\n 'Y-m-d',\n strtotime(\n $this->arrEmployee[$strIDEmp]['join_date']\n )\n );\n if ($join != \"\") {\n $thr = date('Y-m-d', strtotime($this->arrData['date_thru_thr']));\n $thr_year = (int)date(\"Y\", strtotime($thr));\n $thr_month = (int)date(\"m\", strtotime($thr));\n $thr_day = (int)date(\"d\", strtotime($thr));\n $join_year = (int)date(\"Y\", strtotime($join));\n $join_month = (int)date(\"m\", strtotime($join));\n $join_day = (int)date(\"d\", strtotime($join));\n $year_diff = $this->calculateYearDiff($join_year, $thr_year);\n $month_diff = $this->calculateMonthDiff($join_month, $thr_month, $year_diff);\n $day_diff = $this->calculateMonthDiff($join_day, $thr_day);\n }\n //cek masa kerja karyawan dengan acuan tanggal thr..\n if ($this->arrEmployee[$strIDEmp]['join_date'] == \"\" || $this->arrData['date_from_thr'] == \"\" || $this->arrData['date_thru_thr'] == \"\") {\n $fltProportion = 0;\n } elseif ($year_diff >= 2) {\n $fltProportion = 1;\n } //..jika 12 bulan lebih maka menerima 100%\n elseif ($year_diff == 0 || $year_diff == 1) {\n if ($month_diff > 12) {\n $fltProportion = 1;\n } //..jika 12 bulan lebih maka menerima 100%\n elseif ($month_diff == 12) {\n if ($day_diff >= 0) {\n $fltProportion = 1;\n } //..jika 12 bulan lebih maka menerima 100%, dispensasi 2 hari\n else {\n $fltProportion = ($month_diff - 1) / 12;\n }\n } elseif ($month_diff > 3) {\n if ($day_diff >= 0) {\n $fltProportion = $month_diff / 12;\n } else {\n $fltProportion = ($month_diff - 1) / 12;\n } //..jika lebih dari 3 bulan menerima proporsional gaji tetap\n } elseif ($month_diff == 3) {\n if ($day_diff >= 0) {\n $fltProportion = $month_diff / 12;\n } //..jika lebih dari 3 bulan menerima proporsional gaji tetap\n else {\n $fltProportion = 0;\n }\n } else {\n $fltProportion = 0;\n } //..jika di bawah 3 bulan, tidak menerima thr\n }\n if ($this->irregular == 't') {\n $this->arrDetail[$strIDEmp]['thr_allowance'] = $fltProportion * ($this->arrDetail[$strIDEmp]['basic_salary']);\n } else if ($this->irregular == 'f') {\n $this->arrDetail[$strIDEmp]['thr_allowance'] = 0;\n }\n //proses nilai thr_allowance sesuai parameter salary setting\n if (isset($this->arrMA['thr_allowance']['irregular']) && $this->arrMA['thr_allowance']['irregular'] == 't') {\n $this->arrDetail[$strIDEmp]['base_irregular_tax'] += $this->arrDetail[$strIDEmp]['thr_allowance'];\n $this->arrDetail[$strIDEmp]['base_tax'] = 0;\n } else {\n if (isset($this->arrMA['thr_allowance']['tax']) && $this->arrMA['thr_allowance']['tax'] == 't') {\n $this->arrDetail[$strIDEmp]['base_tax'] = $this->arrDetail[$strIDEmp]['thr_allowance'];\n }\n }\n }\n }", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5862279", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "3d1acc77e94166d8d7f0229414edee27", "score": "0.5862279", "text": "function jumlahHalaman($jmldata, $batas){\n$jmlhalaman = ceil($jmldata/$batas);\nreturn $jmlhalaman;\n}", "title": "" }, { "docid": "a0f3da00f4908c1d81c43666ed537dda", "score": "0.5858182", "text": "function imc($peso, $altura) {\n // $altura = floatval($altura_aux);\n\n \n $imc = round($peso / ($altura * $altura));\n //$imc = ($peso / $altura * $altura);\n\n if ($imc < 18.5) {\n // return \"Abaixo do peso! <br> Seu imc é {$imc}.\";\n return \"<h2 class='center red container'>Abaixo do peso! <br> Seu imc é {$imc}.</h2>\";\n }\n if ($imc >= 18.5 && $imc <= 24.5) {\n // return \" Peso normal! <br> Seu imc é {$imc}.\";\n return \"<h2 class='center green container'>Peso normal! <br> Seu imc é {$imc}.</h2>\";\n }\n if ($imc > 24.5 && $imc <= 29.9) {\n //return \"Com excesso de peso! <br> Seu imc é {$imc}.\";\n return \"<h2 class='center yellow container'>Com excesso de peso! <br> Seu imc é {$imc}.</h2>\";\n }\n if ($imc > 29.9 && $imc <= 34.9) {\n // return \"Nível de obesidade! <br> Seu imc é {$imc}.\";\n return \"<h2 class='center orange container'>Nível 1 de obesidade! <br> Seu imc é {$imc}.</h2>\";\n }\n if ($imc > 34.9 && $imc <= 39.9) {\n //return \"Nível de obesidade mórbida! <br> Seu imc é {$imc}.\";\n return \"<h2 class='center red container'>Nível 2 de obesidade mórbida! <br> Seu imc é {$imc}.</h2>\";\n } else{\n return \"<h2 class='center purple darken-4 container'>Nível 3 de obesidade mórbida! <br> Seu imc é {$imc}.</h2>\";\n }\n \n }", "title": "" }, { "docid": "252343d8434dfc951bdbcbe5d9ab9473", "score": "0.58547246", "text": "function procesar_periodo ($periodo){\n $cuatrimestre=array();\n $examen_final=array();\n foreach ($periodo as $clave=>$valor){\n \n switch ($valor['tipo_periodo']){\n case 'Cuatrimestre' : $cuatrimestre=$this->dep('datos')->tabla('asignacion')->get_asignaciones_memo_por_cuatrimestre(utf8_decode($this->s__dia_consulta), $valor['id_periodo'], $this->s__id_sede, $this->s__fecha_consulta);\n \n break;\n \n case 'Examen Final' : //Obtenemos todas las asignaciones por periodo, que estan inluidas en un cuatrimestre,\n //pero que pertenecen a un examen_final\n $examen_final=$this->dep('datos')->tabla('asignacion')->get_asignaciones_memo_por_examen_final(utf8_decode($this->s__dia_consulta), $valor['id_periodo'], $this->s__id_sede, $this->s__fecha_consulta);\n \n break;\n }\n \n }\n \n if((count($cuatrimestre)>0) && (count($examen_final)>0)){\n \n //debemos iniciar descarte y unificacion\n //asig_definitivas = cuatrimestre, asig_periodo = examen final.\n //$this->descartar_asignaciones_definitivas($examen_final, &$cuatrimestre);\n\n $this->unificar_asignaciones(&$examen_final, $cuatrimestre);\n\n return $examen_final;\n \n \n }\n \n if((count($cuatrimestre)>0) && (count($examen_final)==0)){\n \n //--Devolvemos solo cuatrimestre.\n return $cuatrimestre;\n \n \n }\n \n if((count($cuatrimestre)==0) && (count($examen_final)>0)){\n \n //--Devolvemos solo examen final.\n return $examen_final;\n \n }\n \n if((count($cuatrimestre)==0) && (count($examen_final)==0)){\n \n //--Devolvemos vacio.\n return array();\n \n }\n }", "title": "" }, { "docid": "011de171542694aa7e61f723fd41e3f9", "score": "0.5850636", "text": "function cocinar_pago_total($rpt_cocina_pedido = \"\") {\n\n\n\t\tglobal $bd;\n\t\tglobal $x_idpedido;\n\t\tglobal $x_idcliente;\n\t\t\n\t\t\n\t\t$x_array_pedido_header = $_POST['p_header'];\n\t\t$x_array_tipo_pago = $_POST['p_tipo_pago'];\n\t\t$x_array_subtotales=$_POST['p_subtotales'];\n\t\t$x_array_comprobante=$_POST['p_comprobante'];\n\n\t\t$x_array_pedido_header = is_object($x_array_pedido_header) || is_array($x_array_pedido_header) ? $x_array_pedido_header : json_decode($x_array_pedido_header, true);\n\t\t$x_array_tipo_pago = is_object($x_array_tipo_pago) || is_array($x_array_tipo_pago) ? $x_array_tipo_pago : json_decode($x_array_tipo_pago, true);\n\t\t$x_array_subtotales = is_object($x_array_subtotales) || is_array($x_array_subtotales) ? $x_array_subtotales : json_decode($x_array_subtotales, true);\n\t\t$x_array_comprobante = is_object($x_array_comprobante) || is_array($x_array_comprobante) ? $x_array_comprobante : json_decode($x_array_comprobante, true);\n\t\t\n\t\t$id_pedido = $x_idpedido ? $x_idpedido : $x_array_pedido_header['idPedidoSeleccionados'];\n\n\t\t$tipo_consumo = $x_array_pedido_header['tipo_consumo'];\n\t\t$idc=$x_array_pedido_header['idclie'] == ''? ($x_idcliente == '' ? 0 : $x_idcliente) : $x_array_pedido_header['idclie'];\n\t\t// $tt=$x_array_pedido_header['ImporteTotal'];\t\t\n\t\t\n\n\t\t// subtotales\n\t\t$sql_subtotales = '';\n\t\t$importe_total=0; // la primera fila es subtotal o total si no hay adicionales\n\t\t$importe_subtotal = $x_array_subtotales[0]['importe'];\n\t\tforeach ( $x_array_subtotales as $sub_total ) {\n\t\t\t$tachado = isset($sub_total['tachado']) ? $sub_total['tachado'] === \"true\" ? 1 : 0 : 0; \n\t\t\t$importe_row = $tachado === 1 ? $sub_total['importe_tachado'] : $sub_total['importe'];\n\t\t\t$importe_total = number_format((float)$sub_total['importe'], 2, '.', '');\n\t\t\t$importe_row = number_format((float)$importe_row, 2, '.', '');\n\t\t\t$sql_subtotales = $sql_subtotales.\"(?,\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",'\".$sub_total['descripcion'].\"','\".$importe_row.\"',\".$tachado.\"),\";\t\t\t\n\t\t}\n\n\t\t/// buscamos el ultimo correlativo\n\t\t/// buscamos el ultimo correlativo\n\t\t// $correlativo_comprobante = returnCorrelativo($x_array_comprobante);\n\t\t// $correlativo_comprobante = 0; \n\t\t$idtipo_comprobante_serie = $x_array_comprobante['idtipo_comprobante_serie'];\n\t\tif ($x_array_comprobante['idtipo_comprobante'] != \"0\"){ // 0 = ninguno | no imprimir comprobante\n\n\t\t\t\n\t\t// \t$sql_doc_correlativo=\"select correlativo + 1 from tipo_comprobante_serie where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t// \t$correlativo_comprobante = $bd->xDevolverUnDato($sql_doc_correlativo);\t\t\n\t\t\t\n\t\t\t$sql_update_value_correlativo = \"update tipo_comprobante_serie set facturacion_correlativo_api=1 where idtipo_comprobante_serie=\".$idtipo_comprobante_serie;\n\t\t\t$bd->xConsulta_NoReturn($sql_update_value_correlativo);\n\t\t\t\n\t\t// \t\t// $sql_doc_correlativo = \"update tipo_comprobante_serie set correlativo = \".$correlativo_comprobante.\" where idtipo_comprobante_serie = \".$idtipo_comprobante_serie;\n\t\t// \t\t// $bd->xConsulta_NoReturn($sql_doc_correlativo);\t\t\t\n\t\t// } else {\n\t\t// \t$correlativo_comprobante='0';\n\t\t}\n\n\t\t// $sqlrp=\"insert into registro_pago(idorg,idsede,idusuario,idcliente,fecha,total,idtipo_consumo, idtipo_comprobante_serie, correlativo) values (\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",\".$_SESSION['idusuario'].\",\".$idc.\",DATE_FORMAT(now(),'%d/%m/%Y %H:%i:%s'),'\".$importe_total.\"',\".$tipo_consumo.\",\".$idtipo_comprobante_serie.\",'\".$correlativo_comprobante.\"');\";\n\t\t$correlativo_comprobante = '';\t\t\n\t\t$sqlrp=\"insert into registro_pago(idorg,idsede,idusuario,idcliente,fecha,total,idtipo_consumo) values (\".$_SESSION['ido'].\",\".$_SESSION['idsede'].\",\".$_SESSION['idusuario'].\",\".$idc.\",DATE_FORMAT(now(),'%d/%m/%Y %H:%i:%s'),'\".$importe_total.\"',\".$tipo_consumo.\");\";\n\t\t$idregistro_pago=$bd->xConsulta_UltimoId($sqlrp);\n\t\t\n\n \n\t\t//registro tipo de pago // efectivo / tarjeta / etc\n\t\t// si solo tiene un item entonces guarda con la cantidad del total -- para evitar errores\n\t\t$cadena_tp='';\n\t\tif ( count($x_array_tipo_pago) == 1 ) {\n\t\t\t$importe_detalle_pago = $importe_total;\n\t\t\t$idTipoPago = $x_array_tipo_pago[0]['id'];\n\t\t\t$idTipoPago = isset($idTipoPago) ? $idTipoPago : \"1\"; // si es null coloca 1 efectivo\n\t\t\t$cadena_tp=$cadena_tp.\"(\".$idregistro_pago.\",\".$idTipoPago.\",'\".$importe_detalle_pago.\"'),\";\n\t\t} else {\n\t\t\tforeach($x_array_tipo_pago as $item){\n\t\t\t\t$importe_detalle_pago = $item['importe'] == 'NaN' ? $importe_total : $item['importe'];\n\t\t\t\t$idTipoPago = isset($item['id']) ? $item['id'] : \"1\"; // si es null coloca 1 efectivo\n\t\t\t\t$cadena_tp=$cadena_tp.\"(\".$idregistro_pago.\",\".$idTipoPago.\",'\".$importe_detalle_pago.\"'),\";\n\t\t\t}\n\t\t}\n\n $cadena_tp=substr($cadena_tp,0,-1);\n\t\t$cadena_tp=\"insert into registro_pago_detalle (idregistro_pago,idtipo_pago,importe) values \".$cadena_tp.\"; \";\n\t\t// echo $cadena_tp;\n\t\t\n // registro pago pedido - detalle\n\t\t$sql_idpd=\"select idpedido,idpedido_detalle, cantidad,ptotal from pedido_detalle where idpedido in (\".$id_pedido.\") and (estado=0 and pagado=0)\";\n\t\t$rows_pedido_detalle=$bd->xConsulta2($sql_idpd);\n\t\t$sql_pago_pedido='';\n\t\t//echo $sql_idpd;\n\t\tforeach($rows_pedido_detalle as $fila){ // sacamos el idpedido_detalle y los demas datos\n\t\t\t$sql_pago_pedido=$sql_pago_pedido.\"(\".$idregistro_pago.\",\".$fila['idpedido'].\",\".$fila['idpedido_detalle'].\",'\".$fila['cantidad'].\"','\".$fila['ptotal'].\"'),\";\n }\n \n $sql_pago_pedido=substr($sql_pago_pedido,0,-1);\n $sql_pago_pedido='insert into registro_pago_pedido(idregistro_pago,idpedido,idpedido_detalle,cantidad,total) values '.$sql_pago_pedido.'; ';\n\t\t\n\t\t// subtotal // primero se obtiene $idregistro_pago\n\t\t$sql_subtotales = str_replace(\"?\", $idregistro_pago, $sql_subtotales);\n\t\t$sql_subtotales = substr($sql_subtotales,0,-1);\n\t\t$sql_subtotales = 'insert into registro_pago_subtotal (idregistro_pago,idorg,idsede,descripcion,importe,tachado) values '.$sql_subtotales.'; '; \n\t\n\n\t\t// comprobante de pago | datos\n\t\t// $sql_devolver_correlativo = \"update tipo_comprobante_serie set correlativo=correlativo+1 where (idrog=\".$_SESSION['ido'].\" and idsede=\".$_SESSION['ido'].\") and idtipo_comprobante=\".$x_array_comprobante['idtipo_comprobante'].\" and estado=0;\";\n\n\n\t\t// echo $sql_pago_pedido;\n $bd->xConsulta_NoReturn($sql_pago_pedido);\n\t\t$bd->xConsulta_NoReturn($cadena_tp);\n\t\t$bd->xConsulta_NoReturn($sql_subtotales);\n\n\n\t\t// $bd->xMultiConsulta($sql_pago_pedido.$cadena_tp.$sql_subtotales);\n\t\t// echo $cadena_tp;\n\t\t\n\t\t// print $correlativo_comprobante.\"|\";\n\n\t\t// $x_respuesta->b = $correlativo_comprobante;\n\t\t// $x_respuesta = ['correlativo_comprobante' => $correlativo_comprobante];\n\n\t\t\n\n\t\t$x_respuesta = json_encode(array('correlativo_comprobante' => $correlativo_comprobante, 'idregistro_pago' => $idregistro_pago));\n\t\tprint $x_respuesta.'|';\n\n\t\t\n\t\t//+++++ info+++++++++ el update pedido idregistropago es un triggers en la tabla registro_pago_pedido\n\n\t}", "title": "" }, { "docid": "82f0934ea031648bf3efaad1d3c1353d", "score": "0.5849173", "text": "public function calcResultados($conn){\n\t\t\t$this->calcPJ($conn);\n\t\t\t$this->calcPG($conn);\n\t\t\t$this->calcPE($conn);\n\t\t\t$this->calcPP($conn);\n\t\t\t$this->calcGC($conn);\n\t\t\t$this->calcGE($conn);\n\t\t\t$this->calcGA($conn);\n\t\t\t$this->calcPTS($conn);\n\t\t}", "title": "" }, { "docid": "647b95f03e0cb0351d0f0bbaeaf964ce", "score": "0.584686", "text": "public function getPorcentaje($id){\n\t\t$objref = new VehiculoRefaccion();\n\t\t$dataref = $objref->getAllArr($id,false);\n\t\t$objser = new VehiculoServicio();\n\t\t$dataser = $objser->getAllArr($id,false);\n\t\t$cont \t\t = 0;\n\t\t$contterminado= 0;\n\t\tforeach($dataser as $key => $row) {\n\t\t\t$status = htmlentities($row['status']);\n\t\t\tswitch ($status) {\n\t\t\t\tcase 'Realizado': $contterminado++;\tbreak;\n\t\t\t\tdefault: break;\n\t\t\t} \n\t\t\t$cont++;\n\t\t} \n\t\tforeach($dataref as $key => $row) {\n\t\t\t$status = htmlentities($row['status']);\n\t\t\tswitch ($row['status']) {\n\t\t\t\tcase 'Instalado':\n\t\t\t\tcase 'Perdida-daño':\t\t\n\t\t\t\t$contterminado++;\tbreak;\n\t\t\t\tdefault: break;\n\t\t\t} \n\t\t\t$cont++;\n\t\t} \n\t\t\n\t\t$porcent = ($cont && $contterminado) ? ($contterminado*100)/$cont: 0 ;\n\t\t\t\t\n\t\treturn $porcent;\n\t}", "title": "" }, { "docid": "19948c634fc1e67bd425ce1e4634e56e", "score": "0.58349", "text": "function calcul_dates() {\n\t\t//Temps que l'on trouve des algos unitaires on les appliques\n\t\t$liste_algo_tempo = array ();\n\t\t$liste_algo_restant = array ();\n\t\t$flag = true;\n\t\tforeach ( $this->algorythme as $nom_algo => $algo ) {\n\t\t\tif (! is_array ( $algo ))\n\t\t\t\tcontinue;\n\t\t\tif ($flag && $algo [\"type\"] == \"unitaire\")\n\t\t\t\t$liste_algo_tempo [$nom_algo] = $algo;\n\t\t\telse {\n\t\t\t\t//puis des qu'on trouve un algo type \"date\"\n\t\t\t\t$flag = false;\n\t\t\t\t$liste_algo_restant [$nom_algo] = $algo;\n\t\t\t}\n\t\t}\n\t\tif (count ( $liste_algo_tempo ) > 0) {\n\t\t\t$this->setAlgorythme ( $liste_algo_tempo );\n\t\t\t$this->calcul_unitaire ();\n\t\t}\n\t\t//Pour chaque serial, on prend les donnees de \"donnees_calcul\" et \n\t\tforeach ( $this->donnees as $serial => $liste_dates ) {\n\t\t\t$this->donnees_calcul = $liste_dates;\n\t\t\t$this->setAlgorythme ( $liste_algo_restant );\n\t\t\t//on ajoute les donnees resutat s'il y en a \n\t\t\tif (count ( $this->tableau_resultat ) > 0 && isset ( $this->tableau_resultat [$serial] )) {\n\t\t\t\tforeach ( $liste_dates as $date => $valeur ) {\n\t\t\t\t\t$this->donnees_calcul [$date] = $this->concatene_tableau ( $this->donnees_calcul [$date], $this->tableau_resultat [$serial] [$date] );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//puis on applique les algos dans l'ordre d'apparition des algos\n\t\t\t//\n\t\t\t//on applique les algos en fonction de leur type\n\t\t\tforeach ( $this->algorythme as $nom_algo => $algo ) {\n\t\t\t\tif ($algo [\"type\"] != \"date\")\n\t\t\t\t\t$liste_algo_restant_apres_date [$nom_algo] = $algo;\n\t\t\t\telse {\n\t\t\t\t\t$this->calcul_plusieurs_dates ( $nom_algo, $algo );\n\t\t\t\t\t$this->tableau_resultat [$serial] [\"algo_date\"] [$nom_algo] = $this->resultat [$nom_algo];\n\t\t\t\t\t//On re-initialise les variables\n\t\t\t\t\t$this->resultat = array ();\n\t\t\t\t\t//On ajoute le resultat dans les donnees de calcul si elle sont re-utiliser\n\t\t\t\t\t$this->donnees_calcul [\"algo_date\"] [$nom_algo] = $this->tableau_resultat [$serial] [\"algo_date\"] [$nom_algo];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (count ( $liste_algo_restant_apres_date ) > 0) {\n\t\t\t\t$this->setAlgorythme ( $liste_algo_restant_apres_date );\n\t\t\t\t$resultat_en_cours = $this->tableau_resultat;\n\t\t\t\t$this->donnees = array ();\n\t\t\t\t$this->donnees [$serial] [\"algo_date\"] = $this->tableau_resultat [$serial] [\"algo_date\"];\n\t\t\t\t$this->calcul_unitaire ();\n\t\t\t\t$resultat_en_cours [$serial] [\"algo_date\"] = $this->concatene_tableau ( $resultat_en_cours [$serial] [\"algo_date\"], $this->tableau_resultat [$serial] [\"algo_date\"] );\n\t\t\t\t$this->tableau_resultat = $resultat_en_cours;\n\t\t\t}\n\t\t\t//et on stocke le resultat dans un liste de type :\n\t\t\t//[serial]\n\t\t\t//\t[algo_dates]\n\t\t\t//\t\t[algoX]\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "647ec03f2813be9bbd917c13250329ca", "score": "0.583346", "text": "function calPersonalInfo($pinfo_001, $totalMsg){\n \n $val= ($pinfo_001*100)/$totalMsg;\n \n return $val;\n }", "title": "" }, { "docid": "c8d64e8a8fa4d0f09004d2055be30a96", "score": "0.5829008", "text": "function deducible($sueldo, $tipo)\n{\n $porcen = 0; // se crea la variable porcentaje inicializandola en cero\n $smlv = 1014980;\n switch ($tipo) {\n case 'salud':// se coloca el nombre de cada tipo\n $porcen = 0.04; // da el porcentaje de cada una\n break;\n case 'pension':\n $porcen = 0.04;\n break;\n case 'ARL':\n $porcen = 0.005;\n break;\n case 'fps':\n $porcen=0;// se declara de primero para evitar hacer else\n if ($sueldo> ($smlv * 4)) {// si esta regla no se cumple el porcen es igual a cero\n $porcen = 0.01;\n }\n \n break;\n }\n return $sueldo * $porcen; // se devuelve el resultado del salario por porcentaje\n}", "title": "" }, { "docid": "bc29ece12542ef5603b0632956877078", "score": "0.5826013", "text": "function calificaciones(){\n\t\t\t$visitas\t= new VisitasContador();\n\t\t\t// alumno/calificaciones le corresponde el id 4\n\t\t\t$visitas->incrementar(4);\n\t\t\t\n\t\t\t$usuarios = new Usuarios();\n\t\t\t$usuario = $usuarios->find_first(\"registro='\".$this -> registro.\"'\");\n\t\t\t\n\t\t\t$xalumnos = new Xalumnos();\n\t\t\t$xalumno = $xalumnos->find_first(\"registro=\".$this -> registro);\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "8ad399401188cfbbd2e6bf59be34809a", "score": "0.58191776", "text": "public function calculTotaux()\n {\n global $db;\n\n $total_ht=0;\n $total_ttc=0;\n\n $tab=array();\n $tab = $_SESSION['poscart'];\n\n $tab_size=count($tab);\n for($i=0;$i < $tab_size;$i++)\n {\n // Total HT\n $remise = $tab[$i]['remise'];\n $total_ht += ($tab[$i]['total_ht']);\n $total_vat += ($tab[$i]['total_vat']);\n $total_ttc += ($tab[$i]['total_ttc']);\n $total_localtax1 += ($tab[$i]['total_localtax1']);\n $total_localtax2 += ($tab[$i]['total_localtax2']);\n }\n\n $this->prix_total_ttc = $total_ttc;\n $this->prix_total_ht = $total_ht;\n $this->prix_total_vat = $total_vat;\n $this->prix_total_localtax1 = $total_localtax1;\n $this->prix_total_localtax2 = $total_localtax2;\n \n $this->montant_tva = $total_ttc - $total_ht;\n //print $this->prix_total_ttc.'eeee'; exit;\n }", "title": "" }, { "docid": "6aa1cc8e0b259bee73e18750840f5f81", "score": "0.58120835", "text": "function KpiHorasPorEquipe(){\r\n\t\t$sql = \"select to_char(DTH_FIM - DTH_INICIO,'ss') as QTD_SEGUNDOS_DURACAO,\r\n\t\t\t\t\t c.NOM_EQUIPE_TI\r\n\t\t\t\tFROM gestaoti.chamado a, gestaoti.atribuicao_chamado b, gestaoti.equipe_ti c, gestaoti.time_sheet d,gestaoti.equipe_ti e\r\n\t\t\t\twhere a.SEQ_CHAMADO = b.SEQ_CHAMADO\r\n\t\t\t\tand b.SEQ_EQUIPE_TI = c.SEQ_EQUIPE_TI\r\n\t\t\t\tand b.NUM_MATRICULA = d.NUM_MATRICULA\r\n\t\t\t\tand b.seq_equipe_ti = e.seq_equipe_ti\r\n\t\t\t\tand e.seq_central_atendimento = \".$this->SEQ_CENTRAL_ATENDIMENTO.\"\r\n\t\t\t \tand a.DTH_ABERTURA between to_date('\".$this->DTH_INICIO.\" 01:00:00','dd/mm/yyyy hh24:mi:ss')\r\n\t\t\t and to_date('\".$this->DTH_FIM.\" 23:59:59','dd/mm/yyyy hh24:mi:ss') \r\n\t\t\t\torder by NOM_EQUIPE_TI \";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$aDadosAux = array();\r\n\t\t$aNomesAux = array();\r\n\t\t$banco = new chamado();\r\n\t\twhile ($row = pg_fetch_array($this->database->result)){\r\n\t\t\t$aDadosAux[] = $row[0];\r\n\t\t\t$aNomesAux[] = $row[1];\r\n\t\t}\r\n\r\n\t\t$this->dados = array();\r\n\t\t$this->label = array();\r\n\t\t$cont = 0;\r\n\t\t$pagina = new pagina();\r\n\t\tfor($i=0; $i<count($aDadosAux); $i++){\r\n\t\t\tif($pagina->arrayFind($this->label, $aNomesAux[$i]) == 0){\r\n\t\t\t\t$this->label[] = $aNomesAux[$i];\r\n\t\t\t\t$this->dados[] = $aDadosAux[$i];\r\n\t\t\t}else{\r\n\t\t\t\t// Adicionar 1 no ao registro\r\n\t\t\t\tfor($j = 0; $j < count($aNomesAux); $j++){\r\n\t\t\t\t\tif($this->label[$j] == $aNomesAux[$i]){\r\n\t\t\t\t\t\t$this->dados[$j] += $aDadosAux[$j];\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}", "title": "" }, { "docid": "8f30bc931694f48f4c325ae22d0e5d74", "score": "0.5809709", "text": "public function totcalif($anio,$mes,$IDEmpresa,$forma){\n\t\t$sql=$this->db->select('count(*) as total')->where(\"IDEmpresaReceptor='$IDEmpresa' and date(FechaRealizada) between '\".$anio.\"-\".$mes.\"-01' and '\".$anio.\"-\".$mes.\"-31' and Status='Activa' and Emitidopara='$forma' group by IDEmpresaReceptor\")->get('tbcalificaciones');\n\t\tif($sql->num_rows()===0){\n\t\t\t$calificaciones=0;\n\t\t}else{\n\t\t\t$calificaciones=$sql->result()[0]->total;\n\t\t}\n\t\treturn $calificaciones;\n\t}", "title": "" } ]
ef73a8e2813e81e425dadd09f2fa5cd4
Description : This function is used to eidt the procedure for the patient
[ { "docid": "4df33fb17d6de1fcaabe5c3f478befae", "score": "0.56080055", "text": "public function edit_procedure_post() {\n\n try {\n\n $procedure_id = !empty($this->Common_model->escape_data($this->post_data['procedure_id'])) ? trim($this->Common_model->escape_data($this->post_data['procedure_id'])) : '';\n $clinic_id = !empty($this->Common_model->escape_data($this->post_data['clinic_id'])) ? trim($this->Common_model->escape_data($this->post_data['clinic_id'])) : '';\n $doctor_id = !empty($this->Common_model->escape_data($this->post_data['doctor_id'])) ? trim($this->Common_model->escape_data($this->post_data['doctor_id'])) : '';\n $patient_id = !empty($this->Common_model->escape_data($this->post_data['patient_id'])) ? trim($this->Common_model->escape_data($this->post_data['patient_id'])) : '';\n $appointment_id = !empty($this->Common_model->escape_data($this->post_data['appointment_id'])) ? trim($this->Common_model->escape_data($this->post_data['appointment_id'])) : '';\n $date = !empty($this->Common_model->escape_data($this->post_data['date'])) ? trim($this->Common_model->escape_data($this->post_data['date'])) : '';\n $user_type = !empty($this->Common_model->escape_data($this->post_data['user_type'])) ? trim($this->Common_model->escape_data($this->post_data['user_type'])) : '';\n $procedure = !empty($this->post_data['procedure']) ? $this->post_data['procedure'] : '';\n $procedure_note = !empty($this->Common_model->escape_data($this->post_data['procedure_note'])) ? trim($this->Common_model->escape_data($this->post_data['procedure_note'])) : '';\n\n if (empty($user_type) ||\n empty($patient_id) ||\n empty($date) ||\n empty($procedure_id)\n ) {\n $this->bad_request();\n }\n\n\n if ($user_type == 2 && (\n empty($clinic_id) ||\n empty($doctor_id) ||\n empty($appointment_id)\n )\n ) {\n $this->bad_request();\n }\n\n if (validate_date_only($date) ||\n !in_array($user_type, $this->user_type)\n ) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n\n //check the user permisstion\n if ($user_type == 2) {\n $get_role_details = $this->Common_model->get_the_role($this->user_id);\n if (!empty($get_role_details['user_role_data'])) {\n $permission_data = array(\n 'role_data' => $get_role_details['user_role_data'],\n 'module' => 7,\n 'key' => 2\n );\n $check_module_permission = $this->check_module_permission($permission_data);\n if ($check_module_permission == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('permission_error');\n $this->send_response();\n }\n }\n }\n\n\n $report_share_status = '';\n\n if ($user_type == 2) {\n //check data belongs to the doctor or not\n $requested_data = array(\n 'appointment_id' => $appointment_id,\n 'doctor_id' => $doctor_id,\n 'clinic_id' => $clinic_id,\n 'patient_id' => $patient_id\n );\n $this->check_data_belongs_doctor($requested_data);\n\n\n //check prescription data belongs to the doctor, clinic based or not\n $procedure_reports_belongs_array = array(\n 'procedure_report_doctor_user_id' => $doctor_id,\n 'procedure_report_clinic_id' => $clinic_id,\n 'procedure_report_id' => $procedure_id,\n 'procedure_report_status !=' => 9\n );\n $is_valid_data = $this->Common_model->validate_data(TBL_PROCEDURE_REPORTS, 'procedure_report_id', $procedure_reports_belongs_array);\n\n if ($is_valid_data == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n\n //get the share settings for the vital\n $setting_where = array(\n 'setting_type' => 1,\n 'setting_user_id' => $doctor_id,\n 'setting_clinic_id' => $clinic_id\n );\n $get_setting = $this->Common_model->get_setting($setting_where);\n\n $report_share_status = 2;\n\n if (!empty($get_setting)) {\n $setting_array = json_decode($get_setting['setting_data'], true);\n if (!empty($setting_array) && is_array($setting_array)) {\n foreach ($setting_array as $setting) {\n if ($setting['id'] == 5) {\n $report_share_status = $setting['status'];\n break;\n }\n }\n }\n }\n } else {\n $report_share_status = 1;\n }\n\n $update_procedure_data = array(\n 'procedure_report_date' => $date,\n 'procedure_report_procedure_text' => $procedure,\n 'procedure_report_note' => $procedure_note,\n 'procedure_report_share_status' => $report_share_status,\n 'procedure_report_updated_at' => $this->utc_time_formated,\n 'procedure_report_updated_by' => $this->user_id\n );\n\n $update_procedure_where = array(\n 'procedure_report_id' => $procedure_id\n );\n\n $is_update = $this->Common_model->update(TBL_PROCEDURE_REPORTS, $update_procedure_data, $update_procedure_where);\n\n if ($is_update > 0) {\n\n //get prescription detail\n $requested_data = array(\n 'procedure_report_id' => $procedure_id\n );\n $get_procedure_report_detail = $this->User_model->get_procedure_detail($requested_data);\n delete_past_prescription($appointment_id);\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('procedure_updated');\n $this->my_response['data'] = $get_procedure_report_detail;\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('failure');\n }\n\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "title": "" } ]
[ { "docid": "06ca62f6b5ff7946ad4d741c0e46572f", "score": "0.6067597", "text": "public function promissory_note()\n\t{\n\t error_reporting(0);\n\t\t$segmentid=$this->uri->segment(3);\t\t\t\n\t\t$getHtmlagreement=$this->generate_promissory_note_form($segmentid);\n\t\techo $getHtmlagreement;\n\t\t$filename=$segmentid.'-'.time();\n\t\t//$abc=pdf_po_create_agreement_form($getHtmlagreement,$filename,true);\n\t}", "title": "" }, { "docid": "816d525d7be271dc33737c6dceca7fbb", "score": "0.5909394", "text": "public function getLetterProcedures($patient)\n\t{\n\t\tif ($episode = $patient->getEpisodeForCurrentSubspecialty()) {\n\t\t\t$return = '';\n\n\t\t\tif ($operation = $this->getElementForLatestEventInEpisode($episode, 'Element_OphTrOperationbooking_Operation')) {\n\t\t\t\tforeach ($operation->procedures as $i => $procedure) {\n\t\t\t\t\tif ($i) $return .= ', ';\n\t\t\t\t\t$return .= $operation->eye->adjective.' '.$procedure->term;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn strtolower($return);\n\t\t}\n\t}", "title": "" }, { "docid": "3da0340b7a35a53d324e3a2fd382d162", "score": "0.58864367", "text": "public function add_procedure_post() {\n\n try {\n\n $clinic_id = !empty($this->Common_model->escape_data($this->post_data['clinic_id'])) ? trim($this->Common_model->escape_data($this->post_data['clinic_id'])) : '';\n $doctor_id = !empty($this->Common_model->escape_data($this->post_data['doctor_id'])) ? trim($this->Common_model->escape_data($this->post_data['doctor_id'])) : '';\n $patient_id = !empty($this->Common_model->escape_data($this->post_data['patient_id'])) ? trim($this->Common_model->escape_data($this->post_data['patient_id'])) : '';\n $appointment_id = !empty($this->Common_model->escape_data($this->post_data['appointment_id'])) ? trim($this->Common_model->escape_data($this->post_data['appointment_id'])) : '';\n $date = !empty($this->Common_model->escape_data($this->post_data['date'])) ? trim($this->Common_model->escape_data($this->post_data['date'])) : '';\n $user_type = !empty($this->Common_model->escape_data($this->post_data['user_type'])) ? trim($this->Common_model->escape_data($this->post_data['user_type'])) : '';\n $procedure = !empty($this->post_data['procedure']) ? $this->post_data['procedure'] : '';\n $procedure_note = !empty($this->Common_model->escape_data($this->post_data['procedure_note'])) ? trim($this->Common_model->escape_data($this->post_data['procedure_note'])) : '';\n\n if (empty($user_type) ||\n empty($patient_id) ||\n empty($date)\n ) {\n $this->bad_request();\n }\n\n\n if ($user_type == 2 && (\n empty($clinic_id) ||\n empty($doctor_id) ||\n empty($appointment_id)\n )\n ) {\n $this->bad_request();\n }\n\n if (validate_date_only($date) ||\n !in_array($user_type, $this->user_type)\n ) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n\n //check the user permisstion\n if ($user_type == 2) {\n $get_role_details = $this->Common_model->get_the_role($this->user_id);\n if (!empty($get_role_details['user_role_data'])) {\n $permission_data = array(\n 'role_data' => $get_role_details['user_role_data'],\n 'module' => 7,\n 'key' => 1\n );\n $check_module_permission = $this->check_module_permission($permission_data);\n if ($check_module_permission == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('permission_error');\n $this->send_response();\n }\n }\n }\n\n $report_share_status = '';\n\n if ($user_type == 2) {\n //check data belongs to the doctor or not\n $requested_data = array(\n 'appointment_id' => $appointment_id,\n 'doctor_id' => $doctor_id,\n 'clinic_id' => $clinic_id,\n 'patient_id' => $patient_id\n );\n $this->check_data_belongs_doctor($requested_data);\n\n //check procedure already exists\n $data_exists_where = array(\n 'procedure_report_appointment_id' => $appointment_id,\n 'procedure_report_date' => $date,\n 'procedure_report_status' => 1\n );\n $this->check_data_exists(TBL_PROCEDURE_REPORTS, 'procedure_report_id', $data_exists_where);\n\n //get the share settings for the vital\n $setting_where = array(\n 'setting_type' => 1,\n 'setting_user_id' => $doctor_id,\n 'setting_clinic_id' => $clinic_id\n );\n $get_setting = $this->Common_model->get_setting($setting_where);\n\n $report_share_status = 2;\n\n if (!empty($get_setting)) {\n $setting_array = json_decode($get_setting['setting_data'], true);\n if (!empty($setting_array) && is_array($setting_array)) {\n foreach ($setting_array as $setting) {\n if ($setting['id'] == 5) {\n $report_share_status = $setting['status'];\n break;\n }\n }\n }\n }\n } else {\n $report_share_status = 1;\n }\n\n $insert_procedure = array(\n 'procedure_report_user_id' => $patient_id,\n 'procedure_report_date' => $date,\n 'procedure_report_procedure_text' => $procedure,\n 'procedure_report_note' => $procedure_note,\n 'procedure_report_share_status' => $report_share_status,\n 'procedure_report_created_at' => $this->utc_time_formated,\n 'procedure_report_created_by' => $this->user_id\n );\n\n if ($user_type == 2) {\n $insert_procedure['procedure_report_appointment_id'] = $appointment_id;\n $insert_procedure['procedure_report_doctor_user_id'] = $doctor_id;\n $insert_procedure['procedure_report_clinic_id'] = $clinic_id;\n } else {\n $insert_procedure['procedure_report_doctor_user_id'] = $this->user_id;\n }\n\n $inserted_id = $this->Common_model->insert(TBL_PROCEDURE_REPORTS, $insert_procedure);\n\n if ($inserted_id > 0) {\n\n //get prescription detail\n $requested_data = array(\n 'procedure_report_id' => $inserted_id\n );\n $get_procedure_report_detail = $this->User_model->get_procedure_detail($requested_data);\n delete_past_prescription($appointment_id);\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('procedure_added');\n $this->my_response['data'] = $get_procedure_report_detail;\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('failure');\n }\n\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "title": "" }, { "docid": "527a352c4321855f42ee41fefc60d472", "score": "0.5498971", "text": "abstract public function procedure_list();", "title": "" }, { "docid": "bdd7d5a1b2b0990bc8256d09f3966e83", "score": "0.54689914", "text": "function reporteInformacionP (){\n $this->objFunc=$this->create('MODPresupuesto');\n $dataSource=$this->objFunc->reporteInformacionP();\n $this->dataSource=$dataSource->getDatos();\n\n $nombreArchivo = uniqid(md5(session_id()).'[Reporte-InformaciónPresupuestaria]').'.pdf';\n $this->objParam->addParametro('orientacion','P');\n $this->objParam->addParametro('tamano','LETTER');\n $this->objParam->addParametro('nombre_archivo',$nombreArchivo);\n\n $this->objReporte = new RInformacionPresupuestaria($this->objParam);\n $this->objReporte->setDatos($this->dataSource);\n $this->objReporte->generarReporte();\n $this->objReporte->output($this->objReporte->url_archivo,'F');\n\n\n $this->mensajeExito=new Mensaje();\n $this->mensajeExito->setMensaje('EXITO','Reporte.php','Reporte generado', 'Se generó con éxito el reporte: '.$nombreArchivo,'control');\n $this->mensajeExito->setArchivoGenerado($nombreArchivo);\n $this->mensajeExito->imprimirRespuesta($this->mensajeExito->generarJson());\n }", "title": "" }, { "docid": "4a1ac3fc01d44826d7befb2f0edd6e9d", "score": "0.5418731", "text": "public function showMedicalProcedure($procedure_id){\n try{\n $query = $this->mysql->prepare('SELECT medical_procedures.cause, medical_procedures.procedure_type, medical_procedures.observations,medical_procedures.date_realized, CONCAT(medical_personnel.name,\\' \\', medical_personnel.last_name) AS name, medical_personnel.specialty FROM medical_procedures INNER JOIN medical_personnel ON medical_procedures.doctor_id = medical_personnel.id WHERE medical_procedures.id = ?');\n $query->bindParam(1,$procedure_id,PDO::PARAM_INT);\n $query->execute();\n return $query->fetch(PDO::FETCH_OBJ);\n }\n catch(PDOException $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "2d6f0484b7706afe932ef01800372ff7", "score": "0.537556", "text": "function ctlSynthese($nss){\n //test sur nss et si le patient existe dans ctlAppointmentList\n $displayList=ctlAppointmentList($nss);\n $patient=searchPatient($nss);\n $displayPatient=displayInformations($patient);\n displaySynthese($displayPatient,$displayList);\n}", "title": "" }, { "docid": "9ca07974399d02826a4c9f88de7d0d8f", "score": "0.5342438", "text": "function insert_particuler($particular){\n\t\tglobal $conn;\n\t\t//submit from encoles insert interface by super admin\n\t\tif(isset($_POST['particuler_add'])){\n\t\t\t$particuler=test_input($_POST['particuler']);\n\t\t\t$port_id=test_input($_POST['port']);\n\t\t\t$particuler_type=test_input($_POST['particuler_type']);\n\t\t\tif (empty($particuler_type)){\n\t\t\t\t$particuler_type = NULL ;\n\t\t\t}\n\t\t\t$sql=$conn->query(\"CALL insert_particular('$particuler','$particuler_type','$port_id',@p_msg)\");\n\t\t\tif($sql){\n\t\t\t\tshow_p_msg($particular);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "422a85553d202cf610008f9be36ebb36", "score": "0.53358716", "text": "function savephysicalexam(){\n//\t\t$data[\"recept_id\"] = $_POST['recept_id'];\n\t\t$data[\"cons_id\"] = $_POST['cons_id'];\n//\t\t$data[\"patient_id\"] = $_POST['patient_id'];\n\t\t$data[\"content\"] = $_POST['content'];\n\t\t$this->crud_model->save_physical_exam_for_patient($data);\n\t\techo \"success\"; \n\t}", "title": "" }, { "docid": "d2a392e331a548a1c2321a26723b5a96", "score": "0.53348166", "text": "public static function ClinicDeleteProcedure(){\r\n $allInputs = Input::all();\r\n if(!empty($allInputs)){\r\n $clinicprocedure = new ClinicProcedures();\r\n $findProcedure = self::GetClinicProcedure($allInputs['procedureid']);\r\n if($findProcedure){\r\n $findActiveBooking = General_Library::FindProcedureBooking($findProcedure->ProcedureID);\r\n if($findActiveBooking){\r\n return 5;\r\n }\r\n $updateArray['procedureid'] = $findProcedure->ProcedureID;\r\n $updateArray['Active'] = 0;\r\n $updateArray['updated_at'] = time();\r\n $updated = self::UpdateProcedure($updateArray);\r\n if($updated){\r\n $allProcedures = self::FindClinicProcedures($findProcedure->ClinicID);\r\n if($allProcedures){\r\n $loadArray['procedures'] = $allProcedures;\r\n }else{\r\n $loadArray['procedures'] = null;\r\n }\r\n $view = View::make('ajax.clinic.load-procedures', $loadArray); \r\n return $view;\r\n }else{\r\n return 0;\r\n }\r\n }else{\r\n return 0;\r\n }\r\n }else{\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "1162c6e7c8c22d9e42f47bb4cf8e6b76", "score": "0.5315025", "text": "public static function ClinicAddProcedure(){\r\n $allInputs = Input::all();\r\n if(!empty($allInputs)){\r\n $clinicprocedure = new ClinicProcedures();\r\n $dataArray['clinicid'] = $allInputs['clinicid'];\r\n $dataArray['name'] = $allInputs['name'];\r\n $dataArray['description'] = null;\r\n $dataArray['duration'] = $allInputs['duration'];\r\n $dataArray['durationformat'] = \"mins\";\r\n $dataArray['price'] = $allInputs['price'];\r\n \r\n $addProcedure = $clinicprocedure->AddProcedures($dataArray);\r\n if($addProcedure){\r\n $allProcedures = self::FindClinicProcedures($allInputs['clinicid']);\r\n if($allProcedures){\r\n $loadArray['procedures'] = $allProcedures;\r\n $view = View::make('ajax.clinic.load-procedures', $loadArray); \r\n return $view;\r\n //return $allProcedures;\r\n }else{\r\n return 0;\r\n }\r\n //return $addProcedure;\r\n }else{\r\n return 0;\r\n }\r\n }else{\r\n return 0;\r\n }\r\n }", "title": "" }, { "docid": "ebba4a9b624d5229c424274769991638", "score": "0.5284574", "text": "function Formulaire_Transfert_Launch ( $formx ) {\n\tglobal $session ;\n\t$id_instance = $formx->getIdInstance ( ) ;\n\t$idu = $formx->getVar ( 'ids' ) ;\n\t$idpatient = $session->getNavi ( 2 ) ;\n\t\n\t$req = new clResultQuery ;\n\t$param = array ( ) ;\n\t\n\t$param['cw'] = \"where idpatient='\".$idpatient.\"'\" ;\n\t$param['table'] = PPRESENTS ;\n\t$res = $req -> Execute ( \"Fichier\", \"getPatients\", $param, \"ResultQuery\" ) ;\n\t//$idpatient = $res['idpatient'][0] ;\n\teko ( $res ) ;\n\t\n\t$data['idpatient'] \t\t\t\t= $res['idpatient'][0] ;\n\t$data['idu'] \t\t\t\t\t= $res['idu'][0] ;\n\t$data['ilp'] \t\t\t\t\t= $res['ilp'][0] ;\n\t$data['nsej'] \t\t\t\t\t= $res['nsej'][0] ;\n\t$data['uf'] \t\t\t\t\t= $res['uf'][0] ;\n\t$data['nom'] \t\t\t\t\t= $res['nom'][0] ;\n\t$data['prenom'] \t\t\t\t= $res['prenom'][0] ;\n\t$data['sexe'] \t\t\t\t\t= $res['sexe'][0] ;\n\t$data['dt_naissance'] \t\t\t= $res['dt_naissance'][0] ;\n\t$data['adresse_libre'] \t\t\t= $res['adresse_libre'][0] ;\n\t$data['adresse_cp'] \t\t\t= $res['adresse_cp'][0] ;\n\t$data['adresse_ville'] \t\t\t= $res['adresse_ville'][0] ;\n\t$data['telephone'] \t\t\t\t= $res['telephone'][0] ;\n\t$data['prevenir'] \t\t\t\t= $res['prevenir'][0] ;\n\t$data['medecin_traitant'] \t\t= $res['medecin_traitant'][0] ;\n\t$data['dt_admission'] \t\t\t= $res['dt_admission'][0] ;\n\t$data['adresseur'] \t\t\t\t= $res['adresseur'][0] ;\n\t$data['mode_admission'] \t\t= $res['mode_admission'][0] ;\n\t$data['dt_examen'] \t\t\t\t= $res['dt_examen'][0] ;\n\t$data['medecin_urgences'] \t\t= $res['medecin_urgences'][0] ;\n\t$data['ide'] \t\t\t\t\t= $res['ide'][0] ;\n\t$data['salle_examen'] \t\t\t= $res['salle_examen'][0] ;\n\t$data['motif_recours']\t\t\t= $res['motif_recours'][0] ;\n\t$data['code_gravite']\t\t\t= $res['code_gravite'][0] ;\n\t$data['ccmu'] \t\t\t\t\t= $res['ccmu'][0] ;\n\t$data['gemsa'] \t\t\t\t\t= $res['gemsa'][0] ;\n\t$data['traumato'] \t\t\t\t= $res['traumato'][0] ;\n\t$data['dest_souhaitee'] \t\t= $res['dest_souhaitee'][0] ;\n\t$data['dest_attendue'] \t\t\t= $res['dest_attendue'][0] ;\n\t$data['moyen_transport'] \t\t= $res['moyen_transport'][0] ;\n\t$data['motif_transfert'] \t\t= $res['motif_transfert'][0] ;\n\t$data['dt_sortie'] \t\t\t\t= $res['dt_sortie'][0] ;\n\t$data['recours_code'] \t\t\t= $res['recours_code'][0] ;\n\t$data['recours_categorie'] \t\t= $res['recours_categorie'][0] ;\n\t$data['type_destination'] \t\t= $res['type_destination'][0] ;\n\t$data['diagnostic_categorie'] \t= $res['diagnostic_categorie'][0] ;\n\t$data['diagnostic_libelle'] \t= $res['diagnostic_libelle'][0] ;\n\t$data['diagnostic_code'] \t\t= $res['diagnostic_code'][0] ;\n\t$data['etatUHCD'] \t\t\t\t= $res['etatUHCD'][0] ;\n\t$data['dt_UHCD'] \t\t\t\t= $res['dt_UHCD'][0] ;\n\t$data['provenance'] \t\t\t= $res['provenance'][0] ;\n\t$data['dest_pmsi'] \t\t\t\t= $res['dest_pmsi'][0] ;\n\t$data['orientation'] \t\t\t= $res['orientation'][0] ;\n\t$data['iduser'] \t\t\t\t= 'Transfert' ;\n\t$data['manuel'] \t\t\t\t= $res['manuel'][0] ;\n\t\n\t\n\tif ( $res['uf'][0] == '6004' ) {\n\t\t$data['uf'] = '6006' ;\n\t\t$base = 'terminal2_tuv2' ;\n\t} elseif ( $res['uf'][0] == '6006' ) {\n\t\t$data['uf'] = '6004' ;\n\t\t$base = 'terminal_tuv2' ;\t\t\n\t} elseif ( $res['uf'][0] == 'UHCD6004' ) {\n $data['uf'] = 'UHCD6006' ;\n $base = 'terminal2_tuv2' ;\n\t} elseif ( $res['uf'][0] == 'UHCD6006' ) {\n $data['uf'] = 'UHCD6004' ;\n $base = 'terminal_tuv2' ;\n } \n\n\t\n\t\n\t$req = new clRequete ( $base, PPRESENTS, $data ) ;\n\t$req->addRecord ( ) ;\n\t\n\t\n\t$req = new clRequete ( BDD, PPRESENTS ) ;\n\t$req->delRecord ( \"idpatient=$idpatient\" ) ;\n\t\n\theader ( 'Location:index.php?navi=TGlzdGVfUHJlc2VudHM=' ) ;\n\t\n\t//eko ( $data ) ;\n\t\n\t/*\n\t$param = array();\n\t$param['etat'] = \"a\";\n\t$param['idpatient'] = $idpatient;\n\t$param['id_instance'] = $id_instance;\n\t$param['dt_creation'] = date(\"Y\").\"-\".date(\"m\").\"-\".date(\"d\").\" \".date(\"H\").\":\".date(\"i\").\":00\";\n\t//eko ($param);\n\t$req = new clRequete(BDD,\"radios\",$param);\n\t$req->addRecord();\n\t*/\n\t\n\t//$res = $req -> Execute ( \"Fichier\", \"putFormulaireRadioData\", $param, \"ResultQuery\" ) ;\n\t//eko($res);\n\t\n\treturn \"\";\n}", "title": "" }, { "docid": "8830a3ea7d177541f58f48637afd7260", "score": "0.5222195", "text": "abstract protected function getRoutine();", "title": "" }, { "docid": "49110aaa3e38bfcb51474b5d2a29c2c3", "score": "0.5216271", "text": "public function store($patient_id)\n\t{\n\t\t$model=Input::get('model');\n\t\t$date=Input::get('date');\n\t\t$patient=Input::get('patient');\n\n\t\t$e=new Evaluation;\n\t\t$e->patient_id=$patient;\n\t\t$e->digiter_id=Auth::user()->email;\n\t\t$e->save();\n\t\t$e_id=$e->eval_id;\n\n\t\t$d=new $model;\n\t\tif($model=='Ecocardio') {\n\t\t\t$d->doppl_date =$date;\n\t\t\t$d->doppl_type=Input::get('doppl_type');\n\t\t\t$d->doppl_syst_press=Input::get('doppl_syst_press');\n\t\t\tif(Input::get('doppl_right_dilat')!=''){$d->doppl_right_dilat=Input::get('doppl_right_dilat');}\n\t\t\tif(Input::get('doppl_right_dysf')!=''){$d->doppl_right_dysf=Input::get('doppl_right_dysf');}\n\t\t\tif(Input::get('doppl_pleur_effuss')!=''){$d->doppl_pleur_effuss=Input::get('doppl_pleur_effuss');}\n\t\t\tif(Input::get('left_heart_dysf')!=''){$d->left_heart_dysf=Input::get('left_heart_dysf');}\n\t\t\t$d->eject_fract=Input::get('eject_fract');\n\t\t\tif(Input::get('tapse')!=''){$d->tapse=Input::get('tapse');}\n\t\t\tif(Input::get('tryc_reg_vel')!=''){$d->tryc_reg_vel=Input::get('tryc_reg_vel');}\n\t\t\tif(Input::get('doppl_cong_defects')!=''){$d->doppl_cong_defects=Input::get('doppl_cong_defects');}\n\t\t\tif(Input::get('doppl_cong_defects_otros')!=''){$d->doppl_cong_defects_otros=Input::get('doppl_cong_defects_otros');}\n\t\t\tif(Input::get('doppl_septum_dev')!=''){$d->doppl_septum_dev=Input::get('doppl_septum_dev');}\n\t\t}\n\n\t\tif($model=='Xqray') {\n\t\t\t$d->xray_date =$date;\n\t\t\t$d->alveolar_infiltrates=Input::get('alveolar_infiltrates');\n\t\t\t$d->hypoperfusion_areas=Input::get('hypoperfusion_areas');\n\t\t\t$d->right_heart_cardiomeg=Input::get('right_heart_cardiomegs');\n\t\t\tif(Input::get('pleur_effuss')!=''){$d->pleur_effuss=Input::get('pleur_effuss');}\n\t\t\tif(Input::get('b_kerkey_lines')!=''){$d->b_kerkey_lines=Input::get('b_kerkey_lines');}\n\t\t\tif(Input::get('pulm_cone_evertion')!=''){$d->pulm_cone_evertion=Input::get('pulm_cone_evertion');}\n\t\t\tif(Input::get('cardiothrx_index')!=''){$d->cardiothrx_index=Input::get('cardiothrx_index');}\n\t\t}\n\n\t\tif($model=='Tcqangio') {\n\t\t\t$d->a_tc_date =$date;\n\t\t\t$d->a_tc_main_pulm_art_diamt=Input::get('a_tc_main_pulm_art_diamt');\n\t\t\t$d->a_tc_rt_pulm_art_diamt=Input::get('a_tc_rt_pulm_art_diamt');\n\t\t\t$d->a_tc_left_pulm_art_diamt=Input::get('a_tc_left_pulm_art_diamt');\n\t\t\tif(Input::get('a_tc_rt_heart_dilat')!=''){$d->a_tc_rt_heart_dilat=Input::get('a_tc_rt_heart_dilat');}\n\t\t\tif(Input::get('a_tc_tep_pattern')!=''){$d->a_tc_tep_pattern=Input::get('a_tc_tep_pattern');}\n\t\t\t$d->a_tc_pulm_thrombos=Input::get('a_tc_pulm_thrombos');\n\t\t\tif(Input::get('a_tc_inft_interst')!=''){$d->a_tc_inft_interst=Input::get('a_tc_inft_interst');}\n\t\t\tif(Input::get('a_tc_inft_alv')!=''){$d->a_tc_inft_alv=Input::get('a_tc_inft_alv');}\n\t\t\tif(Input::get('a_tc_inft_nodular')!=''){$d->a_tc_inft_nodular=Input::get('a_tc_inft_nodular');}\n\t\t\tif(Input::get('a_tc_mosaic')!=''){$d->a_tc_mosaic=Input::get('a_tc_mosaic');}\n\t\t\tif(Input::get('a_tc_inft_retic')!=''){$d->a_tc_inft_retic=Input::get('a_tc_inft_retic');}\n\t\t\tif(Input::get('a_tc_inft_honeycomb')!=''){$d->a_tc_inft_honeycomb=Input::get('a_tc_inft_honeycomb');}\n\t\t\tif(Input::get('a_tc_pleural_effusion')!=''){$d->a_tc_pleural_effusion=Input::get('a_tc_pleural_effusion');}\n\t\t\t$d->a_tc_congenit=Input::get('a_tc_congenit');\n\t\t\tif(Input::get('a_tc_congenit_otros')!=''){$d->a_tc_congenit_otros=Input::get('a_tc_congenit_otros');}\n\t\t}\n\n\t\tif($model=='Mri') {\n\t\t\t$d->mri_date =$date;\n\t\t\t$d->mri_fevd=Input::get('mri_fevd');\n\t\t\t$d->mri_main_art_diam=Input::get('mri_main_art_diam');\n\t\t\t$d->mri_rt_art_diam=Input::get('mri_rt_art_diam');\n\t\t\t$d->mri_lt_art_diam=Input::get('mri_lt_art_diam');\n\t\t\t$d->mri_rt_heart_dilat=Input::get('mri_rt_heart_dilat');\n\t\t\t$d->mri_defects=Input::get('mri_defects');\n\t\t\tif(Input::get('mri_other_defects')!=''){$d->mri_other_defects=Input::get('mri_other_defects');}\n\t\t}\n\n\t\tif($model=='Pulmqarteriography') {\n\t\t\t$d->artergph_date =$date;\n\t\t\t$d->artergph_TEP=Input::get('artergph_TEP');\n\t\t}\n\n\t\tif($model=='Gammagr') {\n\t\t\t$d->gamma_date =$date;\n\t\t\t$d->gamma_tep=Input::get('gamma_tep');\n\t\t}\n\n\t\tif($model=='Duplexqlegs') {\n\t\t\t$d->legsdoppler_date =$date;\n\t\t\t$d->legsdoppler_result_left=Input::get('legsdoppler_result_right');\n\t\t\t$d->legsdoppler_result_right=Input::get('legsdoppler_result_left');\n\t\t}\n\n\t\t$d->eval_id=$e_id;\n\t\t$d->save();\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "af0500c5270747184f36fff49b93b036", "score": "0.5200737", "text": "private function modifyPatient() {\n $VPatientsDB= USingleton::getInstance('VPatientsDB');\n $encCF=$VPatientsDB->get('p');\n \n $posCF=$this->getCfPosition($encCF);\n $cfPatient= EPatient::$istances[$posCF]->getCF();\n \n if ( $VPatientsDB->get('mod')==\"completed\" ){\n $FPatient= USingleton::getInstance('FPatient');\n \n $arrayPatient=array('name'=>$VPatientsDB->get('name'),\n 'surname'=>$VPatientsDB->get('surname'),\n\t\t\t\t 'gender'=>$VPatientsDB->get('gender'),\n\t\t\t\t 'dateBirth'=>$VPatientsDB->get('dateBirth'),\n\t\t\t\t 'CF'=>strtoupper($VPatientsDB->get('CF')));\n \n if ( $arrayPatient['CF']!=$cfPatient ){ //se modifico il codice fiscale devo modificare anche quello nella tabella visite\n $FCheckup= USingleton::getInstance('FCheckup');\n $FCheckup->updateCheckCF($arrayPatient['CF'],$cfPatient);\n }\n \n $FPatient->updatePatient($arrayPatient,$cfPatient);\n $message=\"modifica completata con successo\";\n $this->bodyHTML=$VPatientsDB->getInfoMessage($message,true);\n }\n else {\n $this->bodyHTML=$VPatientsDB->getPatientModPage($cfPatient);\n }\n\t}", "title": "" }, { "docid": "82b461e71430fb4099791dda7423f503", "score": "0.5199511", "text": "public function run()\n {\n $categories = ProcedureTypeCategory::fetchAll()->toArray();\n\n $laboratory = ProcedureTypeCategory::getType($categories, Procedures::$types[0]);\n $radiology = ProcedureTypeCategory::getType($categories, Procedures::$types[1]);\n $consultation = ProcedureTypeCategory::getType($categories, Procedures::$types[2]);\n $send_in = ProcedureTypeCategory::getType($categories, Procedures::$types[3]);\n $corporate = ProcedureTypeCategory::getType($categories, Procedures::$types[4]);\n \n // LABORATORY\n\n $hematology = array_slice(Procedures::$laboratory, 0, 3);\n $this->insert($hematology, $laboratory[0]['id']);\n \n $bloodChem = array_slice(Procedures::$laboratory, 3, 3);\n $this->insert($bloodChem, $laboratory[1]['id']);\n\n $routine = array_slice(Procedures::$laboratory, 6, 3);\n $this->insert($routine, $laboratory[2]['id']);\n \n // RADIOLOGY\n \n $xRay = array_slice(Procedures::$radiology, 0, 1);\n $this->insert($xRay, $radiology[0]['id']);\n\n $ultraSound = array_slice(Procedures::$radiology, 1, 1);\n $this->insert($ultraSound, $radiology[1]['id']);\n\n $d2Echo = array_slice(Procedures::$radiology, 2, 1);\n $this->insert($d2Echo, $radiology[2]['id']);\n \n $ecg = array_slice(Procedures::$radiology, 3, 1);\n $this->insert($ecg, $radiology[3]['id']);\n\n // CONSULTATION\n \n $ape = array_slice(Procedures::$consultation, 0, 1);\n $this->insert($ape, $consultation[0]['id']);\n \n $consulFee = array_slice(Procedures::$consultation, 1, 2);\n $this->insert($consulFee, $consultation[1]['id']);\n \n $preEmp = array_slice(Procedures::$consultation, 3, 2);\n $this->insert($preEmp, $consultation[2]['id']);\n\n // SEND IN\n\n $hematology = array_slice(Procedures::$send_in, 0, 3);\n $this->insert($hematology, $send_in[0]['id']);\n \n $bloodChem = array_slice(Procedures::$send_in, 3, 3);\n $this->insert($bloodChem, $send_in[1]['id']);\n\n $routine = array_slice(Procedures::$send_in, 6, 3);\n $this->insert($routine, $send_in[2]['id']);\n\n // CORPORATE\n\n $ape = array_slice(Procedures::$corporate, 0, 3);\n $this->insert($ape, $corporate[0]['id']);\n \n $consulFee = array_slice(Procedures::$corporate, 3, 3);\n $this->insert($consulFee, $corporate[1]['id']);\n\n $preEmp = array_slice(Procedures::$corporate, 6, 3);\n $this->insert($preEmp, $corporate[2]['id']);\n }", "title": "" }, { "docid": "b3544918f96b7bd5958738a4f7422456", "score": "0.51672333", "text": "function VerificarPendientesEmision(){\r\n\t\t\t\t$this->procedimiento='vef.ft_venta_facturacion_ime';\r\n\t\t\t\t$this->transaccion='VEF_VERIF_PEND_MOD';\r\n\t\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t\t//Define los parametros para la funcion\r\n\t\t\t\t$this->setParametro('id_punto_venta','id_punto_venta','integer');\r\n\t\t\t\t//Ejecuta la instruccion\r\n\t\t\t\t$this->armarConsulta();\r\n\r\n\t\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t\t//Devuelve la respuesta\r\n\t\t\t\treturn $this->respuesta;\r\n\t\t\t}", "title": "" }, { "docid": "55fa319fa0a8015fb9ab6b3c87ed09bb", "score": "0.51580346", "text": "function reporteEspecificacionTecInterPDF(){\n\t\t$this->procedimiento='adq.f_solicitud_sel';\n\t\t$this->transaccion='ADQ_RESPTEC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\n\t\t$this->captura('justificacion','text');\n\t\t$this->captura('desc_ingas','varchar');\n\t\t$this->captura('descripcion','text');\n\t\t$this->captura('precio_unitario','numeric');\n\t\t$this->captura('cantidad','integer');\n\t\t$this->captura('validez_oferta','text');\n\t\t$this->captura('garantias','text');\n\t\t$this->captura('lugar_entrega','varchar');\n\t\t$this->captura('dias_plazo_entrega','integer');\n\t\t$this->captura('multas','text');\n\t\t$this->captura('forma_pago','text');\n\t\t$this->captura('p_nombre_jefe','text');\n\t\t$this->captura('p_cargo_jefe','varchar');\n\t\t$this->captura('p_nombre_sol','text');\n\t\t$this->captura('p_cargo_sol','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t//var_dump($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "adc9d8961ff5c9a49c4d01e0b0840a1a", "score": "0.51508015", "text": "public function create()\n {\n $procedure_types = ProcedureType::all();\n $appointments = Appointment::where('date','>=',date('m/d/Y h:i:s a', time()))\n ->where('doctor_id',Auth::user()->assigned_doctor_id)\n ->get();\n return view('assistant.create_procedure',compact('appointments','procedure_types'));\n }", "title": "" }, { "docid": "007b300cbb76e8c767d8440e84861311", "score": "0.51321054", "text": "function form_fp_methods(){\n\t\t\n\t $q_fp = $this->check_fprec();\n\t \n\t if($_POST[\"confirm_del\"]==1): //this signifies that an unenrollment of FP method is about to be made\n\t $this->unenroll_fp_px(); \n\t endif;\n\t \n\t\tif(mysql_num_rows($q_fp)!=0):\n\n\t\t$pxid = healthcenter::get_patient_id($_GET[\"consult_id\"]);\n\n\t\t$q_fp_methods = mysql_query(\"SELECT a.fp_id,b.fp_px_id,b.method_id,c.method_name,b.drop_out,b.date_registered,b.treatment_partner,b.dropout_reason,FLOOR((unix_timestamp(b.date_dropout)-unix_timestamp(b.date_registered))/(3600*24)) as duration,b.date_dropout,b.dropout_reason,b.client_code,b.permanent_reason FROM m_patient_fp a, m_patient_fp_method b, m_lib_fp_methods c WHERE a.patient_id='$pxid' AND a.fp_id=b.fp_id AND b.method_id=c.method_id ORDER by b.drop_out DESC,b.date_registered DESC\") or die(\"Cannot query: 534\");\n\t\t\n\t\tif(isset($_SESSION[\"dropout_info\"]) && $_GET[\"action\"]==\"drop\"): //indicates that the end-user pressed YES for dropping out patient\n\t\t\t//print_r($_SESSION[\"dropout_info\"]);\n\t\t\t\n\t\t\tlist($mreg,$dreg,$yreg) = explode('/',$_SESSION[\"dropout_info\"][\"txt_date_reg\"]);\n\t\t\tlist($mdrop,$ddrop,$ydrop) = explode('/',$_SESSION[\"dropout_info\"][\"txt_date_dropout\"]);\n\n\t\t\t$reg = $yreg.'-'.$mreg.'-'.$dreg;\n\t\t\t$drop = $ydrop.'-'.$mdrop.'-'.$ddrop;\n\t\t\t$drop_reason = $_SESSION[\"dropout_info\"][\"sel_dropout\"];\n\t\t\t$drop_remarks = $_SESSION[\"dropout_info\"][\"dropout_remarks\"];\n\t\t\t$tx_partner = $_SESSION[\"dropout_info\"][\"txt_treatment_partner\"];\n\t\t\t$fp_px_id = $_SESSION[\"dropout_info\"][\"fp_px_id\"];\n\t\t\t\n\t\t\t$update_fp = mysql_query(\"UPDATE m_patient_fp_method SET date_registered='$reg',treatment_partner='$tx_partner',drop_out='Y',dropout_reason='$drop_reason',date_dropout='$drop',dropout_remarks='$drop_remarks' WHERE fp_px_id='$fp_px_id'\") or die(\"Cannot query: 593\");\n\n\t\t\tif($update_fp):\n unset($_SESSION[\"dropout_info\"]);\n echo \"<script language='javascript'>\";\n echo \"alert('The patient was successfully been dropped from this method');\";\n echo \"window.location.reload();\";\n echo \"</script>\";\n\t\t\tendif;\n\t\tendif;\n\n\t\techo \"<form name='form_methods' action='$_SERVER[PHP_SELF]?page=$_GET[page]&menu_id=$_GET[menu_id]&consult_id=$_GET[consult_id]&ptmenu=$_GET[ptmenu]&module=$_GET[module]&fp=METHODS' method='POST'>\";\n echo \"<input type='hidden' name='confirm_del' value=0></input>\";\n\n\t\techo \"<table bgcolor='#66FF66'>\";\t\t\n\t\techo \"<a name='methods'></a>\";\n\t\techo \"<tr><td colspan='2' align='center' bgcolor='#339966' class='whitetext'><b>BIRTH SPACING METHOD ENROLLMENT FORM</b></td></tr>\";\n\n\t\t\tif(mysql_num_rows($q_fp_methods)==0): //scenario 1\n\t\t\t \n\t\t\t\t$this->show_method_list('form_methods','sel_methods');\n\t\t\t\t$this->show_previous_method(\"None\");\n\n\t\t\t\techo \"<tr><td class='boxtitle'>TREATMENT PARTNER</td><td><input type='text' name='txt_tx_partner' size='20'></input></td></tr>\";\t\t\t\t\n\n\t\t\t\techo \"<tr><td class='boxtitle'>REASON FOR PERMANENT METHOD</td>\";\n\t\t\t\techo \"<td class='boxtitle'><textarea name='txt_reason' cols='30' row='10'>\";\n\t\t\t\techo \"</textarea></td></tr>\";\n\n\t\t\t\t$this->show_fp_clients();\n\n\t\t\t\techo \"<tr><td colspan='2' align='center'><input type='submit' name='submit_fp' value='Save Family Planning Method' style='border: 1px solid #000000'></input></td></tr>\";\n\n\t\t\telse: //scenario 2-3\n\t\t\t\t$arr_current = $this->show_current_method($q_fp_methods); //return the most current FP method used\t\t \n\t\t\t\t$reason_drop = $arr_current[1][\"dropout_reason\"];\n\t\t\t\t$q_dropreason = mysql_query(\"SELECT reason_label FROM m_lib_fp_dropoutreason WHERE reason_id='$reason_drop'\") or die(\"Cannot query: 635\");\n\t\t\t\tlist($dropout_reason) = mysql_fetch_array($q_dropreason);\t\t\t\t\n \n\t\t\t\t$fp_px_id = $arr_current[0][\"fp_px_id\"];\n\t\t\t\t$method_id = $arr_current[0][\"method_id\"];\n\n\t\t\t\t//print_r($arr_current);\n\n\t\t\t\tswitch($arr_current[0][\"drop_out\"]){\n\t\t\t\t\n\t\t\t\t\tcase \"Y\": //previous user of FP method, not present user\n\t\t\t\t\t\t/*echo \"<tr><td>SELECT METHOD:</td><td>\";\n\t\t\t\t\t\techo $this->get_methods(\"sel_methods\");\n\t\t\t\t\t\techo \"</td></tr>\"; */\n \n\t\t\t\t\t\t$this->show_method_list('form_methods','sel_methods');\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>TREATMENT PARTNER</td><td><input type='text' name='txt_tx_partner' size='20'></input></td></tr>\";\t\t\t\t\n $this->show_fp_clients();\n \n echo \"<tr><td class='boxtitle'>REASON FOR PERMANENT METHOD</td>\";\n echo \"<td><textarea name='txt_reason' cols='30' row='10'>\";\n echo \"</textarea></td></tr>\";\n \n \n\t\t\t \t\t\techo \"<tr><td class='boxtitle'>PREVIOUS METHOD:</td><td>\";\n\t\t\t\t\t\techo (isset($arr_current[0][\"method_name\"]))?$arr_current[0][\"method_name\"]:'None';\n\t\t\t\t\t\techo \"</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>DATE OF DROPOUT:</td><td>\";\n\t\t\t\t\t\techo (isset($arr_current[0][\"method_name\"]))?$arr_current[0][\"date_dropout\"]:'None';\n\t\t\t\t\t\techo \"</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>DURATION OF USE:</td><td>\".$arr_current[0][\"duration\"].\" days </td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>REASON FOR DROPOUT</td><td>\".$dropout_reason.\"</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td colspan='2' align='center'><input type='submit' name='submit_fp' value='Save Family Planning Method' style='border: 1px solid #000000'></input></td></tr>\";\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase \"N\":\t\t//current users of FP method\n\t\t\t\t\t \n\t\t\t\t\t\techo \"<input type='hidden' name='fp_px_id' value='$fp_px_id'></input>\";\n\t\t\t\t\t\techo \"<input type='hidden' name='method_id' value='$method_id'></input>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>CURRENT METHOD:</td><td>\".$arr_current[0][\"method_name\"].\"</td></tr>\";\n\t\t\t\t\t\tlist($y,$m,$d) = explode('-',$arr_current[0][\"date_registered\"]);\n\t\t\t\t\t\t$datereg = $m.'/'.$d.'/'.$y;\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$this->show_fp_clients($arr_current[0][\"client_code\"]);\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>DATE OF REGISTRATION:</td><td>\";\n\t\t\t\t\t\techo \"<input type='text' name='txt_date_reg' size='8' maxlength='10' value='$datereg'>&nbsp;\";\n\t\t\t\t\t\techo \"<a href=\\\"javascript:show_calendar4('document.form_methods.txt_date_reg', document.form_methods.txt_date_reg.value);\\\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>\";\n\t\t\t\t\t\techo \"</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>TREATMENT PARTNER:</td><td>\";\n\t\t\t\t\t\t$txpartner = $arr_current[0][treatment_partner];\n\t\t\t\t\t\techo \"<input type='text' size='20' value='$txpartner' name='txt_treatment_partner'></input>\";\n\t\t\t\t\t\techo \"</td></tr>\";\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>REASON FOR PERMANENT METHOD</td>\";\n echo \"<td><textarea name='txt_reason' cols='30' row='10'>\".$arr_current[0][permanent_reason];\n \t\t\t\techo \"</textarea></td></tr>\";\n\t\t\t\t\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>PREVIOUS METHOD:</td><td>\";\n\t\t\t\t\t\techo (isset($arr_current[1][\"method_name\"]))?$arr_current[1][\"method_name\"]:'None';\n\t\t\t\t\t\techo \"</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>DURATION OF USE:</td><td>\";\n\t\t\t\t\t\techo (isset($arr_current[1][\"method_name\"]))?$arr_current[1][\"duration\"]:'NA';\n\t\t\t\t\t\techo \" days</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>REASON FOR DISCONTINUATION:</td><td>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo (isset($arr_current[1][\"method_name\"]))?$arr_current[1][\"dropout_reason\"]:'NA';\n\t\t\t\t\t\t\n\t\t\t\t\t\techo (isset($arr_current[1][\"method_name\"]))?$dropout_reason:'NA';\n\t\t\t\t\t\techo \"</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>REASON FOR DROP OUT</td>\";\n\t\t\t\t\t\t$q_dropout = mysql_query(\"SELECT reason_id, reason_label FROM m_lib_fp_dropoutreason ORDER by reason_label ASC\") or die(\"Cannot query: 659\");\n\n\t\t\t\t\t\tif(mysql_num_rows($q_dropout)!=0):\n\t\t\t\t\t\t\t\techo \"<td><select name='sel_dropout' size='1'>\";\n\t\t\t\t\t\t\t\techo \"<option value='0' DEFAULT>----- Patient not drop out -----</option>\";\n\t\t\t\t\t\t\t\twhile($r_dropout = mysql_fetch_array($q_dropout)){\n\t\t\t\t\t\t\t\t\techo \"<option value='$r_dropout[reason_id]'>$r_dropout[reason_label]</option>\";\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo \"</select></td>\";\n\t\t\t\t\t\telse:\n\t\t\t\t\t\t\t\techo \"<font color='red'>FP Library dropout missing.</font>\";\n\t\t\t\t\t\tendif;\n\n\t\t\t\t\t\techo \"<tr><td class='boxtitle'>DATE OF DROP OUT</td><td>\";\n\t\t\t\t\t\techo \"<input type='text' name='txt_date_dropout' size='8' maxlength='10'>&nbsp;\";\n\t\t\t\t\t\techo \"<a href=\\\"javascript:show_calendar4('document.form_methods.txt_date_dropout', document.form_methods.txt_date_dropout.value);\\\"><img src='../images/cal.gif' width='16' height='16' border='0' alt='Click here to pick up date'></a>\";\n\t\t\t\t\t\techo \"</input>\";\n\n\t\t\t\t\t\techo \"</td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td valign='top' class='boxtitle'>REMARKS / ACTION TAKEN</td>\";\n\t\t\t\t\t\techo \"<td><textarea name='dropout_remarks' cols='20' rows='4'></textarea></td></tr>\";\n\n\t\t\t\t\t\techo \"<tr><td align='center' colspan='2'><input type='submit' name='submit_fp' value='Update Family Planning Method' style='border: 1px solid #000000'></input>\";\n\t\t\t\t\t \n\t\t\t\t\t if($_SESSION[priv_delete]=='1'):\n\t\t\t\t\t echo \"&nbsp;&nbsp;<input type='button' name='delete_fpmethod' value='Unenroll Patient' style='border: 1px solid #000000' onclick='confirm_delete_fp()'></input>\";\n\t\t\t\t\t endif;\n\t\t\t\t\t \n\t\t\t\t\t echo \"</td>\";\n\t\t\t\t\t \n\t\t\t\t\t\t//echo \"</form>\";\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\tendif;\n\t\techo \"</table>\";\n\t\techo \"</form>\";\n\n\t\t$this->history_methods();\n\n\t\telse:\n\t\t\t\t$this->no_fp_msg();\n\t\tendif;\n\n\t}", "title": "" }, { "docid": "832ff13c1a7290550619d362e001b795", "score": "0.51046526", "text": "function procurement_recorddetails()\n\t{\n\t\t# Get the passed details into the url data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'b'));\n\n\t\t# Pick all assigned data\n\t\t$data = assign_to_data($urldata);\n\t\t$notify = 0;\n\n\t\tif(!empty($data['notification'])){\n\t\t\t$notify = 1;\n\t\t}\n\n\n\t\tif($this->input->post('proc_id'))\n\t\t{\n\t\t\t$_POST = clean_form_data($_POST);\n// print_r($_POST);\n// exit();\n\t\t\t$procurement_ref_no = trim($_POST['procurementrefno']);\n\t\t\t$bidinvitation_id = trim($_POST['bidinvitationid']);\n\t\t\t$app_select_str = ' procurement_plan_entries.isactive=\"Y\" ';\n\n\t\t\tif($this->session->userdata('isadmin') == 'N')\n\t\t\t{\n\t\t\t\t$userdetails = $this->db->get_where('users', array('userid'=>$this->session->userdata('userid')))->result_array();\n\t\t\t\t$app_select_str .= ' AND procurement_plans.pde_id =\"'. $userdetails[0]['pde'] .'\"';\n\t\t\t}\n\n\t\t\t#$query = $this->Query_reader->get_query_by_code('ProcurementPlanDetails', array('searchstring'=>$app_select_str . ' AND procurement_plan_entries.id=\"'. $_POST['proc_id'] .'\"', 'limittext'=>'', 'orderby'=>' procurement_plan_entries.dateadded ' ));\n\t\t\t#print_r($query); exit();\n\t\t\t//procurement details\n\n\t\t\t#$data['procurement_details'] = $this->Query_reader->get_row_as_array('ProcurementPlanDetails', array('searchstring'=>$app_select_str . ' AND receipts.beb=\"Y\" AND procurement_plan_entries.id=\"'. $_POST['proc_id'] .'\"', 'limittext'=>'', 'orderby'=>' procurement_plan_entries.dateadded ' ));\n\n\t\t\t#print_r($_POST);\n// AND bidinvitations.procurement_ref_no=\"'.$procurement_ref_no.'\"\n\t\t\t$data['procurement_details'] = $this->Query_reader->get_row_as_array('procurement_plan_details', array('searchstring'=>$app_select_str . ' AND receipts.beb=\"Y\" AND bidinvitations.id =\"'.$bidinvitation_id.'\"AND procurement_plan_entries.id=\"'. $_POST['proc_id'] .'\"', 'limittext'=>'', 'orderby'=>' procurement_plan_entries.dateadded ' ));\n\n\t\t\t#print_r(\t$data['procurement_details']); exit();\n\t\t\t#get provider info\n\t\t\tif(!empty($data['b'])):\n\t\t\t\t$data['provider'] = $this->Query_reader->get_row_as_array('get_IFB_BEB', array('searchstring'=> ' AND BI.procurement_id=\"'.\n\t\t\t\t\t\t$_POST['proc_id'] .'\" AND beb=\"Y\"'));\n\n\t\t\t\tif(!empty($data['provider']) && empty($data['provider']['providerid'])):\n\t\t\t\t\t$jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = \"'. $data['provider']['joint_venture'] .'\"')->result_array();\n\t\t\t\t\tif(!empty($jv_info[0]['providers'])):\n\t\t\t\t\t\t$providers = $this->db->query('SELECT * FROM providers WHERE providerid IN ('. rtrim($jv_info[0]['providers'], ',') .')')->result_array();\n\t\t\t\t\t\t$data['provider']['providernames'] = '';\n\n\t\t\t\t\t\tforeach($providers as $provider):\n\t\t\t\t\t\t\t$data['provider']['providernames'] .= (!empty($data['provider']['providernames'])? ', ' : '').\n\t\t\t\t\t\t\t\t\t$provider['providernames'];\n\t\t\t\t\t\tendforeach;\n\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\n\t\t\t\t#exit($this->db->last_query());\n\t\t\tendif;\n\t\t}\n\n\t\t// $data['area'] = 'procurement_record_details';\n\n\t\t// $this->load->view('includes/add_ons', $data);\n\n\n\t\tif($notify == 1){\n\n\t\t\tprint_r($data['provider']['providername']);\n\n\n\t\t\tif(!empty($data['provider']['providername'])){\n\t\t\t\tprint_r($data['provider']['providerid']);\n\t\t\t\t$providerid = $data['provider']['providerid'];\n\t\t\t\tif(is_numeric($providerid))\n\t\t\t\t{\n\n\t\t\t\t\t$procurementdetails = $this->db->query('SELECT * FROM providers WHERE providerid IN ('.rtrim($data['provider']['providerid'],',').') ' ) -> result_array();\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t#$query = 'SELECT * FROM providers WHERE providerid IN (SELECT TRIM(TRAILING \",\" FROM providers) FROM joint_venture\t WHERE jv = \"'.$data['provider']['providername'].'\" ) ';\n\t\t\t\t\t#echo $query;\n\t\t\t\t\t$procurementdetails = $this->db->query('SELECT * FROM providers WHERE providerid IN (SELECT TRIM(TRAILING \",\" FROM providers) FROM joint_venture\t WHERE jv = \"'.$data['provider']['providername'].'\" ) ' ) -> result_array();\n\n\t\t\t\t}\n\n\t\t\t\t#print_r($procurementdetails);\n\t\t\t\t$providers = '<ul>';\n\t\t\t\t$xc = '';\n\t\t\t\t#$suspended = '';\n\t\t\t\t$status = 0;\n\t\t\t\tforeach ($procurementdetails as $key => $value) {\n\n\t\t\t\t\t#check provider\n\t\t\t\t\t$xc = searchprovidervalidity($value['providernames']);\n\t\t\t\t\tif(!empty($xc))\n\t\t\t\t\t{\n\t\t\t\t\t\t$status =1;\n\t\t\t\t\t\t$providers .= \"<li> \".$value['providernames'].\" \".'</li>';\n\t\t\t\t\t\t# $suspended .= $value['providernames'].',';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$providers .= '<ul>';\n\n\n\t\t\t\t$rand = rand(23454,83938);\n\n\t\t\t\t$this->session->set_userdata('level','ppda');\n\t\t\t\t$userid = $this->session->userdata('userid');\n\n\t\t\t\t$query1 = $this->db->query(\"SELECT CONCAT(firstname,',',lastname) AS names FROM users WHERE userid=\".$userid .\" limit 1\")-> result_array();\n\t\t\t\t$level = \"Disposal\";\n\n\t\t\t\t$entity = $this->session->userdata('pdeid');\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM pdes WHERE pdeid=\".$entity.\" limit 1\")-> result_array();\n\t\t\t\t$entityname = $query[0]['pdename'];\n\n\t\t\t\t$titles = \" Attemp to award a contract to suspended provider(s) by \".$entityname.\" -CO \".$rand.\" \";\n\n\t\t\t\t$body = \"<h2> SUSPENDED PROVIDER</H2> \";\n\t\t\t\t$body .=\"<table><tr><th> Organisation(S) </th><td>\".$providers.\" </td></tr>\";\n\t\t\t\t$body .=\"<tr><th>Admininstrator </th><td>\".$query1[0]['names'].\" </td></tr>\";\n\t\t\t\t$body .=\"<tr><th> Date </th><td>\".Date('Y m-d').\" </td></tr>\";\n\t\t\t\t$body .= \"</table>\";\n\t\t\t\t$permission = \"view_disposal_plans\";\n\n\t\t\t\tpush_permission($titles,$body,$level,$permission);\n\n\n\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t$data['area'] = 'procurement_record_details';\n\n\t\t\t$this->load->view('includes/add_ons', $data);\n\t\t}\n\n\t}", "title": "" }, { "docid": "eded2eaf37a0042fcbd2b0a3a1f550dd", "score": "0.5101306", "text": "function modificarPresolicitudDet(){\n\t\t$this->procedimiento='adq.ft_presolicitud_det_ime';\n\t\t$this->transaccion='ADQ_PRED_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_presolicitud_det','id_presolicitud_det','int4');\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('cantidad_sol','cantidad','numeric');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('id_solicitud_det','id_solicitud_det','int4');\n\t\t$this->setParametro('id_presolicitud','id_presolicitud','int4');\n\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "f688b93a86e5d6d04ef1ec624fac47f1", "score": "0.50902176", "text": "public function program() \n {\n\t$this->prgcat = $this->common_model->get_listspfic2('programcategory','prgcat_id','prgcat_name'); \n // $this->scresult = $this->common_model->get_listspfic2('study_center','sc_id', 'sc_name');\n\t//$this->uresult = $this->common_model->get_listspfic2('org_profile','org_id','org_name');\t\n $this->deptresult = $this->common_model->get_listspfic2('Department','dept_id', 'dept_name');\n $data['title'] = 'Add program';\n if(isset($_POST['program'])) \n {\n // $this->form_validation->set_rules('prgcampus','Campus','trim|xss_clean|required');\n\t\t//$this->form_validation->set_rules('prgcampus','Institute Name','trim|xss_clean|required');\n $this->form_validation->set_rules('prgdepartment','Department','trim|xss_clean|required');\n $this->form_validation->set_rules('prgcat','Program Category','trim|xss_clean|required');\n $this->form_validation->set_rules('prgname','Program Name','trim|xss_clean|required');\n $this->form_validation->set_rules('prgbranch','Program Branch','trim|xss_clean|required');\n $this->form_validation->set_rules('prgpattern','Program Pattern','trim|xss_clean|required');\n $this->form_validation->set_rules('prgseat','Seat Available','trim|xss_clean|required|numeric');\n $this->form_validation->set_rules('prgcredit','Program Credit','trim|xss_clean|numeric');\n $this->form_validation->set_rules('prgcode','Program Code','trim|xss_clean|required');\n $this->form_validation->set_rules('prgshort','Program Short','trim|xss_clean');\n $this->form_validation->set_rules('prgdesc','Program Description','trim|xss_clean');\n $this->form_validation->set_rules('prgmaxtime','Program Min Time','trim|xss_clean|required|numeric');\n $this->form_validation->set_rules('prgmintime','Program Max Time','trim|xss_clean|required|numeric');\n\n \n // $prgcampus = $this->input->post('prgcampus');\n $prgdepartment = $this->input->post('prgdepartment');\n $prgcat = $this->input->post('prgcat');\n $prgname = $this->input->post('prgname');\n $prgseat = $this->input->post('prgseat');\n $prgcredit = $this->input->post('prgcredit');\n $prgbranch = $this->input->post('prgbranch');\n $prgpattern = $this->input->post('prgpattern');\n $prgcode = $this->input->post('prgcode');\n $prgshort = $this->input->post('prgshort');\n $prgdesc = $this->input->post('prgdesc');\n $prgmaxtime = $this->input->post('prgmaxtime');\n $prgmintime = $this->input->post('prgmintime');\n $prgcrtid = $this->session->userdata('username'); \n $currdate = date(\"Y/m/d\");\n $prgdate = $currdate;\n\n /* check for duplicate record\n $result = $this->common_model->isduplicate('program','prg_category',$prgcat);\n if($result == 1)\n {\n $this->session->set_flashdata('error','Program category <b>' .$prgcat . '</b> already exist' );\n redirect('setup/program');\n }*/\n\n }\n\n if ($this->form_validation->run() == FALSE)\n {\n $this->load->view('setup/program');\n return;\n }\n else\n {\n $data = array(\n //'prg_scid'=>$prgcampus,\n 'prg_deptid'=>$prgdepartment,\n 'prg_category'=>ucwords(strtolower($prgcat)),\n 'prg_name'=>ucwords(strtolower($prgname)),\n 'prg_branch'=>ucwords(strtolower($prgbranch)),\n 'prg_pattern'=>ucwords(strtolower($prgpattern)),\n 'prg_seat'=>$prgseat,\n 'prg_credit'=>$prgcredit,\n 'prg_code'=>strtoupper($prgcode),\n 'prg_short'=>strtoupper($prgshort),\n 'prg_desc'=>$prgdesc,\n 'prg_mintime'=>$prgmintime,\n 'prg_maxtime'=>$prgmaxtime,\n 'creatorid'=>$prgcrtid,\n 'createdate'=>$prgdate\n );\n $this->db->trans_start();\n if(!$this->db->insert('program',$data))\n {\n $this->db->trans_rollback();\n log_message('error', \"Error in adding program data \" . $prgcrtid . \" [Program id:\" . $prg_id . \"]\");\n log_message('debug', \"Problem in adding program\" . $prgcrtid );\n $this->session->set_flashdata('Error in adding Program - ' . $prgcrtid . '.', 'error');\n log_message('info', \"Error in adding Program record \" . $prgcrtid . \" [Program_id:\" . $prg_id . \"]\");\n $this->load->view('setup/program');\n }\n else\n {\n $this->db->trans_complete();\n $this->logger->write_logmessage(\"Added\",\"Program Setting Added\", \"Program details added successfully\");\n $this->session->set_flashdata(\"success\", \"Program added successfully\");\n redirect('setup/viewprogram');\n } \n }\n }", "title": "" }, { "docid": "345b7c1556893b414c0afbf98dedf7d9", "score": "0.50843763", "text": "public function add_vital_for_patient_post() {\n\n try {\n\n $clinic_id = !empty($this->Common_model->escape_data($this->post_data['clinic_id'])) ? trim($this->Common_model->escape_data($this->post_data['clinic_id'])) : '';\n $doctor_id = !empty($this->Common_model->escape_data($this->post_data['doctor_id'])) ? trim($this->Common_model->escape_data($this->post_data['doctor_id'])) : '';\n $patient_id = !empty($this->Common_model->escape_data($this->post_data['patient_id'])) ? trim($this->Common_model->escape_data($this->post_data['patient_id'])) : '';\n $appointment_id = !empty($this->Common_model->escape_data($this->post_data['appointment_id'])) ? trim($this->Common_model->escape_data($this->post_data['appointment_id'])) : '';\n $date = !empty($this->Common_model->escape_data($this->post_data['date'])) ? trim($this->Common_model->escape_data($this->post_data['date'])) : '';\n $sp2o = !empty($this->Common_model->escape_data($this->post_data['sp2o'])) ? trim($this->Common_model->escape_data($this->post_data['sp2o'])) : '';\n $weight = !empty($this->Common_model->escape_data($this->post_data['weight'])) ? trim($this->Common_model->escape_data($this->post_data['weight'])) : '';\n $blood_pressure_systolic = !empty($this->Common_model->escape_data($this->post_data['blood_pressure_systolic'])) ? trim($this->Common_model->escape_data($this->post_data['blood_pressure_systolic'])) : '';\n $blood_pressure_diastolic = !empty($this->Common_model->escape_data($this->post_data['blood_pressure_diastolic'])) ? trim($this->Common_model->escape_data($this->post_data['blood_pressure_diastolic'])) : '';\n $blood_pressure_type = !empty($this->Common_model->escape_data($this->post_data['blood_pressure_type'])) ? trim($this->Common_model->escape_data($this->post_data['blood_pressure_type'])) : '';\n $pulse = !empty($this->Common_model->escape_data($this->post_data['pulse'])) ? trim($this->Common_model->escape_data($this->post_data['pulse'])) : '';\n $temperature = !empty($this->Common_model->escape_data($this->post_data['temperature'])) ? trim($this->Common_model->escape_data($this->post_data['temperature'])) : '';\n $temperature_type = !empty($this->Common_model->escape_data($this->post_data['temperature_type'])) ? trim($this->Common_model->escape_data($this->post_data['temperature_type'])) : '';\n $temperature_taken = !empty($this->Common_model->escape_data($this->post_data['temperature_taken'])) ? trim($this->Common_model->escape_data($this->post_data['temperature_taken'])) : '';\n $resp = !empty($this->Common_model->escape_data($this->post_data['resp'])) ? trim($this->Common_model->escape_data($this->post_data['resp'])) : '';\n\n if (empty($clinic_id) ||\n empty($doctor_id) ||\n empty($patient_id) ||\n empty($appointment_id) ||\n empty($date)\n ) {\n $this->bad_request();\n }\n\n $get_role_details = $this->Common_model->get_the_role($this->user_id);\n if (!empty($get_role_details['user_role_data'])) {\n $permission_data = array(\n 'role_data' => $get_role_details['user_role_data'],\n 'module' => 3,\n 'key' => 1\n );\n $check_module_permission = $this->check_module_permission($permission_data);\n if ($check_module_permission == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('permission_error');\n $this->send_response();\n }\n }\n\n if (validate_date_only($date)) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n\n if ((!empty($blood_pressure_type) && !in_array($blood_pressure_type, $this->blood_pressure_type)) ||\n (!empty($temperature_type) && !in_array($temperature_type, $this->temperature_type)) ||\n (!empty($temperature_taken) && !in_array($temperature_taken, $this->temperature_taken)) ||\n (!empty($weight) && !is_numeric($weight))\n ) {\n\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n\n //check data belongs to the doctor or not\n $requested_data = array(\n 'appointment_id' => $appointment_id,\n 'doctor_id' => $doctor_id,\n 'clinic_id' => $clinic_id,\n 'patient_id' => $patient_id\n );\n $this->check_data_belongs_doctor($requested_data);\n\n //check vital already exists\n $data_exists_where = array(\n 'vital_report_appointment_id' => $appointment_id,\n 'vital_report_date' => $date,\n 'vital_report_status' => 1\n );\n $this->check_data_exists(TBL_VITAL_REPORTS, 'vital_report_id', $data_exists_where);\n\n //get the share settings for the vital\n $setting_where = array(\n 'setting_type' => 1,\n 'setting_user_id' => $doctor_id,\n 'setting_clinic_id' => $clinic_id\n );\n $get_setting = $this->Common_model->get_setting($setting_where);\n\n $vital_share_status = 2;\n\n if (!empty($get_setting)) {\n $setting_array = json_decode($get_setting['setting_data'], true);\n if (!empty($setting_array) && is_array($setting_array)) {\n foreach ($setting_array as $setting) {\n if ($setting['id'] == 1) {\n $vital_share_status = $setting['status'];\n break;\n }\n }\n }\n }\n\n $vital_array = array(\n 'vital_report_user_id' => $patient_id,\n 'vital_report_doctor_id' => $doctor_id,\n 'vital_report_appointment_id' => $appointment_id,\n 'vital_report_clinic_id' => $clinic_id,\n 'vital_report_date' => $date,\n 'vital_report_spo2' => $sp2o,\n 'vital_report_weight' => $weight,\n 'vital_report_bloodpressure_systolic' => $blood_pressure_systolic,\n 'vital_report_bloodpressure_diastolic' => $blood_pressure_diastolic,\n 'vital_report_bloodpressure_type' => $blood_pressure_type,\n 'vital_report_pulse' => $pulse,\n 'vital_report_temperature' => $temperature,\n 'vital_report_temperature_type' => $temperature_type,\n 'vital_report_temperature_taken' => $temperature_taken,\n 'vital_report_resp_rate' => $resp,\n 'vital_report_share_status' => $vital_share_status,\n 'vital_report_created_by' => $this->user_id,\n 'vital_report_created_at' => $this->utc_time_formated,\n 'vital_report_updated_at' => $this->utc_time_formated\n );\n\n $inserted_id = $this->Common_model->insert(TBL_VITAL_REPORTS, $vital_array);\n\n if ($inserted_id > 0) {\n delete_past_prescription($appointment_id);\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('vital_added');\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('failure');\n }\n\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "title": "" }, { "docid": "72c7a3ccd92286b38f4d2eb56fef9d9b", "score": "0.50837386", "text": "public function run(){\n\t\t$procedure_catalog_id = \\DB::table('procedure_catalog')\n\t\t\t\t\t\t\t\t->where('name','newpolicy')\n\t\t\t\t\t\t\t\t->value('id');\n\n\t\tif( !empty($procedure_catalog_id) ){\n\t\t\t$names = \\DB::table('procedure_document')\n\t\t\t\t\t\t\t\t\t->where('procedure_catalog_id', $procedure_catalog_id)\n\t\t\t\t\t\t\t\t\t->pluck('id', 'name');\n\n\t\t\t$to_insert[] = array('name'=>'form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Aplicación',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Documento Identificacion',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'id',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'paycheck',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Cheque',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'paycheck',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'prev_insurance',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Seguro anterior',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'insurance',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'invoice_form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Formulario Para Facturación',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'creditcard_auth_form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Formulario Authorazación Tarjeta Crédito',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'payment_proof',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Comprobante de Pago',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'payment_proof_bd',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Comprobante de Pago BD',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'form',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t$to_insert[] = array('name'=>'others',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'description'=>'Otros',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'type'=>'others',\n\t\t\t\t\t\t\t\t\t\t\t\t\t 'procedure_catalog_id'=>$procedure_catalog_id\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\n\t\t\tforeach( $to_insert as $obj ){\n\t\t\t\tif( !isset($names[$obj['name']]) ){\n\t\t\t\t\t\\DB::table('procedure_document')->insert([$obj]);\n\t\t\t\t}\n\t\t\t}//end foreach\n\t\t}\n\t}", "title": "" }, { "docid": "1d894797578fac0b4f3fd1d8d469caba", "score": "0.50804377", "text": "function gernateQuestonnairePDF($userdata){\n\t\t$componentParams = &JComponentHelper::getParams('com_event_manage');\n\t\t$this->chargecurrency = $componentParams->get('chargecurrency');\n\t\t$this->insurername = $componentParams->get('insurername');\n\t\t$this->insureraddress = $componentParams->get('insureraddress');\n\t\t$this->abn = $componentParams->get('abn');\n\t\t\n\t\t//$data = unserialize($userdata->data);\n\t\t$newdataArr = unserialize($userdata->data);\n\t\tforeach ($newdataArr as $page => $pvalue) {\n \t\t\tforeach ($pvalue as $key => $value) {\n \t\t\t\t\tif(is_array($value)){\n \t\t\t\t\t\t$nvalue = '';\n \t\t\t\t\t\tforeach ($value as $ackey => $acvalue) {\n \t\t\t\t\t\t\t$value[$ackey] = str_replace(\"&#039;\", \"'\", $acvalue);\n \t\t\t\t\t\t\t// $value[$ackey] = str_replace(\"&#039;\", '\"', $acvalue);\n \t\t\t\t\t\t\t$nvalue = $value;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t$newArr[$page][$key] = $nvalue;\n \t\t\t\t\t}else{\n \t\t\t\t\t\t$newArr[$page][$key] = str_replace(\"&#039;\", \"'\", $value);\n \t\t\t\t\t}\n \t\t\t\t// $newArr[$page][$key] = addslashes($value);\n \t\t\t}\n \t\t}\n \t\t\n \t\t$data = $newArr;\n \t\t// echo \"<pre>\";\n\t\t//print_r($userdata);\n\t\t// print_r($data);\n\t\t// echo \"</pre>\";\n\t\t// die;\n\t\t$class_of_policy = \"Perform-Sure Liability Insurance\";\n\t\t$policy_no = $userdata->policy_number;\n\t\t$invoice_no = \"290854\";\n\t\t$invoice_date = date(\"d/m/Y\");\n\t\t$reference = \"ROBINSONKA\";\n\t\t$FirstName = $data['page4']['firstname'];\n\t\t$LastName = $data['page4']['lastname'];\n\t\t$insured = $data['page4']['insuredname'];\n\t\t$addressline1 = $data['page4']['streetaddress1'];\n\t\t$addressline2 = $data['page4']['streetaddress2'];\n\t\t$suburb = $data['page4']['suburb'];\n\t\t/*Page3 Data */\n\t\tif($data['page3']['selfpromote'] == 'Y'){\n\t\t\t$selfpromote = 'YES';\n\t\t}else if($data['page3']['selfpromote'] == 'N'){\n\t\t\t$selfpromote = 'NO';\n\t\t}\n\n\t\tif($data['page3']['harmlessorindemnity'] == 'Y'){\n\t\t\t$harmlessorindemnity = 'YES';\n\t\t}else if($data['page3']['harmlessorindemnity'] == 'N'){\n\t\t\t$harmlessorindemnity = 'NO'; \n\t\t}\n\n\t\tif($data['page3']['subcontractors'] == 'Y'){\n\t\t\t$subcontractors = 'YES';\n\t\t}else if($data['page3']['subcontractors'] == 'N'){\n\t\t\t$subcontractors = 'NO';\n\t\t}\n\n\t\tif($data['page3']['refusedinsurance'] == 'Y'){\n\t\t\t$refusedinsurance = 'YES';\n\t\t}else if($data['page3']['refusedinsurance'] == 'N'){\n\t\t\t$refusedinsurance = 'NO';\n\t\t}\n\n\t\tif($data['page3']['liabilityclaim'] == 'Y'){\n\t\t\t$liabilityclaim = 'YES';\n\t\t}else if($data['page3']['liabilityclaim'] == 'N'){\n\t\t\t$liabilityclaim = 'NO';\n\t\t}\n\n\t\tif($data['page3']['criminaloffence'] == 'Y'){\n\t\t\t$criminaloffence = 'YES';\n\t\t}else if($data['page3']['criminaloffence'] == 'N'){\n\t\t\t$criminaloffence = 'NO';\n\t\t}\n\n\t\tif($data['page3']['dangerousactivities'] == 'Y'){\n\t\t\t$dangerousactivities = 'YES';\n\t\t}else if($data['page3']['dangerousactivities'] == 'N'){\n\t\t\t$dangerousactivities = 'NO';\n\t\t}\n\n\t\tif($data['page3']['pyrotechnics'] == 'Y'){\n\t\t\t$pyrotechnics = 'YES';\n\t\t}else if($data['page3']['pyrotechnics'] == 'N'){\n\t\t\t$pyrotechnics = 'NO';\n\t\t}\n\n\t\tif($data['page3']['animals'] == 'Y'){\n\t\t\t$animals = 'YES';\n\t\t}else if($data['page3']['animals'] == 'N'){\n\t\t\t$animals = 'NO';\n\t\t}\n\n\t\tif($data['page3']['amusementrides'] == 'Y'){\n\t\t\t$amusementrides = 'YES';\n\t\t}else if($data['page3']['amusementrides'] == 'N'){\n\t\t\t$amusementrides = 'NO';\n\t\t}\n\n\t\tif($data['page3']['workshops'] == 'Y'){\n\t\t\t$workshops = 'YES';\n\t\t}else if($data['page3']['workshops'] == 'N'){\n\t\t\t$workshops = 'NO';\n\t\t}\n\n\t\tif($data['page3']['northamerica'] == 'Y'){\n\t\t\t$northamerica = 'YES';\n\t\t}else if($data['page3']['northamerica'] == 'N'){\n\t\t\t$northamerica = 'NO';\n\t\t}\n\t\t/*Page3 End Data */\n\n\t\t$this->statename = $this->getStateName();\n\t\t$state = '';\n\t\tforeach ($this->statename as $key => $value) {\n\t\t\tif($value->id == $data['page4']['state']){\n\t\t\t\t$state = $value->name;\n\t\t\t}\t\n\t\t}\n\n\t\t$postcode = $data['page4']['postcode'];\n\t\t$startdate = date(\"d/m/Y\",strtotime($data['page1']['start_date']));\n\t\t$enddate = date(\"d/m/Y\",strtotime('+1 year',strtotime($data['page1']['start_date'])));\n\t\tif(!empty($data['page2']['premium'])){\n\t\t\t$premium = '$'.$data['page2']['premium'];\n\t\t}else{\n\t\t\t$premium = '$0.00';\n\t\t}\n\t\t\n\t\t$totalgst = round($data['page2']['gstpremium']+$data['page2']['gstfee'],2); \n\t\tif(!empty($totalgst)){\n\t\t\t$gst = '$'.$totalgst;\n\t\t}else{\n\t\t\t$gst = '$0.00';\n\t\t}\n\n\t\tif(!empty($data['page2']['stampduty'])){\n\t\t\t$stampduty = '$'.$data['page2']['stampduty'];\n\t\t}else{ \n\t\t\t$stampduty = '$0.00'; \n\t\t}\n\n\t\tif(!empty($data['page2']['brokerfee'])){\n\t\t\t$brokerfee = '$'.$data['page2']['brokerfee'];\t\n\t\t}else{\n\t\t\t$brokerfee = '$0.00';\t\n\t\t}\n\t\t/* get value from Backend */\n\t\t$currency = $this->chargecurrency;\n\t\t$insurername = $this->insurername;\n\t\t$insureraddress = $this->insureraddress;\n\t\t$abn = $this->abn;\n\t\t/* End Backend */\n\n\t\t$tp = number_format((float)$data['page6']['subtotal'], 2, '.', '');\n\t\tif(!empty($tp)){\n\t\t\t$totalpremium = '$'.$tp;\n\t\t}else{\n\t\t\t$totalpremium = '$0.00';\n\t\t}\n\n\t\t$totalcommission = round($data['page2']['commission']+$data['page2']['gstcommission'],2); \n\t\tif(!empty($totalcommission)){\n\t\t\t$commission = '$'.$totalcommission;\t\n\t\t}else{\n\t\t\t$commission = '$0.00';\n\t\t}\n\t\t\n\t\t$creditcardfee = '$'.round($data['page6']['subtotal']*1.5/100,2);\n\t\t$activity = '';\n\t\tforeach ($data['page1']['activity'] as $avalue) {\n\t\t\t$activity .= $avalue.',';\n\t\t}\n\t\t$activity = substr($activity,0,-1);\n\t\t$this->perfomers = $this->getTerm('Perfomers');\n\t\tforeach ($this->perfomers as $pvalue) {\n\t\t\tif($data['page1']['perfomers'] == $pvalue->price){\n\t\t\t\t$perf = $pvalue->name;\n\t\t\t}\n\t\t}\n\t\t/* OLD */\n\t\t\t//$performers = $perf;\n\t\t/* NEW */\n\t\t\t$performers = $data['page1']['perfomers'];\n\t\t$performers = $perf;\n\t\tif(!empty($data['page6']['publicliailitycover'])){\n\t\t\t$publicliability = number_format($data['page6']['publicliailitycover']);\n\t\t}else{\n\t\t\t$publicliability = '$0.00';\n\t\t}\n\n\t\t$this->Extracharegs = $this->getTerm('Excharge');\n\t\t$this->ExtraCharegsByOrderId = $this->getExtraFieldByOrder($userdata->id);\n\t\t$charges = 0;\n\t\tif(!empty($this->Extracharegs)){\n\t\t\t$Extrachreges = $this->Extracharegs;\n\t\t\tforeach ($Extrachreges as $evalue) {\n\t\t\t\t$charges += $evalue->price;\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($this->ExtraCharegsByOrderId)){\n\t\t\t$ChregesByOrderId = $this->ExtraCharegsByOrderId;\n\t\t\tforeach ($ChregesByOrderId as $cvalue) {\n\t\t\t\t$charges += $cvalue->price;\n\t\t\t}\n\t\t}\n\t\tif(!empty($charges)){\n\t\t\t$TotalExtras = '$'.round($charges,2);\t\n\t\t}else{\n\t\t\t$TotalExtras = '$0.00';\t\n\t\t}\n\t\t$gernatedate = date('dmYHis');\n\t\t// $filename = $policy_no.'_'.$gernatedate.'.pdf';\n\t\t$filename3 = 'Performsure - Questionnaire Response Summary - '.$policy_no.'.pdf';\n\t\t// require_once('tcpdf/tcpdf.php');\n\t\trequire_once(JPATH_ROOT.'/components/pdf/tcpdf_extend_questionnaire.php');\n\n\t\t// create new PDF document\n\t\t$pdf3 = new TCPDF_EXTEND_QUESTIONNARIE(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);\n\n\t\t$pdf3->class_of_policy = \"Perform-Sure Liability Insurance\";\n\t\t$pdf3->insurername = $insurername;\n\t\t$pdf3->insureraddress = $insureraddress;\n\t\t$pdf3->abn = $abn;\n\t\t$pdf3->policy_no = $policy_no;\n\t\t$pdf3->invoice_date = $invoice_date;\n\t\t$pdf3->invoice_no = $invoice_no;\n\t\t$pdf3->reference = $reference;\n\t\t$pdf3->insured = $insured;\n\t\t$pdf3->addressline1 = $addressline1;\n\t\t$pdf3->addressline2 = $addressline2;\n\t\t$pdf3->suburb = $suburb;\n\t\t$pdf3->states = $state;\n\t\t$pdf3->postcode = $postcode;\n\t\t$pdf3->startdate = $startdate;\n\t\t$pdf3->enddate = $enddate;\n\t\t$pdf3->premium = $premium;\n\t\t$pdf3->gst = $gst;\n\t\t$pdf3->stampduty = $stampduty;\n\t\t$pdf3->brokerfee = $brokerfee;\n\t\t$pdf3->currency = $currency;\n\t\t$pdf3->totalpremium = $totalpremium;\n\t\t$pdf3->commission = $commission;\n\t\t$pdf3->creditcardfee = $creditcardfee;\n\t\t$pdf3->activity = $activity;\n\t\t$pdf3->performers = $performers;\n\t\t$pdf3->publicliability = $publicliability;\n\t\t$pdf3->totalextras = $TotalExtras;\n\t\t$pdf3->questionnairedate = date('j F Y');\n\t\t/*Page3 Data*/\n\t\t$pdf3->selfpromote = $selfpromote;\n\t\t$pdf3->harmlessorindemnity = $harmlessorindemnity;\n\t\t$pdf3->subcontractors = $subcontractors;\n\t\t$pdf3->refusedinsurance = $refusedinsurance;\n\t\t$pdf3->liabilityclaim = $liabilityclaim;\n\t\t$pdf3->criminaloffence = $criminaloffence;\n\t\t$pdf3->dangerousactivities = $dangerousactivities;\n\t\t$pdf3->pyrotechnics = $pyrotechnics;\n\t\t$pdf3->animals = $animals;\n\t\t$pdf3->amusementrides = $amusementrides;\n\t\t$pdf3->workshops = $workshops;\n\t\t$pdf3->northamerica = $northamerica;\n\t\t/*End Page3 Data*/\n\t\t\n\t\t$pdf3->FirstName = ucfirst($FirstName);\n\t\t$pdf3->LastName = ucfirst($LastName);\n\n\t\t// set document information\n\t\t$pdf3->SetCreator(PDF_CREATOR);\n\t\t$pdf3->SetAuthor('Insurance');\n\t\t$pdf3->SetTitle('Insurance Test PDF');\n\t\t$pdf3->SetSubject('Test Subject');\n\t\t$pdf3->SetKeywords('Insurance');\n\n\t\t$pdf3->setPrintFooter(true);\n\n\t\t// set default monospaced font\n\t\t// $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n\t\t// set margins\n\t\t// $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n\t\t$pdf3->SetMargins(5, 10, 5);\n\t\t$pdf3->SetHeaderMargin(10);\n\t\t$pdf3->SetFooterMargin(31);\n\n\t\t$pdf3->SetAutoPageBreak(TRUE, 5);\n\n\t\t$pdf3->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\t\t$pdf3->setPageOrientation('P',TRUE,10);\n\n\t\t// set some language-dependent strings (optional)\n\t\t// if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n\t\t// \trequire_once(dirname(__FILE__).'/lang/eng.php');\n\t\t// \t$pdf->setLanguageArray($l);\n\t\t// }\n\n\t\t// ---------------------------------------------------------\n\n\t\t// set default font subsetting mode\n\t\t$pdf3->setFontSubsetting(true);\n\n\t\t$pdf3->SetFont('times', '', 11, '', true);\n\n\n$pdf3->AddPage();\n$first_page = <<<EOD\n\t<table width=\"100%\">\n\t\t<tr>\n\t\t\t<td align=\"center\"><img src=\"components/pdf/new_logo.png\" /></td>\n\t\t</tr>\n\t</table>\n\t<br/>\n\t<table width=\"100%\" cellpadding=\"10\">\n\t\t<tr>\n\t\t\t<td>Date: $pdf3->questionnairedate</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Policy Number: $pdf3->policy_no</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Dear $pdf3->FirstName&nbsp;$pdf3->LastName</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Thank you for purchasing your insurance with Action Entertainment Insurance.</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Please find below a summary of the responses you provided us when completing your Performsure Online Insurance Quotation</td>\n\t\t</tr>\n\t</table>\n\t<br/>\n\t<table width=\"100%\" cellpadding=\"5\">\n\t\t<tr><td><div><b>&nbsp;&nbsp;QUESTIONNAIRE RESPONSES</b></div></td></tr>\n\t\t<tr><td width=\"05%\">&nbsp;</td><td width=\"95%\">1. Do you intend to hire out a performance venue to self-promote or stage your own performance? <b>$pdf3->selfpromote</b> </td></tr><br/>\n\t\t<tr><td width=\"05%\">&nbsp;</td><td width=\"95%\">2. Will you be signing any contracts that contain hold harmless or indemnity agreements? <b>$pdf3->harmlessorindemnity</b> </td></tr><br/>\n\t\t<tr><td width=\"05%\">&nbsp;</td><td width=\"95%\">3. Do you use subcontractors? <b>$pdf3->subcontractors</b> </td></tr><br/>\n\t\t<tr><td width=\"05%\">&nbsp;</td><td width=\"95%\">4. Have you previously been refused insurance or had your insurance cancelled by an insurer or have had special <br/>&nbsp;&nbsp;&nbsp;&nbsp;conditions, increased premiums or increased excesses imposed on any policy of insurance by an insurer? <b>$pdf3->refusedinsurance</b> </td></tr><br/>\n\t\t<tr><td width=\"05%\">&nbsp;</td><td width=\"95%\">5. Have you suffered any public liability claims or have caused incidents that give rise to public liability claim? <b>$pdf3->liabilityclaim</b> </td></tr><br/>\n\t\t<tr><td width=\"05%\">&nbsp;</td><td width=\"95%\">6. Have you been charged or convicted of a criminal offence (excluding driving convictions) in the last 10 years? <b>$pdf3->criminaloffence</b> </td></tr><br/>\n\t\t<tr>\n\t\t\t<td width=\"05%\">&nbsp;</td>\n\t\t\t<td>\n\t\t\t\t<div>7. Will your performance activities include:</div>\n\t\t\t\t<table width=\"100%\" cellpadding=\"5\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"05%\">&nbsp;</td>\n\t\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t\t\t<div>a. Audience participation with use of fire, sporting, hazardous or dangerous activities: <b>$pdf3->dangerousactivities</b> </div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"05%\">&nbsp;</td>\n\t\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t\t\t<div>b. Fireworks or pyrotechnics: <b>$pdf3->pyrotechnics</b> </div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"05%\">&nbsp;</td>\n\t\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t\t\t<div>c. Use of animals: <b>$pdf3->animals</b> </div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"05%\">&nbsp;</td>\n\t\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t\t\t<div>d. Use of amusement rides or devices: <b>$pdf3->amusementrides</b> </div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"05%\">&nbsp;</td>\n\t\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t\t\t<div>e. Running of workshops: <b>$pdf3->workshops</b> </div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"05%\">&nbsp;</td>\n\t\t\t\t\t\t<td width=\"95%\">\n\t\t\t\t\t\t\t<div>f. Any activities conducted in North America: <b>$pdf3->northamerica</b> </div>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\nEOD;\n$pdf3->writeHTMLCell(0, 0, '', '', $first_page, 0, 1, 0, true, '', true);\n\n// ---------------------------------------------------------\n\n// Close and output PDF document\n// This method has several options, check the source code documentation for more information.\n$filepath = 'components/pdf/'.$filename3;\n$path = JPATH_ROOT.'/'.$filepath;\n$pdf3->Output($path, 'F');\n// $pdf->Output(JPATH_ROOT.'/components/pdf/questionnaire.pdf', 'I');\n\n//============================================================+\n// END OF FILE\n//============================================================+\n\tif (file_exists($path)) {\n\t\treturn $path;\n\t}\n\n}", "title": "" }, { "docid": "427caa83c3131f39f6475c006948cd85", "score": "0.50641936", "text": "function planPractice()\r\n {\r\n\r\n }", "title": "" }, { "docid": "f6e088d6c386b750f81d67b0ef6dfc17", "score": "0.5037062", "text": "public static function kal_prepare_action($action,$pid,$datum,$call_num,$error,$str) {\r\n # Folgende Daten werden in dieser Reihenfolge zurueck gegeben, als nummeriertes\r\n # Arrays (Nummerierung ab 0):\r\n # - aktualisierter Wert von $call_num\r\n # - naechste Aktion ($nextaction=$action/ACTION_START)\r\n # - aktualisierter Wert von $error\r\n # - HTML-Code eines Formulars zur Eingabe/Korrektur des Termins\r\n # - Array des aktualisierten Termins (ohne Termin-Id)\r\n # Neben dem Formular wird eine Fehlermeldung zurueck gegeben, wenn Pflichtfelder\r\n # nicht ausgefuellt sind oder Datums-Zeitangaben formal falsch sind.\r\n # Die Formularparameter werden per POST-Parameter VALUE_NAME.$i uebermittelt\r\n # ($i=1,...,count($cols)-1, $cols = Namen der Tabellenspalten).\r\n # $action aktuelle Aktion (ACTION_INSERT, ACTION_UPDATE, ACTION_COPY)\r\n # $pid Id des Termins (ggf. auch =0, d.h. Termin noch nicht eingetragen)\r\n # $datum vorgegebenes Datum des Termins ($action==ACTION_INSERT/ACTION_COPY)\r\n # $call_num Nummer des Durchlaufs der Aktionsfunktion, wird ggf.\r\n # von 1 auf 2 gesetzt\r\n # $error ='', wird ggf. durch eine Fehlermeldung ersetzt\r\n # $str ='', wird durch den HTML-Code des Formulars ersetzt\r\n # benutzte functions:\r\n # self::kal_proof_termin($termin)\r\n # self::kal_action($action,$pid)\r\n # self::kal_eingabeformular()\r\n # kal_termine_config::kal_define_tabellenspalten()\r\n # kal_termine_tabelle::kal_select_termin_by_pid($pid)\r\n # kal_termine_tabelle::kal_exist_termin($termin)\r\n #\r\n $cols=kal_termine_config::kal_define_tabellenspalten();\r\n $keys=array_keys($cols);\r\n $nextaction=$action;\r\n $str='';\r\n $error='';\r\n #\r\n # --- Formular einfuellen\r\n if($pid<=0):\r\n #\r\n # --- Fehlermeldung, falls nicht die Id eines existierenden Termins vorgegeben wurde\r\n if($action!=ACTION_INSERT):\r\n $txt='';\r\n if($action==ACTION_UPDATE) $txt='korrigierender';\r\n if($action==ACTION_COPY) $txt='kopierender';\r\n if(!empty($txt)) $error='<span class=\"kal_fail\">Kein zu '.$txt.' Termin angegeben</span>';\r\n endif;\r\n #\r\n # --- leeren Termin setzen\r\n $termin=array();\r\n $termin[COL_PID]=$pid;\r\n for($i=1;$i<count($keys);$i=$i+1):\r\n $key=$keys[$i];\r\n $val='';\r\n # ggf. vorgegebenes Datum beruecksichtigen\r\n if($action==ACTION_INSERT and $key==COL_DATUM and !empty($datum)) $val=$datum;\r\n $termin[$keys[$i]]=$val;\r\n endfor;\r\n else:\r\n #\r\n # --- zu korrigierenden/kopierenden Termin aus der Datenbanktabelle holen\r\n $termin=kal_termine_tabelle::kal_select_termin_by_pid($pid);\r\n if(count($termin)<=0):\r\n $error='<span class=\"kal_fail\">Der Termin ('.COL_PID.'='.$pid.') wurde nicht gefunden</span>';\r\n $termin[COL_PID]=$pid;\r\n for($i=1;$i<count($keys);$i=$i+1) $termin[$keys[$i]]='';\r\n endif;\r\n endif;\r\n #\r\n # --- alte Termindaten als Formulardaten uebernehmen (nur beim ersten Mal)\r\n $firstcall=TRUE;\r\n for($i=1;$i<count($keys);$i=$i+1):\r\n $sti=$i;\r\n if($i<=9) $sti='0'.$i;\r\n if(!empty($_POST[VALUE_NAME.$sti])) $firstcall=FALSE; // zweiter Durchlauf\r\n endfor;\r\n if($firstcall): \r\n for($i=1;$i<count($keys);$i=$i+1):\r\n $key=$keys[$i];\r\n $val=$termin[$key];\r\n # Termin-Kopie: zum eintaegigen Einzeltermin machen und das aktuelle Datum einfuegen\r\n if($action==ACTION_COPY and $key==COL_TAGE) $val=1;\r\n if($action==ACTION_COPY and $key==COL_WOCHEN) $val=0;\r\n if($action==ACTION_COPY and $key==COL_DATUM) $val=$datum;\r\n $sti=$i;\r\n if($i<=9) $sti='0'.$i;\r\n $_POST[VALUE_NAME.$sti]=$val;\r\n endfor;\r\n endif;\r\n #\r\n # --- neue Termindaten aus den Formulardaten uebernehmen\r\n if(empty($error)):\r\n $termin=array();\r\n $termin[$keys[0]]='';\r\n for($i=1;$i<count($keys);$i=$i+1):\r\n $sti=$i;\r\n if($i<=9) $sti='0'.$i;\r\n $val='';\r\n if(!empty($_POST[VALUE_NAME.$sti])) $val=$_POST[VALUE_NAME.$sti];\r\n $termin[$keys[$i]]=$val;\r\n endfor;\r\n #\r\n # --- formale Ueberpruefung der Termindaten\r\n $error=self::kal_proof_termin($termin);\r\n #\r\n # --- kopierter Termin muss sich vom Quell-Termin unterscheiden (ACTION_COPY)\r\n if(empty($error) and $action==ACTION_COPY):\r\n $pex=kal_termine_tabelle::kal_exist_termin($termin);\r\n if($pex==$pid) $error='<span class=\"kal_fail\">Die Kopie braucht '.\r\n 'ein anderes Datum oder eine andere Uhrzeit!</span>';\r\n endif;\r\n endif;\r\n #\r\n # --- Formularausgabe\r\n if($firstcall or !empty($error)):\r\n # Ueberschrift\r\n $ueber='Eintragen';\r\n if($action==ACTION_UPDATE) $ueber='Korrigieren';\r\n if($action==ACTION_COPY) $ueber='Kopieren';\r\n $str=$str.'\r\n<h4 align=\"center\">'.$ueber.' eines Termins</h4>\r\n<form method=\"post\">';\r\n # Fuellen der Formularfelder\r\n $str=$str.self::kal_eingabeformular();\r\n # Ausgabe einer Fehlermeldung\r\n if(!empty($error)) $str=$str.'\r\n<div class=\"'.CSS_EINFORM.'\">\r\n<table class=\"kal_table\">\r\n <tr><th class=\"th_einf left\"></th>\r\n <td class=\"td_einf\">'.$error.'</td></tr>\r\n</table>\r\n</div>\r\n';\r\n # --- Ausgabe der Radio-Buttons (Korrigieren / Abbruch) und Submit-Button\r\n $str=$str.'<br>'.self::kal_action($nextaction,$pid).'</form>\r\n';\r\n else:\r\n $call_num=2;\r\n endif;\r\n #\r\n # --- naechste Aktion: zurueck zum Startmenue\r\n if(!$firstcall and empty($error)) $nextaction=ACTION_START;\r\n #\r\n return array($call_num,$nextaction,$error,$str,$termin);\r\n }", "title": "" }, { "docid": "aa25a0655beb3c008d6c0959233d4113", "score": "0.5036853", "text": "function insertarPresolicitudDet(){\n\t\t$this->procedimiento='adq.ft_presolicitud_det_ime';\n\t\t$this->transaccion='ADQ_PRED_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('descripcion','descripcion','text');\n\t\t$this->setParametro('cantidad_sol','cantidad','numeric');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('id_solicitud_det','id_solicitud_det','int4');\n\t\t$this->setParametro('id_presolicitud','id_presolicitud','int4');\n\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "bf2e2d14c4ddcc7fcfa475d4bafbb260", "score": "0.50356567", "text": "function ctlDisplayNewPatient(){\n\tdisplayNewPatient();\n}", "title": "" }, { "docid": "b6dbbeaf06efe445624aa6bff8e96fa2", "score": "0.5033705", "text": "public function pdf($i,$id_datosBasicos,$id_periodo){\n \n\n }", "title": "" }, { "docid": "6e28b0b29cb1c4fa29366be96881518e", "score": "0.5031256", "text": "public function create()\n {\n return view('admin.procedure.create');\n }", "title": "" }, { "docid": "9ab5b87e7b78fab8ebdafcfaee6ea5e7", "score": "0.5030436", "text": "function ctlAddOrUpdatePatient($nss,$nom,$prenom,$adresse,$numTel,$date,$dep,$pays,$solde) {\n if($pays=='') $pays='France';\n $t=Array($nss,$nom,$prenom,$adresse,$numTel,$date,$dep,$pays,$solde);\n $i=0;\n foreach($t as $var){\n if($i==8 && $solde==0) continue;\n if (empty($var))throw new Exception ('Un des champs est vide'.$var);\n $i++;\n }\n if(!preg_match(\"#^[0-9]{15}$#\", $nss))throw new Exception ('Nss invalide');\n if(!preg_match(\"#^0[0-9]{9}$#\", $numTel))throw new Exception ('NumTel invalide');\n \n //test date\n if(!preg_match(\"#^[0-9]{4}-[0-9]{2}-[0-9]{2}$#\", $date))throw new Exception ('Format date invalide');\n $year=intval(substr($date,0,4));\n $mouth=intval(substr($date,6,2));\n $day=intval(substr($date,9,2));\n// pb format date quand thomas execute, date => 2015-6-1\n //if(!checkdate($mouth,$day,$year))throw new Exception ('Date invalide');\n \n $patient=searchPatient($nss);\n if($patient==null){\n addPatient($nss,$nom,$prenom,$adresse,$numTel,$date,$dep,$pays,$solde);\n }\n else {\n updatePatient($nss,$nom,$prenom,$adresse,$numTel,$date,$dep,$pays,$solde);\n }\n displayConnexionAgent();\n}", "title": "" }, { "docid": "957a84e9b237ad7613946aa38987d56d", "score": "0.5022537", "text": "function procurement_record_details()\n\t{\n\t\t# Get the passed details into the url data array if any\n\t\t$urldata = $this->uri->uri_to_assoc(3, array('m', 'b'));\n\n\t\t# Pick all assigned data\n\t\t$data = assign_to_data($urldata);\n\t\t$notify = 0;\n\t\tif(!empty($data['notification'])){\n\t\t\t$notify = 1;\n\t\t}\n\n\t\tif(!empty($_POST['ifbquantity']))\n\t\t{\n\t\t\t$data['ifbquantity'] = mysql_real_escape_string($_POST['ifbquantity']);\n\t\t}\n\n\t\tif($this->input->post('proc_id'))\n\t\t{\n\t\t\t$_POST = clean_form_data($_POST);\n\n\t\t\t$app_select_str = ' procurement_plan_entries.isactive=\"Y\" ';\n\n\t\t\tif($this->session->userdata('isadmin') == 'N')\n\t\t\t{\n\t\t\t\t$userdetails = $this->db->get_where('users', array('userid'=>$this->session->userdata('userid')))->result_array();\n\t\t\t\t$app_select_str .= ' AND procurement_plans.pde_id =\"'. $userdetails[0]['pde'] .'\"';\n\t\t\t}\n\n\t\t\t#$query = $this->Query_reader->get_query_by_code('ProcurementPlanDetails', array('searchstring'=>$app_select_str . ' AND procurement_plan_entries.id=\"'. $_POST['proc_id'] .'\"', 'limittext'=>'', 'orderby'=>' procurement_plan_entries.dateadded ' ));\n\t\t\t#print_r($query); exit();\n\t\t\t//procurement details\n\n\t\t\t#$data['procurement_details'] = $this->Query_reader->get_row_as_array('ProcurementPlanDetails', array('searchstring'=>$app_select_str . ' AND receipts.beb=\"Y\" AND procurement_plan_entries.id=\"'. $_POST['proc_id'] .'\"', 'limittext'=>'', 'orderby'=>' procurement_plan_entries.dateadded ' ));\n\n\t\t\t$data['procurement_details'] = $this->Query_reader->get_row_as_array('ProcurementPlanDetails', array('searchstring'=>$app_select_str . ' AND procurement_plan_entries.id=\"'. $_POST['proc_id'] .'\"', 'limittext'=>'', 'orderby'=>' procurement_plan_entries.dateadded ' ));\n\n\t\t\t$data['ifb_quantity'] = 0;\n\n\t\t\tif(!empty($data['bidid']))\n\t\t\t{\n\t\t\t\t$ifbquantity_edit = $this->db->query(\"SELECT quantity FROM bidinvitations WHERE id=\".decryptValue($data['bidid']).\"\")->result_array();\n\t\t\t\t$data['ifb_quantity'] = $ifbquantity_edit[0]['quantity'];\n\t\t\t}\n\n\t\t\t#get provider info\n\t\t\tif(!empty($data['b'])):\n\t\t\t\t$data['provider'] = $this->Query_reader->get_row_as_array('get_IFB_BEB', array('searchstring'=> ' AND BI.procurement_id=\"'.\n\t\t\t\t\t\t$_POST['proc_id'] .'\" AND beb=\"Y\"'));\n\n\t\t\t\tif(!empty($data['provider']) && empty($data['provider']['providerid'])):\n\t\t\t\t\t$jv_info = $this->db->query('SELECT * FROM joint_venture WHERE jv = \"'. $data['provider']['joint_venture'] .'\"')->result_array();\n\t\t\t\t\tif(!empty($jv_info[0]['providers'])):\n\t\t\t\t\t\t$providers = $this->db->query('SELECT * FROM providers WHERE providerid IN ('. rtrim($jv_info[0]['providers'], ',') .')')->result_array();\n\t\t\t\t\t\t$data['provider']['providernames'] = '';\n\n\t\t\t\t\t\tforeach($providers as $provider):\n\t\t\t\t\t\t\t$data['provider']['providernames'] .= (!empty($data['provider']['providernames'])? ', ' : '').\n\t\t\t\t\t\t\t\t\t$provider['providernames'];\n\t\t\t\t\t\tendforeach;\n\n\t\t\t\t\tendif;\n\t\t\t\tendif;\n\n\t\t\t\t#exit($this->db->last_query());\n\t\t\tendif;\n\t\t}\n\n\t\t// $data['area'] = 'procurement_record_details';\n\n\t\t// $this->load->view('includes/add_ons', $data);\n\n\n\t\tif($notify == 1){\n\n\t\t\tprint_r($data['provider']['providername']);\n\n\n\t\t\tif(!empty($data['provider']['providername'])){\n\t\t\t\tprint_r($data['provider']['providerid']);\n\t\t\t\t$providerid = $data['provider']['providerid'];\n\t\t\t\tif(is_numeric($providerid))\n\t\t\t\t{\n\n\t\t\t\t\t$procurementdetails = $this->db->query('SELECT * FROM providers WHERE providerid IN ('.rtrim($data['provider']['providerid'],',').') ' ) -> result_array();\n\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t#$query = 'SELECT * FROM providers WHERE providerid IN (SELECT TRIM(TRAILING \",\" FROM providers) FROM joint_venture\t WHERE jv = \"'.$data['provider']['providername'].'\" ) ';\n\t\t\t\t\t#echo $query;\n\t\t\t\t\t$procurementdetails = $this->db->query('SELECT * FROM providers WHERE providerid IN (SELECT TRIM(TRAILING \",\" FROM providers) FROM joint_venture\t WHERE jv = \"'.$data['provider']['providername'].'\" ) ' ) -> result_array();\n\n\t\t\t\t}\n\n\t\t\t\t#print_r($procurementdetails);\n\t\t\t\t$providers = '<ul>';\n\t\t\t\t$xc = '';\n\t\t\t\t#$suspended = '';\n\t\t\t\t$status = 0;\n\t\t\t\tforeach ($procurementdetails as $key => $value) {\n\n\t\t\t\t\t#check provider\n\t\t\t\t\t$xc = searchprovidervalidity($value['providernames']);\n\t\t\t\t\tif(!empty($xc))\n\t\t\t\t\t{\n\t\t\t\t\t\t$status =1;\n\t\t\t\t\t\t$providers .= \"<li> \".$value['providernames'].\" \".'</li>';\n\t\t\t\t\t\t# $suspended .= $value['providernames'].',';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$providers .= '<ul>';\n\n\n\n\t\t\t\t$rand = rand(23454,83938);\n\n\t\t\t\t$this->session->set_userdata('level','ppda');\n\t\t\t\t$userid = $this->session->userdata('userid');\n\t\t\t\t$query1 = $this->db->query(\"SELECT CONCAT(firstname,',',lastname) AS names FROM users WHERE userid=\".$userid .\" limit 1\")-> result_array();\n\t\t\t\t$level = \"Disposal\";\n\t\t\t\t$entity = $this->session->userdata('pdeid');\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM pdes WHERE pdeid=\".$entity.\" limit 1\")-> result_array();\n\t\t\t\t$entityname = $query[0]['pdename'];\n\n\t\t\t\t$titles = \" Attemp to award a contract to suspended provider(s) by \".$entityname.\" -CO \".$rand.\" \";\n\n\t\t\t\t$body = \" <h2> SUSPENDED PROVIDER</H2> \";\n\t\t\t\t$body .=\"<table><tr><th> Organisation(S) </th><td>\".$providers.\" </td></tr>\";\n\t\t\t\t$body .=\"<tr><th>Admininstrator </th><td>\".$query1[0]['names'].\" </td></tr>\";\n\t\t\t\t$body .=\"<tr><th> Date </th><td>\".Date('Y m-d').\" </td></tr>\";\n\t\t\t\t$body .= \"</table>\";\n\t\t\t\t$permission = \"view_disposal_plans\";\n\n\t\t\t\tpush_permission($titles,$body,$level,$permission);\n\n\n\n\t\t\t}\n\t\t}\n\t\telse{\n\n\t\t\t$data['area'] = 'procurement_record_details';\n\n\t\t\t$this->load->view('includes/add_ons', $data);\n\t\t}\n\n\t}", "title": "" }, { "docid": "088157fd78998276a926fe8d0d14e6a1", "score": "0.5016326", "text": "public function spSelect($procedure,$input);", "title": "" }, { "docid": "22deb95bde20cdace31f59f37d974c98", "score": "0.50146747", "text": "public function sent_to_proquest() {\n $this->premis->addEvent(\"administrative\",\n \"Submitted to Proquest by ETD system\",\n \"success\", array(\"software\", \"etd system\"));\n }", "title": "" }, { "docid": "2d27dfe0c6058cc0cceaf89c30524fc8", "score": "0.50139654", "text": "public function data_proc(){\n\t\tif($this->stage){\n\t\t\t$extra_filter = ' AND stage = \"'.$this->stage.'\"';\n\t\t}else{\n\t\t\t$extra_filter = ' AND (stage = \"\" OR stage = 0 OR stage IS NULL)';\n\t\t}\n\t\t$args = func_get_args();\n\t\t$this->proc->mod['filter'] = 'formname=\"'.$this->check_form['nam'].'\"'.$extra_filter;\n\t\t$this->proc->mod['index'] = 1;\n\t\t$this->proc->fetch('sys_dataproc');\n\t\t$prc_qty = $this->proc->tab['sys_dataproc']['qty'];\n\t\t$prc_act = $this->proc->tabdata['sys_dataproc'];\n\t\t//ech($prc_act);\n\t\tfor($di=0;$di<$prc_qty;$di++){\n\t\t\t$row_id = $prc_act[$di]['row_id'];\n\t\t\t$formname = $prc_act[$di]['formname'];\n\t\t\t$stage = $prc_act[$di]['stage'];\n\t\t\t$restype = $prc_act[$di]['restype'];\n\t\t\t$resvar = $prc_act[$di]['resvar'];\n\t\t\t$resparam = $prc_act[$di]['resparam'];\n\t\t\t$type1 = $prc_act[$di]['type1'];\n\t\t\t$var = $prc_act[$di]['var'];\n\t\t\t$param = $prc_act[$di]['param'];\n\t\t\t$tinstance = $this->formvars[$prc_act[$di]['instance']]; \n\t\t\t$prockind = $prc_act[$di]['prockind'];\n\t\t\t$value = $prc_act[$di]['value'];\n\t\t\tif($value){\n\t\t\t\t$val = $value; \n\t\t\t}else{\n\t\t\t\tif($type1){\n\t\t\t\t\tif($var){\n\t\t\t\t\t\tif($param){\n\t\t\t\t\t\t\t$val=parse_obj($this->formdata[$type1][$var], $param);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$val=$this->formdata[$type1][$var];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$val=$this->formdata[$type1];\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif($param){\n\t\t\t\t\t\t$val=$this->formvars[$var][$param];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$val=$this->formvars[$var];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($restype){\n\t\t\t\tif($resvar){\n\t\t\t\t\tif($resparam){\n\t\t\t\t\t\t$this->formdata[$restype][$resvar][$resparam] = func($prockind, $val, $tinstance);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t//echo '<br />$restype '.$restype.', $resvar '.$resvar;\n\t\t\t\t\t\t$this->formdata[$restype][$resvar] = func($prockind, $val, $tinstance);\n\t\t\t\t\t\t//echo ', $prockind '.$prockind.', $val '.$val.', $tinstance'.$tinstance;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->formdata[$restype] = func($prockind, $val, $tinstance);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif($resparam){\n\t\t\t\t\t$this->formvars[$resvar][$resparam] = func($prockind, $val, $tinstance);\n\t\t\t\t}else{\n\t\t\t\t\t$this->formvars[$resvar] = func($prockind, $val, $tinstance);\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($res);\n\t\t}\n\t\t$actres = $this->sys_actions();\n\t\t/*\n\t\t// из за этого цикла обнуляется сессионная переменная username\n\t\tif(is_array($this->formdata['SESSION'])){\n\t\t\tforeach($this->formdata['SESSION'] as $key=>$val){\n\t\t\t\t$_SESSION[$key] = $val;\n\t\t\t}\n\t\t}\n\t\t*/\n\t\t//ech($this->formdata);\n\t\t//echo '<br />END of data_proc $di: '.$di;\n\t\treturn($this->formdata);\n\t}", "title": "" }, { "docid": "385ebb1bed11db3c95cf6159aa71f582", "score": "0.50129926", "text": "private function deletePatient(){\n $VPatientsDB=USingleton::getInstance('VPatientsDB');\n $encCF=$VPatientsDB->get('p');\n \n $posCF=$this->getCfPosition($encCF);\n $cfPatient=EPatient::$istances[$posCF]->getCF();\n \n \n if ( $VPatientsDB->get('conf')==\"yes\" ){\n $FPatient=USingleton::getInstance('FPatient');\n $FCheckup= USingleton::getInstance('FCheckup');\n \n $FPatient->deletePatient($cfPatient);\n $FCheckup->deleteCheckup($cfPatient,\"all\"); //oltre al paziente cancello anche tutte le sue visite\n $message=\"eliminazione completata con successo\";\n $this->bodyHTML=$VPatientsDB->getInfoMessage($message,true);\n }\n else {\n $this->bodyHTML=$VPatientsDB->showPatientConfirmPage($cfPatient);\n }\n\t\t}", "title": "" }, { "docid": "e205c48100d8e4ed34ed8793be69ae92", "score": "0.500422", "text": "function modificarConceptoPartida(){\n\t\t$this->procedimiento='pre.f_concepto_partida_ime';\n\t\t$this->transaccion='PRE_CONP_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_concepto_partida','id_concepto_partida','int4');\n\t\t$this->setParametro('id_partida','id_partida','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "2450c0289a42f7c18bb921bbd72eac1e", "score": "0.4962189", "text": "function saveconsultation(){\n\t\t$data[\"recept_id\"] = $_POST['recept_id'];\n\t\t$data[\"queue_id\"] = $_POST['queue_id'];\n\t\t$data[\"patient_id\"] = $_POST['patient_id'];\n\t\techo json_encode($this->crud_model->save_consult_for_patient($data));\n\t}", "title": "" }, { "docid": "f84d826ea93f75250f06ddf6b3159c24", "score": "0.49607527", "text": "public function edit_vital_for_patient_post() {\n\n try {\n\n $vital_id = !empty($this->Common_model->escape_data($this->post_data['vital_id'])) ? trim($this->Common_model->escape_data($this->post_data['vital_id'])) : '';\n $clinic_id = !empty($this->Common_model->escape_data($this->post_data['clinic_id'])) ? trim($this->Common_model->escape_data($this->post_data['clinic_id'])) : '';\n $doctor_id = !empty($this->Common_model->escape_data($this->post_data['doctor_id'])) ? trim($this->Common_model->escape_data($this->post_data['doctor_id'])) : '';\n $patient_id = !empty($this->Common_model->escape_data($this->post_data['patient_id'])) ? trim($this->Common_model->escape_data($this->post_data['patient_id'])) : '';\n $appointment_id = !empty($this->Common_model->escape_data($this->post_data['appointment_id'])) ? trim($this->Common_model->escape_data($this->post_data['appointment_id'])) : '';\n $date = !empty($this->Common_model->escape_data($this->post_data['date'])) ? trim($this->Common_model->escape_data($this->post_data['date'])) : '';\n $sp2o = !empty($this->Common_model->escape_data($this->post_data['sp2o'])) ? trim($this->Common_model->escape_data($this->post_data['sp2o'])) : '';\n $weight = !empty($this->Common_model->escape_data($this->post_data['weight'])) ? trim($this->Common_model->escape_data($this->post_data['weight'])) : '';\n $blood_pressure_systolic = !empty($this->Common_model->escape_data($this->post_data['blood_pressure_systolic'])) ? trim($this->Common_model->escape_data($this->post_data['blood_pressure_systolic'])) : '';\n $blood_pressure_diastolic = !empty($this->Common_model->escape_data($this->post_data['blood_pressure_diastolic'])) ? trim($this->Common_model->escape_data($this->post_data['blood_pressure_diastolic'])) : '';\n $blood_pressure_type = !empty($this->Common_model->escape_data($this->post_data['blood_pressure_type'])) ? trim($this->Common_model->escape_data($this->post_data['blood_pressure_type'])) : '';\n $pulse = !empty($this->Common_model->escape_data($this->post_data['pulse'])) ? trim($this->Common_model->escape_data($this->post_data['pulse'])) : '';\n $temperature = !empty($this->Common_model->escape_data($this->post_data['temperature'])) ? trim($this->Common_model->escape_data($this->post_data['temperature'])) : '';\n $temperature_type = !empty($this->Common_model->escape_data($this->post_data['temperature_type'])) ? trim($this->Common_model->escape_data($this->post_data['temperature_type'])) : '';\n $temperature_taken = !empty($this->Common_model->escape_data($this->post_data['temperature_taken'])) ? trim($this->Common_model->escape_data($this->post_data['temperature_taken'])) : '';\n $resp = !empty($this->Common_model->escape_data($this->post_data['resp'])) ? trim($this->Common_model->escape_data($this->post_data['resp'])) : '';\n $user_type = !empty($this->Common_model->escape_data($this->post_data['user_type'])) ? trim($this->Common_model->escape_data($this->post_data['user_type'])) : '';\n $vital_share_status = 1;\n\n if ($user_type == 1) {\n\n if (empty($vital_id) ||\n empty($patient_id)\n ) {\n $this->bad_request();\n }\n } else {\n if (empty($clinic_id) ||\n empty($doctor_id) ||\n empty($patient_id) ||\n empty($appointment_id) ||\n empty($date) ||\n empty($vital_id)\n ) {\n $this->bad_request();\n }\n\n $get_role_details = $this->Common_model->get_the_role($this->user_id);\n if (!empty($get_role_details['user_role_data'])) {\n $permission_data = array(\n 'role_data' => $get_role_details['user_role_data'],\n 'module' => 3,\n 'key' => 2\n );\n $check_module_permission = $this->check_module_permission($permission_data);\n if ($check_module_permission == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('permission_error');\n $this->send_response();\n }\n }\n\n //check data belongs to the doctor or not\n $requested_data = array(\n 'appointment_id' => $appointment_id,\n 'doctor_id' => $doctor_id,\n 'clinic_id' => $clinic_id,\n 'patient_id' => $patient_id\n );\n $this->check_data_belongs_doctor($requested_data);\n\n //get the share settings for the vital\n $setting_where = array(\n 'setting_type' => 1,\n 'setting_user_id' => $doctor_id,\n 'setting_clinic_id' => $clinic_id\n );\n $get_setting = $this->Common_model->get_setting($setting_where);\n\n $vital_share_status = 2;\n\n if (!empty($get_setting)) {\n $setting_array = json_decode($get_setting['setting_data'], true);\n if (!empty($setting_array) && is_array($setting_array)) {\n foreach ($setting_array as $setting) {\n if ($setting['id'] == 1) {\n $vital_share_status = $setting['status'];\n break;\n }\n }\n }\n }\n\n //check vital data belongs to the doctor, clinic based or not\n $vital_belongs_array = array(\n 'vital_report_doctor_id' => $doctor_id,\n 'vital_report_clinic_id' => $clinic_id,\n 'vital_report_id' => $vital_id,\n 'vital_report_status !=' => 9\n );\n $is_valid_data = $this->Common_model->validate_data(TBL_VITAL_REPORTS, 'vital_report_id', $vital_belongs_array);\n\n if ($is_valid_data == 2) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n }\n\n if (validate_date_only($date)) {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n\n if ((!empty($blood_pressure_type) && !in_array($blood_pressure_type, $this->blood_pressure_type)) ||\n (!empty($temperature_type) && !in_array($temperature_type, $this->temperature_type)) ||\n (!empty($temperature_taken) && !in_array($temperature_taken, $this->temperature_taken)) ||\n (!empty($weight) && !is_numeric($weight))\n ) {\n\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang(\"mycontroller_invalid_request\");\n $this->send_response();\n }\n\n\n $update_vital_data = array(\n 'vital_report_user_id' => $patient_id,\n 'vital_report_appointment_id' => $appointment_id,\n 'vital_report_clinic_id' => $clinic_id,\n 'vital_report_date' => $date,\n 'vital_report_spo2' => $sp2o,\n 'vital_report_weight' => $weight,\n 'vital_report_bloodpressure_systolic' => $blood_pressure_systolic,\n 'vital_report_bloodpressure_diastolic' => $blood_pressure_diastolic,\n 'vital_report_bloodpressure_type' => $blood_pressure_type,\n 'vital_report_pulse' => $pulse,\n 'vital_report_temperature' => $temperature,\n 'vital_report_temperature_type' => $temperature_type,\n 'vital_report_temperature_taken' => $temperature_taken,\n 'vital_report_resp_rate' => $resp,\n 'vital_report_share_status' => $vital_share_status,\n 'vital_report_updated_at' => $this->utc_time_formated,\n 'vital_report_updated_by' => $this->user_id\n );\n\n if ($user_type == 1) {\n $update_vital_data['vital_report_doctor_id'] = $this->user_id;\n } else {\n $update_vital_data['vital_report_doctor_id'] = $doctor_id;\n }\n\n $update_vital_where = array(\n 'vital_report_id' => $vital_id\n );\n\n $is_update = $this->Common_model->update(TBL_VITAL_REPORTS, $update_vital_data, $update_vital_where);\n\n if ($is_update > 0) {\n delete_past_prescription($appointment_id);\n $get_vital_data = $this->Common_model->get_single_row(TBL_VITAL_REPORTS, '*', array('vital_report_id' => $vital_id));\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('vital_updated');\n $this->my_response['data'] = $get_vital_data;\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('failure');\n }\n\n $this->send_response();\n } catch (ErrorException $ex) {\n $this->error = $ex->getMessage();\n $this->store_error();\n }\n }", "title": "" }, { "docid": "99821618f13889313d3840111e9b48fc", "score": "0.4960028", "text": "public function setIdPatient($idPatient){ $this->idPatient=$idPatient;}", "title": "" }, { "docid": "468ee1182b0db8899f7087b5339863a2", "score": "0.4949122", "text": "function reporteCertificacionPMod (){\n $this->objFunc=$this->create('MODPresupuesto');\n $dataSource=$this->objFunc->reporteCertificacionPMod();\n $this->dataSource=$dataSource->getDatos();\n\n $nombreArchivo = uniqid(md5(session_id()).'[Reporte-CertificaciónPresupuestariaMod]').'.pdf';\n $this->objParam->addParametro('orientacion','P');\n $this->objParam->addParametro('tamano','LETTER');\n $this->objParam->addParametro('nombre_archivo',$nombreArchivo);\n\n $this->objReporte = new RCertificacionPresupuestariaMod($this->objParam);\n $this->objReporte->setDatos($this->dataSource);\n $this->objReporte->generarReporte();\n $this->objReporte->output($this->objReporte->url_archivo,'F');\n\n\n $this->mensajeExito=new Mensaje();\n $this->mensajeExito->setMensaje('EXITO','Reporte.php','Reporte generado', 'Se generó con éxito el reporte: '.$nombreArchivo,'control');\n $this->mensajeExito->setArchivoGenerado($nombreArchivo);\n $this->mensajeExito->imprimirRespuesta($this->mensajeExito->generarJson());\n }", "title": "" }, { "docid": "40042f8cf33d5d564e991ca5a6362b3d", "score": "0.49466738", "text": "public function createIDPForm() \n {\n //\n }", "title": "" }, { "docid": "a71eb884fec6d26d8a6db4feaad03e21", "score": "0.49386176", "text": "function modificarIndicador(){\n\t\t$this->procedimiento='ssig.ft_indicador_ime';\n\t\t$this->transaccion='SSIG_IND_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_indicador','id_indicador','int4');\n\t\t$this->setParametro('id_indicador_unidad','id_indicador_unidad','int4');\n\t\t$this->setParametro('id_indicador_frecuencia','id_indicador_frecuencia','int4');\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n\t\t$this->setParametro('num_decimal','num_decimal','int4');\n\t\t$this->setParametro('semaforo','semaforo','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('sigla','sigla','varchar');\n\t\t$this->setParametro('descipcion','descipcion','varchar');\n\t\t$this->setParametro('comparacion','comparacion','varchar');\n\t\t$this->setParametro('indicador','indicador','varchar');\n\t\t\n\t\t//$this->setParametro('fecha','fecha','date');\n\t\t//$this->setParametro('hito','hito','varchar');\n\t\t//$this->setParametro('semaforo1','semaforo1','varchar');\n\t\t//$this->setParametro('semaforo2','semaforo2','varchar');\n\t\t//$this->setParametro('semaforo3','semaforo3','varchar');\n\t\t//$this->setParametro('semaforo4','semaforo4','varchar');\n\t\t//$this->setParametro('semaforo5','semaforo5','varchar');\n\t\t//$this->setParametro('valor','valor','varchar');\n\t\t//$this->setParametro('justificacion','justificacion','varchar');\n\t\t//$this->setParametro('no_reporta','no_reporta','bit');\n\t\t//$this->setParametro('id_indicador_valor','id_indicador_valor','int4');\n\t\t$this->setParametro('id_funcionario_ingreso','id_funcionario_ingreso','int4');\n\t\t$this->setParametro('id_funcionario_evaluacion','id_funcionario_evaluacion','int4');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "d83b0b15c0d83ee1b8e046ffc56d3267", "score": "0.49352065", "text": "function tc_recoveryByDescrip(&$nDocs,&$Docs,$descrip) { // true or false\n\t$SQLStrQuery=\"CALL sp_p_lst_gentCli_descrip($descrip)\";\n\tSQLQuery($ResponsePointer,$nDocs,$SQLStrQuery,true); // Realiza la consulta\n\tConvertPointerToArray($ResponsePointer,$Docs,$nDocs,2); // Pertenece a dbmngmtAdmin.php\n}", "title": "" }, { "docid": "c177bcab7c42eb64b022df348dbccf4c", "score": "0.49254495", "text": "public function professor()\n {\n $disciplina_professor['iddisciplina'] = $this->input->post('iddisciplina');\n $disciplina_professor['idprofessor'] = $this->input->post('idprofessor');\n $this->disciplina_model->setDisciplinaProfessor($disciplina_professor);\n\n echo 'Ok';\n }", "title": "" }, { "docid": "33fdcb6ae8a1cf11fabc015900b5c626", "score": "0.49172822", "text": "function reporteInformeInterPDF(){\n\t\t$this->procedimiento='adq.f_solicitud_sel';\n\t\t$this->transaccion='ADQ_RINFINT_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t$this->setCount(false);\n\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n\n\t\t$this->captura('p_nro_cite','varchar');\n\t\t$this->captura('p_nombre_jefe','text');\n\t\t$this->captura('p_cargo_jefe','varchar');\n\t\t$this->captura('p_nombre_sol','text');\n\t\t$this->captura('p_cargo_sol','varchar');\n\t\t$this->captura('antecendentes','text');\n\t\t$this->captura('necesidad_contra','text');\n\t\t$this->captura('beneficios_contra','text');\n\t\t$this->captura('resultados','text');\n\t\t$this->captura('conclusiones_r','text');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t//var_dump($this->consulta);exit;\n\t\t$this->ejecutarConsulta();\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "fe5fb221c6962ec0a87227674ee62036", "score": "0.49162534", "text": "public function pensa()\n {\n // TODO: Implement pensa() method.\n }", "title": "" }, { "docid": "02fdc11be503d829735f15dc00f9f8b2", "score": "0.49156606", "text": "public function begin() {\n /*$this->load->model('site_model');\n $page_data[\"Staff_no\"] = $this->site_model->no_of_xray_apps_Staff();\n\t\t$page_data[\"OND_no\"] = $this->site_model->no_of_xray_apps_OND();\n\t\t$page_data[\"HND_no\"] = $this->site_model->no_of_xray_apps_HND();*/\n\t\t\n\t\t $page_data['page_name'] = 'begin';\n \n $page_data['page_title'] = get_phrase('Federal Polytechnic Nekede | DIGITAL XRAY');\n\t\t$page_data['page_sub_heading'] =\"DIGITAL XRAY CENTER: RADIOLOGICAL REQUEST FORM\";\n $this->load->view('backend/medicals_print', $page_data); \n\n }", "title": "" }, { "docid": "507c7931a25a9b91e4c1cf104467ce67", "score": "0.4912895", "text": "public function add_patient() {\r\n\t\tsmarty()->assign(\"title\", \"Add New Patient\");\r\n\r\n\t\tif (input()->number != \"\") {\r\n\t\t\t$number = input()->number;\r\n\t\t} else {\r\n\t\t\t$number = \"\";\r\n\t\t}\r\n\r\n\t\tif (input()->location != \"\") {\r\n\t\t\t$location = $this->loadModel(\"Location\", input()->location);\r\n\t\t} else {\r\n\t\t\tsession()->setFlash(\"No location was selected. Please try again\", 'error');\r\n\t\t\t$this->redirect();\r\n\t\t}\r\n\r\n\r\n\t\tsmarty()->assign(\"number\", $number);\r\n\t\tsmarty()->assignByRef('location', $location);\r\n\r\n\t}", "title": "" }, { "docid": "2b017588cd438f40b82ce9a3b5e1d826", "score": "0.49124715", "text": "public function execute_visualization_actions() {\n\t\t\tparent::execute_visualization_actions ();\n\t\t\t\n\t\t\tif ( isset( $_GET[ YITH_YWPI_CREATE_PRO_FORMA_INVOICE_ACTION ] ) ) {\n\t\t\t\t$this->get_pro_forma_invoice ( $_GET[ YITH_YWPI_CREATE_PRO_FORMA_INVOICE_ACTION ] );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "00facbe92d6530a02c2cc2feb9356f7c", "score": "0.49072778", "text": "public function actionEvaluaP($id){\n\t\t\n\t\t$tar=M05Usuario::model()->find(\"Usuario = '\".Yii::app ()->user->name.\"'\"); \t//Usuario que esta logueado\n\t\t$pasantia=M04Pasantia::model()->findByPk($id);\t\t\t\t\t\t\t\t//plan de trabajo que se esta evaluando\n\t\t$model=new T10ObservacionPasantias; \n\t\t$pas= new T02PasantiaHasUsuario; //Relacion: Pasantias, Usuario, tutor externo y tipo de relacion\n\t\t$conopas=T05ConocimientoPasantias::model()->findAll(\"M04_id= \".$pasantia->id); //Esto como que no esta funcionando: esta tabla no tiene datos aun...\n\t\t$prof=T08Usuario_has_rol::model()->findAll(\"P01_id = 3\");\n\t\t$pas2=T02PasantiaHasUsuario::model()->find(\"M04_id = \".$pasantia->id);\n\n\t\tif(isset($_POST['T10ObservacionPasantias']))\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\t$jurado1= $_REQUEST['j1'];\n\t\t\t$pas->M05_id=$jurado1;\n\t\t\t$pas->M04_id=$id;\n\t\t\t$pas->P02_id=\"3\";\n\t\t\t$pas->M07_id=$pas2->M07_id;\n\t\t\t$pas->save();\n\n\n\n\n\t\t\t$model->attributes=$_POST['T10ObservacionPasantias'];\n\t\t\t$temp=$_POST['T10ObservacionPasantias']['M04_id'];\n\t\t\t$model->M04_id=$pasantia->id;\n\t\t\t$model->Fecha=date('Y-m-d');\n\n\t\t\t\n\t\t\tif($model->save()){\n\t\t\t\t\n\t\t\t\t$pasantia->P03_id=$temp;\n\t\t\t\t$pasantia->Fecha_Aprobacion=date('Y-m-d');\n\t\t\t\t\n\t\t\t\tif($pasantia->save()){\n\t\t\t\techo \"<script>alert('Evaluacion realizada con exito');</script>\";\n\t\t\t\t$this->redirect(array('pasantias'));\n\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\n\t\t$this->render('evaluaP',array(\n\t\t\t'Usuario'=>$tar,\n\t\t\t'pas'=>$pasantia,\n\t\t\t'model'=>$model,\n\t\t\t'profesor'=>$prof,\n\t\t\t'conocimiento'=>$conopas,\n\t\t\t));\n\t}", "title": "" }, { "docid": "6f0dd4026c974afd0d4f0c3b551a826d", "score": "0.49052584", "text": "function modificarMantPredef(){\n\t\t$this->procedimiento='gem.ft_mant_predef_ime';\n\t\t$this->transaccion='GEM_GEMAPR_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_mant_predef','id_mant_predef','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_tipo_equipo','id_tipo_equipo','int4');\n\t\t$this->setParametro('id_unidad_medida_estimado','id_unidad_medida_estimado','int4');\n\t\t$this->setParametro('tiempo_estimado','tiempo_estimado','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "5d80b8003f6d05377733b14cb728b504", "score": "0.49037653", "text": "function Init_Dossier_AEV_Situation_22($formx) {\n//$AEV_Type = utf8_decode($formx->getFormVar('AEV_Type'));\n//$formx->setVar('L_AEV_Situation',$situation);\n\n\n$ids = $formx->getIDS();\n$id_instance = $formx->getIdInstance();\n$idu = $formx->getVar('ids');\n\neko ($ids);\neko ($id_instance);\neko ($idu);\n\n// On va supprimer tous les fichiers Dossier_Colectomie_Periode_P1 de la table formx\n// $requete=new clRequete(BDD,TABLEFORMX,$param);\n// $sql=$requete->delRecord(\"idformx='Dossier_Colectomie_Periode_P1' and ids='\".$ids.\"'\");\n\n//$param[nomitem] = addslashes(stripslashes($this->getMedecin ( ))) ;\n//$req = new clResultQuery ;\n//$res = $req -> Execute ( \"Fichier\", \"getMatriculeMedecin\", $param, \"ResultQuery\" ) ;\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Accident_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Accident_Situation_22',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Accident_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Accident_Situation_22',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Date_Prophylaxie_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Date_Prophylaxie_Situation_22',date(\"d\").\"-\".date(\"m\").\"-\".date(\"Y\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Heure_Prophylaxie_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Heure_Prophylaxie_Situation_22',date(\"H\").\":\".date(\"i\"));\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Nom_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Nom_Situation_22',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Prenom_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Prenom_Situation_22',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Jour_Naissance_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Jour_Naissance_Situation_22',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Mois_Naissance_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Mois_Naissance_Situation_22',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Source_Annee_Naissance_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Source_Annee_Naissance_Situation_22',\"\");\n }\n\n$item=utf8_decode($formx->getVar('L_AEV_Complement_Situation_22'));\nif ( $item == \"\" )\n {\n $formx->setVar('L_AEV_Complement_Situation_22',\"\");\n }\n\n\nreturn \"O\";\n}", "title": "" }, { "docid": "85d99b6d4373845bd221de66703fadca", "score": "0.4883788", "text": "protected function getItemType()\n {\n return 'procedure';\n }", "title": "" }, { "docid": "0b2e8099d8a6537b9d5e5ad0a24864a9", "score": "0.48819658", "text": "final function AutomateMatric($asignreg,$sr_std){\n//assign reg no automatically: algorithm is needed from school\n\t// we might collect his department, faculty and other function and determine how to auto assign it here// includo/admission/admit.php\n$MatricNo=$asignreg;\n\t\n\treturn $MatricNo;\n\t}", "title": "" }, { "docid": "71ee0bf7db3c5bc9ee42157d1ed5d971", "score": "0.48685986", "text": "function pateint_registration_process($firstname, $middleName ='', $lastname,\n $maidenName, $email, $trn, $password, $gender = '',\n $dob, $tel_no, $age, $street_name, $parish, $country,\n $insurance_id, $emp_name,$occupation, $emp_tel_no, $policy,\n $emp_street_name, $emp_parish, $emp_country, $pet_name,\n $kin, $relationship, $religion, $father_name,\n $mother_name, $birth_place, $birth_parish, $union,\n $height, $weight, $temp, $pulse, $resp, $bp, $urinalysis,\n $condition) {\n $firstname = gen_sanitize_for_datebase($firstname);\n $middleName = gen_sanitize_for_datebase($middleName);\n $lastname = gen_sanitize_for_datebase($lastname);\n $maidenName = gen_sanitize_for_datebase($maidenName);\n $trn = gen_sanitize_for_datebase($trn);\n $password = gen_sanitize_for_datebase($password);\n $gender = gen_sanitize_for_datebase($gender);\n $tel_no = gen_sanitize_for_datebase($tel_no);\n $age = gen_sanitize_for_datebase($age);\n $parish = gen_sanitize_for_datebase($parish);\n $country = gen_sanitize_for_datebase($country);\n $emp_name = gen_sanitize_for_datebase($emp_name);\n $occupation = gen_sanitize_for_datebase($occupation);\n $emp_tel_no = gen_sanitize_for_datebase($emp_tel_no);\n $policy = gen_sanitize_for_datebase($policy);\n $emp_street_name = gen_sanitize_for_datebase($emp_street_name);\n $emp_parish = gen_sanitize_for_datebase($emp_parish);\n $emp_country = gen_sanitize_for_datebase($emp_country);\n $pet_name = gen_sanitize_for_datebase($pet_name);\n $kin = gen_sanitize_for_datebase($kin);\n $relationship = gen_sanitize_for_datebase($relationship);\n $religion = gen_sanitize_for_datebase($religion);\n $father_name = gen_sanitize_for_datebase($father_name);\n $mother_name = gen_sanitize_for_datebase($mother_name);\n $birth_place = gen_sanitize_for_datebase($birth_place);\n $birth_parish = gen_sanitize_for_datebase($birth_parish);\n $height = gen_sanitize_for_datebase($height);\n $weight = gen_sanitize_for_datebase($weight);\n $temp = gen_sanitize_for_datebase($temp);\n $pulse = gen_sanitize_for_datebase($pulse);\n $resp = gen_sanitize_for_datebase($resp);\n $bp = gen_sanitize_for_datebase($bp);\n $urinalysis = gen_sanitize_for_datebase($urinalysis);\n $condition = gen_sanitize_for_datebase($condition);\n\n\n global $connect;\n\n\t/* turn autocommit off */\n\t$connect->autocommit(false);\n\n $error = array();\n\n\n $physician_id = $clerk_id = get_user_id_from_session();\n $hospital_id = get_physician_work_place($physician_id);\n\n // var_dump($clerk_id);\n // var_dump($hospital_id);\n #die();\n\n # entering pateint's Address\n if($status = enter_new_address($connect, $street_name, $parish, $country)) {\n # get last insert id from address table\n #var_dump($status);\n\n if ($status === true) {\n $address_id = getLastInsertedId($connect);\n\n } else {\n $address_id = null;\n }\n\n\n #die();\n\n if(add_new_member($connect, $address_id, $firstname, $lastname, $middleName,\n $maidenName, $email, $trn, $password, $gender,\n $dob, $tel_no, $age)) {\n\n # get last insert id from address table\n $member_id = getLastInsertedId($connect);\n\n # entering pateint's Employment Address\n if($emp_add_status = enter_new_address($connect, $emp_street_name, $emp_parish, $emp_country)) {\n\n # get last insert id from address table\n # var_dump($emp_add_status);\n\n if ($emp_add_status === true) {\n $emp_address_id = getLastInsertedId($connect);\n } else {\n $emp_address_id = null;\n }\n\n if($emp_info_status = enter_new_employee_info($connect, $emp_address_id, $insurance_id, $emp_name,\n $occupation, $emp_tel_no, $policy)) {\n\n\n if ($emp_info_status === true) {\n $emp_id = getLastInsertedId($connect);\n } else {\n $emp_id = null;\n }\n\n if(enter_new_pateint($connect, $member_id, $emp_id, $pet_name,\n $kin, $relationship, $religion, $father_name,\n $mother_name, $birth_place, $birth_parish, $union)) {\n\n if(register_pateint($connect, $member_id, $clerk_id, $hospital_id, $physician_id)) {\n\n\n if(create_new_medical_record($connect, $member_id, $hospital_id, $clerk_id)){\n\n # get last insert id from emplotment_info table\n $medical_history_id = getLastInsertedId($connect);\n\n\n if(enter_new_vitals($connect, $medical_history_id, $clerk_id, $height, $weight, $temp,\n $pulse, $resp, $bp, $urinalysis)) {\n\n if(enter_new_conditions($connect, $condition, $medical_history_id)) {\n\n\n if(generate_activation_code_and_email($connect, $member_id, $email, $firstname, $lastname)){\n #echo \"REGISTERED\";\n\n $connect->commit();\n\n set_session('user', $member_id);\n set_session('name', $firstname .' ' . $lastname);\n\n header('Location: success.php?type=reg');\n\n } else {\n echo 'activation code not Sent';\n $error['error'] = 'activation code not Sent';\n }\n\n } else {\n echo \"create new condition error:\" . $connect->error;\n $error['error'] = 'create new condition error';\n }\n\n } else {\n echo \"create new Vitals error:\" . $connect->error;\n $error['error'] = 'create new Vitals error';\n }\n\n } else {\n echo \"create new medical record error:\" . $connect->error;\n $error['error'] = 'create new medical record error:';\n }\n\n } else {\n echo \"Register Patient error:\" . $connect->error;\n $error['error'] = 'Register Patient error';\n }\n\n } else {\n echo \"new Patient error:\" . $connect->error;\n $error['error'] = 'new Patient error';\n }\n\n } else {\n echo \"Employment Info error:\" . $connect->error;\n $error['error'] = 'Employment Info error';\n }\n\n } else {\n echo \"Employment Address error:\" . $connect->error;\n $error['error'] = 'Employment Address error';\n }\n\n } else {\n echo \"Member error:\" . $connect->error;\n $error['error'] = 'Member error : Email Already Exists';\n }\n\n } else {\n echo \"Pateint Address Wrong error:\" . $connect->error;\n $error['error'] = 'Member error';\n }\n\n\n return $error;\n\n\n\n}", "title": "" }, { "docid": "8bb8db9e271c98fa62a06e36dfde2638", "score": "0.48584515", "text": "public function actualizar_hospital($nits_nombres,$nits_num_documento,$reg_id,$tip_reg_id,$nits_dir_residencia,$nits_tel_residencia,$nits_num_celular,$nits_representante,$nits_cor_electronico,$nits_contacto,$cen_cos_codigo,$nit_id,$clase,$nit_uni_funcional)\r\n{\r\n\t\r\n\t$usuario_actualizador=$_SESSION['k_nit_id'];\r\n\t$fecha_actualizacion=date('d-m-Y');\r\n\t\r\n\t$hora=localtime(time(),true);\r\n\tif($hora[tm_hour]==1)\r\n\t\t$hora_dia=23;\r\n\telse\r\n\t\t$hora_dia=$hora[tm_hour]-1;\r\n\t$hora_actualizacion=$hora_dia.\":\".$hora[tm_min].\":\".$hora[tm_sec];\r\n\t\r\n\t$sql=\"EXECUTE actualizar_hospital '$nits_nombres','$nits_num_documento',$reg_id,$tip_reg_id,'$nits_dir_residencia','$nits_tel_residencia','$nits_num_celular','$nits_representante','$nits_cor_electronico','$nits_contacto','$cen_cos_codigo',$nit_id,$clase,'$nit_uni_funcional','$usuario_actualizador','$fecha_actualizacion','$hora_actualizacion'\";\r\n\t$ejecutar=mssql_query($sql);\r\n\treturn $ejecutar;\t\r\n}", "title": "" }, { "docid": "d89c401ad295555368021a1836c834b9", "score": "0.4857617", "text": "public function store(Request $request)\n {\n //\n\n $rules['dev_id']='required';\n $rules['proc_id']='required';\n $this->validate($request,$rules);\n\n $device=MedicalDevice::find($request->input('dev_id'));\n $proc_ids=$request->input('proc_id');\n\n foreach($proc_ids as $proc_id){\n if($device->procedures()->where('procedure_id',$proc_id)->count() > 0){\n $proc=Procedure::find($proc_id);\n return redirect()->action('AdminController@'.$this->action_index)->withFailureMessage(' الفحص '.$proc->name.\" محجوز للجهاز \".$device->name );\n }\n else {\n $device->procedures()->attach($proc_id);\n }\n }\n return redirect()->action('AdminController@'.$this->action_index)->withSuccessMessage(Lang::get('flash_messages.success'));\n }", "title": "" }, { "docid": "c66e21aa2feaade20b5a4f985eaf90aa", "score": "0.48534572", "text": "public function get_assignInstructor($id)\n {\n $patient_status = patient::where('patient_id', $id)->pluck('completed_flag');\n if ($patient_status[0]) {\n $error_message = \"You cannot edit submitted patient. \";\n return view('errors/error', compact('error_message'));\n }\n else {\n $patient = patient::where('patient_id', $id)->first();\n //Fetching all navs associated with this patient's module\n $navIds = module_navigation::where('module_id', $patient->module_id)->orderBy('display_order')->pluck('navigation_id');\n $navs = array();\n $videos = media_lookup_value::where('media_lookup_value_type','Video')->get();\n $pictures = media_lookup_value::where('media_lookup_value_type','Image')->get();\n $audios = media_lookup_value::where('media_lookup_value_type','Audio')->get();\n //Now get nav names\n foreach ($navIds as $nav_id) {\n $nav = navigation::where('navigation_id', $nav_id)->get();\n array_push($navs, $nav);\n }\n //Extracting vital signs for header\n $vital_signs_header = $this->get_vital_signs_header($id);\n //Extracting disposition to enable or disable the submit button\n $disposition = active_record::where('patient_id', $id)\n ->where('navigation_id', '34')->get();\n $labs = active_record::where('patient_id', $id)\n ->where('navigation_id','31')->where('doc_control_id','73')->get();\n\n $images = active_record::where('patient_id', $id)\n ->where('navigation_id','31') ->where('doc_control_id','74')->get();\n\n $procedures = active_record::where('patient_id', $id)\n ->where('navigation_id','31') ->where('doc_control_id','78')->get();\n\n // $medications = active_record::where('patient_id', $id) \n // ->where('navigation_id', '31') ->where('doc_control_id', '81')->get();\n\n $medications = active_record::leftjoin('active_record as act2', 'active_record.active_record_id', '=', 'act2.doc_control_group')\n ->where('active_record.patient_id', '=', $id)\n ->where('active_record.navigation_id', '=', '31')\n ->where('active_record.doc_control_id', '=', '81')\n ->whereNull('active_record.doc_control_group')\n ->select('active_record.*','act2.value as dosage')->get();\n //Log::info($medications);\n $results = active_record::where('patient_id', $id)\n ->where('navigation_id','32') ->where('doc_control_id','71')->get();\n\n $diagnosis_list_ddx = active_record::leftjoin('active_record as act2', 'active_record.active_record_id', '=', 'act2.doc_control_group')\n ->where('active_record.patient_id', '=', $id)\n ->where('active_record.navigation_id', '=', '35')\n ->where('active_record.doc_control_id', '=', '83')\n ->whereNull('active_record.doc_control_group')\n ->select('active_record.*','act2.value as comments')->orderBy('active_record.doc_control_group_order', 'ASC')\n ->orderBy('active_record.active_record_id', 'ASC')->get();\n\n $user_id = Auth::user()->id;\n $status = users_patient::where('patient_id',$id)->where('user_id',$user_id)->first();\n if($status) {\n $status_id = $status->patient_record_status_id;\n return view('patient/assign_instructor', compact ('disposition','status_id','vital_signs_header','medications','medication_comment','patient','navs','videos','pictures','audios','labs','images','procedures','medications','dosage','i','results','diagnosis_list_ddx'));\n\n }\n else\n {\n $error_message= \"Student can only view their created patients. You are not authorized to view this page.\";\n return view('errors/error',compact('error_message'));\n }\n }\n\n }", "title": "" }, { "docid": "276c5b2baec4cc49715116f23a89f5c2", "score": "0.48493424", "text": "public function credit_agreement()\t{\n\t\terror_reporting(0);\n\t\t$segmentid=$this->uri->segment(3);\n\t\t$getHtmlagreement=$this->generate_credit_agreement_form($segmentid);\n\t\techo $getHtmlagreement;\n\t\t$filename=$segmentid.'-'.time();\n\t\t//$abc=pdf_po_create_agreement_form($getHtmlagreement,$filename,true);\n\t}", "title": "" }, { "docid": "7470d324f52a7e9623ea40a0b8ec5300", "score": "0.48490492", "text": "public function getProcedure()\n {\n return $this->procedure;\n }", "title": "" }, { "docid": "d14086a45d5d3bdf17c02f98e790deb6", "score": "0.48325616", "text": "function modificarContaAlmDet(){\n\t\t$this->procedimiento='misc.ft_conta_alm_det_ime';\n\t\t$this->transaccion='MIS_CALMD_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_conta_alm_det','id_conta_alm_det','int4');\n\t\t$this->setParametro('moneda','moneda','varchar');\n\t\t$this->setParametro('centro_almacen','centro_almacen','varchar');\n\t\t$this->setParametro('nombre_material','nombre_material','varchar');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('id_centro_costo','id_centro_costo','int4');\n\t\t$this->setParametro('id_cuenta_debe','id_cuenta_debe','int4');\n\t\t$this->setParametro('precio_unitario','precio_unitario','numeric');\n\t\t$this->setParametro('nro_ot','nro_ot','varchar');\n\t\t$this->setParametro('centro_costo','centro_costo','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_cuenta_haber','id_cuenta_haber','int4');\n\t\t$this->setParametro('total','total','numeric');\n\t\t$this->setParametro('almacen','almacen','varchar');\n\t\t$this->setParametro('desc_cuenta_haber','desc_cuenta_haber','text');\n\t\t$this->setParametro('codigo_material','codigo_material','varchar');\n\t\t$this->setParametro('desc_cuenta_debe','desc_cuenta_debe','text');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('id_conta_alm','id_conta_alm','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "509be485f8c7c9f4ca07f11633714c0d", "score": "0.48278615", "text": "function insert_patient_info()\n {\n $balance_cost = $this->input->post('treat_cost') - $this->input->post('fees');\n if($balance_cost >0)\n {\n $balance = $balance_cost;\n }\n else\n {\n $balance = 0;\n }\n\n $med_history = NULL;\n\n if($this->input->post('med_history')!='')\n {\n \n $med_history = implode(', ', $this->input->post('med_history'));\n\n }\n\n\n \t\t$data_patient = array( \n \t\t'p_id' => $this->input->post('p_id'), \n \t\t'p_name' => $this->input->post('p_name'),\n \t\t'p_phone' => $this->input->post('p_phone'),\n \t\t'p_address' => $this->input->post('p_address'),\n \t\t'p_dob' => $this->input->post('p_dob'),\n \t\t'p_age' => $this->input->post('p_age'), \n \t\t'p_blood_group' => $this->input->post('p_blood_group'),\n \t\t'p_sex' => $this->input->post('p_sex'),\n \t\t'timestamp' => date(\"d-m-Y\")\n \t \t);\n\n \t \t$data_case_history = array(\n \t \t\t'p_id' => $this->input->post('p_id'),\n \t \t\t'treat_type' => $this->input->post('treat_type'),\n 'treat_details' => $this->input->post('treat_details'),\n 'treat_procedure' => $this->input->post('treat_procedure'),\n 'diagnosis' => $this->input->post('diagnosis'),\n 'med_history' => $med_history,\n 'treat_cost' => $this->input->post('treat_cost'),\n 'bal_cost' => $balance,\n 'fees' => $this->input->post('fees'),\n 'last_visited' => date(\"d-m-Y\")\n \t \t);\n\n \t \tif($this->db->insert('patient_details',$data_patient) && $this->db->insert('case_history',$data_case_history))\n \t \t{\n \t \t\treturn true; \t \t\t\n \t \t}\n \t \treturn false;\n }", "title": "" }, { "docid": "8e366b065f4fb993f1cb18f6487b3154", "score": "0.482247", "text": "public function suppquestionnairefranchiseAction()\n {\n\n $sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n //$this->_helper->layout->disableLayout();\n $this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n \n if (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $id = (int) $this->_request->getParam('id');\n if (isset($id) && $id != 0) {\n\n $questionnairefranchise = new Application_Model_EuProcedure();\n $m_questionnairefranchise = new Application_Model_EuProcedureMapper();\n $m_questionnairefranchise->find($id, $questionnairefranchise);\n \n $m_questionnairefranchise->delete($questionnairefranchise->id_questionnaire_franchise);\n\n }\n\n $this->_redirect('/questionnairefranchise/listquestionnairefranchise');\n }", "title": "" }, { "docid": "dbdbd0b49c595aaec7ae5f281c9d79bf", "score": "0.48193207", "text": "function get_procedure_record($proid)\n\t{\n\t\tinclude(\"config_db1.php\");\n\t\t$query=\"SELECT procedure_name,ptypes,pamount FROM procedure_creation WHERE id='$proid' LIMIT 1\";\n\t $one=mysql_query($query) or die (mysql_error());\n\t $r=mysql_fetch_array($one);\n\t return($r);\n\t}", "title": "" }, { "docid": "d02bc39b5ab95f34e29460e0283dbc06", "score": "0.4817475", "text": "function tc_createRecord($descrip) {\n\t$SQLStrQuery=\"CALL sp_p_set_gentCli_Create($descrip)\";\n\tSQLQuery($ResponsePointer,$n,$SQLStrQuery,false); // Realiza la consulta\n}", "title": "" }, { "docid": "8854792a4c474ede43e750dea2855099", "score": "0.4813959", "text": "function aprobarPresolicitud(){\n $this->procedimiento='adq.ft_presolicitud_ime';\n $this->transaccion='ADQ_APRPRES_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_presolicitud','id_presolicitud','int4');\n $this->setParametro('operacion','operacion','varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "740614568ccb15d009fb972bdbbd56d8", "score": "0.48092324", "text": "public function scorpionPayment($taskId)\r\n {\r\n ///if payment is successful, continue\r\n\t //confirm that this business has not been issued with a Certificate\r\n\t //\r\n\t \r\n\t /*Certificate Values\r\n\t */\r\n\t //Incremental Number\r\n\t $start = 1093 ;\r\n\t// $newNumber = $start + 1;\r\n\t $date = date('Y');\r\n\t //We also make sure that the business is not already issued with a certificate if so we just print the existing certificate instead of\r\n\t //saving a new record\r\n\t $q = Doctrine_Core::getTable('InvestmentCertificate')->searchBusiness($taskId);\r\n\t \r\n\t if(count($q) > 0)\r\n\t {\r\n\t //since this business has been issued with certificate, we just print it.\r\n\t //do nothing\r\n\t $this->scorpionComplete($taskId);\r\n\t // print_r($q).\"Hello\"; exit;\r\n\t // print \"Hello1\"; exit;\r\n\t }\r\n\t if(count($q) <= 0)\r\n\t {\r\n\t ///////////////////////////////////////////\r\n\t \t\t\t\t//this is the first time therefore we save and print the certificate\r\n\t\t\t\t\t\t//but we want to increment it whenever a new record is inserted. hence we fast make sure that the $start number variable\r\n\t\t\t\t\t //is not set in the database;\r\n\t\t\t\t\t $number = null ;\r\n\t $primary_id = null;\r\n\t\t\t\t\t $query = Doctrine_Core::getTable('InvestmentCertificate')->getLastRow();\r\n\t\t\t\t\t foreach($query as $q)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t\t $number = $q['serial_number'];\r\n\t\t\t\t\t\t $primary_id = $q['id'];\r\n\t\t\t\t\t }\r\n\t\t\t\t\t // print $number; \r\n\t\t\t\t\t $number = explode('/',$number); \r\n\t\t\t\t\t // print \"Number 2\".$number[1];\r\n\t\t\t\t\t $incremental_no = $number[1] ;\r\n\t\t\t\t\t // print \"Certificate Not Issued \".$incremental_no. \"---\".$primary_id ; exit;\r\n\t\t\t\t\t // exit;\r\n\t\t\t\t\t if($incremental_no != null && $primary_id != null)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t \r\n\t\t\t\t\t //we first check and make sure that there exist a number, then we increment it by 1\r\n\t\t\t\t\t //and save it.\r\n\t\t\t\t\t $value = $incremental_no + 1 ;\r\n\t\t\t\t\t\t // print $value; exit;\r\n\t\t // $id_value = $primary_id + $id ;\r\n\t\t\t\t\t $date = date('Y');\r\n\t\t\t \t\t $cert = new InvestmentCertificate();\r\n\t\t\t\t\t\t $cert->business_id = $taskId ;\r\n\t\t\t\t\t\t $cert->serial_number = \"C/\".($value).\"/\".$date ;\r\n\t\t\t\t\t\t $cert->save();\r\n\t\t\t\t\t\t //we then update the Status of application i.e. BusinessApplicationStatus\r\n\t\t\t\t\t\t //now this is the final step of application for investment certificate. \r\n\t\t\t\t\t\t //we set values\r\n\t\t\t\t\t\t $value1 = \"certificateissued\"; //status\r\n\t\t\t\t\t\t $value2 = \"You have been issued with Investment Registration Certificate.\r\n \t\t\t\t\t\t Please check your email for more information. Thankyou. \"; //comment\r\n\t\t\t\t\t\t $value3 = 100; //percentage\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t\t //we also update the status of work for this data admin.\r\n\t\t\t\t\t\t $query_update = Doctrine_Core::getTable('TaskAssignment')->updateBusinessApplicationStatus($taskId,$value1,$value2,$value3);\r\n\t\t\t\t\t\t // print $query_update; exit;\r\n\t\t\t\t\t\t $query_update_task = Doctrine_Core::getTable('TaskAssignment')->updateUserTaskStatus4($taskId); \r\n\t\t\t\t\t\t ///\r\n\t\t\t\t\t\t // print $query_update_task; exit;\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t\t\t\t\t if($incremental_no == null && $primary_id == null)\r\n\t\t\t\t\t {\r\n\t\t\t\t\t $number = $start ;\r\n\t\t\t\t\t //if this is the first record, then we set default value\r\n\t\t\t\t\t //and save\r\n\t\t\t\t\t //$id.\"-\".$start.\"-\".$date;\r\n\t\t\t\t\t $date = date('Y');\r\n\t\t\t\t\t\t $cert = new InvestmentCertificate();\r\n\t\t\t\t\t\t $cert->business_id = $taskId ;\r\n\t\t\t\t\t\t $cert->serial_number = \"C/\".($number + 1).\"/\".$date ;\r\n\t\t\t\t\t\t $cert->save(); \r\n\t\t\t\t\t\t //we then update the Status of application i.e. BusinessApplicationStatus\r\n\t\t\t\t\t\t //now this is the final step of application for investment certificate. \r\n\t\t\t\t\t\t $value1 = \"certificateissued\"; //status\r\n\t\t\t\t\t\t $value2 = \"You have been issued with Investment Registration Certificate.\r\n \t\t\t\t\t\t Please check your email and download the attached certificate. Thankyou. \"; //comment\r\n\t\t\t\t\t\t $value3 = 100; //percentage\r\n\t\t\t\t\t\t /*$query1 = Doctrine_Core::getTable('TaskAssignment')->updateBusinessApplicationStatus($taskId,$value1,$value2,$value3); */\r\n\t\t\t\t\t\t $query_update = Doctrine_Core::getTable('TaskAssignment')->updateStatusAfterPayment($taskId,$value1,$value2,$value3);\r\n\t\t\t\t\t\t //we also update the status of work for this data admin.\r\n\t\t\t\t\t\t $query_update_task = Doctrine_Core::getTable('TaskAssignment')->updateUserTaskStatus4($taskId);\r\n\t\t\t\t\t\t \r\n\t\t\t\t\t }\r\n\t //////////////////////////////////////////\r\n\t }\r\n\t \r\n\t \r\n\t ////Then we get the Applicant details for printing the certificate. we will use the business_id saved in the InvestmentCertificate Table\r\n\t $query = Doctrine_Core::getTable('InvestmentCertificate')->getApplicantDetails($taskId);\r\n\t //loop over the result and set necessary variables\r\n\t $date = null ;\r\n\t $year = null ;\r\n\t $company = null ;\r\n\t $serial = null;\r\n\t $rep = null;\r\n\t $issuerF = null;\r\n\t $issuerL = null;\r\n\t $sector = null;\r\n\t $nofojobs = null;\r\n\t $expjobs = 0;\r\n\t $invstment = 0;\r\n\t // $applicant_name = null ;\r\n\t foreach($query as $q)\r\n\t {\r\n\t $date = $q['created_at'] ;\r\n\t\t$year = $q['created_at'] ;\r\n\t\t$company = $q['name'] ;\r\n\t\t$serial = $q['serial_number'] ;\r\n\t\t$rep = $q['representative_name'] ;\r\n\t\t$issuerF = $q['first_name'] ;\r\n\t\t$issuerL = $q['last_name'] ;\r\n\t\t$sector = $q['business_sector'] ;\r\n\t\t$noofjobs = $q['employment_created'] ;\r\n\t\t$invstment = $q['planned_investment'];\r\n\t\t$currency = $q['currency_type'];\r\n\t\t\r\n\t }\r\n\t $d = new DateTime($date);\r\n\t $day = $d->format('d-m-Y');\r\n\t ///\r\n\t $y = new DateTime($year);\r\n\t $year = $y->format('Y');\r\n\t \r\n\t // $serial = \"C/$number/$year\";\r\n\t \r\n\t ////////////////////////////////////////////////////////////////////////////\r\n\t\r\n\t ////////////////////////////////////////////////////////////////////////////\r\n\t //execute action for printing pdf document of this report\r\n\t /* I have used another class specifically for investment Certificates only */\r\n\t $config = sfTCPDFPluginConfigHandlerInvstCert::loadConfig('invst_configs');\r\n // sfTCPDFPluginConfigHandlerInvstCert::includeLangFile($this->getUser()->getCulture());\r\n\t///////////////////////////Certificate Configuration //////////////////////////////////////////////////////////////////////\t \r\n//create new PDF document (document units are set by default to millimeters)\r\n $pdf = new sfTCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true);\r\n // set document information\r\n/*$pdf->SetCreator(PDF_CREATOR);\r\n$pdf->SetAuthor('Nicola Asuni');\r\n$pdf->SetTitle('TCPDF Example 062');\r\n$pdf->SetSubject('TCPDF Tutorial');\r\n$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); */\r\n\r\n// set default header data\r\n$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 062', PDF_HEADER_STRING);\r\n\r\n// set header and footer fonts\r\n$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\r\n$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\r\n\r\n// set default monospaced font\r\n$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\r\n\r\n//set margins\r\n$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\r\n$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\r\n$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\r\n\r\n// remove default header/footer\r\n$pdf->setPrintHeader(false);\r\n$pdf->setPrintFooter(false);\r\n\r\n//set auto page breaks\r\n//$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\r\n$pdf->SetAutoPageBreak(false);\r\n\r\n//set image scale factor\r\n$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\r\n\r\n//set some language-dependent strings\r\n//$pdf->setLanguageArray($l);\r\n\r\n// ---------------------------------------------------------\r\n\r\n// set font\r\n$pdf->SetFont('courier', 'I', 18);\r\n\r\n// add a page\r\n$pdf->AddPage();\r\n\r\n// start a new XObject Template\r\n$template_id = $pdf->startTemplate(95, 165);\r\n\r\n// create Template content\r\n// ...................................................................\r\n\r\n$border = array('LRTB' => array('width' => 0.1, 'cap' => 'square', 'join' => 'miter', 'dash' => 0, 'color' => array(0, 0, 0)));\r\n $img_file = K_PATH_IMAGES.'edited2.jpg';\r\n \r\n$pdf->Image($img_file, 0, 0, 50, 50, 'JPG', '', '', false, 1000, '', false, false, $border, false, false, false);\r\n \r\n \r\n//Image Calling inside the html has a problem hence we hand code it but we will change it later - Boniface Irunguh\r\n// ...................................................................\r\n\r\n// end the current Template\r\n$pdf->endTemplate();\r\n\r\n// print the selected Template various times\r\n$pdf->printTemplate($template_id, 0, 0, 550, 710, '', '', false);\r\n\r\n// ---------------------------------------------------------\r\n // Set some content to print\r\n$html = ' <div style=\"text-align:center\"> \r\n \r\n\t\t\t\t\t\t\t\t\t\t <p style= \"font-size: xx-small;text-align:left \">\r\n\t\t\t\t\t\t\t\t\t\t <i>No</i>: <b>'.$serial.'</b>\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t <i>Date:</i> <b>'.$day.'</b>\r\n\t\t\t\t\t\t\t\t\t\t </p><br/><br/>\r\n\t\t\t\t\t\t\t\t\t\t <p style= \"font-size: xx-small;text-align:left \">\r\n\t\t\t\t\t\t\t\t\t\tIssued To &nbsp;&nbsp;&nbsp;&nbsp;<span style=\"border-bottom: 10px solid #f00;\"><b>'.$company.'</b></span>&nbsp;&nbsp;&nbsp; Represented by <span style=\"border-bottom: 10px solid #f00;\">&nbsp;<b>'.$rep.'</b>&nbsp;</span>\r\n\t\t\t\t\t\t\t\t\t\t<br/><br/>\r\n\t\t\t\t\t\t\t\t\t\tBusiness Sector&nbsp;&nbsp;&nbsp;<span style=\"border-bottom: 10px solid #f00;\"><b>'.$sector.' </span></b> <br/><br/>\r\n\t\t\t\t\t\t\t\t\t\tPlanned investment amount &nbsp;&nbsp;&nbsp;&nbsp; <span style=\"border-bottom: 10px solid #f00;\"><b>'.$invstment.'</span></b> '.$currency.'<br/><br/>\r\n\t\t\t\t\t\t\t\t\t\tTotal Number of jobs planned &nbsp;&nbsp;&nbsp;&nbsp;<span style=\"border-bottom: 10px solid #f00;\"><b>'.$noofjobs.'</span></b><br/><br/>\r\n\t\t\t\t\t\t\t\t\t\tLocal jobs&nbsp;&nbsp;&nbsp;&nbsp;<span style=\"border-bottom: 10px solid #f00;\"><b>'.$noofjobs.'</span></b> and Jobs For expatriates &nbsp;&nbsp;&nbsp;&nbsp; <span style=\"border-bottom: 10px solid #f00;\"><b>'.$expjobs.'</span></b>\r\n\t\t\t\t\t\t\t\t\t\t </p>\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t<p style= \"font-size: xx-small;text-align:left \">\r\n\t\t\t\t\t\t\t\t\t\t This Certificate has been issued to <b>'.$company.'</b> under the seal of \r\n\t\t\t\t\t\t\t\t\t\t RDB in accordance with law no 26/2005 EAC customs management act atests &nbsp;&nbsp;that the company is duly registered and entitled to the rights and obligations contained in the law.\r\n\t\t\t\t\t\t\t\t\t\t </p>\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t <p style= \"font-size: xx-small;text-align:left \">\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;<i>THE CHIEF EXECUTIVE OFFICER</i>, \r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t <i>COMPANY REPRESENTATIVE</i>,\r\n\t\t\t\t\t\t\t\t\t\t <br/>\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;RDB,\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;\r\n\t\t\t\t\t\t\t\t\t\t '.$rep.'\r\n\t\t\t\t\t\t\t\t\t\t <br/>\r\n\t\t\t\t\t\t\t\t\t\t &nbsp;&nbsp;&nbsp;&nbsp;'.$issuerF.' '.$issuerL.'\r\n\t\t\t\t\t\t\t\t\t\t <br/>\r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\t\t\t\t\t\t\t\t\t </p>\r\n\t\t\t\t\t\t\t\t\t\t </div> \r\n\t\t\t\t\t\t\t\t\t\t\r\n \r\n';\r\n\r\n// Print text using writeHTMLCell()\r\n$pdf->writeHTMLCell($w=0, $h=0, $x='', $y='', $html, $border=0, $ln=1, $fill=0, $reseth=true, $align='', $autopadding=true);\r\n \r\n//Close and output PDF document\r\n//$pdf->Output('certificate.pdf', 'I');\r\n$pdf->Output(sfConfig::get('sf_web_dir').'/uploads/documents/certificate.pdf','F'); //save\r\n\t \r\n\t //we will output the file and send it to the Investors email address. Get the email address of the investor\r\n\t $userEmail = null;\r\n\t $email = Doctrine_Core::getTable('InvestmentCertificate')->getInvestorEmail($taskId);\r\n\t //get email\r\n\t foreach($email as $em)\r\n\t {\r\n\t $userEmail = $em['email_address'] ;\r\n\t }\r\n\t //\r\n\t /*$target_path = \"uploads/documents/certificate.pdf\"; \r\n\t\r\n\t\t\t \r\n\t $message = Swift_Message::newInstance()\r\n\t\t\t ->setFrom('[email protected]')\r\n\t\t\t ->setTo($userEmail)\r\n\t\t\t ->setSubject('Investment Certificate')\r\n\t\t\t ->setBody('You have been issued with Investment Registration Certificate. Please download it. Thankyou')\r\n\t\t\t ->attach(Swift_Attachment::fromPath($target_path));\r\n\t\t\t // $file = sfConfig::get('sf_web_dir')/beibora/web/uploads/companies/; */\r\n\t\t\t \r\n\r\n\t\t\t//$this->getMailer()->send($message);\r\n\t\t\tsfContext::getInstance()->getMailer()->composeAndSend('[email protected]',\r\n\t\t\t\t\t\t\t\t\t\t$userEmail ,\r\n\t\t\t\t\t\t\t\t\t\t'Investment Registration Certificate ',\r\n\t\t\t\t\t\t\t\t\t\t\"Congratulations! You Have been Issued with The Investment Registration Certificate. \\n\r\n\t\t\t\t\t\t\t\t\t\tYou are advised to come and collect it at our Offices at Rwanda Development Board (RDB). Thankyou and\r\n\t\t\t\t\t\t\t\t\t\twelcome.\"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t ); \r\n\t /////////////////////////////////////////////\r\n\t //\r\n\t\r\n\t///////////////////////////////End Certificate Configuration ///////////////////////////////////////////\r\n // Stop symfony process */\r\n\t\t $this->redirect('investmentcertificates/index');\r\n // throw new sfStopException();\r\n\t\t//exit;\r\n }", "title": "" }, { "docid": "59d622aa43a8fc70d9ac370087f6fc23", "score": "0.480846", "text": "function savebillinginformation($patient_id)\n\t{\n\t\t$params = array(\"pt\",\"bn\",\"exid\",\"fdid\");\n\t\t$fields = array(\"paytype\",\"benamount\",\"exid\",\"forwardid\");\n\t\t$data = array();\n\t\tfor($i=0; $i<count($params); $i++){\n\t\t\t$data[$fields[$i]] = isset($_POST[$param[$i]])?$_POST[$param[$i]]:\"\";\n\t\t};\n\t\t$this->crud_model->update_patient_info_for_billing($patient_id,$data);\n\t\techo \"success\";\n\t}", "title": "" }, { "docid": "984ddc9a508eed78a4c7279639d6c4ec", "score": "0.48008913", "text": "function reportePOA (){\n $this->objFunc=$this->create('MODPresupuesto');\n $dataSource=$this->objFunc->reportePOA();\n $this->dataSource=$dataSource->getDatos();\n\n $nombreArchivo = uniqid(md5(session_id()).'[Reporte-POA]').'.pdf';\n $this->objParam->addParametro('orientacion','L');\n $this->objParam->addParametro('tamano','LETTER');\n $this->objParam->addParametro('nombre_archivo',$nombreArchivo);\n\n $this->objReporte = new RPoaPDF($this->objParam);\n $this->objReporte->setDatos($this->dataSource);\n $this->objReporte->generarReporte();\n $this->objReporte->output($this->objReporte->url_archivo,'F');\n\n\n $this->mensajeExito=new Mensaje();\n $this->mensajeExito->setMensaje('EXITO','Reporte.php','Reporte generado', 'Se generó con éxito el reporte: '.$nombreArchivo,'control');\n $this->mensajeExito->setArchivoGenerado($nombreArchivo);\n $this->mensajeExito->imprimirRespuesta($this->mensajeExito->generarJson());\n }", "title": "" }, { "docid": "20e60f2894191d31e56ffa9100695bf8", "score": "0.47988185", "text": "function reportePDFPresupuestaria () {\n\t\t\t$this->objParam->defecto('ordenacion','id_formulacion_presu');\n\t\t\t$this->objParam->defecto('dir_ordenacion','asc');\n\t\t\t$this->objParam->defecto('cantidad', 1000000);\n\t\t\t$this->objParam->defecto('puntero', 0);\n\n\t\t\t$this->objParam->addFiltro(\"fpd.id_formulacion_presu = \".$this->objParam->getParametro('id_formulacion_presu'));\n\n\t\t\t$this->objFunc=$this->create('MODPresupuesto');\n\t\t\t$this->res=$this->objFunc->listarFormulacionPresuDet($this->objParam);\n\n\t\t\t//obtener titulo del reporte\n\t\t\t$titulo = 'FormulacionPresupuestaria';\n\t\t\t//Genera el nombre del archivo (aleatorio + titulo)\n\t\t\t$nombreArchivo=uniqid(md5(session_id()).$titulo);\n\n\n\t\t\t$nombreArchivo.='.pdf';\n\t\t\t$this->objParam->addParametro('orientacion','L');\n\t\t\t$this->objParam->addParametro('tamano','LETTER\t');\n\t\t\t$this->objParam->addParametro('nombre_archivo',$nombreArchivo);\n\t\t\t//Instancia la clase de pdf\n\t\t\t$this->objReporteFormato=new RFormPresupPDF($this->objParam);\n\t\t\t$this->objReporteFormato->setDatos($this->res->datos);\n\t\t\t$this->objReporteFormato->generarReporte();\n\t\t\t$this->objReporteFormato->output($this->objReporteFormato->url_archivo,'F');\n\n\n\t\t\t$this->mensajeExito=new Mensaje();\n\t\t\t$this->mensajeExito->setMensaje('EXITO','Reporte.php','Reporte generado',\n\t\t\t\t\t'Se generó con éxito el reporte: '.$nombreArchivo,'control');\n\t\t\t$this->mensajeExito->setArchivoGenerado($nombreArchivo);\n\t\t\t$this->mensajeExito->imprimirRespuesta($this->mensajeExito->generarJson());\n\n\t\t}", "title": "" }, { "docid": "9ae8e00e5e7d02abcbea96929a7e66c1", "score": "0.47972625", "text": "function modificarInstrucSeg(){\n\t\t$this->procedimiento='gem.ft_instruc_seg_ime';\n\t\t$this->transaccion='GM_INSEG_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_instruc_seg','id_instruc_seg','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "fa24028f126cb9dce44bf9ced3b510c3", "score": "0.47955513", "text": "function modificarPresolicitud(){\n\t\t$this->procedimiento='adq.ft_presolicitud_ime';\n\t\t$this->transaccion='ADQ_PRES_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_presolicitud','id_presolicitud','int4');\n\t\t$this->setParametro('id_grupo','id_grupo','int4');\n\t\t$this->setParametro('id_funcionario_supervisor','id_funcionario_supervisor','int4');\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('obs','obs','text');\n\t\t$this->setParametro('id_uo','id_uo','int4');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('fecha_soli','fecha_soli','date');\n\t\t$this->setParametro('id_depto','id_depto','int4');\n\t\t$this->setParametro('id_gestion','id_gestion','int4');\n \n \n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "41e3aaeaacb0af5880c37812dbfb60d6", "score": "0.47840622", "text": "private function triggerEncounterWorkflow($encounterId, $patientId)\n {\n // this is the sample code of workflow need to be modified\n $data = array('patientEncounterId' => $encounterId, 'patientId' => $patientId);\n $configurator = \\SynapEssentials\\TransactionManagerBundle\\EventListener\\Configurator::getInstance();\n $container = $configurator->getServiceContainer();\n $exeManagerObject = ExecutionManager::getInstance($container);\n //$resp will contain multiple execution ID\n $resp = $exeManagerObject->startRelatedWorkFlows('patientArrived', $data);\n return $resp;\n }", "title": "" }, { "docid": "57f930e2a9012ecf3d65adc3db3aed86", "score": "0.47789335", "text": "function insertarMantPredef(){\n\t\t$this->procedimiento='gem.ft_mant_predef_ime';\n\t\t$this->transaccion='GEM_GEMAPR_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('id_tipo_equipo','id_tipo_equipo','int4');\n\t\t$this->setParametro('id_unidad_medida_estimado','id_unidad_medida_estimado','int4');\n\t\t$this->setParametro('tiempo_estimado','tiempo_estimado','numeric');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "27fea56a7e9c33a2db1e3696164ebe89", "score": "0.47778583", "text": "public function CrearHospital($raz,$num_nit,$nucleo,$cod_cen_costo,$reg,$tip_reg,$ciudad,$direccion,$telefono,$fax,$representante,$correo,$contacto,$tip_ide_id,$principal,$tip_hosp,$cuenta,$clase,$uni_funcional)\r\n{\r\n\t$usuario_actualizador=$_SESSION['k_nit_id'];\r\n\t$fecha_actualizacion=date('d-m-Y');\r\n\t\r\n\t$hora=localtime(time(),true);\r\n\tif($hora[tm_hour]==1)\r\n\t\t$hora_dia=23;\r\n\telse\r\n\t\t$hora_dia=$hora[tm_hour]-1;\r\n\t$hora_actualizacion=$hora_dia.\":\".$hora[tm_min].\":\".$hora[tm_sec];\r\n\t\t\r\n\t$sql=\"EXECUTE CrearHospital '$raz','$num_nit',$nucleo,'$cod_cen_costo',$reg,$tip_reg,$ciudad,'$direccion','$telefono','$fax','$representante','$correo','$contacto',$tip_ide_id,$principal,$tip_hosp,$cuenta,$clase,'$uni_funcional','$usuario_actualizador','$fecha_actualizacion','$hora_actualizacion'\";\r\n\t$ejecutar=mssql_query($sql) or die(\"no se puede crear el hospital\");\r\n\treturn $ejecutar;\r\n\t\t \r\n}", "title": "" }, { "docid": "bc1bebaefc56badc4f66bc1cd9ac4f39", "score": "0.47774687", "text": "public function profil()\n {\n //on récupère les paramètre de l'url\n $params = explode('/', $_GET['param']);\n if (isset($params[2]) && $params[2] != NULL) {\n $id = $params[2];\n //on recupère le patient par son id\n $patient = $this->patient->getPatientById($id);\n $appointments = $this->appointment->getAppointmentsByPatientId($id);\n\n $data = ['patient' => $patient,\n 'appointments' => $appointments];\n //si le patient existe\n if ($patient != false) {\n $this->render('patient/profilPatient.php', $data);\n } else {\n http_response_code(404);\n }\n //si le formulaire est envoyer avec la méthode POST\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n //instanciation de classe de validation du formulaire\n $form = new patientForm();\n $validation = $form->validation($_POST['lastname'], $_POST['firstname'], $_POST['birthdate'], $_POST['phone'], $_POST['mail']);\n //si la validation renvoie true\n if ($validation === \"true\") {\n //on edit le patient\n $this->patient->edit($id, $_POST['lastname'], $_POST['firstname'], $_POST['birthdate'], $_POST['phone'], $_POST['mail']);\n //on redirige sur la liste des patients\n header('Location:' . ROOT_DIRECTORY . '/patient/list');\n\n }\n }\n\n\n } else {\n http_response_code(404);\n }\n\n\n }", "title": "" }, { "docid": "17b8b08e50122566b4129f87a2b09785", "score": "0.47774258", "text": "public function actionCreate($idpatient)\n {\n $model = new Payement();\n $model->idpatient = $idpatient;\n\n $analyses = $model->idpatient0->effectueranalysesNonPayer;\n $tau=($model->idpatient0->tauxassu)/100;\n $tauPat=1-$tau;\n $quot=$tau/$tauPat;\n\n $examens = $model->idpatient0->effectuerexamensNonPayer;\n $consultations = $model->idpatient0->effectuerconsultationsNonPayer;\n $consultationsAss = $model->idpatient0->effectuerconsultationsNonPayerAssu;\n $demanderanalyse = $model->idpatient0->effectuerdemandeanalysesNonPayer;\n\n $achats = $model->idpatient0->achatsNonPayer;\n $hospitalisations = $model->idpatient0->hospitalisersNonPayer;\n $soins = $model->idpatient0->donnesoinsNonPayer;\n // var_dump($consultations);exit;\n\n if ($model->load(Yii::$app->request->post())) {\n switch(true) {\n case (count($consultations) >= 1):\n\n $model->idpayement = $model->count() + 1;\n $model->montantrecu = $_POST['montantapayer'] * $quot;\n //$model->montantasurance = $_POST['montantapayer']*$tau;\n // $model->montanttotal = $_POST['montantapayer'];\n $model->iduser = Yii::$app->user->identity->id;\n $model->datepayement = date('Y-m-d H:i:s');\n $model->refpayement = 'payement N° ' . $model->idpayement;\n\n\n if ($model->save()) {\n\n // Traitement des consultations\n foreach ($consultations as $consultation) {\n $consultation->payer = 1;\n if ($consultation->save()) {\n\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Consultation';\n $detailPayement->codeprestation = '' . $consultation->ideffectuerconsul;\n $detailPayement->montant = $consultation->total;\n //$detailPayement->montantpatient = $consultation->total*$quot;// c'est xa qui represente la part de l'assurance\n //$detailPayement->montanttotal = $consultation->total/$tauPat;// montant total\n //var_dump($detailPayement->montantpatient);exit;\n $detailPayement->save();\n // var_dump($detailPayement->save());exit;\n }\n\n }\n\n\n $model->idpayement = $model->count() + 1;\n $model->montantrecu = $_POST['montantapayer'] * $quot;\n //$model->montantasurance = $_POST['montantapayer']*$tau;\n // $model->montanttotal = $_POST['montantapayer'];\n $model->iduser = Yii::$app->user->identity->id;\n $model->datepayement = date('Y-m-d H:i:s');\n $model->refpayement = 'payement N° ' . $model->idpayement;\n\n\n if ($model->save()) {\n\n // Traitement des consultations\n foreach ($consultations as $consultation) {\n $consultation->payer = 1;\n if ($consultation->save()) {\n\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Consultation';\n $detailPayement->codeprestation = '' . $consultation->ideffectuerconsul;\n $detailPayement->montant = $consultation->total;\n //$detailPayement->montantpatient = $consultation->total*$quot;// c'est xa qui represente la part de l'assurance\n //$detailPayement->montanttotal = $consultation->total/$tauPat;// montant total\n //var_dump($detailPayement->montantpatient);exit;\n $detailPayement->save();\n // var_dump($detailPayement->save());exit;\n }\n\n }\n\n }\n // Traitement des analyses\n foreach ($analyses as $analyse) {\n $analyse->payer = 1;\n if ($analyse->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Analyse';\n $detailPayement->codeprestation = '' . $analyse->idanalysemedicale;\n $detailPayement->montant = $analyse->coutanalyse;\n $detailPayement->montantpatient = $$analyse->coutanalyse * $$tau;// c'est xa qui represente le montant de l'assurance\n $detailPayement->montanttotal = $$analyse->coutanalyse * $quot;// montant total\n $detailPayement->save();\n }\n }\n\n\n // Traitement des examens\n foreach ($examens as $examen) {\n $examen->payer = 1;\n if ($examen->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Examen';\n $detailPayement->codeprestation = '' . $examen->idexamen;\n $detailPayement->montant = $examen->idexamen0->idtypeexamen0->coutexamen;\n $detailPayement->montantpatient = $examen->idexamen0->idtypeexamen0->coutexamen * $tau;\n $detailPayement->montanttotal = $examen->idexamen0->idtypeexamen0->coutexamen * $quot;\n $detailPayement->save();\n }\n }\n\n\n // Traitement des achats\n foreach ($achats as $achat) {\n $achat->payer = 1;\n if ($achat->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Pharmacie';\n $detailPayement->codeprestation = '' . $achat->idachat;\n $detailPayement->montant = $achat->total;\n $detailPayement->montantpatient = $achat->total * $tau;\n $detailPayement->montanttotal = $achat->total * $quot;\n $detailPayement->save();\n }\n }\n\n // Traitement des hospitalisations\n foreach ($hospitalisations as $hospitalisation) {\n $hospitalisation->payer = 1;\n if ($hospitalisation->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Hospitalisation';\n $detailPayement->codeprestation = '' . $hospitalisation->idhospitalisation;\n $detailPayement->montant = $hospitalisation->total;\n $detailPayement->montantpatient = $hospitalisation->total * $tau;\n $detailPayement->montanttotal = $hospitalisation->total * $quot;\n $detailPayement->save();\n }\n }\n\n // Traitement des soins\n foreach ($soins as $soin) {\n $soin->payer = 1;\n if ($soin->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Soin';\n $detailPayement->codeprestation = '' . $soin->iddonnesoins;\n $detailPayement->montant = $soin->total;\n $detailPayement->montantpatient = $soin->total * $tau;\n $detailPayement->montanttotal = $soin->total * $quot;\n $detailPayement->save();\n }\n }\n\n }\n\n break;\n case (count($consultationsAss)>=1);\n $model->idpayement = $model->count() + 1;\n $model->montantrecu = $_POST['montantapayer'] * $quot;\n //$model->montantasurance = $_POST['montantapayer']*$tau;\n // $model->montanttotal = $_POST['montantapayer'];\n $model->iduser = Yii::$app->user->identity->id;\n $model->datepayement = date('Y-m-d H:i:s');\n $model->refpayement = 'payement N° ' . $model->idpayement;\n\n\n if ($model->save()) {\n\n // Traitement des consultations\n foreach ($consultationsAss as $consultatio) {\n $consultatio->payer = 1;\n if ($consultatio->save()) {\n\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Consultation';\n $detailPayement->codeprestation = '' . $consultatio->ideffectuerconsul;\n $detailPayement->montant = $consultatio->total;\n //$detailPayement->montantpatient = $consultation->total*$quot;// c'est xa qui represente la part de l'assurance\n //$detailPayement->montanttotal = $consultation->total/$tauPat;// montant total\n //var_dump($detailPayement->montantpatient);exit;\n $detailPayement->save();\n // var_dump($detailPayement->save());exit;\n }\n\n }\n\n\n $model->idpayement = $model->count() + 1;\n $model->montantrecu = $_POST['montantapayer'] * $quot;\n //$model->montantasurance = $_POST['montantapayer']*$tau;\n // $model->montanttotal = $_POST['montantapayer'];\n $model->iduser = Yii::$app->user->identity->id;\n $model->datepayement = date('Y-m-d H:i:s');\n $model->refpayement = 'payement N° ' . $model->idpayement;\n\n\n if ($model->save()) {\n\n // Traitement des consultations\n foreach ($consultations as $consultation) {\n $consultation->payer = 1;\n if ($consultation->save()) {\n\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Consultation';\n $detailPayement->codeprestation = '' . $consultation->ideffectuerconsul;\n $detailPayement->montant = $consultation->total;\n //$detailPayement->montantpatient = $consultation->total*$quot;// c'est xa qui represente la part de l'assurance\n //$detailPayement->montanttotal = $consultation->total/$tauPat;// montant total\n //var_dump($detailPayement->montantpatient);exit;\n $detailPayement->save();\n // var_dump($detailPayement->save());exit;\n }\n\n }\n\n }\n // Traitement des analyses\n foreach ($analyses as $analyse) {\n $analyse->payer = 1;\n if ($analyse->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Analyse';\n $detailPayement->codeprestation = '' . $analyse->idanalysemedicale;\n $detailPayement->montant = $analyse->coutanalyse;\n $detailPayement->montantpatient = $$analyse->coutanalyse * $$tau;// c'est xa qui represente le montant de l'assurance\n $detailPayement->montanttotal = $$analyse->coutanalyse * $quot;// montant total\n $detailPayement->save();\n }\n }\n\n\n // Traitement des examens\n foreach ($examens as $examen) {\n $examen->payer = 1;\n if ($examen->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Examen';\n $detailPayement->codeprestation = '' . $examen->idexamen;\n $detailPayement->montant = $examen->idexamen0->idtypeexamen0->coutexamen;\n $detailPayement->montantpatient = $examen->idexamen0->idtypeexamen0->coutexamen * $tau;\n $detailPayement->montanttotal = $examen->idexamen0->idtypeexamen0->coutexamen * $quot;\n $detailPayement->save();\n }\n }\n\n\n // Traitement des achats\n foreach ($achats as $achat) {\n $achat->payer = 1;\n if ($achat->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Pharmacie';\n $detailPayement->codeprestation = '' . $achat->idachat;\n $detailPayement->montant = $achat->total;\n $detailPayement->montantpatient = $achat->total * $tau;\n $detailPayement->montanttotal = $achat->total * $quot;\n $detailPayement->save();\n }\n }\n\n // Traitement des hospitalisations\n foreach ($hospitalisations as $hospitalisation) {\n $hospitalisation->payer = 1;\n if ($hospitalisation->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Hospitalisation';\n $detailPayement->codeprestation = '' . $hospitalisation->idhospitalisation;\n $detailPayement->montant = $hospitalisation->total;\n $detailPayement->montantpatient = $hospitalisation->total * $tau;\n $detailPayement->montanttotal = $hospitalisation->total * $quot;\n $detailPayement->save();\n }\n }\n\n // Traitement des soins\n foreach ($soins as $soin) {\n $soin->payer = 1;\n if ($soin->save()) {\n $detailPayement = new Detailpayement();\n $detailPayement->idpayement = $model->idpayement;\n $detailPayement->prestation = 'Soin';\n $detailPayement->codeprestation = '' . $soin->iddonnesoins;\n $detailPayement->montant = $soin->total;\n $detailPayement->montantpatient = $soin->total * $tau;\n $detailPayement->montanttotal = $soin->total * $quot;\n $detailPayement->save();\n }\n }\n\n }\n\n }\n\n\n return $this->redirect(['view', 'id' => $model->idpayement]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'analyses' => $analyses,\n 'examens' => $examens,\n 'consultations' => $consultations,\n // 'consultations' => $consultationsAss,\n 'achats' => $achats,\n 'hospitalisations' => $hospitalisations,\n 'soins' => $soins,\n ]);\n }\n }", "title": "" }, { "docid": "eb6d5c377af19703c205dacfbfe00e13", "score": "0.4771197", "text": "public function subject()\n {\n\t$this->prgresult = $this->common_model->get_listspfic2('program','prg_id', 'prg_name');\n\n $data['subname'] = array('name' => 'subname','id' => 'subname','maxlength' => '100','size' => '40','value' => '',);\n $data['subcode'] = array('name' => 'subcode','id' => 'subcode','maxlength' => '100','size' => '40','value' => '',);\n $data['subshort'] = array('name' => 'subshort','id' => 'subshort','maxlength' => '100','size' => '40','value' => '',);\n $data['subdesc'] = array('name' => 'subdesc','id' => 'subdesc','maxlength' => '100','size' => '40','value' => '',);\n $data['subext1'] = array('name' => 'subext1','id' => 'subext1','maxlength' => '100','size' => '40','value' => '',);\n $data['subext2'] = array('name' => 'subext2','id' => 'subext2','maxlength' => '100','size' => '40','value' => '',);\n \n $this->form_validation->set_rules('subname','Subject Name','trim|xss_clean|required');\n $this->form_validation->set_rules('subcode','Subject Code','trim|xss_clean|required');\n $this->form_validation->set_rules('subshort','Subject Short','trim|xss_clean|required');\n $this->form_validation->set_rules('subdesc','Subject Description','trim|xss_clean');\n $this->form_validation->set_rules('subext1','Subject Ext1','trim|xss_clean');\n $this->form_validation->set_rules('subext2','Subject Ext2','trim|xss_clean');\n $this->form_validation->set_rules('program','Program Name','trim|xss_clean');\n $this->form_validation->set_rules('sub_semester','Semester/Year','trim|xss_clean');\n $this->form_validation->set_rules('sub_subtype','Subject Type','trim|xss_clean');\n\n if($this->form_validation->run() == TRUE)\n {\n $subname = $this->input->post('subname',TRUE);\n $subcode = $this->input->post('subcode');\n $subshort = $this->input->post('subshort');\n $subdesc = $this->input->post('subdesc');\n $subext1 = $this->input->post('subext1');\n $subext2 = $this->input->post('subext2');\n $program = $this->input->post('program');\n $sub_semester = $this->input->post('sub_semester');\n $sub_subtype = $this->input->post('sub_subtype');\n\t/* check for duplicate record*/\n $result = $this->common_model->isduplicate('subject','sub_name',$subname);\n if($result == 1)\n {\n $this->session->set_flashdata('error', $subname . ' already exist' );\n redirect('setup/subject');\n\t}\n\t$data_sub = array('sub_name'=>$subname,'sub_code'=>$subcode,'sub_short'=>$subshort,'sub_desc'=>$subdesc,'sub_ext1'=>$subext1,'sub_ext2'=>$subext2,'sub_program'=>$program,'sub_semester'=> $sub_semester, 'sub_subtype'=>$sub_subtype);\n\t$subflag=$this->common_model->insertrec('subject', $data_sub) ;\n if(!$subflag)\n\t {\n\t $this->session->set_flashdata('Error in adding Program - ' . $subname . '.', 'error');\n $this->logger->write_dblogmessage(\"insert\",\"Subject records added successfully with - \".$subname, ' by '.$username);\n $this->logger->write_logmessage(\"insert\",\"Subject records added successfully with - \".$subname, ' by '.$username);\n redirect('setup/subject');\n }\n else\n {\n $this->logger->write_logmessage(\"insert\",\"Subject records added successfully with - \".$subname, ' by '.$username);\n $this->logger->write_dblogmessage(\"insert\",\"Subject records added successfully with - \".$subname, ' by '.$username);\n $this->session->set_flashdata(\"success\", $subname.\" - Subject added successfully\");\n redirect('setup/viewsubject');\n }\n }\n $this->load->view('setup/subject',$data);\n return;\n }", "title": "" }, { "docid": "0c9339e605550ac8b2ced968cb57c2ae", "score": "0.4768483", "text": "function createProdid( ) {\n if( !isset( $this->prodid ))\n $this->_makeProdid();\n switch( $this->format ) {\n case 'xcal':\n return ' prodid=\"'.$this->prodid.'\"'.$this->nl;\n break;\n default:\n return 'PRODID:'.$this->prodid.$this->nl;\n break;\n }\n }", "title": "" }, { "docid": "91bf1e26ca721bddb5e1a19220837b8c", "score": "0.4767532", "text": "public function add__equipment__process(){\n\t\t\n\t\t\n\t\textract($_POST);\n\t\t$return = array(\n\t\t\t'status' => 0,\n\t\t\t'message_heading'=> 'Failed !',\n\t\t\t'message' => 'Could not create equipment, please try again.',\n\t\t\t'reset_form' => 0\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\tif(!isset($service_agent)){\n\t\t\t$service_agent = 221;\n\t\t}\n\t\t\n\t\t$chk = 0;\n\t\t\n\t\tif( user_can('add_equipment') ):\n\t\t\t$guid = get_guid(TBL_EQUIPMENTS);\n\n\t\t\t\tdate_default_timezone_set('Europe/London');\n\t\t$date = date('Y-m-d', time());\n if(is_admin()){\n\t\t\t\n\t\t\t$chk=1;\n\t\t\t$result = $this->database->insert(TBL_EQUIPMENTS,\n\t\t\t\tarray(\n\t\t\t\t\t'ID' => $guid,\n\t\t\t\t\t'name' => 0,\n\t\t\t\t\t'centre' => $centre,\n\t\t\t\t\t'equipment_code' => NULL,\n\t\t\t\t\t'equipment_type' => $equipment_type,\n\t\t\t\t\t'manufacturer' => $manufacturer,\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'supplier' => $supplier,\n\t\t\t\t\n\t\t\t\t\t'service_agent' => $service_agent,\n\t\t\t\t\n\t\t\t\t\t'location_id' => $location_id,\n\t\t\t\t\t'location' => $location,\n\t\t\t\t\t'serial_number' => $serial_number,\n\t\t\t\t\t'year_manufacturered'=> $year_manufacturered,\n\t\t\t\t\t'year_installed' => $year_installed,\n\t\t\t\t\t'last_modified' => $date,\n\t\t\t\t\t'year_decommisoned' => 0,\n\t\t\t\t\t'decommed' => 0,\n\t\t\t\t\t'spare' => $spare,\n\t\t\t\t\t'tomo' => $tomo,\n\t\t\t\t\t'comment' => $comment,\n\t\t\t\t\t'x_ray' => 1,\n\t\t\t\t\t'approved' => $approved\n\t\t\t\t)\n\t\t\t);\n }else{\n\t\t\t\t\t\t$chk=1;\n \t\t\t$result = $this->database->insert(TBL_EQUIPMENTS,\n\t\t\t\tarray(\n\t\t\t\t\t'ID' => $guid,\n\t\t\t\t\t'name' => 0,\n\t\t\t\t\t'centre' => $centre,\n\t\t\t\t\t'equipment_code' => NULL,\n\t\t\t\t\t'equipment_type' => $equipment_type,\n\t\t\t\t\t'manufacturer' => $manufacturer,\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'supplier' => $supplier,\n\t\t\t\t\t\t\t\n\t\t\t\t\t'service_agent' => $service_agent,\n\t\t\t\t\t\t\t\n\t\t\t\t\t'location_id' => $location_id,\n\t\t\t\t\t'location' => $location,\n\t\t\t\t\t'serial_number' => $serial_number,\n\t\t\t\t\t'year_manufacturered'=> $year_manufacturered,\n\t\t\t\t\t'year_installed' => $year_installed,\n\t\t\t\t\t'year_decommisoned' => 0,\n\t\t\t\t\t'comment' => $comment,\n\t\t\t\t\t'last_modified' => $date,\n//\t\t\t\t\t\t\t\n\t\t\t\t\t'decommed' => 0,\n\t\t\t\t\t'spare' => $spare,\t\n\t\t\t\t\t'tomo' => $tomo,\n\t\t\t\t\t'x_ray' => 1,\n\t\t\t\t\t'approved' => 0\n//\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n }\n \n\t\t\n\t\tif($chk=1){\n\n\t\t\t\t\t\t\t$name = update_names($guid);\n\t\t\t\t\t$update_args = array(\n\t\t\t\t\t'name' => $name,\n\t\t\t\t\n\t\t\t);\t\n\n\n\t\t$result = $this->database->update(TBL_EQUIPMENTS,$update_args, array( 'ID'=> $guid));\n\t\t\n\t\t\t}\n \n \n\t\t\tif($result):\n\t\t\t\t$notification_args = array(\n\t\t\t\t\t'title' => 'New equipment created ',\n\t\t\t\t\t'notification'=> 'You have successfully created a new equipment.',\n\t\t\t\t);\n\n\t\t\t\tadd_user_notification($notification_args);\n\t\t\t\t$return['status'] = 1;\n\t\t\t\t$return['message_heading'] = 'Success !';\n\t\t\t\t$return['message'] = 'Equipment has been created successfully.';\n\t\t\t\t$return['reset_form'] = 1;\t\t\t\n\t\t\t\n\n\n\n\t\t\n\t\t\tendif;\n\t\tendif;\n\n\t\treturn json_encode($return);\n\t\t\t\t\t\t\n\n\n\t}", "title": "" }, { "docid": "7f4cc8cb1f2c002534efd6705693fa13", "score": "0.4759056", "text": "public function prisonerSentence($sentence_data)\n {\n if(isset($sentence_data['PrisonerSentenceCapture']) && count($sentence_data['PrisonerSentenceCapture']) > 0)\n {\n $sentence_data['PrisonerSentence'] = $sentence_data['PrisonerSentenceCapture'];\n unset($sentence_data['PrisonerSentenceCapture']);\n }\n $prisoner_id = '';\n if(isset($sentence_data['PrisonerSentence']) && count($sentence_data['PrisonerSentence']) > 0)\n {\n $data = $sentence_data['PrisonerSentence'];\n $prisoner_id = $sentence_data['PrisonerSentence']['prisoner_id'];\n //get prisoner type \n $prisoner_type_id = $this->Prisoner->field('prisoner_type_id', array('Prisoner.id'=>$sentence_data['PrisonerSentence']['prisoner_id']));\n\n //is prisoner have lpd\n $prisoner_lpd = $this->Prisoner->field('lpd', array('Prisoner.id'=>$sentence_data['PrisonerSentence']['prisoner_id']));\n\n //.prisoner status\n $prisoner_status = $this->Prisoner->field('status', array('Prisoner.id'=>$sentence_data['PrisonerSentence']['prisoner_id']));\n //cause list manage --START--\n $causeList = array();\n if(isset($sentence_data['PrisonerSentence']['id']) && empty($sentence_data['PrisonerSentence']['id']) && ($prisoner_type_id == Configure::read('REMAND')))\n {\n if(isset($sentence_data['PrisonerSentence']['sentence_from']) && !empty($sentence_data['PrisonerSentence']['sentence_from']) && ($sentence_data['PrisonerSentence']['sentence_from'] == 'Admission'))\n {\n $causeList['CauseList']['prison_id'] = $this->Session->read('Auth.User.prison_id');\n $causeList['CauseList']['prisoner_id'] = $sentence_data['PrisonerSentence']['prisoner_id'];\n $causeList['CauseList']['date_of_cause_list'] = $sentence_data['PrisonerSentence']['date_of_cause_list'];\n if(isset($data['session_date']) && !empty($data['session_date']))\n $causeList['CauseList']['session_date'] = date('Y-m-d', strtotime($sentence_data['PrisonerSentence']['session_date']));\n $causeList['CauseList']['magisterial_id'] = $sentence_data['PrisonerSentence']['magisterial_id'];\n $causeList['CauseList']['court_id'] = $sentence_data['PrisonerSentence']['court_id'];\n $causeList['CauseList']['presiding_judge_id'] = $sentence_data['PrisonerSentence']['presiding_judge_id'];\n $causeList['CauseList']['high_court_case_no'] = $sentence_data['PrisonerSentence']['high_court_case_no'];\n } \n }\n //cause list manage --END--\n //echo '<pre>'; print_r($sentence_data); exit;\n if(count($data)>0){\n \n $login_user_id = $this->Session->read('Auth.User.id'); \n $data['login_user_id'] = $login_user_id; \n\n $sentenceLengthText = '';\n $remissionText = '';\n $date_of_conviction = '';\n $lpd = '';\n $epd = '';\n $is_long_term_prisoner = '';\n $prisonerPreviousSentences = array();\n\n if(isset($data['prisoner_id']) && ($data['prisoner_id'] != ''))\n {\n $prisoner_id = $data['prisoner_id'];\n\n //save prisoners admission details \n if($data['date_of_committal'] != '')\n $date_of_committal = $data['date_of_committal']=date('Y-m-d',strtotime($data['date_of_committal']));\n\n if($data['date_of_committal'] != '')\n $data['date_of_committal'] = date('Y-m-d H:i:s', strtotime($data['date_of_committal']));\n\n if(isset($data['session_date']) && !empty($data['session_date']))\n $data['session_date'] = date('Y-m-d', strtotime($data['session_date']));\n\n if(isset($data['time_of_offence']) && ($data['time_of_offence'] != ''))\n $data['time_of_offence']=date('Y-m-d H:i:s',strtotime($data['time_of_offence']));\n\n if(isset($data['next_payment_date']) && !empty($data['next_payment_date']))\n $data['next_payment_date']=date('Y-m-d',strtotime($data['next_payment_date']));\n\n if(isset($data['date_of_sentence']) && !empty($data['date_of_sentence']))\n $date_of_sentence = $data['date_of_sentence']=date('Y-m-d',strtotime($data['date_of_sentence']));\n\n if(isset($data['date_of_conviction']) && !empty($data['date_of_conviction']))\n $date_of_conviction = $data['date_of_conviction']=date('Y-m-d',strtotime($data['date_of_conviction']));\n\n if(is_array($data['offence']) && count($data['offence']) > 0)\n $data['offence'] = implode(',',$data['offence']);\n if(is_array($data['section_of_law']) && count($data['section_of_law']) > 0)\n $data['section_of_law'] = implode(',',$data['section_of_law']);\n \n $db = ConnectionManager::getDataSource('default');\n //$db->begin(); \n\n //create uuid\n if(empty($data['id']))\n {\n $uuid = $this->PrisonerSentence->query(\"select uuid() as code\");\n $uuid = $uuid[0][0]['code'];\n $this->request->data['PrisonerSentence']['uuid'] = $uuid;\n } \n else \n {\n //Trash old sentence count of sentence\n //$fields = array('PrisonerSentenceCount.is_trash'=>1);\n if(isset($sentence_data['PrisonerSentenceCount']))\n {\n $conds = array('PrisonerSentenceCount.sentence_id'=>$data['id']);\n $this->PrisonerSentenceCount->deleteAll($conds,false);\n }\n }\n $sentenceData['PrisonerSentence'] = $data;\n \n if(isset($sentence_data['PrisonerSentenceCount']))\n {\n //check if prisoner previous count exitsts\n if(!empty($prisoner_id) && $prisoner_status != 'Approved')\n {\n $prisonerSentenceConditions = array(\n 'PrisonerSentence.prisoner_id' => $prisoner_id,\n 'PrisonerSentence.is_trash' => 0,\n //'PrisonerSentence.status' => 'Approved',\n );\n if(isset($sentenceData['PrisonerSentence']['id']) && !empty($sentenceData['PrisonerSentence']['id']))\n {\n // $prisonerSentenceConditions += array(\n // 'PrisonerSentence.id !=' => $sentenceData['PrisonerSentence']['id']\n // );\n }\n $prisonerPreviousSentences = $this->PrisonerSentence->find('first', array(\n //'recursive' => -1,\n 'conditions'=> $prisonerSentenceConditions,\n 'order' => array(\n 'PrisonerSentence.id' => 'DESC'\n )\n ));\n\n $firstSentence = $this->PrisonerSentence->find('first', array(\n //'recursive' => -1,\n 'conditions'=> $prisonerSentenceConditions,\n 'order' => array(\n 'PrisonerSentence.id' => 'ASC'\n )\n ));\n }\n // echo '<pre>'; print_r($prisonerPreviousSentences); exit;\n \n if(!empty($prisonerPreviousSentences) && count($prisonerPreviousSentences) > 0)\n {\n //get previous lpd of \n // $lpd1 = $this->Prisoner->field('lpd', array('Prisoner.id'=>$sentence_data['PrisonerSentence']['prisoner_id']));\n\n // $doc1 = $this->Prisoner->field('doc', array('Prisoner.id'=>$sentence_data['PrisonerSentence']['prisoner_id']));\n\n // $epd1 = $this->Prisoner->field('epd', array('Prisoner.id'=>$sentence_data['PrisonerSentence']['prisoner_id']));\n\n // $sentence_length1 = $this->Prisoner->field('sentence_length', array('Prisoner.id'=>$sentence_data['PrisonerSentence']['prisoner_id']));\n\n $lpd1 = $prisonerPreviousSentences['PrisonerSentence']['lpd'];\n $doc1 = $prisonerPreviousSentences['PrisonerSentence']['date_of_conviction'];\n $epd1 = $prisonerPreviousSentences['PrisonerSentence']['epd'];\n $sentence_length1 = $prisonerPreviousSentences['PrisonerSentence']['sentence_length'];\n\n //echo '<pre>'; print_r($prisonerPreviousSentences); exit;\n //echo $doc1; exit;\n\n if(!empty($sentence_length1))\n {\n $sentence_length1 = json_decode($sentence_length1);\n }\n\n //get LPD2 \n $sentenceData['PrisonerSentenceCount'] = $sentence_data['PrisonerSentenceCount'];\n //get prisoner sentence length \n $sentenceLength = $this->getPrisonerSentenceLength($sentenceData['PrisonerSentenceCount']);\n \n $total_sentence = array();\n $remission_sentence = array();\n\n $current_sentenceLength = array();\n\n if(isset($sentenceLength))\n {\n $sentenceLength = json_decode($sentenceLength);\n\n //echo '321<pre>'; print_r($sentenceLength); exit;\n\n $current_sentenceLength = $sentenceLength;\n\n if(count($sentenceLength->total_sentence) > 0)\n {\n $is_long_term_prisoner = $this->gePrisonerTermType($sentenceLength->total_sentence);\n $sentenceLengthText = json_encode($sentenceLength->total_sentence);\n $total_sentence = array(\n 'years'=>$sentenceLength->total_sentence->years,\n 'months'=>$sentenceLength->total_sentence->months,\n 'days'=>$sentenceLength->total_sentence->days\n ); \n }\n \n if($sentence_data['PrisonerSentence']['sentence_from'] == 'Admission')\n {\n if(count($sentenceLength->remission_sentence) > 0)\n {\n $remission_sentence = array(\n 'years'=>$sentenceLength->remission_sentence->years,\n 'months'=>$sentenceLength->remission_sentence->months,\n 'days'=>$sentenceLength->remission_sentence->days\n ); \n $remission = $this->calculateRemission($remission_sentence);\n \n if(count($remission) > 0)\n {\n $remissionText = json_encode($remission);\n }\n }\n \n }\n else \n {\n $remissionText = '';\n $remission = '';\n }\n //calculate lpd\n $lpd = $this->calculateLPD($date_of_conviction, $total_sentence);\n $epd = $this->calculateEPD($lpd, $remission);\n }\n\n\n //check new sentence type \n $sentence_type = $sentenceData['PrisonerSentenceCount'][0]['sentence_type'];\n //check sentence type \n //stype: 1 consecutive\n //stype: 2 concurrent\n //stype 3 pd\n if($sentence_type == '1')\n {\n //echo $lpd.\"----\".$lpd1; \n if($lpd <= $lpd1)\n {\n //echo 'consecutive on different days';\n $date_of_conviction = $doc1;\n //echo '<pre>'; print_r($current_sentenceLength);\n //echo '<pre>'; print_r($sentence_length1);\n //echo '<pre>'; print_r($current_sentenceLength);\n //echo 'hi'; //exit;\n //echo $upd_years = $sentenceLength['prisonerSentence']['years'];\n //echo '<hr>';\n // $total_sentence_length = array(\n // '0' => array(\n // 'sentence_type'=>1,\n // 'years'=>$current_sentenceLength->total_sentence->years+$sentence_length1->years,\n // 'months'=>$current_sentenceLength->total_sentence->months+$current_sentenceLength->months,\n // 'days'=>$current_sentenceLength->total_sentence->days+$sentence_length1->days\n // )\n // ); \n //echo '<pre>'; print_r($current_sentenceLength); \n\n //echo '<pre>'; print_r($prisonerPreviousSentences['PrisonerSentenceCount']); exit;\n $total_sentence_length = array(\n '0' => array(\n 'sentence_type'=> '1',\n 'years'=>$current_sentenceLength->total_sentence->years,\n 'months'=>$current_sentenceLength->total_sentence->months,\n 'days'=>$current_sentenceLength->total_sentence->days\n )\n );\n\n //add existing sentences \n if(isset($prisonerPreviousSentences['PrisonerSentenceCount']) && count($prisonerPreviousSentences['PrisonerSentenceCount']) > 0)\n {\n $i = 0;\n foreach($prisonerPreviousSentences['PrisonerSentenceCount'] as $sentenceCountKey=>$sentenceCountValue)\n {\n $i=$i+1;\n $total_sentence_length += array(\n $i => array(\n 'sentence_type'=> $sentenceCountValue['sentence_type'],\n 'years'=>$sentenceCountValue['years'],\n 'months'=>$sentenceCountValue['months'],\n 'days'=>$sentenceCountValue['days']\n )\n );\n }\n }\n\n //echo '<pre>'; print_r($total_sentence_length);\n //get prisoner sentence length \n $sentenceLength = $this->getPrisonerSentenceLength($total_sentence_length);\n $total_sentence = array();\n $remission_sentence = array();\n //echo '<pre>'; print_r($sentenceLength); exit;\n if(isset($sentenceLength))\n {\n $sentenceLength = json_decode($sentenceLength);\n if(count($sentenceLength->total_sentence) > 0)\n {\n $is_long_term_prisoner = $this->gePrisonerTermType($sentenceLength->total_sentence);\n $sentenceLengthText = json_encode($sentenceLength->total_sentence);\n $total_sentence = array(\n 'years'=>$sentenceLength->total_sentence->years,\n 'months'=>$sentenceLength->total_sentence->months,\n 'days'=>$sentenceLength->total_sentence->days\n ); \n }\n if(count($sentenceLength->remission_sentence) > 0)\n {\n $remission_sentence = array(\n 'years'=>$sentenceLength->remission_sentence->years,\n 'months'=>$sentenceLength->remission_sentence->months,\n 'days'=>$sentenceLength->remission_sentence->days\n ); \n //echo '<pre>'; print_r($remission_sentence); exit;\n $remission = $this->calculateRemission($remission_sentence);\n \n if(count($remission) > 0)\n {\n $remissionText = json_encode($remission);\n }\n }\n //calculate lpd\n $lpd = $this->calculateLPD($date_of_conviction, $total_sentence);\n $epd = $this->calculateEPD($lpd, $remission);\n }\n //echo '<pre>'; print_r($total_sentence_length); exit;\n }\n //echo $lpd.'=='.$epd.'==<pre>'; print_r($remission);\n }\n //exit;\n //if concurrent different days \n if($sentence_type == '2')\n {\n\n //echo '<pre>'; print_r($prisonerPreviousSentences); exit;\n if($lpd <= $lpd1)\n {\n\n // echo '<pre>';\n // print_r($sentenceLength);\n // echo '<pre>';\n // print_r($sentence_length1);\n // echo '<pre>';\n $date_of_conviction = $doc1;\n\n $total_sentence_length = array(\n '0' => array(\n 'sentence_type'=> '2',\n 'years'=>$current_sentenceLength->total_sentence->years,\n 'months'=>$current_sentenceLength->total_sentence->months,\n 'days'=>$current_sentenceLength->total_sentence->days\n )\n );\n\n //add existing sentences \n if(isset($prisonerPreviousSentences['PrisonerSentenceCount']) && count($prisonerPreviousSentences['PrisonerSentenceCount']) > 0)\n {\n $i = 0;\n foreach($prisonerPreviousSentences['PrisonerSentenceCount'] as $sentenceCountKey=>$sentenceCountValue)\n {\n $i=$i+1;\n $total_sentence_length += array(\n $i => array(\n 'sentence_type'=> $sentenceCountValue['sentence_type'],\n 'years'=>$sentenceCountValue['years'],\n 'months'=>$sentenceCountValue['months'],\n 'days'=>$sentenceCountValue['days']\n )\n );\n }\n }\n \n // $total_sentence_length = array(\n // '0' => array(\n // 'sentence_type'=> '2',\n // 'years'=>$current_sentenceLength->total_sentence->years,\n // 'months'=>$current_sentenceLength->total_sentence->months,\n // 'days'=>$current_sentenceLength->total_sentence->days\n // ),\n // '1' => array(\n // 'sentence_type'=> '2',\n // 'years'=>$sentence_length1->years,\n // 'months'=>$sentence_length1->months,\n // 'days'=>$sentence_length1->days\n // )\n // ); \n //echo '<pre>'; print_r($total_sentence_length); //exit;\n //get prisoner sentence length \n $sentenceLength = $this->getPrisonerSentenceLength($total_sentence_length);\n $total_sentence = array();\n $remission_sentence = array();\n //echo '<pre>'; print_r($sentenceLength); exit;\n if(isset($sentenceLength))\n {\n $sentenceLength = json_decode($sentenceLength);\n if(count($sentenceLength->total_sentence) > 0)\n {\n $is_long_term_prisoner = $this->gePrisonerTermType($sentenceLength->total_sentence);\n $sentenceLengthText = json_encode($sentenceLength->total_sentence);\n $total_sentence = array(\n 'years'=>$sentenceLength->total_sentence->years,\n 'months'=>$sentenceLength->total_sentence->months,\n 'days'=>$sentenceLength->total_sentence->days\n ); \n }\n if(count($sentenceLength->remission_sentence) > 0)\n {\n $remission_sentence = array(\n 'years'=>$sentenceLength->remission_sentence->years,\n 'months'=>$sentenceLength->remission_sentence->months,\n 'days'=>$sentenceLength->remission_sentence->days\n ); \n $remission = $this->calculateRemission($remission_sentence);\n \n if(count($remission) > 0)\n {\n $remissionText = json_encode($remission);\n }\n }\n //calculate lpd\n $lpd = $this->calculateLPD($date_of_conviction, $total_sentence);\n $epd = $this->calculateEPD($lpd, $remission);\n }\n // echo '<pre>'; print_r($remission); \n // echo 'lpd-'.$lpd.'<hr>';\n // echo 'epd-'.$epd.'<hr>';\n //echo $sentence_type; echo '=='.$lpd.'=='.$sentence_type; \n }\n //exit;\n //concurrent overlapping\n if($lpd > $lpd1)\n {\n //calculate TPI(//total period inprisonment) = lpd2-doc1\n //echo $lpd.'=='.$doc1;\n\n if(isset($firstSentence['PrisonerSentence']['id']) && ($firstSentence['PrisonerSentence']['id'] != $prisonerPreviousSentences['PrisonerSentence']['id']))\n {\n $date2=date_create($firstSentence['PrisonerSentence']['date_of_conviction']);\n }\n else \n {\n $date2=date_create($doc1);\n }\n $date1=date_create($lpd);\n \n $diff=date_diff($date1,$date2);\n //print_r($diff);\n $tpi = array();\n if(isset($diff) && !empty($diff))\n {\n $tpi = array(\n '0' => array(\n 'sentence_type'=> 1,\n 'years'=> $diff->y,\n 'months'=> $diff->m,\n 'days'=> $diff->d\n )\n );\n }\n $sentenceLength = $this->getPrisonerSentenceLength($tpi);\n $total_sentence = array();\n $remission_sentence = array();\n //echo '<pre>'; print_r($sentenceLength); exit;\n if(isset($sentenceLength))\n {\n $sentenceLength = json_decode($sentenceLength);\n \n if(count($sentenceLength->total_sentence) > 0)\n {\n $is_long_term_prisoner = $this->gePrisonerTermType($sentenceLength->total_sentence);\n $sentenceLengthText = json_encode($sentenceLength->total_sentence);\n $total_sentence = array(\n 'years'=>$sentenceLength->total_sentence->years,\n 'months'=>$sentenceLength->total_sentence->months,\n 'days'=>$sentenceLength->total_sentence->days\n ); \n }\n if(count($sentenceLength->remission_sentence) > 0)\n {\n $remission_sentence = array(\n 'years'=>$sentenceLength->remission_sentence->years,\n 'months'=>$sentenceLength->remission_sentence->months,\n 'days'=>$sentenceLength->remission_sentence->days\n ); \n $remission = $this->calculateRemission($remission_sentence);\n \n if(count($remission) > 0)\n {\n $remissionText = json_encode($remission);\n }\n }\n //echo '<pre>'; print_r($remission_sentence);\n //calculate lpd\n $epd = $this->calculateEPD($lpd, $remission);\n }\n //echo 'lpd=='.$lpd.'<br>Remission:';\n //echo $epd; exit;\n }\n } \n //if pd sentence \n if($sentence_type == '3')\n { \n if($date_of_conviction <= $lpd1)\n {\n // echo $lpd.'=============='.$lpd1; exit;\n if($lpd > $lpd1)\n {\n //echo $date_of_conviction.'=============='.$doc1; exit;\n //period of remission ($doc2-$doc1)\n\n $date1=date_create($date_of_conviction);\n $date2=date_create($doc1);\n //echo $date1.'=============='.$doc1; exit;\n $diff=date_diff($date1,$date2);\n \n $remission_period = array();\n if(isset($diff) && !empty($diff))\n {\n $remission_period = array(\n 'years'=> $diff->y,\n 'months'=> $diff->m,\n 'days'=> $diff->d\n );\n }\n \n //echo '<pre>'; print_r($remission_period); exit;\n $remission = $this->calculateRemission($remission_period);\n \n if(count($remission) > 0)\n {\n $remissionText = json_encode($remission);\n }\n $epd = $this->calculateEPD($lpd, $remission);\n //$epd = date('Y-m-d', strtotime(\"$epd+1 day\"));\n }\n else \n {\n $date_of_conviction = $doc1;\n\n $total_sentence_length = array(\n '0' => array(\n 'sentence_type'=> '3',\n 'years'=>$current_sentenceLength->total_sentence->years,\n 'months'=>$current_sentenceLength->total_sentence->months,\n 'days'=>$current_sentenceLength->total_sentence->days\n )\n );\n\n //add existing sentences \n if(isset($prisonerPreviousSentences['PrisonerSentenceCount']) && count($prisonerPreviousSentences['PrisonerSentenceCount']) > 0)\n {\n $i = 0;\n foreach($prisonerPreviousSentences['PrisonerSentenceCount'] as $sentenceCountKey=>$sentenceCountValue)\n {\n $i=$i+1;\n $total_sentence_length += array(\n $i => array(\n 'sentence_type'=> $sentenceCountValue['sentence_type'],\n 'years'=>$sentenceCountValue['years'],\n 'months'=>$sentenceCountValue['months'],\n 'days'=>$sentenceCountValue['days']\n )\n );\n }\n }\n //get prisoner sentence length \n $sentenceLength = $this->getPrisonerSentenceLength($total_sentence_length);\n $total_sentence = array();\n $remission_sentence = array();\n if(isset($sentenceLength))\n {\n $sentenceLength = json_decode($sentenceLength);\n if(count($sentenceLength->total_sentence) > 0)\n {\n $is_long_term_prisoner = $this->gePrisonerTermType($sentenceLength->total_sentence);\n $sentenceLengthText = json_encode($sentenceLength->total_sentence);\n $total_sentence = array(\n 'years'=>$sentenceLength->total_sentence->years,\n 'months'=>$sentenceLength->total_sentence->months,\n 'days'=>$sentenceLength->total_sentence->days\n ); \n }\n if(count($sentenceLength->remission_sentence) > 0)\n {\n $remission_sentence = array(\n 'years'=>$sentenceLength->remission_sentence->years,\n 'months'=>$sentenceLength->remission_sentence->months,\n 'days'=>$sentenceLength->remission_sentence->days\n ); \n $remission = $this->calculateRemission($remission_sentence);\n \n if(count($remission) > 0)\n {\n $remissionText = json_encode($remission);\n }\n }\n //calculate lpd\n $lpd = $this->calculateLPD($date_of_conviction, $total_sentence);\n $epd = $this->calculateEPD($lpd, $remission);\n }\n }\n // echo '<pre>'; print_r($total_sentence_length); \n //echo $remissionText.'<hr>';\n //echo $lpd; echo '---'.$epd; exit;\n }\n }\n //exit;\n }\n else \n {\n $sentenceData['PrisonerSentenceCount'] = $sentence_data['PrisonerSentenceCount'];\n //get prisoner sentence length \n $sentenceLength = $this->getPrisonerSentenceLength($sentenceData['PrisonerSentenceCount']);\n \n $total_sentence = array();\n $remission_sentence = array();\n if(isset($sentenceLength))\n {\n $sentenceLength = json_decode($sentenceLength);\n if(count($sentenceLength->total_sentence) > 0)\n {\n $is_long_term_prisoner = $this->gePrisonerTermType($sentenceLength->total_sentence);\n $sentenceLengthText = json_encode($sentenceLength->total_sentence);\n $total_sentence = array(\n 'years'=>$sentenceLength->total_sentence->years,\n 'months'=>$sentenceLength->total_sentence->months,\n 'days'=>$sentenceLength->total_sentence->days\n ); \n }\n if(count($sentenceLength->remission_sentence) > 0)\n {\n $remission_sentence = array(\n 'years'=>$sentenceLength->remission_sentence->years,\n 'months'=>$sentenceLength->remission_sentence->months,\n 'days'=>$sentenceLength->remission_sentence->days\n ); \n $remission = $this->calculateRemission($remission_sentence);\n \n if(count($remission) > 0)\n {\n $remissionText = json_encode($remission);\n }\n }\n //calculate lpd\n $lpd = $this->calculateLPD($date_of_conviction, $total_sentence);\n }\n $epd = $this->calculateEPD($lpd, $remission);\n }\n }\n \n //update sentence info\n if($this->Session->read('Auth.User.usertype_id')==Configure::read('OFFICERINCHARGE_USERTYPE'))\n {\n $sentenceData['PrisonerSentence']['status'] = 'Reviewed';\n }\n if($prisoner_type_id == Configure::read('CONVICTED'))\n {\n $sentenceData['PrisonerSentence']['sentence_length'] = $sentenceLengthText;\n if($sentenceData['PrisonerSentence']['sentence_from'] == 'Admission')\n {\n $sentenceData['PrisonerSentence']['remission'] = $remissionText;\n }\n $sentenceData['PrisonerSentence']['lpd'] = $lpd;\n $sentenceData['PrisonerSentence']['epd'] = $epd;\n }\n //echo '<pre>'; print_r($sentenceData); exit;\n if($this->PrisonerSentence->saveAll($sentenceData))\n { \n //echo '<pre>'; print_r($sentenceData['PrisonerSentence']); exit;\n $refId = 0;\n $action = 'Add';\n if(isset($sentenceData['PrisonerSentence']['id']) && (int)$sentenceData['PrisonerSentence']['id'] != 0)\n {\n $refId = $sentenceData['PrisonerSentence']['id'];\n $action = 'Edit';\n }\n if($prisoner_type_id == Configure::read('CONVICTED') && ($prisoner_status != 'Approved'))\n {\n $fields = array(\n 'Prisoner.sentence_length' => \"'\".$sentenceLengthText.\"'\",\n 'Prisoner.doc' => \"'\".$date_of_conviction.\"'\",\n 'Prisoner.remission' => \"'\".$remissionText.\"'\",\n 'Prisoner.lpd' => \"'\".$lpd.\"'\",\n 'Prisoner.epd' => \"'\".$epd.\"'\",\n 'Prisoner.dor' => \"'\".$epd.\"'\"\n );\n if($is_long_term_prisoner == 1)\n {\n $fields += array('Prisoner.is_long_term_prisoner' => 1);\n }\n $conds = array(\n 'Prisoner.id' => $prisoner_id,\n ); \n //update prisoner info \n if($this->Prisoner->updateAll($fields, $conds))\n {\n //ASSIGN STAGE TO PRISONER \n $prevStageInfo = $this->StageAssign->find('first', array('conditions' => array('StageAssign.prisoner_id' => $prisoner_id,),));\n if($is_long_term_prisoner == 1){\n $dataArr['StageHistory']['stage_id'] = Configure::read('STAGE-II');\n $dataArr['StageHistory']['next_date_of_stage'] = date('Y-m-d',strtotime(\"+30 days\"));\n }\n else {\n $dataArr['StageHistory']['stage_id'] = Configure::read('STAGE-I');\n }\n $dataArr['StageHistory']['type'] = \"Stage Assigned\";\n $dataArr['StageHistory']['date_of_stage'] = date('Y-m-d');\n $dataArr['StageHistory']['prisoner_id'] = $prisoner_id;\n if(isset($prevStageInfo['StageAssign']['id']) && (int)$prevStageInfo['StageAssign']['id'] != 0)\n {\n //update stage \n $stage_fields = array(\n 'StageAssign.date_of_assign' => \"'\".date('Y-m-d').\"'\",\n // 'StageAssign.stage_id' => Configure::read('STAGE-II')\n );\n $stage_conds = array(\n 'StageAssign.prisoner_id' => $prisoner_id,\n ); \n if($this->StageAssign->updateAll($stage_fields, $stage_conds))\n {\n $stage_history_fields = array(\n 'StageHistory.date_of_stage' => \"'\".date('Y-m-d').\"'\",\n 'StageHistory.next_date_of_stage' => \"'\".date('Y-m-d',strtotime(\"+30 days\")).\"'\",\n // 'StageHistory.stage_id' => Configure::read('STAGE-II')\n );\n $stage_history_conds = array(\n 'StageHistory.prisoner_id' => $prisoner_id,\n ); \n if($this->StageHistory->updateAll($stage_history_fields, $stage_history_conds))\n {\n //save audit log \n if(!$this->auditLog('PrisonerSentence', 'prisoner_sentences', $refId, $action, json_encode(array('PrisonerSentence'=>$sentenceData,'Prisoner'=>$fields, 'StageAssign'=>$stage_fields))))\n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n else \n {\n $db->commit();\n $this->Session->write('message_type','success');\n $this->Session->write('message','Sentence Saved Successfully !'); \n }\n }\n else \n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n }\n else \n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n }\n else \n {\n $stage_fields['StageAssign']['date_of_assign'] = date('Y-m-d');\n if($is_long_term_prisoner == 1)\n {\n $dataArr['StageHistory']['stage_id'] = Configure::read('STAGE-II');\n $stage_fields['StageAssign']['stage_id'] = Configure::read('STAGE-II');\n\n }\n else \n {\n $dataArr['StageHistory']['stage_id'] = Configure::read('STAGE-I');\n $stage_fields['StageAssign']['stage_id'] = Configure::read('STAGE-I');\n }\n\n $dataArr['StageHistory']['type'] = \"Stage Assigned\";\n $dataArr['StageHistory']['date_of_stage'] = date('Y-m-d');\n $dataArr['StageHistory']['prisoner_id'] = $prisoner_id;\n $stage_fields['StageAssign']['prisoner_id'] = $prisoner_id;\n //debug($stage_fields); exit;\n if($this->StageAssign->save($stage_fields))\n {\n if($this->StageHistory->save($dataArr))\n {\n //save audit log \n if(!$this->auditLog('PrisonerSentence', 'prisoner_sentences', $refId, $action, json_encode(array('PrisonerSentence'=>$sentenceData,'Prisoner'=>$fields, 'StageAssign'=>$stage_fields))))\n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n else \n {\n $db->commit();\n $this->Session->write('message_type','success');\n $this->Session->write('message','Sentence Saved Successfully !'); \n }\n }\n else \n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n }\n else \n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n }\n }\n else \n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n }\n else \n {\n if($prisoner_type_id == Configure::read('REMAND'))\n {\n if($this->CauseList->save($causeList))\n {\n $db->commit();\n $this->Session->write('message_type','success');\n $this->Session->write('message','Sentence Saved Successfully !');\n }\n else \n {\n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n }\n else\n {\n $db->commit();\n $this->Session->write('message_type','success');\n $this->Session->write('message','Sentence Saved Successfully !');\n }\n }\n }\n else{ \n $db->rollback();\n $this->Session->write('message_type','error');\n $this->Session->write('message','Sentence Saving Failed !'); \n }\n } \n } \n } \n }", "title": "" }, { "docid": "a73ff3ae777a7edb89b6e6a2f730b3b7", "score": "0.47551426", "text": "public function run()\n {\n $procedure1 = Procedure::create([\n 'name' => 'Купопродажба на недвижен имот'\n ]);\n $id1 = $procedure1->id;\n ProcedureItem::create([\n 'procedure_id' => $id1,\n 'label' => 'Вред. на имот',\n 'name' => 'vrednost_imot',\n 'type' => ProcedureItem::ITEM_TEXT,\n 'is_mandatory' => 1,\n 'options' => [\n 'placeholder' => '30000'\n ],\n 'comments' => 'член 22 од законот за даноците на имот'\n ]);\n ProcedureItem::create([\n 'procedure_id' => $id1,\n 'label' => 'Број на странки',\n 'name' => 'broj_stranki',\n 'type' => ProcedureItem::ITEM_SELECT,\n 'options' => [\n 'placeholder' => 'Изберете број на странки',\n 'options' => [\n 0 => '0',\n 1 => '1',\n 2 => '2',\n 3 => '3'\n ]\n ],\n 'comments' => 'Број на странки'\n ]);\n ProcedureFormula::create([\n 'name' => 'Купопродажен договор',\n 'category' => ProcedureFormula::FORMULA_LAWYER,\n 'formula' => '0.03*vrednost_imot',\n 'procedure_id' => $id1\n ]);\n\n $procedure = Procedure::create([\n 'name' => 'Купопродажба на возило'\n ]);\n $id = $procedure->id;\n ProcedureItem::create([\n 'procedure_id' => $id,\n 'label' => 'Вред. на возило',\n 'name' => 'vrednost_vozilo',\n 'type' => ProcedureItem::ITEM_TEXT,\n 'is_mandatory' => 1,\n 'options' => [\n 'placeholder' => '10000'\n ],\n 'comments' => 'член 22 од законот за даноците на имот'\n ]);\n ProcedureItem::create([\n 'procedure_id' => $id,\n 'label' => 'Регистарски таблички (Дали е во друг град)',\n 'name' => 'reg_tablicki',\n 'type' => ProcedureItem::ITEM_SELECT,\n 'options' => [\n 'placeholder' => 'Дали е во друг град',\n 'options' => [\n 0 => 'Да',\n 1 => 'Не'\n ]\n ],\n 'comments' => 'Дали е во друг град'\n ]);\n ProcedureFormula::create([\n 'name' => 'Купопродажен договор',\n 'category' => ProcedureFormula::FORMULA_LAWYER,\n 'formula' => '0.03*vrednost_imot',\n 'procedure_id' => $id\n ]);\n ProcedureFormula::create([\n 'name' => 'Регистрација',\n 'category' => ProcedureFormula::FORMULA_LAWYER,\n 'formula' => '1200*reg_tablicki',\n 'procedure_id' => $id\n ]);\n }", "title": "" }, { "docid": "2414c01899cc18c1e8e42f23ef55e120", "score": "0.47513983", "text": "function VerificarEmision(){\r\n\t\t\t\t$this->procedimiento='vef.ft_venta_facturacion_ime';\r\n\t\t\t\t$this->transaccion='VEF_VERI_EMI_MOD';\r\n\t\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t\t//Define los parametros para la funcion\r\n\t\t\t\t$this->setParametro('id_punto_venta','id_punto_venta','integer');\r\n\t\t\t\t$this->setParametro('tipo_verificacion','tipo_verificacion','varchar');\r\n\t\t\t\t//Ejecuta la instruccion\r\n\t\t\t\t$this->armarConsulta();\r\n\r\n\t\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t\t//Devuelve la respuesta\r\n\t\t\t\treturn $this->respuesta;\r\n\t\t\t}", "title": "" }, { "docid": "2b8cefa85351cf6e2ef378b97b549911", "score": "0.47486934", "text": "public function edit($id)\n {\n $appointments = Appointment::where('date','>=',date('m/d/Y h:i:s a', time()))\n ->where('doctor_id',Auth::user()->assigned_doctor_id)\n ->get();\n $procedure = Procedure::find($id);\n $procedure_types = ProcedureType::all();\n return view('assistant.edit_procedure', compact('procedure','appointments','procedure_types'));\n }", "title": "" }, { "docid": "64c0cdbb4e6d8e4f388e917a5eebdb7f", "score": "0.47473916", "text": "function tc_updateRecord($descrip,$id_tc) {\n\t$SQLStrQuery=\"CALL sp_p_set_gentCli_Update($descrip,$id_tc)\";\n\tSQLQuery($ResponsePointer,$n,$SQLStrQuery,false); // Realiza la consulta\n}", "title": "" }, { "docid": "0defa4bd9525033663b3f569f34836bb", "score": "0.47460184", "text": "protected function input_elaboration()\n {\n }", "title": "" }, { "docid": "8e2b70d2cb3c4a7e0be785655f3d19f5", "score": "0.47355133", "text": "public function doPromotionEditData()\n {\n }", "title": "" }, { "docid": "0ae6b0464984b2344e7346a68757eaf9", "score": "0.47259122", "text": "public function edit(procedure $procedure)\n {\n //\n $User = Auth::user();\n return view('procedure.edit',['User'=>$User])->with('procedure',$procedure);\n }", "title": "" }, { "docid": "e1b750cb16093a6e69f422701d5bb9e2", "score": "0.47257006", "text": "function close_form(){\n\t\tglobal $in;\n\t\tglobal $inputval;\n\t\tglobal $percorso;\n\t\t/*$percorso=explode(\",\", $this->form['PERCORSO']);\n\t\t for ($p=0;$p<count($percorso);$p++){\n\t\t \tif ($inputval['D_PROTOCOL']=='' && $percorso[$p]=='D_PROTOCOL') $per.=\"EpSSG Registry\";\n\t\t \t$per.=$inputval[$percorso[$p]].\" &gt; \";\n\t\t }\n\t\t $per.=$this->form['TITOLO'];*/\n\t\t $percorso.=\"&nbsp;&gt;&nbsp;<b>\".$this->form['TITOLO'].\"</b>\";\n\t\t if ($in['all_exams_view']!='') $percorso=\"\";\n\t\t if ($in['FORM']!='') $percorso=\"\";\n\t\t if ($in['ESAM']!=0) $patient_table=patient_table();\n\t\t $this->body='\n\t\t <table class=\"sf\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"98%\">\n\t\t <tbody>\n\t\t <tr>\n\t\t <td class=\"testo\" colspan=\"2\">'.$percorso.'</td></tr>\n\t\t <tr>\n\t\t <td colspan=\"2\">\n\t\t <!--table align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"98%\">\n\t\t <tbody>\n\t\t <tr>\n\t\t <td class=\"int\" colspan=\"2\">'.$this->form['TITOLO'].'</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"98%\" align=\"center\">\n\t\t\t\t\t <tbody>\n\t\t\t\t\t <tr>\n\t\t\t\t\t \t<td class=\"centro\" colspan=\"2\" valign=\"bottom\" width=\"55%\" align=\"center\"><a href=\"/help.htm\" target=\"_blank\">Help</a></td>\n\t\t\t\t\t </tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table--></table>\n\t\t'.$patient_table.'\n\t\t \t\t\t\t <table class=\"sf\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"80%\"><tr>\n\t\t \t\t\t\t <!-- CAMPI -->';\n\t\t $colonne=$this->form['COLS'];\n\t\t $width=100/($colonne*2);\n\t\t for ($i=0;$i<$colonne;$i++) $this->body.=\"<td width=\\\"\".$width.\"%\\\">&nbsp;</td><td width=\\\"\".$width.\"%\\\">&nbsp;</td>\";\n\t\t $this->body.=\"</tr>\";\n\t\t $c=0;\n\t\t #echo \"<hr>colonne= $colonne<hr>\";\n\t\t for ($i=0;$i<count($this->fields);$i++){\n\t\t $field_obj=new field($this, $i);\n\t\t $field_obj->close_field();\n\t\t #echo \"<br/>{$field_obj->attributes['VAR']} {$field_obj->attributes['TYPE']} - $colonne - $c -post \";\n\t\t if ($colonne == $c) {\n\t\t \t\t$this->body.=\"</tr><tr>\";\n\t\t \t\t$c=0;\n\t\t \t}\n\t\t \t#echo $c;\n\t\t if ($field_obj->attributes['TYPE']!='hidden' && $field_obj->attributes['TYPE']!='') {\n\t\t \t\tif ($field_obj->attributes['COLS']=='') $c++;\n\t\t\t \telse {\n\t\t\t \t\t$c+=$field_obj->attributes['COLS'];\n\n\t\t\t \t}\n\n\t\t }\n\t\t if ($field_obj->attributes['TYPE']!='hidden') $this->body.=$field_obj->html;\n\t\t /*$this->salva_js.=$field_obj->salva_js;\n\t\t $this->check_js.=$field_obj->check_js;\n\t\t $this->invia_js.=$field_obj->invia_js;*/\n\t\t if (!$field_obj->validata) $this->validata=$field_obj->validata;\n\t\t $controlli.=$field_obj->controlli;\n\t\t }\n\t\t $this->body.=\"</table>\n\t\t <!--FINE CAMPI-->\n\t\t \";\n\t\t/*\n\t\t$this->body.='\n\t\t <table class=\"sf\" align=\"center\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\" width=\"98%\">\n\t\t <tr><td width=50%>&nbsp;</td><td>&nbsp;</td></tr>';\n\t\tfor ($i=0;$i<count($this->fields);$i++){\n\t\t $field_obj=new field($this, $i);\n\t\t $field_obj->close_field();\n\t\t $this->body.=\"\\n\".$field_obj->html;\n\t\t}*/\n\t\t$this->onload='';\n\t\t#$this->body.='</table>';\n\t\tif (isset($in['ESAM'])&& $in['ESAM']==6)\n\t\t{\n \t $link_sae=Set_formAE($this->body);\n\t\t $this->body.=\"<a href=\\\"$link_sae\\\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img border=\\\"0\\\" src=\\\"/images/pdf.gif\\\" >Stampa Scheda di segnalazione</a><br>\";\n }\n\t\tif (isset($in['ESAM']) && $in['USER_TIP']!='RO')\t$this->body.=\"<a href=\\\"index.php?CENTER=\".$in['CENTER'].\"&amp;CODPAT=\".$in['CODPAT'].\"&amp;VISITNUM=\".$in['VISITNUM'].\"&amp;ESAM=\".$in['ESAM'].\"&amp;PROGR=\".$in['PROGR'].\"&amp;eform=equery.xml\\\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Invia eQuery</a><br>\";\n\t\tif ($in['all_exams_view']=='' && $in['equery_vis']=='' && $in['equery_view']=='' && $in['eform']=='' && $in['form']!='completa_autocert.xml')$this->body.='\n\t\t <p align=left><a href=\"index.php?exams=visite_exams.xml&amp;CENTER='.$in['CENTER'].'&amp;CODPAT='.$in['CODPAT'].'&amp;VISITNUM='.$in['VISITNUM'].'\">&lt;&lt;Torna alle schede della visita</a>';\n\t\tglobal $inputval;\n\t\tif ($in['equery_vis'] && $inputval['TO_BE_VALIDATE']=='1' && $inputval['VALIDATA']!='1') $this->body.=' <p align=left><a href=\"index.php?equery_view=vis&ID='.$in['ID'].'&amp;CODPAT='.$inputval['CODPAT'].'&amp;VISITNUM='.$inputval['VISITNUM'].'&amp;ESAM='.$inputval['ESAM'].'&amp;PROGR='.$inputval['PROGR'].'\">&lt;&lt;Vai alla form di validazione</a>';\n\t\tif ($in['all_exams_view']=='') $this->body.=\"<br/><a href=\\\"javascript:history.back();\\\">&lt;&lt;{$this->config_service['Torna_lista_schede']}</a>\";\n\t\t$this->body.=\"</p>\";\n\t\t $href_alternativo=\"index.php?CENTER=\".$in['CENTER'].\"&CODPAT=\".$in['CODPAT'].\"&VISITNUM=\".$in['VISITNUM'].\"&ESAM=\".$in['ESAM'].\"&PROGR=\".$in['PROGR'].\"&DOWN=1\";\n\t $this->body=preg_replace(\"/#HREF#/\", $href_alternativo, $this->body);\n $this->body=preg_replace(\"/<tr><\\/tr>/\", \"\",$this->body);\n\n\t}", "title": "" }, { "docid": "54af29ef7913c2a7e2b35b0049b1b409", "score": "0.47223213", "text": "public function new_prescriptions_save()\n\t{\n\n\t\tif(empty($this->input->post('patient_id'))) {\n\t\t \t$patient_id = $this->input->post('p_id');\n\t\t $p_data['patient_id']= $patient_id;\n\t\t $p_data['venue_id']= $this->input->post('venue_id');\n\t\t \t$p_data['patient_name']= $this->input->post('name');\n\t\t \t$p_data['patient_phone']= $this->input->post('phone');\n\t\t \t$p_data['birth_date']= $this->input->post('birth_date');\n\t\t \t$p_data['sex']= $this->input->post('gender');\n\t\t \t$this->db->insert('patient_tbl',$p_data);\n\t\t} else {\n\t\t\t \t$patient_id = $this->input->post('patient_id');\n\t\t\t}\n\t\t\t \tif(empty($this->input->post('appointment_id'))) {\n\t\t\t \t\t$pdata['appointment_id'] = \"A\".date('y').strtoupper($this->randstrGen(2,4));\n\t\t\t \t} else {\n\t\t\t \t\t$pdata['appointment_id'] = $this->input->post('appointment_id');\n\t\t\t \t}\n\n\t\t\t \t$pdata['patient_id'] = $patient_id;\n\t\t\t \t$pdata['appointment_id'] =$pdata['appointment_id'];\n\t\t\t \t$pdata['doctor_id'] = $this->session->userdata('doctor_id');\n\t\t\t \t$pdata['Pressure'] = $this->input->post('Pressure');\n\t\t\t \t$pdata['Weight'] = $this->input->post('Weight');\n\t\t\t \t$pdata['problem'] = $this->input->post('Problem');\n\t\t\t \t$pdata['venue_id'] = $this->input->post('venue_id');\n\t\t\t \t$pdata['oex'] = $this->input->post('oex');\n\t\t\t\t$pdata['pd'] = $this->input->post('pd');\n\t\t\t\t$pdata['history'] = $this->input->post('history');\n\t\t\t\t$pdata['temperature'] = $this->input->post('temperature');\n\t\t\t \t$pdata['prescription_type'] = 1;\n\t\t\t \t$pdata['pres_comments'] = $this->input->post('prescription_comment');\n\t\t\t \t$pdata['create_date_time'] = date(\"Y-m-d h:i:s\");\n\n\t\t\t \t$this->session->unset_userdata('v_id');\n\t $session_venu = array('v_id' => $this->input->post('venue_id'));\n\t\t \t\t$this->session->set_userdata($session_venu);\n\n\t\t\t \t$this->db->insert('prescription',$pdata);\n\t # get last insert id\n\t $p = $this->db->insert_id();\n\t \n\t $mdata['med_type'] = $this->input->post('type');\n\t\t\t \t$mdata['medicine_id'] = ($this->input->post('medicine_id'));\n\t\t\t \t$mdata['mg'] = ($this->input->post('mg'));\n\t\t\t \t$mdata['dose'] = ($this->input->post('dose'));\n\t\t\t \t$mdata['day'] = ($this->input->post('day'));\n\t\t\t \t$mdata['comments'] = ($this->input->post('comments'));\n\t\t\t \t$mdata['appointment_id'] = $pdata['appointment_id'];\n\t\t\t \t$mdata['prescription_id'] = $p;\n\n\n\t\t\tfor($i=0; $i<count($mdata['medicine_id']); $i++) {\n\t\t\t \t\n\t\t\t \tif(empty($mdata['medicine_id'][$i])) {\n\t\t\t \t\t$md_name['medicine_name'] = $this->input->post('md_name');\n\t\t\t\t \t$create_by = $this->session->userdata('doctor_id');\n\t\t\t\t \t$med_description = 'doctor';\n\n\t\t\t\t \t# chack the medicine name in the medicine_info table \n\t\t\t\t \t$query = $this->db->select('*')\n\t \t \t\t\t->from('medecine_info')\n\t \t \t\t\t->where('medicine_name',$md_name['medicine_name'][$i])\n\t \t \t\t\t->get()\n\t \t \t\t\t->row();\n\t \t \t\t\tif( ! empty($query)) {\n\t\t\t\t\t\t$mdata['med_id'] = $query->medicine_id;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$medicine = array(\n\t\t\t\t\t\t'medicine_name' => $md_name['medicine_name'][$i],\n\t\t\t\t\t\t'med_company_id' => '01',\n\t\t\t\t\t\t'med_group_id' => '01',\n\t\t\t\t\t\t'med_description' => $med_description\n\t\t\t\t\t);\n\t\t\t\t\t# insert medicine id in medicine_info table\n\t\t\t\t\t$this->db->insert('medecine_info',$medicine);\n\t\t\t\t\t# medicine id\n\t\t\t\t\t$mdata['med_id'] = $this->db->insert_id();\n\t\t\t\t\t}\n\n\t\t\t \t} else {\n\t\t\t \t\t$mdata['med_id'] = $mdata['medicine_id'][$i];\n\t\t\t \t}\n\n\t $data = array(\n\t 'prescription_id'=> $mdata['prescription_id'],\n\t 'appointment_id'=> $mdata['appointment_id'],\n\t 'medicine_id'=> $mdata['med_id'],\n\t 'mg'=>$mdata['mg'][$i],\n\t 'dose'=>$mdata['dose'][$i],\n\t 'day'=>$mdata['day'][$i],\n\t 'medicine_type' => $mdata['med_type'][$i],\n\t 'medicine_com'=>$mdata['comments'][$i]\n\t );\n\n\t $this->db->insert('medicine_prescription', $data);\n\t }\n\t#----------------------------------------------------\n\t# test assign for patient\n\t#-----------------------------------------------------\t\t \t\n\t\t\t \t$tdata['prescription_id'] = $p;\n\t\t\t \t$tdata['test_id'] = ($this->input->post('test_name'));\n\t\t\t \t$tdata['test_description'] = ($this->input->post('test_description'));\n\t\t\t \t$tdata['appointment_id'] = $pdata['appointment_id'];\n\t\t\t \n\t\t\t\t$test_name = $this->input->post('test_name');\n\t\t\t \t$te_name = $this->input->post('te_name');\n\n\t\tif((sizeof($test_name) > 0 && !empty($test_name[0])) || (sizeof($te_name) > 0 && !empty($te_name[0]))){\t \t\n\t\t \t\n\t\t\t \tfor($i=0; $i<count($tdata['test_id']); $i++) {\n\n\t\t if(empty($tdata['test_id'][$i])) {\n\t\t\t\t \t\t$test_name['test_name'] = $this->input->post('te_name');\n\t\t\t\t\t \t$test_description = 'doctor';\n\t\t\t\t\t \t# chack the test name in the test_info table \n\t\t\t\t\t \t\t$query = $this->db->select('*')\n\t\t\t\t\t \t \t\t\t->from('test_name_tbl')\n\t\t\t\t\t \t \t\t\t->where('test_name',$test_name['test_name'][$i])\n\t\t\t\t\t \t \t\t\t->get()\n\t\t\t\t\t \t \t\t\t->row();\n\t\t\t\t\t\t\tif(!empty($query)) {\n\t\t\t\t\t\t\t\t$tdata['t_id'] = $query->test_id;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$tesAdd = array(\n\t\t\t\t\t\t\t\t\t'test_name' => $test_name['test_name'][$i],\n\t\t\t\t\t\t\t\t\t'test_description' => $test_description\n\t\t\t\t\t\t\t\t\t );\n\n\t\t\t\t\t\t\t\t$this->db->insert('test_name_tbl', $tesAdd);\n\t\t\t\t\t\t\t\t$tdata['t_id'] = $this->db->insert_id();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t \t} else {\n\t\t\t\t \t\t$tdata['t_id'] = $tdata['test_id'][$i];\n\t\t\t\t \t}\n\n\t\t $data = array(\n\t\t \t\t'prescription_id' => $tdata['prescription_id'],\n\t\t \t\t'appointment_id' => $tdata['appointment_id'],\n\t\t 'test_id'=> $tdata['t_id'],\n\t\t 'test_assign_description'=>$tdata['test_description'][$i]\n\t\t );\n\t \t$this->db->insert('test_assign_for_patine', $data);\n\t\t\t\t}\n\t\t\t}\n\n\n\t#---------------------------------------------------\n\t#\tadvice assign for patient\n\t#---------------------------------------------------\n\t\t\t$a_data['appointment_id'] = $pdata['appointment_id'];\n\t\t\t$a_data['prescription_id'] = $mdata['prescription_id'];\n\t\t \t$a_data['advice'] = ($this->input->post('advice'));\n\t\t\t$num_advice = $this->input->post('advice');\n\t\t \t$num_adv = $this->input->post('adv');\n\t\t if((sizeof($num_advice) > 0 && !empty($num_advice[0])) || (sizeof($num_adv) > 0 && !empty($num_adv[0]))){\n\t\t\t\n\t\t\t\tfor($i=0; $i<count($a_data['advice']); $i++) {\n\n\t\t\t\t\tif(empty($a_data['advice'][$i])) {\n\t\t\t\t\t\t\n\t\t\t\t \t\t$adv_name['advice'] = $this->input->post('adv');\n\t\t\t\t\t\t$adv = array(\n\t\t\t\t\t\t\t'advice' => $adv_name['advice'][$i],\n\t\t\t\t\t\t\t'create_by' => $this->session->userdata('doctor_id')\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->db->insert('doctor_advice', $adv);\n\t\t\t\t\t\t$ad_data['advice'] = $this->db->insert_id();\n\t\t\t\t \t} else {\n\t\t\t\t \t\t$ad_data['advice'] = $a_data['advice'][$i];\n\t\t\t\t \t}\n\n\t\t\t\t\t$advice_data = array(\n\t \t\t'appointment_id' => $a_data['appointment_id'],\n\t \t\t'prescription_id'=> $a_data['prescription_id'],\n\t \t\t'advice_id' => $ad_data['advice']\n\t \t);\n\n\t $this->db->insert('advice_prescriptiion',$advice_data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t \t$d['appointment_id'] = $pdata['appointment_id'];\n\t\t\t \t$d['prescription_id'] = $p;\n\t \t$this->session->set_userdata($d);\n\t\t\t \tredirect(\"prescription\");\n\t}", "title": "" }, { "docid": "45cd75d5d419e2a9c084486175e11400", "score": "0.47193852", "text": "function finalizarPresolicitud(){\n $this->procedimiento='adq.ft_presolicitud_ime';\n $this->transaccion='ADQ_FINPRES_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_presolicitud','id_presolicitud','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "086d737e35e4032461250fc3943ab0ab", "score": "0.47190908", "text": "function print_elig($res,$X12info,$segTer,$compEleSep,$source=''){\n\t\t\n\t$i=1;\n\n\t$PATEDI\t = \"\";\n\n\t// For Header Segment \n\n\t$nHlCounter = 1;\n\t$rowCount\t= 0;\n\t$trcNo\t\t= 1234501;\n\t$refiden\t= 5432101;\n\t\n\tif($source == 'Availity'){\n\t\t$sqltype = \"array_shift\";\n\t\t$sqlcount = count($res);\n\t}else{\n\t\t$sqltype = \"sqlFetchArray\";\n\t\t$sqlcount = sqlNumRows($res);\n\t}\n\t\n\twhile ($row = $sqltype($res)) \n\t{\n\t\t\n\t\tif($nHlCounter == 1)\n\t\t{\n\t\t\t// create ISA \n\t\t\t$PATEDI\t = create_ISA($row,$X12info,$segTer,$compEleSep,$source);\n\t\t\t\n\t\t\t// create GS \n\t\t\t$PATEDI\t .= create_GS($row,$X12info,$segTer,$compEleSep,$source);\n\n\t\t\t// create ST \n\t\t\t$PATEDI\t .= create_ST($row,$X12info,$segTer,$compEleSep,$source);\n\t\t\t\n\t\t\t// create BHT \n\t\t\t$PATEDI\t .= create_BHT($row,$X12info,$segTer,$compEleSep,$source);\n\t\t\t\n\t\t\t// For Payer Segment \n\t\t\t\t\n\t\t\t$PATEDI .= create_HL($row,1,$X12info,$segTer,$compEleSep,$source);\n\t\t\t$PATEDI .= create_NM1($row,'PR',$X12info,$segTer,$compEleSep,$source);\n\n\t\t\t// For Provider Segment \t\t\t\t\n\t\t\t\t\t\n\t\t\t$PATEDI .= create_HL($row,2,$X12info,$segTer,$compEleSep,$source);\n\t\t\t$PATEDI .= create_NM1($row,'1P',$X12info,$segTer,$compEleSep,$source);\n\t\t\t$PATEDI .= create_REF($row,'1P',$X12info,$segTer,$compEleSep,$source);\n\n\t\t\t$nHlCounter = $nHlCounter + 2;\t\n\t\t\t$segmentcount = 7; // segement counts - start from ST \n\t\t}\n\n\t\t// For Subscriber Segment \t\t\t\t\n\t\t\n\t\t$PATEDI .= create_HL($row,$nHlCounter,$X12info,$segTer,$compEleSep,$source);\n\t\t$PATEDI .= create_TRN($row,$trcNo,$refiden,$X12info,$segTer,$compEleSep,$source);\n\t\t$PATEDI .= create_NM1($row,'IL',$X12info,$segTer,$compEleSep,$source);\n\t\t$PATEDI .= create_REF($row,'IL',$X12info,$segTer,$compEleSep,$source);\n\t\t$PATEDI .= create_DMG($row,$X12info,$segTer,$compEleSep,$source);\n\t\t\n\t\t//\t$PATEDI .= create_DTP($row,'102',$X12info,$segTer,$compEleSep);\n\t\t\n\t\t$PATEDI .= create_DTP($row,'472',$X12info,$segTer,$compEleSep,$source);\n\t\t$PATEDI .= create_EQ($row,$X12info,$segTer,$compEleSep,$source);\n\t\t\t\t\t\t\t\t\n\t\t$segmentcount\t= $segmentcount + 7;\n\t\t$nHlCounter\t= $nHlCounter + 1;\n\t\t$rowCount\t= $rowCount + 1;\n\t\t$trcNo\t\t= $trcNo + 1;\n\t\t$refiden\t= $refiden + 1;\n\t\t\n\t\tif($rowCount == $sqlcount)\n\t\t{\n\t\t\t$segmentcount = $segmentcount + 1;\n\t\t\t$PATEDI\t .= create_SE($row,$segmentcount,$X12info,$segTer,$compEleSep,$source);\n\t\t\t$PATEDI\t .= create_GE($row,$X12info,$segTer,$compEleSep,$source);\n\t\t\t$PATEDI\t .= create_IEA($row,$X12info,$segTer,$compEleSep,$source);\n\t\t}\n\t}\n\n\techo $PATEDI;\n}", "title": "" }, { "docid": "6431486f26a2b4c442e41a95dc01e153", "score": "0.4717485", "text": "function recuperarExcentoComision(){\r\n\t\t\t\t$this->procedimiento='vef.ft_corregir_n_formas_pago_ime';\r\n\t\t\t\t$this->transaccion='VF_RECU_COMI_EXCE';\r\n\t\t\t\t$this->tipo_procedimiento='IME';\r\n\r\n\t\t\t\t// \tvar_dump(\"aqui los parametros de llegada\",$this);exit;\r\n\t\t\t\t//Define los parametros para la funcion\r\n\t\t\t\t$this->setParametro('id_venta','id_venta','int4');\r\n\r\n\t\t\t\t//Ejecuta la instruccion\r\n\t\t\t\t$this->armarConsulta();\r\n\t\t\t\t$this->ejecutarConsulta();\r\n\r\n\t\t\t\t//var_dump(\"aqui los parametros de llegada\",$this->respuesta);exit;\r\n\t\t\t\t//Devuelve la respuesta\r\n\t\t\t\treturn $this->respuesta;\r\n\t\t\t}", "title": "" }, { "docid": "2f75be1b6d8d9da179fbe84397d27ad7", "score": "0.47161287", "text": "public function pensa();", "title": "" }, { "docid": "2c54c10955e60706bf542c923680071c", "score": "0.47122243", "text": "public function enquiry() {\n //Get the request and load it as variables\n $request = \\Request::all();\n $procedureId = (!empty($request['procedure_id']) && $request['procedure_id'] > 0) ? Validate::escapeString($request['procedure_id']) : null;\n $hospitalId = Validate::escapeString($request['hospital_id']);\n $title = Validate::escapeString($request['title']);\n $firstName = Validate::escapeString($request['first_name']);\n $lastName = Validate::escapeString($request['last_name']);\n $email = Validate::escapeString($request['email']);\n $phoneNumber = Validate::escapeString($request['phone_number']);\n $postcode = Validate::escapeString($request['postcode']);\n $reason = !empty($request['reason_for_contact']) ? Validate::escapeString($request['reason_for_contact']) : 'other';\n $additionalInformation = Validate::escapeString($request['additional_information']);\n\n //Check if we have the required variables\n $required = ['hospitalId', 'title', 'firstName', 'lastName', 'email', 'phoneNumber','postcode'];\n foreach($required as $req) {\n if(empty($$req)){\n $this->returnedData['error'] = 'Please supply the value: '.$req;\n Errors::generateError($this->returnedData);\n }\n }\n\n //Check if there is one or more hospital_id sent\n if (strpos($hospitalId, ',') !== false) {\n //Explode the hospital ids\n $hospitalIds = explode(',', $hospitalId);\n } else {\n $hospitalIds = [$hospitalId];\n }\n\n //Check if the Hospital is Private\n// if(!empty($hospitalIds) && is_array($hospitalIds)) {\n// foreach($hospitalIds as $key => $hospitalId) {\n// if(!empty($hospitalId)) {\n// $hospital = Hospital::where('id', $hospitalId)->with('hospitalType')->first();\n// if(empty($hospital) || $hospital->hospitalType->name == 'NHS') {\n// unset($hospitalIds[$key]);\n// }\n// }\n// }\n// }\n\n //Validate date of birth (OLD)\n// if(!Validate::isValidDate($dob)) {\n// $this->returnedData['error'] = 'The date_of_birth is wrong. Please try again.';\n// Errors::generateError($this->returnedData);\n// }\n\n //Validate the email\n if(!Validate::isValidEmail($email)) {\n $this->returnedData['error'] = 'The email is wrong. Please try again.';\n Errors::generateError($this->returnedData);\n }\n\n //Validate the phone_number\n if(!Validate::isValidPhoneNumber($phoneNumber)) {\n $this->returnedData['error'] = 'The phone number is wrong. Please try again.';\n Errors::generateError($this->returnedData);\n }\n\n //Validate the postcode\n if(!Validate::isValidPostcode($postcode)) {\n $this->returnedData['error'] = 'The postcode is wrong. Please try again.';\n Errors::generateError($this->returnedData);\n }\n\n //Set the Specialty if we have a procedure_id\n $specialtyId = null;\n if(!empty($procedureId)) {\n $specialty = Procedure::where('id', $procedureId)->first();\n if(!empty($specialty))\n $specialtyId = $specialty->specialty_id;\n }\n\n //We can create the actual Enquiry(s) if it reaches here\n $enquiry = [];\n foreach($hospitalIds as $i => $hospitalId) {\n $enquiry[$i] = new Enquiry();\n $enquiry[$i]->specialty_id = $specialtyId;\n $enquiry[$i]->hospital_id = $hospitalId;\n $enquiry[$i]->title = $title;\n $enquiry[$i]->first_name = $firstName;\n $enquiry[$i]->last_name = $lastName;\n $enquiry[$i]->email = $email;\n $enquiry[$i]->phone_number = $phoneNumber;\n $enquiry[$i]->postcode = $postcode;\n $enquiry[$i]->reason = $reason;\n $enquiry[$i]->additional_information = $additionalInformation;\n $enquiry[$i]->save();\n\n //Get the hospital and send the email if it has an email address\n $hospital = Hospital::where('id', $hospitalId)->first();\n $specialty = Specialty::where('id', $specialtyId)->first();\n $specialtyName = '';\n //Set the Specialty Name if we have it\n if(!empty($specialty))\n $specialtyName = $specialty->name;\n\n //TODO: This is for the `live` environment ONLY\n if(env('APP_ENV') == 'live') {\n if(!empty($hospital) && !empty($hospital->email)) {\n try {\n $bodyProvider = Email::getProviderBody($specialtyName, $title, $firstName, $lastName, $email, $phoneNumber, $postcode, $additionalInformation);\n Email::send($bodyProvider, $hospital->email, 'Enquiry regarding treatment at your hospital', '[email protected]');\n } catch(\\Exception $e){\n \\Log::info('Something went wrong sending the Provider email. Please check the enquiries: '.\\GuzzleHttp\\json_encode($enquiry).'. Error:'.$e->getMessage());\n }\n }\n }\n\n //Send the email //TODO: Activate it once the tests are working\n if(!empty($enquiry[$i])) {\n $bodyUser = Email::getUserBody($hospital->name, $specialtyName, $title, $firstName, $lastName, $email, $phoneNumber, $postcode, $reason, $additionalInformation);\n $ATBody = Email::getTrunkieBody($hospital->name, $hospital->location_id, $specialtyName, $title, $firstName, $lastName, $email, $phoneNumber, $postcode, $additionalInformation);\n //Send the Email to User\n try {\n Email::send($bodyUser, $email, 'Thank you for Enquiring with Hospital Compare', '[email protected]');\n } catch(\\Exception $e){\n \\Log::info('Something went wrong sending the User email. Please check the enquiries: '.\\GuzzleHttp\\json_encode($enquiry[$i]).'. Error:'.$e->getMessage());\n }\n //Send the Data to AT\n try {\n Email::send($ATBody, '[email protected]', 'Enquire ID: '.$enquiry[$i]->id, '[email protected]');\n } catch(\\Exception $e){\n \\Log::info('Something went wrong sending the email to AT. Please check the enquiries: '.\\GuzzleHttp\\json_encode($enquiry[$i]).'. Error:'.$e->getMessage());\n }\n\n }\n }\n\n $this->returnedData['success'] = true;\n $this->returnedData['data'] = $enquiry;\n\n return $this->returnedData;\n }", "title": "" }, { "docid": "6c72de296ec5f1e1f2b159d93c673ec8", "score": "0.47055396", "text": "function insertarConceptoPartida(){\n\t\t$this->procedimiento='pre.f_concepto_partida_ime';\n\t\t$this->transaccion='PRE_CONP_INS';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_partida','id_partida','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "0890b57b1e9f030dd5366d961d59429c", "score": "0.47029322", "text": "function gernatePDF($userdata){\n\t\t$componentParams = &JComponentHelper::getParams('com_event_manage');\n\t\t$this->chargecurrency = $componentParams->get('chargecurrency');\n\t\t$this->insurername = $componentParams->get('insurername');\n\t\t$this->insureraddress = $componentParams->get('insureraddress');\n\t\t$this->abn = $componentParams->get('abn');\n\t\t\n\t\t// $data = unserialize($userdata->data);\n\t\t$newdataArr = unserialize($userdata->data);\n\t\tforeach ($newdataArr as $page => $pvalue) {\n \t\t\tforeach ($pvalue as $key => $value) {\n \t\t\t\t\tif(is_array($value)){\n \t\t\t\t\t\t$nvalue = '';\n \t\t\t\t\t\tforeach ($value as $ackey => $acvalue) {\n \t\t\t\t\t\t\t$value[$ackey] = str_replace(\"&#039;\", \"'\", $acvalue);\n \t\t\t\t\t\t\t// $value[$ackey] = str_replace(\"&#039;\", '\"', $acvalue);\n \t\t\t\t\t\t\t$nvalue = $value;\n \t\t\t\t\t\t}\n \t\t\t\t\t\t$newArr[$page][$key] = $nvalue;\n \t\t\t\t\t}else{\n \t\t\t\t\t\t$newArr[$page][$key] = str_replace(\"&#039;\", \"'\", $value);\n \t\t\t\t\t}\n \t\t\t\t// $newArr[$page][$key] = addslashes($value);\n \t\t\t}\n \t\t}\n \t\t\n \t\t$data = $newArr;\n\t\t// echo \"<pre>\";\n\t\t// print_r($userdata);\n\t\t// print_r($data);\n\t\t// echo \"</pre>\";\n\t\t$class_of_policy = \"Perform-Sure Liability Insurance\";\n\t\t$policy_no = $userdata->policy_number;\n\t\t$invoice_no = \"290854\";\n\t\t$invoice_date = date(\"d/m/Y\");\n\t\t$reference = \"ROBINSONKA\";\n\t\t$insured = $data['page4']['insuredname'];\n\t\t$addressline1 = $data['page4']['streetaddress1'];\n\t\t$addressline2 = $data['page4']['streetaddress2'];\n\t\t$suburb = $data['page4']['suburb'];\n\t\t$this->statename = $this->getStateName();\n\t\t$state = '';\n\t\tforeach ($this->statename as $key => $value) {\n\t\t\tif($value->id == $data['page4']['state']){\n\t\t\t\t$state = $value->name;\n\t\t\t}\t\n\t\t}\n\n\t\t$postcode = $data['page4']['postcode'];\n\t\t$startdate = date(\"d/m/Y\",strtotime($data['page1']['start_date']));\n\t\t$enddate = date(\"d/m/Y\",strtotime('+1 year',strtotime($data['page1']['start_date'])));\n\t\tif(!empty($data['page2']['premium'])){\n\t\t\t$premium = '$'.$data['page2']['premium'];\n\t\t}else{\n\t\t\t$premium = '$0.00';\n\t\t}\n\t\t\n\t\t$totalgst = round($data['page2']['gstpremium']+$data['page2']['gstfee'],2); \n\t\tif(!empty($totalgst)){\n\t\t\t$gst = '$'.$totalgst;\n\t\t}else{\n\t\t\t$gst = '$0.00';\n\t\t}\n\n\t\tif(!empty($data['page2']['stampduty'])){\n\t\t\t$stampduty = '$'.$data['page2']['stampduty'];\n\t\t}else{ \n\t\t\t$stampduty = '$0.00'; \n\t\t}\n\n\t\tif(!empty($data['page2']['brokerfee'])){\n\t\t\t$brokerfee = '$'.$data['page2']['brokerfee'];\t\n\t\t}else{\n\t\t\t$brokerfee = '$0.00';\t\n\t\t}\n\t\t/* get value from Backend */\n\t\t$currency = $this->chargecurrency;\n\t\t$insurername = $this->insurername;\n\t\t$insureraddress = $this->insureraddress;\n\t\t$abn = $this->abn;\n\t\t/* End Backend */\n\n\t\t$tp = number_format((float)$data['page6']['subtotal'], 2, '.', '');\n\t\tif(!empty($tp)){\n\t\t\t$totalpremium = '$'.$tp;\n\t\t}else{\n\t\t\t$totalpremium = '$0.00';\n\t\t}\n\n\t\t$totalcommission = round($data['page2']['commission']+$data['page2']['gstcommission'],2); \n\t\tif(!empty($totalcommission)){\n\t\t\t$commission = '$'.$totalcommission;\t\n\t\t}else{\n\t\t\t$commission = '$0.00';\n\t\t}\n\t\t\n\t\t$creditcardfee = '$'.round($data['page6']['subtotal']*1.5/100,2);\n\t\t$activity = '';\n\t\tforeach ($data['page1']['activity'] as $avalue) {\n\t\t\t$activity .= $avalue.',';\n\t\t}\n\t\t$activity = substr($activity,0,-1);\n\t\t$this->perfomers = $this->getTerm('Perfomers');\n\t\tforeach ($this->perfomers as $pvalue) {\n\t\t\tif($data['page1']['perfomers'] == $pvalue->price){\n\t\t\t\t$perf = $pvalue->name;\n\t\t\t}\n\t\t}\n\t\t/* OLD */\n\t\t//$performers = $perf;\n\t\t/* New */\n\t\t$performers = $data['page1']['perfomers'];\n\n\t\tif(!empty($data['page6']['publicliailitycover']) && (strpos($data['page6']['publicliailitycover'],'$') !== False)){\n\t\t\t$publicliability = $data['page6']['publicliailitycover'];\n\t\t}else if(!empty($data['page6']['publicliailitycover'])){\n\t\t\t$publicliability = number_format($data['page6']['publicliailitycover']);\n\t\t}else{\n\t\t\t$publicliability = '$0.00';\n\t\t}\n\n\t\t$this->Extracharegs = $this->getTerm('Excharge');\n\t\t$this->ExtraCharegsByOrderId = $this->getExtraFieldByOrder($userdata->id);\n\t\t$charges = 0;\n\t\tif(!empty($this->Extracharegs)){\n\t\t\t$Extrachreges = $this->Extracharegs;\n\t\t\tforeach ($Extrachreges as $evalue) {\n\t\t\t\t$charges += $evalue->price;\n\t\t\t}\n\t\t}\n\n\t\tif(!empty($this->ExtraCharegsByOrderId)){\n\t\t\t$ChregesByOrderId = $this->ExtraCharegsByOrderId;\n\t\t\tforeach ($ChregesByOrderId as $cvalue) {\n\t\t\t\t$charges += $cvalue->price;\n\t\t\t}\n\t\t}\n\t\tif(!empty($charges)){\n\t\t\t$TotalExtras = '$'.round($charges,2);\t\n\t\t}else{\n\t\t\t$TotalExtras = '$0.00';\t\n\t\t}\n\t\t$gernatedate = date('dmYHis');\n\t\t// $filename = $policy_no.'_'.$gernatedate.'.pdf';\n\t\t$filename = 'Invoice - Performsure Policy '.$policy_no.'.pdf';\n\t\t// require_once('tcpdf/tcpdf.php');\n\t\trequire_once(JPATH_ROOT.'/components/pdf/tcpdf_extend.php');\n\n\t\t// create new PDF document\n\t\t$pdf = new TCPDF_EXTEND(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);\n\n\t\t$pdf->class_of_policy = \"Perform-Sure Liability Insurance\";\n\t\t$pdf->insurername = $insurername;\n\t\t$pdf->insureraddress = $insureraddress;\n\t\t$pdf->abn = $abn;\n\t\t$pdf->policy_no = $policy_no;\n\t\t$pdf->invoice_date = $invoice_date;\n\t\t$pdf->invoice_no = $invoice_no;\n\t\t$pdf->reference = $reference;\n\t\t$pdf->insured = $insured;\n\t\t$pdf->addressline1 = $addressline1;\n\t\t$pdf->addressline2 = $addressline2;\n\t\t$pdf->suburb = $suburb;\n\t\t$pdf->states = $state;\n\t\t$pdf->postcode = $postcode;\n\t\t$pdf->startdate = $startdate;\n\t\t$pdf->enddate = $enddate;\n\t\t$pdf->premium = $premium;\n\t\t$pdf->gst = $gst;\n\t\t$pdf->stampduty = $stampduty;\n\t\t$pdf->brokerfee = $brokerfee;\n\t\t$pdf->currency = $currency;\n\t\t$pdf->totalpremium = $totalpremium;\n\t\t$pdf->commission = $commission;\n\t\t$pdf->creditcardfee = $creditcardfee;\n\t\t$pdf->activity = $activity;\n\t\t$pdf->performers = $performers;\n\t\t$pdf->publicliability = $publicliability;\n\t\t$pdf->totalextras = $TotalExtras;\n\n\t\t// set document information\n\t\t$pdf->SetCreator(PDF_CREATOR);\n\t\t$pdf->SetAuthor('Insurance');\n\t\t$pdf->SetTitle('Insurance Test PDF');\n\t\t$pdf->SetSubject('Test Subject');\n\t\t$pdf->SetKeywords('Insurance');\n\n\t\t$pdf->setPrintFooter(true);\n\n\t\t// set default monospaced font\n\t\t// $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n\t\t// set margins\n\t\t// $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n\t\t$pdf->SetMargins(10, 10, 10);\n\t\t$pdf->SetHeaderMargin(10);\n\t\t$pdf->SetFooterMargin(10);\n\n\t\t$pdf->SetAutoPageBreak(TRUE, 5);\n\n\t\t$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\t\t$pdf->setPageOrientation('P',TRUE,10);\n\n\t\t// set some language-dependent strings (optional)\n\t\t// if (@file_exists(dirname(__FILE__).'/lang/eng.php')) {\n\t\t// \trequire_once(dirname(__FILE__).'/lang/eng.php');\n\t\t// \t$pdf->setLanguageArray($l);\n\t\t// }\n\n\t\t// ---------------------------------------------------------\n\n\t\t// set default font subsetting mode\n\t\t$pdf->setFontSubsetting(true);\n\n\t\t$pdf->SetFont('times', '', 11, '', true);\n\n\n$pdf->AddPage();\n$first_page = <<<EOD\n\t<table width=\"100%\">\n\t\t<tr>\n\t\t\t<td width=\"100%\" style=\"text-align: center;\"><img src=\"components/pdf/new_logo.png\" /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td width=\"100%\" style=\"text-align: center;\">\n\t\t\t\t<span style=\"font-size: 14px;\"><b>ACTION ENTERTAINMENT INSURANCE PTY LTD</b></span><br/>\n\t\t\t\tCorporate Representative No. 237473 as an authorised representative of Action Insurance Brokers P/L<br/>\n\t\t\t\tABN $pdf->abn AFS 225047<br/>\n\t\t\t\tSuite 301, Building A, \"Sky City\", 20 Lexington Drive Bella Vista NSW 2153<br/>\n\t\t\t\tPhone: 1300 655 424 Fax: (02) 8935 1501<br/>\n\t\t\t\tWebsite: <a href=\"http://www.entertainmentinsurance.net.au\">www.entertainmentinsurance.net.au</a><br/> Email: <a href=\"mailto:[email protected]\">[email protected]</a><br/>\n\t\t\t\t<br/>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<br/>\n\t<table width=\"100%\" cellpadding=\"10\">\n\t\t<tr>\n\t\t\t<td width=\"65%\">\n\t\t\t\t<p style=\"font-size: 12px; padding: 5px;\"><i>As per your request, we have arranged the following insurance policy with effect from the $pdf->startdate.</i></p>\n\t\t\t\t<div>\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$pdf->insured<br/>\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$pdf->addressline1<br/>\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$pdf->addressline2<br/>\n\t\t\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$pdf->suburb $pdf->states $pdf->postcode<br/>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td width=\"35%\">\n\t\t\t\t<div style=\"text-align: center; border: 1px solid #000; border-radius: 5px;\">\n\t\t\t\t\t<span style=\"font-size: 18px;\"><b>TAX INVOICE</b></span><br/>\n\t\t\t\t\t<span style=\"font-size: 10px; line-height:0;\">This document will be a tax invoice <br/> for GST when you make payment</span><br/>\n\t\t\t\t</div>\n\t\t\t\t<table style=\"font-size: 10px;\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Invoice Date:</b></td>\n\t\t\t\t\t\t<td>$pdf->invoice_date</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td><b>Policy Number:</b></td>\n\t\t\t\t\t\t<td>$pdf->policy_no</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t\t<br/><br/>\n\t\t\t\t<span style=\"font-size: 9px;\">Should you have any queries in relation to this account,please contact your Account Manager<br/>\n\t\t\t\t\tAction Entertainment Online\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<br/>\n\t<table width=\"100%\" cellpadding=\"10\">\n\t\t<tr>\n\t\t\t<td width=\"65%\">\n\t\t\t\t<div style=\"border: 1px solid #000; border-radius: 5px;\">\n\t\t\t\t\t<table width=\"100%\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><b> NEW POLICY</b></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><b> Class of Policy:</b>Perform-Sure Liability Insurance</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><b> Insurer:</b>$pdf->insurername<br/>$pdf->insureraddress</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>ABN: $pdf->abn &nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><b> The Insured:</b>&nbsp;&nbsp;$pdf->insured</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td><b> Policy No:</b>&nbsp;&nbsp;$pdf->policy_no</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr style=\"line-height: 1;\">\n\t\t\t\t\t\t\t<td><b> Period of Cover:</b>&nbsp;&nbsp;From <b>$pdf->startdate</b> to <b>$pdf->enddate</b> at 4:00 pm</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<div>\n\t\t\t\t\t<b>Details: </b>\n\t\t\t\t\t<span style=\"font-size: 10px;\">See attached schedule for a description of the risk(s) insured</span>\n\t\t\t\t</div>\n\t\t\t</td>\n\t\t\t<td width=\"35%\">\n\t\t\t\t<p style=\"font-size: 9px;\">\n\t\t\t\t\t<b>YOUR DUTY OF DISCLOSURE</b><br/>\n\t\t\t\t\tBefore you enter into a Contract of general insurance with an Insurer, you have a duty under the Insurance Contracts Act 1984 to disclose to the Insurer every matter that you know, or could reasonably expect to know, is relevant to the Insurer's decision whether to accept the risk of Insurance and if so, on what terms. You have the same duty to disclose those matters to the Insurer before you renew, extend, vary or reinstate a Contract of general insurance. Your duty however does not require disclosure of matter.<br/>\n\t\t\t\t\t\t- that diminishes the risk to be undertaken by the Insurer<br/>\n\t\t\t\t\t\t- that is common knowledge<br/>\n\t\t\t\t\t\t- that your Insurer knows or, in the ordinary course of\tbusiness, ought to know<br/>\n\t\t\t\t\t\t- as to which the compliance with your duty is waived by the Insurer.\n\t\t\t\t</p>\n\t\t\t\t<p style=\"font-size: 9px;\">\n\t\t\t\t\t<b>NON-DISCLOSURE</b><br/>\n\t\t\t\t\tIf you fail to comply with your duty of disclosure, the Insurer may be entitled to reduce the liability under the Contract in respect of a claim or may cancel the Contract. If your non-disclosure is fraudulent, the Insurer may also have the option of avoiding the Contract from its beginning.\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\n\t<br/>\n\t<table width=\"100%\" cellpadding=\"10\">\n\t\t<tr>\n\t\t\t<td width=\"65%\">\n\t\t\t\t<span><b>Your Premium:</b></span>\n\t\t\t\t<div style=\"border: 1px solid #000; border-radius: 5px;\">\n\t\t\t\t\t<table width=\"100%\" style=\"font-size: 10px;\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>Premium</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"12%\"><b>UW Levy</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"12%\"><b>Fire Levy</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"12%\"><b>GST</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>Stamp Duty</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>Broker Fee</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>Extra Charge</b></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>$pdf->premium</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"12%\"><b>$0.00</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"12%\"><b>$0.00</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"12%\"><b>$pdf->gst</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>$pdf->stampduty</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>$pdf->brokerfee</b></td>\n\t\t\t\t\t\t\t<td align=\"right\" width=\"16%\"><b>$pdf->totalextras</b></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</table>\n\t\t\t\t</div>\n\t\t\t\t<table width=\"100%\">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width=\"50%\" style=\"font-size: 10px;\">Commission we have earned on this invoice inc. GST $pdf->commission</td>\n\t\t\t\t\t\t<td width=\"50%\">\n\t\t\t\t\t\t\t<div style=\"border: 1px solid #000;\">\n\t\t\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td width=\"33%\"><b>TOTAL</b></td>\n\t\t\t\t\t\t\t\t\t\t<td width=\"33%\"><b>$pdf->currency</b></td>\n\t\t\t\t\t\t\t\t\t\t<td width=\"33%\"><b>$pdf->totalpremium</b></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t<td colspan=\"2\" width=\"66%\" style=\"font-size: 8px;\">(Excluding Credit Card fee)</td>\n\t\t\t\t\t\t\t\t\t\t<td width=\"33%\"></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<table width=\"100%\" style=\"font-size: 10px;\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<td width=\"66%\">Credit Card fee (inc GST) is </td>\n\t\t\t\t\t\t\t\t\t<td width=\"33%\" align=\"right\">$pdf->creditcardfee&nbsp;&nbsp;</td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</td>\n\t\t\t<td width=\"35%\">\n\t\t\t\t<br/><br/>\n\t\t\t\t<p style=\"font-size: 9px;\">\n\t\t\t\t\t<b>Action Entertainment Insurance Pty Ltd</b><br/>\n\t\t\t\t\tis a member of the Financial Ombudmans Service (FOS), a free client service for disputes. For more information or to lodge a complaint, contact the FOS on 1800 367 287\n\t\t\t\t</p>\n\t\t\t</td>\n\t\t</tr>\n\t</table>\nEOD;\n$pdf->writeHTMLCell(0, 0, '', '', $first_page, 0, 1, 0, true, '', true);\n\n\n$pdf->SetMargins(20, 35, 20);\n\n\n$pdf->AddPage();\n$sub_pages = <<<EOD\n\t<div>\n\t\tThis policy has been placed with<br/><br/>\n\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Arena Underwriting (Entertainment - Berkley)<br/>\n\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Level 1, 102 Tudor Street, Hamilton NSW 2303<br/><br/>\n\t\tArena Underwriting (Entertainment - Berkley) is underwritten by<br/><br/>\n\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$pdf->insurername<br/>\n\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ABN $pdf->abn<br/>\n\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$pdf->insureraddress<br/>\n\t\t<br/>\n\t\t<b><u>PERFORMSURE LIABILITY INSURANCE</u></b><br/><br/>\n\t\t<b>PUBLIC/PRODUCTS LIABILITY INSURANCE FOR PERFORMERS/ENTERTAINERS</b><br/><br/>\n\t\t<b><u>OCCUPATION:</u></b><br/><br/>\n\t\t<b>Principally:</b> &nbsp;&nbsp;<span style=\"color: black;\">$pdf->activity</span><br/><br/>\n\t\t<b>Number of Performers/Entertainers Declared:</b><span style=\"color: black;\"> &nbsp;&nbsp; $pdf->performers</span><br/><br/>\n\t\t<b><u>ENDORSEMENTS</u></b><br/><br/>\n\t\tIt is hereby declared and agreed that:-\n\t\t<ul>\n\t\t\t<li>Exclusion 4.13 Crowd Control, is deleted from the Policy and will have no effect.</li>\n\t\t\t<li>Exclusion 4.16 Crowd Surfing, Moshing And Stage Diving, is deleted from the Policy and will have no effect.</li>\n\t\t</ul><br/>\n\t\t<b>CONTRACTOR / SUBCONTRACTOR INDEMNITY EXTENSION</b>\n\t\t<p>For the purposes of this Policy the definition the <b>Insured</b> shall include <b>any contracted or substitute performer, teacher, facilitator or crew member</b>, whilst engaged by the Insured to perform work on the Insured's behalf.</p>\n\t\t<p>Public and Products Liability will apply to each person as if a Policy has been separately issued to each contracted or substitute performer, teacher, facilitator or crew member. However, nothing in this endorsement extends or increases the Limit of Liability under the Policy.</p>\n\t\t<p>The Insurer agrees to waive rights of subrogation against any contracted or substitute performer, teacher, facilitator or crew member, to the extent that they are insured under this endorsement.</p>\n\t\t<p><b>SPECIAL EXCLUSIONS</b><br/>\n\t\t<i>Please take note of the following special exclusions which apply to this policy. There are other exclusions which apply and these can be found in the policy wording.</i></p>\n\t\t<br/><br/><br/><br/><p><b>Exclusion 4.14 Pyrotechnics</b><br/>\n\t\t This Policy does not cover liability in respect of Personal Injury or Property Damage arising out of or caused by or in connection with the storage and/or use of any pyrotechnics. However, this exclusion shall not apply to the Insured's vicarious liability arising from an act, error or omission of contracted pyrotechnicians that are appropriately licensed & have provided the Insured with proof of liability insurance.</p>\n\t\t<b>Exclusion 4.15 Participation Risk</b>\n\t\t<br/>The Insurer shall not provide indemnity under this policy for any liability arising out of anyone's participation in any:<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.15.1 &nbsp;&nbsp;sport, game, match, race, practice, training course, trial, contest, competition; or<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.15.2 &nbsp;&nbsp;performances involving the use of fire.<br/>\n\t\t<br/>This exclusion does not apply to the following:<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(a) &nbsp;&nbsp;party games played by children which are put on by children's entertainers;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(b) &nbsp;&nbsp;practices which involve rehearsal or practicing for performing arts performances;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(c) &nbsp;&nbsp;competitions/contests that involve non-contact sports or non contact physical challenges.<br/>\n\t\t<br/><b>Exclusion 4.18 Self-Promoted Show, Performance or Concert</b><br/>\n\t\t<br/>This Policy does not cover liability in respect of Personal Injury or Property Damage arising from shows, performances or concerts where the Insured is acting as event organiser, event promoter or who \"self-promote\" their own performances \"Self-promoted\" means Insureds who hire out venues to stage their own shows, performances or concerts. Door-deals are not considered \"self-promoted\". This Exclusion DOES NOT apply to Insureds who are running workshops and are required to hire a venue or premises in order to conduct these workshops.<br/>\n\t\t<br/><b>Exclusion 4.19 Workshop/Tuition - Excluded Activities</b><br/>\n\t\t<br/>This Policy does not cover liability in respect of Personal Injury or Property Damage arising from Insureds' who are responsible for staging workshops or activities which include any of the following:-<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.1 &nbsp;&nbsp;Dance schools where this is their primary business;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.2 &nbsp;&nbsp;Drama schools where this is their primary business;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.3 &nbsp;&nbsp;Tuition of or participation in aerial, acrobatics or trapeze activities;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.4 &nbsp;&nbsp;Tuition of or participation in fire performing (but only where naked flames are being used<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.5 &nbsp;&nbsp;Tuition of or participation in gymnastics;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.6 &nbsp;&nbsp;Tuition of or participation in competitive sporting activities;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.7 &nbsp;&nbsp;Tuition of or participation in adventure type activities;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.8 &nbsp;&nbsp;Tuition of or participation in circus skills;<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.9 &nbsp;&nbsp;Tuition of or participation in Tattooing and body piercing (face painting and spray on tattooing are covered);<br/>\n\t\t\t&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.19.10 &nbsp;&nbsp;Tuition of or participation in Filming and/or video production activities.<br/>\n\t\t<br/><b><u>SITUATION:</u></b><br/>\n\t\t<br/>At and from &nbsp;&nbsp;&nbsp;&nbsp;<span style=\"color: red;\">$pdf->suburb, $pdf->states</span><br/>\n\t\t<br/><br/><b><u>GEOGRAPHICAL SCOPE:</u></b><br/>\n\t\t<br/>WORLD WIDE EXCLUDING NORTH AMERICA<br/>\n\t\t<p><b><u>LIMITS OF INSURANCE:</u></b></p>\n\t\t<table width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td width=\"45%\">Public Liability</td>\n\t\t\t\t<td width=\"40%\">Each & Every Occurrence </td>\n\t\t\t\t<td width=\"15%\">$ $pdf->publicliability</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td width=\"45%\">Products Liability</td>\n\t\t\t\t<td width=\"40%\">Each Policy Period (Aggregate Limit) </td>\n\t\t\t\t<td width=\"15%\">$ 20,000,000</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td width=\"45%\">Goods in Physical or Legal Control Sub-limit</td>\n\t\t\t\t<td width=\"40%\">Each Policy Period (Aggregate Limit) </td>\n\t\t\t\t<td width=\"15%\">$ 250,000</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<p><b><u>DEDUCTIBLE (EXCESS)</u></b></p>\n\t\t<table width=\"100%\" style=\"font-size:13px;\">\n\t\t\t<tr>\n\t\t\t\t<td width=\"40%\">Public Liability Claims</td>\n\t\t\t\t<td width=\"50%\">Each & Every Occurrence (defence costs inclusive) </td>\n\t\t\t\t<td width=\"10%\">$ 500</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td width=\"40%\">Products Liability Claims</td>\n\t\t\t\t<td width=\"50%\">Each & Every Occurrence (defence costs inclusive) </td>\n\t\t\t\t<td width=\"10%\">$ 500</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td width=\"40%\">Goods in Physical or Legal Control Claims</td>\n\t\t\t\t<td width=\"50%\">Each & Every Occurrence (defence costs inclusive) </td>\n\t\t\t\t<td width=\"10%\">$ 500</td>\n\t\t\t</tr>\n\t\t</table>\n\t\t<br/><br/><b><u>LIABILITY ASSUMED UNDER CONTRACT</u></b>\n\t\t<p>This insurance does not cover claims arising from liability assumed under contract. Contractual liability is where you have assumed someone else's liability risks under a contractual arrangement. They are commonly known as 'hold harmless' or 'indemnity agreements'. Such agreements can be found in venue hire contracts, equipment or property hire contracts, and agreements with Government Authorities and Organisations.<br/>\n\t\t We recommend that you do not sign these agreements without first referring them to our office.<br/>\n\t\t If you are required to sign such an agreement, please provide a copy of this to Action Insurance Brokers Pty Limited so that we can refer it to your Insurer.</p>\n\t\t<p><b><u>DISCLAIMER</u></b></p>\n\t\t<p>This schedule is only a summary of cover. Please refer to the policy wording for full details of the scope of cover including the terms, conditions and exclusions which apply to the insurance.</p>\n\t</div>\nEOD;\n$pdf->writeHTMLCell(0, 0, '', '', $sub_pages, 0, 1, 0, true, '', true);\n\n\n$pdf->AddPage();\n$sub_pages = <<<EOD\n\t<p style=\"text-align: center;\"><b>Your Insurance Advisor's Comments in relation to this Policy<br/>Version 19/06/2014</b></p>\n\t<p>This information is provided in accordance with the Financial Services Reform Act 2001 (Cth) and other relevant legislation. It includes information that will assist you in determining if this insurance is right for you and further, if you should consider other insurance policies to meet your risk management needs. It is essential you read this document completely and contact your Action Insurance Brokers advisor if you have any questions relating to your policy or the information contained herein.</p>\n\t<p>Reference in this document to You / Your / Insured / Insured Party / Insured parties means the parties listed on this policy as the insured parties and extends to include any directors, trustees, business owners and business partners, owners of insured property, spouses, defacto partners and legal guardians.</p>\n\t<p>Reference in this document to We / Our / Action means Action Insurance Brokers P/L, its directors, advisors and employees.</p>\n\t<p><b>Version BA1 - Binder Advice Warning</b>In arranging this insurance policy for you, it is important that you are made aware of the following information: -</p>\n\t<p>Action Insurance Brokers P/L (AFS# 225047) is a licensed insurance broker. Whilst in most cases, we act as an agent of you, our client, we have not done so in this instance.</p>\n\t<p>This policy has been arranged under a \"Binder\" between Action Insurance Brokers and the Insurance Company. A binder is an arrangement where we, the broker, act as an agent of the insurance company and not the client. We have such arrangements to obtain the best possible cover and price on a specific type of insurance policy.</p>\n\t<p>Whilst we believe our offer to arrange this insurance policy is well based, any recommendation we give you does not take into account your personal or business or specific needs or financial situation.</p>\n\t<p style=\"text-align: justify;\"><b>Cooling off period:</b><br/>Under the Law, you may have the right to return this policy and receive a full refund of premium and charges (except where Govt regulations prohibit the return of charges). You must exercise this right within 14 days of receiving confirmation of cover and this must be done in writing or electronically. If you have lodged a claim during that period, you cannot exercise the right to return it. If the cover was a short term cover, (for less than 14 days), you cannot exercise the right to return it.</p>\n\t<p style=\"text-align: justify;\"><b>Goods & Services Tax (GST):</b><br/>If you are a business registered for GST purposes, you may be entitled to claim an input tax credit in respect of the GST on the total amount of premium payable for this insurance policy. However, if you do claim such an input tax credit, claim payments made under the policy after 1 July 2000 may, under the GST legislation, become taxable, and you will be obliged to account for the GST payable to the Australian Taxation Office. You will therefore need to consider carefully whether or not to claim an input tax credit in respect of the GST on your premium. We strongly recommend that you seek advice from your accountant or tax adviser on whether it is in your interests to do so. An insured is not entitled to claim an input tax credit before 1st July 2003 unless an election, in a format laid down in the legislation, has been made to the Commissioner of Taxation. If you do claim an input tax credit, you will also need to consult with us over the implications of that decision on the amount you will need to insure for under your policy.</p>\n\t<p style=\"text-align: justify;\"><b>Product Disclosure Statements, Policy Wordings and Policy Schedules - Issued by your Insurance company:</b><br/>Your Insurance policy is a legally binding contract between You and the Insurance Company. It explains the full terms and conditions of cover. Most policies will have a Policy Schedule with your specific details listed and will also have a standard policy wording and Product Disclosure Statement All three documents must be read in conjunction with each other to fully understand the contract of insurance. Every time you arrange a new policy, endorse or change an existing policy or renew a policy, a new contract of insurance is created and the policy schedule, Product Disclosure Statement and policy wording may change &#45; which might affect your cover and your ability to lodge an insurance claim. Always read the Product Disclosure Statement and Policy wording with your Tax Invoice to ensure you understand your cover.</p>\n\t<p style=\"text-align: justify;\"><b>Your Duty of Disclosure:</b><br/>Before you enter into a contract of insurance or renew a contract of insurance with an Insurer, you have a duty under the Insurance Contracts Act (1984) to disclose to that insurer, all information which you believe is relevant to that Insurer's decision whether to accept the risk of insurance, and if so, on what terms. You have the same duty to the Insurer when you alter, endorse, renew or change a contract of insurance. Your duty, however, does not require disclosure of matters:<br/>- that diminish the risk to be insured; - that are of common knowledge; - that the Insurer knows, or ought to know in the course of their ordinary business; - as to which compliance with your duty is waived by the Insurer You are also required to tell the insurer if any of the following has occurred in the last 12 months:<br/>- a insurer has refused, cancelled, or imposed a non standard excess on any of your other insurance policies or required you to accept special or unusual terms on other policies; - you or any person benefiting under this policy has been charged or convicted of a criminal offence; - the risk covered under this policy has changed since it was originally insured, to the extent that now may be an increased risk for the insurer. If you fail to meet your duty of disclosure, your insurer may deny, reduce or refuse your claim.</p>\n\t<b>You can minimise the risk of damage in advance of an emergency by:</b>\n\t<ul>\n\t\t<li>\n\t\t\tTraining employees in fire safety, particularly those responsible for storage areas, housekeeping, maintenance and operations where open flames or flammable substances are used.\n\t\t</li>\n\t\t<li>\n\t\t\tTesting and if necessary modernising the electrical system since faulty wiring causes a large percentage of non-residential fires.\n\t\t</li>\n\t\t<li>\n\t\t\tEnsuring computer monitors and television screens are not left on stand by mode when not in use. It is estimated that there are around 700 fires a year from this source.\n\t\t</li>\n\t\t<li>\n\t\t\tStopping the overloading of power boards and where possible eliminating them altogether. Where they are required purchase good quality ones and have them tested on a regular basis.\n\t\t</li>\n\t\t<li>\n\t\t\tBan smoking within all buildings (in line with occupation and health regulations)\n\t\t</li>\n\t\t<li>\n\t\t\tCarefully control any hot works &#45; grinding, welding, cutting etc.\n\t\t</li>\n\t\t<li>\n\t\t\tSituating your business in a fire-resistant building - a structure made of non-combustible materials with firewalls that create barriers to the spread of fires - and in a building with a fire alarm system connected to the local fire department. It is also a good idea to have a sprinkler system to douse fires.\n\t\t</li>\n\t\t<li>\n\t\t\tLimiting storm-related damage by making sure the building conforms to damage-resistant building codes.\n\t\t</li>\n\t</ul>\n\t<b>You can develop a business continuity plan by:</b>\n\t<ul>\n\t\t<li>Keeping up-to-date triplicate records of both electronic and written records. In some jurisdictions, if companies fail to maintain and safeguard accurate business records, the company may still be held liable.</li>\n\t\t<li>Identifying the critical business activities and the resources needed to support them in order to maintain customer service while your business is closed for repairs.</li>\n\t\t<li>Planning for the worst possible scenario. Do research before a disaster strikes by finding alternative facilities, equipment and supplies, and locating qualified contractors to repair your facility.</li>\n\t\t<li>Setting up an emergency response plan and training employees how to execute it.</li>\n\t\t<li>Considering the resources you may need to activate during an emergency such as back-up sources of power and communications systems. Also, stockpiling the supplies you may need such as first-aid kits, and flashlights.</li>\n\t\t<li>Compiling a list of important phone numbers (including cell phone numbers) and addresses, including your Action Insurance Brokers office, local and state emergency management agencies, major clients, contractors, suppliers, realtors, financial institutions. The list should also include employees and company officials. Keep copies off the premises in case the disaster is widespread. Ideally a copy should be kept off site.</li>\n\t\t<li>Deciding on a communications strategy to prevent loss of your customers. Clients must know how to contact your company at its new location. Among the possibilities to explore, depending on the circumstances, are posting notices outside the original premises; contacting clients by phone, e-mail or regular mail; placing a notice or advertisement in local newspapers; and asking friends and acquaintances in the local business community to help disseminate the information.</li>\n\t\t<li>Review and exercise your plan on a regular basis and communicate changes to key employees.</li>\n\t</ul>\n\t<p style=\"text-align: justify;\">Use your Business Continuity Plan including the risk assessment, business impact analysis and business continuity plan to set your indemnity period, level of wages cover, and additional increase cost of working. It also assists in determining what extensions to the standard cover are required. Your Action Insurance Brokers adviser should be able to assist you here.</p>\n\t<p style=\"text-align: justify;\"><b>Workers Compensation Insurance:</b><br/>Workers Compensation insurance, as defined by the various State and Territory legislations, is designed to cover your employees. Where you have employees, you must by law, take out a Workers Compensation Insurance policy. Workers Compensation policies are normally separate insurance policies that are not covered under other policies such as this one. However, if this insurance is to cover Home Building &/or Contents or Residential Strata Insurance it might include cover for Domestic Workers Compensation for your domestic employees such as cleaners, gardeners and the like. If it does, this will be specifically shown in this document along with Building / Contents & other sums insured</p>\n\t<p style=\"text-align: justify;\"><b>Public & Products Liability Insurance, Professional Indemnity Insurance and Management Liability Insurance including Directors and officers Liability Insurance and how these are affected by Contracts you may have signed:</b><br/>We wish to bring your attention to the importance and unusual aspects of contractual liability agreements entered into by some businesses. Many contracts routinely entered into by businesses in the ordinary course of business, contain provisions that impose liabilities or penalties of various types on the signatories. Such liabilities can be extremely onerous. Contracts of this kind may prove to have hidden penalties. Some companies sign the contracts under the impression that their current insurance policies will protect them in the event of the provision being invoked against them. However, most insurance contracts very carefully avoid extending the scope of cover beyond that specifically prescribed in the original policy contract. A company may therefore find itself facing an extremely heavy and unanticipated liability claim bereft of any insurance protection.</p>\n\t<p style=\"text-align: justify;\">Examples of imposed liabilities in common use are those embodied in the standard agreements used for leases and by the construction and fire protection industries. These agreements render the purchase and/or owner and/or lessee responsible for the costs of injuries to people or damage to property caused by the activities of other parties or the malfunction of equipment. It is essential then, that when a business' legal adviser believes the contract a business is contemplating signing may have insurance implications, the contract be given to us for analysis on this score. Under certain circumstances, your insurance can be endorsed to provide cover. </p>\n\t<p style=\"text-align: justify;\"><b>Claims Made - v - Occurrence policy wordings for Professional Indemnity Insurance and Management Liability Insurance policies </b></p>\n\t<p style=\"text-align: justify;\">Professional Indemnity Insurance and Management Liability Insurance policies are different to normal Public/Products Liability Insurance policies. Under most normal Public/Products Liability Insurance policies, you can lodge a claim on a previous policy up to 7 years prior - even if you only become aware of the claim today. (Always of course, on the proviso that the property damage or personal injury occurred when the previous policy was in force). </p>\n\t<p style=\"text-align: justify;\">This is NOT the case with Professional Indemnity Insurance and Management Liability Insurance policies however. Cover under these policies is on a \"claims made\" basis. This means you must always keep a current policy if you are ever to lodge a claim. You can't go back and lodge a claim under your lapsed policy for an event that occurred for example, last year, that you only became aware of this year, once your policy has expired. Even if the event occurred, last year, it would be claimed under this year's policy as this is the year the claim was first \"made\" upon you. Hence, it is important to keep Professional Indemnity Insurance and Management Liability Insurance policies renewed every year. </p>\n\t<p style=\"text-align: justify;\"><b>If you are aware of any incident that could potentially become a claim, you must inform the insurer prior to the policy expiring - failure to do so on an incident you were aware of, means you will never be able to lodge a claim for it, even though you renewed the policy again. </b></p>\n\t<p style=\"text-align: justify;\">If you have retired from work and are no longer taking on new work, you should renew the policies under a \"run-off basis\" for at least 3 years and perhaps longer. Whilst run-off policies still require a premium to be paid, this may be less expensive than your previous year's cost, & usually become cheaper for each subsequent year you choose to renew. The valuable benefit to you is that your policy will continue to provide necessary protection against new notifications of claims where the event occurred whilst you were still working.</p><br/><br/>\n\t<p style=\"text-align: center;\"><b>Important details about your advisor and Action Insurance Brokers P/L</b></p>\n\t<p style=\"text-align: justify;\"><b>About Your Advisor:</b><br/>This person is authorised to provide advice by Action Insurance Brokers P/L , to arrange General Insurance products for their clients. We do not arrange Life Insurance Products. Action Insurance Brokers P/L is licensed as a General Insurance Broker under Financial Services Reform Act 2001 (Cth). </p>\n\t<p style=\"text-align: justify;\"><b>The type and limit of Advice we are providing you in relation to this policy:</b><br/>We are/have arranged/renewed this policy for you using information you have provided to us in the past or more recently. in doing so, we have relied on the integrity of that information. Further, we have used our technical knowledge and skills to ensure you have a competitively priced cover that meets your needs as we understand them. As the policy holder, it is your responsibility to review the cover and ensure it meets your needs. We ask now that you read this invoice, the policy wording and Product Disclosure Statement (where it has been provided as a legal requirement) and contact our office or your advisor immediately if you have any concerns about the adequacy of this policy. If you have any questions about your policy, its terms, conditions, restrictions or otherwise, please contact our office and your advisor will be pleased to answer your questions.</p>\n\t<p style=\"text-align: justify;\"><b>Our Advice to You is limited:</b><br/>As your insurance broker, we are quoting on, or arranging, or renewing or changing this insurance policy, based on your instructions or based on information you have previously provided to us by way of face to face meetings, verbal or written communications. We endeavour at all times to ensure the policy we recommend or provide, meets your needs, to the extent that you have informed us of those needs. We cannot be held liable, or responsible for deficiencies in this insurance policy where you have failed to provide us with information that affects your insurance needs or this insurance policy. Whenever you have asked us to reduce covers, we have sought and obtained from you written advice to do this. We do not reduce covers without your written instruction.</p>\n\t<p style=\"text-align: justify;\"><b>Our Liability to You is limited:</b><br/>The liability of Action Insurance Brokers P/L, it's Directors, Employees, Individual and Corporate Authorised Representatives and their Employees or Agents (herein after referred to as \"Action\"), to our clients, their Directors and Employees, Contractors and Sub Contractors and their Employees or Agents, is hereby limited to the extent permitted under Federal, State and Territory laws, to a maximum aggregate limit of $10,000,000 Australian Dollars, including legal and investigative costs. At no time shall \"Action\" agree to or be held liable for any amount over and above this limit. In appointing, dealing with, instructing \"Action\", or renewing, amending or endorsing a policy with \"Action\", or paying a premium to \"Action\", or paying a monthly instalment to a premium funding provider where this was arranged by \"Action\", as our client, you hereby agree to the above Limit of Liability and your agreement is irrevocable.</p>\n\t<p style=\"text-align: justify;\"><b>General Advice Warning - Renewal of a policy:</b><br/>By arranging this policy for you, Action Entertainment Insurance Pty Ltd have not taken into account any specific business or personal information relating to your financial objectives, risk profile or specific needs for insurance. It is your responsibility as the policy holder / insured party, to ensure this policy is suitable for your needs. If you require specific advice as to your needs or the suitability of this policy, please feel free to call Action Entertainment Insurance.</p>\n\t<p style=\"text-align: justify;\"><b>How we earn our income:</b><br/>As insurance brokers we may earn commission from the insurance company we are arranging this insurance policy with. We may also charge a broker fee to you to cover work we do on your behalf. We may also earn bonus commissions and bonus payments. Where we have arranged for you to pay this insurance policy premium by monthly instalments through a premium funding company, we may also earn commission for arranging this. We are also permitted to earn and retain bank account interest on the premium you pay into our regulated Insurance Broking Account. However, we are also responsible to pay the bank fees and charges on this account. The amount of commission and/or fees we have earned on this policy (not including any premium funding commission or bonus payments, are shown on the front page of this invoice.</p>\n\t<p style=\"text-align: justify;\"><b>Influencing Associations:</b><br/>Action is part of the Steadfast Group. This is a publicly listed company whose sole purpose is to assist Insurance Brokers to arrange better cover and policies conditions for our clients and to ensure up to date training is provided to our advisors and other team members. As part of this arrangement, we can earn additional commission and rebates on policies we arrange with Steadfast approved insurance companies. Action also enjoys commercial arrangements with a number of insurance companies who may at times pay us a profit share or provide to our Advisors and team members, gifts, invitations to social and sporting functions and free training. We guarantee never to allow any other association with Insurance Company, Steadfast or other Group, to negatively influence our recommendations to you.</p>\n\t<p style=\"text-align: justify;\"><b>Conflict of Interest Declaration:</b><br/>Action Insurance Brokers follows a strict set of guidelines that ensure you, our client are not subject to any conflict of interest where our Advisors may recommend the wrong policy for You. We will always recommend the product and insurer that best meets your needs based on the information you have supplied us; regardless of the rate or amount or nature of income that we may derive. In many cases, this will mean we will recommend a product from which we earn less income than other potential products. As from 31st March, 2014, a subsidiary company of Action Insurance Brokers - Action Entertainment Insurance P/L, owns 100% of Arena Underwriting P/L. Where we place your business with Arena on your behalf, certain persons within the Action Group may ultimately receive profit dividends as an indirect result of placing your business with Arena.</p>\n\t<p style=\"text-align: justify;\"><b>Action's Own Financial Services Guide:</b><br/>Where the purchase of this product represents the first time you or your broker have used Action Insurance Brokers'services, we bring to your attention the need to read our Financial Services Guide. Our guide can be found by referring to our website - <a href=\"https://www.actioninsurance.com.au/\">www.actioninsurance.com.au</a>. From there, you can select the Financial Services Guide page and use the drop-down box to select the Financial Services Guide provided by the Advisor or Authorised Representative of Action, who has provided this service to you.</p>\n\t<p style=\"text-align: justify;\"><b>Cancelling, Changing or Amending this Insurance Policy:</b><br/>If you choose for any reason to cancel this policy before it has run its full term, you must give us a written request and the cancellation of the policy will only take effect from the date we receive that request. A written request is a letter, fax or email. Letters and faxes must be signed and all advices must include the policy number of the policy you want cancelled and a reason must be given, i.e, property sold or business ceased trading etc. Refunds will only be sent to you once the premium has been received from the Insurance Company and only if the policy does not include a \"minimum and deposit\" clause - wherein refunds of premium can never been obtained from the insurer. The refund we send will not include any return of commissions or fees we have earned. Such commissions and fees are retained by us in full. If you wish to change any thing covered under this policy, please give us advice in writing by letter, fax or email. The change will be effected from the date we receive your advice. It cannot be back-dated and it cannot be arranged outside business hours which are listed in our Financial Services Guide.</p>\n\t<p style=\"text-align: justify;\"><b>Credit Card Payments:</b><br/>We welcome your payment of the premium by VISA or Master Card. We do not accept Diners Card or AMEX. Due to the increasing use of credit cards by our clients, we must now charge a 1.5% loading on top of your premium if you choose to pay be credit card, to cover the costs imposed upon us by the Bank. We regret this action has become necessary.</p>\n\t<p style=\"text-align: justify;\"><b>Your Personal Information:</b><br/>Action Insurance Brokers and its Authorised representatives have and adhere to a privacy policy, which will ensure the privacy and security of your personal information. A copy of our privacy policy is available on request. A copy is also available on our website, <a href=\"https://www.actioninsurance.com.au/\" target=\"_blank\">www.entertainmentinsurance.net.au</a></p>\nEOD;\n$pdf->writeHTMLCell(0, 0, '', '', $sub_pages, 0, 1, 0, true, '', true);\n\n// ---------------------------------------------------------\n\n// Close and output PDF document\n// This method has several options, check the source code documentation for more information.\n$filepath = 'components/pdf/'.$filename;\n$path = JPATH_ROOT.'/'.$filepath;\n$pdf->Output($path, 'F');\n// $pdf->Output(JPATH_ROOT.'/components/pdf/test.pdf', 'I');\n\n//============================================================+\n// END OF FILE\n//============================================================+\n\tif (file_exists($path)) {\n\t\treturn $path;\n\t}\n\n}", "title": "" } ]
0e9dc5d4c04b60687a3fd9506c7294ed
Calls to delete widget options on widget delete
[ { "docid": "1769a87d0ae8123fa3eaee5e6bfa9660", "score": "0.8072983", "text": "public function init_del_options()\n\t{\n\t\tadd_action( 'delete_widget', array( $this, 'delete_widget_options' ), 0, 3 );\n\t}", "title": "" } ]
[ { "docid": "f1d3a75767c0b4cb99d60ff20970175a", "score": "0.69677365", "text": "public function wpmm_ajax_delete_widget_form(){\r\n check_ajax_referer( 'apmm-ajax-nonce', '_wpnonce' );\r\n $widget_id = sanitize_text_field( $_POST['widget_id_base'] );\r\n /* Removes a widget from the WP Mega Menu widget sidebar start*/\r\n $widgets = WPMM_Libary::wpmm_mm_sidebarwidgets();\r\n\r\n $get_widgets_except_removed_widgets = array();\r\n\r\n foreach ( $widgets as $widget ) {\r\n\r\n if ( $widget != $widget_id ){\r\n $get_widgets_except_removed_widgets[] = $widget;\r\n }\r\n\r\n }\r\n\r\n WPMM_Libary::wpmm_set_mm_sidebar_widgets($get_widgets_except_removed_widgets);\r\n /* Removes a widget from the WP Mega Menu widget sidebar end */\r\n /* Removes a widget from the WP Mega Menu widget sidebar start */\r\n $id_base = WPMM_Libary::wpmm_get_id_widget_id( $widget_id );\r\n \r\n $widget_number = absint( end( explode( \"-\", $widget_id ) ) );\r\n\r\n $current_widgets = get_option( 'widget_' . $id_base );\r\n if ( isset( $current_widgets[ $widget_number ] ) ) {\r\n unset( $current_widgets[ $widget_number ] );\r\n $results = update_option( 'widget_' . $id_base, $current_widgets );\r\n }\r\n /* Removes a widget from the WP Mega Menu widget sidebar end*/\r\n\r\n if ( $results ) {\r\n wp_send_json_success();\r\n } else {\r\n wp_send_json_error();\r\n }\r\n }", "title": "" }, { "docid": "ace7b8ecc5d3d6477d7a429ec8cf3af5", "score": "0.69035953", "text": "public function delete()\n {\n $options = $this->Options();\n\n if ($options) {\n foreach ($options as $option) {\n $option->delete();\n }\n }\n\n parent::delete();\n }", "title": "" }, { "docid": "c5850832a207bb139c28729f4f707d34", "score": "0.64999694", "text": "function delete_settings() {\n\t\tdelete_option( $this->option_key );\n\t}", "title": "" }, { "docid": "337da35c59c329e4a49e1e6932153f69", "score": "0.64595956", "text": "static public function un_delete_options(){\n \n //assign an instance of Daim_Shared\n $shared = Daim_Shared::get_instance();\n \n //database version -----------------------------------------------------\n delete_option( $shared->get('slug') . \"_database_version\",\"0\");\n \n //AIL ------------------------------------------------------------------\n\t delete_option( $shared->get('slug') . '_default_open_new_tab');\n\t delete_option( $shared->get('slug') . '_default_use_nofollow');\n\t delete_option( $shared->get('slug') . '_default_activate_post_types');\n\t delete_option( $shared->get('slug') . '_default_case_insensitive_search');\n delete_option( $shared->get('slug') . '_default_string_before');\n\t delete_option( $shared->get('slug') . '_default_string_after');\n delete_option( $shared->get('slug') . '_default_max_number_autolinks_per_keyword');\n delete_option( $shared->get('slug') . '_default_priority');\n \n //suggestions\n delete_option( $shared->get('slug') . '_suggestions_pool_post_types');\n delete_option( $shared->get('slug') . '_suggestions_pool_size');\n delete_option( $shared->get('slug') . '_suggestions_titles');\n delete_option( $shared->get('slug') . '_suggestions_categories');\n delete_option( $shared->get('slug') . '_suggestions_tags');\n delete_option( $shared->get('slug') . '_suggestions_post_type');\n \n //optimization ---------------------------------------------------------\n delete_option( $shared->get('slug') . '_optimization_num_of_characters');\n delete_option( $shared->get('slug') . '_optimization_delta');\n \n //juice ----------------------------------------------------------------\n delete_option( $shared->get('slug') . '_default_seo_power');\n delete_option( $shared->get('slug') . '_penality_per_position_percentage');\n delete_option( $shared->get('slug') . '_remove_link_to_anchor');\n delete_option( $shared->get('slug') . '_remove_url_parameters');\n \n //tracking -------------------------------------------------------------\n delete_option( $shared->get('slug') . '_track_internal_links');\n \n //analysis -------------------------------------------------------------\n delete_option( $shared->get('slug') . '_set_max_execution_time');\n delete_option( $shared->get('slug') . '_max_execution_time_value');\n delete_option( $shared->get('slug') . '_set_memory_limit');\n delete_option( $shared->get('slug') . '_memory_limit_value');\n delete_option( $shared->get('slug') . '_limit_posts_analysis');\n delete_option( $shared->get('slug') . '_dashboard_post_types');\n delete_option( $shared->get('slug') . '_juice_post_types');\n \n //meta boxes -----------------------------------------------------------\n delete_option( $shared->get('slug') . '_interlinks_options_post_types');\n delete_option( $shared->get('slug') . '_interlinks_optimization_post_types');\n delete_option( $shared->get('slug') . '_interlinks_suggestions_post_types');\n\n //capabilities ----------------------------------------------------------\n delete_option( $shared->get('slug') . '_dashboard_menu_required_capability');\n delete_option( $shared->get('slug') . '_juice_menu_required_capability');\n delete_option( $shared->get('slug') . '_hits_menu_required_capability');\n delete_option( $shared->get('slug') . '_ail_menu_required_capability');\n delete_option( $shared->get('slug') . '_interlinks_options_mb_required_capability');\n delete_option( $shared->get('slug') . '_interlinks_optimization_mb_required_capability');\n delete_option( $shared->get('slug') . '_interlinks_suggestions_mb_required_capability');\n\n //advanced -----------------------------------------------------------------------------------------------------\n\t delete_option( $shared->get('slug') . '_default_enable_ail_on_post');\n delete_option( $shared->get('slug') . '_filter_priority');\n\t delete_option( $shared->get('slug') . '_ail_test_mode');\n\t delete_option( $shared->get('slug') . '_random_prioritization');\n\t delete_option( $shared->get('slug') . '_ignore_self_ail');\n\t delete_option( $shared->get('slug') . '_general_limit_mode');\n\t delete_option( $shared->get('slug') . '_characters_per_autolink');\n\t delete_option( $shared->get('slug') . '_max_number_autolinks_per_post');\n\t delete_option( $shared->get('slug') . '_same_url_limit');\n\t delete_option( $shared->get('slug') . '_protected_tags');\n\t delete_option( $shared->get('slug') . '_protected_gutenberg_blocks');\n\t delete_option( $shared->get('slug') . '_protected_gutenberg_custom_blocks');\n\t delete_option( $shared->get('slug') . '_protected_gutenberg_custom_void_blocks');\n\t delete_option( $shared->get('slug') . '_pagination_dashboard_menu');\n\t delete_option( $shared->get('slug') . '_pagination_juice_menu');\n\t delete_option( $shared->get('slug') . '_pagination_hits_menu');\n\t delete_option( $shared->get('slug') . '_pagination_ail_menu');\n\n }", "title": "" }, { "docid": "57adcacf83869edda02337fdb063be9e", "score": "0.63974565", "text": "function delete() {\n $option_name = $this->get_option_manager_name();\n\n if ( $this->_is_network_storage ) {\n delete_site_option( $option_name );\n } else if ( $this->_blog_id > 0 ) {\n delete_blog_option( $this->_blog_id, $option_name );\n } else {\n delete_option( $option_name );\n }\n }", "title": "" }, { "docid": "10aac7242f6d120f3a2619bdb8b88a91", "score": "0.63448423", "text": "public function delete_red_flag_widget_options($widget_id)\n\t{\n\t\t// Add these capabilities before option update\n\t\t$role = get_role( 'editor' );\n\t\t$role->add_cap( 'manage_network_options' );\t\t\t\t\n\t\t\n\t\treturn delete_site_option( $widget_id );\n\t\t\n\t}", "title": "" }, { "docid": "734cb2dd23083df20fab349d565658d8", "score": "0.6231091", "text": "public static function arb_delete_data () {\r\n\t\t$options = (array) get_option( self::PLUGIN_OPTIONS );\r\n\t\tif ( isset( $ptions[ self::DELETE_DATA ] ) && $options[ self::DELETE_DATA ] == 'on' ) {\r\n\t\t\tdelete_option( self::PLUGIN_OPTIONS );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "313ca84b903dc38021df83a56b168753", "score": "0.62236017", "text": "public function delete() {\n\t\tdelete_option($this->settings_key);\n\t}", "title": "" }, { "docid": "17f2feb52f67d5a0a29e317d80ffb8c4", "score": "0.6219534", "text": "function fi_delete_plugin_options() {\n\tdelete_option('fi_options');\n}", "title": "" }, { "docid": "d07366a248d30c84084d81d982d017c4", "score": "0.61873376", "text": "protected function delete_options() {\n\n\t\t// Remove the avada_dynamic_css_time option.\n\t\t// It will be re-generated automatically as fusion_dynamic_css_time.\n\t\tdelete_option( 'avada_dynamic_css_time' );\n\n\t\t// Remove the avada_dynamic_css_posts option.\n\t\t// It will be re-generated automatically as fusion_dynamic_css_posts.\n\t\tdelete_option( 'avada_dynamic_css_posts' );\n\n\t\t// Delete other options that are no longer used.\n\t\tdelete_option( 'fusion_dynamic_css_compiler' );\n\t\tdelete_option( 'fusion_dynamic_css_caching' );\n\t\tdelete_option( 'fusion_cache_server_ip' );\n\t\tdelete_option( 'fusion_dynamic_js_compiler' );\n\n\t}", "title": "" }, { "docid": "883df24624d8d44dc9aa53901815e0b8", "score": "0.6111367", "text": "function SeBday_uninstall () {\r\tdelete_option('widget_SeBday');\r}", "title": "" }, { "docid": "fe1f6524ef2d1cf498410f088dd04404", "score": "0.60444397", "text": "function vizbang_remove() {\r\ndelete_option('vizbang-which-cat');\r\ndelete_option('vizbang-taxonomy-a');\r\ndelete_option('vizbang-taxonomy-a-slug');\r\ndelete_option('vizbang-taxonomy-b');\r\ndelete_option('vizbang-taxonomy-b-slug');\r\ndelete_option('vizbang-taxonomy-if-post-cat');\r\ndelete_option('vizbang-taxonomy-b-color');\r\ndelete_option('vizbang-taxonomy-a-color');\r\ndelete_option('vizbang-category-color');\r\n}", "title": "" }, { "docid": "f0738d314fb98f519f33932f365b57b1", "score": "0.60403955", "text": "public function delete()\n {\n if ($this->interoperability->isNetworkActivated()) {\n delete_site_option($this->plugin_name);\n } else {\n delete_option($this->plugin_name);\n }\n }", "title": "" }, { "docid": "4fba1fa59156545e0984ea80b4e0dd1d", "score": "0.6000375", "text": "public function after_delete() {\n }", "title": "" }, { "docid": "160dfb0e919c8fd27208da5e7fc5e0b5", "score": "0.59519494", "text": "public function delete_widget_options( $widget_id = 0, $sidebar_id = '', $id_base = '' )\n\t{\n\t\t// if there's no widget, bail\n\t\tif( ! $widget_id ) {\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $wp_registered_widgets;\n\n\t\tif ( ! isset( $wp_registered_widgets[$widget_id] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tEasy_Shuffle_Widget_Utils::unstick_item( $widget_id );\n\t\tEasy_Shuffle_Widget_Utils::unstick_css( $widget_id );\n\t}", "title": "" }, { "docid": "99bc9271c72b1f6883c604821d302bd8", "score": "0.59433335", "text": "public function afterDelete();", "title": "" }, { "docid": "f2c6a675a6feccdd16314f45a3646ce4", "score": "0.59231", "text": "function nn_action_callback(){\n\n\t\t/* Delete the options. */\n\t\tdelete_option('nn_sub_general_options');\n\t\tdelete_option('nn_sub_advanced_options');\n\t\t\n\t\t/* Call the deactivate function. */\n\t\tdeactivate_plugins( plugin_basename(__FILE__), $silent=false );\n\t}", "title": "" }, { "docid": "ad29a1818d51b676de1b8cb356dad15d", "score": "0.59090006", "text": "function editionlogger_delete_option() {\n\t\n\t$args = func_get_args();\n\t$args = $args[0];\n\t\n\t$name = $args[0];\n\n\t$log = editionlogger_new_klogger();\n\t$log->info(\"[\".YOURLS_USER.\"] Deleted option: ( $name )\");\n}", "title": "" }, { "docid": "6804d5b7ed64e555517298b4c312625f", "score": "0.58948", "text": "private function delOption($option);", "title": "" }, { "docid": "48207a857c242d3fe804e165a7bb3ac2", "score": "0.5883907", "text": "public function getDeleteWidgetUrl()\n {\n return $this->getUrl('*/*/deletewidget', array($this->_objectId => $this->getCurrentId()));\n }", "title": "" }, { "docid": "fbd707c6efdfd2ee7a20255a899fb53d", "score": "0.5846973", "text": "public static function admin_spots_delete_do() { \n $all_args = func_get_args();\n if (count($all_args)>0 && $all_args[0]===true) {\n $args = array_shift($all_args);\n return \"javascript:\".self::__get_javascript_post_routing('admin_spots_delete_do','admin.spots.delete.do',$args);\n } else {\n return self::__get_javascript_post_routing('admin_spots_delete_do','admin.spots.delete.do',$all_args);\n }\n }", "title": "" }, { "docid": "28b479eb80fa36bfd8370bbe44cdb81f", "score": "0.58159083", "text": "function ctabs_remove_options() {\r\n delete_option('ctabs_css');\r\n}", "title": "" }, { "docid": "9adde70bdb0e386fd972b28014777356", "score": "0.58096164", "text": "protected function delForm()\n {\n \n }", "title": "" }, { "docid": "9adde70bdb0e386fd972b28014777356", "score": "0.58096164", "text": "protected function delForm()\n {\n \n }", "title": "" }, { "docid": "3cbe186f8d9e052d18ea410250343586", "score": "0.58020735", "text": "function api_delete_theme_option( $data ) {\n if( !isset( $data['token'] ) || !is_valid_token( $data['token'] ) ) {\n API_Responses::send_response( array(\n 'content' => 'Invalid Credentials',\n ), 400);\n }\n\n $query = DB_Query_Builder::delete_query( 'theme_options', array(\n 'ID' => $data['id']\n ) );\n $response = (new Database_Interface)->delete( $query );\n\n if( $response ) {\n API_Responses::send_response( array(\n 'content' => 'Option successfully deleted',\n ) );\n } else {\n API_Responses::send_response( array(\n 'content' => 'No option deleted. Please check your parameters.',\n ), 400 );\n }\n}", "title": "" }, { "docid": "187ea25f92444c905290d075d1659479", "score": "0.5794195", "text": "protected function afterDelete()\n {\n }", "title": "" }, { "docid": "187ea25f92444c905290d075d1659479", "score": "0.5794195", "text": "protected function afterDelete()\n {\n }", "title": "" }, { "docid": "e07878ac5f3b4367e49ada1248058a0b", "score": "0.5773636", "text": "public static function prepareWidgetEditDeleteMenuItems($hook_name, $entity_type, $return_value, $params) {\n\t\tif (!is_array($return_value)) {\n\t\t\treturn;\n\t\t}\n\t\n\t\t$widget = elgg_extract('entity', $params);\n\t\tif ($widget->fixed && !elgg_in_context('default_widgets') && !elgg_is_admin_logged_in()) {\n\t\t\tforeach ($return_value as $section_key => $section) {\n\t\t\t\tforeach ($section as $item_key => $item) {\n\t\t\t\t\tif (in_array($item->getName(), ['delete', 'settings'])) {\n\t\t\t\t\t\tunset($return_value[$section_key][$item_key]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\tforeach ($return_value as $section_key => $section) {\n\t\t\tforeach ($section as $item_key => $item) {\n\t\t\t\tif ($item->getName() == 'settings') {\n\t\t\t\t\t$show_access = elgg_get_config('widget_show_access');\n\t\t\t\t\t$item->setHref('ajax/view/widget_manager/widgets/settings?guid=' . $widget->getGUID() . '&show_access=' . $show_access);\n\t\t\t\t\tunset($item->rel);\n\t\t\t\t\t$item->{\"data-colorbox-opts\"} = '{\"width\": 750, \"height\": 500, \"trapFocus\": false}';\n\t\t\t\t\t$item->addLinkClass('elgg-lightbox');\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif ($item->getName() == 'collapse') {\n\t\t\t\t\tif (!$widget->canCollapse() && $widget->widget_manager_collapse_state !== 'closed') {\n\t\t\t\t\t\tunset($return_value[$section_key][$item_key]);\n\t\t\t\t\t} elseif ($widget->canCollapse()) {\n\t\t\t\t\t\t$widget_is_collapsed = false;\n\t\t\t\t\t\t$widget_is_open = true;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (elgg_is_logged_in()) {\n\t\t\t\t\t\t\t$widget_is_collapsed = widget_manager_check_collapsed_state($widget->guid, 'widget_state_collapsed');\n\t\t\t\t\t\t\t$widget_is_open = widget_manager_check_collapsed_state($widget->guid, 'widget_state_open');\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (($widget->widget_manager_collapse_state === 'closed' || $widget_is_collapsed) && !$widget_is_open) {\n\t\t\t\t\t\t\t$item->addLinkClass('elgg-widget-collapsed');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tif ($item->getName() == 'delete') {\n\t\t\t\t\t// dirty fix to prevent incorrect reregistration of add widget js action (see js/lib/ui.widgets.js line 120)\n\t\t\t\t\t$item->addLinkClass('elgg-widget-multiple');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t\treturn $return_value;\n\t}", "title": "" }, { "docid": "ee14f1e4b38e30b4c9cea1bc2f0df97a", "score": "0.57614654", "text": "public function after_delete() { return true; }", "title": "" }, { "docid": "1878c56647b5f9e61477fa7eab4238aa", "score": "0.5743527", "text": "public function delete($instance) : void ;", "title": "" }, { "docid": "1878c56647b5f9e61477fa7eab4238aa", "score": "0.5743527", "text": "public function delete($instance) : void ;", "title": "" }, { "docid": "94115559aa578fb77290b9a82d872ce4", "score": "0.5721563", "text": "private function _delete_settings() {\n delete_option( 'zendesk-settings' );\n delete_option( 'zendesk-settings-remote-auth' );\n }", "title": "" }, { "docid": "628749760ebb63faeed2e04c2a50f692", "score": "0.5701182", "text": "public function delete(){\n\n\t\t$data['id'] = false;\n\n\t\tif ($id = $this['request']->get('id', 'int')) {\n\t\t\tif ($this['widget']->delete($id)) {\n\t\t\t\t$data['id'] = $id;\n\t\t\t}\n\t\t}\n\n\t\techo json_encode($data);\n\t}", "title": "" }, { "docid": "b4e8db9f5a523766fb47733ad2726e54", "score": "0.56966597", "text": "public function afterDelete()\n {\n }", "title": "" }, { "docid": "c69be70264bc0a772485e313bbbdca1e", "score": "0.56871086", "text": "function delete_options()\n{\n $options = \\get_option('amp-options');\n \\delete_option('amp-options');\n \\delete_option('amp_css_transient_monitor_time_series');\n \\delete_option('amp_url_validation_queue');\n // See Validation\\URLValidationCron::OPTION_KEY.\n $theme_mod_name = 'amp_customize_setting_modified_timestamps';\n \\remove_theme_mod($theme_mod_name);\n if (!empty($options['reader_theme']) && 'legacy' !== $options['reader_theme']) {\n $reader_theme_mods_option_name = \\sprintf('theme_mods_%s', $options['reader_theme']);\n $reader_theme_mods = \\get_option($reader_theme_mods_option_name);\n if (\\is_array($reader_theme_mods) && isset($reader_theme_mods[$theme_mod_name])) {\n unset($reader_theme_mods[$theme_mod_name]);\n \\update_option($reader_theme_mods_option_name, $reader_theme_mods);\n }\n }\n}", "title": "" }, { "docid": "775b2c31375608fee12a794a1d9cdba5", "score": "0.56855047", "text": "public function delete($options);", "title": "" }, { "docid": "f0bdc3bb10c646a132d96b2eee6e0bd2", "score": "0.56614465", "text": "function _deactivation() {\n\t\t\tdelete_option('catpdf_options');\t// Delete plugin options\n\t\t}", "title": "" }, { "docid": "ee84bf1f1bf501cb5ec4a47dfa3bf012", "score": "0.5660761", "text": "function afterDelete() {\n\t\t$this->__actualizarPreferenciasEnSesion();\n\t\treturn parent::afterDelete();\n\t}", "title": "" }, { "docid": "46f848062a542b8a5a322a8189c228f4", "score": "0.5651101", "text": "function clients_selectbox_deleteData($ctlData,$clientID) {\t\n\t## prepare the db object\n\t$db = new DB_Sql(); \n\t\n\t$identifier = strtolower($ctlData['IDENTIFIER']);\n\t\n\t## first we will delete any previously set entries\n\t$query = \"DELETE FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"2\".$identifier.\" WHERE client_id='$clientID'\";\n\t$result_pointer = $db->query($query);\t\t\n}", "title": "" }, { "docid": "754f11a3a23c2aaf7cd804a945ca31f4", "score": "0.56420374", "text": "protected function afterDelete()\n {\n parent::afterDelete();\n }", "title": "" }, { "docid": "7792e3b74d1c60ffff4b254f5898d426", "score": "0.5636676", "text": "function m_deleteOption()\n\t{\n\t\t$fileUpload = new FileUpload();\n\t\tif(isset($this->request['optionid']) && !empty($this->request['optionid']))\n\t\t{\n\t\t\t$this->obDb->query = \"SELECT vImage FROM \".OPTIONVALUES; \n\t\t\t$this->obDb->query.=\" WHERE iOptionId_FK ='\".$this->request['optionid'].\"'\";\n\t\t\t$rsImage = $this->obDb->fetchQuery();\n\t\t\t$rsCount = $this->obDb->record_count;\t\n\t\t\tif($rsCount>0)\n\t\t\t{\n\t\t\t\tfor($i=0;$i<$rsCount;$i++)\n\t\t\t\t{\n\t\t\t\t\tif($this->libFunc->m_checkFileExist($rsImage[$i]->vImage,\"options\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t\t$fileUpload->deleteFile($this->imagePath.\"options/\".$rsImage[$i]->vImage);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t\t#DELETING MENUHEADER\n\t\t\t$this->obDb->query = \"DELETE FROM \".OPTIONS.\" WHERE iOptionId_PK =\".$this->request['optionid'];\n\t\t\t$this->obDb->updateQuery();\n\t\t\t$this->obDb->query = \"DELETE FROM \".OPTIONVALUES.\" WHERE iOptionId_FK =\".$this->request['optionid'];\n\t\t\t$this->obDb->updateQuery();\n\t\t}\n\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"ecom/adminindex.php?action=ec_option.home\");\t\n\t\texit;\t\t\n\t}", "title": "" }, { "docid": "2eb5e33613c77cd98623b74c19037232", "score": "0.562053", "text": "function ia_whiteboard_widget_clear_options() {\r\n\t\tglobal $options, $shortcode, $caps, $wpdb, $wp_roles;\r\n\t\tif(ia_whiteboard_widget_shortcode_exists($shortcode)) {\r\n\t\t\tremove_shortcode($shortcode);\r\n\t\t}\r\n\t\t\r\n\t\t//get users with jsfiddle meta and remove the meta\r\n\t\t$u_table = $wpdb->prefix . 'usermeta';\r\n\t\t\r\n\t\t$remove['meta_key'] = 'iajsfiddle';\r\n\t\tforeach($remove as $name => $val) {\r\n\t\t\t$query = \"SELECT user_id FROM $u_table WHERE meta_key = '$val';\";\r\n\t\t\t$get_users = $wpdb->get_results($query);\r\n\t\t\tif($get_users) {\r\n\t\t\t\tforeach($get_users as $user_id) {\r\n\t\t\t\t\tdelete_user_meta($user_id,$val);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//iterate through all roles and remove the capabilities\r\n\t\tforeach($wp_roles->roles as $role => $info) {\r\n\t\t\t$role_obj = get_role($role);\r\n\t\t\tforeach($caps as $cap) {\r\n\t\t\t\tif ($role_obj->has_cap($cap)) {\r\n\t\t\t\t\t$role_obj->remove_cap($cap);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "11128868696beb22e3c491377527bb4f", "score": "0.56075394", "text": "function yourls_delete_option( $name ) {\n\tglobal $ydb;\n\t$table = YOURLS_DB_TABLE_OPTIONS;\n\t$name = yourls_escape( $name );\n\n\t// Get the ID, if no ID then return\n\t$option = $ydb->get_row( \"SELECT option_id FROM `$table` WHERE `option_name` = '$name'\" );\n\tif ( is_null( $option ) || !$option->option_id )\n\t\treturn false;\n\t\t\n\tyourls_do_action( 'delete_option', $name );\n\t\t\n\t$ydb->query( \"DELETE FROM `$table` WHERE `option_name` = '$name'\" );\n\tunset( $ydb->option[ $name ] );\n\treturn true;\n}", "title": "" }, { "docid": "7f9464d9417f20952c57a019bc840271", "score": "0.5602138", "text": "protected function doDel()\n {\n \n }", "title": "" }, { "docid": "7f9464d9417f20952c57a019bc840271", "score": "0.5602138", "text": "protected function doDel()\n {\n \n }", "title": "" }, { "docid": "746f55983732207f9f89de9837f06112", "score": "0.56020004", "text": "public function destroy() {\n $poll_option_id = $this->id;\n $sql1 = \"DELETE FROM vote WHERE poll_option_id = :id\";\n $query1 = DB::connection()->prepare($sql1);\n $query1->bindValue(':id', $poll_option_id, PDO::PARAM_INT);\n $query1->execute();\n $sql2 = \"DELETE FROM poll_option WHERE id = :id\";\n $query2 = DB::connection()->prepare($sql2);\n $query2->bindValue(':id', $poll_option_id, PDO::PARAM_INT);\n $query2->execute();\n }", "title": "" }, { "docid": "06a56ffe463bd801472956d8bebd5ec1", "score": "0.56009334", "text": "public function _unset_options() {\n\t\t// global $wpdb;\n\t\tdelete_option('ec_stars_rating_size');\n\t\tdelete_option('ec_stars_rating_show_votes');\n\t\tdelete_option('ec_stars_rating_use_microformats');\n\t\tdelete_option('ec_stars_rating_use_jquery');\n\t\tdelete_option('ec_stars_rating_default_color');\n\t\tdelete_option('ec_stars_rating_hover_color');\n\t\tdelete_option('ec_stars_rating_active_color');\n\t\t// $wpdb->query($wpdb->prepare(\"DROP TABLE %s\", $this->getTableName()));\n\t}", "title": "" }, { "docid": "6fd459083cd4cf8c3242bbaac68f8e25", "score": "0.5597762", "text": "function apsa_delete_element_option($element_id, $option_name) {\n global $wpdb;\n $element_options_table = $wpdb->prefix . 'apsa_element_options';\n $delete_option = $wpdb->delete($element_options_table, array('element_id' => $element_id, 'option_name' => $option_name));\n}", "title": "" }, { "docid": "4b13fd460362d685a0e5eebde19b03d6", "score": "0.55947113", "text": "function nn_deact_delete_page(){\n\t\t\n\t\t?>\n\t\t\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t\t<h2>My Plugin</h2>\n\t\t\t\n\t\t\t<?php\n\t\t\tdo_settings_sections( 'nn_deact_delete' );\n\t\t\t?>\n\t\t\n\t\t\t<form method='POST' action='plugins.php?deactivate=true&plugin_status=all&paged=1&s=' style='display:inline;'>\n\t\t\t\t<input type='submit' id='nn_delete_data' class='button' value=\"<?php _e('Yes, go ahead' ,'nnp' ) ?>\" />\n\t\t\t</form>\n\t\t\t<form method='POST' action='plugins.php' style='display:inline;'>\n\t\t\t\t<input type='submit' class='button' value=\"<?php _e( 'No, return to plugins page', 'nnp' ) ?>\" />\n\t\t\t</form>\n\t\t</div>\n\t\t\n\t\t<?php\n\t}", "title": "" }, { "docid": "7400cceae4155540bdf99ea5e4371218", "score": "0.5582343", "text": "public function after_delete() {\n do_action( 'sm_cpt_after_delete_' . $this->get_post_type(), $this );\n }", "title": "" }, { "docid": "393e85468f4cb64530d25ce6974f49f0", "score": "0.5572034", "text": "public function delete_data() {\n\n check_admin_referer( 'megamenu_delete_data' );\n\n do_action(\"megamenu_delete_cache\");\n\n // delete menu settings\n delete_option(\"megamenu_settings\");\n\n // delete menu locations\n delete_option(\"megamenu_locations\");\n\n // delete toggle blocks\n delete_option(\"megamenu_toggle_blocks\");\n\n // delete version\n delete_option(\"megamenu_version\");\n\n // delete all widgets assigned to menus\n $widget_manager = new Mega_Menu_Widget_Manager();\n\n if ( $mega_menu_widgets = $widget_manager->get_mega_menu_sidebar_widgets() ) {\n\n foreach ( $mega_menu_widgets as $widget_id ) {\n\n $widget_manager->delete_widget( $widget_id );\n\n }\n\n }\n\n // delete all mega menu metadata stored against menu items\n delete_metadata( 'post', 0, '_megamenu', '', true );\n\n // clear cache\n delete_transient( \"megamenu_css\" );\n\n // delete custom themes\n max_mega_menu_delete_themes();\n\n $this->redirect( admin_url( \"admin.php?page=maxmegamenu_tools&delete_data=true\" ) );\n\n }", "title": "" }, { "docid": "9f2b9f79a4a619de136ad52afc5c3b96", "score": "0.55574614", "text": "function __call_widget_options_callback( $widget ) {\n if ( $widget['callback'] and function_exists( $widget['callback'] ) ) {\n $fields = $widget['callback']( $widget );\n return __dashboard_widget_options_fields( $widget, $fields ); \n }\n}", "title": "" }, { "docid": "9e1edc787a8926a657b1b401e707307b", "score": "0.55260426", "text": "function del_param_callback() {\n\t\t\tglobal $_POST ; \n\t\t\t$options = $_POST['param'] ; \n\t\t\t$pluginID = $_POST['pluginID'] ; \n\t\t\t\n\t\t\tforeach ($options as $o) {\n\t\t\t\t$this->del_param($o, $pluginID) ; \n\t\t\t}\n\n\t\t\techo \"ok\" ; \n\t\t\tdie() ; \n\t\t}", "title": "" }, { "docid": "0a147f79ca1a34d022f56e2b7c1fa39f", "score": "0.55251867", "text": "function kapost_cache_delete($name)\r\n{\r\n\tdelete_option($name);\r\n}", "title": "" }, { "docid": "caacad151632e65ee72601814aefb61e", "score": "0.5523834", "text": "static function uninstall() {\n\t\tif ( ! current_user_can( 'activate_plugins' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t// remove the config option\n\t\tdelete_option( 'widget_gk_tabs' );\n\t}", "title": "" }, { "docid": "9649fa4a6496a345f72f70bf8d40e58f", "score": "0.5515826", "text": "public function delete()\n {\n parent::delete();\n }", "title": "" }, { "docid": "e7eddc9d4a092c2124ccc452c728b065", "score": "0.5514173", "text": "public function delete()\n {\n return delete_option($this->key);\n }", "title": "" }, { "docid": "7e97dea970ab570d8238e28ee45efcba", "score": "0.5513002", "text": "abstract public function deleteAction();", "title": "" }, { "docid": "7e97dea970ab570d8238e28ee45efcba", "score": "0.5513002", "text": "abstract public function deleteAction();", "title": "" }, { "docid": "205fc072cb2ad3dbc6425d9e2c81f3a0", "score": "0.5501543", "text": "public static function setStandardWidget() {\n add_action('widgets_init', 'remove_some_wp_widgets', 1);\n\n function remove_some_wp_widgets() {\n unregister_widget('WP_Widget_Calendar');\n unregister_widget('WP_Widget_Search');\n unregister_widget('WP_Widget_Recent_Comments');\n }\n }", "title": "" }, { "docid": "ba7d4a08331ba8f04cf745b359052feb", "score": "0.5497278", "text": "public function wplc_reset_options(){\n\t\tdelete_option( $this-> key );\n\t}", "title": "" }, { "docid": "e3680dc815f7a552af6133d9ee3d2924", "score": "0.5494768", "text": "function apsa_delete_custom_ad($form_id = '') {\n\n if ($form_id == '') {\n trigger_error('undefined variable', E_USER_NOTICE);\n return false;\n }\n global $wpdb;\n $element_options_table = $wpdb->prefix . 'apsa_element_options';\n $custom_ads_table = $wpdb->prefix . 'apsa_custom_ads';\n\n\n if (is_array($form_id)) {\n $ids = '';\n foreach ($form_id as $key => $value) {\n if ($ids == \"\")\n $ids.= $value;\n else\n $ids.= ',' . $value;\n }\n } else {\n $ids = $form_id;\n }\n\n//deleting from elemets options table\n\n $update_options_query = $wpdb->query(\"UPDATE $element_options_table SET option_value='' WHERE `option_name` = 'custom_ads' and option_value IN (\" . $ids . \")\");\n $query = \"DELETE FROM $custom_ads_table WHERE id IN (\" . $ids . \")\";\n $delete_form = $wpdb->query($query);\n\n if ($delete_form === FALSE || $update_options_query === FALSE) {\n return FALSE;\n } else {\n return TRUE;\n }\n}", "title": "" }, { "docid": "705fadd2ab359f67368a49fd83c5f861", "score": "0.54849803", "text": "function delete()\n\t{\n\t\t$this->setTabs();\n\n\t\t$cont_obj_gui =& new ilObjContentObjectGUI(\"\",$this->content_object->getRefId(),\n\t\t\ttrue, false);\n\t\t$cont_obj_gui->delete($this->obj->getId());\n\t}", "title": "" }, { "docid": "6ad0908997d06614b6b54357c0fb0430", "score": "0.5482087", "text": "function remove_options() {\n remove_menu_page( 'edit-comments.php' );\n}", "title": "" }, { "docid": "3ab1719b3f01d650b5c3f437d5467fea", "score": "0.5481876", "text": "public function delete_widget_cache() {\n\t\t\n\t\twp_cache_delete( 'widget_merlin_category_posts_columns', 'widget' );\n\t\t\n\t}", "title": "" }, { "docid": "cbe5e0eb821a4b4fde9c2210728673a5", "score": "0.5477936", "text": "function analyzer_remove(){\n\t\tglobal $wpdb;\n\t\t//ibou's drop table code\n\n\t\t//alem's remove page code\n\t\t$the_page_title = 'QuestionPeach Analyzer GUI';\n\t\t$the_page_name = 'QuestionPeach-analyzer';\n\n\n\t\t// the id of our page...\n\t\t$the_page_id = get_option( 'my_plugin_page_id' );\n\t\tif( $the_page_id ) {\n\n\t\t\twp_delete_post( $the_page_id ); // this will trash, not delete\n\n\t\t}\n\n\t\tdelete_option(\"my_plugin_page_title\");\n\t\tdelete_option(\"my_plugin_page_name\");\n\t\tdelete_option(\"my_plugin_page_id\");\n\t}", "title": "" }, { "docid": "8a423364591e195687b30070957a613f", "score": "0.547342", "text": "function my_give_destroy_onclick_selectric() { ?>\n <script>\n\n\t\tjQuery( \"button.give-btn-modal\" ).click(function($) {\n\t\t\tvar Selectric = jQuery('.give-cs-select-currency').data('selectric'); \n\t\t\t\n\t\t\tif (Selectric) {\n \t\t\t\tjQuery('.give-cs-select-currency').selectric('destroy');\n\t\t\t}\n\t\t\t\n\t\t});\n </script>\n\n<?php }", "title": "" }, { "docid": "144e8799411b7efd9e4b0fdd46e0ad79", "score": "0.5466812", "text": "protected function deregister_options()\n\t{\n\t\tforeach($this->options as $option=>$value)\n\t\t\t$this->delete_option($option);\n\t}", "title": "" }, { "docid": "58ef902d8498f6686158861a07651884", "score": "0.5448705", "text": "function regression_regression_revision_edit_delete($form, &$form_state) {\n}", "title": "" }, { "docid": "0658bcdc5c6194eb6c958e7b17834dac", "score": "0.5445343", "text": "public function settings_delete() {\n\t\treturn delete_option( $this->get_settings_option_name() );\n\t}", "title": "" }, { "docid": "f7bc04b1368b996c70bceb3c15d4abb8", "score": "0.5440387", "text": "private function deleteWidgetFiles($widget) {\n $controllerName = ucwords($widget->name);\n $controllerName = str_replace(\" \", \"\", $controllerName);\n\n $widgetControllerName = $this->WidgetsClassPath . DIRECTORY_SEPARATOR . $controllerName . 'Controller';\n $widgetViewName = $this->WidgetsViewPath . DIRECTORY_SEPARATOR . $widget->classname . $this->WidgetsViewExtension;\n\n if(File::exists($widgetControllerName))\n File::delete($widgetControllerName);\n\n if(File::exists($widgetViewName)) {\n File::delete($widgetViewName);\n }\n }", "title": "" }, { "docid": "99e3679d7c686aa018caa6e979c79bfc", "score": "0.5439951", "text": "function delete_this_plugin_option($option_name) {\n\t\t\tif($this->is_multisite === true) {\n\t\t\t\t// Delete network site option\n\t\t\t\treturn delete_site_option($option_name);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Delete blog option\n\t\t\t\treturn delete_option($option_name);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9e17c47bf6b1455c6a2eab016846caf8", "score": "0.5439647", "text": "function delete_ajax($delete_ajax_details){\n\tparse_str($delete_ajax_details, $delete_ajax_form_array);\t\n\t$delete_id = $delete_ajax_form_array['delete_id'];\n\t$delete_type = $delete_ajax_form_array['delete_type'];\n\t\n\tglobal $wpdb;\n\t$table_name_project = $wpdb->prefix . \"custom_project\";\n\t$table_name_client = $wpdb->prefix . \"custom_client\";\n\t$table_name_person = $wpdb->prefix . \"custom_person\";\t\n\t$table_name_task = $wpdb->prefix . \"custom_task\";\n\t$table_name_department = $wpdb->prefix . \"custom_department\";\n\t$table_name_monthly_plan = $wpdb->prefix . \"custom_monthly_plan\"; \n\t$table_name_website = $wpdb->prefix . \"custom_website\";\n\t$table_name_hosting_domain = $wpdb->prefix . \"custom_hosting_domain\";\n\t\n\tif($delete_type == 'Project'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_project} WHERE ID = '$delete_id'\");\n\t}\n\t\n\tif($delete_type == 'Client'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_client} WHERE ID = '$delete_id'\");\n\t}\n\t\n\tif($delete_type == 'Person'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_person} WHERE ID = '$delete_id'\");\n\t}\n\t\n\tif($delete_type == 'Task'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_task} WHERE ID = '$delete_id'\");\n\t}\n\t\n\tif($delete_type == 'Department'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_department} WHERE ID = '$delete_id'\");\n\t}\n\t\n\tif($delete_type == 'Monthly Plan'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_monthly_plan} WHERE ID = '$delete_id'\");\n\t}\n\t\n\tif($delete_type == 'Website'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_website} WHERE ID = '$delete_id'\");\n\t}\n\t\n\tif($delete_type == 'Hosting Domain'){\n\t\t$delete = $wpdb->query( \"DELETE FROM {$table_name_hosting_domain} WHERE ID = '$delete_id'\");\n\t}\n\t\n\treturn $delete_id;\n}", "title": "" }, { "docid": "2100d517cd6dc1bf4d282a9dc9d4f6bd", "score": "0.5438876", "text": "function swpf_deactivate_options( $options )\n{\n\tforeach ($options as $key => $value) {\n\t\tdelete_option( $key );\n\t}\n}", "title": "" }, { "docid": "013476d47ceabcfca8c453461f7596e9", "score": "0.5436939", "text": "function cropperuninstalls()\n {\n \t\tif(get_option(\"nggcropperoptions\"))\n\t\t\t{\n\t\t\t\tdelete_option(\"nggcropperoptions\");\n\t\t\t\t\n\t\t\t}\n }", "title": "" }, { "docid": "6affa53c9da9414ae8aa59f160d87c25", "score": "0.5436234", "text": "public function delete()\n\t{\n\t\t$return = \\App\\Db::getInstance('admin')->createCommand()\n\t\t\t->delete('s_#__fields_dependency', ['id' => $this->getId()])\n\t\t\t->execute();\n\t\t\\App\\Cache::delete('FieldsDependency', $this->get('tabid'));\n\t\t$this->checkHandler();\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "0bfa417687f070b09321a37e71d6fc06", "score": "0.54355264", "text": "static public function deactivation()\n {\n\n //models\\admin\\menu\\TPAutoReplacLinksModel::deleteTable();\n //models\\admin\\menu\\TPSearchFormsModel::deleteTable();\n //models\\site\\shortcodes\\TPSpecialOfferShortcodeModel::deleteTable();\n self::deleteCacheAll();\n delete_option( TPOPlUGIN_OPTION_NAME);\n //delete_option( TPOPlUGIN_OPTION_VERSION);\n //delete_option( TPOPlUGIN_TABLE_SF_VERSION);\n //delete_option( TPOPlUGIN_TABLE_ARL_VERSION);\n //delete_option( TPOPlUGIN_TABLE_SPECIAL_OFFER_VERSION);\n //delete_option( TPOPlUGIN_TABLE_SPECIAL_ROUTE_VERSION);\n }", "title": "" }, { "docid": "4d772f035bed06db2a892409a3e5b346", "score": "0.5428386", "text": "function delete()\r\n {\r\n $this->CheckActive();\r\n if (($this->State==dsInsert) || ($this->State==dsSetKey)) $this->Cancel();\r\n else\r\n {\r\n if ($this->Recordcount==0) DatabaseError(_(\"Cannot perform this operation on an empty dataset\"), Self);\r\n $this->DataEvent(deCheckBrowseMode, 0);\r\n $this->callevent(\"onbeforedelete\",array());\r\n $this->CheckOperation(\"InternalDelete\", \"ondeleteerror\");\r\n $this->fieldbuffer=array();\r\n $this->State=dsBrowse;\r\n $this->callevent(\"onafterdelete\",array());\r\n }\r\n }", "title": "" }, { "docid": "1ffcb0e5c4f2be9624f4de629bfe7d0a", "score": "0.54279494", "text": "function deleteCatGuestListEntry(){\n\n }", "title": "" }, { "docid": "c2fd3603bf3366b992573172ec04f434", "score": "0.5424568", "text": "public function after_delete($id){}", "title": "" }, { "docid": "92227ee425fd8f17d581bfc5bd0c6015", "score": "0.5418421", "text": "public static function admin_playlists_delete_do() { \n $all_args = func_get_args();\n if (count($all_args)>0 && $all_args[0]===true) {\n $args = array_shift($all_args);\n return \"javascript:\".self::__get_javascript_post_routing('admin_playlists_delete_do','admin.playlists.delete.do',$args);\n } else {\n return self::__get_javascript_post_routing('admin_playlists_delete_do','admin.playlists.delete.do',$all_args);\n }\n }", "title": "" }, { "docid": "97cb0a49c5bea25b03703a2864b54247", "score": "0.5407065", "text": "public function afterDelete() {\n parent::afterDelete();\n DeliverySpecHeader::model()->deleteAllByAttributes(array('delivery_spec_id' => $this->id));\n DeliverySpecPositioning::model()->deleteAllByAttributes(array('delivery_spec_id' => $this->id));\n DeliverySpecOutputSetting::model()->deleteAllByAttributes(array('delivery_spec_id' => $this->id));\n DeliverySpecTerritoryRequirement::model()->deleteAllByAttributes(array('delivery_spec_id' => $this->id));\n }", "title": "" }, { "docid": "b7017bcccb54402ccb283b6956ec78db", "score": "0.5403784", "text": "public static function admin_albums_delete_do() { \n $all_args = func_get_args();\n if (count($all_args)>0 && $all_args[0]===true) {\n $args = array_shift($all_args);\n return \"javascript:\".self::__get_javascript_post_routing('admin_albums_delete_do','admin.albums.delete.do',$args);\n } else {\n return self::__get_javascript_post_routing('admin_albums_delete_do','admin.albums.delete.do',$all_args);\n }\n }", "title": "" }, { "docid": "de63d0a450fe0725ff3bd296b8971288", "score": "0.54030085", "text": "function uninstall() {\n $the_page_id = get_option( 'orgtool_page_id' );\n if( $the_page_id ) {\n wp_delete_post( $the_page_id, true );\n }\n\n delete_option(\"orgtool_page_title\");\n delete_option(\"orgtool_page_id\");\n }", "title": "" }, { "docid": "9a3459506f646f473ac8c9e606100681", "score": "0.5395266", "text": "protected function onDelete(): void\n {\n }", "title": "" }, { "docid": "da14150954ec4a20676f606a9f9f7f0c", "score": "0.53916043", "text": "function mjf_db_options_widget() {\r\n\t$id = 'mjf-options-widget';\r\n\t$name = 'MJF Options Widget';\r\n\t$callback = 'mjf_db_options_callback';\r\n\t$control_callback = 'mjf_db_control_callback';\r\n\t$callback_args = array();\r\n\twp_add_dashboard_widget( $id, $name, $callback, $control_callback, $callback_args );\r\n}", "title": "" }, { "docid": "c5b8bf428681d57d195ac5ef2e33ec75", "score": "0.5391164", "text": "function maybe_delete_block() {\n\t\tif( isset( $_GET['delete_mcb'] ) ) {\n\t\t\tglobal $post;\n\t\t\tdelete_post_meta( $post->ID, '_mcb-' . $_GET['delete_mcb'] );\n\t\t}\n\t}", "title": "" }, { "docid": "3197a0781f62ceb3dccc4e7ecdfa0a38", "score": "0.5389667", "text": "function delete_social_notifications_like() {\n\t\tdelete_option( 'social_notifications_like' );\n\t}", "title": "" }, { "docid": "ff0cde9c94b571ac7cf4d2bcb77fb76f", "score": "0.53832406", "text": "static public function uninstall()\n {\n models\\admin\\menu\\TPSearchFormsModel::deleteTable();\n models\\admin\\menu\\TPAutoReplacLinksModel::deleteTable();\n models\\site\\shortcodes\\TPSpecialOfferShortcodeModel::deleteTable();\n models\\site\\shortcodes\\hotels\\TPHotelListModel::deleteTable();\n delete_option( TPOPlUGIN_OPTION_NAME);\n delete_option( TPOPlUGIN_OPTION_VERSION);\n delete_option( TPOPlUGIN_TABLE_SF_VERSION);\n delete_option( TPOPlUGIN_TABLE_HOTEL_LIST_VERSION);\n delete_option( TPOPlUGIN_TABLE_ARL_VERSION);\n delete_option( TPOPlUGIN_TABLE_SPECIAL_OFFER_VERSION);\n delete_option( TPOPlUGIN_TABLE_SPECIAL_ROUTE_VERSION);\n }", "title": "" }, { "docid": "dbc13f65a3c170212a291c1a2f2b46aa", "score": "0.5379531", "text": "function delete(Laout $layout);", "title": "" }, { "docid": "13d9a87dbf2fa7b7b74b9ffae9fecd36", "score": "0.53775746", "text": "function skins_listing_onDeleteAddon() {\n include_once $GLOBALS['babInstallPath'].'utilit/eventincl.php';\n include_once $GLOBALS['babInstallPath'].'utilit/functionalityincl.php';\n\n bab_removeEventListener('bab_eventPageRefreshed', 'skins_listing_onPageRefreshed', 'addons/skins_listing/init.php');\n \n return true;\n}", "title": "" }, { "docid": "c03818eeae156c5434f32e1a89ee8c83", "score": "0.5375064", "text": "function awcp_customizeDashboardWidgets() {\n\n\tglobal $wp_meta_boxes;\n\n\t//get options\n\t$options = advancedwordpressconfigurationpluginOptions::getInstance();\n\n\t//get current option name\n\t$shortName = $options->getShortName(__FILE__);\n\n\t$selectedOptions = explode( ',', $options->options_backend[\"advanced_wordpress_configuration_plugin_\".$shortName] );\n\n\tif( is_array($selectedOptions) ) {\n\t\tforeach ($selectedOptions as $key => $value) {\n\t\t\tremove_meta_box( trim($value), 'dashboard', 'core');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "86a7dd6e3e38beca2615a676d9492011", "score": "0.5374592", "text": "function eureka_facetapi_deactivate_widget($variables) {\n return '<span class=\"icon icon-icon-close\"></span>';\n}", "title": "" }, { "docid": "a6de9cbaad3108ef5fa852afacdef207", "score": "0.5374585", "text": "function delete_ajax(){\n }", "title": "" }, { "docid": "6178e2bf37d5a3e8fbcf4bd885034f3b", "score": "0.53744245", "text": "protected static function delete_blog_options( $action, $option ) {\n\t\t$blog_id = get_current_blog_id();\n\t\t$opt_slug = static::$prefix . $option;\n\t\t$options = ( is_multisite() ) ? get_blog_option( $blog_id, $opt_slug, array() ) : get_option( $opt_slug, array() );\n\t\tif ( $options ) {\n\t\t\tif ( array_key_exists( 'deledata', $options ) && ( $options['deledata'] === $action ) ) {\n\t\t\t\tif ( is_multisite() ) {\n\t\t\t\t\tdelete_blog_option( $blog_id, $opt_slug );\n\t\t\t\t} else {\n\t\t\t\t\tdelete_option( $opt_slug );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7d66dd60ed48475874ee5c47742624c9", "score": "0.53704286", "text": "public function doDelete();", "title": "" }, { "docid": "113591e1611e4668d35e4d7d6892be61", "score": "0.53693235", "text": "public function hook_after_delete($id) {\n //Your code here\n\n }", "title": "" }, { "docid": "68d473112b2e6ecc2f77f74e64bd48a5", "score": "0.53688556", "text": "public function deleteAction();", "title": "" }, { "docid": "356880b6cd9add978275b5c57e2735ec", "score": "0.5360313", "text": "public function destroy($id)\n {\n //This option is disabled\n }", "title": "" }, { "docid": "4222ddc72b3637a8958e5334ccd077fb", "score": "0.5353895", "text": "public function before_delete() {}", "title": "" } ]
c5d92bf74b04d3b74997846cc4bfab4d
Handler for POST requests
[ { "docid": "5c4838718a0912a4b6068ab34e096b11", "score": "0.0", "text": "public function handleCreate(Request $request, FormInterface $form): Response\n {\n $data = json_decode($request->getContent(), true);\n $form->submit($data);\n if ($form->isSubmitted() && $form->isValid()) {\n $object = $form->getData();\n $em = $this->getDoctrine()->getManager();\n $em->persist($object);\n $em->flush();\n return $this->handleCreateSuccess($object);\n }\n return $this->handleCreateFail($form);\n }", "title": "" } ]
[ { "docid": "37705bd1fd7be8d85beb9811583ae2fc", "score": "0.79866683", "text": "public function POST() {}", "title": "" }, { "docid": "fcac5ae13546488aa0d8840cb6461aab", "score": "0.7837792", "text": "public function doPOST()\n {\n }", "title": "" }, { "docid": "1c7d7cfb24ce38b11b396ed6a66f9815", "score": "0.7790518", "text": "protected abstract function post();", "title": "" }, { "docid": "eaf64aa5ee952cd1d8b80d2cd2579162", "score": "0.77708954", "text": "abstract public function post();", "title": "" }, { "docid": "9c6bc3499f81edd6e7fe70d0cafede29", "score": "0.77380574", "text": "public static function post();", "title": "" }, { "docid": "b81c0fbbc649df6e404b5b29afc8fcac", "score": "0.74736816", "text": "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('deleteTupleRequest', $_POST)) {\n handleDeleteTupleRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n }\n\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "bddb7b5ef1b451de3a33446b44a0fcd1", "score": "0.7419616", "text": "private function expPostMethod()\n {\n if($this->get_request_method() != \"POST\"){\n $this->response($this->json(array('success' => false, 'errror-code' => 2)), 406);\n }\n\n \n // du lieu tra ve:\n $returnData = array(\n 'success' => true, \n 'data' => 'text data'\n );\n\n $this->response($this->json($returnData), 200);\n }", "title": "" }, { "docid": "d027ebf43b45f4377cded4605dc10900", "score": "0.73980504", "text": "public function postData() {}", "title": "" }, { "docid": "b3d0d92ac702baafeff260cb49e77044", "score": "0.73011005", "text": "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('fireDriver', $_POST)) {\n fireHandler();\n } else if (array_key_exists('hireDriver', $_POST)) {\n hireRequest();\n }\n\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "bad9b5a85646a93070acd842041cb48e", "score": "0.72564906", "text": "public function postHandle();", "title": "" }, { "docid": "5495752af2a71d863fc5b6b9d371ebf7", "score": "0.7252348", "text": "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('resetTablesRequest', $_POST)) {\n handleResetRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n } else if (array_key_exists('insertQueryRequest', $_POST)) {\n handleInsertRequest();\n } \n\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "b9459946162fb3d9563ee1c7b7b3f744", "score": "0.7238152", "text": "public function handlePOST() {\n global $request;\n\n $field = NULL;\n $fields = $request->variable_names();\n\n foreach($fields as $key => $value) {\n if(preg_match('~[0-9]~',$value) === 1) {\n $number = preg_replace('/[^0-9]+/', '', $value);\n $value = preg_replace('/[0-9]/', '', $value);\n }\n\n switch($value) {\n case\"filepond\":\n $field = 'filepond';\n break;\n \n case\"bannerUpload\":\n $field = 'bannerUpload';\n break;\n \n case\"thumbnailUpload\":\n $field = 'thumbnailUpload';\n break;\n\n case\"avatarUpload\":\n $field = 'avatarUpload';\n break;\n\n case\"mentorAvatarUpload\":\n $field = 'mentorAvatarUpload';\n break;\n\n case\"lessonThumbnailUpload\":\n $field = 'lessonThumbnailUpload'.$number;\n break;\n\n case\"materialWorkbookUpload\":\n $field = 'materialWorkbookUpload'.$number;\n break;\n }\n }\n\n if(!empty($field)) {\n // Get submitted field data item, will always be one item in case of async upload\n $items = $this->FilePond->loadFilesByField($field);\n\n // If no items, exit\n if (count($items) === 0) {\n // Something went wrong, most likely a field name mismatch\n header($request->server(\"SERVER_PROTOCOL\") . \" 400 Bad Request\", true, 400);\n\n return;\n }\n // Returns plain text content\n header('Content-Type: text/plain');\n // Remove item from array Response contains uploaded file server id\n echo array_shift($items)->getId();\n } else {\n header($request->server(\"SERVER_PROTOCOL\") . \" 400 Bad Request\", true, 400);\n }\n }", "title": "" }, { "docid": "a0f47e27f200eee0d43df885eb375ea3", "score": "0.72325003", "text": "public function post()\n\t{\n\t}", "title": "" }, { "docid": "d44b3e5de68553ffe10846367b5036d6", "score": "0.7171637", "text": "public function post(array $post): IHttpHandler;", "title": "" }, { "docid": "bc3f6ea9799d7f307b95b0d39125824b", "score": "0.71692896", "text": "private function on_post () {\n if (!method_exists ($this, 'post_prepare')) $this ->respond (501, 'post_prepare not found!');\n if (!method_exists ($this, 'post_respond')) $this ->respond (501, 'post_respond not found!');\n\n // Collect the JSON-encoded POST data\n $input = (array) json_decode (file_get_contents ('php://input'), TRUE);\n\n // Make sure we have an SQL statement associated to this `create` request\n // if (!array_key_exists ('create', $this ->map)) $this ->respond (405);\n // if (strlen (trim ($this ->map['create'])) == 0) $this ->respond (405);\n\n // Construct the actual SQL statement that we will be submitting\n $sql = $this -> post_prepare ($this ->map['create'], $input);\n\n // Enact the query and collect its response\n $set = $this ->db ->query ($sql);\n $out = $set ->fetch_row();\n\nerror_log (json_encode(['app' => 'SAMmobile', 'api' => 'QRBill.POST', 'sql' => $sql, 'set' => $set, 'output' => $out ], true));\n\n // We're done... respond to caller\n $this ->db ->close();\n $this ->respond (200, 'QRBill created successfully', null, $out);\n\n }", "title": "" }, { "docid": "dba68184364db114b2863ed29a3a05ac", "score": "0.7126341", "text": "public static function ProcessPost()\n {\n\n }", "title": "" }, { "docid": "778a670b8bc0c1992684fbba68e3a225", "score": "0.7074436", "text": "public function HandleRequest() {\n\t\tswitch($_SERVER['REQUEST_METHOD']) {\n\t\t\tcase 'POST': \n\t\t\t\t$this->POST( json_decode(file_get_contents('php://input'), true)); \n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "eb309c64b2f9baca0634d135df9afefc", "score": "0.7053016", "text": "function handlePOSTRequest() {\n if (connectToDB()) {\n if (array_key_exists('insertQueryRequest', $_POST)) {\n handleInsertRequest();\n } else if (array_key_exists('updateQueryRequest', $_POST)) {\n handleUpdateRequest();\n } else if (array_key_exists('deleteQueryRequest', $_POST)) {\n handleDeleteRequest();\n }else if (array_key_exists('selectQueryRequest', $_POST)) {\n handleSelectRequest();\n } else if (array_key_exists('projectQueryRequest', $_POST)) {\n handleProjectRequest();\n } else if (array_key_exists('joinQueryRequest', $_POST)) {\n handleJoinRequest();\n }\n\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "4ee0c9efb8c7a8eab7f7b3258e219163", "score": "0.7001942", "text": "function handlePOSTRequest() {\n if (array_key_exists('submitHavingRequest', $_POST)) {\n handleHavingRequest();\n }\n }", "title": "" }, { "docid": "64c1ae79eb0d76164d54fc2a865913d7", "score": "0.69896376", "text": "protected function doPost() {\n }", "title": "" }, { "docid": "02231ca87d19809ec24776c12b44bf72", "score": "0.6965816", "text": "function post(array $requestData) {}", "title": "" }, { "docid": "67290ad13452c01759a97010779b11b6", "score": "0.68952256", "text": "public function Handle_postRequest()\n {\n\n //echo \"Ccore - Handle_postRequest POST: \"; var_dump($_POST);\n //error_log(\"[ivy] Handle_postRequest modName = \".$_POST['modName'].\" methName = \".$_POST['methName']);\n if (isset($_POST['modName'])\n && isset($_POST['methName'])\n && strlen($_POST['methName']) > 0\n ) {\n\n $mod = $this->Get_postMod($_POST['modName']);\n\n if($mod) {\n $methNames = $this->Get_postMethNames($_POST['methName'], $mod);\n $relocate = $this->parse_modMethNames($mod, $methNames);\n // daca toate metodele au fost apelate si au returnat true => se va face relocate\n //$relocate = false;\n if($relocate) {\n $this->reLocate();\n }\n }\n\n }\n\n }", "title": "" }, { "docid": "b70624e59b0b587a32844a085e9d9c70", "score": "0.68741107", "text": "function handle_post($post) {\n }", "title": "" }, { "docid": "e0d1a3e785286b6677eb8e6dcc2f146b", "score": "0.6817267", "text": "public function handlePostResource(Request $request, array $data);", "title": "" }, { "docid": "33fdd8fb11cb9e5e6ef18977c881228a", "score": "0.68029654", "text": "public function postAction();", "title": "" }, { "docid": "0a4bb4460b42b107fadbb95f4bc20ccb", "score": "0.67946297", "text": "public function postAction()\n {\n $this->_sendRestResponse();\n }", "title": "" }, { "docid": "b4a229b240b6ecdf0630883e0369c4a8", "score": "0.6794321", "text": "function postAction() {\n\t\t$data_out = array (\n\t\t\t'msg' => 'Default postAction called',\n\t\t\t'data' => $_POST\n\t\t);\n\n\t\techo json_encode($data_out);\n\t}", "title": "" }, { "docid": "dec6507512da847f41f5ae5f3245f523", "score": "0.6776179", "text": "function process_post()\n{\n\tglobal $g_obj_lock;\n\t\n\tif ( isset( $_POST['Command'] ) && $g_obj_lock->page_lock( PageHandler::get_post_value( 'SerialId' ) ) )\n\t{\n\t\t$str_command = $_POST['Command'];\n\t\t\n\t\tswitch ( $str_command )\n\t\t{\n\t\t\tcase 'Create New Problem':\n\t\t\t{\n\t\t\t\ton_create_handler();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'Copy':\n\t\t\t{\n\t\t\t\ton_copy_handler();\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tMessageHandler::add_message( MSG_ERROR, \"Unknown Command\" );\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "fbb10fb65cf3ebc829c0d6d72beb90a0", "score": "0.6765337", "text": "public function postAction() { }", "title": "" }, { "docid": "506152a4af7d59ca5c6bcd91f78bcd3c", "score": "0.6703419", "text": "private static function handlePostActions(): void\n {\n if (strtoupper($_SERVER['REQUEST_METHOD']) === 'POST') {\n $action = $_GET['action'] ?? '';\n if ($action === 'logout') {\n phpCAS::logout();\n exit;\n }\n\n // generic redirect for all POST requests\n header(\"Location: ?\");\n exit;\n }\n }", "title": "" }, { "docid": "948cb8e015741734111b632736328d4f", "score": "0.6700255", "text": "public function post($request)\n {\n }", "title": "" }, { "docid": "53db47a14d88d9186469ab318324b11c", "score": "0.66990703", "text": "function post(){\n\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n \n $params = [];\n $pdo = Database::Connect();\n $data = file_get_contents(\"php://input\");\n $data = json_decode($data, true); \n \n try{\n\n if(empty($data))\n throw new Exception('Falha ao receber POST!');\n\n /**\n * Extracts data from json object and makes the code cleaner\n * but you have to insert data into the database respectively \n */\n foreach($data as $param){\n $params[] = $param;\n }\n \n if(!empty($params)){\n $pdo = $pdo->prepare(\"INSERT INTO example VALUES(?,?,?)\");\n $pdo->execute($params);\n } \n\n } catch( Excpetion $e ){\n\n header($_SERVER[\"SERVER_PROTOCOL\"].\" 500 \". $e->getMessage());\n exit();\n\n }\n }\n }", "title": "" }, { "docid": "aa4965d996cf487234612ab8f9755efc", "score": "0.6668547", "text": "function is_post_request(){\n return $_SERVER['REQUEST_METHOD'] == 'POST';\n }", "title": "" }, { "docid": "ba10d15fe28db36a9e9eea7f02d39106", "score": "0.6661569", "text": "function handleAllRequests()\n{\n if ($_SERVER['REQUEST_METHOD'] === 'POST') {\n //registracia ucitela\n handlePostRequest();\n }\n else {\n http_response_code(405);\n }\n}", "title": "" }, { "docid": "8672a1c6130ed46e2f855153c38f4ed9", "score": "0.6644205", "text": "public function post()\n {\n\n }", "title": "" }, { "docid": "e7ad163b50163d19ea61ed43bf9e4ddb", "score": "0.6626164", "text": "public function post()\n\t{\n\t\t\n\t\t$this->plugin->setResponse( \"this is post data\" );\n\t}", "title": "" }, { "docid": "bc815abe3a998b26a970c80465b04b7a", "score": "0.6608673", "text": "public static function receivePost() {\n $jsonPOST = file_get_contents(\"php://input\");\n if ($jsonPOST == null) {\n // No post\n $authStatus['status'] = false;\n $authStatus['description'] = \"Payload not posted successfully to \"\n . \"the handler.\";\n return $authStatus;\n } else {\n $response = json_decode($jsonPOST, true);\n\n if ($response != null || $response != false) {\n // All good\n return $response;\n } else {\n // Cannot decode\n $authStatus['status'] =false;\n $authStatus['description'] = \"Internal server error, \"\n . \"payload cannot be decoded. Please Contact support.\";\n return $authStatus;\n }\n }\n }", "title": "" }, { "docid": "b762f85f795827d57252900cb26daeb6", "score": "0.66070443", "text": "public function handleDataSubmission() {}", "title": "" }, { "docid": "613264984485e0348aa3408cdba8f195", "score": "0.65862143", "text": "public function postAction()\n {\n return $this->handleCreateRequest();\n }", "title": "" }, { "docid": "0f4bd00da470ef509fdd75dbdea0b933", "score": "0.6576924", "text": "public function handlePost() {\n\n\t\tif (move_uploaded_file($this->file, $this->uploadFile)) {\n\t $this->setResponse(array('fileName' => $this->targetFileName, 'message' => 'File was successfully uploaded.'));\n\t } else {\n\t \t$this->setResponse(array('message' => 'Possible file upload attack!'));\n\t }\n\n\t}", "title": "" }, { "docid": "a2fb52ddb49c1f7e0d3214f6c4d658d1", "score": "0.6567357", "text": "public function handle_post() {\n\t\tif ( ! isset( $_POST['tuja_action'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->is_parse_file_mode() ) {\n\n\t\t} elseif ( $this->is_save_mode() ) {\n\t\t}\n\t}", "title": "" }, { "docid": "405ae829bc590767ee7debeba2da8cd8", "score": "0.6535836", "text": "public function post()\n {\n $authentication = new Authentication();\n PostRepository::postPost(\n $authentication->user()->getId(),\n $_POST['name'],\n $_POST['description'],\n $_POST['step01'],\n $_POST['pieces01'],\n $_POST['step02'],\n $_POST['pieces02'],\n $_POST['step03'],\n $_POST['pieces03'],\n $_POST['step04'],\n $_POST['pieces04'],\n $_POST['step05'],\n $_POST['pieces05'],\n $_POST['step06'],\n $_POST['pieces06']\n );\n\n\n\n }", "title": "" }, { "docid": "540b9aa215612a778c8b127c3e342d2f", "score": "0.65160334", "text": "function httpMethod_POST()\n{\n\tglobal $ajax;\n\tglobal $CONFIGVAR;\n\n\t// We need to make sure that the user has access.\n\tcheckUserSecurity();\n\n\t// In additon, we also need to check the tokens as well.\n\tcheckTokenSecurity(0);\n\n\t// Now we *NEED* the command to determine what we are going\n\t// to do. If it's missing, then this function will not\n\t// return.\n\t$commandId = extractCommandId();\n\n\tcommandProcessorPost($commandId);\n\texit(0);\n}", "title": "" }, { "docid": "9f768766ec646bf74d4334874b2c3712", "score": "0.65116096", "text": "function post($request) {\r\n\t\tif($request->uri[sizeof($request->uri)-1]==\"user\") {\r\n\t\t\tcreateUser($request);\r\n\t\t}\r\n\t\telse if($request->uri[sizeof($request->uri)-1]==\"login\") {\r\n\t\t\tlogin($request);\r\n\t\t}\r\n\t\telse if ($request->uri[sizeof($request->uri)-1]==\"portal\"){\r\n\t\t\taddPortal($request);\r\n\t\t}\r\n}", "title": "" }, { "docid": "1395292e4a6e73901356e2eec5296970", "score": "0.65029216", "text": "private function _set_post_on_json_request() {\n\t\tif(serv('REQUEST_METHOD') != 'POST' || !stristr(serv('CONTENT_TYPE'), 'json')) return;\n\t\t$_POST = json_decode(file_get_contents('php://input'), true);\n\t\tif(!$_POST) $_POST = array();\n\t}", "title": "" }, { "docid": "c69a91562496479bb0fcd3541fc369ad", "score": "0.6498927", "text": "function handle_post() {\n // Read request params\n $req_type = get_req_query('account');\n $user_name = get_req_body('user_name');\n $user_pwd = get_req_body('user_pwd');\n\n // If already logged in\n if (get_user_id() > 0) {\n Output::print_error('ALREADY_LOGGED_IN', 409);\n }\n\n // Check if all required parameters are present\n if (!$user_name || !$user_pwd) {\n Output::print_error('BAD_REQUEST', 400);\n }\n\n try {\n // Start DB class instance\n $db = new_db_instance();\n $user_data = $db->get_user_by_name($user_name);\n $user_sha_pwd = sha1($user_pwd);\n\n // If login request\n if ($req_type == 'login') {\n if ($user_data == null || $user_data['user_password'] != $user_sha_pwd) {\n Output::print_error('USER_NOT_EXIST', 404);\n }\n\n $_SESSION['user_id'] = $user_data['user_id'];\n $_SESSION['user_name'] = $user_data['user_name'];\n $_SESSION['user_photo'] = $user_data['user_photo'];\n Output::print_data(['user_id' => $user_data['user_id'], 'user_name' => $user_data['user_name']]);\n }\n\n // If register request\n else if ($req_type == 'register') {\n // Check the existence of the user\n if ($user_data != null) {\n Output::print_error('USER_EXIST', 409);\n }\n\n // Read optional param\n $user_photo = get_req_file('user_photo');\n $ul_done = false;\n\n // Initialize Uploader class\n $uploader = new Uploader(ABSPATH . 'uploads/users/');\n $uploader->set_allowed_exts('png', 'jpg', 'jpeg', 'gif', 'svg');\n\n // If user uses a profile photo, upload it\n if ($user_photo != false) {\n $ul_done = $uploader->upload_file($user_photo, $user_name);\n if (!$ul_done) {\n Output::print_error($uploader->get_last_upload_msg());\n }\n }\n\n $user_photo_uri = $ul_done ? '/uploads/users/' . $uploader->get_last_upload_filename() : '/assets/img/nobody.svg';\n $db_result = $db->create_user($user_name, $user_sha_pwd, $user_photo_uri);\n\n if ($db_result == -1) {\n $uploader->del_last_upload_file();\n Output::print_error('DB_ERROR');\n }\n\n $_SESSION['user_id'] = $db_result;\n $_SESSION['user_name'] = $user_name;\n $_SESSION['user_photo'] = $user_photo_uri;\n Output::print_data(['user_id' => $db_result, 'user_name' => $user_name]);\n }\n } finally {\n $db = null;\n }\n }", "title": "" }, { "docid": "17e6507dec59870de221a6412f478f42", "score": "0.64852726", "text": "public function post_it() { $this->method = \"POST\" ;}", "title": "" }, { "docid": "1f58c3242b1c874ad1b160b5560f7ed2", "score": "0.64771646", "text": "function is_post_request(){\n return $_SERVER[\"REQUEST_METHOD\"] == \"POST\";\n }", "title": "" }, { "docid": "1793f0a0aa0b9c866516a16606609ee8", "score": "0.64767015", "text": "public function handlePostRequest()\n {\n $data = $_POST[$this->getName()];\n return $this->fromArray( empty($data) ? array() : $data );\n }", "title": "" }, { "docid": "8f00f9bfccc457b53897bc2264bc8260", "score": "0.64707124", "text": "function POST($matches = array()) {\n self::GET($matches);\n }", "title": "" }, { "docid": "662f9f4bf0816f183cf789d1fc583f56", "score": "0.64642847", "text": "public function post($data)\n {\n }", "title": "" }, { "docid": "fcaef1cc96cc3079d275efadefe3529f", "score": "0.6457338", "text": "private function setPostMethod() {\n\t\t$this->_action = 'save';\n\t\tif (empty($_POST)) {\n\t\t\t$response = new \\System\\Helpers\\Response('Please submit data', 200, true);\n\t\t\t$response->toJSON();\n\t\t}\n\t}", "title": "" }, { "docid": "6835e76f8e0384069ffaf1b58dee7885", "score": "0.6450147", "text": "private function POST($args)\n\t{\n\t\tswitch($args['functionName'])\n\t\t{\n\t\t\tcase 'login': $this->login($args);\n\t\t\tbreak;\n\t\t\tcase 'checkUsername': $this->checkUsername($args);\n\t\t\tbreak;\n\t\t\tcase 'addUser': $this->addUser($args);\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "9ac4e41c6218d138e66eccab5c8b8d0c", "score": "0.6447656", "text": "public function handlerRequest()\n {\n if ($_POST['action'] === 'save') {\n $database = new InSqlDatabase();\n $taskBook = new TaskBook($database);\n $deadlineNew = [];\n array_push($deadlineNew, $_POST['year']);\n array_push($deadlineNew, $_POST['month']);\n array_push($deadlineNew, $_POST['week']);\n array_push($deadlineNew, $_POST['day']);\n array_push($deadlineNew, $_POST['descriptionTask']);\n array_push($deadlineNew, $_POST['rangeTask']);\n $task = $taskBook->createTask($deadlineNew[4], $deadlineNew[5]);\n $deadline = $taskBook->createDeadlineTask($deadlineNew[0], $deadlineNew[1],\n $deadlineNew[2], $deadlineNew[3], $task);\n $taskBook->saveTask($deadline);\n } else {\n $database = new InSqlDatabase();\n $taskBook = new TaskBook($database);\n $getParameters = [];\n array_push($getParameters, $_GET['actualYear']);\n array_push($getParameters, $_GET['actualMonth']);\n array_push($getParameters, $_GET['actualWeek']);\n array_push($getParameters, $_GET['actualDay']);\n $taskBook->getTaskForToday($getParameters[0], $getParameters[1],\n $getParameters[2], $getParameters[3]);\n }\n }", "title": "" }, { "docid": "4fdde87115a44f7bdab65b962b2014dd", "score": "0.6430977", "text": "public function postAction()\n {\n if ($this->_isAdmin){\n \n // Work out the type of action they want to perform\n switch($_POST['operation']){\n case 'update':\n $data = $this->_pagesModel->updatePage(unserialize(base64_decode($_POST['data'])), $_POST['argOne']);\n break;\n case 'update-assignment':\n $data = $this->_pagesModel->updatePageAssignment(unserialize(base64_decode($_POST['data'])), $_POST['argOne'], $_POST['argTwo']);\n break;\n case 'add':\n $data = $this->_pagesModel->addPage(unserialize(base64_decode($_POST['data'])));\n break;\n case 'remove':\n $data = $this->_pagesModel->removePage(unserialize(base64_decode($_POST['data'])));\n break;\n default:\n $data = 'Operation not found';\n break;\n }\n \n $this->returnPostResult($data);\n \n }else{\n $this->returnNoAuth();\n }\n\n\n }", "title": "" }, { "docid": "569f0b59aa0c8a39c5658eee94a49d01", "score": "0.64136344", "text": "abstract protected function postData($action);", "title": "" }, { "docid": "421be97dd82d6ad69ea3bc8a7d6e18c7", "score": "0.63960475", "text": "public function Post() {\n echo json_encode([\n 'message' => 'POST method called',\n 'error' => false,\n ]);\n }", "title": "" }, { "docid": "97fd81d4b75a498e2bff06f73d97d63a", "score": "0.6388093", "text": "public function data_post()\n {\n\t\t\t// $file = FCPATH . 'application/tiqs_logs/messages.txt';\n\t\t\t// Utility_helper::logMessage($file, 'printer send post request');\n // Check is valid POST request type\n\n\t\t\t// DO HERE CHECK IF PRINTER CONNECTED NOT AT GET BECAUSE THAN WE KNOW IT IS...\n\n if (strtolower($_SERVER['CONTENT_TYPE']) !== 'application/json')\n\t\t\t{\n //Utility_helper::logMessage($file, 'printer send post request CONTENT TYPE');\n\t\t\t\treturn;\n\t\t\t}\n\n\n // Get JSON payload recieved from the request and parse it\n // $parsedJson = Sanitize_helper::sanitizePhpInput();\n\t\t\t// Utility_helper::logMessage($file, 'printer send post request passed JSON');\n\n // $parsedJson = Sanitize_helper::sanitizePhpInput();\n\t\t\t$parsedJson = file_get_contents(\"php://input\");\n\t\t\t$parsedJson = json_decode($parsedJson, true);\n\n\t\t\t// Validate JSON params\n if (!isset($parsedJson['printerMAC']) || !isset($parsedJson['statusCode']) || !isset($parsedJson['status'])){\n\t\t\t\t// Utility_helper::logMessage($file, 'printer send post request passed JSON MAC ERROR'.$parsedJson['printerMAC']);\n\t\t\t\t// Utility_helper::logMessage($file, 'printer send post request passed JSON STATUS CODEERROR'.$parsedJson['statusCode']);\n\t\t\t\t// Utility_helper::logMessage($file, 'printer send post request passed JSON STATUS ERROR'.$parsedJson['status']);\n\t\t\t\treturn;\n\t\t\t}\n\n if (!Sanitize_helper::isValidMac($parsedJson['printerMAC'])) {\n\t\t\t\t// Utility_helper::logMessage($file, 'printer send post request passed MAC ERROR');\n\t\t\t\treturn;\n } else {\n $this->shopprinterrequest_model->insertPrinterRequest($parsedJson['printerMAC']);\n $this->setPrinterAndMacToFetchOrder($parsedJson['printerMAC']);\n $this->setVendorInfo();\n };\n\n\n // Utility_helper::logMessage($file, 'Printer MAC:' . $parsedJson['printerMAC']);\n // If the JSON request contains a request object in the clientAction then the printer is responding to a additional information\n // request (i.e. to get variables like the poll interval from the printer), so in this case the $path variable is set to\n // additional_communication.json to save this additional data\n if (isset($parsedJson[\"clientAction\"][0][\"request\"])) {\n $arr = array(\"jobReady\" => false);\n // Utility_helper::logMessage($file, 'JOB NOT READY => 1');\n } else {\n if ($this->shopreportrequest_model->checkRequests($parsedJson['printerMAC'])) {\n $arr = [\n \"jobReady\" => true,\n // \"mediaTypes\" => array('text/plain','image/png', 'image/jpeg'));\n \"mediaTypes\" => array('image/png')\n // \"deleteMethod\" => \"GET\");\n ];\n $this->set_response($arr, 200); // CREATED (201) being the HTTP response code\n return;\n }\n // er is een bon betaald\n // nu gaan we de bon opbouwen in printqueue.tbl\n // daarvoor hebben we nodig\n // ordernr\n // vullen onderdelen\n // printed op 1 zetten.\n\n if (Utility_helper::testingVendors($this->shopprinters_model->userId)) {\n if (\n $this->shoporder_model->fetchOrdersForPrint($this->macToFetchOrder, $this->printTimeConstraint)\n || $this->shoporder_model->getOrderReceipt($this->shopprinters_model->userId, $this->printTimeConstraint)\n ) {\n $arr = [\n \"jobReady\" => true,\n // \"mediaTypes\" => array('text/plain','image/png', 'image/jpeg'));\n \"mediaTypes\" => array('image/png')\n // \"deleteMethod\" => \"GET\");\n ];\n // Utility_helper::logMessage($file, 'JOB READY => ');\n } else {\n $arr = array(\"jobReady\" => false);\n // Utility_helper::logMessage($file, 'JOB NOT READY => 2');\n }\n } else {\n if ($this->shoporder_model->fetchOrdersForPrint($this->macToFetchOrder)) {\n $arr = [\n \"jobReady\" => true,\n // \"mediaTypes\" => array('text/plain','image/png', 'image/jpeg'));\n \"mediaTypes\" => array('image/png')\n // \"deleteMethod\" => \"GET\");\n ];\n // Utility_helper::logMessage($file, 'JOB READY => ');\n } else {\n $arr = array(\"jobReady\" => false);\n // Utility_helper::logMessage($file, 'JOB NOT READY => 2');\n }\n }\n }\n\n $this->set_response($arr, 200); // CREATED (201) being the HTTP response code\n }", "title": "" }, { "docid": "792f6db9784fe68311ef2a222ced5c8f", "score": "0.63822764", "text": "public function checkPostRequest() {\r\n if (!Request::isPost()) Response::redirect();\r\n }", "title": "" }, { "docid": "a0583c2455a7c431c0ab0c2f58a33f8f", "score": "0.6378999", "text": "public function handleRequest();", "title": "" }, { "docid": "f93cedbd402b6340ed397e856c538ed3", "score": "0.6357609", "text": "public function handleRequest() {}", "title": "" }, { "docid": "0dbb92f322588bcd2931487a3127f9d0", "score": "0.635697", "text": "public function httpPOSTHandler($method, $uri) {\n\n if ($method!='POST') return;\n $contentType = $this->server->httpRequest->getHeader('Content-Type');\n list($contentType) = explode(';', $contentType);\n if ($contentType !== 'application/x-www-form-urlencoded' &&\n $contentType !== 'multipart/form-data') {\n return;\n }\n $postVars = $this->server->httpRequest->getPostVars();\n\n if (!isset($postVars['sabreAction']))\n return;\n\n if ($this->server->broadcastEvent('onBrowserPostAction', array($uri, $postVars['sabreAction'], $postVars))) {\n\n switch($postVars['sabreAction']) {\n\n case 'mkcol' :\n if (isset($postVars['name']) && trim($postVars['name'])) {\n // Using basename() because we won't allow slashes\n list(, $folderName) = DAV\\URLUtil::splitPath(trim($postVars['name']));\n $this->server->createDirectory($uri . '/' . $folderName);\n }\n break;\n case 'put' :\n if ($_FILES) $file = current($_FILES);\n else break;\n\n list(, $newName) = DAV\\URLUtil::splitPath(trim($file['name']));\n if (isset($postVars['name']) && trim($postVars['name']))\n $newName = trim($postVars['name']);\n\n // Making sure we only have a 'basename' component\n list(, $newName) = DAV\\URLUtil::splitPath($newName);\n\n if (is_uploaded_file($file['tmp_name'])) {\n $this->server->createFile($uri . '/' . $newName, fopen($file['tmp_name'],'r'));\n }\n break;\n\n }\n\n }\n $this->server->httpResponse->setHeader('Location',$this->server->httpRequest->getUri());\n $this->server->httpResponse->sendStatus(302);\n return false;\n\n }", "title": "" }, { "docid": "b4f949907bdecf51658df010e911f19a", "score": "0.6342411", "text": "public function postSomething() {}", "title": "" }, { "docid": "69191807de6d78732243c82330a49e21", "score": "0.6341929", "text": "function checkPost(){\n if($_SERVER['REQUEST_METHOD'] === 'POST'){\n return true;\n }\n else{\n http_response_code(405);\n exit('Expected POST');\n }\n}", "title": "" }, { "docid": "27dd93bd121d1e4f4c416589ed4407f7", "score": "0.63385534", "text": "public function post(Request $request);", "title": "" }, { "docid": "27dd93bd121d1e4f4c416589ed4407f7", "score": "0.63385534", "text": "public function post(Request $request);", "title": "" }, { "docid": "16ebd75887a9a88734aa92f63bbd4460", "score": "0.63366246", "text": "function write_post()\n{\n}", "title": "" }, { "docid": "15f6397d34ccaa57b2a68cfab58b1890", "score": "0.63358194", "text": "public function Handler() \n {\n \t if(isset($_POST['doAdd'])) \n \t {\n \t \t $this->SaveNewToDatabase(strip_tags($_POST['newEntry']));\n \t }\n \t elseif(isset($_POST['doClear'])) \n \t {\n \t \t $this->DeleteAllFromDatabase();\n \t } \n \t elseif(isset($_POST['doCreate'])) \n \t {\n \t \t $this->CreateTableInDatabase();\n \t } \n \t header('Location: ' . $this->request->CreateUrl('guestbook'));\n }", "title": "" }, { "docid": "14a39cfd027675988b8937b80f481a37", "score": "0.6321046", "text": "function handle_post_request() {\n\t\tif ( empty( $_POST['action'] ) || 'save' != sanitize_key( $_POST['action'] ) ) { // input var okay\n\t\t\treturn;\n\t\t}\n\n\t\tif ( empty( $_POST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( $_POST['_wpnonce'] ), 'afro-save-settings' ) ) { // input var okay\n\t\t\tdie( __( \"Cheatin' eh?\", 'afrozaar-extras' ) );\n\t\t}\n\n\t\t// Make sure $this->settings has been loaded\n\t\t$this->get_settings();\n\n\t\t$post_vars = array( 'access_key_id', 'secret_access_key', 'aws_region', 'new_post_topic', 'updated_post_topic', 'comment_post_topic', 'mojo_site', 'baobab_meta_key' );\n\t\tforeach ( $post_vars as $var ) {\n\t\t\tif ( ! isset( $_POST[ $var ] ) ) { // input var okay\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$value = sanitize_text_field( $_POST[ $var ] ); // input var okay\n\n\t\t\tif ( 'secret_access_key' == $var && '-- HIDDEN --' == $value ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->set_setting( $var, $value );\n\t\t}\n\n\t\t$this->save_settings();\n\t}", "title": "" }, { "docid": "d1623383af79f528d53e72fcc5186785", "score": "0.63175", "text": "function ensurePOST() {\n if ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n ErrorHandler::generic_error(new Error(\"Invalid Request Method. Please use POST.\"));\n }\n}", "title": "" }, { "docid": "dd0e2f0fe96316ee539e8971c0d30662", "score": "0.630868", "text": "protected function post() {\n\t\t$function = array_shift($_GET) . '_post';\n\t\t$this->$function();\n\t}", "title": "" }, { "docid": "6df08f2e7ff548ba3d7b552774cd293f", "score": "0.63021153", "text": "function process_post()\n{\n\tglobal $g_obj_lock;\n\t\n\tif ( isset( $_POST['Command'] ) && $g_obj_lock->page_lock( PageHandler::get_post_value( 'SerialId' ) ) )\n\t{\n\t\t$command = $_POST['Command'];\n\t \n\t\tswitch ( $command )\n\t\t{\n\t\t\tcase 'Cross Highlighted Plants':\n\t\t\t{\n\t\t\t\ton_cross_handler();\n\t\t\t}\t\n\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\tMessageHandler::add_message( MSG_ERROR, \"Unknown Command\" );\n\t\t\t}\n\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "198660eeb9b561803f48aa29de004a87", "score": "0.6298458", "text": "function handlePost()\n {\n return false;\n }", "title": "" }, { "docid": "3e9b6fa38aa74ad50e8a4d98821a879c", "score": "0.629628", "text": "protected function handlePost() {\n\n if(!$this->timer)\n $this->timer = Timer::create([]);\n\n if (isset($_POST[\"title\"]))\n $this->timer->title = $_POST[\"title\"];\n if (isset($_POST[\"timer\"]))\n $this->timer->countdown_end_time = $_POST[\"timer\"];\n\n $this->timer->save();\n\n header(\"Location: admin.php?page=countdown&task=view_timers\");\n }", "title": "" }, { "docid": "171c460adad5b2cda5c24e783c8c089f", "score": "0.62907016", "text": "public function index_post()\n {\n $this->response([\n \"status\" => true,\n \"message\" => \"saved successfully !\"\n ]);\n }", "title": "" }, { "docid": "171c460adad5b2cda5c24e783c8c089f", "score": "0.62907016", "text": "public function index_post()\n {\n $this->response([\n \"status\" => true,\n \"message\" => \"saved successfully !\"\n ]);\n }", "title": "" }, { "docid": "4745d3ed5cb68dd5776e9d3b79b80e0c", "score": "0.6280501", "text": "public function index_post() {\n $method = $_SERVER['REQUEST_METHOD'];\n\t\tif($method != 'POST'){\n\t\t\tjson_encode(400,array('status' => 400,'message' => 'Bad request.'));\n\t\t} else {\n\t\t\t$check_auth_client = $this->mm->check_auth_client();\n\t\t\tif($check_auth_client == true){\n\t\t $response = $this->mm->auth();\n\t\t $respStatus = $response['status'];\n\t\t if($response['status'] == 200){\n $params = json_decode(file_get_contents('php://input'), TRUE);\n $data = [\n 'log_id' => $this->post('log_id'),\n 'akt_tanggal' => $this->post('akt_tanggal'),\n 'nip' => $this->post('nip'),\n 'id_tkerja' => $this->post('id_tkerja'),\n 'akt_idkegiatan'=> $this->post('akt_idkegiatan'),\n 'akt_catatan' => $this->post('akt_catatan'),\n 'akt_output' => $this->post('akt_output'),\n 'akt_start' => $this->post('akt_start'),\n 'akt_end' => $this->post('akt_end'),\n 'akt_kodeja' => $this->post('akt_kodeja'),\n ];\n if ($this->akt->createAktivitas($data) > 0) {\n $this->response([\n 'status' => true,\n 'message' => 'Success !'\n ], 200);\n } else {\n $this->response([\n 'status' => false,\n 'message' => 'Maaf, Data baru gagal dibuat !'\n ], 400);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "43a66978fb70f3ccf20f6ad796fbc3f6", "score": "0.6276736", "text": "public function post(string $path, $handler): void\n {\n $this->map(['POST'], $path, $handler);\n }", "title": "" }, { "docid": "85e265b052e8f83bbeeb4f1cac84306a", "score": "0.6274847", "text": "public function postAddUser()\r\n {\r\n $post = $request->getParsedData();\r\n\r\n dump($post); die;\r\n }", "title": "" }, { "docid": "8fe54b13e1c6a12c2a00f306f79c947b", "score": "0.6264969", "text": "public function post(string $path, $handler): void\n {\n $this->map('POST', $path, $handler);\n }", "title": "" }, { "docid": "f9a0cdb8c8d7f31a79aafde90222f5d5", "score": "0.6259862", "text": "public function post(Request $request){\r\n $this->implementable(__FUNCTION__);\r\n }", "title": "" }, { "docid": "0e9752f8454a68449e351802cd263864", "score": "0.6258289", "text": "public function handle_post($params) {\n\t\t\t$handler = $this->db;\n\t\t\tif($handler->save($params))\n\t\t\t{\n\t\t\t\tself::output_with_success(array(\"status\"=>\"Resource was added\"),201);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tself::output_with_error(400,array(\"error\"=>\"Bad request\"));\n\t\t\t}\n\n }", "title": "" }, { "docid": "391b47b2c310daee91efd30c3633b366", "score": "0.6254728", "text": "protected function post($app)\r\n {\r\n }", "title": "" }, { "docid": "5416bd6c2b954827fa8106d5d8d9a521", "score": "0.625407", "text": "public function post_user(){\n\t\t$returnData = array();\n\t\n\t\treturn $this->response($returnData,200);\n\t}", "title": "" }, { "docid": "2be038d95899dee3c4c439b562b1723d", "score": "0.6245976", "text": "protected function processPost()\n\t{\n\t\t/*\n\t\tid \n i branch_id\n i cost_center\n v10 job_code\n v255 job_description\n i minimum_salary\n i mid_salary\n i max_salary\n ts created_at\n ts updated_at\n\t\t \n\t\t\n\t\t*/\n\t\tvar_dump($_POST);\n\t\texit();\n\t\t\n\t\t/*\n\t\tif (isset($_POST['principal']) && $_POST['principal'] != '')\n\t\t{\n\t\t\t$partner_name = trim($_POST['partner_name']);\n\t\t}else{\n\t\t\t$this->addError('partner_name','partner name is not set');\n\t\t}\n\n\t\t*/\n\t\t//check check \n\t\tif (isset($_POST['action']))\n\t\t{\n\t\t\t$action = $_POST['action'];\n\t\t\tif ( $action == 'insert' )\n\t\t\t{\n\t\t\t\t$data = array(\n\t\t\t\t\t'principal_id' => $this->isOK('principal_id'),\n\t\t\t\t\t'branch_id' => $this->isOK('branch_id'),\n\t\t\t\t\t'cost_id' => $this->isOK('cost_id'),\n\t\t\t\t\t'job_code' => $this->isOK('job_code'),\n\t\t\t\t\t'job_description' => $this->isOK('job_description'),\n\t\t\t\t\t'minimum_salary' => $this->isOK('minimum_salary'),\n\t\t\t\t\t'mid_salary' => $this->isOK('mid_salary'),\n\t\t\t\t\t'max_salary' => $this->isOK('max_salary')\n\t\t\t\t);\n\t\t\t}else if ( $action == 'edit' ){\n\t\t\t\t$data = array(\n\t\t\t\t\t'principal_id' => $this->isOK('e_principal_id'),\n\t\t\t\t\t'branch_id' => $this->isOK('e_branch_id'),\n\t\t\t\t\t'cost_id' => $this->isOK('e_cost_id'),\n\t\t\t\t\t'job_code' => $this->isOK('e_job_code'),\n\t\t\t\t\t'job_description' => $this->isOK('e_job_description'),\n\t\t\t\t\t'minimum_salary' => $this->isOK('e_minimum_salary'),\n\t\t\t\t\t'mid_salary' => $this->isOK('e_mid_salary'),\n\t\t\t\t\t'max_salary' => $this->isOK('e_max_salary')\n\t\t\t\t);\n\t\t\t}else if ( $action == 'delete' ){\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//wrong action, no need further action pun intended\n\t\t\t}\n\t\t}else{\n\t\t\t//wrong action, no need further action pun intended\n\t\t}\n\n\n\t\tif ($this->hasErrors()){\n\t\t\tvar_dump($this->getErrors());\n\t\t\tvar_dump($_POST);\n\t\t\texit();\n\t\t}\n\t\t$job_db = new \\core\\modules\\job\\models\\common\\db;\n\t\t$check = $job_db->insertJobMaster($data);\n\t\tif($check != 1)\n\t\t{\n\t\t\t$msg = 'Problem in insert Job Master with data '.$data;\n\t\t\tthrow new \\RuntimeException($msg);\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "a1b3b7ad8015c1f3af842e1ac80256a6", "score": "0.62426245", "text": "public function postAction() {\n\t\t$this->view->assign(array('error' => 'Unable to process your request'));\n\t}", "title": "" }, { "docid": "c94f6c9da194d8eb93a7212a5007c36f", "score": "0.6241396", "text": "public function index_post() {\n $trailerpalletData = array();\n $json_body = file_get_contents('php://input');\n parse_str($json_body, $trailerpalletData);\n $pallet_num = $trailerpalletData['PalletNum'];\n unset($trailerpalletData['PalletNum']); // TODO - change to proper REST\n\n if(!empty($pallet_num) && !empty($trailerpalletData['TrailerId'])){\n //insert user data\n $update = $this->trailerpallet->update($trailerpalletData, $pallet_num);\n\n //check if the user data inserted\n if($update){\n //set the response and exit\n $this->response([\n 'status' => TRUE,\n 'message' => 'Pallet has been updated successfully.'\n ], REST_Controller::HTTP_OK);\n }else{\n //set the response and exit\n $this->response([\n 'status' => TRUE,\n 'message' => 'Failed to update record, please try again.'\n ], REST_Controller::HTTP_OK);\n }\n }else{\n //set the response and exit\n $this->response([\n 'status' => TRUE,\n 'message' => 'Provide complete Pallet/Trailer information to update.'\n ], REST_Controller::HTTP_OK);\n }\n }", "title": "" }, { "docid": "1a523a840c7ab1c4746ae80e2c05bdf7", "score": "0.6229103", "text": "function post (...$args) {\n return $this->execute(\"POST\", ...$args);\n }", "title": "" }, { "docid": "bbcb4abd876754e15db2872a7a65e5fc", "score": "0.6228233", "text": "public function handleAdminPost(){\n \t/* handle _POST */\n\t\t if(isset($_POST['action'])){\n\t\t \tswitch($_POST['action']){\n\t\t \t\tcase 'editUser':\n\t\t \t\t\t$this->executeEditUser();\n\t\t \t\t\tbreak;\n\t\t \t\tcase 'upload':\n\t\t \t\t\t$this->executeNewProfileImage();\n\t\t \t\t\tbreak;\n\t\t \t\tcase 'newUser':\n\t\t \t\t\t$this->executeNewUser();\n\t\t \t\t\tbreak;\n\t\t \t\tdefault:\n\t\t \t\t\tbreak;\n\t\t \t}\n\t\t }\n }", "title": "" }, { "docid": "e857d40ec89ff08b8ae14e5c8b65e0b0", "score": "0.62200326", "text": "public function postAction()\n {\n // TODO: Implement postAction() method.\n }", "title": "" }, { "docid": "14302a709507fd828b97cb92443de90b", "score": "0.62174976", "text": "public function post($uri, $handler)\n\t{\n\t\t$this->router->addRoute($uri, $handler, ['POST']);\n\t}", "title": "" }, { "docid": "09060a636585c4c43891fd3c155e8590", "score": "0.6214379", "text": "protected function _parse_post()\n {\n $this->_post_args = $_POST;\n\n if ($this->request->format) {\n $this->request->body = $this->input->raw_input_stream;\n }\n }", "title": "" }, { "docid": "962e9bbc97ca68e4581abcf81007070d", "score": "0.62142193", "text": "protected function _postPost() {\n header('Location: ' . $_SERVER['REQUEST_URI'] . '&done');\n\t}", "title": "" }, { "docid": "96af114b5f44c6b9894b3f1151272b39", "score": "0.6211423", "text": "function post () {\n if( isset( $_POST ) ) {\n $_POST = json_decode(file_get_contents(\"php://input\"),true);\n return (object) $_POST;\n }\n return \"\";\n}", "title": "" }, { "docid": "65d818e6d1955f73ad6f4613b8538129", "score": "0.61994994", "text": "abstract public function post($route, $callback);", "title": "" }, { "docid": "15b2fbd5977cc0cfd80f78c814be5b50", "score": "0.61888176", "text": "function handlePost()\n {\n // CSRF protection\n\n $token = $this->trimmed('token');\n if (!$token || $token != common_session_token()) {\n $this->showForm(_('There was a problem with your session token. '.\n 'Try again, please.'));\n return;\n }\n }", "title": "" }, { "docid": "1eb6c45e2336f14585af5cfcbc2e9e93", "score": "0.61807567", "text": "abstract protected function handleRequest();", "title": "" }, { "docid": "b2ea4a8e9412fe1af222e4e141c8ccf9", "score": "0.6179484", "text": "public function processRequest();", "title": "" }, { "docid": "b2ea4a8e9412fe1af222e4e141c8ccf9", "score": "0.6179484", "text": "public function processRequest();", "title": "" }, { "docid": "700ff1becdd2b36129b256277904f27a", "score": "0.6164276", "text": "public function process()\n {\n \t$client = $this->client->getClient();\n\n \ttry {\n $response = $client->post($this->buildUrl(), [\n 'form_params' => $this->getParams()\n ]);\n return new ResponseJson((string)$response->getBody(), true);\n } catch (RequestException $e) {\n return new ResponseJson((string)$e->getResponse()->getBody(), false);\n }\n }", "title": "" }, { "docid": "b83420ef94a149f004063022a32cf006", "score": "0.61546266", "text": "public function handleDataSubmission() {\n\n if ( is_user_logged_in() && get_the_ID() == $this->registerPage ) {\n $this->doRedirect( get_page_link( $this->dashboardPage ) );\n }\n\n\t\tif ( isset( $_REQUEST['action'] ) ) {\n\t\t\tswitch ( $_REQUEST['action'] ) {\n\t\t\t\tcase 'update-profile':\n\t\t\t\t\t$this->updateProfile();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'register':\n\t\t\t\t\t$this->register();\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'forgot':\n\n\t\t\t\t\t// Only run if post\n\t\t\t\t\tif ( $this->is( 'post' ) ) {\n\t\t\t\t\t\t$this->forgotPassword();\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'reset':\n\n\t\t\t\t\t// Check password reset key is valid\n\t\t\t\t\t$this->validatePasswordKey();\n\n\t\t\t\t\tif ( $this->is( 'post' ) ) {\n\t\t\t\t\t\t$this->resetPassword();\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
d3c5acb2c38e7fe5f8e20de738faf10a
return an array of C2Events your class does not want to listen for. implemented functions for these events will never be called
[ { "docid": "05c552d1a47d5f3725c4a7ef12f90bb7", "score": "0.7026614", "text": "function GetExcludedEvents();", "title": "" } ]
[ { "docid": "293aca358821c110e56579ed852c9dd3", "score": "0.705732", "text": "function getEvents() {\n return [];\n }", "title": "" }, { "docid": "e942880516e7c44310b172faef383d9e", "score": "0.705151", "text": "protected static function allowedEvents()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "3cec38af29dd4e75091971ec86196d5e", "score": "0.69662386", "text": "public function getOtherEvents();", "title": "" }, { "docid": "cf61cc9d3b4fd1e3278c863f7fe676b5", "score": "0.681152", "text": "public function getCancellationEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.6718431", "text": "public function getEvents();", "title": "" }, { "docid": "cf15ee9e5537c792a5ca4641c950cf69", "score": "0.6718431", "text": "public function getEvents();", "title": "" }, { "docid": "5adf03d1d62b15e02af44effcfcffba6", "score": "0.65646994", "text": "public static function getEvents(): array\n {\n return is_array(static::$events) ? static::$events : [static::$events];\n }", "title": "" }, { "docid": "6703213a8fafa1c9f4e0a7241f6c448e", "score": "0.6533121", "text": "public function getValidEvents()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "d4bfe13c74485d724452c9f7f31b0f70", "score": "0.64961576", "text": "public function events_empty(){\n\n // Empty the internal events array\n $this->events = array();\n\n // Return the resulting array\n return $this->events;\n\n }", "title": "" }, { "docid": "7fb7049269af2cbbf3a63a20ddc78b22", "score": "0.64755875", "text": "public static function getSubscribedEvents() {\n return [];\n }", "title": "" }, { "docid": "4c63f298311627c2a894a4249dd712c8", "score": "0.6398311", "text": "public static function get_subscribed_events() {\r\n\t\t$current_theme = wp_get_theme();\r\n\r\n\t\tif ( 'Bridge' !== $current_theme->get( 'Name' ) ) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\treturn [\r\n\t\t\t'rocket_lazyload_background_images' => 'disable_lazyload_background_images',\r\n\t\t\t'update_option_qode_options_proya' => [ 'maybe_clear_cache', 10, 2 ],\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "0194e5f659aa27984792c11d8f091838", "score": "0.6363481", "text": "public static function __events () {\n \n }", "title": "" }, { "docid": "2cc08b3643f4f957756d3345d768d589", "score": "0.62975496", "text": "public function getListeners(): array;", "title": "" }, { "docid": "f4fc24f7f9ad332f4afd3f3ff0de300b", "score": "0.6286158", "text": "public function getPendingEvents(): array;", "title": "" }, { "docid": "0d976537305ae6ffb823109bd47bd017", "score": "0.62216157", "text": "final public function allowsEvents() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ac397c2aef153d275afda9a4c7b3eedd", "score": "0.62132585", "text": "public static function get_subscribed_events() {\r\n\t\treturn [\r\n\t\t\t'rocket_buffer' => [\r\n\t\t\t\t[ 'extract_ie_conditionals', 1 ],\r\n\t\t\t\t[ 'inject_ie_conditionals', 34 ],\r\n\t\t\t],\r\n\t\t];\r\n\t}", "title": "" }, { "docid": "dfdab8d1cc88aac23a2c015e723e2bbb", "score": "0.6113992", "text": "abstract function HookEvents();", "title": "" }, { "docid": "575f1d767704f3deb20944ddd3d245a1", "score": "0.6085669", "text": "public static function events();", "title": "" }, { "docid": "2ac2d208844c1ee7b21b06377abb2311", "score": "0.6064711", "text": "public function getSubscribedEvents();", "title": "" }, { "docid": "7ee2d1d16ca654d958a1ff18c2af0efe", "score": "0.6062799", "text": "protected function getEvents ():CRUDEvents{\n\t\treturn new CRUDEvents($this);\n\t}", "title": "" }, { "docid": "d835cd9f85b3dc247c87efc39145c653", "score": "0.6060566", "text": "public static function getSubscribedEvents();", "title": "" }, { "docid": "d835cd9f85b3dc247c87efc39145c653", "score": "0.6060566", "text": "public static function getSubscribedEvents();", "title": "" }, { "docid": "b61354b7abe3e1bbcf02f4c9e9843676", "score": "0.6049585", "text": "function getAllEvents() {\n\n $this->events = $this->getEvents();\n //If plugin adds new events for an already defined type\n Plugin::doHook('item_get_events', $this);\n\n return $this->events;\n }", "title": "" }, { "docid": "b27bb5952b336b73b4c1d4142599ea97", "score": "0.60166556", "text": "public static function getSubscribedEvents()\n {\n return array(\n KernelEvents::REQUEST => array('onKernelRequest', 9999),\n KernelEvents::RESPONSE => array('onKernelResponse', 9999),\n //KernelEvents::EXCEPTION => 'onKernelException'\n );\n }", "title": "" }, { "docid": "391d857bc5797044dc6e02cbb799bdde", "score": "0.6007306", "text": "public function getEvents() { return $this->_events; }", "title": "" }, { "docid": "c0d5f653047fcaea13ecaa0a9dfef922", "score": "0.59670824", "text": "protected function getRegisteredEvents() {\n// $events = [];\n// foreach ($this->loadMultiple() as $rules_config) {\n// $event = $rules_config->getEvent();\n// if ($event && !isset($events[$event])) {\n// $events[$event] = $event;\n// }\n// }\n// return $events;\n }", "title": "" }, { "docid": "34336aefb91d5d7347925cf7d4265e1d", "score": "0.59595853", "text": "public function getUncommittedEvents();", "title": "" }, { "docid": "8af71bb2bbed53ffef908be3c74bbf5a", "score": "0.59411", "text": "public function getAvailableEvents()\r\n\t{\r\n\t\t$courierSettings = craft()->plugins->getPlugin('courier')->getSettings();\r\n\t\t$availableEvents = [];\r\n\t\tforeach ($courierSettings->availableEvents as $eventOption) {\r\n\t\t\tif ($eventOption['enabled']) {\r\n\t\t\t\t$availableEvents[$eventOption['event']] = $eventOption['event'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $availableEvents;\r\n\t}", "title": "" }, { "docid": "141bcba02321c3902683471e4609db50", "score": "0.5926001", "text": "public function getTriggeringEvents();", "title": "" }, { "docid": "fb120532c72c26a1d6602b8ad921caca", "score": "0.5924069", "text": "function get_new_events_no_page(){\n\t\n\t\tglobal $gamo, $dbh;\n\t\n\t\t$error_append = \" CLASS[\".__CLASS__.\"] METHOD[\".__METHOD__.\"] DATE[\".date('Y-m-d H:i:s').\"]\";\n\n\t\n\t\t$sql = \"SELECT id FROM \" . CORE_DB . \".\" . self::$table_name.\n\t\t\" WHERE active = 1 and hide = 0 ORDER BY date_time ASC\";\n\t\n\t\t$sth = $dbh->prepare($sql);\n\t\n\t\t$vevents = array();\n\t\t$sth->execute();\n\n\n\t\twhile($row = $sth->fetch()) {\n\t\n\t\t\t$row = Core::r('virtual_events')->get_event(array(\n\t\t\t\t\t'id' => $row['id'],\n\t\t\t\t\t'public_has' => 1,\n\t\t\t\t\t'show_private_has' => 0\n\t\t\t\t)\n\t\t\t);\n\n\n\t\t\tarray_push($vevents, $row);\n\t\n\t\t}\n\t\n\t\treturn $vevents;\n\t\n\t}", "title": "" }, { "docid": "2c33a3aa4fa13b379bdf14a00acdb8e9", "score": "0.5910792", "text": "public static function getSubscribedEvents(): array\n\t{\n\t\t// Only subscribe events if the component is installed and enabled\n\t\tif (!ComponentHelper::isEnabled('com_ars'))\n\t\t{\n\t\t\treturn [];\n\t\t}\n\n\t\treturn [\n\t\t\t'onContentPrepare' => 'onContentPrepare',\n\t\t];\n\t}", "title": "" }, { "docid": "253e7a268b7cfde817c3054ca97b2d5b", "score": "0.59082884", "text": "public static function getSubscribedEvents(): array\n {\n return [KernelEvents::EXCEPTION => ['onException', 20]];\n }", "title": "" }, { "docid": "1ff4664a77bdff32b02915d36ff28c0b", "score": "0.58991385", "text": "public static function getSubscribedEvents()\n {\n return [\n Events::COUPON_ADDED => ['resetDealPurchasables', 1],\n Events::COUPON_REMOVED => ['resetDealPurchasables', 1]\n ];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "0ac66d4a4c2292693d431cbf6be4f117", "score": "0.5893049", "text": "public function broadcastOn()\n {\n return [];\n }", "title": "" }, { "docid": "1a5d92acfc176affe69c0ffa42c9e4bc", "score": "0.58893824", "text": "public static function getApplicableListener(): array;", "title": "" }, { "docid": "5b368190c281f13fd3386837ebecea2d", "score": "0.58834064", "text": "public function getCompatibleEvents()\n {\n return array(\n TaskModel::EVENT_MOVE_COLUMN,\n );\n }", "title": "" }, { "docid": "ee0d1ed3efce07652045fdd2766f78ca", "score": "0.5879221", "text": "public function implementedEvents() {\n\t\treturn parent::implementedEvents() + [\n\t\t\t'Visualisation.onCheck' => array('callable' => 'onCheck', 'passParams' => true)\n\t\t];\n\t}", "title": "" }, { "docid": "917779db9042b3c645dba50c485d3f45", "score": "0.58748096", "text": "public static function getListeners() : array\n {\n return Event::$listeners;\n }", "title": "" }, { "docid": "ba1ba204afbcb9dd0e59abd098b68822", "score": "0.58678037", "text": "public function getEvents() : array\n {\n $events = [];\n\n for ($i = 1; $i <= 2; $i++) {\n for ($j = 1; $j <= 4; $j++) {\n for ($k = 1; $k <= 10; $k++) {\n $events []= new Event('install', $i, $j);\n\n if ($k < 3 || $j == 2)\n $events []= new Event('purchase', $i, $j);\n }\n }\n }\n\n return $events;\n }", "title": "" }, { "docid": "1de27166e61c7bbc18632251b43e9f5e", "score": "0.58667827", "text": "public static function getSubscribedEvents(): array\n {\n return [\n KernelEvents::REQUEST => ['onKernelRequest', 110],\n KernelEvents::RESPONSE => ['onKernelResponse', 10],\n ];\n }", "title": "" }, { "docid": "f6f64616c6a538bdbe424ce15dbab744", "score": "0.5856782", "text": "public function getSystemEvents()\n {\n return $this->systemEvents;\n }", "title": "" }, { "docid": "a24dd36a3bad56b7b3b2cbef2955e91b", "score": "0.5838254", "text": "public function getEvents()\n\t{\n\t\treturn $this->events;\n\t}", "title": "" }, { "docid": "072bc7c3edd6bd87db979421876642b3", "score": "0.58361095", "text": "public static function getSubscribedEvents()\n {\n return [\n // PluginEvents::INIT => ['init', PHP_INT_MAX]\n ];\n }", "title": "" }, { "docid": "f54640676c0cf304aafcd4b43623697c", "score": "0.58304155", "text": "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "title": "" }, { "docid": "beaa9bbfbff385da21c66b5c3123ce80", "score": "0.580971", "text": "protected function getAttributeEvents()\n {\n $events = [];\n foreach($this->dispatchesEvents as $event => $class) {\n if(strpos($event, ':') !== false) {\n $events[$event] = $class;\n }\n }\n return $events;\n }", "title": "" }, { "docid": "f8341f6ba24db8d8abf30d57330ec87b", "score": "0.580231", "text": "public function broadcastOn()\n {\n\n return [];\n }", "title": "" }, { "docid": "24ce28b507ec1225c0ed2309ecd98128", "score": "0.58012676", "text": "public function implementedEvents() {\n\t\treturn array(\n\t\t\t'Rachet.WampServer.construct' => 'construct',\n\t\t\t'RachetStatistics.WebsocketServer.getUptime' => 'getUptime',\n\t\t);\n\t}", "title": "" }, { "docid": "d8b32b9cf55f371df53ff1a4a2eb4fa6", "score": "0.5797976", "text": "public function implementedEvents(): array\n {\n $eventMap = [\n 'Model.beforeMarshal' => 'beforeMarshal',\n 'Model.beforeFind' => 'beforeFind',\n 'Model.beforeSave' => 'beforeSave',\n 'Model.afterSave' => 'afterSave',\n 'Model.afterSaveCommit' => 'afterSaveCommit',\n 'Model.beforeDelete' => 'beforeDelete',\n 'Model.afterDelete' => 'afterDelete',\n 'Model.afterDeleteCommit' => 'afterDeleteCommit',\n 'Model.beforeRules' => 'beforeRules',\n 'Model.afterRules' => 'afterRules',\n ];\n $events = [];\n\n foreach ($eventMap as $event => $method) {\n if (!method_exists($this, $method)) {\n continue;\n }\n $events[$event] = $method;\n }\n\n return $events;\n }", "title": "" }, { "docid": "176d0ec5cb176346b02b31484e9e13e5", "score": "0.57727915", "text": "public static function getSubscribedEvents()\n {\n return array(\n AvisotaMessageEvents::POST_RENDER_MESSAGE_CONTENT => array(\n array('injectGA', -500),\n ),\n\n GetOperationButtonEvent::NAME => array(\n array('prepareButton'),\n ),\n\n BuildDataDefinitionEvent::NAME => array(\n array('injectGALegend'),\n ),\n );\n }", "title": "" }, { "docid": "548a6ea94a6e42e4b7546b5e0c7dec9e", "score": "0.5759744", "text": "public static function getSubscribedEvents()\n {\n return array(\n Constants::OMNIPAY_REQUEST_BEFORE_SEND => array('onOmnipayRequestBeforeSend', self::PRIORITY),\n Constants::OMNIPAY_RESPONSE_SUCCESS => array('onOmnipayResponseSuccess', self::PRIORITY),\n Constants::OMNIPAY_REQUEST_ERROR => array('onOmnipayRequestError', self::PRIORITY),\n );\n }", "title": "" }, { "docid": "3bc3b53fcc76f30567ad103e2505f8d4", "score": "0.5752076", "text": "public function getCompatibleEvents()\r\n {\r\n return array(\r\n TaskModel::EVENT_DAILY_CRONJOB,\r\n );\r\n }", "title": "" }, { "docid": "7f98572c93e61ce6a5a7d221e101c95b", "score": "0.5749952", "text": "protected static function allowedEvents()\n\t{\n\t\treturn array(\n\t\t\t\t\t\t'onclick',\n\t\t\t\t\t\t'ondblclick',\n\t\t\t\t\t\t'onmousedown',\n\t\t\t\t\t\t'onmouseup',\n\t\t\t\t\t\t'onmouseover',\n\t\t\t\t\t\t'onmousemove',\n\t\t\t\t\t\t'onmouseout',\n\t\t\t\t\t\t'onkeypress',\n\t\t\t\t\t\t'onkeydown',\n\t\t\t\t\t\t'onkeyup'\n\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "59703bcf2b250bca8db7153f8ae85b9e", "score": "0.57443637", "text": "public function getEvents()\n {\n return $this->_events;\n }", "title": "" }, { "docid": "9081803731987c9396ca05bc2c70193c", "score": "0.5741051", "text": "private function registered_events () {\n\n\t\t$triggers = array();\n\n\t\tforeach( get_option( 'nce_triggers' ) as $trigger => $enabled ) {\n\n\t\t\tif( $enabled == \"1\" ) {\n\n\t\t\t\t$triggers[] = $trigger;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $triggers;\n\n\t}", "title": "" }, { "docid": "74cad495e36a2ef3d31add25c292ca15", "score": "0.5732597", "text": "public function getCallbacks(): array;", "title": "" }, { "docid": "a0c973739282f9afd6423f2e8d065bbb", "score": "0.5724481", "text": "public static function getSubscribedEvents()\n {\n return array(\n DefaultEvents::default_pre_index => 'onCustomListener',\n DefaultEvents::default_pre_index => 'onCustomListener',\n OtherEvents::other_pre_index => 'onCustomListener',\n OtherEvents::other_pox_index => 'onCustomListener'\n );\n }", "title": "" }, { "docid": "ac522674f4f5532a0fb80f56a2874223", "score": "0.5723793", "text": "public function getSubscribedEvents(): array\n {\n return [\n Events::postLoad,\n Events::onFlush,\n Events::postFlush,\n ];\n }", "title": "" }, { "docid": "99933d60b55336b589237aa65723a4a5", "score": "0.57189596", "text": "public function shouldDiscoverEvents(): bool\n {\n return false;\n }", "title": "" }, { "docid": "2e779a8ef2b9c979ad328aeb4a3936f0", "score": "0.5714142", "text": "public static function offAll()\n {\n self::$_events = [];\n self::$_eventWildcards = [];\n }", "title": "" }, { "docid": "9ef01e890037752e194aae2d5a0063bb", "score": "0.5713575", "text": "private static function EventList ()\n {\n return array (\n \"a\" => array (),\n \"button\" => array (\n \"onblur\", \"onclick\", \"ondblclick\",\n \"onfocus\", \"onmousedown\", \"onmousemove\",\n \"onmouseout\", \"onmouseover\", \"onmouseup\",\n \"onkeydown\", \"onkeypress\", \"onkeyup\",\n ),\n );\n }", "title": "" }, { "docid": "095ac35113a29b29533a494c5f892c6f", "score": "0.57119215", "text": "public static function codeceptionEvents()\n {\n if (null === static::$compiledCodeceptionEvents) {\n static::$compiledCodeceptionEvents = array_filter(array_map(static function ($const) {\n return defined($const) ? constant($const) : null;\n }, static::$allCodeceptionEvents));\n }\n\n return static::$compiledCodeceptionEvents;\n }", "title": "" }, { "docid": "a5dea773dc66612777c2c07247d9d0b9", "score": "0.5705323", "text": "public function implementedEvents() {\n\t\treturn array(\n\t\t\t'RachetStatistics.WebsocketServer.getMemoryUsage' => 'getMemoryUsage',\n\t\t);\n\t}", "title": "" }, { "docid": "2e7b84d6b77e615299bc8d7fff8d584f", "score": "0.57033473", "text": "public static function disableEvents($disableEvents){\n\t\tself::$_disableEvents = $disableEvents;\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "e360db39abccd05ea5bf3c796f1c05f3", "score": "0.0", "text": "public function index()\n {\n $interns = Intern::All();\n\n return response()->json([\n 'state' => 'success',\n 'description' => $interns\n ]);\n }", "title": "" } ]
[ { "docid": "a8219f7511c208b206421d7070626481", "score": "0.76236707", "text": "public function index() {\r\n $this->listing();\r\n }", "title": "" }, { "docid": "3119bf4433b0eb6e1e5f5d3aefff8f7c", "score": "0.74976325", "text": "public function listAction()\n {\n header('Content-Type: application/json');\n echo json_encode(self::list($this->table, $_GET, $_GET), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "0af0bed2cb54202b9b5f635b805dd270", "score": "0.7456269", "text": "public function index() {\n $this->list();\n }", "title": "" }, { "docid": "fc22d7eb65a1457db19e4e0a158758ae", "score": "0.7440038", "text": "public function indexAction()\n {\n // fetch list with pagination\n $data = $this->service->fetchList($this->getRequest()->getQuery(), [\n 'baseUri' => $this->getBaseUri()\n ]);\n\n // Title for the resource list\n $data['title'] = sprintf('%s List', $this->getResourceTitle());\n $data['pagination'] = $this->getPaginationControl($data['paginator']);\n\n return new ViewModel($data);\n }", "title": "" }, { "docid": "2626767a2d50900ecf067648343b72f2", "score": "0.7381333", "text": "public function index()\n {\n if ($this->perPage) {\n $items = $this->model->paginate($this->perPage);\n } else {\n $items = $this->model->all();\n }\n\n return $this->getViewByAction('index')->with([str_plural($this->resourceName) => $items]);\n }", "title": "" }, { "docid": "91b29c734dd33fa6ab5758c46e47554b", "score": "0.73258376", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n $optin = $this->Request()->getParam('optin', 2);\n $result = $this->resource->getList($offset, $limit, $filter, $sort, $optin);\n $this->View()->assign(['success' => true, 'data' => $result]);\n }", "title": "" }, { "docid": "042ad4983b357357fa2fc3e7b732ee82", "score": "0.72482914", "text": "public function index()\n\t{\n\t\t$resources = $this->resource->all();\n\n\t\treturn View::make('backend.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "1169ce14cfc5668f5eea745b36a1f890", "score": "0.721445", "text": "public function index()\n {\n $recipeLists = RecipeList::paginate(5);\n return RecipeListResource::collection($recipeLists);\n }", "title": "" }, { "docid": "035f6de7d67b67c8aac107864bb88b5b", "score": "0.71630436", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Feast:list.html.twig');\n }", "title": "" }, { "docid": "fc107b824969a23c68c0c5f2741cd1c6", "score": "0.71610266", "text": "public function index()\n {\n $perPage = request()->get('perPage') ?? 45;\n $with = request()->get('with') ?? [];\n $sanitized = request()->except(['perPage', 'with']);\n return $this->resource::collection($this->repository->list($sanitized, $with, $perPage));\n }", "title": "" }, { "docid": "187ec101935a79ed032959ef1b75d4ae", "score": "0.7118817", "text": "public function actionList()\n {\n \n return $this->render('_list');\n }", "title": "" }, { "docid": "1f35abb1b2dfde3d664df626615da04d", "score": "0.7097277", "text": "public function index()\n {\n //\n return view('admin.resources.index')->with('resources', Resource::all());\n }", "title": "" }, { "docid": "d29399034be7f5e56ab0c5ec77f7aa5a", "score": "0.6957485", "text": "public function listAction()\n {\n $repository = $this->getDoctrine()\n ->getRepository('MyRecipesDosBundle:Recipe');\n \n $recipe = $repository->findAll();\n return $this->render('MyRecipesDosBundle:Recipe:list.html.twig', array('recipes' => $recipe));\n }", "title": "" }, { "docid": "7c5436fac4c77ee77f00987408854421", "score": "0.6907326", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_book->get_all();\n\t\t$this->template->set('title', 'Book List');\n\t\t$this->template->load('template', 'contents', 'book/book_list', $data);\n\t}", "title": "" }, { "docid": "2be70a4426b327e1d03c05eabde9d81b", "score": "0.6904068", "text": "public function index()\n {\n $this->getLists($this->table);\n }", "title": "" }, { "docid": "99d0096711c4ac4c16aec6ead9d6f9cb", "score": "0.69036937", "text": "public function index()\n {\n // Get Entries\n $entries = Entry::paginate(15);\n\n // Return Collection of entries as a resource\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "a3d61b5afcf1642fed8df944d4b81b6f", "score": "0.68887955", "text": "public function listAction()\n {\n return $this->render(\n 'BingoBundle:Page:clicks.html.twig',\n array(\n 'name' => 'FreakXoHBingo',\n 'version' => Kernel::VERSION,\n )\n );\n }", "title": "" }, { "docid": "561046d6e9e022bfc2781d4da04f6f0e", "score": "0.68827784", "text": "public function listAction() {\n\t\treturn $this->render('::base.html.twig');\n\t}", "title": "" }, { "docid": "95f382e4dda4333116a338434b4adcb7", "score": "0.6859838", "text": "public function index()\n {\n return view('resources.index', ['resources' => Resource::orderBy('title')->get()]);\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.6857927", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "374f77abe39cc273e93ae71403c0135d", "score": "0.68395513", "text": "public function index()\n {\n $user = Auth::user();\n $taskLists = TaskList::where('user_id', $user->id)->orderBy('title')->paginate(100);\n return TaskListResource::collection($taskLists);\n }", "title": "" }, { "docid": "a3720146415f23c943668d82d74b6ddc", "score": "0.6833012", "text": "public function indexAction() {\n\t\t$this->initInstance();\n\t\t//récupère les ressources disponibles\n\t\t//http://localhost/omeka-s/api/item_sets?resource_class_label=MediaResource\n\t}", "title": "" }, { "docid": "9051fd38b8c975ac149dd081631df266", "score": "0.68245953", "text": "public function index()\n {\n return $this->fetch('lst');\n }", "title": "" }, { "docid": "6348b646e527696af99b800ca8365e10", "score": "0.68105257", "text": "public function show()\n {\n //\n return BasicResource::collection(Basic::all());\n }", "title": "" }, { "docid": "ab587658e56065a3311a7edf4c3c2213", "score": "0.6784784", "text": "public function index()\n {\n return CollectionResource::collection(Collection::paginate(100));\n }", "title": "" }, { "docid": "9bbc51747f3455267943436dda172ca2", "score": "0.6783519", "text": "public function index()\n {\n $data['resource'] = Resource::all();\n return view('admin.resource.index',$data);\n }", "title": "" }, { "docid": "1ec8c70afa71a91f40bcd16f4d0c6776", "score": "0.67766154", "text": "public function list()\n {\n $datas = $this->model->getBooks(null, $this->level);\n $this->createView($this->_tab . DS . 'list', $datas);\n $this->view->page_title = 'BIBLIOGRAPHIE';\n \n $this->view->render($datas);\n }", "title": "" }, { "docid": "efb2c483c24911e6f2a3d9046c1ef1ef", "score": "0.67576295", "text": "public function listAction()\n {\n $list = $this->listFactory->createList($this->dataBackend, $this->configurationBuilder);\n\n if ($list->count() == 0) {\n $this->addFlashMessage(\\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate('general.emptyList', 'PtExtlist'), '', \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::INFO);\n }\n\n $this->view->assign('config', $this->configurationBuilder);\n $this->view->assign('listHeader', $list->getListHeader());\n $this->view->assign('listCaptions', $list->getRenderedListHeader());\n $this->view->assign('listData', $list->getRenderedListData());\n $this->view->assign('aggregateRows', $list->getRenderedAggregateListData());\n\n $this->view->assign('exportIdentifiers', $this->exportIdentifiers);\n\n if ($this->filterbox) {\n $this->view->assign('filterBoxCollection', $this->filterboxCollection);\n $this->view->assign('filterbox', $this->filterbox);\n }\n\n if ($this->pagerIdentifier) {\n $this->view->assign('pagerCollection', $this->pagerCollection);\n $this->view->assign('pager', $this->pagerCollection->getPagerByIdentifier($this->pagerIdentifier));\n }\n }", "title": "" }, { "docid": "1fe41c52dd75a6340ba0e7415a6acc25", "score": "0.67415196", "text": "public function index()\n {\n return TodoResource::collection(Todo::paginate(10));\n }", "title": "" }, { "docid": "43f39595a775a167f28377481ffc4a07", "score": "0.673642", "text": "public function index()\n {\n $list = $this->repo->allPaged();\n\n if ( ! $list)\n {\n return $this->respondNotFound('Unable to fetch the selected resource');\n }\n\n $resource = new Fractal\\Resource\\Collection($list->getCollection(), new $this->transformerClass);\n $resource->setPaginator(new Fractal\\Pagination\\IlluminatePaginatorAdapter($list));\n\n return $this->fractal->createData($resource)->toArray();\n// return $this->response->collection($list, new $this->transformerClass);\n }", "title": "" }, { "docid": "f58dba1d10587784466e2956148410a7", "score": "0.6732629", "text": "public function index()\n {\n return RapportResource::collection(Rapport::paginate());\n }", "title": "" }, { "docid": "d267abfc43200f6a283a55648822e91b", "score": "0.6730257", "text": "public function index()\n\t{\n\t\t$this->listar();\t\n\t}", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "59aa91737bf5b1a4cfdace1c9bec4b48", "score": "0.6722742", "text": "public function index()\n {\n $cars = Car::paginate(25);\n\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "2de5d92ccf694ea64c2b87a4044bdfed", "score": "0.671587", "text": "public function index()\n {\n $resources = Resource::all();\n return view('Resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "d6fb6897e87bd5dae4bbc01d2557f9de", "score": "0.6715235", "text": "public function index()\n {\n return $this->getList();\n }", "title": "" }, { "docid": "26f3b9a4c8b215d418e8d18a1ba08064", "score": "0.67125565", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new ProfessorAluno();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "3005a7694daa66d5411575d09a01fd3c", "score": "0.6711127", "text": "public function indexAction()\r\n\t{\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\r\n\t\t$this->_view->countActive = $this->_model->countItems($this->_arrParam, ['task' => 'count-active']);\r\n\t\t$this->_view->countInactive = $this->_model->countItems($this->_arrParam, ['task' => 'count-inactive']);\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "a061f90100fcefc770084243e89cb657", "score": "0.67049634", "text": "public function index()\n {\n\t\t\treturn RentalResource::collection(Rental::with()->paginate(25));\n }", "title": "" }, { "docid": "ce69134742a988b497785376ad59ad49", "score": "0.6700845", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->permission_model->get_all();\n\t\t$this->template->set('title', 'Permission List');\n\t\t$this->template->admin('template', 'list', $data);\n\t}", "title": "" }, { "docid": "e20bfea5cc73d4e9dc13d2e0589cf474", "score": "0.6689846", "text": "public function index()\n {\n // Get hospitals -- paginate\n $hospitals = Hospital::paginate(20);\n\n // Return collection of hospitals as a resource\n return HospitalResource::collection($hospitals);\n }", "title": "" }, { "docid": "b33ee86168eb0ade086aca85bd07f060", "score": "0.66757935", "text": "public function list()\n {\n $CRUDList = $this->crudHandler->list();\n\n return $this->handleResult($CRUDList);\n }", "title": "" }, { "docid": "c4f993dfe3f1f7bd25662bc6f177e545", "score": "0.66563594", "text": "public function index()\n {\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "a9152291e72de561c907f0d16b4dd8e9", "score": "0.6654788", "text": "public function indexAction()\n {\n // Get the entity we are making the list of\n $this->entity = $this->params()->fromRoute('entity');\n if (!isset($this->entity))\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Get information about the entity to display to view\n if (empty($info = $this->entity_table[$this->entity]))\n {\n return false;\n }\n\n // Change the view strategy if it is set to use a different one\n if (!empty($info['view_strategy']))\n {\n $view_strategy_class = $info['view_strategy'];\n if (!class_exists($view_strategy_class))\n {\n throw new \\Exception(\"The view strategy class being used to render this page cannot be found.\");\n }\n\n $view_strategy = new $view_strategy_class;\n if (!($view_strategy instanceof IViewStrategy))\n {\n throw new \\Exception(\"The view strategy being used must implement the IViewStrategy interface.\");\n }\n\n $this->setViewStrategy($view_strategy);\n }\n\n // Render the list using the strategy given\n $view_results = $this->view_strategy->render($this);\n if (false === $view_results)\n {\n return $this->getResponse()->setStatusCode(404);\n }\n\n // Attach javascript\n $this->getServiceLocator()->get('ViewRenderer')->headScript()->appendFile('/js/backend/list.js');\n\n return $view_results;\n }", "title": "" }, { "docid": "2193e1e8cdcf85402ba6929069f31734", "score": "0.6635656", "text": "public function index()\n {\n // Get assetModels\n $assetModels = AssetModel::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of assetModels as a resource\n return AssetModelResource::collection($assetModels);\n }", "title": "" }, { "docid": "ea55c90db1e5317add55946b5021b00c", "score": "0.6629907", "text": "public function index()\n {\n //get students\n $students = student::all();\n\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "0da8ac4a2988814b2e9c07b535204492", "score": "0.6628081", "text": "public function index()\n {\n $cars = Car::all();\n return CarResource::collection($cars);\n }", "title": "" }, { "docid": "5722fce7447cf2831c8c8b4f00a1c30e", "score": "0.66276073", "text": "public function index()\n {\n $entries = Entry::all();\n\n return EntryResource::collection($entries);\n }", "title": "" }, { "docid": "bfcfe58010865f047fee4363102ac43d", "score": "0.66167", "text": "public function index()\n {\n //\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "6df1194a3c23fe8044d8a812c5bc1c7a", "score": "0.6610945", "text": "public function index()\n {\n $students = Student::all();\n\n return ResourcesStudent::collection($students);\n }", "title": "" }, { "docid": "daaefee9c34d3101903bfac8a955fb09", "score": "0.66073436", "text": "public function _index()\n {\n // The get_entries function in the\n // entries Streams API drivers grabs\n // entries from a stream.\n // The only really required parameters are\n // stream and namespace.\n\n $params = array(\n 'stream' => 'service',\n 'namespace' => 'service',\n 'paginate' => 'yes',\n 'page_segment' => 3\n );\n\n $this->data->service = $this->streams->entries->get_entries($params);\n \n // Build the page\n $this->template->title($this->module_details['name'])\n ->build('admin/index', $this->data);\n }", "title": "" }, { "docid": "8f2f77c8b6e53012c03b4a96f9c83b40", "score": "0.6598037", "text": "public function showAction()\n {\n $this->forward('list');\n }", "title": "" }, { "docid": "de31ab079d9e333a0d8dac4edd6e4827", "score": "0.6597582", "text": "public function index(Request $request, $resource = null)\n {\n $resource = $this->getResource($resource);\n $cards = $resource->renderCards($request);\n\n $resources = $resource->paginator($request)\n ->getCollection()\n ->mapInto($resource)\n ->map->indexFields($request);\n\n $paginationLinks = $resource->getPaginationLinks($request);\n $modelId = null;\n\n return view('orm.listado',\n compact('resource', 'cards', 'resources', 'paginationLinks', 'modelId')\n );\n }", "title": "" }, { "docid": "987ab94de2b0e9b4db0aa8318acfa28e", "score": "0.6596193", "text": "public function actionIndex() {\n\n\t\t// Setup page title and first breadcrumb\n\t\t$this->view->title = yii::t( 'radtools', '{object} Overview', [\n\t\t\t'object' => $this->model_name,\n\t\t] );\n\t\t$this->addBreadCrumbs( [ $this->view->title ] );\n\n\t\t// Setup data feed\n\t\t$searchModel = new $this->searchModelClass();\n\t\t$dataProvider = $this->indexDataProvider( $searchModel );\n\n\t\t$this->beforeCrudValidation(\n\t\t\t$this->action->id,\n\t\t\t$this->model\n\t\t);\n\n\t\treturn $this->render( 'index', $this->indexRenderData( $searchModel, $dataProvider ) );\n\t}", "title": "" }, { "docid": "11f2bcdc890680ff98f96dec711093ed", "score": "0.6585215", "text": "public function index()\n {\n // Look for overriden views\n $this->overrideViews();\n\n // Get models to show\n $results = $this->makeIndexQuery()->paginate($this->perPage());\n\n // Render the view using the `listing` builder\n $listing = Listing::createFromController($this, $results);\n if ($this->parent) {\n $listing->parent($this->parent);\n\n // The layout header may have a many to many autocomplete\n $this->layout->with($this->autocompleteViewVars());\n }\n\n // Render view\n return $this->populateView($listing);\n }", "title": "" }, { "docid": "e5485fb94e84d7f1a64ec7a4f239f625", "score": "0.6583983", "text": "public function list()\n\t{\n\t\tif(!$this->user->loggedIn())\n\t\t{\n\t\t\t$this->addHTTPStatusCode('401');\n\t\t\t$this->addMessage('danger', 'You are not logged in. Please log in.');\n\t\t\t$this->addTpl('messages');\n\n\t\t\t$this->runHTML();\n\t\t}\n\n\t\t$arrivals = new arrivalModel($this->db);\n\n\t\t# Load GET variables\n\t\t$type_id \t= ! empty($this->params[0]) ? $this->params[0] : false;\n\t\t$name \t\t= ! empty($this->params[1]) ? $this->params[1] : false;\n\n\t\t$data['arrivals'] \t\t\t= $arrivals->getArrivals($type_id, $name);\n\t\t$data['arrival_statistics'] = $arrivals->getArrivalStatistics($type_id, $name);\n\n\t\tif(empty($data['arrivals']))\n\t\t{\n\t\t\t$this->addMessage('danger', 'There are no search results available.');\n\t\t}\n\n\t\t$this->addTpl('messages');\n\t\t$this->addView('search-results');\n\n\t\t$this->runHTML($data);\n\t}", "title": "" }, { "docid": "a3e1dd116a18a3fe10d66cbd4874818b", "score": "0.65685564", "text": "public function index()\n {\n $taskList = Task::with\n (\n [\n 'taskVersionInfo',\n 'userTaskAssignee',\n 'user',\n 'taskVersionInfo',\n 'taskVersionInfo.projectInfo'\n ]\n )->get();\n if(!empty($taskList)){\n return $this->sendSuccessResponse(200,TaskListResource::collection($taskList));\n } else {\n return $this->sendCustomMessage(404,'Sorry! No record found');\n }\n }", "title": "" }, { "docid": "578a96f128221bf5bcf98a2a211cadf8", "score": "0.65538025", "text": "public function listAction()\n {\n if ($this->checkApi->checkKey()) {\n return new JsonResponse($this->checkApi->checkKey());\n }\n\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('BookBundle:Book')->findBy([], ['readIt' => 'DESC']);\n\n return $this->sucessfullResponse($books);\n }", "title": "" }, { "docid": "faa4b62fb90476f0f5cc5f9d659baab7", "score": "0.6550044", "text": "public function index()\n {\n $this->list = $this->role->select();\n $this->display();\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65397066", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "df222e53d0f8cd5226717538186f640b", "score": "0.6537331", "text": "public function index()\n {\n return RepresentativeResource::collection($this->representativeRepository->list());\n }", "title": "" }, { "docid": "1265756e79b7627e4f5013af9b86193c", "score": "0.65358984", "text": "public function index()\n {\n $cards = Card::latest()->get();\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "b2667c25fd50ab1551a340a8fc91baf0", "score": "0.65343034", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\t\t\n\t\t$param = $this->getInput(array('id', 'category_id', 'title', 'phone', 'status', 'user_id'));\n\t\t\n\t\t$search = array();\n\t\tif ($param['user_id']) $search['user_id'] = $param['user_id'];\n\t\tif ($param['category_id']) $search['category_id'] = $param['category_id'];\n\t\tif ($param['title']) $search['title'] = array('LIKE', $param['title']);\n\t\tif ($param['status']) $search['status'] = $param['status'];\n\t\tif ($param['phone']) $search['phone'] = $param['phone'];\n\t\t\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $jobs) = Ola_Service_Job::getList($page, $perpage, $search, array('sort'=>'DESC', 'id'=>'DESC'));\n\t\tlist(, $categorys) = Ola_Service_Category::getList(1, 100);\n\t\t\n\t\t$this->assign('jobs', $jobs);\n\t\t$this->assign('categorys', Common::resetKey($categorys, 'id'));\n\t\t$this->assign('status', $this->status);\n\t\t$this->assign('param', $param);\n\t\t\n\t\t$this->cookieParams();\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($param) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('total', $total);\n\t}", "title": "" }, { "docid": "fe378ccbbcf7c936d31c946fb0a1abe1", "score": "0.6515067", "text": "public static function index()\r\n {\r\n $pagination = array(\r\n 'page' => 1,\r\n 'show' => 20\r\n );\r\n\r\n if (isset($_GET['page'])) {\r\n $pagination['page'] = intval($_GET['page']);\r\n }\r\n if (isset($_GET['show'])) {\r\n $pagination['show'] = intval($_GET['show']);\r\n }\r\n\r\n $params = array(\r\n 'controller_list' => array(),\r\n 'app_list' => array()\r\n );\r\n $settings = array(\r\n 'controller_list' => array(),\r\n 'app_list' => array(\r\n 'index' => 'id',\r\n 'flat' => true\r\n )\r\n );\r\n\r\n $params['controller_list'] = array_merge($params['controller_list'], $pagination);\r\n\r\n $list_controller = api::query('controller/list', $params['controller_list'], $settings['controller_list']);\r\n $list_app = api::query('app/list', $params['app_list'], $settings['app_list']);\r\n\r\n view::load('controller/index', array(\r\n 'list' => $list_controller,\r\n 'list_app' => $list_app\r\n ));\r\n }", "title": "" }, { "docid": "5a83f2442eb3f462ff43689e90b37f4f", "score": "0.65103835", "text": "public function index()\n {\n $perfil = Perfil::paginate(10);\n return PerfilResource::collection($perfil);\n }", "title": "" }, { "docid": "09c0cdc32d290582c28c25cdde95a5d3", "score": "0.65102404", "text": "public function index()\n {\n $model = D('Shop');\n $list = $model->search(I());\n $this->assign(array(\n 'list' => $list,\n 'page' => $model->getPage()\n ));\n $this->display();\n }", "title": "" }, { "docid": "985830e6ee02598e997add9d706d5174", "score": "0.65037256", "text": "private function index() {\n $this->showPropertyList();\n }", "title": "" }, { "docid": "adc0929400b9ac560a34d7c75ca9432b", "score": "0.6500579", "text": "public function index()\n {\n //returns list of all todos\n return response(TodoResource::collection(Todo::all(),200));\n }", "title": "" }, { "docid": "702e474e3ad456bc6e922fd8cfae7ff3", "score": "0.6497448", "text": "public function index()\n {\n return TodolistResource::collection($request->user()->todolists);\n }", "title": "" }, { "docid": "157540995e279e1c89b30e8f20197d5d", "score": "0.64969057", "text": "public function index()\n {\n // Get some users\n $users = User::paginate(1);\n\n // Return collection of users as a resource\n return UserResource::collection($users);\n }", "title": "" }, { "docid": "7c3ea8e36693455e99cc4db69f0a7d10", "score": "0.64932173", "text": "public function indexAction ()\n {\n $this->_pageTitle = ['Hardware Library', 'Manufacturers'];\n // Display all of the manufacturers\n $mapper = ManufacturerMapper::getInstance();\n $paginator = new Zend_Paginator(new My_Paginator_MapperAdapter($mapper));\n\n // Set the current page we're on\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Set how many items to show\n $paginator->setItemCountPerPage(100);\n\n // Pass the view the paginator\n $this->view->paginator = $paginator;\n $this->view->canEdit = $this->view->IsAllowed(ProposalgenAclModel::RESOURCE_PROPOSALGEN_ADMIN_SAVEANDAPPROVE, AppAclModel::PRIVILEGE_ADMIN);\n }", "title": "" }, { "docid": "7da1d53b99713be47f9b9e48be3777c8", "score": "0.649269", "text": "public function index()\n {\n return SummaryResource::collection(Summary::latest()->paginate(16));\n }", "title": "" }, { "docid": "9c8446bdda246c4d668c853fcd5f4072", "score": "0.649241", "text": "public function actionList()\n { \n $model = new Tag();\n $params = \\Yii::$app->request->getBodyParams();\n $dataProvider = $model->searchList($params);\n\n return $this->renderList('list', [\n 'model' => $model,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "3c6cae22c627d1ece2035bcbd89096b4", "score": "0.6485393", "text": "public function indexAction()\n {\n $listing = $this->createListing(new TokenOptions($this->getDoctrine()->getEntityManager()));\n\n return array(\n 'listing' => $listing\n );\n }", "title": "" }, { "docid": "bf8285b7ef2df61a00673a171e608d25", "score": "0.6477109", "text": "public function index()\n {\n return $this->showAll(Libro::all());\n }", "title": "" }, { "docid": "f691e682eec0d2b53a65e9e0d6e040f5", "score": "0.6469914", "text": "public function index()\n {\n $listings = Listing::orderBy('created_at', 'desc')->paginate(5);\n\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "9255fd66973761a2e3741769b5ec9434", "score": "0.64697826", "text": "public function index()\n {\n $listings = Listing::orderBy('created_at', 'desc')->get();\n return view('listings')->with('listings', $listings);\n }", "title": "" }, { "docid": "34ada56858882a77b2fb954f2f9ca76c", "score": "0.6465993", "text": "public function index()\n {\n $list = $this->surl->all();\n return view('surl::list', compact('list'));\n }", "title": "" }, { "docid": "c839caf8071b295e2edd8ff7dae1d275", "score": "0.64640033", "text": "public function overviewAction()\n\t{\n\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_News_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "2d1d93e01feb274bbc89ed5d265eb12e", "score": "0.6463779", "text": "public function index()\n {\n $listings = Listing::latest()->paginate(5);\n return view('frontend.listings.index',compact('listings'));\n }", "title": "" }, { "docid": "15d0c11efdda27cd3d3db89cdd68dc5e", "score": "0.6463192", "text": "public function index()\n {\n $lists = ListModel::paginate();\n\n return response()->json([\n 'lists' => $lists,\n ],200);\n }", "title": "" }, { "docid": "d3bdd3e6d0c926fc9a4a00e01d03f377", "score": "0.64611477", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $links) = Gou_Service_Links::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('links', $links);\r\n\t\t$this->assign('types', $this->link_type);\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "7772c381ff4b5a7b8e508efe879c68e0", "score": "0.64556235", "text": "public function index()\n {\n return BookResource::collection($this->bookRepo->get());\n }", "title": "" }, { "docid": "2f4d4a0caa725d66f7ce8489ee1f24d9", "score": "0.6455147", "text": "public function index (): AnonymousResourceCollection {\n return RecipeResource::collection(Recipe::paginate(25));\n }", "title": "" }, { "docid": "4592b6588dd629125090dcc48a6bcc63", "score": "0.6452056", "text": "public function index()\n {\n $labels = Label::paginate(10);\n\n return LabelResource::collection($labels);\n }", "title": "" }, { "docid": "71dbc6c395500f777fbf4ca2d2f41ee2", "score": "0.6447849", "text": "public function index()\n {\n $this->list->setText(trans('mconsole::gallery.form.title'), 'title')\n ->setText(trans('mconsole::gallery.form.slug'), 'slug')\n ->setSelect(trans('mconsole::settings.options.enabled'), 'enabled', [\n '1' => trans('mconsole::settings.options.on'),\n '0' => trans('mconsole::settings.options.off'),\n ], true);\n \n return $this->list->setQuery($this->repository->index())->setAddAction('gallery/create')->render(function ($item) {\n return [\n trans('mconsole::tables.id') => $item->id,\n trans('mconsole::gallery.table.updated') => $item->updated_at->format('m.d.Y'),\n trans('mconsole::gallery.table.slug') => $item->slug,\n trans('mconsole::gallery.table.title') => $item->title,\n ];\n });\n }", "title": "" }, { "docid": "6611f31e08d219eb38ba36cc62c071e1", "score": "0.6447639", "text": "public function index()\n {\n $Entreprises = Entreprise::paginate(15);\n\n \n return EntrepriseResource::collection($Entreprises);\n }", "title": "" }, { "docid": "b8ef0597ffab483dc42bf522e376a0f9", "score": "0.64469534", "text": "public function index()\n {\n return $this->showAll(Libreria::all());\n }", "title": "" }, { "docid": "131082979c43e5665d6efcb3e04fa7ec", "score": "0.6443054", "text": "public function index()\n {\n // get hotels\n $hotels = Hotels::orderBy('created_at','desc')->paginate(50);\n // returnn collection of hotels as a resource\n return HotelResource::collection($hotels);\n }", "title": "" }, { "docid": "f787cf0275f5c622f8f691b59884e61b", "score": "0.64424", "text": "public function resources(){\n\t\n\t\tif($this->secureCheck()){\n\t\t\treturn;\n\t\t}\n\t\n\t\t$sortEntry = 'id';\n\t\tif ($this->request->isParameterNotEmpty ( 'actionid' )) {\n\t\t\t$sortEntry = $this->request->getParameter ( \"actionid\" );\n\t\t}\n\t\n\t\t$modelResources = new SyResource();\n\t\t$resourcesArray = $modelResources->resourcesInfo($sortEntry);\n\t\n\t\t$navBar = $this->navBar();\n\t\t$this->generateView ( array (\n\t\t\t\t'navBar' => $navBar, 'resourcesArray' => $resourcesArray\n\t\t) );\n\t\n\t}", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.64421135", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.64421135", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b0fb738cbb82acd366e1a8234e16b18a", "score": "0.6437053", "text": "public function listAction() {\n\t\t$this->view->setVariablesToRender(array('ideas'));\n\n\t\t$ideas = $this->ideaRepository->findAll();\n\t\t$this->view->assign('ideas', $ideas);\n\t}", "title": "" }, { "docid": "12275dd16579b5f5bbc0fd01c4c0372b", "score": "0.6435585", "text": "public function index()\n {\n $users = $this->paginate($this->Users);\n\n $this->set(compact('users'));\n }", "title": "" }, { "docid": "5395605a12301b3a21ad602afe2ffc04", "score": "0.6432393", "text": "public function index()\n\t{\n\t\treturn View::make('Ucionica.index')\n\t\t->with('list', $this->_list());\n\t}", "title": "" }, { "docid": "17ab781471a36ee728b0e79e5f76d380", "score": "0.64322966", "text": "public function lists() {\r\n\t\t$args = array();\r\n\t\t$args['method'] = 'lists';\r\n\r\n\t\treturn $this->callServer( $args );\r\n\t}", "title": "" }, { "docid": "3bc1ba2777d39aa58a5ff9ee7b0585e8", "score": "0.64308184", "text": "public function index()\n {\n $articles = Article::paginate(5);\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "c0ac87b1ec946c408fda431b615e8496", "score": "0.64249504", "text": "public function indexAction()\n {\n /**\n * Adding new Listing\n * IE hack to process image buttons\n */\n if($this -> _request -> getParam('add_listing')\n && !$this -> _request -> getParam('ListingValidated')\n && !$this -> _request -> getParam('ListingAdded'))\n $this -> _forward('ValidateListing');\n\n else\n {\n /** If Listing submition is validated with errors */\n if($this -> _request -> getParam('ListingValidated'))\n {\n $Err = new Zend_Config_Xml(ROOT . 'configs/error_messages/messages.xml', 'errors');\n /** Preparing warning block */\n $this -> smarty -> assign('WarnTitle', $Err -> error_block_title);\n $this -> smarty -> assign('WarnMessages', $this -> _request -> getParam('Errors'));\n $errBlock = $this -> smarty -> fetch('warningBlock.tpl');\n \n $this -> smarty -> assign('warningBlock', $errBlock);\n }\n \n $this -> smarty -> assign('PageBody', 'area/listings.tpl');\n /** Use Calendar js lib */\n $this -> smarty -> assign('UseCalendar', true);\n /** Use Interface js lib */\n $this -> smarty -> assign('UseInterface', true);\n\n $listings = $this -> Listings -> getListingsByUserId($this -> AreaControl -> getUserData() -> id) -> toArray();\n $this -> smarty -> assign('Listings', array_reverse($listings));\n \n $this -> smarty -> assign('CategoryList', $this -> Options -> getCategoryList());\n $this -> smarty -> assign('IndustryList', $this -> Options -> getIndustiresList());\n $this -> smarty -> assign('ListingType', $this -> Options -> getListingTypesList());\n \n $this -> smarty -> assign('EducationLevel', $this -> Options -> getDegreeEducationList());\n $this -> smarty -> assign('Experience', $this -> Options -> getExperienceList());\n $this -> smarty -> assign('Salary', $this -> Options -> getSalaryList());\n \n $this -> smarty -> assign('ProfileType', $this -> AreaControl -> getUserData() -> acc_type);\n\n $this -> smarty -> assign('Title', 'Listings');\n\n $this -> smarty -> display('layouts/main.tpl');\n }\n }", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.6420493", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" }, { "docid": "2e42503d55824f0e5ba1fe3b836c57d4", "score": "0.6420493", "text": "public function indexAction()\n {\n $this->_forward('list');\n }", "title": "" } ]
db1cd7af999bbc68b4fd39665073871d
/ Tests adding/updating a paste to the database.
[ { "docid": "911b0a24a93cec6a80e2d3e2fc39b3c1", "score": "0.60398924", "text": "public function addPasteTest(&$data, &$do_create)\n\t{\n\t}", "title": "" } ]
[ { "docid": "75e0196994386d71f822791540394cc3", "score": "0.6859332", "text": "public function edit(Paste $paste)\n {\n //\n }", "title": "" }, { "docid": "69245bd5e70459cc4976bfaced2df7f7", "score": "0.6307482", "text": "function pasteRecord($pasteCmd, $source, $destination)\t{\n\n\t\t\t// Split the source definition into parts:\n\t\tlist($sourceStr,$check,$isLocal,$currentPageId) = explode('/',$source);\n\n\t\t$destinationPointer = $this->templavoilaAPIObj->flexform_getPointerFromString ($destination);\n\t\tif ($sourceStr)\t{\n\t\t\t$sourcePointer = $this->templavoilaAPIObj->flexform_getPointerFromString ($sourceStr);\n\n\t\t\tswitch ($pasteCmd) {\n\t\t\t\tcase 'copy' :\t\t$this->templavoilaAPIObj->copyElement ($sourcePointer, $destinationPointer); break;\n\t\t\t\tcase 'copyref':\t\t$this->templavoilaAPIObj->copyElement ($sourcePointer, $destinationPointer, FALSE); break;\n\t\t\t\tcase 'localcopy':\t$this->templavoilaAPIObj->copyElement ($sourcePointer, $sourcePointer);\n\t\t\t\t\t\t\t\t\t$this->templavoilaAPIObj->unlinkElement ($sourcePointer); break;\n\t\t\t\tcase 'cut':\t\t\t$this->templavoilaAPIObj->moveElement ($sourcePointer, $destinationPointer); break;\n\t\t\t\tcase 'ref':\t\t\t$this->templavoilaAPIObj->referenceElement ($sourcePointer, $destinationPointer); break;\n\t\t\t\tcase 'unlink':\t\t$this->templavoilaAPIObj->unlinkElement ($sourcePointer); break;\n\t\t\t\tcase 'delete':\t\t$this->templavoilaAPIObj->deleteElement ($sourcePointer); break;\n\t\t\t}\n\n\n\t\t} elseif($check && $pasteCmd=='ref') {\t\t// Insert a reference to a content element from \"outside\" - for example from the clipboard of non-used elements:\n\n\t\t\tlist($table,$uid) = explode(':', $check);\n\t\t\t$this->templavoilaAPIObj->referenceElementByUid ($uid, $destinationPointer);\n\t\t}\n\t}", "title": "" }, { "docid": "09fc196911da75491897d635d45cff02", "score": "0.62579983", "text": "public function update(Request $request, Paste $paste)\n {\n //\n }", "title": "" }, { "docid": "50ee56befe669189d2da66582c833be0", "score": "0.59931314", "text": "public function addPaste($data)\n\t{\n\t\t// Fetch any data we need to know.\n\t\tif (!empty($data['paste_id']))\n\t\t\t$paste = $this->fetchPaste($data['paste_id']);\n\n\t\t// Try to keep the key correct unless it should change.\n\t\tif ((pBS::get('private') && empty($paste['key'])) || (!empty($paste['key']) && userInfo::_()->is_admin && isset($_POST['force_new_pw'])))\n\t\t\t$data['key'] = $this->generateKey();\n\t\telseif (!empty($paste['key']))\n\t\t\t$data['key'] = $paste['key'];\n\n\t\tif (function_exists('wp_magic_quotes'))\n\t\t{\n\t\t\t$data['body'] = stripslashes($data['body']);\n\t\t}\n\n\t\t// Options needed for our post.\n\t\t$topicOptions = array(\n\t\t\t'id'\t\t=> (!empty($paste['id']) ? $paste['id'] : 0) ,\n\t\t\t'board'\t\t=> pBS::get('smf_paste_board'),\n\t\t\t'mark_as_read'\t=> false,\n\t\t\t);\n\t\t$posterOptions = array(\n\t\t\t'id'\t\t=> (isset(userInfo::_()->id) ? userInfo::_()->id: 0),\n\t\t\t'name'\t\t=> $data['name'],\n\t\t\t'email'\t\t=> $data['email'],\n\t\t\t'ip'\t\t=> userInfo::_()->ip,\n\t\t\t'update_post_count'\t=> (pBS::get('smf_increase_postcout') && isset(userInfo::_()->id) ? 1 : 0),\n\t\t\t);\n\t\t$msgOptions = array(\n\t\t\t'id'\t\t=> 0,\n\t\t\t'subject'\t=> 'Paste-' . time() . ':v:use_geshi-' . (!empty($data['use_geshi']) ? 1 : 0) . ':v:type-' . (!empty($data['language']) ? $data['language'] : 'php') . (!empty($data['key']) ? ':v:p-' . $data['key'] : ''),\n\t\t\t'body'\t\t=> htmlspecialchars($data['body']),\n\t\t\t'approved'\t=> pBS::get('smf_post_approval') ? 0 : 1,\n\t\t\t);\n\n\t\t// Actually create the paste.\n\t\tcreatePost($msgOptions, $topicOptions, $posterOptions);\n\n\t\t// Return some info\n\t\treturn array(\n\t\t\t'id' => $topicOptions['id'],\n\t\t\t'key' => isset($data['key']) ? $data['key'] : '',\n\t\t\t'updated' => $data['id'] ? true : false,\n\t\t);\n\t}", "title": "" }, { "docid": "276b6c9e53fdcdd51c6db2158809baf8", "score": "0.59263885", "text": "public function testEditBooksSuccess()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/books/'.$this->book->id.'/edit')\n ->resize(900,1000)\n ->assertSee('Edit Book')\n ->type('title',$this->book->title)\n ->press('Update')\n ->assertSee('Edit book success!')\n ->assertPathIs('/admin/books');\n });\n $this->assertDatabaseHas('books', [\n 'title' => $this->book->title]);\n }", "title": "" }, { "docid": "abeeaa5c0eff02da2bba7f156404394f", "score": "0.5883923", "text": "public function paste( \\PHPaster\\Paste $paste )\n {\n $data = $this->extractPasteData( $paste );\n\n $res = $this->httpClient->post(\n self::URL,\n $data\n );\n\n return $res;\n }", "title": "" }, { "docid": "559f00e6d655de2ede33fded15b3956c", "score": "0.5827357", "text": "public function test_insert()\n {\n // create an object of the model class\n $movie = new Movie(); // must declare namespace for class Movie(). Look up ^^\n\n // modify it's properties\n $movie->title = 'Searching for Sugarman';\n $movie->year = 2012;\n $movie->plot = 'Documentary following the life and music of American folk-rock musician Rodriguez.';\n\n $movie->title = 'Looking for Alibrandi';\n $movie->year = 2001;\n $movie->plot = 'Young second generation Italian girl goes about her life.';\n\n $movie->title = 'Jaws';\n $movie->year = 1994;\n $movie->plot = 'Giant shark!';\n\n // save the object (commented out so that when accessed, movies are not added over and over and over again :) )\n // $movie->save();\n\n // inform the user\n return 'Movie was saved!';\n }", "title": "" }, { "docid": "67a00cd3478ec90922138e6c71834f61", "score": "0.57447", "text": "function testEditBookmark()\n\t{\n\t\tedit_bookmark($this->bookmark_id,4,\"nnnnn\",\"www.xyz.com\");\n\t\t// Test the forum was actually created\n\t\t$this->assertTrue('nnnnn'==$GLOBALS['SITE_DB']->query_value('bookmarks','b_title ',array('id'=>$this->bookmark_id)));\n\t}", "title": "" }, { "docid": "1151199e2b6e27ce1b910820bae47083", "score": "0.5739362", "text": "public function testBookInsert()\n {\n // There is no book\n $books = $this->app['model']->getBooks();\n $this->assertEquals(1, count($books));\n\n // Inserting one\n $this->app['model']->insertBook('Test', 'Someone', 'A test book', 'image', 3);\n\n // There is one book\n $books = $this->app['model']->getBooks();\n $this->assertEquals(1, count($books));\n\n // TODO: Vérifier que 3 exemplaires ont été créés\n $nbExemp = $this->app['model']->getNbreExemplaires($books.id);\n $this->assertEquals(3, count($nbExemp));\n }", "title": "" }, { "docid": "077bc868c980b79bce002cd6bbaffeb1", "score": "0.5570356", "text": "public function test_save_instructional_text() {\n global $DB;\n $instruct = \"<p>Please complete this activity.</p><ul><li>Put</li><li>the words</li><li>in order</li></ul>\";\n $save_data = array(\n 'instruction' => $instruct\n );\n $this->_cut->save(45, $save_data, $this->_now+1);\n $expected = array_combine($this->_columns, $this->_data);\n $expected['instruction'] = $instruct;\n $expected['timemodified'] = $this->_now+1;\n $record = $DB->get_record('dragdrop', array('id' => 45));\n $this->assertEquals($expected, (array) $record);\n }", "title": "" }, { "docid": "84869df0cf2644a65652eeec68f395ad", "score": "0.54845786", "text": "function paste()\n\t{\n\t\tif ( $this->call(\"Browser.Paste\")==\"true\" )\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "2758ef6ea39f0f25bb48b3bcd3170e9f", "score": "0.5414151", "text": "function test_update_existing() {\n\t\t$address = new address();\n\t\t$address->name = \"TEST ADDRESS\";\n\n\t\t\n\t\t$address->save();\n\t\t$id = $address->id;\n\t\t$address = new address($id);\n\t\t\n\t\t$address->name = \"TEST ADDRESSESS\";\n\t\t$address->line1 = \"123 N Place\";\n\t\t$address->line2 = \"Apt 7\";\n\t\t$address->city = \"Townsvilles\";\n\t\t$address->state = \"KY\";\n\t\t$address->zip = \"77777\";\n\t\t$address->country = \"United States\";\n\t\t$address->phone_number = \"(555) 555-5555\";\n\t\t$address->instructions = \"Shipping Instructions for bob's house\";\n\t\t\n\t\t$address->save();\n\t\t$address = new address($id);\n\t\t\n\t\t$this->assertEquals($address->name, \"TEST ADDRESSESS\");\n\t\t$this->assertEquals($address->line1, \"123 N Place\");\n\t\t$this->assertEquals($address->line2, \"Apt 7\");\n\t\t$this->assertEquals($address->city, \"Townsvilles\");\n\t\t$this->assertEquals($address->state, \"KY\");\n\t\t$this->assertEquals($address->zip, \"77777\");\n\t\t$this->assertEquals($address->country, \"United States\");\n\t\t$this->assertEquals($address->phone_number, \"5555555555\");\n\t\t$this->assertEquals($address->instructions, \"Shipping Instructions for bob's house\");\n\t}", "title": "" }, { "docid": "4e8d8804d25eea5ff0aca2efdb6496b3", "score": "0.5390414", "text": "public function test_save_hint_text() {\n global $DB;\n $hint = \"<p>Try putting the words.</p><ul><li>in</li><li>the right</li><li>order</li></ul>\";\n $save_data = array(\n 'hint' => $hint\n );\n $this->_cut->save(45, $save_data, $this->_now+1);\n $expected = array_combine($this->_columns, $this->_data);\n $expected['hint'] = $hint;\n $expected['timemodified'] = $this->_now+1;\n $record = $DB->get_record('dragdrop', array('id' => 45));\n $this->assertEquals($expected, (array) $record);\n }", "title": "" }, { "docid": "243225c9a877946af71f19c91e5a0175", "score": "0.53639376", "text": "public function test_save_feedback_correct() {\n global $DB;\n $feedback = \"<p>Well done on completing the exercise.</p><ul><li>You</li><li>put</li><li>the words</li><li>in order</li></ul>\";\n $save_data = array(\n 'feedback_correct' => $feedback\n );\n $this->_cut->save(45, $save_data, $this->_now+1);\n $expected = array_combine($this->_columns, $this->_data);\n $expected['feedback_correct'] = $feedback;\n $expected['timemodified'] = $this->_now+1;\n $record = $DB->get_record('dragdrop', array('id' => 45));\n $this->assertEquals($expected, (array) $record);\n }", "title": "" }, { "docid": "077f32b73451f67779e97bc94b48ef54", "score": "0.53475624", "text": "public function testInsertValidTweet() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tweet\");\n\n\t\t// create a new Tweet and insert to into mySQL\n\t\t$tweet = new Tweet(null, $this->profile->getProfileId(), $this->VALID_TWEETCONTENT, $this->VALID_TWEETDATE);\n\t\t$tweet->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoTweet = Tweet::getTweetByTweetId($this->getPDO(), $tweet->getTweetId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tweet\"));\n\t\t$this->assertEquals($pdoTweet->getProfileId(), $this->profile->getProfileId());\n\t\t$this->assertEquals($pdoTweet->getTweetContent(), $this->VALID_TWEETCONTENT);\n\t\t$this->assertEquals($pdoTweet->getTweetDate(), $this->VALID_TWEETDATE);\n\t}", "title": "" }, { "docid": "031c7ea1ec4bb6518a226501d54b0663", "score": "0.5345646", "text": "public function show(Paste $paste)\n {\n //\n }", "title": "" }, { "docid": "efae314c7c9a733464ce1857d31bb66e", "score": "0.5332991", "text": "public function test_save_feedback_incorrect_update_existing() {\n global $DB;\n $feedback1 = \"<p>That was a terrible first attempt.</p><ul><li>You</li><li>should</li><li>put</li><li>the words</li><li>in order</li></ul>\";\n $feedback2 = \"<p>That was a terrible second attempt.</p><ul><li>You</li><li>should</li><li>put</li><li>the words</li><li>in order</li></ul>\";\n $f_columns = array('id', 'dragdropid', 'feedback', 'attempt', 'timemodified', 'timecreated');\n $f_data = array(\n array(1, 45, $feedback1, 1, $this->_now, $this->_now),\n array(2, 45, $feedback2, 2, $this->_now, $this->_now)\n );\n array_unshift($f_data, $f_columns);\n $this->loadDataSet($this->createArrayDataSet(array(\n 'dragdrop_feedback' => $f_data\n )));\n $feedback_new = \"<p>Maybe I was a little harsh</p>\";\n $save_data = array(\n 'feedback' => (object) array(\n 'attempt' => 2,\n 'html' => $feedback_new\n )\n );\n $this->_cut->save(45, $save_data, $this->_now+3);\n $records = $DB->get_records('dragdrop_feedback', array('dragdropid' => 45));\n $this->assertEquals(2, count($records));\n $record = current($records);\n $this->assertEquals(1, $record->attempt);\n $this->assertEquals($feedback1, $record->feedback);\n $this->assertEquals(45, $record->dragdropid);\n $this->assertEquals($this->_now, $record->timecreated);\n $this->assertEquals($this->_now, $record->timemodified);\n\n $record = next($records);\n $this->assertEquals(2, $record->attempt);\n $this->assertEquals($feedback_new, $record->feedback);\n $this->assertEquals(45, $record->dragdropid);\n $this->assertEquals($this->_now, $record->timecreated);\n $this->assertEquals($this->_now+3, $record->timemodified);\n }", "title": "" }, { "docid": "4fe35de590a35652f17c044c7ba492e6", "score": "0.5298935", "text": "public function testInsertAssignment()\r\n {\r\n $this->testLogin2Example();\r\n $this->visit('/assignment_insert')\r\n ->type('Integers Come In All Sizes', 'title')\r\n ->type('details of the assignments', 'editor')\r\n ->type('29 7 27', 'input')\r\n ->type('4710194409608608369201743232 ', 'output')\r\n ->press('Submit');\r\n }", "title": "" }, { "docid": "8c0cae07e385204d182382d99d006a23", "score": "0.52816373", "text": "public function testArtistInsert()\n {\n $table = 'artists';\n $artist = factory(Artist::class)->create();\n\n $this->assertDatabaseHas($table, $artist->toArray());\n }", "title": "" }, { "docid": "c51caee38e0847ab9dc2398087961e76", "score": "0.5273971", "text": "public function testInsertExisting()\r\n\t{\r\n\t\t// Load schema\r\n\t\t$schema = Schema::model()->findByPk('schematest2');\r\n\r\n\t\t// Call insert instead of update -> Exception should be thrown.\r\n\t\t$schema->insert();\r\n\t}", "title": "" }, { "docid": "5784fc71ddff7946b6f22c4060f68da1", "score": "0.5267172", "text": "public function testSave() {\n\t}", "title": "" }, { "docid": "a3b2f92035840a9242d4688bd4d30964", "score": "0.5249612", "text": "public function test_board_create()\n {\n $response = $this->actingAs($this->user)->post(route('admin.board.store'), [\n 'name' => 'Test Board',\n 'table_name' => 'test',\n 'item_count_per_page' => 10,\n 'category' => 'AAA|BBB|CCC',\n ]);\n\n $board = Board::orderByDesc('id')->first();\n\n $response->assertRedirect(route('admin.board.show', $board->id));\n $this->assertTrue(Schema::hasTable(env('BOARD_TABLE_PREFIX').$board->tableName));\n }", "title": "" }, { "docid": "4e1673d3d58d7e20acc1cfc5ddfa0590", "score": "0.5248607", "text": "public function testCRUD()\n {\n // Get Project Id and Sprint name from database.\n $projectId = DB::table('projects')->first()->id;\n $sprintId = DB::table('project_versions')->first()->id;\n $categoryId = DB::table('categories')->first()->id;\n\n // $description as a data for test\n $description1 = \"Description for first test 1 \". time();\n $description2 = \"Description for first test 2 \". time();\n $description3 = \"Description for first test - update function\". time();\n\n $this->createAndContinue($projectId, $sprintId, $categoryId, $description1)\n ->read($projectId, $description1)\n ->createAndSave($projectId, $sprintId, $categoryId, $description2)\n ->read($projectId, $description2)\n ->update($projectId, $description2, $description3)\n ->destroy($projectId);\n// ->dontSee($description3);\n }", "title": "" }, { "docid": "daa5e630201c600a6007be539f406dc9", "score": "0.524336", "text": "public function testAdminPostEdit()\n {\n $user = factory(User::class, 'admin')->create();\n $page = factory(Post::class, 'page')->create();\n $user->posts()->save($page);\n\n $this->actingAs($user)\n ->visit(route('admin.pages.edit', ['pages' => $page->id]))\n ->type('This is a good page 2', 'name')\n ->type('This is a good page 2', 'slug')\n ->type('This is the page body 2', 'content')\n ->press('Save');\n\n $this->seeInDatabase('posts', [\n 'name' => 'This is a good page 2',\n 'slug' => str_slug('This is a good page 2'),\n ]);\n }", "title": "" }, { "docid": "df328daa181d246fc744db37b7b7f8ea", "score": "0.5227411", "text": "public function run()\n {\n DB::table('books')->insert([\n 'id' => 1,\n 'name' => 'Преступление и наказание',\n 'desc' => '\"Преступление и наказание\" (1866) - одно из самых значительных произведений в истории мировой литературы.\n Это и глубокий философский роман, и тонкая психологическая драма, и захватывающий детектив, и величественная картина мрачного города,\n в недрах которого герои грешат и ищут прощения, жертвуют собой и отрекаются от себя ради ближних и находят успокоение в смирении, покаянии, вере.\n Главный герой романа Родион Раскольников решается на убийство, чтобы доказать себе и миру, что он не \"тварь дрожащая\", а \"право имеет\".\n Главным предметом исследования писателя становится процесс превращения добропорядочного, умного и доброго юноши в убийцу, а также то,\n как совершивший преступление Раскольников может искупить свою вину. \"Преступление и наказание\" неоднократно экранизировали,\n музыку к балету написал Чайковский, а недавно на одной из московских площадок по роману была поставлена рок-опера.\n'\n ]);\n\n DB::table('books')->insert([\n 'id' => 2,\n 'name' => 'Игрок',\n 'desc' =>'Роман \"Игрок\" занимает в творчестве Ф. М. Достоевского особое место,\n - в нем исключительно сильны автобиографические мотивы: многолетнее увлечение\n писателя игрой на рулетке и сложные, мучительные взаимоотношения с А. П. Сусловой.\n Замысел \"Игрока\" возник еще в 1863 г. Осенью 1865 г., испытывая финансовые трудности,\n Достоевский всего за 26 дней надиктовал текст романа стенографистке А. Г. Сниткиной\n (ставшей впоследствии его женой). По ее воспоминаниям, когда в процессе работы над романом\n обсуждались судьбы героев, то \"Федор Михайлович был вполне на стороне \"игрока\" и говорил,\n что многое из его чувств и впечатлений испытал сам на себе. Уверял, что можно обладать\n сильным характером, доказать это своею жизнью и тем не менее не иметь сил побороть в себе страсть\n к игре на рулетке\".\n',\n ]);\n\n DB::table('books')->insert([\n 'id' => 3,\n 'name' => 'Братья Карамазовы',\n 'desc' =>'Жил-был отец. И было у него три сына. Даже, по слухам, четыре. Один верил в Бога, другой\n - в черта, третий верил в Бога, но жил черт знает как, а четвертый был уверен, что если Бога нет,\n то все позволено. Четыре кредо, четыре жизненных стратегии. С тех пор прошло почти полтора\n столетия - до неузнаваемости изменился мир, но человек остался прежним. Он, как и прежде,\n ищет ответ не только на вопрос \"быть или не быть?\", но и на вопрос \"с кем быть?\". И в этом смысле\n нет в ХХI веке для юноши, обдумывающего житье, чтения более душеспасительного, чем \"Братья Карамазовы\"\n Федора Михайловича Достоевского (1821-1881). Очень важно прочесть эту книгу вовремя, до тридцати,\n и определиться, с кем из братьев тебе по пути. И, возможно, кто-нибудь из новых читателей, перевернув\n последнюю страницу великого романа, воскликнет, как знаменитый русский живописец Иван Крамской:\n \"Ну, если и после этого мир не перевернется на оси туда, куда желает художник, то умирай человеческое\n сердце!\"',\n ]);\n DB::table('books')->insert([\n 'id' => 4,\n 'name' => 'Куджо',\n 'desc' => 'Действие происходит в городке Касл-Рок. В основном это история двух семей, но в повествование включены также кусочки жизни многих других обитателей Касл-Рока. Роман не разделен на главы, но разрывы между абзацами показывают, что повествование переключается на другую точку зрения.\nСемья Трентенов, представители среднего класса, недавно переехали в Касл-Рок из Нью-Йорка. У них есть четырехлетний сын Тэд. Глава семьи, Вик, недавно поймал свою жену Донну на измене. Напряжение в семье и так возрасло, а тут еще рекламное агентство Вика обанкротилось. Поэтому Вик вынужден уехать из города, и Тэд и Донна остаются одни.\nТакже в городе проживает семья Кэмберов, синие воротнички, они живут в городе уже давно. Джо Кэмбер — механик, и он частенько поколачивает свою жену Черети и десятилетнего сына Бретта. Черети выигрывает в лотерею 5000 долларов и просит разрешения поехать с Бретом к сестре в Коннектикут. Джо соглашается, а сам планирует в это время совершить поездку в Бостон.\nКуджо — это огромный сенбернар Кэмберов. Он бегает по полю за кроликом и загоняет его в маленькую пещеру. Куджо сует туда голову, и одна из живущих в пещере летучих мышей кусает его за нос и заражает вирусом. Когда Черети и Бретт уезжают из города, Куджо убивает их соседа-алкоголика Гари Первира. Когда Джо приходит к Гари, чтобы рассказать ему про поездку, Куджо убивает и его тоже\nДонна берет Тэда и отвозит свою машину к Кэмберам на починку. Машина ломается во дворе Кэмберов, и Донна пытается найти Джо. Появляется Куджо и нападает на женщину. Донна прячется в машине, и они с Тэдом оказываются взаперти, да еще и под палящим солнцем. Внутри становится невыносимо жарко. Донна предпринимает попытку побега. Куджо кусает ее в живот и за ногу, но Донне удается отступить к машине и вновь спрятаться. Донна подумывает о том, чтобы добежать до дома, но она не уверена, что дверь открыта, и боится, что на этот раз Куджо закусает ее до смерти.\nВик возвращается в Касл-Рок и узнает, что Стив Кемп, человек, с которым у Донны была интрижка, подозревается в похищении Донны и Тэда. Полицейский Джордж Баннерман идет обследовать дом Кэмберов, но его убивает Куджо. Донна наблюдает за этим. Она смотрит на Тэда и понимает, что он может умереть от обезвоживания. Донна нападает на Куджо и убивает его. Приезжает Вик, а потом и представители правоохранительных органов. Тэд уже умер от обезвоживания и теплового удара. Донну отвозят в больницу. Голову Куджо отрезают, чтобы провести биопсию и проверить на бешенство, а потом его останки сжигают.\nСпустя несколько месяцев семьи Трентонов и Кэмберов пытаются наладить свою жизнь. Донна заканчивает лечение от бешенства. Они с Виком мирятся. Черети дарит Бретту нового щенка. В постскриптуме читателям напоминают, что Куджо был хорошей собакой, который хотел делать хозяев счастливыми, но из-за бешенства он впал в ярость и стал убивать.'\n ]);\n DB::table('books')->insert([\n 'id' => 5,\n 'name' => 'Ведьмак',\n 'desc' => 'Одна из лучших фэнтези-саг за всю историю существования жанра. Оригинальное, масштабное эпическое произведение, одновременно и свободное от влияния извне, и связанное с классической мифологической, легендарной и сказовой традицией. Шедевр не только писательского мастерства Анджея Сапковского, но и переводческого искусства Евгения Павловича Вайсброта. \"Сага о Геральте\" - в одном томе. Бесценный подарок и для поклонника прекрасной фантастики, и для ценителя просто хорошей литературы. Перед читателем буквально оживает необычный, прекрасный и жестокий мир литературной легенда, в котором обитают эльфы и гномы, оборотни, вампиры и \"низушки\"-хоббиты, драконы и монстры, - но прежде всего люди. Очень близкие нам, понятные и человечные люди - такие как мастер меча ведьмак Геральт, его друг, беспутный менестрель Лютик, его возлюбленная, прекрасная чародейка Йеннифэр, и приемная дочь - безрассудно отважная юная Цири...'\n ]);\n\n DB::table('books')->insert([\n 'id' => 6,\n 'name' => 'Война и мир ',\n 'desc' => 'Хорошо известный классический роман-эпопея Льва Толстого рассказывает о сложном, бурном периоде в истории России и всей Европы — эпохе завоевательных походов императора Наполеона в Восточную Европу и Россию, с 1805 по 1812 год. Автор подробно рассказывает о Войне — о ходе боевых действий от Аустерлица до Бородино и Березины; и о Мире — показана жизнь в России в это же время, причем пером писателя охвачены все слои общества — дворянские семьи, крестьяне, горожане, солдаты и даже императоры.\nВ этом большом, многоплановом романе действуют десятки и сотни персонажей — и в их числе реальные исторические лица, при помощи которых Толстой старается изобразить жизнь в ту эпоху во всем ее многообразии. Часто автор отступает от основных событий романа и излагает свое мнение и взгляды по множеству вопросов — он говорит об исторической науке, о социологии и психологии, морали и нравственности, свободе и необходимости.'\n ]);}", "title": "" }, { "docid": "b94408e4d2921e55b905854ad7631019", "score": "0.5224882", "text": "public function testSuccessfulQuestionAdd()\n {\n $this->artisan('migrate:refresh');\n $this->browse(function (Browser $browser) {\n $user = new User;\n $user->email = '[email protected]';\n $user->email_verified_at = now();\n $user->password = bcrypt('your_password');\n $user->remember_token = str_random(10);\n $user->save();\n $profile = new Profile;\n $profile->first_name = 'John';\n $profile->last_name = 'Doe';\n $profile->bio = 'Lorem Ipsum';\n $profile->user_id = 1;\n $profile->save();\n $browser->visit('/')\n ->clickLink('Login')\n ->assertPathIs('/login')\n ->type('email', $user->email)\n ->type('password', 'your_password')\n ->press('LOGIN');\n $browser->pause(1000)\n ->assertPathIs('/')\n ->click('@addQuestion')\n ->assertPathIs('/question')\n ->type('question', 'Lorem ipsum')\n ->press('SUBMIT')\n ->assertSee('Your question was created successfully!')\n ->click('@home')\n ->assertPathIs('/')\n ->assertSee('Lorem ipsum');\n });\n }", "title": "" }, { "docid": "968f9e328edf9f2ad3943fe1cb8a7a66", "score": "0.52196515", "text": "public function testEditTest()\n {\n $find1 = $this->mytest->find($this->mytest->id);\n $this->assertNotNull($find1);\n $find1->test_name = 'Final Quiz';\n $find1->save();\n $this->assertEquals('Final Quiz', $find1['test_name']);\n }", "title": "" }, { "docid": "007f942ffac1e286809b5533b51156e0", "score": "0.5212843", "text": "public function testSaveSupplierInDatabase()\n {\n Supplier::query()->truncate();\n $responseList = $this->get('/api/suppliers');\n $supplier = \\json_decode($responseList->getContent(), true)['data']['suppliers'][0];\n\n $response = $this->post('/api/suppliers', $supplier);\n\n $response->assertStatus(204);\n $this->assertEquals(1, Supplier::query()->count());\n $dbSupplier = Supplier::query()->first();\n $this->assertNotFalse(curl_init($dbSupplier->url));\n $this->assertNotFalse(curl_init($dbSupplier->rules));\n $this->assertGreaterThan(4, strlen($dbSupplier->info));\n $this->assertNotNull($dbSupplier->name);\n $this->assertNotNull($dbSupplier->district);\n\n $response = $this->post('/api/suppliers', $supplier);\n\n $response->assertStatus(422);\n }", "title": "" }, { "docid": "44aa44d3000ea5939ec0165e6c0a83c4", "score": "0.5198921", "text": "public function onpaste($script)\n {\n $this->clipboardEvents['onpaste'] = $script;\n }", "title": "" }, { "docid": "ecb92e07d668343d38c789e66d7ccde9", "score": "0.51699936", "text": "public function TestInsertion() {\r\n\t\t$post = new Post(array(\r\n\t\t\t'category_id' => 1,\r\n\t\t\t'author_id' => 1,\r\n\t\t\t'title' => 'Post 1 Title',\r\n\t\t\t'content' => 'Post 1 content...',\r\n\t\t\t'time' => time()));\r\n\t\t$this->assertTrue($post->save(array('validate' => false)));\r\n\t\t$this->assertEqual(Post::findFirst(array('cascade' => false)), $post);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "745d584eb207dc2674ede6b7934659bf", "score": "0.5139883", "text": "public function testExample()\n {\n $db_post = DB::select('select * from superheroes where id = 1');\n $db_post_title = ucfirst($db_post[0]->nickname);\n\n // load post using Eloquent\n $model_post = Superheroes::find(1);\n $model_post_title = $model_post->nickname;\n $this->assertEquals($db_post_title, $model_post_title);\n\n DB::table('superheroes')->insert([\n 'nickname' =>'Batman1',\n 'real_name' => 'Bruce Wayne',\n 'origin_description​' => \"​Batman's secret identity is Bruce Wayne, a wealthy American playboy, philanthropist, and owner of Wayne Enterprises. His origin depicts Bruce Wayne as a child, after witnessing the murder of his parents Dr. Thomas Wayne and Martha Wayne, he swore vengeance against criminals, an oath tempered by a sense of justice.\",\n 'superpowers'=>\"He does, however, possess a genius-level intellect, is a peerless martial artist, and his vast wealth affords him an extraordinary arsenal of weaponry and equipment. A large assortment of villains make up Batman's rogues gallery, including his archenemy, the Joker.\",\n 'catch_phrase'=>\" Because I’m Batman\",\n 'images'=>'/public/images/superheroes/2/picture1.jpg,/public/images/superheroes/2/picture2.jpg,/public/images/superheroes/2/picture3.jpg',\n ]);\n\n DB::table('superheroes')->where('nickname', '=', 'Batman1')->delete();\n\n }", "title": "" }, { "docid": "ae9d5b1d9d9762f4e2406facfcf44809", "score": "0.5134731", "text": "public function testCreateAddsToDatabase()\n {\n $monster = $this->fabricator->create();\n $this->assertIsInt($monster->id);\n\n $this->seeInDatabase('monsters', ['id' => $monster->id]);\n }", "title": "" }, { "docid": "6a2cbc76c5375232a6d430efb477ba60", "score": "0.5131666", "text": "public function setUp(): void {\n $this->ydb_copy = yourls_get_db();\n }", "title": "" }, { "docid": "237617f0cf4a88f4d07b79c80d9c19c8", "score": "0.51310176", "text": "public function testValidAnswerInsert() : void {\n\t//count the number of rows and save it for later\n$numRows = $this->getConnection()->getRowCount(\"answer\");\n\n//create the answer object\n$answer = new Answer($this->question->getQuestionId(), $this->user->getUserId(), $this->VALID_ANSWERRESULT, $this->VALID_ANSWERSCORE);\n//insert the answer object\n$answer->insert($this->getPDO());\n\n//grab the data from MySQL and enforce that it meets expectations\n$pdoAnswer = Answer::getAnswerByAnswerQuestionIdAndUserId($this->getPDO(),$answer->getAnswerQuestionId(), $answer->getAnswerUserId());\n$this->assertEquals($numRows +1, $this->getConnection()->getRowCount(\"answer\"));\n$this->assertEquals($pdoAnswer->getAnswerUserId(), $this->user->getUserId());\n$this->assertEquals($pdoAnswer->getAnswerQuestionId(), $this->question->getQuestionId());\n$this->assertEquals($pdoAnswer->getAnswerResult(), $this->VALID_ANSWERRESULT);\n$this->assertEquals($pdoAnswer->getAnswerScore(), $this->VALID_ANSWERSCORE);\n//$this->assertEquals($pdoAnswer->getAnswerScore1(), $this->VALID_ANSWERSCORE1);\n}", "title": "" }, { "docid": "843c4928993a886383326ed4059f1fdb", "score": "0.51172435", "text": "public function run()\n {\n DB::table('examples')->insert([\n 'example_data' => 'example_data1'\n ]);\n }", "title": "" }, { "docid": "15130102f62b9b524cf1d707d987f42e", "score": "0.511621", "text": "public function testEditActionPostTransferOwnership()\n {\n Store_Config::override('Feature_OAuthLogin', true);\n\n // set up some users\n $repo = $this->createRepository();\n $userId = $repo->create(array('uid' => 1, 'username' => '[email protected]', 'useremail' => '[email protected]', 'permissions' => array(\n AUTH_Manage_Users,\n AUTH_Add_User,\n AUTH_Edit_Users,\n AUTH_Delete_Users,\n ),\n ));\n\n // setup controller\n $request = new Interspire_Request(null, array(\n 'userId' => $userId,\n 'userrole' => 'owner',\n 'permissions' => array(\n 'admin' => array(\n AUTH_Manage_Users,\n AUTH_Add_User,\n ),\n ),\n ), null, array_merge($_SERVER, array('REQUEST_METHOD' => 'POST')));\n $controller = $this->createController($request);\n\n // fire up\n $controller->editAction();\n\n /* @var \\Store_User $user */\n $user = \\Store_User::find(1)->first();\n $this->assertEquals('[email protected]', $user->getUserEmail());\n\n\n }", "title": "" }, { "docid": "d3a0df9f5ab30543f3f1bcd4d7301680", "score": "0.5112922", "text": "public function testCreate() {\n\t\t$this->db->fetchAll( 'pundits' );\n\t\t$all_pundits = $this->db->get_last_result();\n\n\t\t$ids_in_use = array_map( function ( $pundit ) {\n\t\t\treturn $pundit['id'];\n\t\t}, $all_pundits);\n\n\t\t$new_pundit = array(\n\t\t\t'firstname' => 'Tim',\n\t\t\t'surname' => 'Cahill'\n\t\t);\n\n\t\t$this->db->create( 'pundits', $new_pundit );\n\n\t\t$new_id = $this->db->get_last_id();\n\n\t\t$this->assertFalse( in_array( $new_id, $ids_in_use ) );\n\n\t\t$this->db->fetch( 'pundits', $new_id );\n\t\t$new_pundit = $this->db->get_last_result();\n\n\t\t$this->assertEquals( $new_pundit['firstname'], 'Tim' );\n\t\t$this->assertEquals( $new_pundit['surname'], 'Cahill' );\n\n\t\t$this->db->fetchAll( 'pundits' );\n\t\t$all_pundits = $this->db->get_last_result();\n\n\t\t$this->assertEquals( count( $all_pundits ), 6 );\n\t}", "title": "" }, { "docid": "c6ae4232f886b8e13167764279fdb1b3", "score": "0.5082559", "text": "public function testDB() {\n\n\t\t$this->markTestIncomplete('This test is causing errors in the new environment.');\n\n\t\t// INSERT.\n\t\t// chado_insert_db().\n\t\t$dbval = [\n\t\t\t'name' => 'TD' . uniqid(),\n\t\t\t'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',\n\t\t\t'url' => 'https://www.lipsum.com/feed',\n\t\t];\n\t\t$return = chado_insert_db($dbval, [], 'testchado');\n\t\t$this->assertNotFalse($return, 'chado_insert_db failed unexpectedly.');\n\t\t$this->assertIsObject($return, 'Should be an updated DB object.');\n\t\t$this->assertObjectHasAttribute('db_id', $return,\n\t\t\t\"The returned object should have the primary key included.\");\n\t\t$this->assertEquals($dbval['name'], $return->name,\n\t\t\t\"The returned object should be the one we asked for.\");\n\t\t// test the update part of chado_insert_db().\n\t\t$dbval2 = $dbval;\n\t\t$dbval2['url'] .= '/updated';\n\t\t$returnagain = chado_insert_db($dbval2, [], 'testchado');\n\t\t$this->assertNotFalse($returnagain, 'chado_insert_db failed unexpectedly.');\n\t\t$this->assertIsObject($returnagain, 'Should be an updated DB object.');\n\t\t$this->assertObjectHasAttribute('db_id', $returnagain,\n\t\t\t\"The returned object should have the primary key included.\");\n\t\t$this->assertEquals($dbval2['name'], $returnagain->name,\n\t\t\t\"The returned object should be the one we asked for.\");\n\t\t$this->assertEquals($dbval2['url'], $returnagain->url,\n\t\t\t\"The URL should be updated.\");\n\t\t$this->assertEquals($return->db_id, $returnagain->db_id,\n\t\t\t\"Both should be the same database record!\");\n\n\t\t// SELECT.\n\t\t// chado_get_db().\n\t\t$selectval = [\n\t\t\t'name' => $dbval['name'],\n\t\t];\n\t\t$return2 = chado_get_db($selectval, [], 'testchado');\n\t\t$this->assertNotFalse($return2, 'chado_select_db failed unexpectedly.');\n\t\t$this->assertIsObject($return2, 'Should be a DB object.');\n\t\t$this->assertEquals($dbval['name'], $return2->name,\n\t\t\t\"The returned object should be the one we asked for.\");\n\t\t// chado_get_db_select_options().\n\t\t$returned_options = chado_get_db_select_options('testchado');\n\t\t$this->assertNotFalse($returned_options, 'chado_get_db_select_options failed unexpectedly.');\n\t\t$this->assertIsArray($returned_options, 'Should be an array.');\n\t\t$this->assertNotEmpty($returned_options, \"There should be at least one option.\");;\n\t\t$this->assertArrayHasKey($return->db_id, $returned_options,\n\t\t\t\"The DB we added should be one of the options.\");\n\n\t}", "title": "" }, { "docid": "fdf1ccbeb8c0adcfccc9cbdd19dfc54c", "score": "0.50813234", "text": "public function testInsert()\n {\n $tabela = $this->buildTabelaArredondamentoValor();\n $this->em->persist($tabela);\n $this->em->flush();\n\n $this->assertNotNull($tabela->getId());\n $this->assertEquals(1, $tabela->getId());\n\n /**\n * buscando no banco de dados o telefone que foi cadastrado\n */\n $savedTabela = $this->em->find(get_class($tabela), $tabela->getId());\n\n $this->assertInstanceOf(get_class($tabela), $savedTabela);\n $this->assertEquals($tabela->getId(), $savedTabela->getId());\n }", "title": "" }, { "docid": "0415f7354a1afde5aaa15ec7a0992ff4", "score": "0.5054474", "text": "public function testInsertest()\n {\n $user = new User();\n $user->name = 'Jonnyy';\n $user->email = '[email protected]';\n $user->password = 'passjonn';\n $this->assertTrue($user->save());\n }", "title": "" }, { "docid": "d4d5342d6870d66e139aa99ccb90bf08", "score": "0.50531614", "text": "public function testUrlEditBooks()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/books')\n ->click('#list-books tbody tr:first-child td:nth-child(7) a')\n ->assertSee('Edit Book')\n ->assertPathIs('/admin/books/'.$this->book->id.'/edit');\n });\n }", "title": "" }, { "docid": "3b1f7af8eacdc90fd319b0ee1c62cfdb", "score": "0.5032509", "text": "public function testCRUD() {\n $php = new $this->storageClass($this->settings);\n $this->assertCRUD($php);\n }", "title": "" }, { "docid": "83c2ca8d405280c302c8917748b751f4", "score": "0.502282", "text": "public function testInsertInvalidTweet() {\n\t\t// create a Tweet with a non null tweet id and watch it fail\n\t\t$tweet = new Tweet(DataDesignTest::INVALID_KEY, $this->profile->getProfileId(), $this->VALID_TWEETCONTENT, $this->VALID_TWEETDATE);\n\t\t$tweet->insert($this->getPDO());\n\t}", "title": "" }, { "docid": "6784c81dcd3d1b43912e4d12ef2719f8", "score": "0.50172806", "text": "public function run()\n {\n DB::connection('testbench')\n ->table('cms_test_records')\n ->insert([\n 'id' => 1,\n 'description' => 'testing!',\n 'created_at' => '2017-01-01 00:00:00',\n 'updated_at' => '2017-01-01 00:00:00',\n ]);\n }", "title": "" }, { "docid": "541905f42a4b5dcb660c775f443e67f1", "score": "0.5007047", "text": "public function editCardOKTest()\n {\n $heading = \"My Card\";\n\t\t$owner = new User([\n\t\t\t'name'\t\t=> 'Test',\n\t\t\t'email'\t\t=> '[email protected]',\n\t\t\t'password'\t=> 'test',\n ]);\n $owner->save();\n $validation = new Validation();\n $validation->save();\n\t\t$card = new Card();\n\t\t$card->heading = $heading;\n\t\t$card->phonetic_id = NULL;\n\t\t$card->domain_id = 'Legal';\n\t\t$card->subdomain_id = 'Justice';\n $card->definition_id = NULL;\n $card->context_id = NULL;\n $card->note_id = NULL;\n $card->language_id = 'ARA';\n $card->owner_id = User::where('email', $owner->email)->first()->id;\n $card->validation_id = $validation->id; \n $card->save();\n $this->assertDatabaseHas('cards', [\n 'id'\t\t\t=> $card->id,\n 'heading'\t\t=> $card->heading,\n 'phonetic_id'\t=> $card->phonetic_id,\n 'domain_id'\t\t=> strval($card->domain_id),\n 'subdomain_id'\t=> strval($card->subdomain_id),\n 'definition_id' => $card->definition_id,\n 'note_id'\t\t=> $card->note_id,\n 'context_id'\t=> $card->context_id,\n 'language_id'\t=> strval($card->language_id),\n 'owner_id'\t\t=> $card->owner_id,\n 'validation_id' => $card->validation_id,\n ]);\n\t\t$card->heading = 'My New Card';\n\t\t$card->update();\n \n $this->assertDatabaseMissing('cards', [\n 'id'\t\t\t=> $card->id,\n 'heading'\t\t=> $heading,\n 'phonetic_id'\t=> $card->phonetic_id,\n 'domain_id'\t\t=> strval($card->domain_id),\n 'subdomain_id'\t=> strval($card->subdomain_id),\n 'definition_id' => $card->definition_id,\n 'note_id'\t\t=> $card->note_id,\n 'context_id'\t=> $card->context_id,\n 'language_id'\t=> strval($card->language_id),\n 'owner_id'\t\t=> $card->owner_id,\n 'validation_id' => $card->validation_id,\n ]);\n }", "title": "" }, { "docid": "7c3c08f91f388fcd388d5007f1759ee3", "score": "0.5006034", "text": "public function testInsertValidFavorite() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"favorite\");\n\n\t\t// create a new Favorite and insert to into mySQL\n\t\t$favorite = new Favorite($this->tweet->getTweetId(), $this->profile->getProfileId(), $this->VALID_FAVORITEDATE);\n\t\t$favorite->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoFavorite = Favorite::getFavoriteByTweetIdAndProfileId($this->getPDO(), $this->tweet->getTweetId(), $this->profile->getProfileId());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"favorite\"));\n\t\t$this->assertEquals($pdoFavorite->getTweetId(), $this->tweet->getTweetId());\n\t\t$this->assertEquals($pdoFavorite->getProfileId(), $this->profile->getProfileId());\n\t\t$this->assertEquals($pdoFavorite->getFavoriteDate(), $this->VALID_FAVORITEDATE);\n\t}", "title": "" }, { "docid": "83f4a34525d85beae847749ea6bb71e0", "score": "0.4992394", "text": "public function testCreateDuplicateEntry()\n {\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->createAction,\n 'name' => $this->testName,\n 'username' => $this->testUsername,\n 'email' => $this->testEmail,\n 'password' => $this->testPassword,\n 'password_confirmation' => $this->testPassword\n ));\n\n $this->assertDatabaseHas('users', [\n 'id' => 1,\n 'name' => $this->testName,\n 'username' => $this->testUsername,\n 'email' => $this->testEmail,\n ]);\n\n $this->call('POST', '/api/user', array(\n 'action' => $this->createAction,\n 'name' => $this->testName,\n 'username' => $this->testUsername,\n 'email' => $this->testEmail,\n 'password' => $this->testPassword,\n 'password_confirmation' => $this->testPassword\n ));\n\n $this->assertDatabaseMissing('users', [\n 'id' => 2,\n 'name' => $this->testName,\n 'username' => $this->testUsername,\n 'email' => $this->testEmail,\n ]);\n }", "title": "" }, { "docid": "ce983c77b551285e9738fb0e18f8d5c5", "score": "0.49882415", "text": "public function run()\n {\n DB::table('testimonials')->insert([\n [\n 'quote' => 'lorem ipsum',\n 'name' => 'Michael Smith',\n 'role' => 'CEO company',\n 'img' => 'IMAGE',\n ],\n [\n 'quote' => 'lorem ipsum',\n 'name' => 'Michael Smith',\n 'role' => 'CEO company',\n 'img' => 'IMAGE',\n ],\n \n ]);\n }", "title": "" }, { "docid": "a64257b35144d3e555e722c054b81bd2", "score": "0.4987568", "text": "public function testReviewsUpdate()\n {\n }", "title": "" }, { "docid": "4aacd8987f00b3aa6f250d62579aa3d8", "score": "0.49854845", "text": "public function testDataWasSaved()\n {\n $helper = new CardsHelper();\n $cards = $helper->generateAllCards();\n\n $cardsRepository = new CardsRepository(new Cards());\n $callback = $cardsRepository->save($cards);\n\n $this->assertTrue($callback);\n }", "title": "" }, { "docid": "78a177c1da3f432dc961df4ebc0c7e77", "score": "0.4985115", "text": "public function testBookingsCanBeUpdated(): void\n {\n $admin = User::factory()->admin()->create();\n $booking = Booking::factory()->create();\n $newResource = Resource::factory()->create();\n\n $response = $this->actingAs($admin)->put('bookings/'.$booking->id, [\n 'resource_id' => $newResource->id,\n 'start_time' => $booking->start_time,\n 'end_time' => $booking->end_time,\n ]);\n\n $response->assertRedirect();\n $this->assertDatabaseHas('bookings', [\n 'resource_id' => $newResource->id,\n ]);\n }", "title": "" }, { "docid": "ed06d4b3f7dff77607a63dbbde5fe9fa", "score": "0.4984529", "text": "function test_set_existing() {\n\t\t$address = new address();\n\t\t$address->name = \"TEST ADDRESS\";\n\n\t\t\n\t\t$address->save();\n\t\t\n\t\t$id = $address->id;\n\t\t\n\t\t$address = new address($id);\n\t\t\n\t\t$array = array(\n\t\t\t\"name\" => \"TEST ADDRESSES\",\n\t\t\t\"line1\" => \"777 N Streetynesses\",\n\t\t\t\"line2\" => \"Suite 5\",\n\t\t\t\"city\" => \"Townsvilley\",\n\t\t\t\"state\" => \"Utahness\",\n\t\t\t\"zip\" => \"12345-2342\",\n\t\t\t\"country\" => \"United Storts\",\n\t\t\t\"phone_number\" => \"123-123-5555\",\n\t\t\t\"instructions\" => \"Here are some instructions for not shipping\"\n\t\t);\n\t\t\n\t\t$address->set($array);\n\t\t$address->save();\n\t\t\n\t\t$address = new address($id);\n\t\t\n\t\t$this->assertEquals($address->name, \"TEST ADDRESSES\");\n\t\t$this->assertEquals($address->line1, \"777 N Streetynesses\");\n\t\t$this->assertEquals($address->line2, \"Suite 5\");\n\t\t$this->assertEquals($address->city, \"Townsvilley\");\n\t\t$this->assertEquals($address->state, \"Utahness\");\n\t\t$this->assertEquals($address->zip, \"12345-2342\");\n\t\t$this->assertEquals($address->country, \"United Storts\");\n\t\t$this->assertEquals($address->phone_number, \"1231235555\");\n\t\t$this->assertEquals($address->instructions, \"Here are some instructions for not shipping\");\n\t}", "title": "" }, { "docid": "2122b2c874cf8f0de04449102b413ef7", "score": "0.49835667", "text": "public function testInsert()\r\n\t{\r\n\t\t// Create new schema\r\n\t\t$schema = new Schema();\r\n\r\n\t\t// Set properties\r\n\t\t$schema->SCHEMA_NAME = 'schematest1';\r\n\t\t$schema->DEFAULT_COLLATION_NAME = 'latin1_swedish_ci';\r\n\r\n\t\t// Save\r\n\t\t$this->assertEquals(true, $schema->save());\r\n\r\n\t\t// Load again\r\n\t\t$schema = Schema::model()->findByPk('schematest1');\r\n\r\n\t\t// Check properties\r\n\t\t$this->assertEquals('schematest1', $schema->SCHEMA_NAME);\r\n\t\t$this->assertEquals('latin1', $schema->DEFAULT_CHARACTER_SET_NAME);\r\n\t\t$this->assertEquals('latin1_swedish_ci', $schema->DEFAULT_COLLATION_NAME);\r\n\t}", "title": "" }, { "docid": "d9420a513c5f099abf71d1ebc1c4142f", "score": "0.49801496", "text": "public function testDBTableUpdate() {\r\n $this->_setUpDB();\r\n $sync = new Backbone_Sync_DB_Table(array('table'=>'books'));\r\n $model = new Backbone_Model(array('id'=>'1938273', 'title'=>\"Moby Dick\", 'author'=>\"Herman Melville\", 'length'=>321));\r\n $model->sync($sync);\r\n \r\n $res = $model->save('author', 'Engelbert Humperdink');\r\n $this->assertSame($model, $res);\r\n $this->assertEquals('Engelbert Humperdink', $model->author);\r\n \r\n $model = new Backbone_Model(array('id'=>'1938273'), array('sync'=>$sync));\r\n $model->fetch();\r\n $this->assertEquals('Engelbert Humperdink', $model->author);\r\n }", "title": "" }, { "docid": "6ae20b9bf48541dd3f171baac9cc0e1e", "score": "0.4977684", "text": "public function test_author_update(): void\n {\n $new_author = Author::factory()->create();\n\n $new_author->name = 'Update Test Author';\n $new_author->birth_date = '1921-07-25';\n $new_author->genre = 'Fiction';\n\n $response = $this->patch(\"api/v1/authors/{$new_author->id}\", $new_author->toArray());\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('authors', [\n 'id' => $new_author->id,\n 'name' => 'Update Test Author',\n 'birth_date' => '1921-07-25',\n 'genre' => 'Fiction'\n ]);\n }", "title": "" }, { "docid": "72d10e46c15e54cfaad2b7f1882942a8", "score": "0.49765503", "text": "public function testBlacklistIdPut()\n {\n\n }", "title": "" }, { "docid": "7bad44b219ff73c6004ebd089c89334c", "score": "0.49734646", "text": "public function testAdminEditTicket()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/ticket');\n $browser->press('table > tbody > tr:nth-child(1) > td.footable-first-column > span.footable-toggle');\n $browser->press('div.footable-row-detail-value > form > a.btn.btn-warning');\n $browser->type('ticket_title', 'update ticket' . Carbon::now()->toDateTimeString());\n $browser->script(\"CKEDITOR.instances['editor'].setData('Updated Data');\");\n $browser->select('group_id','2');\n $browser->pause(3000);\n $browser->select('category_id', '3');\n $browser->select('location_id', '3');\n $browser->press('Update')\n ->assertSee('Ticket has been updated');\n //->screenshot('update_ticket');\n });\n }", "title": "" }, { "docid": "12229879a62d39a197589a96d68913c2", "score": "0.49717137", "text": "public function testAdminEditPost(): void\n {\n $newBlogPostTitle = 'Blog Post Title '.mt_rand();\n\n $client = static::createClient([], [\n 'PHP_AUTH_USER' => 'jane_admin',\n 'PHP_AUTH_PW' => 'kitten',\n ]);\n $client->request('GET', '/en/admin/post/1/edit');\n $client->submitForm('Save changes', [\n 'post[title]' => $newBlogPostTitle,\n ]);\n\n $this->assertResponseRedirects('/en/admin/post/1/edit', Response::HTTP_FOUND);\n\n /** @var \\App\\Entity\\Post $post */\n $post = self::$container->get(PostRepository::class)->find(1);\n $this->assertSame($newBlogPostTitle, $post->getTitle());\n }", "title": "" }, { "docid": "20f7059588cab51bbcecea8d8762dc9e", "score": "0.49645442", "text": "public function run()\n {\n $param = [\n 'name' => 'name01',\n 'comment' => 'TESTTESTTEST01',\n ];\n DB::table('bbs')->insert($param);\n\n $param = [\n 'name' => 'name02',\n 'comment' => 'TESTTESTTEST02',\n ];\n DB::table('bbs')->insert($param);\n\n $param = [\n 'name' => 'name03',\n 'comment' => 'TESTTESTTEST03',\n ];\n DB::table('bbs')->insert($param);\n }", "title": "" }, { "docid": "4d9bec0503b76656dc46ad04de9916c3", "score": "0.4958291", "text": "public function testEditApplication()\n {\n $this->loadFixtures(array(\n 'Netvlies\\Bundle\\PublishBundle\\Tests\\Fixtures\\LoadApplication'\n ));\n\n $client = static::createClient();\n $crawler = $client->request('GET', $this->getUrl('netvlies_publish_application_edit', array('application' => 1)));\n\n $this->assertTrue($crawler->filter('html:contains(\"Shared files and directories\")')->count() > 0 );\n\n $form= $crawler->selectButton('Save')->form();\n\n $form['application_edit[name]'] = 'newtestname';\n $client->submit($form);\n $crawler = $client->followRedirect();\n\n $this->assertTrue($crawler->filter('html:contains(\"newtestname\")')->count() > 0);\n }", "title": "" }, { "docid": "ada61a2f99533fa5476f9fa5a63ba340", "score": "0.4955201", "text": "public function testUpdate() {\n\n\t\t$data = array(\n\t\t\t'firstname' => 'Andy',\n\t\t\t'surname' => 'Hinchcliffe'\n\t\t);\n\n\t\t$this->db->update( 'pundits', 3, $data );\n\n\t\t$this->db->fetch( 'pundits', 3 );\n\n\t\t$pundit = $this->db->get_last_result();\n\n\t\t$this->assertEquals( 'Andy', $pundit['firstname'] );\n\t\t$this->assertEquals( 'Hinchcliffe', $pundit['surname'] );\n\t}", "title": "" }, { "docid": "c7c1e606fdf3edc3ba391d55d57ef663", "score": "0.49407578", "text": "public function run()\n {\n DB::table('books')->insert([\n 'title' => Str::random(20),\n 'content' => Str::random(50),\n ]);\n }", "title": "" }, { "docid": "1eb8a77eca16101a0416a14839678d10", "score": "0.49402755", "text": "public function testAssign()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "812b32d77d722dc353a2266bb353b220", "score": "0.49391878", "text": "public function testRegisterBook() {\n $response = $this->adminLogin();\n $book = [\n 'title' => 'bookTitle',\n 'author' => 'author',\n 'genre' => 'genre',\n 'publisher' => 'publisher', \n ];\n $this->post('/admin/store_book', $book)\n ->assertRedirect('/admin');\n\n $this->assertDatabaseHas('books', $book);\n DB::table('books')->where('title', 'bookTitle')->delete();\n }", "title": "" }, { "docid": "b7b09240dc4b7c409d290585502cd1b4", "score": "0.49372846", "text": "function testCreateInsertExistingName()\n {\n $dataTest = [\n \"name\" => \"testName\",\n \"description\" => \"testDescription\",\n \"estimatedDuration\" => 100,\n \"type\" => \"SEWING\"\n ];\n $client = static::createClient();\n $client->request('POST',\n sprintf(self::BASE_URL,'edit'),\n [], [],\n ['CONTENT_TYPE' => 'application/json'], json_encode($dataTest));\n $client->request('POST',\n '/api/project/edit',\n [], [],\n ['CONTENT_TYPE' => 'application/json'], json_encode($dataTest));\n $this->assertEquals(400, $client->getResponse()->getStatusCode());\n $this->assertStringContainsString(\"Name already exists in database\", $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "cb2ccb9123d23897161f4d53c62312c8", "score": "0.493027", "text": "public function test_db(){\n\n\t\t/*\n\t\t#UPDATE PACTICE\n\t\t$q = 'UPDATE users\n\t\tSET email = \"[email protected]\" \n\t\tWHERE first_name = \"Yusuf\"';\n\t\t\n\t\tDB::instance(DB_NAME)->query($q);\n\t\t*/\n\n\t\t/* New User array add to DB example\n\t\t$new_user = Array (\n\t\t\t'first_name' => 'Micky',\n\t\t\t'last_name' => 'Abbas',\n\t\t\t'email' => '[email protected]'\n\t\t);\n\n\t\tDB::instance(DB_NAME)->insert('users', $new_user);\n\t\t*/\n\n\t\t#pretend this is data from a form\n\t\t$_POST['first_name'] = 'Yusuf';\n\n\n\t\t#Make sure it's sanitized first\n\t\t$_POST = DB::instance(DB_NAME)->sanitize($_POST);\n\n\t\t#Build the query\n\t\t$q = 'SELECT email \n\t\tFROM users\n\t\tWHERE first_name = \"'.$_POST['first_name'].'\"';\n\n\t\techo DB::instance(DB_NAME)->select_field($q);\n\n\t}", "title": "" }, { "docid": "1cbb846e250722f8b01b61577e224333", "score": "0.49255309", "text": "public function testSaveAlteringObject()\n {\n $mocks = $this->provideMocks();\n\n // need a real event dispatcher\n $mocks['eventDispatcher'] = new EventDispatcher();\n \n $repository = $this->provideRepository($mocks);\n\n $insertId = 5;\n $hobbit = $this->provideHobbit(['name' => 'Frodo']);\n $this->assertNull($hobbit->getSurname());\n $this->assertNull($hobbit->getHeight());\n\n $mocks['eventDispatcher']->addListener(\n Knit::EVENT_WILL_SAVE,\n function (Events\\ObjectEvent $event) {\n $object = $event->getObject();\n $object->setSurname('Baggins');\n }\n );\n\n $mocks['eventDispatcher']->addListener(\n Knit::EVENT_DID_SAVE,\n function (Events\\ObjectEvent $event) {\n $object = $event->getObject();\n $object->setHeight(100);\n }\n );\n\n $mocks['store']->expects($this->once())\n ->method('add')\n ->with(\n $mocks['collection'],\n [\n 'id' => null,\n 'name' => 'Frodo',\n 'surname' => 'Baggins',\n 'height' => null\n ]\n )\n ->will($this->returnValue($insertId));\n\n $this->assertNull($hobbit->getId());\n\n $repository->add($hobbit);\n\n // also make sure the id was properly set\n $this->assertEquals($insertId, $hobbit->getId());\n\n // and that height has been altered after object was added\n $this->assertEquals(100, $hobbit->getHeight());\n }", "title": "" }, { "docid": "f255137b8b4f52a45da430e089580cf2", "score": "0.492307", "text": "public function test_author_store(): void\n {\n $new_author = Author::factory()->make();\n\n $response = $this->post('api/v1/authors', $new_author->toArray());\n $response->assertStatus(200);\n\n //Check if record is stored in the database\n $author = $response->getOriginalContent()['author'];\n $this->assertEquals($author->id, Author::find($author->id)->id);\n }", "title": "" }, { "docid": "2c618ced83ae71c5d8b6dffbfdc91e06", "score": "0.4922879", "text": "function testdbBookingsModule() {\n $today = date('y-m-d');\n $b = new Booking($today,\"\",\"Meghan2075551234\",\"pending\",\"\",\"Tiny\",\n array(\"Meghan:mother\", \"Jean:father\", \"Teeny:sibling\"),\n array(), \"\", \"\", \"Millie2073631234\",\"Maine Med\", \"SCU\", \"00000000000\",\n \"$10 per night\", \"\",\"\",\"\",\"new\");\n $this->assertTrue(insert_dbBookings($b));\n $this->assertTrue(retrieve_dbBookings($b->get_id()));\n //$this->assertTrue(in_array(\"Meghan2077291234\", $b->get_guest_id()));\n \n //checks that the initial status is \"pending\"\n $this->assertTrue(retrieve_dbBookings($b->get_id())->get_status(), \"pending\");\n \n //checks that initial flag is \"new\"\n $this->assertTrue(retrieve_dbBookings($b->get_id())->get_flag(), \"new\");\n $pending_bookings = retrieve_all_pending_dbBookings();\n // $this->assertEqual($pending_bookings[0]->get_id(), $b->get_id());\n \n // make some changes and test updating it in the database\n // Add a loaner to the booking\n\t\t$b->add_loaner(\"remote3\");\n\t\t$b->add_occupant(\"Jordan\",\"brother\");\n\t\t$b->set_flag(\"viewed\");\n $this->assertTrue($b->assign_room(\"126\",$today));\n $bretrieved = retrieve_dbBookings($b->get_id());\n $this->assertTrue(in_array(\"Jordan: brother\", $bretrieved->get_occupants()));\n $this->assertTrue(in_array(\"remote3\", $bretrieved->get_loaners()));\n $this->assertEqual($bretrieved->get_status(),\"active\");\n $this->assertEqual($bretrieved->get_id(), $b->get_id());\n $this->assertEqual($bretrieved->get_room_no(), \"126\");\n $today = date('y-m-d');\n $this->assertEqual($bretrieved->get_date_in(), $today);\n $this->assertEqual($bretrieved->get_flag(), \"viewed\");\n \n //tests updating after a checkout\n $this->assertTrue($bretrieved->check_out($today));\n $bretrieved2 = retrieve_dbBookings($b->get_id());\n $this->assertEqual($bretrieved2->get_status(), \"closed\");\n $this->assertEqual($bretrieved2->get_date_out(),$today);\n \n //tests the delete function\n $this->assertTrue(delete_dbBookings($b->get_id()));\n $this->assertFalse(retrieve_dbBookings($b->get_id()));\n \n \n \n echo (\"testdbBookings complete\");\n }", "title": "" }, { "docid": "e2c7acef42f5b66a71faf0ea187cb8d3", "score": "0.4914989", "text": "public function run()\n {\n DB::table('books')->insert([\n [\n 'isbn' => 1234567891234,\n 'title' => 'Crisis on Infinite Earths',\n 'author' => 'Marv Wolfman',\n 'giver' => 'Barry Allen',\n 'entryDate' => '2020-08-03 21:30:00',\n 'thumbnail' => 'default.jpg',\n\n 'user_id' => 1,\n ]\n ]);\n }", "title": "" }, { "docid": "cba1bc55bfb68fdd9e3c65965c722039", "score": "0.49119395", "text": "function test_vb_insert_future_change_to_private() {\n\t\t$future_date_1 = strtotime( '+1 day' );\n\n\t\t$post = array(\n\t\t\t'post_author' => self::$editor_id,\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_content' => rand_str(),\n\t\t\t'post_title' => rand_str(),\n\t\t\t'post_date' => strftime( '%Y-%m-%d %H:%M:%S', $future_date_1 ),\n\t\t);\n\n\t\t// insert a post and make sure the ID is ok\n\t\t$id = wp_insert_post( $post );\n\t\t$this->post_ids[] = $id;\n\n\t\t// Fetch the post and make sure has the correct date and status.\n\t\t$out = get_post( $id );\n\t\t$this->assertSame( 'future', $out->post_status );\n\t\t$this->assertSame( $post['post_date'], $out->post_date );\n\n\t\t// Check that there's a publish_future_post job scheduled at the right time.\n\t\t$this->assertSame( $future_date_1, $this->_next_schedule_for_post( 'publish_future_post', $id ) );\n\n\t\t// now save it again with status set to draft\n\n\t\t$post['ID'] = $id;\n\t\t$post['post_status'] = 'private';\n\t\twp_update_post( $post );\n\n\t\t// Fetch the post again and make sure it has the new post_date.\n\t\t$out = get_post( $id );\n\t\t$this->assertSame( 'private', $out->post_status );\n\t\t$this->assertSame( $post['post_date'], $out->post_date );\n\n\t\t// And the correct date on the cron job.\n\t\t$this->assertFalse( $this->_next_schedule_for_post( 'publish_future_post', $id ) );\n\t}", "title": "" }, { "docid": "c557cdfeecdc7493b68d6110225ca926", "score": "0.49113807", "text": "public function run()\n {\n $mock = 'lorem lorem lorem lorem lorem lorem lorem lorem ';\n DB::table('blog')->insert([\n 'title' => 'test test test',\n 'slug' => 'test-test-test',\n 'content' => $mock,\n 'cover' => 21,\n 'status' => 'publish',\n 'publish_at' => Carbon::now(),\n 'category_id' => 1,\n 'user_id' => 1,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now()\n ]);\n }", "title": "" }, { "docid": "c2322cb30e74cd6dfb8ff9fed3017faa", "score": "0.49070626", "text": "public function testEditActionPost()\n {\n Store_Config::override('Feature_OAuthLogin', true);\n\n // set up some users\n $repo = $this->createRepository();\n $userId = $repo->create(array('uid' => 1, 'username' => '[email protected]', 'useremail' => '[email protected]', 'permissions' => array(\n AUTH_Manage_Users,\n AUTH_Add_User,\n AUTH_Edit_Users,\n AUTH_Delete_Users,\n ),\n ));\n\n // setup controller\n $request = new Interspire_Request(null, array(\n 'userId' => $userId,\n 'useremail' => '[email protected]',\n 'permissions' => array(\n 'admin' => array(\n AUTH_Manage_Users,\n AUTH_Add_User,\n ),\n ),\n ), null, array_merge($_SERVER, array('REQUEST_METHOD' => 'POST')));\n $controller = $this->createController($request);\n\n // fire up\n $controller->editAction();\n\n /* @var \\Store_User $user */\n $user = \\Store_User::find($userId)->first();\n\n // should not change email\n $this->assertNotEquals('[email protected]', $user->getUserEmail());\n $this->assertEquals('[email protected]', $user->getUserEmail());\n\n $userPermissions = $repo->getPermissionsForUser($user->getId());\n\n $this->assertNotContains(AUTH_Edit_Users, $userPermissions);\n $this->assertNotContains(AUTH_Delete_Users, $userPermissions);\n\n }", "title": "" }, { "docid": "a818ca9aa28821c27f9f30092e2862d0", "score": "0.49061573", "text": "public function testEditAction() {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "title": "" }, { "docid": "b47d67d4db0722b4f6259a5e6e524f42", "score": "0.490592", "text": "public function save()\n {\n $this->_insert();\n }", "title": "" }, { "docid": "4c63b20e656324954add805cafbeeec6", "score": "0.4905751", "text": "public function run()\n {\n //\n DB::table('new_tweets')->insert( array(\n \t'author' => 'Aak',\n \t'message' => 'Hello, world'\n ) );\n DB::table('new_tweets')->insert( array(\n \t'author' => 'Kulbir',\n \t'message' => 'Heya, joe'\n ) );\n DB::table('new_tweets')->insert( array(\n \t'author' => 'Mug',\n \t'message' => 'Luluuu'\n ) );\n\n\n // Let's try faker ti prepopulate lots of imaginary data more faster than seeder.\n $faker = Faker\\Factory::create();\n\n foreach( range( 1, 25 ) as $index ) {\n \tDB::table('new_tweets')->insert( array(\n \t\t'author' => $faker->name,\n \t\t'message' => $faker->catchphrase\n \t) );\n }\n\n }", "title": "" }, { "docid": "7b36770e445b82a3f0c6ac9c33c88102", "score": "0.4902608", "text": "function test_vb_insert_future_private() {\n\n\t\t$future_date = strtotime( '+1 day' );\n\n\t\t$post = array(\n\t\t\t'post_author' => self::$editor_id,\n\t\t\t'post_status' => 'private',\n\t\t\t'post_content' => rand_str(),\n\t\t\t'post_title' => rand_str(),\n\t\t\t'post_date' => strftime( '%Y-%m-%d %H:%M:%S', $future_date ),\n\t\t);\n\n\t\t// insert a post and make sure the ID is ok\n\t\t$id = wp_insert_post( $post );\n\t\t$this->post_ids[] = $id;\n\t\t#dmp(_get_cron_array());\n\t\t$this->assertTrue( is_numeric( $id ) );\n\t\t$this->assertTrue( $id > 0 );\n\n\t\t// fetch the post and make sure it matches\n\t\t$out = get_post( $id );\n\n\t\t$this->assertSame( $post['post_content'], $out->post_content );\n\t\t$this->assertSame( $post['post_title'], $out->post_title );\n\t\t$this->assertSame( 'private', $out->post_status );\n\t\t$this->assertEquals( $post['post_author'], $out->post_author );\n\t\t$this->assertSame( $post['post_date'], $out->post_date );\n\n\t\t// There should be a publish_future_post hook scheduled on the future date.\n\t\t$this->assertFalse( $this->_next_schedule_for_post( 'publish_future_post', $id ) );\n\t}", "title": "" }, { "docid": "4c5192d8f8371f43f48a4696cf090a3e", "score": "0.48970386", "text": "public function testSaveSnippet() {\n $this->objFromFixture('Member', 'apiuser')->login();\n $snippet=$this->objFromFixture('Snippet', 'snippet1');\n \n \n //Test saving a snippet\n $response=$this->getAMFResponse('Snippets.saveSnippet', array(\n 'id'=>$snippet->ID,\n 'title'=>'API Snippet',\n 'description'=>$snippet->Description,\n 'code'=>'<?php print \"hello api\"; ?>',\n 'tags'=>$snippet->Tags,\n 'language'=>$snippet->LanguageID,\n 'packageID'=>$snippet->PackageID\n ));\n \n //Validate the response\n $response=$this->assertEquals('HELO', $response['status'], 'Response status should have been HELO');\n }", "title": "" }, { "docid": "4552cfeb1dd23c28853a7bb728d3e485", "score": "0.489686", "text": "public function run()\n {\n DB::table('books')->insert(\n [\n [\n 'title' => Str::random(40),\n 'description' => Str::random(70),\n 'shortDescription' => Str::random(100),\n ],\n [\n 'title' => Str::random(40),\n 'description' => Str::random(70),\n 'shortDescription' => Str::random(100),\n ],\n [\n 'title' => Str::random(40),\n 'description' => Str::random(70),\n 'shortDescription' => Str::random(100),\n ],\n [\n 'title' => Str::random(40),\n 'description' => Str::random(70),\n 'shortDescription' => Str::random(100),\n ],\n [\n 'title' => Str::random(40),\n 'description' => Str::random(70),\n 'shortDescription' => Str::random(100),\n ],\n [\n 'title' => Str::random(40),\n 'description' => Str::random(70),\n 'shortDescription' => Str::random(100),\n ],\n ]\n );\n }", "title": "" }, { "docid": "a5e4f64c7f8ae0993c73c5162caf45a9", "score": "0.4896495", "text": "function testSave()\n {\n //Arrange\n //create a new student\n $name = \"David\";\n $date='1909-09-08 12:00:00';\n $id = 1;\n $test_student = new Student($name, $id,$date);\n //Act\n //save the student to the database\n //Id should be assigned in database, then stored in object.\n $test_student->save();\n //Assert\n //get all existing students back out of the database.\n //The first and only one should hold the same properties as the test student.\n $result = Student::getAll();\n $this->assertEquals($test_student, $result[0]);\n }", "title": "" }, { "docid": "635d89d0aae708df2c9312c8e470ffe9", "score": "0.4894068", "text": "public function testTrainingRecordRecordIDPut()\n {\n }", "title": "" }, { "docid": "d183c8e3534502a7e6851403383a707e", "score": "0.48844033", "text": "public function testInsertWithMatchingTypes(): void\n {\n $data = ['id' => '3', 'title' => 'a title', 'body' => 'a body'];\n $result = $this->connection->insert(\n 'things',\n $data,\n ['id' => 'integer', 'title' => 'string', 'body' => 'string']\n );\n $this->assertInstanceOf(StatementInterface::class, $result);\n $result->closeCursor();\n $result = $this->connection->execute('SELECT * from things where id = 3');\n $rows = $result->fetchAll('assoc');\n $this->assertCount(1, $rows);\n $result->closeCursor();\n $this->assertEquals($data, $rows[0]);\n }", "title": "" }, { "docid": "4bbd29fbbf15961eea10aa93b6b38e2b", "score": "0.4883078", "text": "public function testInsertCar()\n {\n $car = new Car();\n $car -> Make = 'honda';\n $car -> Model = 'civic';\n $car -> Year = '1999';\n $this->assertTrue($car -> save());\n }", "title": "" }, { "docid": "b0160810488b1b25334968f1be62c59a", "score": "0.4875584", "text": "public function test_save_num_attempts() {\n global $DB;\n\n $save_data = array(\n 'num_attempts' => 5\n );\n $this->_cut->save(45, $save_data, $this->_now+1);\n $expected = array_combine($this->_columns, $this->_data);\n $expected['num_attempts'] = 5;\n $expected['timemodified'] = $this->_now+1;\n $record = $DB->get_record('dragdrop', array('id' => 45));\n $this->assertEquals($expected, (array) $record);\n }", "title": "" }, { "docid": "fef96f7c18404e0425d4c5d9bd865c8c", "score": "0.4870927", "text": "public function testEdit() {\n $this->Audit = ClassRegistry::init( 'Audit' );\n $this->AuditDelta = ClassRegistry::init( 'AuditDelta' );\n \n $new_article = array(\n 'Article' => array(\n 'user_id' => 1,\n 'author_id' => 1,\n 'title' => 'First Test Article', \n 'body' => 'First Test Article Body',\n 'ignored_field' => 1,\n 'published' => 'N', \n ),\n );\n \n # TEST SAVE WITH SINGLE PROPERTY UPDATE\n \n $this->Article->save( $new_article );\n $this->Article->saveField( 'title', 'First Test Article (Edited)' );\n \n $audit_records = $this->Audit->find(\n 'all',\n array(\n 'recursive' => 0,\n 'conditions' => array(\n 'Audit.model' => 'Article',\n 'Audit.entity_id' => $this->Article->getLastInsertId()\n )\n )\n );\n $delta_records = $this->AuditDelta->find(\n 'all',\n array(\n 'recursive' => -1,\n 'conditions' => array( 'AuditDelta.audit_id' => Set::extract( '/Audit/id', $audit_records ) ),\n )\n );\n \n $create_audit = Set::extract( '/Audit[event=CREATE]', $audit_records );\n $update_audit = Set::extract( '/Audit[event=EDIT]', $audit_records );\n \n # There should be 1 CREATE and 1 EDIT record\n $this->assertEqual( 2, count( $audit_records ) );\n \n # There should be one audit record for each event.\n $this->assertEqual( 1, count( $create_audit ) );\n $this->assertEqual( 1, count( $update_audit ) );\n \n # Only one property was changed\n $this->assertEqual( 1, count( $delta_records ) );\n \n $delta = array_shift( $delta_records );\n $this->assertEqual( 'First Test Article', $delta['AuditDelta']['old_value'] );\n $this->assertEqual( 'First Test Article (Edited)', $delta['AuditDelta']['new_value'] );\n\n # TEST UPDATE OF MULTIPLE PROPERTIES\n # Pause to simulate a gap between edits\n # This also allows us to retrieve the last edit for the next set\n # of tests.\n $this->Article->create(); # Clear the article id so we get a new record.\n $new_article = array(\n 'Article' => array(\n 'user_id' => 1,\n 'author_id' => 1,\n 'title' => 'Second Test Article', \n 'body' => 'Second Test Article Body',\n 'ignored_field' => 1,\n 'published' => 'N', \n ),\n );\n $this->Article->save( $new_article );\n\n $updated_article = array(\n 'Article' => array(\n 'user_id' => 1,\n 'author_id' => 1,\n 'title' => 'Second Test Article (Newly Edited)', \n 'body' => 'Second Test Article Body (Also Edited)',\n 'ignored_field' => 0,\n 'published' => 'Y', \n ),\n );\n $this->Article->save( $updated_article );\n \n $last_audit = $this->Audit->find(\n 'first',\n array(\n 'contain' => array( 'AuditDelta' ),\n 'conditions' => array(\n 'Audit.event' => 'EDIT',\n 'Audit.model' => 'Article',\n 'Audit.entity_id' => $this->Article->id\n ),\n 'order' => 'Audit.created DESC',\n )\n );\n\n # There are 4 changes, but one to an ignored field\n $this->assertEqual( 3, count( $last_audit['AuditDelta'] ) );\n $this->assertEqual( 'Second Test Article', array_shift( Set::extract( '/AuditDelta[property_name=title]/old_value', $last_audit ) ) );\n $this->assertEqual( 'Second Test Article (Newly Edited)', array_shift( Set::extract( '/AuditDelta[property_name=title]/new_value', $last_audit ) ) );\n \n $this->assertEqual( 'Second Test Article Body', array_shift( Set::extract( '/AuditDelta[property_name=body]/old_value', $last_audit ) ) );\n $this->assertEqual( 'Second Test Article Body (Also Edited)', array_shift( Set::extract( '/AuditDelta[property_name=body]/new_value', $last_audit ) ) );\n \n $this->assertEqual( 'N', array_shift( Set::extract( '/AuditDelta[property_name=published]/old_value', $last_audit ) ) );\n $this->assertEqual( 'Y', array_shift( Set::extract( '/AuditDelta[property_name=published]/new_value', $last_audit ) ) );\n \n # No delta should be reported against the ignored field.\n $this->assertIdentical( array(), Set::extract( '/AuditDelta[property_name=ignored_field]', $last_audit ) );\n }", "title": "" }, { "docid": "4d1b600ca412881d3a9115267b7325ad", "score": "0.48677197", "text": "public function testImportingCreatesBooksAndNotes()\r\n {\r\n $bookCount = $this->bookRepository->countBooks();\r\n $noteCount = $this->noteRepository->countNotes();\r\n $this->assertEquals(0, $bookCount);\r\n $this->assertEquals(0, $noteCount);\r\n // Import file with x books and y notes\r\n $fileToImport = $this->getFileToImport(self::MINIMAL_CLIPPINGS_FILE);\r\n $books = $this->getBookList($fileToImport);\r\n $this->assertEquals(BookList::class, get_class($books));\r\n $this->noteSaver->storeNotes($books, $fileToImport->getUserId());\r\n // Confirm they are in the database\r\n $bookCount = $this->bookRepository->countBooks();\r\n $noteCount = $this->noteRepository->countNotes();\r\n $this->assertEquals(self::MINIMAL_CLIPPINGS_BOOK_COUNT, $bookCount);\r\n $this->assertEquals(self::MINIMAL_CLIPPINGS_NOTE_COUNT, $noteCount);\r\n }", "title": "" }, { "docid": "321b317f0f538e1d7661fbe691eda652", "score": "0.4867294", "text": "public function testSaveWithClonedEntity(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $article = $table->get(1);\n\n $cloned = clone $article;\n $cloned->unset('id');\n $cloned->setNew(true);\n $this->assertSame($cloned, $table->save($cloned));\n $this->assertEquals(\n $article->extract(['title', 'author_id']),\n $cloned->extract(['title', 'author_id'])\n );\n $this->assertSame(4, $cloned->id);\n }", "title": "" }, { "docid": "dc7eea9a0de0e7b77c9346f28a3c17e9", "score": "0.48620972", "text": "public function testTicketInsert()\n {\n /** @var Ticket $ticket */\n //$ticket = Ticket::createNewWithComment(1, \"Test Ticket\", \"This is a starting comment!\");\n $ticket = new Ticket();\n $ticket->setSubject(\"Test Ticket\");\n $ticket->setClientId(1);\n\n //$comment = new TicketActivityComment();\n $comment = new TicketComment();\n $comment->setBody(\"This is a test comment!\");\n\n $activity = new TicketActivity();\n $activity->setComment($comment);\n\n $ticket->setActivity([$activity]);\n\n /** @var Ticket $insertedTicket */\n $insertedTicket = $ticket->insert();\n $this->assertEquals(\"Test Ticket\", $insertedTicket->getSubject());\n\n $this->outputResults($insertedTicket);\n }", "title": "" }, { "docid": "18988330728c2cd6e52b44c25c6070a3", "score": "0.48413455", "text": "public function testSave()\n {\n // create storage adapter for testing.\n $adapter = new P4Cms_Record_Adapter;\n $adapter->setBasePath('//depot/')\n ->setConnection($this->p4);\n\n // create record for testing.\n $record = new P4Cms_Record;\n $record->setAdapter($adapter)\n ->setId(1);\n\n // create acl w. associated record.\n $acl = new P4Cms_Acl;\n $acl->setRecord($record);\n\n // modify acl and save\n // (add a role so we can make sure it's not saved)\n $acl->add(new P4Cms_Acl_Resource('test'))\n ->addRole('test-role')\n ->save();\n\n // now fetch acl from storage.\n $acl = P4Cms_Acl::fetch('1', $adapter);\n $this->assertTrue($acl instanceof P4Cms_Acl, \"Expected ACL instance from fetch.\");\n $this->assertTrue($acl->has('test'), \"Expected ACL to have 'test' resource.\");\n\n // ensure we don't have roles in storage.\n $this->assertFalse($acl->hasRole('test-role'));\n\n // ensure we can still save.\n $acl->add(new P4Cms_Acl_Resource('test2'))\n ->save();\n\n // fetch again from storage.\n $acl = P4Cms_Acl::fetch('1', $adapter);\n $this->assertTrue(count($acl->getResources()) === 2, \"Expected two resources.\");\n }", "title": "" }, { "docid": "f7d86ba28398d6b2785f4e6d2aea3fd4", "score": "0.48402873", "text": "public function testAddItemAtUsingPUT()\n {\n }", "title": "" }, { "docid": "5f69cba064cbfd38be4d2ad241bd8916", "score": "0.48338813", "text": "function testCrud() {\n $message = RethinkMessages::create(['title' => $this->randomString(), 'body' => $this->randomString()]);\n // Save it to the DB.\n $results = $message->save();\n\n // Checking we got the correct the document ID.\n $this->assertNotEmpty($results['generated_keys']);\n\n // Load the document from DB.\n $document = RethinkMessages::load(reset($results['generated_keys']));\n\n $this->assertEquals($document->get('title'), $message->get('title'));\n $this->assertEquals($document->get('body'), $message->get('body'));\n\n // Update the document.\n $document->set('title', 'new title')->save();\n\n $document = RethinkMessages::load(reset($results['generated_keys']));\n $this->assertNotEquals($document->get('title'), $message->get('title'));\n\n // Delete the document.\n $document->delete();\n\n $this->assertEmpty(RethinkMessages::load(reset($results['generated_keys'])));\n }", "title": "" }, { "docid": "b1991990b6dc39808492ac6eed9c9f85", "score": "0.48330095", "text": "public function testOnDatabase()\n {\n $q = $this->q;\n $q->insertInto( 'query_test' )\n ->set( 'id', 1 )\n ->set( 'company', $q->bindValue( 'eZ systems' ) )\n ->set( 'section', $q->bindValue( 'Norway' ) )\n ->set( 'employees', 20 );\n $stmt = $q->prepare();\n $stmt->execute();\n\n // check that it was actually correctly set\n $db = ezcDbInstance::get();\n $q = $db->createSelectQuery(); // get select query\n $q->select( '*' )->from( 'query_test' )\n ->where( $q->expr->eq( 'id', 1 ) );\n $stmt = $q->prepare();\n $stmt->execute();\n $result = $stmt->fetchAll();\n $this->assertEquals( 1, (int)$result[0][0] );\n $this->assertEquals( 'eZ systems', $result[0][1] );\n }", "title": "" }, { "docid": "8354409c42b6f892da7eb68f21e3312c", "score": "0.48319724", "text": "public function testInsertUpdateValidData()\n {\n $varcharVal = 'I just love a parade of characters that are good.';\n $charVal = 'XyZvE';\n $textVal = <<<TEXT\nLorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sodales euismod mi\nnon iaculis. Proin interdum orci lorem, at blandit nibh cursus non. Vestibulum\neget erat vel massa convallis fringilla. Ut molestie mauris nec nibh sagittis,\nnon rhoncus neque consectetur. Nunc laoreet viverra ante non imperdiet. Nunc ut\nnisl quis neque dapibus auctor et a metus. Curabitur accumsan rutrum libero, ut\ndictum lorem vestibulum ut. Mauris efficitur in dui at tempus. Vivamus\ntristique finibus purus sit amet convallis. Aliquam sollicitudin porta nisi, a\nbibendum massa congue vel. Ut blandit velit id pulvinar maximus. Nullam quis\nipsum eu ex mattis ultrices id sit amet mauris.\nTEXT;\n\n $dbo = new objtest1($this->db);\n\n $dbo->stringone = $varcharVal;\n $dbo->stringtwo = $charVal;\n $dbo->stringthree = $textVal;\n\n $dbo->numberone = 1245789865;\n $dbo->numbertwo = 2344.7435;\n $dbo->numberthree = 156151851365184631;\n $dbo->numberfour = 127;\n $dbo->numberfive = 4321.1234567;\n $dbo->numbersix = 2345.32;\n $dbo->numberseven = 45684.23;\n\n $dbo->dateone = '2010-07-04';\n $dbo->datetwo = '2010-07-04 13:14:12';\n $dbo->datethree = '2010-07-04 17:00-05';\n $dbo->timeone = '12:45';\n $dbo->timetwo = '15:23 EST';\n\n $dbo->jsonone = json_encode(['key1' => 'abcde', 'key2' => 'qwerty']);\n $dbo->yeahnay = 'Yes';\n $dbo->trueorfalse = true;\n $dbo->xypoint = [78.123, -54.568];\n $dbo->save();\n\n $newID = $dbo->id;\n\n $dbo = new objtest1($this->db);\n $dbo->load($newID);\n\n $this->assertEquals($varcharVal, $dbo->stringone);\n $this->assertEquals($charVal, $dbo->stringtwo);\n $this->assertEquals($textVal, $dbo->stringthree);\n\n $this->assertEquals(1245789865, $dbo->numberone); // Regular integer\n $this->assertEquals(2344.7435, $dbo->numbertwo); // Numeric (8, 4)\n $this->assertEquals(156151851365184631, $dbo->numberthree); // Big Int\n $this->assertEquals(127, $dbo->numberfour); // Small Int\n // $this->assertEquals(4321.1234567, $dbo->numberfive); // Dbl Prec\n // $this->assertEquals(2345.32, $dbo->numbersix); // Money\n // $this->assertEquals(45684.23, $dbo->numberseven); // Real\n\n $this->assertEquals('2010-07-04', $dbo->dateone->format('Y-m-d'));\n $this->assertEquals('2010-07-04 13:14:12', $dbo->datetwo->format('Y-m-d H:i:s'));\n // $this->assertEquals('2010-07-04 19:00:00-05', $dbo->datethree->format('Y-m-d H:i:s'));\n\n $this->assertEquals('12:45:00', $dbo->timeone);\n $this->assertEquals('15:23:00-05', $dbo->timetwo);\n\n $this->assertEquals('{\"key1\":\"abcde\",\"key2\":\"qwerty\"}', $dbo->jsonone);\n\n $this->assertEquals('Yes', $dbo->yeahnay);\n\n $this->assertTrue($dbo->trueorfalse);\n\n $this->assertCount(2, $dbo->xypoint);\n $this->assertEquals(78.123, $dbo->xypoint[0]);\n $this->assertEquals(-54.568, $dbo->xypoint[1]);\n }", "title": "" }, { "docid": "f50ed337a155188dd2cc1b8afd57895d", "score": "0.4829518", "text": "public function testEditPost() {\n\t\tRolesControllerTest::login($this);\n\t\t$this->testAction(\n\t\t\t'/search_boxes/search_boxes/edit/191',\n\t\t\tarray(\n\t\t\t\t'method' => 'post',\n\t\t\t\t'data' => array(\n\t\t\t\t\t'SearchBox' => array(\n\t\t\t\t\t\t'id' => '1',\n\t\t\t\t\t\t'frame_key' => 'frame_191',\n\t\t\t\t\t\t'created_user' => '1',\n\t\t\t\t\t\t'modified_user' => '1',\n\t\t\t\t\t\t'is_advanced' => '1',\n\t\t\t\t\t),\n\t\t\t\t\t'Frame' => array(\n\t\t\t\t\t\t'key' => 'frame_191',\n\t\t\t\t\t),\n\t\t\t\t\t'SearchBoxTargetPlugin' => array(\n\t\t\t\t\t\t'plugin_key' => array(\n\t\t\t\t\t\t\t0 => 'announcements',\n\t\t\t\t\t\t\t1 => 'bbses',\n\t\t\t\t\t\t\t2 => 'blogs',\n\t\t\t\t\t\t\t3 => 'circular_notices',\n\t\t\t\t\t\t\t4 => 'questionnaires',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'return' => 'contents'\n\t\t\t)\n\t\t);\n\t\t$this->assertTextEquals('edit', $this->controller->view);\n\n\t\tAuthGeneralControllerTest::logout($this);\n\t}", "title": "" }, { "docid": "927b357dfbb663f46e609b77bc1716fb", "score": "0.4827519", "text": "public function run()\n {\n DB::table('book')->insert([\n 'title' => Str::random(10),\n 'book_no' => rand(1,10),\n \"author_name\" => Str::random(10),\n \"publisher\" => Str::random(10),\n \"image_path\" => Str::random(100)\n ]);\n }", "title": "" }, { "docid": "299f5718230d1f54d7f01e59efd1ec7d", "score": "0.48268765", "text": "public function testInsertCar()\n {\n $car= new car();\n $car->make='Ford';\n $car->model='xi23id';\n $car->year=1995;\n\n\n $this->assertTrue($car->save());\n }", "title": "" }, { "docid": "3328d7036904c7581b6cc28d594d10e6", "score": "0.4823297", "text": "public function testSaveModelInsertsCorrectly()\n {\n // should insert\n $model = new Post; \n $model->post_id = 10;\n $model->title = \"A new post\";\n $model->contents = \"Here is some content\";\n $model->rating = 4;\n $model->date_created = date(\"Y-m-d H:i:s\", time()); \n\n $this->mapper->save($model);\n\n $freshModel = $this->mapper->find(['post_id' => 10], new Post);\n $this->assertSame(\"A new post\", $freshModel->title);\n }", "title": "" }, { "docid": "1b9135b62acabd9e9a2db1151ce6b1c4", "score": "0.4822664", "text": "public function testExample()\n {\n $car = factory(\\App\\Car::class)->make();\n $car->save();\n $this->assertTrue($car->save());\n }", "title": "" }, { "docid": "f467e4aba8506f55a769de5450f03fa1", "score": "0.48223406", "text": "function test_insert_duplicate()\n {\n $result = my_sql::insert(\"useraccount\", array(\"userEmail\", \"lastName\", \"firstName\"), array(\"[email protected]\", \"Evans\", \"Greg\"));\n $this->assertNotEquals(false, $result);\n\n //assert duplicate insert does not run correctly\n $result = my_sql::insert(\"useraccount\", array(\"userEmail\", \"lastName\", \"firstName\"), array(\"[email protected]\", \"Evans\", \"Greg\"));\n $this->assertEquals(false, $result);\n\n //assert validity of original insert data\n $expected = [\n [\"userEmail\" => \"[email protected]\", \"profileImageID\" => null, \"firstName\" => \"Greg\", \"lastName\" => \"Evans\", \"shippingAddressID\" => null, \"billingAddressID\" => null]\n ];\n $values = my_sql::select(\"*\", \"useraccount\", \"userEmail=:0\", array(\"[email protected]\"));\n $this->assertEquals($expected, $values);\n }", "title": "" }, { "docid": "be6302f7056a78ac6d61fae3fd9aac3a", "score": "0.48219848", "text": "public function testAdd()\n {\n // Add a new record\n $this->guestbook->add(\"Bob\", \"Hi, I'm Bob.\");\n \n // Get the entries\n $entries = $this->guestbook->viewAll();\n \n // Pop the last entry\n $entry = array_pop($entries);\n \n // Examine the last entry\n $this->assertTrue(isset($entry['name']));\n $this->assertTrue($entry['name'] == 'Bob');\n $this->assertTrue(isset($entry['message']));\n $this->assertTrue($entry['message'] == \"Hi, I'm Bob.\");\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "d30c757a07701342fc2e28592acc027b", "score": "0.0", "text": "public function edit($id)\n {\n //\n $designR = DB::table('designs')\n ->join('users', 'users.id', '=', 'designs.idUser')\n ->select('designs.*','users.id as userid',\n 'users.username')\n ->where('designs.id', '=', $id)\n ->get();\n\n $design = $designR[0];\n\n if($design->userid != auth()->user()->id){\n\n return redirect()->route('main');\n }\n\n return view('mschema', compact('design'));\n }", "title": "" } ]
[ { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.78550774", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "12344b4793bc2e378f8fdd2f04320aeb", "score": "0.7273195", "text": "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "title": "" }, { "docid": "4d5d18dc7cabac2506b6086630c9acb9", "score": "0.7242132", "text": "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "title": "" }, { "docid": "a3a195b464d234c71899dfdebe78664c", "score": "0.7170847", "text": "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "title": "" }, { "docid": "735e1e8b4f110a9df09910db5ed28525", "score": "0.70622855", "text": "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "title": "" }, { "docid": "df9ef4b827a35145a7d49229d8d654e6", "score": "0.7053459", "text": "public function edit()\n {\n return view('hirmvc::edit');\n }", "title": "" }, { "docid": "2700b4584dcb331a456886a0b54f1cac", "score": "0.6982539", "text": "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "title": "" }, { "docid": "7015d85230c410c83e5c3b96459d2488", "score": "0.69467914", "text": "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "c965649a7ba5f0e8f2fd7cd5676199ff", "score": "0.6941114", "text": "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "title": "" }, { "docid": "0b802a8c6fbeff606ae9845125b51b1f", "score": "0.6928077", "text": "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "title": "" }, { "docid": "7a650e1d62608ea65e940ca06f689f99", "score": "0.69019294", "text": "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68976134", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "8305d0cebc3fd201d190bc1ff4575a6f", "score": "0.6877213", "text": "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "title": "" }, { "docid": "f95123f624fcac74c93244c3dcd7923c", "score": "0.68636996", "text": "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "title": "" }, { "docid": "029c40433076476698bab79003ba1eac", "score": "0.68592185", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "title": "" }, { "docid": "0f6e23876619bd02375dcf677873df5a", "score": "0.68566656", "text": "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "title": "" }, { "docid": "58f182fa72be87d030c1b48e925f743d", "score": "0.6844697", "text": "public function edit($model, $form);", "title": "" }, { "docid": "40fdf360e2a2fe9a039cdea2bf794a48", "score": "0.68336326", "text": "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "title": "" }, { "docid": "e87e3665ac283ab07f5b91b9cb754a1f", "score": "0.6811471", "text": "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "title": "" }, { "docid": "72e898b8c2d147e0531320a9f99a3e5c", "score": "0.68060875", "text": "public function edit()\n { \n return view('admin.control.edit');\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "873a08d0f357fca631ccc7259052d9ce", "score": "0.68018645", "text": "public function edit()\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "56f882f09bfc4c18dddc6ba2d8e29555", "score": "0.6795623", "text": "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.6787701", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "9167ed1c94ca05e3aa0a462771337864", "score": "0.67837197", "text": "public function edit($id)\n {\n // show form edit user info\n }", "title": "" }, { "docid": "d44ef601c5e9f7e942e5a68e74ecc457", "score": "0.67791027", "text": "public function edit()\n {\n return view('escrow::edit');\n }", "title": "" }, { "docid": "b93606e8c8e9ed17a06d96c4b3b11fc2", "score": "0.677645", "text": "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "title": "" }, { "docid": "12bdbc0881bdb0537af82ab982da6faa", "score": "0.6768301", "text": "public function edit()\n {\n return view('commonmodule::edit');\n }", "title": "" }, { "docid": "05f57ca78e160cfe2110eccf7f3a10ea", "score": "0.6760122", "text": "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.67458534", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "af1ae147b46a5dbc0c8b9ec58527eeb0", "score": "0.67458534", "text": "public function edit()\n {\n return view('catalog::edit');\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.67443407", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "f9e5424b4794ef21c15b578cbc28a1d4", "score": "0.67425704", "text": "public function actionEdit($id) { }", "title": "" }, { "docid": "8b27a5d0d56573cd0526956c4be2a450", "score": "0.6739898", "text": "public function edit()\n {\n return view('admincp::edit');\n }", "title": "" }, { "docid": "420751bbdaa6a3e9ce74ca98cfc852ff", "score": "0.6735328", "text": "public function edit()\n {\n return view('scaffold::edit');\n }", "title": "" }, { "docid": "0c03561e0ce1cb5632190d2eb5636b81", "score": "0.6725465", "text": "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "title": "" }, { "docid": "59b6b275f7f7bdc3e6848165ec89de06", "score": "0.6712817", "text": "public function edit()\n {\n return view('Person.edit');\n }", "title": "" }, { "docid": "cc9a7c5c0bba9badc64824e64ad66ec7", "score": "0.6693891", "text": "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "title": "" }, { "docid": "08fdc9a6d2cb6c51ef14f944a771fea4", "score": "0.6692419", "text": "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "title": "" }, { "docid": "530ff07fca3d2cdb52201dd4570056f6", "score": "0.6688581", "text": "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "title": "" }, { "docid": "2842c83192ad21ca42ea8be34a5324f1", "score": "0.66879624", "text": "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "title": "" }, { "docid": "985a86faecdde4f47bba95d71e646057", "score": "0.6687282", "text": "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "title": "" }, { "docid": "4f3dccb85a68cbb954df9ad9a4d0c25d", "score": "0.6684741", "text": "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "title": "" }, { "docid": "b53d80e937efeb059b69199175992b44", "score": "0.6682786", "text": "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "title": "" }, { "docid": "772ff40e86b6072150a529eefbe46c86", "score": "0.6668777", "text": "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "title": "" }, { "docid": "a866851a953591797ad217ce1686028b", "score": "0.6668427", "text": "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6665287", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6665287", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "e79377a38e4c0fdd514a4167f11b8442", "score": "0.66610634", "text": "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "title": "" }, { "docid": "0cf3ddf2600f6d70303c0ca4aa94aa89", "score": "0.6660843", "text": "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "title": "" }, { "docid": "fdab95c905028bb144a7c323dab4884b", "score": "0.66589665", "text": "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "title": "" }, { "docid": "080eb7499f3bccf04762f81a141f1e34", "score": "0.66567147", "text": "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "title": "" }, { "docid": "f61beedf1cb6c464918dfa2ec389b88b", "score": "0.66545695", "text": "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "title": "" }, { "docid": "f5568b3447ac8c8c12f9bc6a8de66b3c", "score": "0.66527975", "text": "public function edit($id)\n {\n return view('models::edit');\n }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6642529", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "7ca622cf6dbeec972ce3ab725ada0358", "score": "0.6633056", "text": "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "title": "" }, { "docid": "05d5ea89da5bc76e1a1148ffdc9d5801", "score": "0.6630304", "text": "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "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": "ec626b485a600d64d167d3b54d2af93f", "score": "0.66192114", "text": "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "title": "" }, { "docid": "ccaf467c5fc185957b7bbec44b0dddcf", "score": "0.6619003", "text": "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "title": "" }, { "docid": "b5f11e2c797c5ed655b45c6b0df67626", "score": "0.66153085", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "d6c2c7e0ddbac0b65be0ee74a7fcd796", "score": "0.6614968", "text": "public function edit($id)\n {\n return view('consultas::edit');\n }", "title": "" }, { "docid": "bec91377e793a1e58fadee263ea69b6e", "score": "0.6609744", "text": "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.66086483", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "f705c05684e4a60636265036a98fcf09", "score": "0.66060555", "text": "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "title": "" }, { "docid": "73169648ddd0200192761e17f4dfed05", "score": "0.6596137", "text": "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "title": "" }, { "docid": "b3cc35921277d5c959b0d4b0de6d3d0f", "score": "0.65950733", "text": "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "title": "" }, { "docid": "e7be58945b899b23f7cc223134375494", "score": "0.6594648", "text": "public function edit() {\n return view('routes::edit');\n }", "title": "" }, { "docid": "6b57f743c86e1cb53617211701b2f779", "score": "0.65902114", "text": "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "title": "" }, { "docid": "4d4834770663719d1d6fa92e65878895", "score": "0.6589043", "text": "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "1c60b7ff7cd4005ccd1de1562140d086", "score": "0.6587102", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a6c6b148776a004b9feea4845a365f72", "score": "0.65799844", "text": "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "title": "" }, { "docid": "81d1f6f06bfcdaa0b1c2aa0910b87036", "score": "0.65799403", "text": "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "title": "" }, { "docid": "95e99992e10680bf999526cf4d94a731", "score": "0.65799177", "text": "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "title": "" }, { "docid": "c1518fb861e052fa4f53eaaa8fcf65df", "score": "0.657708", "text": "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "title": "" }, { "docid": "fc385869569abe1127cb801f92e4d8a2", "score": "0.65760696", "text": "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "title": "" }, { "docid": "1458051dfc97d0a20c103d39be5d2324", "score": "0.65739626", "text": "public function edit()\n {\n return view('website::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "7a2a16aa982fa32e1bbf88f19cbc245d", "score": "0.6567826", "text": "public function edit()\n {\n return view('initializer::edit');\n }", "title": "" }, { "docid": "ce8838daca364c19746373e3d442ca46", "score": "0.65663105", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.65660435", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "dafb67bfcec13ce7ccc2d28dc5d02dc8", "score": "0.65615267", "text": "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\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": "6523d6126b9b35352d6e67eca4d76647", "score": "0.65576506", "text": "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "title": "" }, { "docid": "9032cc93e2789bb98c62248bccbec226", "score": "0.655686", "text": "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "title": "" }, { "docid": "3fa16587d81f6f3170fd8d7c55fc57c9", "score": "0.6556527", "text": "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "title": "" }, { "docid": "abfaba17709e0fd3b8f201341ba593da", "score": "0.6555543", "text": "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "title": "" }, { "docid": "f0635c3926f56ba925042e937788c12f", "score": "0.6555445", "text": "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "title": "" }, { "docid": "f02b43ff1accd9cadee724fad05480c8", "score": "0.65552044", "text": "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "title": "" }, { "docid": "5ae1d13c46c87141909390a24f3cd093", "score": "0.65543956", "text": "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "title": "" }, { "docid": "61c9cefa779d8688643cb83ba73b2c77", "score": "0.65543705", "text": "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "title": "" }, { "docid": "0888eb9ecf2df4527b7e452af133b163", "score": "0.6548264", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "131a66068bf3a29035ad63b0b9508d37", "score": "0.65475875", "text": "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "title": "" }, { "docid": "7baf494547bacaa08c51d0b12666cfb3", "score": "0.65447706", "text": "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}", "title": "" } ]
23008785cfdc7303934625866a4eb76a
Load all files to container from $dir according by strategy
[ { "docid": "397158a027d1d8366b1cfef3d4e4bf4d", "score": "0.0", "text": "public function load(\n string $dir,\n array $excludeFiles = [],\n string $strategy = DirHelper::SCAN_BFS,\n string $structure = self::STRUCTURE_MERGE\n ): self {\n $mapping = [];\n if (StringHelper::contains($dir, ['@'])) {\n $dir = App::getAlias($dir);\n }\n if (!is_dir($dir)) {\n throw new \\InvalidArgumentException('Invalid dir parameter');\n }\n\n $dir = DirHelper::formatPath($dir);\n $files = DirHelper::glob($dir, '*.php', $strategy);\n foreach ($files as $file) {\n if (! is_readable($file) || ArrayHelper::isIn($file, $excludeFiles)) {\n continue;\n }\n $loadedConfig = require $file;\n if (!\\is_array($loadedConfig)) {\n throw new \\InvalidArgumentException('Syntax error find in config file: ' . $file);\n }\n $fileName = DirHelper::basename([$file]);\n $key = current(explode('.', current($fileName)));\n switch ($structure) {\n case self::STRUCTURE_SEPARATE:\n $configMap = [$key => $loadedConfig];\n break;\n case self::STRUCTURE_MERGE:\n default:\n $configMap = $loadedConfig;\n break;\n }\n $mapping = ArrayHelper::merge($mapping, $configMap);\n }\n $this->properties = $mapping;\n return $this;\n }", "title": "" } ]
[ { "docid": "cd566a85280fff248867d8ccf73c3f20", "score": "0.7099933", "text": "private function load()\n\t{\n\t\tforeach ($this->dirs_to_load as &$dir_to_load) {\n\t\t\t$dir_to_load = $this->base_dir . '/' . $dir_to_load . '/';\n\t\t}\n\n\t\tunset($dir_to_load);\n\t\t$this->finder->files()\n\t\t\t->in($this->dirs_to_load)\n\t\t\t->name('*.php');\n\n\t\tforeach ($this->finder as $file) {\n\t\t\trequire_once $file->getRealPath();\n\t\t}\n\t}", "title": "" }, { "docid": "cce329a5812f6e7eadae2127ab7e2023", "score": "0.67421764", "text": "function valerie_load_dir_files($dirs) {\n foreach ((array) $dirs as $dir) {\n if (is_dir($dir)) {\n foreach(scandir($dir) as $file) {\n if (is_file($dir . $file)) {\n include_once $dir . $file;\n }\n if (is_file($dir . $file .'/config.php')) {\n include_once $dir . $file .'/config.php';\n }\n }\n }\n }\n}", "title": "" }, { "docid": "9211d09de5e5711d3fa716d3f046f769", "score": "0.66064966", "text": "public function loadConfigs()\n {\n $filesList = new \\FilesystemIterator($this->basePath, \\FilesystemIterator::SKIP_DOTS);\n foreach ($filesList as $fileInfo):\n if ($fileInfo->isFile()) {\n $this->loadConfig($fileInfo);\n }\n endforeach;\n }", "title": "" }, { "docid": "4c9109b84a697493a23798a3ea213ae5", "score": "0.64166665", "text": "function loadFiles()\n {\n $files = scandir($this->_dir);\n foreach ($files as $file)\n {\n $filename = $this->_dir . $file;\n $this->_files[$file] = $this->getFileInfo($filename);\n }\n }", "title": "" }, { "docid": "7ed66d4f729687420d6c9495cf3aee43", "score": "0.63710165", "text": "private function loadResourceClasses()\n\t{\n foreach ($this->dirs as $dir) {\n foreach (Finder::findFiles('*.php')->from($dir) as $path => $file) {\n require_once $path;\n }\n }\n\t}", "title": "" }, { "docid": "2f1eba6d0e71646be48c99a520f28d14", "score": "0.63495284", "text": "public function loadFiles();", "title": "" }, { "docid": "ed2b5bcd5df0052cfabb3f03c14cece9", "score": "0.61941075", "text": "private function loadFiles()\n {\n $this->loadAdpPlayers();\n $this->loadProjectedScorePlayers();\n $this->loadDraftInfo();\n }", "title": "" }, { "docid": "aba9165488c91387d8800cdc14d67c72", "score": "0.61847043", "text": "protected function load()\n {\n $paths = supportCollector(config('route.paths'));\n $router = $this->app['router'];\n\n $paths\n ->flatMap(function ($path) {\n return $this->files->glob($path, GLOB_ONLYDIR);\n })\n ->flatMap(function ($path) {\n return $this->files->files($path);\n })\n ->filter()\n ->map(function ($file) {\n return $this->getClassFromFilePath($file);\n })\n ->filter()\n ->each(function ($provider) use ($router) {\n $this->convertProviderToRoutes($provider, $router);\n });\n }", "title": "" }, { "docid": "cfa9834a7a212f5f1e63d45a94fb5fe1", "score": "0.61823064", "text": "private function loadFiles($dir)\n {\n $originalDir = $dir;\n $dir = realpath($dir);\n $directory = dir($dir);\n\n if (empty($directory)) {\n throw new RuntimeException(\n 'Could not open directory: ('\n . gettype($originalDir) . ') ' . var_export($originalDir)\n );\n }\n\n while ($file = $directory->read()) {\n if (in_array($file, array('.', '..'))) {\n continue;\n }\n\n $path = \"{$dir}/{$file}\";\n\n if (is_dir($path)) {\n $this->loadFiles($path);\n continue;\n }\n\n if (preg_match('/\\.php$/', $file)) {\n include_once $path;\n }\n }\n }", "title": "" }, { "docid": "6db976344b76b2a047702ba68b71497b", "score": "0.616745", "text": "public function runLoadersBoot()\n {\n // the config files should be loaded first from all the directories in their own loop\n $this->loadConfigsFromShip();\n $this->loadMigrationsFromShip();\n $this->loadViewsFromShip();\n $this->loadConsolesFromShip();\n\n // > iterate over all the containers folders and autoload most of the components\n foreach (ShipButler::getContainersNames() as $containerName) {\n $this->loadConfigsFromContainers($containerName);\n $this->loadLocalsFromContainers($containerName);\n $this->loadOnlyMainProvidersFromContainers($containerName);\n $this->loadMigrationsFromContainers($containerName);\n $this->loadConsolesFromContainers($containerName);\n $this->loadViewsFromContainers($containerName);\n }\n\n $this->loadFactoriesFromContainers();\n }", "title": "" }, { "docid": "afa1d9a7d2dd40c0646c827ffe7d6f55", "score": "0.6045679", "text": "public function loadFiles()\n {\n\n foreach ($this->_files as $filePath) {\n /**\n * Check if the file specified even exists\n */\n if (file_exists($filePath)) {\n\n require $filePath;\n }\n }\n }", "title": "" }, { "docid": "6619b87f23afa278be3adfd8b4b98cc4", "score": "0.60229045", "text": "private function loadConfigFiles(): void\n {\n $configDirPath = __DIR__.'/../config';\n $filenames = scandir($configDirPath);\n \n foreach ($filenames as $filename) {\n if ($filename === '..' || $filename === '.') {\n continue;\n }\n $filePath = $configDirPath . \"/\" . $filename;\n \n $this->configList[explode(\".\", $filename)[0]] = include $filePath;\n }\n \n }", "title": "" }, { "docid": "f7acb382fb96dbffc3119765b6bec7fc", "score": "0.5945418", "text": "protected function cmsLoadConfigs()\n {\n $sources = $this->loadPackages(SOURCE_CONFIGS);\n\n foreach ($sources as $group => $dir) {\n\n $configs = File::glob($dir . '/*.php');\n\n foreach ($configs as $config) {\n\n $fileName = pathinfo($config, PATHINFO_FILENAME);\n\n $this->mergeConfigFrom($config, \"{$group}.{$fileName}\");\n\n $this->publishConfig($group, $config, $fileName);\n }\n }\n }", "title": "" }, { "docid": "61d592be67df35b92d8821165a72580e", "score": "0.5932868", "text": "protected function loadFromDir($dir)\n {\n $dir = rtrim(realpath($dir), '/');\n\n foreach (new DirectoryIterator('glob://'.$dir.'/*.php') as $file) {\n $cleaner = $this->appNamespace.str_replace(\n ['/', '.php'],\n ['\\\\', ''],\n Str::after($file->getPathname(), $this->appPath)\n );\n\n $this->pushCleaner($cleaner);\n }\n }", "title": "" }, { "docid": "533f4f19e97778d98fea5649119fe585", "score": "0.5904808", "text": "public function load(array $directories);", "title": "" }, { "docid": "c94d7110c2f1f0488805a2dcc79e4ee6", "score": "0.5902053", "text": "public static function load($dir)\n {\n // find all of the files\n foreach(glob($dir . '/*.php') as $file) {\n // get the base file name to generate the key\n $key = basename($file, '.php');\n // include the values and add them to the key\n static::$config[$key] = include($file);\n }\n }", "title": "" }, { "docid": "b27370df11475eb18664d129e5bc660c", "score": "0.58802307", "text": "public function loadCustomClasses($dir) {\n $files = scandir($this->config['customPath'] . $dir);\n foreach ($files as $file) {\n if (preg_match('/.*?\\.class\\.php$/i', $file)) {\n include_once($this->config['customPath'] . $dir . '/' . $file);\n }\n }\n }", "title": "" }, { "docid": "e38ef5755999cd087ee3c413305128fa", "score": "0.58210987", "text": "private static function loadPackages()\n {\n $path = dirname( __FILE__ );\n $files = glob( $path . '/packages/*.php' );\n\n foreach ($files as $file) {\n include_once $file;\n }\n\n }", "title": "" }, { "docid": "ac7c914dfac4449cc4abcdb60f196860", "score": "0.58091646", "text": "function load_bases () {\n\t\t$files = glob( \"app/bases/Base*.php\" );\n\t\tforeach ( $files as $file ) require_once( $file );\n\t}", "title": "" }, { "docid": "23b6af722c165fe7ac7a7876cb2c16ca", "score": "0.5805181", "text": "public function loadFiles() {\n\n\t\tforeach($this->_files as $filePath) {\n\n\t\t\tif(is_file($filePath)) {\n\n\t\t\t\trequire_once $filePath;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b87d840401fbe4bac3789b697e45804c", "score": "0.5788469", "text": "private static function _load($path) {\n\n if (($content = scandir($path)) === false) {\n\n log_message(\"error\", \"[XCMS] Hooks directory not found.\");\n return;\n\n }\n\n foreach ($content as $candidate) {\n\n // Skips obsolete options\n if ($candidate == \".\" || $candidate == \"..\") {\n continue;\n }\n\n // Skip directories\n if (is_dir($path . $candidate)) {\n continue;\n }\n\n require_once($path . $candidate);\n\n }\n\n }", "title": "" }, { "docid": "87452c46d0c5029a49c1c2ca16aa14a8", "score": "0.5780358", "text": "private function fillData(){\n\n // load all files in this directory\n $configFiles = scandir($this->path);\n foreach ($configFiles as $file) {\n if ($file != \".\" && $file != \"..\") {\n $singleConfigArray = include $this->path.'/'.$file;\n $this->data = array_merge($this->data, $singleConfigArray);\n }\n }\n\n }", "title": "" }, { "docid": "7abb19f9870221bc4685e0525f128f95", "score": "0.57693034", "text": "public function load() {\n\n\t\t$files = array(\n\t\t\t'core/swa-functions.php',\n\t\t\t'core/swa-template.php',\n\t\t\t'core/swa-ajax.php',\n\t\t\t'core/swa-widget.php',\n\t\t);\n\n\t\tforeach ( $files as $file ) {\n\t\t\trequire_once $this->path . $file;\n\t\t}\n\t}", "title": "" }, { "docid": "89b74a8387e597dacfba6940247859fd", "score": "0.57606834", "text": "public function loadObjects($folder, array $options = array())\n {\n // Read the current files\n $before = $this->getAllFiles($options['path'] . $folder);\n $after = array();\n\n // Grab the stuff\n $c = $this->modx->newQuery($options['class']);\n if (isset($options['where'])) $c->where(array($options['where']));\n $collection = $this->modx->getCollection($options['class'], $c);\n\n $this->modx->getCacheManager();\n\n // Loop over stuff\n $pk = isset($options['primary']) ? $options['primary'] : '';\n foreach ($collection as $object) {\n /** @var xPDOObject $object */\n $file = $this->generate($object, $options);\n if( empty($pk) ) {\n $path = $object->getPrimaryKey();\n } else if (is_array($pk)) {\n $paths = array();\n foreach ($pk as $pkVal) {\n $paths[] = $object->get($pkVal);\n }\n $path = implode('.',$paths);\n } else {\n $path = $object->get($pk);\n }\n\n $ext = (isset($options['extension'])) ? $options['extension'] : '.yaml';\n $fn = $folder . DIRECTORY_SEPARATOR . $path . $ext;\n $after[] = $fn;\n\n if (file_get_contents($fn) != $file) {\n $this->modx->cacheManager->writeFile($fn, $file);\n }\n }\n\n $old = array_diff($before, $after);\n foreach ($old as $oldFile) {\n unlink($oldFile);\n }\n }", "title": "" }, { "docid": "40ca781f8454be3b938620ac9914bc7f", "score": "0.5746895", "text": "private function load_files() {\n\t\t\t/* Classes */\n\t\t\trequire_once SJ_TIMESHEET_DIR . 'classes/class-sj-timesheet-shortcode.php';\n\t\t\trequire_once SJ_TIMESHEET_DIR . 'classes/class-sj-timesheet-email.php';\n\t\t}", "title": "" }, { "docid": "af9dcc1236bf6e6d2c210fa9d0c180f5", "score": "0.5740036", "text": "protected function autoload()\n {\n $directory = $this->config('directory');\n\n // Load files\n if ($files = $this->config('autoload.files', false)) {\n foreach ($files as $file) {\n include_once $directory.'/'.$file;\n }\n }\n\n // Register directories with the ClassLoader\n if ($classmap = $this->config('autoload.classmap', false)) {\n ClassLoader::addDirectories(array_map(function($dir) use ($directory)\n {\n return $directory.'/'.$dir;\n }, $classmap));\n }\n }", "title": "" }, { "docid": "132b71ccd8aabaf420af286dcd1609a1", "score": "0.56973416", "text": "function gf_load_class_by_dir_ex($_str_class_comm_dir){\n\n\t\t/* all dir\n\t\t *\n\t\t */\n\t\t$_ar_file = array();foreach (glob($_str_class_comm_dir.'*') as $file){if(is_dir($file)){$_ar_file [] = $file;}else{require_once($file);}\n\n\t\t/* load all file\n\t\t *\n\t\t */\n\t\tasort($_ar_file);foreach($_ar_file as $dir){foreach(scandir($dir) as $file){$_php_file = $dir.'/'.$file;if(is_file($_php_file)){require_once($_php_file);}}}}\n\t}", "title": "" }, { "docid": "abf3bc8cf064981ddb8801e7491e4f61", "score": "0.5684192", "text": "public function requireServices($dir)\n {\n foreach (scandir($dir) as $file) {\n if (preg_match('#[^_].*\\\\.php#', $file)) {\n require_once \"$dir/$file\";\n }\n }\n }", "title": "" }, { "docid": "23b8076c82f6e08979db448fb2060692", "score": "0.56703734", "text": "private function loadComponents()\n {\n foreach (glob(dirname(__FILE__) . '/components/*') as $file) {\n try {\n $fqcn = 'Nerrad\\\\WPCLI\\\\EE\\\\services\\\\components\\\\' . $this->getClassnameFromFilePath($file);\n $component = new $fqcn;\n //if component is an instance of ComponentInterface then we don't set it on the component array.\n if ($component instanceof ComponentInterface) {\n $this->components[$component->componentName()] = $component;\n }\n } catch (Exception $e) {\n WP_CLI::error($e->getMessage());\n }\n }\n }", "title": "" }, { "docid": "c76020ec82aac2095faa4818ad15ca3e", "score": "0.5664603", "text": "public function fetch_tests()\n {\n if($this->recursive == true)\n {\n $this->files = $this->rsearch($this->directory, \"/^.*\\.src$/\");\n }\n else\n {\n $regex = $this->directory . \"/*.src\";\n $this->files = glob($regex);\n }\n }", "title": "" }, { "docid": "dc2686b84ab61ed2f5a6e4722a8b1c1f", "score": "0.56367505", "text": "public function run()\n {\n $strategyRoot = ConfigManager::instance()->getConfigValue(BasicConstants::CONFIG_STRATEGY_OUTPUT_DIR);\n if(!FileHelper::createDir($strategyRoot))\n {\n ServerLogger::instance()->writeStrategyLog(Error, 'There is not strategy dir :' . $strategyRoot);\n return ERR_STRATEGY_DIR;\n }\n //$strategyBackupDir = EL_SERVER_PATH . 'serverTest/strategyBackup';\n $strategyBackupDir = ConfigManager::instance()->getConfigValue(BasicConstants::CONFIG_STRATEGY_OUTPUT_BACKUP_DIR);\n if(!FileHelper::createDir($strategyBackupDir))\n {\n ServerLogger::instance()->writeStrategyLog(Error, 'There is not strategy backup dir :' . $strategyBackupDir);\n return ERR_STRATEGY_DIR;\n }\n\n while(true)\n {\n $fileList = scandir($strategyRoot);\n foreach($fileList as $jsonFile)\n {\n $filePath = $this->getValidPath($strategyRoot, $jsonFile);\n if(false === $filePath)\n {\n ServerLogger::instance()->writeStrategyLog(Info, 'The file is not ready strategy file : ' . $jsonFile);\n continue;\n }\n\n $result = $this->strategyManager->handleStrategy($filePath);\n if(OK == $result)\n {\n $newName = str_replace(StrategyConstants::STRATEGY_FILE_READY_STATUS,\n StrategyConstants::STRATEGY_FILE_SUCCESS_STATUS, $jsonFile);\n }\n else\n {\n $newName = str_replace(StrategyConstants::STRATEGY_FILE_READY_STATUS,\n StrategyConstants::STRATEGY_FILE_FAILED_STATUS, $jsonFile);\n }\n\n $newPath = $strategyBackupDir . DIRECTORY_SEPARATOR . $newName;\n if(false === rename($filePath, $newPath))\n {\n //重命名失败要做些防护,防止重复创建\n ServerLogger::instance()->writeStrategyLog(Error, 'Failed to rename strategy Name : ' . $jsonFile);\n continue;\n }\n\n usleep(StrategyConstants::READ_STRATEGY_FILE_INTERVAL);\n }\n\n //sleep(3600);\n break;\n }\n }", "title": "" }, { "docid": "b058854e15a9ce07dbebffcc752b426e", "score": "0.56326216", "text": "public static function loadServices(){\n\t\tself::fill_fields();\n\t\tforeach (self::$services as $classname) {\n\t\t\trequire_once __DIR__.\"/../service/\".$classname;\n\t\t}\n\t}", "title": "" }, { "docid": "44c79690b09e8b1ba668dd86864b6a09", "score": "0.5624923", "text": "protected function loadComponentsConfigFiles()\n {\n // First we load the component's config files\n\n $installedComponents = $this->getInstalledComponents();\n\n foreach ($installedComponents as $componentName => $componentPath) {\n $file = $componentPath.'/frenzy/config.yml';\n\n if (!is_file($file)) {\n $this->_config->set('components.'.$componentName, []);\n\n continue;\n }\n\n $this->_config->load(['file' => $file, 'loadInKey' => 'components.'.$componentName, 'processImports' => true]);\n }\n }", "title": "" }, { "docid": "f0be7132e0f2d0f71d11d8a809d1c7bf", "score": "0.56234676", "text": "protected function cmsLoadViews()\n {\n $sources = $this->loadPackages(SOURCE_VIEWS);\n foreach ($sources as $group => $dir) {\n # code...\n $this->loadViewsFrom($dir, $group);\n }\n }", "title": "" }, { "docid": "44ee8d769d127844fce3e2507c67e3f1", "score": "0.56004965", "text": "public function load()\n {\n $fileList = new DirectoryIterator( $this->repository );\n \n foreach( $fileList as $file )\n {\n if ( ! $file->isDir() && ! $file->isDot() )\n {\n $fileName = $file->getFileName();\n $part = explode( '.' , $fileName );\n \n if ( count( $part ) == 3 && $part[0] == 'type' && $part[2] == 'xml' )\n {\n $type = $part[1];\n $this->resourceTypeList[ $type ] = new ResourceType( $this->repository . $fileName );\n }\n }\n }\n }", "title": "" }, { "docid": "617b05262ddb2ac86b7f58a6729a6b27", "score": "0.5584952", "text": "function load()\n {\n $this->loadFiles();\n }", "title": "" }, { "docid": "b287000214cbdbe49e8eb93fe0bf70f7", "score": "0.55489904", "text": "public function require_files() {\n\n\t\trequire_once dirname( __FILE__ ) . '/endpoints/class-endpoint.php';\n\n\t\tforeach ( $this->paths as $path ) {\n\t\t\t$endpoints = glob( $path . '/*.php' );\n\n\t\t\t// Sort by strlen because parent classes need to be loaded\n\t\t\t// before children classes\n\t\t\tusort( $endpoints, function( $a, $b ){\n\t\t\t\treturn strlen( $a ) - strlen( $b );\n\t\t\t});\n\n\t\t\t// Load the endpoints\n\t\t\tforeach( $endpoints as $endpoint ) {\n\t\t\t\trequire_once $endpoint;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7de2cc3952abdf355ca1390404342b5e", "score": "0.5547532", "text": "public static function load($name){\n $cnt = count(self::$dirs);\n\t\tfor($i = 0; $i < $cnt; $i++)\n\t\t\tif($file = self::classFileExists($name, $i)) {\n\t require_once $file;\n\t return;\n \t}\n\t}", "title": "" }, { "docid": "29c5604ae16af0698bc2aae801f75b92", "score": "0.5536521", "text": "public static function load_all(){\n\t\tEConfig::$data = array();\n\t\t//enters in conf directory\n\t\tchdir(ELoader::$config_path);\n\t\t//parse every single conf file and place it in an associative array\n\t\tforeach(glob(\"*\") as $filename){\n\t\t\t$name = EFileSystem::get_file_name($filename);\n\t\t\tEConfig::$data[$name] = EConfig::parse_file($filename);\n\t\t}\n\t}", "title": "" }, { "docid": "afa35bf4450a43cddf2e4539bf4924e4", "score": "0.5535778", "text": "public function cycleFiles(){\n\n\t\tforeach (glob($this->data_local .\"*\") as $filename) {\n\n\t\t\t$process_file = true;\n\t\t\tif(isset($this->advertiser_mapping)){\n\t\t\t\t$process_file = !preg_match($this->advertiser_mapping,$filename);\t\n\t\t\t}\n\n\t\t\tif($process_file){\n\t\t\t \t$this->readCSVFile($filename);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "95389c6da15752911e4edcff86fe788d", "score": "0.55275875", "text": "public function load(array $configs, ContainerBuilder $container)\n {\n $configuration = new Configuration();\n \n $processedConfig = $this->processConfiguration( $configuration, $configs );\n \n $container->setParameter('directory', $processedConfig['directory']);\n }", "title": "" }, { "docid": "a777f0b818f011740d644a5b735f66d4", "score": "0.5524474", "text": "private function mon_autoloader()\n {\n $dossierClasse = array('modeles/', 'libs/', 'controllers/');\n\n foreach ($dossierClasse as $dossier) {\n foreach (array_diff(scandir('./' . $dossier), array('.', '..')) as $file) {\n if (file_exists('./' . $dossier . $file)) {\n require_once('./core/Router.php');\n require_once('./modeles/Modele.php');\n require_once('./' . $dossier . $file);\n }\n }\n }\n }", "title": "" }, { "docid": "a56d9e6f7cf451f8d87af78de5795338", "score": "0.5472827", "text": "function init_files() {\n\t$filenames = array(\n\t\t'setup.php',\n\t\t'widgets/widget-areas.php',\n\t\t'support/formatting.php',\n\t\t'support/load-assets.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/nav.php',\n\t\t'structure/post.php',\n\t);\n\n\tload_specified_files( $filenames );\n}", "title": "" }, { "docid": "acd3df77b65340ca5d96b444d90cb1ec", "score": "0.54668033", "text": "protected function loadSources() {\n if ($this->loaded === true) {\n return;\n }\n foreach ($this->sources as $source) {\n /* @var $source \\Royalcms\\Component\\DirectoryHasher\\Source\\SourceInterface */\n $this->result->addFileResults(\n $source->getFileResults()\n );\n }\n $this->loaded = true;\n }", "title": "" }, { "docid": "153a13a3f8a69e162ad8de7e77d42c3a", "score": "0.54653883", "text": "protected function loadModules()\n {\n $moduleMask = implode(\n DIRECTORY_SEPARATOR,\n array(\n $this->appPath->root()->get(),\n 'src',\n $this->contextName.'Module.php',\n )\n );\n\n foreach ($this->fileSystem->glob($moduleMask) as $filePath) {\n $class = $this->loadModule($filePath);\n $class->build($this->containerBuilder);\n }\n }", "title": "" }, { "docid": "1621bddf8f86b33116aa63b31d70d03d", "score": "0.5462419", "text": "public function loadAllDemoContent() : void {\n foreach ($this->getCollectionGraph() as $collection_name => $graph_item) {\n $collection = $this->collections[$collection_name];\n foreach ($collection['content'] as $content_item) {\n try {\n $demo_dir = $this->moduleHandler->getModule($collection['module'])->getPath() . DIRECTORY_SEPARATOR . static::DIRECTORY;\n $yaml_content_dir = $demo_dir . DIRECTORY_SEPARATOR . 'content' . DIRECTORY_SEPARATOR;\n $demo_item = $yaml_content_dir . $content_item;\n if (is_dir($demo_item)) {\n $files = $this->discoverFiles($demo_item);\n if (!empty($files)) {\n $this->contentLoader->setContentPath($demo_dir);\n foreach ($files as $file) {\n $filename = str_replace($yaml_content_dir, '', $file->uri);\n $this->contentLoader->loadContent($filename);\n }\n }\n }\n else {\n $this->contentLoader->setContentPath($demo_dir);\n $this->contentLoader->loadContent($content_item);\n }\n }\n catch (\\Exception $exception) {\n $this->messenger->addError($exception->getMessage());\n watchdog_exception('tide_demo_content', $exception);\n return;\n }\n }\n }\n }", "title": "" }, { "docid": "8df50d3ade9a912d76b38da275450e6c", "score": "0.5462254", "text": "function __loadconfigs()\n {\n if (($_dir = opendir(PATH_CONFIG)) === false)\n {\n echo \"Fatal error - couldn\\'t open config path \" . CONFIG_PATH . \"<br>\";\n exit(1);\n }\n\n while ($_entry = readdir($_dir))\n {\n if (substr($_entry, 0, 1) == \".\")\n continue;\n\n $_ext = substr($_entry, (strlen($_entry) - strlen(CONFIG_EXT)));\n \n if ($_ext !== CONFIG_EXT)\n continue;\n\n include(__buildpath(Array(PATH_CONFIG, $_entry)));\n }\n\n closedir($_dir);\n }", "title": "" }, { "docid": "cda48a70faca0099e709dad708ab3359", "score": "0.5453537", "text": "private function resolveFiles()\n {\n $this->files = [];\n\n if ($this->isHeadValid()) {\n $cmd = new GetStagedFiles($this->repo->getRoot());\n $formatter = new FilterByStatus(['A', 'M']);\n $result = $this->runner->run($cmd, $formatter);\n $this->files = $result->getFormattedOutput();\n }\n }", "title": "" }, { "docid": "b09e0b62e74d0218b95cbebea2ed2b89", "score": "0.545146", "text": "function widget_manager_load_widgets(){\n\t\t$widgets_folder = elgg_get_plugins_path() . \"widget_manager/widgets\";\n\t\t$widgets_folder_contents = scandir($widgets_folder);\n\t\t \n\t\tforeach($widgets_folder_contents as $widget){\n\t\t\tif(is_dir($widgets_folder . \"/\" . $widget) && $widget !== \".\" && $widget !== \"..\"){\n\t\t\t\tif(file_exists($widgets_folder . \"/\" . $widget . \"/start.php\")){\n\t\t\t\t\t$widget_folder = $widgets_folder . \"/\" . $widget; \n\t\t\t\t\t\n\t\t\t\t\t// include start.php\n \t\t\t\t\tinclude($widget_folder . \"/start.php\");\n\t\t\t\t} else {\n \t\t\t\t\telgg_log(elgg_echo(\"widgetmanager:load_widgets:missing_start\"), \"WARNING\");\n \t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c4395559234c2376097c35eed9d7900b", "score": "0.5448736", "text": "public function loadMappings(): void\n {\n $folder = dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . Configurator::CONFIGURATIONS_FOLDER;\n $folder = new \\DirectoryIterator($folder);\n\n while ($folder->valid()) {\n if ($folder->current()->isFile() &&\n static::MAPPING_FILE_NAME . '.php' === $folder->current()->getFilename()) {\n $mappings = $folder->current()->getPathname();\n break;\n }\n $folder->next();\n }\n $mappings = include $mappings;\n $mappings = new \\ArrayObject($mappings);\n $iterator = $mappings->getIterator();\n while ($iterator->valid()) {\n $this->addMapping($iterator->key(), $iterator->current());\n $iterator->next();\n }\n }", "title": "" }, { "docid": "42707374ae42afd9b8053c5f3f6c0fa2", "score": "0.54320484", "text": "function __autoload($class_name) {\n static $files = null;\n\n $success = false;\n $class_file = strtolower($class_name) . EXT;\n\n DEBUG_AUTOLOAD && dump($class_name, '__autoload');\n\n if (empty($files)) {\n $files = array();\n \n // List all directories that contains autoloadable files.\n // Use '*' to include all subdirectories.\n $dirs = array(\n 'auth/*',\n 'database/*',\n 'externals/*',\n 'helper/*',\n 'i18n/*',\n 'library/*',\n 'ui/builder/*'\n );\n \n DEBUG_AUTOLOAD && dump($dirs, 'dirs');\n \n // Check for directory with subdirectories (marked with a '*' in its name).\n // Add server root path to the directories.\n $search_dirs = array();\n foreach ($dirs as $dir) {\n if (strstr($dir, '*')) {\n $dir = SERVER_PATH . str_replace('*', '', $dir);\n $search_dirs[] = $dir;\n \n DEBUG_AUTOLOAD && dump($dir, 'dir');\n \n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($dir), \n RecursiveIteratorIterator::SELF_FIRST\n );\n\n foreach ($iterator as $filename => $file) {\n if ($file->isDir()) {\n $search_dirs[] = str_replace('\\\\', '/', strtolower($file)) . '/';\n }\n }\n }\n else {\n $search_dirs[] = SERVER_PATH . $dir;\n }\n }\n \n DEBUG_AUTOLOAD && dump($search_dirs, 'search_dirs');\n\n // For each directory, save the available files in the $files array.\n $fn_filter_name = create_function('$a', 'return strtolower(basename($a));');\n foreach ($search_dirs as $dir) {\n $glob = glob($dir . '*' . EXT);\n if ($glob === false || empty($glob)) continue;\n \n $fnames = array_map($fn_filter_name, $glob);\n $files = array_merge($files, array_combine($fnames, $glob));\n }\n\n DEBUG_AUTOLOAD && dump($files, 'files');\n }\n\n // Search in the available files for the undefined class file.\n if (isset($files[$class_file])) {\n require $files[$class_file];\n \n // If the class has a static method named __static(), execute it now, on initial load.\n if (class_exists($class_name, false) && method_exists($class_name, '__static')) {\n call_user_func(array($class_name, '__static'));\n }\n $success = true;\n }\n}", "title": "" }, { "docid": "730a49a611617e3c63df79bbe1f8072e", "score": "0.5392392", "text": "public function autoloadFiles() {\r\n if (isset($this->autoload_files)) {\r\n foreach ($this->autoload_files as $class => $path) {\r\n autoload($class, $path);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "6ec2859af7cc8f80fa7cadac2b682697", "score": "0.5366212", "text": "public function loadAll(House $oHouse): void\n {\n $sDirectory = $this->getDirectory($oHouse);\n if (is_dir($sDirectory)) {\n foreach (glob($sDirectory . '*') as $sImagePath) {\n $oHouse->addImage($this->convertPathToUrl($sImagePath));\n }\n }\n }", "title": "" }, { "docid": "517977547d646596d2b8d998a07e22c3", "score": "0.53527474", "text": "public static function AutoLoad($dir){\n\t\tif (self::$autoload_registed == false) {\n\t\t\tself::$autoload_registed = true;\n\t\t\tspl_autoload_register(array(__CLASS__, 'loadClass'));\n\t\t}\n\t\t\n\t\tif (is_array($dir)) {\n\t\t\tforeach ($dir as $value) {\n\t\t\t\tself::AutoLoad($value);\n\t\t\t}\n\t\t}else if (is_string($dir)) {\n\t\t\tif (!in_array($dir, self::$libpath)) self::$libpath[] = rtrim($dir,\"/\");\n\t\t}\n\t}", "title": "" }, { "docid": "675b53de11263084477d160207bec163", "score": "0.5333802", "text": "public function loadAllClassesIncrementally()\n {\n }", "title": "" }, { "docid": "e22567690c73fd07b8d8a5dc655b8fec", "score": "0.5328633", "text": "function parseContent() {\n $dirList = glob($this->path . '/[0-9]*', GLOB_ONLYDIR);\n\n // parse each folder based on the enclosed YAML file\n foreach($dirList as $dir) {\n $this->parseFolder($dir);\n }\n }", "title": "" }, { "docid": "369e8636b0e8d29c94076752059ac5b8", "score": "0.5326895", "text": "private function _loadThemesFromDisk() {\n $path = \"style\";\n if (!is_dir($path)) {\n $path = \"app/resources/style\";\n }\n\n $themes = scandir($path);\n foreach ($themes as $theme) {\n if ( ($theme[0]!=='.') && (is_dir(\"style/{$theme}\")) ) {\n $this->_loadTheme($theme,false);\n }\n }\n }", "title": "" }, { "docid": "7dc9f6160ea0f417fb303b34c03e6b06", "score": "0.5320646", "text": "public function run()\n {\n $filesInFolder = File::files('public/imgs');\n foreach($filesInFolder as $path){\n $imageName = str_replace(\"public/imgs/\",\"\",$path);\n Imageitem::create([\"url\" => $imageName]);\n }\n }", "title": "" }, { "docid": "70c7834f3870ddd894d1647bc7382505", "score": "0.5313527", "text": "function autoloadDir(string $path): void {\n\n if (is_dir($path)) {\n foreach (scandir($path) as $file) {\n if ($file[0] === \".\") continue;\n autoloadDir($path . DIRECTORY_SEPARATOR . $file);\n }\n } else if (is_file($path) and endsWith($path, '.php')) includeOnce($path);\n}", "title": "" }, { "docid": "bad00c8631386abf30c96b0d19e8267b", "score": "0.5312174", "text": "protected function loadDependenciesFromDirectory($directory)\n {\n $dependencies = $this->getDependenciesFromDirectory($directory);\n\n foreach ($dependencies as $dependency) {\n //echo \"Loading $dependency<br>\";\n include($dependency);\n }\n }", "title": "" }, { "docid": "482b1b99a9d5939c72afeec90c9bd585", "score": "0.53120667", "text": "public function load($files)\n { \n if (is_array($files) || is_object($files))\n {\n foreach($files as $file)\n {\n //var_dump($file);\n $loaded_array_from_file = include($file);\n $this->set(pathinfo($file)['filename'],$loaded_array_from_file);\n }\n }\n else\n {\n $loaded_array_from_file = include($files);\n $this->set(pathinfo($files)['filename'],$loaded_array_from_file);\n }\n }", "title": "" }, { "docid": "5f50b6aa5bafcbf8619e6902519a5293", "score": "0.53053755", "text": "public function loadCore()\n\t{\n\t\tforeach ($this->files as $key => $value) {\n\t\t\tif ( is_file( ROOT_DIR . $value ) ) {\n\t\t\t\trequire_once( ROOT_DIR . $value );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b3c19ddcc82ded64fd763c99b5fc3a49", "score": "0.53007555", "text": "private function loadLanguageFiles() {\n if ($handle = opendir('../modules/'.$this->name.'/install/lang/')) {\n while (false !== ($file = readdir($handle))) {\n if (($file != \".\" && $file != \"..\") && !is_dir($file)) {\n $fileric = explode('.', $file);\n $filecontents = file_get_contents('../modules/'.$this->name.'/install/lang/'.$file);\n $contentlangfile = file_get_contents('../lang/'.$fileric[1].'/'.$fileric[0].'.php');\n $modifiedlangfile = str_replace('?>', $filecontents.\"\\n\\n?>\", $contentlangfile);\n file_put_contents('../lang/'.$fileric[1].'/'.$fileric[0].'.php', $modifiedlangfile);\n }\n }\n }\n }", "title": "" }, { "docid": "a695e680ee75bc400b360a166a18df27", "score": "0.5288482", "text": "protected function cmsLoadTranslates()\n {\n $sources = $this->loadPackages(SOURCE_TRANSLATES);\n \n foreach ($sources as $group => $dir) {\n # code...\n $this->loadTranslationsFrom($dir, $group);\n $this->loadJsonTranslationsFrom($dir, $group);\n }\n }", "title": "" }, { "docid": "be4ee7dca5cdc46c6088a1f62f5f6d4b", "score": "0.528498", "text": "public function loadResources() {\n $this->resoures_path = __ROOT__ . Enums\\ApplicationFolderName::AppsFolderName . $this->app->name;\n //Get list of resource files\n $this->_files_common = Core\\DirectoryManager::GetFileNames($this->resoures_path . Enums\\ApplicationFolderName::ResourceCommonFolderName);\n $this->_files_local = Core\\DirectoryManager::GetFileNames($this->resoures_path . Enums\\ApplicationFolderName::ResourceLocalFolderName);\n //For each resource type, load data into the appropriate array\n foreach ($this->_files_common as $file) {\n $this->loadFile(\"common\", $this->resoures_path . Enums\\ApplicationFolderName::ResourceCommonFolderName . $file);\n }\n foreach ($this->_files_local as $file) {\n $this->loadFile(\"local\", $this->resoures_path . Enums\\ApplicationFolderName::ResourceLocalFolderName . $file);\n }\n }", "title": "" }, { "docid": "714b038f587b8d4c3954933e90c8dd5b", "score": "0.5279517", "text": "static private function load_files() {\n\n\t\t\trequire_once EASY_DOCS_DIR_NAME . '/includes/class-easy-docs-post-type.php';\n\t\t\trequire_once EASY_DOCS_DIR_NAME . '/templates/shortcode.php';\n\t\t\trequire_once EASY_DOCS_DIR_NAME . '/includes/class-easy-docs-widget.php';\n\t\t\trequire_once EASY_DOCS_DIR_NAME . '/includes/class-easy-docs-category-widget.php';\n\t\t}", "title": "" }, { "docid": "fc0a9844cc81752a1ed02d1ea06c03b8", "score": "0.52650493", "text": "private function init() {\n $components_dir = new RecursiveDirectoryIterator(EF_CONTENT_BUILDER_DIR . 'components/');\n $components_iterator = new RecursiveIteratorIterator($components_dir);\n $components_regex_iterator = new RegexIterator($components_iterator, '/.php$/');\n // including components\n foreach ($components_regex_iterator as $component) {\n require $component->getPathName();\n }\n }", "title": "" }, { "docid": "4e70c5852a9e7249ffb2e0526e47aca7", "score": "0.52646565", "text": "public function loadFromDirectory($dir)\n {\n if (!is_dir($dir)) {\n throw new \\InvalidArgumentException(sprintf('\"%s\" does not exist', $dir));\n }\n\n $installers = [];\n $includedFiles = [];\n\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($dir),\n \\RecursiveIteratorIterator::LEAVES_ONLY\n );\n\n foreach ($iterator as $file) {\n if (($fileName = $file->getBasename($this->fileExtension)) == $file->getBasename()) {\n continue;\n }\n $sourceFile = realpath($file->getPathName());\n require_once $sourceFile;\n $includedFiles[] = $sourceFile;\n }\n $declared = get_declared_classes();\n\n foreach ($declared as $className) {\n $refClass = new \\ReflectionClass($className);\n $sourceFile = $refClass->getFileName();\n\n if (in_array($sourceFile, $includedFiles) && !$this->isTransient($className)) {\n $installer = new $className;\n $installers[] = $installer;\n $this->addInstaller($installer);\n }\n }\n\n return $installers;\n }", "title": "" }, { "docid": "7d4f33d89fe782bc2debc15a96ee92fe", "score": "0.52599186", "text": "private function loadDirRecursively(string $dir): array\n {\n $result = [];\n $files = \\glob($dir . '/*');\n\n foreach ($files as $file) {\n $key = \\basename($file, '.php');\n\n if (\\is_dir($file)) {\n $result[$key] = $this->loadDirRecursively($file);\n }\n else {\n $result[$key] = require($file);\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "c6adb5df018dc72f51b9fc52f5a9f0e7", "score": "0.5258914", "text": "function load($classe){\n$paths = array(\n '',\n 'classes/',\n 'Model/',\n '../classes/',\n '../Model/',\n);\nforeach ($paths as $path) {\n $finalPath = $path.$classe.'.php';\n if (file_exists($finalPath)){\n require $finalPath;\n break;\n }\n}\n}", "title": "" }, { "docid": "c1d71317220651e4c6012d780c5915ce", "score": "0.525224", "text": "private function load($className) {\n\t$test =array( \"/classes/\", \"/view/\", \"/model/\", \"/controller/\");\n\tforeach( $test as $file){\n\t\tif(is_readable(__ROOT_DIR . $file. ucfirst($className) . '.class.php')){\n\t\trequire_once(__ROOT_DIR . $file. ucfirst($className) . '.class.php');}\n\t}\n}", "title": "" }, { "docid": "b3d35cb703290001bff7a16d6861c598", "score": "0.5251883", "text": "private static function _loadConfigs() {\n\t\t// Gather all the config files\n\t\t$files = Jackal::files(\"<ROOT>/{<JACKAL>/,<LOCAL>/}{,modules/*/,libraries/*/}config/{jackal,*}.{yaml,yml,php}\", array());\n\t\t\n\t\t// Order the array with jackal first, then everything, followed by 'MY_*' files\n\t\t$files = array_merge(\n\t\t\tpreg_grep('~jackal[^/]+~', $files),\n\t\t\tpreg_grep('~(MY_|_\\.)~', $files, PREG_GREP_INVERT),\n\t\t\tpreg_grep('~MY_~', $files),\n\t\t\tpreg_grep('~_\\.~', $files)\n\t\t);\n\t\t\n\t\t// Load each config \n\t\tforeach($files as $i=>$file) {\n\t\t\t// Load php files one way and yaml files another\n\t\t\tswitch(strtolower(pathinfo($file, PATHINFO_EXTENSION))) {\n\t\t\t\tcase \"php\" : Jackal::_include($file) ; break;\n\t\t\t\tcase \"yml\" :\n\t\t\t\tcase \"yaml\": Jackal::putSettings(file_get_contents($file)) ; break;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Supercede index_url if mod_rewrite configured\n\t\tif(trim(@self::$_settings[\"jackal\"][\"index-url\"]) == \"?\")\n\t\t\t// If mod_rewrite working\n\t\t\tif(@$_SERVER[\"REDIRECT_STATUS\"]) self::$_settings[\"jackal\"][\"index-url\"] = \"\";\n\t\t\n\t\t// Flaggers duplicates are bugging me\n\t\tself::$_settings[\"jackal\"][\"flaggers\"] = array_unique((array) self::$_settings[\"jackal\"][\"flaggers\"]);\n\t}", "title": "" }, { "docid": "477e5f5e12ad6ef61473a4a2cb58d91c", "score": "0.5249196", "text": "protected function findAndLoadClasses() : void\n {\n $this->requireClassesFromFiles(\n $this->findFilesInProjectPath()\n );\n }", "title": "" }, { "docid": "68c0dfb4cdf3cc1c47fcb6d203d1a696", "score": "0.52433634", "text": "function LoadFiles($dir,$filter=\"\")\r\n{\r\n $Files = array();\r\n $It = opendir($dir);\r\n if (! $It)\r\n die('Cannot list files for ' . $dir);\r\n while ($Filename = readdir($It))\r\n {\r\n if ($Filename != '.' && $Filename != '..' )\r\n {\r\n if(is_dir($dir . $Filename))\r\n {\r\n $Files = array_merge($Files, LoadFiles($dir . $Filename.'/'));\r\n }\r\n else \r\n if ($filter==\"\" || preg_match( $filter, $Filename ) ) \r\n {\r\n $LastModified = filemtime($dir . $Filename);\r\n $Files[] = array($dir .$Filename, $LastModified);\r\n }\r\n \r\n else \r\n continue;\r\n \r\n }\r\n}\r\n return $Files;\r\n}", "title": "" }, { "docid": "000e7f865aa7245a6e858ac6f6325e20", "score": "0.52231944", "text": "public static function autoLoad() {\r\n\t\t$config = self::getConfiguration('autoLoad');\r\n\r\n\t\tforeach ($config as $type => $classes) {\r\n\r\n\t\t\tforeach ($classes as $class) {\r\n\t\t\t\tswitch($type) {\r\n\t\t\t\t\tcase \"Game\":\r\n\t\t\t\t\t\tif (file_exists(GAME_PATH.$class.'.php'))\r\n\t\t\t\t\t\t\trequire_once(GAME_PATH.$class.'.php');\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\trequire_once(GAME_JI_PATH.$class.'.php');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"Library\":\r\n\t\t\t\t\t\tif (file_exists(LIBRARIES_PATH.$class.'.php'))\r\n\t\t\t\t\t\t\trequire_once(LIBRARIES_PATH.$class.'.php');\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\trequire_once(LIBRARIES_JI_PATH.$class.'.php');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"Code\":\r\n\t\t\t\t\t\tif (file_exists(LIBRARIES_PATH.'code/'.$class.'.php'))\r\n\t\t\t\t\t\t\trequire_once(LIBRARIES_PATH.'code/'.$class.'.php');\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\trequire_once(LIBRARIES_JI_PATH.'code/'.$class.'.php');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"Model\":\r\n\t\t\t\t\t\tif (file_exists(MODELS_PATH.$class.'.php'))\r\n\t\t\t\t\t\t\trequire_once(MODELS_PATH.$class.'.php');\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\trequire_once(MODELS_JI_PATH.$class.'.php');\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"Helper\":\r\n\t\t\t\t\t\tif (file_exists(HELPER_PATH.$class.'.php'))\r\n\t\t\t\t\t\t\trequire_once(HELPER_PATH.$class.'.php');\r\n\t\t\t\t\t\telse \r\n\t\t\t\t\t\t\trequire_once(HELPER_JI_PATH.$class.'.php');\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3647cf9d7a92265f4a8080f81103c342", "score": "0.52099586", "text": "function __loadconfiglist()\n {\n foreach (_config_files() as $config)\n {\n $_config_path = __buildpath(Array(\n PATH_CONFIG, $config\n ));\n\n if (! is_file($_config_path))\n {\n echo \"Fatal error - couldn\\'t load config file $_config_path<br>\";\n exit(1);\n }\n\n include($_config_path);\n }\n }", "title": "" }, { "docid": "2f1837717837faa3a62b760435171384", "score": "0.52093685", "text": "protected function loadRoutesAndServices(): void\n {\n $modules = $this->loadModules();\n foreach ($modules as $module) {\n if ($module->getPathBoot() !== '') {\n include_once $module->getPathBoot();\n }\n if ($module->getPathRoutes() !== '') {\n include_once $module->getPathRoutes();\n }\n\n if ($module->getPathServices() !== '') {\n $services = include $module->getPathServices();\n if ($services !== true) {\n $this->services += $services;\n }\n }\n }\n }", "title": "" }, { "docid": "5f60fa4f80f4b864bbbbf599858949d5", "score": "0.5209192", "text": "static function doScanFiles()\r\n\t{\r\n\t\t\r\n\t\tif ($handle = opendir('.')) {\r\n\t\t\t/* This is the correct way to loop over the directory. */\r\n\t\t\twhile (false !== ($file = readdir($handle))) {\r\n\t\t\t\t$file = trim( $file );\r\n\t\t\t\tif ( strncmp( $file, \"test\", 4 ) == 0 &&\r\n\t\t\t\t\tsubstr( $file, strlen($file) - 4 ) == \".php\" ) {\r\n\t\t\t\t\t//print (\"$file\\n \" );\r\n\t\t\t\t\trequire_once( $file );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tclosedir($handle);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tprint \"Error: can't open directory .\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "689b9794059f6efdb39d713dc742799f", "score": "0.5190978", "text": "public static function autoloadComponent($className) {\n $listdir = scandir(\"Component\"); //only folder in component >>> no files\n foreach ($listdir as $dir) {\n $filename = \"Component/\" . $dir .\"/\". $className . \".php\";\n if (is_readable($filename)) {\n require_once $filename;\n }\n }\n }", "title": "" }, { "docid": "ddb6cd7990963765f2c6c3c205f01c12", "score": "0.5176284", "text": "public function readDir($dir = '.');", "title": "" }, { "docid": "4769b468412d53c28355a9090af0065e", "score": "0.51759934", "text": "private function createLanguageArray($dir){\n\n // empty array to fill with content of the files\n $langArray = array();\n\n // load all files in this directory\n $langFiles = scandir($dir);\n foreach ($langFiles as $file) {\n if ($file != \".\" && $file != \"..\") {\n $singleLangArray = include $dir.'/'.$file;\n $langArray = array_merge($langArray, $singleLangArray);\n }\n }\n\n return $langArray;\n }", "title": "" }, { "docid": "890fab81641312a0ec24ecabd546849f", "score": "0.51679057", "text": "public function testLoadingResources()\n {\n $resources = scandir(__DIR__ . $this->resources);\n $client = new Client('TokenThatDoesntExists'); // We don't need valid token for loading of resources\n \n /* Try loading all resources */\n foreach ($resources as $resource) {\n if (!in_array($resource, $this->ignoredResourceFiles)) {\n $resourceName = strtolower(pathinfo($resource, PATHINFO_FILENAME));\n $loadedResource = $client->$resourceName;\n $this->assertInstanceOf(\"Beepsend\\Resource\\\\{$resourceName}\", $loadedResource);\n }\n }\n }", "title": "" }, { "docid": "a80dfde66836f5038a748bb0e1400412", "score": "0.5165488", "text": "protected function loadConfig()\n {\n # array, this is just for us to prepare the config\n\n $this->di->set('config', function() {\n return new Config([]);\n }, true);\n\n\n # get the paths and merge the array values to the\n # empty config as we instantiated above\n\n config()->merge(\n new Config([\n 'path' => $this->path\n ])\n );\n\n\n # now merge the assigned environment\n\n config()->merge(\n new Config([\n 'environment' => $this->getEnvironment()\n ])\n );\n\n\n # iterate all the base config files and require\n # the files to return an array values\n\n $base_config_files = iterate_require(\n folder_files($this->path['config'])\n );\n\n\n # iterate all the environment config files and\n # process the same thing as the base config files\n\n $env_config_files = iterate_require(\n folder_files(\n url_trimmer(\n $this->path['config'].'/'.$this->getEnvironment()\n )\n )\n );\n\n\n # merge the base config files and the environment\n # config files as one in the our DI 'config'\n\n config()->merge( new Config($base_config_files) );\n config()->merge( new Config($env_config_files) );\n }", "title": "" }, { "docid": "39c4a8213a73e8a58d6ac7ad261a8310", "score": "0.51648057", "text": "public static function loadTraits()\n {\n static::makeDirectory(app_path('Traits'));\n\n $files = [\n 'AutomateUuid.php',\n 'AutomateAuthUserAssociation.php',\n 'UserRoles.php'\n ];\n\n static::copyNewFiles($files, 'app/traits', 'app_path', 'Traits');\n }", "title": "" }, { "docid": "1bd1e4f89dc80455935d11d80fa70a1a", "score": "0.5162897", "text": "function wst_load_specified_files( array $filenames, $folder_root = '' ) {\n\t$folder_root = $folder_root ?: CHILD_LIB;\n\tforeach ( $filenames as $filename ) {\n\t\tinclude( $folder_root . $filename );\n\t}\n}", "title": "" }, { "docid": "235d26507fc8684179d201e7c6681258", "score": "0.5162869", "text": "function addEngineSrcDir( $dir )\n{\n\n \taddSrcDir( getEngineSrcDir() . $dir );\n}", "title": "" }, { "docid": "7ad5c106db93840b1ba87d66a5614be3", "score": "0.51588744", "text": "static function load(){\r\n\r\n $models = self::get_directory_list(SITE_PATH . 'models/');\r\n $controllers = self::get_directory_list(SITE_PATH . 'controllers/');\r\n\r\n include_once( SITE_PATH . 'models/model.php');\r\n include_once( SITE_PATH . 'controllers/controller.php');\r\n /*\r\n foreach($controllers as $k => $v){\r\n\r\n if($v != 'controller.php'){\r\n include_once( SITE_PATH . 'controllers/' . $v);\r\n }\r\n }*/\r\n foreach($models as $k => $v){\r\n\r\n if($v != 'model.php'){\r\n include_once( SITE_PATH . 'models/' . $v);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "a1204f1f499b594e97db5fa478d63521", "score": "0.51573956", "text": "function _require_all($dir)\n{\n $scan = glob(\"$dir/*\");\n foreach ($scan as $path) {\n if (preg_match('/\\.php$/', $path)) {\n require_once $path;\n } elseif (is_dir($path)) {\n _require_all($path);\n }\n }\n}", "title": "" }, { "docid": "63222108fdd0b39c68903ac8d52e1eb3", "score": "0.5155177", "text": "protected function createFiles()\n {\n // create necessary variables\n $name = $this->replace['name'];\n $find = array();\n $replace = array();\n \n // Seperate the replace by keys and values, keys will be replaced by values in the generated files\n foreach ($this->replace as $key => $value)\n {\n $find[] = '%' . $key . '%';\n $replace[] = $value;\n }\n \n // Loop through files to generate, loading the content and then attempting to create them\n foreach ($this->files as $file)\n {\n // Generate content based on template\n $content = File::get(base_path() . '/vendor/cgoosey1/service-generator/src/commands/templates/' . $file['template']);\n $content = str_replace($find, $replace, $content);\n \n // If entity assume they want to go down a level\n if ($file['type'] == 'entities')\n {\n $path = $this->dir[$file['type']] . '/' . $file['name'];\n $created = File::put($path, $content);\n }\n else\n {\n $path = $this->dir[$file['type']] . '/' . $name;\n $this->createDir($path);\n \n $path .= '/' . $file['name'];\n $created = File::put($path, $content);\n }\n \n // Report error if was not created\n if (!$created)\n {\n $this->error('File: ' . $path . ' Could not be created');\n }\n }\n }", "title": "" }, { "docid": "14caf0d40dd4177db6cc012e75a2182e", "score": "0.5150715", "text": "function include_route_files($folder)\n {\n\t\ttry {\n $rdi = new RecursiveDirectoryIterator($folder);\n $it = new RecursiveIteratorIterator($rdi);\n\n while ($it->valid()) {\n if (! $it->isDot() && $it->isFile() && $it->isReadable() && $it->current()->getExtension() === 'php') {\n require $it->key();\n }\n\n $it->next();\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "25f365284a2e09ef269b0315734158d6", "score": "0.51493824", "text": "protected function loadHelpersForBoot(): void\n {\n $shipFiles = $this->getHelpersFromShip();\n $containersFiles = $this->getHelpersFromContainers();\n\n $files = array_merge($shipFiles, $containersFiles);\n\n foreach ($files as $file){\n require $file;\n }\n }", "title": "" }, { "docid": "44e8e3c952133d4ae2e40f0eabd8b9e6", "score": "0.51458865", "text": "function load_configurations () {\n\t\t$files = glob( \"app/configurations/*.php\" ); //all php files\n\t\tforeach ( $files as $file ) { \n\t\t\t\t\n\t\t\t//do not load database.php\t\n\t\t\t$arr = explode( '/', $file );\n\t\t\tif ( !preg_match( '/database/', $arr [ 2 ] ) ) {\n\t\t\t\trequire_once( $file );\n\n\t\t\t\t//autoload the specified helpers/libraries\n\t\t\t\tif ( preg_match( '/autoload/' , $arr [ 2 ] ) ) \n\t\t\t\t\tforeach ( $autoload [ 'libraries' ] as $library ) \n\t\t\t\t\t\trequire( \"system/libraries/$library.php\" );\t\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ff2784f7fa1a4a18b25f9c43dae0e6ef", "score": "0.5138771", "text": "static protected function loadDirectory($directory)\n\t{\n\t\t$directory = rtrim($directory, '/') . '/';\n\t\t$directory .= '*.*.php';\n\t\t$paths = glob($directory);\n\t\t$classes = array();\n\t\tforeach($paths as $path)\n\t\t{\n\t\t\t$tmpArray = explode('/', $path);\n\t\t\t$filename = array_pop($tmpArray);\n\t\t\t$tmpArray = explode('.', $filename);\n\t\t\t$classname = array_shift($tmpArray);\n\t\t\t$classes[$classname] = $path;\n\t\t}\n\n\t\treturn $classes;\n\t}", "title": "" }, { "docid": "b9529515292a6b94d6f6e646b19a473d", "score": "0.5137028", "text": "private function opendir($dir)\n {\n $dir = rtrim($dir,'/ ').'/';\n $handle = opendir($dir);\n while (false !== ($file = readdir($handle)))\n {\n $firstChar = substr($file,0,1);\n if('.'==$firstChar || '_'==$firstChar) continue;\n\n $theFile = $dir . $file;\n if(!$this->isIgnorePath($theFile))//if (!in_array($file, $this->ignore))\n {\n if (is_file($theFile))\n {\n if (isset($this->includeFile[$file])) {//处理不同文件夹下具有相同文件名的类文件 存成数组\n // the third one\n // do nothing here\n }\n elseif (preg_match('/\\.class\\.php$/', $file)) // do not store non-class file, save memory usage\n {\n $this->includeFile[$file] = $theFile;\n }\n }\n else\n {\n $this->opendir($theFile.'/');\n }\n }\n }\n closedir($handle);\n }", "title": "" }, { "docid": "fae52bda72528a257de2045e394b84fc", "score": "0.51216424", "text": "private function LoadFromFilesystem($class)\n\t{\n\t\tstatic $iterators = array();\n\t\t\n\t\tif(empty($iterators))\n\t\t{\n\t\t $iterators[] = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(SYSTEM_DIR));\n\t\t if(defined('SITE_ROOT'))\n {\n if(is_dir(SITE_ROOT.DS.'Pages'.DS.'CodeBehind')) $iterators[] = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(SITE_ROOT.DS.'Pages'.DS.'CodeBehind'));\n if(is_dir(SITE_ROOT.DS.'Services')) $iterators[] = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(SITE_ROOT.DS.'Services'));\n if(is_dir(SITE_ROOT.DS.'Runtime')) $iterators[] = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(SITE_ROOT.DS.'Runtime'));\n }\n if(is_dir(ROOT_DIR.DS.'Runtime')) $iterators[] = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(ROOT_DIR.DS.'Runtime'));\t\n\t\t}\n\t\t\n\t\t$class = strtolower($class);\n\t\t$cache = \"<?php\\nself::\\$cache = array(\\n\";\n\t\t$include = false;\n\t\t$included = false;\n\t\t\n\t\tforeach($iterators as $iterator)\n\t\t{\n\t\t\tforeach($iterator as $file)\n\t\t\t{\n\t\t\t\t$filename = basename($file);\n\t\t\t\t$filename = strtolower(substr($filename, 0, strpos($filename, '.')));\n\t\t\t\n\t\t\t\tif(preg_match('{\\.class\\.php$}', $file))\n\t\t\t\t{\n\t\t\t\t\t$cache .= \"\\t'$filename' => '$file',\\n\";\n\t\t\t\n\t\t\t\t\tif($filename == $class)\n\t\t\t\t\t{\n\t\t\t\t\t\t$include = $file;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\tif($include && !$included)\n\t\t\t{\n\t\t\t\t$included = true;\n\t\t\t\tinclude_once $include;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$cache .= \");\";\n\t\t\n\t\tEngine::WriteCache($cache,'ClassIndex');\n\t\t\n\t\treturn $included;\n\t}", "title": "" }, { "docid": "77e74be620997c1dbb04bcd31cf04ff3", "score": "0.5121129", "text": "public function loadFromDir(string $dir, string $package = ''): void\n {\n try {\n $this->brick_manager->addBrick($this->loadDirBrick($dir, $package));\n } catch (ReflectionException) {\n // Ignore ReflectionException, but let pass others\n }\n\n $this->cache_manager->save(self::CACHE_DIR, BrickLoader::class, $this->brick_manager->getBricks());\n }", "title": "" }, { "docid": "56d73c068ee1f9c354a3638c0cd2e834", "score": "0.5116064", "text": "function requireAll($basePath)\n{\n foreach (scandir($basePath) as $filename) {\n $path = $basePath . '/' . $filename;\n if (is_file($path)) {\n require_once $path;\n }\n }\n}", "title": "" }, { "docid": "b16cbb3434b4672bf05c80392d3a5fca", "score": "0.51149625", "text": "public function loadDecksAction()\r\n {\r\n $dir = __DIR__ . '/../data/decks';\r\n $files = scandir($dir);\r\n $manager = $this->di->get('modelManager');\r\n foreach ($files as $file) {\r\n if (preg_match('/.csv$/', $file)) {\r\n $deck = $this->readDeck($dir . '/' . $file);\r\n $manager->persist($deck);\r\n }\r\n }\r\n $manager->flush();\r\n }", "title": "" }, { "docid": "976437fb7a91132bdfab232aabac41d6", "score": "0.51120424", "text": "private function loadComponents(string $type, ?string $dir = null, ?string $prefix = null)\n {\n $glob = \"$this->srcDir/$type/\" . ($dir === null ? '' : \"$dir/\") . '*.yaml';\n $componentsFiles = glob($glob);\n\n foreach ($componentsFiles as $componentsFile) {\n $componentName = ($prefix ?? '') . str_replace('.yaml', '', basename($componentsFile));\n\n $this->{$type}[$componentName] = FileLoader::make()\n ->load($componentsFile);\n }\n\n return $this;\n }", "title": "" }, { "docid": "998843087e79306f091dfc5180f44d4d", "score": "0.5105763", "text": "function loadTemplateFiles() {\n\t\t$templates = array();\n\t\t$finder = new Finder();\n\t\t$finder->in('../app/views/templates');\n\n\t\tforeach ($finder as $file) {\n\t\t\tarray_push($templates, $file->getRelativePathname());\n\t\t}\n\n\t\treturn $templates;\n\t}", "title": "" }, { "docid": "90649933593be0e84bc1ef3c4347cf74", "score": "0.5102602", "text": "public static function includeRouteFiles($dir)\n {\n try {\n $rdi = new \\recursiveDirectoryIterator($dir);\n $it = new \\recursiveIteratorIterator($rdi);\n\n while ($it->valid()) {\n if (! $it->isDot() && $it->isFile() && $it->isReadable() && $it->current()->getExtension() === 'php') {\n require $it->key();\n }\n\n $it->next();\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" } ]
71a499e07eed0e5fa7dd44ac6f74a223
Deletes an existing Banner model. If deletion is successful, the browser will be redirected to the 'index' page.
[ { "docid": "73bd38461fe67bc389c00b33d63e8544", "score": "0.70495915", "text": "public function actionDelete($id)\n {\n $banner = $this->findById($id);\n\n if ($banner->delete()) {\n Yii::$app->session->addFlash('success', Yii::t('banner', 'banner_deleted', ['name' => $banner->name]));\n }\n\n return $this->redirect(['index']);\n }", "title": "" } ]
[ { "docid": "cfe32517d6e79f3147e7279094649825", "score": "0.74359804", "text": "public function delete()\n\t{\n\t\t$this->load->model(\"banner_model\");\n if ($this->input->method(TRUE) == \"POST\") {\n\t\t\tif (\n\t\t\t\t!empty($this->input->post(\"id\")) &&\n\t\t\t\t!is_numeric($this->input->post(\"id\"))\n\t\t\t) {\n\t\t\t\t$this->session->set_flashdata(\"error\", \"Erro de parâmetro!\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif ($this->banner_model->delete($this->input->post(\"id\"))) {\n\t\t\t\t$this->session->set_flashdata(\"success\", \"Banner excluído!\");\n\t\t\t} else {\n\t\t\t\t$this->session->set_flashdata(\"error\", \"Nada alterado!\");\n\t\t\t}\n\t\t\tredirect(\"admin/banner\", \"location\");\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "660c23477c4694a9c65ea01cd58163a0", "score": "0.70491236", "text": "public function delete($id) {\n\t\t$banner = $this->model('Banner');\n\t\t$banner->deleteBanner($id);\n\t\t$this->redirect(\"../../../bn-admin\");\n\t}", "title": "" }, { "docid": "b1ac36162d07c5168fbfe0ae0f5565b4", "score": "0.7043843", "text": "public function destroy($id)\n {\n try {\n $model = Banner::findOrFail($id);\n\n $model->delete();\n\n FlashMessages::add('success', trans(\"messages.destroy_ok\"));\n } catch (ModelNotFoundException $e) {\n FlashMessages::add('error', trans('messages.record_not_found'));\n } catch (Exception $e) {\n FlashMessages::add(\"error\", trans('messages.delete_error'));\n }\n\n return Redirect::route('admin.banner.index');\n }", "title": "" }, { "docid": "0c956cc3556cd633385671867511ff81", "score": "0.6949105", "text": "private function delete()\n\t{\n\t\t//Validate Variables\n\t\t$id = $this->validateNumber($_POST['id']);\n\t\t$result = $this->model->delete($id);\t\n\t\t//Insert Succesfull\n\t\tif($result)\n\t\t{\n\t\t\t//Load view\n\t\t\trequire('views/Brand/Deleted.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire('views/Error.html');\n\t\t}\n\t}", "title": "" }, { "docid": "afcefd4c652ae030f0bacc991d23de64", "score": "0.6894661", "text": "public function actionDelete()\n {\n $id = Html::encode($_POST[\"id\"]);\n\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "607f041c3a36a0f31d77a7abe4c6cbb5", "score": "0.6866462", "text": "public function index()\n\t{\n\t\t$this->load->library('form_validation');\n\t\tif ($this->input->method(TRUE) == \"POST\") {\n\t\t\t$this->form_validation->set_rules(\n\t\t\t\t'id',\n\t\t\t\t'Identificador',\n\t\t\t\t'required',\n\t\t\t\tarray(\n\t\t\t\t\t\"required\" => \"Erro de parâmetro!\"\n\t\t\t\t)\n\t\t\t);\n\t\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t\t$this->load->view(\"admin/admin_banner\");\n\t\t\t} else {\n\t\t\t\tif ($this->banner_model->delete($this->input->post(\"id\"))) {\n\t\t\t\t\t$this->session->set_flashdata(\"success\", \"Usuário excluído!\");\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->set_flashdata(\"error\", \"Erro ao excluir o usuário\");\n\t\t\t\t}\n\t\t\t\tredirect(\"admin/banner\", \"location\");\n\t\t\t}\n\t\t} else {\n\t\t\t$array_banner = $this->banner_model->get();\n\t\t\t$this->load->view(\n\t\t\t\t'admin/banner/admin_banner',\n\t\t\t\tarray(\n\t\t\t\t\t\"array_banner\" => $array_banner,\n\t\t\t\t\t\"page\" => \"comments\"\n\t\t\t\t)\n\t\t\t);\n\t\t}\n }", "title": "" }, { "docid": "e0ceb4456c33727cd83819ab08c20a01", "score": "0.6811927", "text": "public function actionDelete($id)\n {\n if(Yii::app()->request->isPostRequest)\n {\n // we only allow deletion via POST request\n $data_ban = $this->loadModel($id);\n @unlink(getcwd().\"/images/uploads/banner_polling/\".$data_ban->gambar);\n $data_ban->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if(!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n }\n else\n\t\tthrow new CHttpException(404,'Maaf, halaman yang anda cari tidak ditemukan.');\n }", "title": "" }, { "docid": "96a248ac9b8528ec3dcd2adc01f5d8a9", "score": "0.67580014", "text": "private function delete()\n\t{\n\t\t$id = $this->validateNumber($_GET['id']);\n\t\t$result = $this->model->delete($id);\t\n\t\t//Insert Succesfull\n\t\tif($result)\n\t\t{\n\t\t\t//Load view\n\t\t\theader(\"Location: index.php?controller=vehicle&deleted=true\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Ohh well... :(\n\t\t\trequire('views/Error.html');\n\t\t}\t\n\t}", "title": "" }, { "docid": "5afe4c669fb8efd117e35ba3af5459a6", "score": "0.6736377", "text": "public function destroy(Banner $banner){\n\t\t$banner->flushImages();\n\n\t\t$banner->forceDelete();\n\n\t\treturn back()->with('success', trans('messages.deleted', ['model' => $this->model]));\n\t}", "title": "" }, { "docid": "5f4631d75ee7103a1fe7213f94754c4f", "score": "0.6724427", "text": "public function destroy($id)\n {\n $banner = Banner::findOrFail($id);\n $banner->delete();\n Session::flash(\"success_message\",\"Warning! Banner delete successfully\");\n return redirect()->back();\n }", "title": "" }, { "docid": "1d01aceca2c67711511a2b50c83c6718", "score": "0.67161983", "text": "public function destroy(Banner $banner)\n {\n \n operation($banner->delete(),'删除');\n return redirect(route('admin.banner.index'));\n }", "title": "" }, { "docid": "b30dcd6956c4bd43e18af11588bb58b8", "score": "0.66826695", "text": "public function getDelete($id)\n {\n $banner_edit = Banner::find($id);\n $title = \"Remover Banner\";\n // Show the page\n return view('admin.banner.delete', compact('banner_edit','title'));\n }", "title": "" }, { "docid": "09cc6f627092dd2f0eb930c830484f9d", "score": "0.66707295", "text": "public function destroy(Banner $banner )\n {\n //Delete Banner from banner table\n $banner->delete();\n return redirect()->back()->with('flash_message_success', 'Banner deleted successfully!');\n }", "title": "" }, { "docid": "fef090dd45b3f2da5514588544941d18", "score": "0.6656859", "text": "public function destroy(Banner $banner)\n {\n $banner->flushImages();\n\n $banner->forceDelete();\n\n return back()->with('success', trans('messages.deleted', ['model' => $this->model_name]));\n }", "title": "" }, { "docid": "ea050473ff181b2bd8065da3bcd26653", "score": "0.66481733", "text": "public function actionDelete() {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }", "title": "" }, { "docid": "e7b55cf004cab59c867c3098d2a51280", "score": "0.6632543", "text": "public function actionDelete()\n {\n $purifier = new HtmlPurifier;\n $param = $purifier->process( Yii::$app->request->get('id') );\n $this->findModel($param)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "83ef78a2c4d22cc994c674149889707a", "score": "0.65719634", "text": "public function delete(){\n if(!isset($_POST['submit'])){\n $this->redirect('/image/index');\n }\n $image_m = new Images($_POST);\n if(!$image_m->delete()){\n Flash::addMessage(\"Something went wrong, please try again\", Flash::INFO);\n View::render('Image/index.html');\n return;\n }\n //remove file from directory\n Flash::addMessage(\"Successfully deleted\");\n $this->index();\n }", "title": "" }, { "docid": "556cce4153f7d3ee695985d5e68d7f43", "score": "0.6562878", "text": "public function destroy($id)\n {\n $post = tblbanner::findOrFail($id);\n\t\t$post->delete();\n\t\treturn redirect()->route('banner.index')->with(['success'=>'Deleted Successfully',]);\n }", "title": "" }, { "docid": "45cfcca1632e1b3c0b373b17817f08d4", "score": "0.6539287", "text": "public function destroy($id)\n {\n $item = Banner::findorFail($id);\n $item->delete();\n\n return redirect()->route('banner.index');\n }", "title": "" }, { "docid": "ea599cc29fe8a81d5320417af007d4a6", "score": "0.65230477", "text": "public function destroy($id)\n {\n $banner = Banner::find($id);\n $banner->delete();\n return redirect()->route('banner.index')->with('success', 'Xóa thành công');\n }", "title": "" }, { "docid": "9b8d1816ca4eec78323608e5b34b1448", "score": "0.6521641", "text": "public function actionDelete_banner()\n\t{\n\t\t// current product\n\t\t$ids = $_POST['ids'];\n\t\t\n\t\tif (is_array($ids) && sizeof($ids)) {\n\t\t\tforeach ($ids as $id_banner) {\n\t\t\t\t$criteria=new CDbCriteria; \n\t\t\t\t$criteria->condition='id_banner=:id'; \n\t\t\t\t$criteria->params=array(':id'=>$id_banner);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$image_base_path = Yii::app()->params['root_url'].'_images/banner/';\n\t\t\t\t\n\t\t\t\tforeach (Tbl_BannerDescription::model()->findAll($criteria) as $row) {\n\t\t\t\t\tif ($row->filename && is_file($image_base_path.$row->filename)) @unlink($image_base_path.$row->filename);\n\t\t\t\t\t$row->delete();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$criteria=new CDbCriteria; \n\t\t\t\t$criteria->condition='id=:id'; \n\t\t\t\t$criteria->params=array(':id'=>$id_banner);\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t// delete all\n\t\t\t\tTbl_Banner::model()->deleteAll($criteria);\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "69921beedb8d6e0435a9b90b0687dc61", "score": "0.6508825", "text": "public function destroy($id)\n {\n try {\n $banner = $this->banner->findBanner($id);\n $image = $this->banner_image->findImage($banner->media_id);\n if (file_exists($image->link_url)) {\n unlink($image->link_url);\n }\n $delete_image = $this->banner_image->delete($banner->media_id);\n $delete_banner = $this->banner->delete($id);\n\n return redirect()->route('banner.index');\n } catch (ModelNotFoundException $ex) {\n return $ex->getMessage();\n }\n }", "title": "" }, { "docid": "2cc460697e76a4d23958ce8b89f5e901", "score": "0.6506168", "text": "public function destroy($id)\n {\n //\n if(!\\Auth::user()->can('delete_banner'))\n {\n abort('403', 'Hak Akses Tidak Diijinkan');\n }\n Banner::findOrFail($id)->delete();\n return redirect()->route('admin.gallery.index')->with('success', 'Berhasil hapus Banner');\n }", "title": "" }, { "docid": "e128903886d2f7f97cb9b450c37a345d", "score": "0.6474025", "text": "public function destroy(Banner $banner)\n {\n $banner->delete();\n return redirect()->route('banner.index');\n }", "title": "" }, { "docid": "18d3deeb803decc3cb65e2181f8eb534", "score": "0.6463444", "text": "public function destroy($id)\n {\n //\n Banner::destroy($id);\n return redirect(route('banners.index'));\n }", "title": "" }, { "docid": "d18edfa1c5ac5ccffbf1cf5edd9759f6", "score": "0.6458726", "text": "public function destroy($id)\n {\n $delete = Banners::find($id);\n $delete->delete();\n return redirect()->back()->with('danger',__('messages.danger'));;\n }", "title": "" }, { "docid": "d0cae875bc780337d73f39d6f65cc36d", "score": "0.64573854", "text": "public function destroy(Request $request)\n {\n $banner = Banner::findOrFail($request->id);\n unlink(public_path($banner->path));\n $banner->delete();\n $request->session()->flash('alert-success', 'Xóa banner thành công');\n return redirect(route('admin.banners.index'));\n\n }", "title": "" }, { "docid": "d678f65370b14ed9394db5edbdbeb98b", "score": "0.6442214", "text": "public function deleteAllAction() {\n $_bannerIds = $this->getRequest()->getParam('bannerextension');\t\t\n\t\t\n\t\t//If no item is selected by user.\n if(!is_array($_bannerIds)) { \n\t\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));\n } else {\n try {\n foreach ($_bannerIds as $_id) {\n\t\t\t\t\t// load banner data\n $_banner = Mage::getModel('bannerextension/bannerextension')->load($_id); \n // delete the banner\n\t\t\t\t\t$_banner->delete(); \n }\n\t\t\t\t//add success msg for admin\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('adminhtml')->__(\n 'Total of %d record(s) were successfully deleted', count($_bannerIds)\n )\n );\n } catch (Exception $e) {\n\t\t\t\t// add error msg for admin user\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n }\n }\n $this->_redirect('*/*/index');\n }", "title": "" }, { "docid": "62a0e2898cdf6fd0864d9beab70a65ae", "score": "0.64190125", "text": "public function destroy($id)\n {\n //\n $banner = Banner::findOrFail($id);\n $banner->delete();\n\n return redirect()->route('banner.index')\n ->with('flash_message',\n 'Banner deleted!');\n }", "title": "" }, { "docid": "60a661335b26ac94956a8928b2c20fde", "score": "0.64067376", "text": "public function actionDelete($id){\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "1f44840d8488b58f67d4fda66574cb28", "score": "0.64054126", "text": "public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\t\t$model->removeImages();\n\t\t$model->delete();\n\n\t\t$this->redirect(array('index'));\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t/*if(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));*/\n\t}", "title": "" }, { "docid": "8bea764332ae22a7c35228cd198a20ea", "score": "0.63976854", "text": "public function destroy($id)\n\t{\n\t\t$data = BannerAds::find($id);\n\t\t$data->delete();\n\t\treturn redirect()->route('banner-ads.index')->with('status', 'Xóa user thành công');\n\t}", "title": "" }, { "docid": "0d061d097cf5de4c5edd7e3984282fe6", "score": "0.63887715", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "4dcd2ccb278ace22cede7aae83857e72", "score": "0.6360186", "text": "public function destroy($id)\n {\n try {\n \n $banner = Banner::findOrFail($id);\n \n $isDeleted = $banner->delete();\n\n // if banner deleted successfully\n if($isDeleted){\n return redirect('ssfs-admin/banners')->with('err_message', 'Banner deleted successfully');\n }\n else{\n return redirect('ssfs-admin/banners')->with('err_message', 'Failed to delete banner. Please try again');\n }\n\n } catch (\\Exception $e) {\n return redirect('ssfs-admin/banners')->with('err_message', 'Failed to delete banner. Please try again');\n }\n }", "title": "" }, { "docid": "b9fb21e6701d8b50a9ffc0dff89666cf", "score": "0.63494354", "text": "public function delete_slider(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect('admin');\n\t\t}else {\n\t\t\t$user_id = $this->uri->segment(4,0);\n\t\t\t\n\t\t\t\n\n\t\t\t//\n\t\t\t$condition = array('status' => 'Active');\n\t\t\t$slider_count = $this->slider_model->get_all_details(SLIDER,$condition);\n\t\t\t$slider_count_is = $slider_count->num_rows();\n\n\t\t\tif($slider_count_is == 1 && $slider_count->row()->id == $user_id){\n\t\t\t$this->setErrorMessage('error','At Least One Banner Should Be Active');\n\t\t\tredirect('admin/slider/display_slider_list');\n\t\t\t}\n\n\t\t\t//\n\t\t\t$condition = array('id' => $user_id);\n\t\t\t$this->slider_model->commonDelete(SLIDER,$condition);\n\t\t\t$this->setErrorMessage('success','Banner deleted successfully');\n\t\t\tredirect('admin/slider/display_slider_list');\n\t\t}\n\t}", "title": "" }, { "docid": "206d802bbf08274a12f2a3fab121008f", "score": "0.63307273", "text": "public function actionDelete() {\n $id = $_POST['idDeleteProceso'];\n\n $this->loadModel($id)->delete();\n// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n $this->redirect(array('default/index'));\n }", "title": "" }, { "docid": "1d15fa81bf6b3c6315b2130457ad7c20", "score": "0.6329428", "text": "public function actionDelete()\n\t{\n $model = $this->loadModel();\n if($model&&$model->bc_state!=0){\n $model->delete();\n $this->Redirect(array(\"index\"));\n }else{\n throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n }\n\t}", "title": "" }, { "docid": "baa5487bc969116c9bb49608c1ca5de5", "score": "0.63285756", "text": "public function actionDelete($id){\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "1baa4b96a35550145d2f45637c1f9728", "score": "0.6324633", "text": "public function destroy($id)\n {\n $banner = Banner::find($id); \n Storage::delete('/public/files/'.$banner->Banner_Image_Path);\n $banner->delete(); \n\n return redirect(\"banners\"); \n }", "title": "" }, { "docid": "995fa487bcf3ef442084c456ea23c577", "score": "0.63216674", "text": "public function action_delete(){\n\t\t// sprawdzamy czy root\n\t\t\t$session = Session::instance();// Get the session instance \t\t\n\t\t\tif ($session->get('range') < 5 ) \n\t\t\t{\n\t\t\t\theader( 'Location: ' . URL::base() ) ;\n\t\t\t\tdie();\n\t\t\t}\n\n\t\t$id = $this->request->param('id'); //pobieramy id do usunięcia\n\t\t$modelBlog = new Model_Blog(); //tworzymy model\n\t\t$modelBlog->delete($id); //wywołujemy wcześniej przygotowaną funkcję do usunięcia \n\t\theader( 'Location: ' . URL::base() . 'admin/blog/index' ) ;\n\t\tdie(); //po usunięciu robimy przekierowanie \n\t}", "title": "" }, { "docid": "0116d0ecb5d3617350e2648a9c77af01", "score": "0.63101536", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "c97a6099b08ffd2b4fea7daf7bba6f1e", "score": "0.63089603", "text": "public function actionDelete()\n {\n $model = new Assets;\n $module = 'Assets';\n $this->LoginCheck();\n $id = $_POST['id'];\n // call function deleteAsset to delete selected asset\n $model->deleteAsset($module, $id);\n }", "title": "" }, { "docid": "50bc1bbe05ba4ff90517f1624775ea14", "score": "0.6308565", "text": "public function vehicle_model_delete() {\n\t\tCheckAdminLoginSession();\n\t\t$id = $this->uri->segment(4);\n\t\t$this->admin_model->dataDelete($this->vehicle_model,$id);\n\t\t$this->session->set_flashdata('message','Your Vehicle Model has been deleted successfully');\n redirect('admin/vehicle/vehicle-model','refresh');\n\t}", "title": "" }, { "docid": "c803d23fcc55f15fd1f6794b4257e6d3", "score": "0.6301671", "text": "public function delete()\n {\n $UserConnected = $_SESSION['UserConnected'];\n\n if ($UserConnected != null) {\n\n\n $this->model->deleteBook($_GET['id']);\n header(\"Location: /resabike/book\");\n\n } else\n header(\"Location: /resabike/index\");\n }", "title": "" }, { "docid": "c4b4ecf7af5a58e9d19ed4ec2a983721", "score": "0.62856007", "text": "public function delete()\n\t{\n\t\t$this->reset_error_msg();\n\t\t$result = ajax::asset_delete(\n\t\t\t\t\t\t$this -> schema -> folder_id,\n\t\t\t\t\t\t$this -> schema -> view_name,\n\t\t\t\t\t\t$this -> id,\n\t\t\t\t\t\t$mode = \"delete\"\n\t\t);\t\n\t}", "title": "" }, { "docid": "2930b65bc73134b594a2a6ed47f8b99b", "score": "0.62834984", "text": "public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (empty($id)) {\n return $this->redirect()->toRoute('categorybeheer');\n }\n $category = $this->categoryService->getCategoryById($id);\n if (empty($category)) {\n return $this->redirect()->toRoute('categorybeheer');\n }\n $this->categoryService->deleteCategory($category);\n $this->flashMessenger()->addSuccessMessage('Category verwijderd');\n $this->redirect()->toRoute('categorybeheer');\n }", "title": "" }, { "docid": "3ee91df933134bd19ae85dc00c6c76df", "score": "0.62817365", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "311c7c9f973533e92cb97761ac92aca9", "score": "0.6279548", "text": "public function delete()\n {\n $id = $this->request->getParam('id');\n $delete = CommentManager::deleteById($id);\n\n $this->alertMessage('index', $delete, static::DELETE);\n }", "title": "" }, { "docid": "900b1a9b953bff267c88893a07fdcea6", "score": "0.62776196", "text": "public function delete(){\n\n $page_name = 'category/delete';\n $data = ['page_name' => $page_name ];\n\n $id = $this->uri->segment(3);\n\n $data[\"result\"] = $this->Category_model->getByDeleteId($id);\n\n if($data){\n $this->Category_model->deleteCategory($id);\n redirect(base_url());\n }\n else{\n $this->load->view('index', $data);\n\n }\n }", "title": "" }, { "docid": "ee432c8cf936ec897e46096426a9c0e9", "score": "0.62756854", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "3d50d32701b615074d76b9d84692a84e", "score": "0.62721926", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f5e6b303dde65e7b3df7dbdbfc23d428", "score": "0.6271841", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f5151f36e5f00b48c96a0b618c7c0350", "score": "0.62691236", "text": "public function delete()\n { \n $this->model->load('song');\n $song=$this->model->song->findById($_GET['id']);\n $song->delete();\n go_back();\n }", "title": "" }, { "docid": "66ae10e287d38a8e7991fce9a9675fe7", "score": "0.62674314", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n //return $this->redirect(['index']);\n \n $model = $this->findModel($id);\n \n if($model->delete()){\n \techo 1;\n }else{\n \techo \"ลบข้อมูลไม่สำเร็จ.\";\n }\n }", "title": "" }, { "docid": "84b7983f2e832b4bfe29bfbbb1f7a476", "score": "0.6262241", "text": "public function destroy($id)\n {\n $banner = Banner::where('id',$id);\n $banner_image_path = $banner->first()->image_url;\n if(File::exists(public_path().$banner_image_path)) {\n File::delete(public_path().$banner_image_path);\n }\n $banner->delete();\n \\Session::flash('message', 'Banner has been deleted successfully!');\n return redirect()->route('banners.index');\n }", "title": "" }, { "docid": "5d4ed06ea2b28746d376985f266a1d9d", "score": "0.6261612", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n if ($model->delete()) {\n if ($model->album_id == null) {\n $model->deletePortada();\n }\n $model->deleteCancion();\n }\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "4c602d64208e8eb86b27934e50fbb711", "score": "0.6259969", "text": "public function actionDelete()\n {\n $purifier = new HtmlPurifier;\n $param = $purifier->process( Yii::$app->request->get('id') );\n\n $realidadaumentada = $this->findModel($param);\n $proyecto = Proyecto::find()->where(['idpro'=>$realidadaumentada->fkpro])->one();\n $imagen = Imagen::find()->where(['idimag'=>$realidadaumentada->fkimag])->one();\n\n if ($realidadaumentada->delete()) {\n if ($proyecto->delete()) {\n if ($imagen->delete()) {\n Yii::$app->session->setFlash('succes','El Proyecto de Realidad Aumentada fue Eliminado!!');\n return $this->redirect(['index']);\n }\n }\n }\n\n }", "title": "" }, { "docid": "f6b5bbf523669d8c86fe2a553a13622d", "score": "0.625223", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f6b5bbf523669d8c86fe2a553a13622d", "score": "0.625223", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "07baae4347c669a8d67338aab2af202a", "score": "0.6248523", "text": "public function destroy($id)\n {\n $banner = $this->bannerRepository->find($id);\n\n if (empty($banner)) {\n Flash::error('Banner not found');\n\n return redirect(route('banners.index'));\n }\n\n $this->bannerRepository->delete($id);\n\n Flash::success('Banner deleted successfully.');\n\n return redirect(route('banners.index'));\n }", "title": "" }, { "docid": "0b33688af1ed13f788f8c91e1cc6e2a9", "score": "0.6247381", "text": "public function actionDelete($id)\n {\n\n exit;\n $this->layout = 'default'; \n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "fe3f244e9c4545b6bbdb654eecc59e33", "score": "0.62469923", "text": "public function actionDelete($id)\n\t{\n\t $model = Document::findOne($id);\n\t\tif (!$model)\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist');\n\t if ($model->delete()) {\n \tif (!$model->deleteImage())\t\n \t\tYii::$app->session->setFlash('error', 'Could not delete document');\n }\n\t\treturn $this->goBack();\n\t}", "title": "" }, { "docid": "39eded6dfdeccda18ac5c3fc5e1960f9", "score": "0.6243971", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "39eded6dfdeccda18ac5c3fc5e1960f9", "score": "0.6243971", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "155e3731c990526bab3749c0d201ed56", "score": "0.6239693", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n if(file_exists($model->image)) {\n\n unlink($model->image);\n }\n\n $model->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "1d038563a40ee7ed02dc0884dd8d37d9", "score": "0.6238353", "text": "public function actionDelete($id)\n {\n /*$this->findModel($id)->delete();\n\n return $this->redirect(['index']);*/\n return $this->redirect(['view', 'id' => $id]);\n \n }", "title": "" }, { "docid": "a06abe24078d1acfb74e68d6687b19da", "score": "0.6237987", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "20e2bc9d87565176ce3405dfd8fe78f1", "score": "0.623681", "text": "public function deleteAction() {\n\n // get id from Get\n $id = $this->route_params[\"id\"];\n // validate id is int\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n// get the contact from DB\n $contact = $contact_obj->findById($id);\n\n if ($contact == false) {\n // redirect to show all contacts if contacts not found\n $this->show404();\n return;\n } else {\n $contact_obj->deleteById($id);\n\n $_SESSION[\"success_message\"] = \"Contact deleted successfully\";\n // redirect to show all contacts\n header(\"Location: /contacts\");\n }\n }", "title": "" }, { "docid": "4d7c821447a3b8c9e09da6f2bef608d2", "score": "0.6228614", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $model->delete();\n if($model->image_id) {\n /** @var $image Image */\n $image = Image::findOne($model->image_id);\n $image->delete();\n }\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "37f2cc9961ec2fcad7763e57f5a67d43", "score": "0.62243205", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "37f2cc9961ec2fcad7763e57f5a67d43", "score": "0.62243205", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "12818593e6451fc12dfe6602133bb90c", "score": "0.621776", "text": "private function delete()\n {\n\n $this->_categorieManager = new CategorieManager();\n $categorie = $this->_categorieManager->deleteCategorie($_GET['id']);\n \n if(isset($_GET['delete'])){\n $this->view = new View ('DeletePost');\n // $this->_view->generateFileSimple();\n var_dump($this->view);\n\n }\n }", "title": "" }, { "docid": "d717ef4b5af644eec38bc2f59f8384af", "score": "0.62170416", "text": "public function actionDelete()\n\t{\n\t\tif(Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t// we only allow deletion via POST request\n\t\t\t$model=$this->loadModel();\n\t\t\t$model->delete();\n\t\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\t\tif(!isset($_POST['ajax']))\n\t\t\t\t$this->redirect(array('index'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n\t}", "title": "" }, { "docid": "8efcb926a7dbe36210d6a7b58f495cea", "score": "0.62153506", "text": "public function destroy($id)\n {\n try {\n $banner = Banner::find($id);\n if (!$banner) {\n throw new \\Exception('Banner não encontrado', 404);\n }\n $banner->delete();\n return redirect('admin/banners')->with('status', 'Banner removido com sucesso');\n } catch (\\Exception $e) {\n $this->handleException($e);\n }\n }", "title": "" }, { "docid": "82f0ca3f231e6b7bc93f5872d8a93c6f", "score": "0.6214904", "text": "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}", "title": "" }, { "docid": "341dd332059982c902b6e7c347c2d15e", "score": "0.62081254", "text": "public function destroy($id)\n\t{\n\t $bann = Banner::find($id);\n\n\t if(!is_null($bann)){\n\t $bann->delete();\n\t } \n\t return Response()->json([\n\n\t \"msj\" => \"success\",\n\t \"redirect\" => url('admin/banners')\n\t ]);\n\t}", "title": "" }, { "docid": "4cc0c5af7e2030339f9ea409672fc17f", "score": "0.62013566", "text": "public function delete() {\n\n $id = $this->request->getParameter(\"actionid\");\n $this->model->delete($id);\n\n // generate view\n $this->redirect(\"psentryreason\");\n }", "title": "" }, { "docid": "b6dfdb1d888768b0ea7afdc13f955df0", "score": "0.6201037", "text": "public function destroy(Banner $banner)\n {\n $this->authorize('delete banner', $banner);\n\n try {\n $url = $banner->url ? $banner->url : NULL;\n\n $banner->delete();\n\n if($url) {\n Storage::delete($banner->url);\n }\n } catch (\\Illuminate\\Database\\QueryException $e) {\n if($e->getCode() == 23000)\n {\n return redirect()\n ->back()\n ->withErrors(__('crud.general.integrity_violation'));\n }\n return redirect()\n ->back()\n ->withErrors(__('crud.general.not_done'));\n }\n\n return redirect()\n ->back()\n ->withSuccess(__('crud.general.deleted'));\n }", "title": "" }, { "docid": "65f5aa05897cbc70f1621776dc5fb1b4", "score": "0.61981064", "text": "public function deleteAction(Advert $advert)\n { \n $em = $this->getDoctrine()->getManager();\n $em->remove($advert);\n $em->flush($advert);\n \n return $this->redirectToRoute('advert_selectBrandsModels');\n }", "title": "" }, { "docid": "f0b75ddd7fab771adbc36f7828c143b0", "score": "0.61952543", "text": "public function actionDelete()\n {\n $model =\n Profile::find()->where([\n 'user_id' => Yii::$app->user->identity->id\n ])->one();\n $this->findModel($model->id)->delete();\n return $this->redirect(['site/index']);\n }", "title": "" }, { "docid": "72575e07056a8637ace0bf32e3281e85", "score": "0.61876345", "text": "public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "7b6c483d86bf4d977b30d3f554f81a93", "score": "0.6187214", "text": "public\n function actionDelete($id)\n {\n $model = $this->findModel($id);\n if ($model)\n $model->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "e5e44c0703ab2b3e5d410c8c8801dd17", "score": "0.61864334", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $old_anexo = (new Query())->select('anexo')->from('post')->where(['id' => $model->id])->one();\n\n if(file_exists('uploud/post/'.$old_anexo['anexo']) ) {\n unlink('uploud/post/'.$old_anexo['anexo']);\n $model->delete();\n }else {\n $model->delete();\n }\n\n return $this->redirect(['index', 'data' => $this->count(),]);\n }", "title": "" }, { "docid": "bd6c0bd70acba2ea46d39e260018b536", "score": "0.61840636", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "97cb7e97caaa39f1bb5a2a639dfc67d6", "score": "0.61793226", "text": "public function actionDelete($id) {\n\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ccfdf9e77eb9fdc12389301bfbd6e32c", "score": "0.61777675", "text": "public function actionDelete($id)\n {\n $model=$this->findModel($id);\n UtilHelper::DeleteImg($model->main_image);\n UtilHelper::DeleteImg($model->node_image);\n $model->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "0d4b59cf0c73b821eb1a3995c9ce6acb", "score": "0.61719894", "text": "public function actionDelete()\n {\n $id = $_POST['id'];\n /** @var $photos GalleryPhoto[] */\n $photos = Foto::model()->with('albumFoto')->findAllByPk($id);\n foreach ($photos as $photo) {\n if ($photo !== null) {\n $photo->delete();\n }\n else throw new CHttpException(400, 'Photo, not found');\n }\n echo 'OK';\n }", "title": "" }, { "docid": "e7e7566d47b92cd51c3012fca2040615", "score": "0.6171274", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.6169619", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.6169619", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.6169619", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.61686677", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" } ]
d05ccb9f4a4af11f9a55b2d4788d6c04
Intercept all UAs containing "BlackBerry"
[ { "docid": "086961961c9da4f10791c38a4331fecb", "score": "0.51590407", "text": "public function canHandle($userAgent) {\n\t\treturn WURFL_Handlers_Utils::checkIfContains ( $userAgent, \"BlackBerry\" );\n\t}", "title": "" } ]
[ { "docid": "33bb3d84bdd321f877659928aa8797ca", "score": "0.56748325", "text": "public function IsBlackberryMobile()\n {\n\n }", "title": "" }, { "docid": "d91afc304d1bdf5c27970973579751a3", "score": "0.54492503", "text": "protected function checkBrowserBlackBerry()\n {\n if (stripos($this->_agent, 'blackberry') !== false) {\n $aresult = explode('/', stristr($this->_agent, \"BlackBerry\"));\n if (isset($aresult[1])) {\n $aversion = explode(' ', $aresult[1]);\n $this->setVersion($aversion[0]);\n $this->_browser_name = BrowserInterface::BROWSER_BLACKBERRY;\n $this->setMobile(true);\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "ed5b5e0a3d896d20a63b57a0e627e662", "score": "0.5426031", "text": "protected function checkBrowserBlackBerry()\n {\n if (stripos($this->_agent, 'blackberry') !== false) {\n $aresult = explode(\"/\", stristr($this->_agent, \"BlackBerry\"));\n $aversion = explode(' ', $aresult[1]);\n $this->setVersion($aversion[0]);\n $this->_browser_name = self::BROWSER_BLACKBERRY;\n $this->setMobile(true);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b0b8ba1a268890b49d5c452d4744d5be", "score": "0.54195744", "text": "protected function checkBrowserBlackBerry()\n {\n if (stripos($this->_agent, 'blackberry') !== false) {\n $aresult = explode(\"/\", stristr($this->_agent, \"BlackBerry\"));\n if (isset($aresult[1])) {\n $aversion = explode(' ', $aresult[1]);\n $this->setVersion($aversion[0]);\n $this->_browser_name = self::BROWSER_BLACKBERRY;\n $this->setMobile(true);\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "d0ea1980c86fc4cb59208715cb938a67", "score": "0.5078705", "text": "public function enable_bbcodes();", "title": "" }, { "docid": "6944d372ef7b388cde52e912c6e3051e", "score": "0.5041817", "text": "public function otherMobile();", "title": "" }, { "docid": "4e458d5467edb94e730bf2bb3579f2b5", "score": "0.50352526", "text": "public function ignoreApdex();", "title": "" }, { "docid": "b531a7e7c86d361041882a10fd24183e", "score": "0.49882284", "text": "public function disable_bbcodes();", "title": "" }, { "docid": "422637fc6516bcbdfa037ec5e4b1e225", "score": "0.4940378", "text": "protected function checkBrowserUCB()\n {\n \tif (stripos($this->_agent, 'UCWEB') !== false) {\n \t\t$aresult = explode('/', stristr($this->_agent, 'UCBrowser'));\n \t\t$aversion = explode(' ', $aresult[1]);\n \t\t$this->setVersion($aversion[0]);\n \t\t$this->setBrowser(self::BROWSER_UCB);\n \t\t//Ucb on Android\n \t\tif (stripos($this->_agent, 'Adr') !== false) {\n \t\t\tif (stripos($this->_agent, 'Mobile') !== false) {\n \t\t\t\t$this->setMobile(true);\n \t\t\t} else {\n \t\t\t\t$this->setTablet(true);\n \t\t\t}\n \t\t}\n \t\treturn true;\n \t}\n \treturn false;\n }", "title": "" }, { "docid": "cd35008709e7c782d4075011f34ba5c5", "score": "0.48566538", "text": "public function isBlackBerryOS ()\n {\n return $this->getMobileDetect()->isBlackBerryOS();\n }", "title": "" }, { "docid": "68079732521a0468c566ab5b790d9fb9", "score": "0.47119147", "text": "public function ami_checkmobile() {\n \t$mobile = array();\n \tstatic $touchbrowser_list =array('iphone', 'android', 'phone', 'mobile', 'wap', 'netfront', 'java', 'opera mobi', 'opera mini',\n \t\t\t'ucweb', 'windows ce', 'symbian', 'series', 'webos', 'sony', 'blackberry', 'dopod', 'nokia', 'samsung',\n \t\t\t'palmsource', 'xda', 'pieplus', 'meizu', 'midp', 'cldc', 'motorola', 'foma', 'docomo', 'up.browser',\n \t\t\t'up.link', 'blazer', 'helio', 'hosin', 'huawei', 'novarra', 'coolpad', 'webos', 'techfaith', 'palmsource',\n \t\t\t'alcatel', 'amoi', 'ktouch', 'nexian', 'ericsson', 'philips', 'sagem', 'wellcom', 'bunjalloo', 'maui', 'smartphone',\n \t\t\t'iemobile', 'spice', 'bird', 'zte-', 'longcos', 'pantech', 'gionee', 'portalmmm', 'jig browser', 'hiptop',\n \t\t\t'benq', 'haier', '^lct', '320x320', '240x320', '176x220');\n \tstatic $mobilebrowser_list =array('windows phone');\n \tstatic $wmlbrowser_list = array('cect', 'compal', 'ctl', 'lg', 'nec', 'tcl', 'alcatel', 'ericsson', 'bird', 'daxian', 'dbtel', 'eastcom',\n \t\t\t'pantech', 'dopod', 'philips', 'haier', 'konka', 'kejian', 'lenovo', 'benq', 'mot', 'soutec', 'nokia', 'sagem', 'sgh',\n \t\t\t'sed', 'capitel', 'panasonic', 'sonyericsson', 'sharp', 'amoi', 'panda', 'zte');\n \n \t$pad_list = array('pad', 'gt-p1000');\n \n \t$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);\n \n \tif($this->dstrpos($useragent, $pad_list)) {\n \t\treturn false;\n \t}\n \tif(($v = $this->dstrpos($useragent, $mobilebrowser_list, true))){\n \t\treturn '1';\n \t}\n \tif(($v = $this->dstrpos($useragent, $touchbrowser_list, true))){\n \t\treturn '2';\n \t}\n \tif(($v = $this->dstrpos($useragent, $wmlbrowser_list))) {\n \t\treturn '3'; //wml版\n \t}\n \t$brower = array('mozilla', 'chrome', 'safari', 'opera', 'm3gate', 'winwap', 'openwave', 'myop');\n \tif($this->dstrpos($useragent, $brower)) return false;\n \n \treturn false;\n }", "title": "" }, { "docid": "e6233452bd7eba90a5755505800e8ebd", "score": "0.47085792", "text": "private function _detect_from_useragent()\n\t{\n\t\tif ( $this->_is_docomo() === TRUE )\n\t\t{\n\t\t\t$this->_mobile_carrier = 'docomo';\n\t\t}\n\t\telse if ( $this->_is_au() === TRUE )\n\t\t{\n\t\t\t$this->_mobile_carrier = 'au';\n\t\t}\n\t\telse if ( $this->_is_softbank() === TRUE )\n\t\t{\n\t\t\t$this->_mobile_carrier = 'softbank';\n\t\t}\n\t\telse if ( $this->_is_willcom() === TRUE )\n\t\t{\n\t\t\t$this->_mobile_carrier = 'willcom';\n\t\t}\n\t\t\n\t\t$this->_mobile = ( $this->_mobile_carrier !== '' ) ? TRUE : FALSE;\n\t}", "title": "" }, { "docid": "36ddd9971baec0c36b9f0b261f2d9157", "score": "0.46951658", "text": "public function isBlackBerryOS()\n {\n return $this->getMobileDetect()->isBlackBerryOS();\n }", "title": "" }, { "docid": "c173e86f74268bce158411e174a85762", "score": "0.46777615", "text": "private static function checkBlackBerry(Os $os, UserAgent $userAgent)\n {\n if (stripos($userAgent->getUserAgentString(), 'BlackBerry') !== false) {\n if (stripos($userAgent->getUserAgentString(), 'Version/') !== false) {\n $aresult = explode('Version/', $userAgent->getUserAgentString());\n if (isset($aresult[1])) {\n $aversion = explode(' ', $aresult[1]);\n $os->setVersion($aversion[0]);\n }\n } else {\n $os->setVersion($os::VERSION_UNKNOWN);\n }\n $os->setName($os::BLACKBERRY);\n $os->setIsMobile(true);\n\n return true;\n } elseif (stripos($userAgent->getUserAgentString(), 'BB10') !== false) {\n $aresult = explode('Version/10.', $userAgent->getUserAgentString());\n if (isset($aresult[1])) {\n $aversion = explode(' ', $aresult[1]);\n $os->setVersion('10.' . $aversion[0]);\n } else {\n $os->setVersion('10');\n }\n $os->setName($os::BLACKBERRY);\n $os->setIsMobile(true);\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a884fc168c0723f4b5898ec2e92e23e4", "score": "0.46178403", "text": "public function mobile();", "title": "" }, { "docid": "43e02a0d0d7f57f852354e6941bdd1bd", "score": "0.45508078", "text": "public function testInAppApple()\n {\n $stage = new BrowserDetect;\n $payload = new Payload('Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_5 like Mac OS X) ' .\n 'AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13G36');\n $result = $stage($payload);\n $this->assertTrue($result->isInApp());\n }", "title": "" }, { "docid": "5a133f8e3fedca2426dcaa71167e0e0a", "score": "0.4533043", "text": "function csbwfsIsMobile() {\nif(isset($_SERVER[\"HTTP_X_WAP_PROFILE\"])) {\n return true;\n}\n// Let's NOT return \"mobile\" if it's an iPhone, because the iPhone can render normal pages quite well.\nif(isset($_SERVER[\"HTTP_USER_AGENT\"])):\nif(strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {\n return false;\n}\nendif;\n\n// If the http_accept header supports wap then it's a mobile too\nif(isset($_SERVER[\"HTTP_ACCEPT\"])):\nif(preg_match(\"/wap\\.|\\.wap/i\",$_SERVER[\"HTTP_ACCEPT\"])) {\n return true;\n}\nendif;\n// Still no luck? Let's have a look at the user agent on the browser. If it contains\n// any of the following, it's probably a mobile device. Kappow!\nif(isset($_SERVER[\"HTTP_USER_AGENT\"])){\n $user_agents = array(\"midp\", \"j2me\", \"avantg\", \"docomo\", \"novarra\", \"palmos\", \"palmsource\", \"240x320\", \"opwv\", \"chtml\", \"pda\", \"windows\\ ce\", \"mmp\\/\", \"blackberry\", \"mib\\/\", \"symbian\", \"wireless\", \"nokia\", \"hand\", \"mobi\", \"phone\", \"cdm\", \"up\\.b\", \"audio\", \"SIE\\-\", \"SEC\\-\", \"samsung\", \"HTC\", \"mot\\-\", \"mitsu\", \"sagem\", \"sony\", \"alcatel\", \"lg\", \"erics\", \"vx\", \"NEC\", \"philips\", \"mmm\", \"xx\", \"panasonic\", \"sharp\", \"wap\", \"sch\", \"rover\", \"pocket\", \"benq\", \"java\", \"pt\", \"pg\", \"vox\", \"amoi\", \"bird\", \"compal\", \"kg\", \"voda\", \"sany\", \"kdd\", \"dbt\", \"sendo\", \"sgh\", \"gradi\", \"jb\", \"\\d\\d\\di\", \"moto\");\n foreach($user_agents as $user_string){\n if(preg_match(\"/\".$user_string.\"/i\",$_SERVER[\"HTTP_USER_AGENT\"])) {\n return true;\n }\n }\n}\n// None of the above? Then it's probably not a mobile device.\nreturn false;\n}", "title": "" }, { "docid": "450590843c44c1df2e1dfe264bfaf3fd", "score": "0.45090616", "text": "function isMobile()\n{\n return preg_match(\"/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\\.browser|up\\.link|webos|wos)/i\", $_SERVER[\"HTTP_USER_AGENT\"]);\n}", "title": "" }, { "docid": "0a542a594f51ac627824a45b5599681d", "score": "0.44995168", "text": "function app_asterisk() {\n $this->name=\"app_asterisk\";\n $this->title=\"Asterisk\";\n $this->module_category=\"<#LANG_SECTION_APPLICATIONS#>\";\n $this->checkInstalled();\n}", "title": "" }, { "docid": "d75943c9a512119dc82fcffbad4160d2", "score": "0.44666514", "text": "function do_robots() {}", "title": "" }, { "docid": "72a1c2caf1fe644db1db1dca93b98c8e", "score": "0.44567254", "text": "public function actionIndex()\n { \n require_once 'data.php';\n\n $ip = Yii::$app->getRequest()->getUserIP(); \n $useragent = Yii::$app->request->getUserAgent();\n $country = $this->BewteenBinarySearch(Yii::$app->getRequest()->getUserIP(),$data,$data2); \n require_once 'Mobile_Detect.php';\n $detect = new \\Mobile_Detect;\n $a = strtolower($useragent);\n $is_bot = 0;\n if(preg_match('/robot|bot|Bot|BOT|Nutch|WebCopier|WebStripper|Teleport|Offline|SiteSnagger|EmailSiphon|EmailCollector|larbin|Crawler|moget|facebookexternalhit|facebot|ia_archiver|Google-Adwords-DisplayAds|Go-http-client|Riddle|socketcrawler|NetcraftSurveyAgent|yahoo|mail|antivirus|fetcher|mail.ru_bot|crawl|slurp|mediapartners|majesticsEO|facebook|pingdom|get|java|find|radioclicker|dataprovider|spider|crawler|curl|Console|Google-Site-Verification|^$/i', $a)) $is_bot = 1;\n if ($detect->isBot() || $detect->isSpider()) $is_bot = 1;\n\n if(!empty(urldecode(Yii::$app->request->queryString))) $serverName = 'https://'.Yii::$app->getRequest()->serverName.\"?\".urldecode(Yii::$app->request->queryString);\n else $serverName = 'https://'.Yii::$app->getRequest()->serverName;\n\n if($country != 'RU')\n {\n $a = json_decode(file_get_contents('http://ip-api.com/json/'.$ip), true);\n $country = $a['countryCode']; \n }\n\n // check IP for ban list\n $ban_ip = Banip::find('ip')->where('ip = :ip', [':ip'=> $ip])->count();\n\n $show_white = false;\n // check for row parammetras strpos(urldecode(Yii::$app->request->queryString), '{source}') !== false ||\n if( strpos(urldecode(Yii::$app->request->queryString), '{campaign_id}') !== false || strpos(urldecode(Yii::$app->request->queryString), '{keyword}') !== false || strpos(urldecode(Yii::$app->request->queryString), '{SRC}') !== false || strpos(urldecode(Yii::$app->request->queryString), '{PHRASE}') !== false || strpos(urldecode(Yii::$app->request->queryString), '{campaignid}') !== false || strpos(Yii::$app->request->queryString, '%7D') !== false || strpos(Yii::$app->request->queryString, '%7B') !== false || strpos(Yii::$app->request->queryString, '{{campaign.id}}') !== false || strpos(Yii::$app->request->queryString, '{{placement}}') !== false || strpos(Yii::$app->request->queryString, '{{site_source_name}}') !== false)\n $show_white = true;\n\n $model2 = Sites::find()->select('*')->where(['site' => 'https://'.Yii::$app->getRequest()->serverName])->one();\n\n // if utm is enable, check\n if($model2['utm_enable'] == 1)\n {\n if (empty(urldecode(Yii::$app->request->get('utm_source', '')))) $show_white = true;\n else\n {\n $a = urldecode(Yii::$app->request->get('utm_source', ''));\t\n\n if(!empty(Yii::$app->request->get('utm_source', '')) && Yii::$app->request->get('utm_source', '') == \"facebook\" && !empty(Yii::$app->request->get('utm_medium', '')) && !empty(Yii::$app->request->get('utm_campaign', '')))\n {\n try {\n $s1 = Yii::$app->request->get('utm_source', ''); \n $s2 = Yii::$app->request->get('utm_medium', '');\n $s3 = Yii::$app->request->get('utm_campaign', '');\n $a = $s1.\"_\".$s2.'_'.$s3;\n }\n catch (Exception $e) {\n //echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n }\n }\n else \n {\n if(empty(explode(\"_\", $a)[0])) $show_white = true; \n else if(empty(explode(\"_\", $a)[1])) $show_white = true;\n else if(empty(explode(\"_\", $a)[2])) $show_white = true;\n else {\n try { \n $s1 = explode(\"_\", $a)[0]; \n $s2 = explode(\"_\", $a)[1]; \n $s3 = explode(\"_\", $a)[2];\n }\n catch (Exception $e) {\n //echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n }\n } \n } \n } \n }\n \n if($is_bot == 1 || $country != 'RU' || $show_white || $model2['enable'] == 0 || $ban_ip > 0)\n\t\t{\n if(!empty(urldecode(Yii::$app->request->queryString))) $serverName = $model2['white'].\"?\".urldecode(Yii::$app->request->queryString).\"--white\";\n else $serverName = $model2['white'].\"--white\";\n }\n else\n {\n if(!empty(urldecode(Yii::$app->request->queryString))) \n {\n if((strpos($model2['grey'],'utm1') != false || strpos($model2['grey'],'all5') != false) && Yii::$app->request->get('utm_source', '') != \"facebook\")\n {\n if(strpos($model2['grey'],'utm1') != false)\n $model2['grey'] = str_replace('utm1', explode(\"_\", Yii::$app->request->get('utm_source', '_'))[0], $model2['grey']);\n if(strpos($model2['grey'],'utm2') != false)\n $model2['grey'] = str_replace('utm2', explode(\"_\", Yii::$app->request->get('utm_source', '_'))[1], $model2['grey']);\n if(strpos($model2['grey'],'utm3') != false)\n $model2['grey'] = str_replace('utm3', explode(\"_\", Yii::$app->request->get('utm_source', '___'))[2], $model2['grey']);\n if(strpos($model2['grey'],'utm4') != false)\n $model2['grey'] = str_replace('utm4', explode(\"_\", Yii::$app->request->get('utm_source', '__'))[3], $model2['grey']);\n if(strpos($model2['grey'],'all5') != false)\n $model2['grey'] = str_replace('all5', Yii::$app->request->get('utm_source', 'test'), $model2['grey']);\n $serverName = $model2['grey'];\n }\n else if(Yii::$app->request->get('utm_source', '') == \"facebook\")\n {\n if(strpos($model2['grey'],'utm1') != false)\n $model2['grey'] = str_replace('utm1', Yii::$app->request->get('utm_source', ''), $model2['grey']);\n if(strpos($model2['grey'],'utm2') != false)\n $model2['grey'] = str_replace('utm2', Yii::$app->request->get('utm_medium', ''), $model2['grey']);\n if(strpos($model2['grey'],'utm3') != false)\n $model2['grey'] = str_replace('utm3', Yii::$app->request->get('utm_campaign', ''), $model2['grey']);\n if(strpos($model2['grey'],'utm4') != false)\n $model2['grey'] = str_replace('utm4', Yii::$app->request->get('utm_content', ''), $model2['grey']);\n if(strpos($model2['grey'],'utm5') != false)\n $model2['grey'] = str_replace('utm5', Yii::$app->request->get('utm_term', ''), $model2['grey']);\n $serverName = $model2['grey'];\n }\n else\n $serverName = $model2['grey'].\"?\".urldecode(Yii::$app->request->queryString);\n }\n else $serverName = $model2['grey'];\n // if(!empty(urldecode(Yii::$app->request->queryString))) $serverName = $model2['grey'].\"?\".urldecode(Yii::$app->request->queryString);\n // else $serverName = $model2['grey'];\n }\n\n // if(Yii::$app->request->get('utm_source', '') != \"facebook\")\n // {\n // $a = urldecode(Yii::$app->request->get('utm_source', ''));\n // }\n // else{\n // try {\n // $s1 = Yii::$app->request->get('utm_source', ''); \n // $s2 = Yii::$app->request->get('utm_medium', 'test1');\n // $s3 = Yii::$app->request->get('utm_campaign', 'test2');\n // $a = $s1.\"_\".$s2.'_'.$s3;\n // }\n // catch (Exception $e) {\n \n // }\n // }\n \n // add visitors\n $visitors = new Visitors();\n $visitors->ip = $ip; // add IP\n $visitors->useragent = $useragent; // add useragent\n $date = new \\DateTime();\n $date = $date->format('Y-m-d H:i:s');\n $visitors->date = $date; // add Date\n if(preg_match('/http|^$/i', $serverName))\n $visitors->site = $serverName; // add site to visit\n else\n $visitors->site = \"https://\".$serverName;\n $visitors->country = $country; // add what country\n $is_mobile = 0;\n if($detect->isMobile()) $is_mobile = 1;\n else if($detect->isTablet()) $is_mobile = 2;\n $visitors->is_mobile = $is_mobile; // add is mobile or not\n $visitors->is_bot = $is_bot; // add is bot or not\n $visitors->save(); // insert to visitors\n // end add visitors\n\n // start check for DOSS attack\n $dos = Visitors::find('date')->where('date = :date', [':date' => $date])->andWhere('ip = :ip', [':ip' => $ip])->count();\n\n $dateTime = strtotime('+ 30 minute');\n $dateTime = date('d-m-Y H:i:s', $dateTime);\n $dateTime2 = strtotime('+ 0 minute');\n $dateTime2 = date('d-m-Y H:i:s', $dateTime2);\n\n if(empty($this->session->get('date')))\n {\n $this->session->set('_ban', 'NOBAN');\n $this->session->set('date', $dateTime2);\n }\n\n if($dos >= 3)\n {\n $this->session->set('_ban', 'BAN');\n $this->session->set('date', $dateTime);\n $temp_ban = new Temp_ban();\n $temp_ban->ip = $ip;\n $temp_ban->useragent = $useragent;\n $date = new \\DateTime();\n $date = $date->format('Y-m-d H:i:s');\n $temp_ban->date = $date;\n $temp_ban->site = ($ban_ip > 0 || $show_white == true || $country != 'RU') ? ('white;original='.$serverName) : $serverName;\n $temp_ban->country = $country;\n $temp_ban->save();\n return $this->render('ban',['bane_date'=> $this->session->get('date')]);\n }\n else\n {\n $ban = $this->session->get('_ban'); \n $date2 = $this->session->get('date'); \n \n if($ban == 'BAN' && $date2 > $dateTime2) return $this->render('ban',['bane_date'=> $this->session->get('date')]);\n else \n {\n $this->session->set('_ban', 'NOBAN');\n $this->session->set('date', $dateTime2);\n }\n }\n // end for DOSS attack\n\n // add Bot to ban list\n if($is_bot == 1) \n {\n $_banip = Banip::find('ip')->where('ip = :ip', [':ip' => $ip])->count();\n if($_banip == 0)\n {\n $banip = new Banip();\n $banip->ip = $ip;\n $banip->save(); // insert to banip\n } \n } \n\n if(preg_match('/http|^$/i', $serverName))\n return $this->render('redirect',['model' => $model2, \"a\" => $serverName]);\n \n if((strpos(Yii::$app->getRequest()->serverName, 'lol-surprise-lp') !== false && strpos(Yii::$app->getRequest()->serverName, 'lol-surprise-lp1') === false) || strpos(Yii::$app->getRequest()->serverName, 'lifeportal') !== false)\n { \n // if($country != 'RU' && $country != 'AT') \n // return $this->render(\"lifeportal\",['model' => $model2, \"a\" => $a, \"model3\" => Youtubeen::find()->select('*')->all()]);\n // else \n //if($country != 'RU') return $this->render(\"lifeportalge\",['model' => $model2, \"a\" => $a, \"model3\" => Youtubege::find()->select('*')->all()]);\n //else \n\t\t\t\treturn $this->render(explode(\".\", $serverName)[0],['model' => $model2, \"a\" => $a, \"model3\" => Youtube::find()->select('*')->all()]);\n } \n\t\t\n return $this->render(explode(\".\", $serverName)[0],['model' => $model2, \"a\" => $a]);\n }", "title": "" }, { "docid": "ad3738f465f42868ee209c60598b083e", "score": "0.44390205", "text": "function ciniki_core_userAgentFind($ciniki, $user_agent) {\n //\n // All arguments are assumed to be un-escaped, and will be passed through dbQuote to\n // ensure they are safe to insert.\n //\n\n // Required functions\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbQuote');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n\n $strsql = \"SELECT type_status, size, flags, \"\n . \"engine, engine_version, os, os_version, \"\n . \"browser, browser_version, device, device_version, device_manufacturer \"\n . \"FROM ciniki_core_user_agents \"\n . \"WHERE user_agent = '\" . ciniki_core_dbQuote($ciniki, $user_agent) . \"' \"\n . \"\";\n \n return ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.core', 'device');\n}", "title": "" }, { "docid": "4d0aa688a2954ae1f38f521361bfc2ca", "score": "0.44266906", "text": "function tep_browser_detect($component) {\n return stristr($_SERVER[\"HTTP_USER_AGENT\"], $component);\n}", "title": "" }, { "docid": "83916e28c70eea92e6c9393bcaf99761", "score": "0.44263932", "text": "function is_mobile() {\r\n\tstrpos($_SERVER['HTTP_USER_AGENT'], 'iPhone') !== false\r\n\t\t|| strpos($_SERVER['HTTP_USER_AGENT'], 'Android') !== false\r\n\t\t|| strpos($_SERVER['HTTP_USER_AGENT'], 'Blackberry') !== false;\r\n}", "title": "" }, { "docid": "2ae6f8f214b45bf4a6993ba59ec8e294", "score": "0.44156227", "text": "function detectAccess(){\n $GLOBALS['WiziappLog']->write('debug', \"Detecting access type\", \"WiziappContentHandler\");\n $appToken = isset($_SERVER['HTTP_APPLICATION']) ? $_SERVER['HTTP_APPLICATION'] : '';\n $udid = isset($_SERVER['HTTP_UDID']) ? $_SERVER['HTTP_UDID'] : '';\n \n $GLOBALS['WiziappLog']->write('debug', \"The headers are: {$appToken} and {$udid}\", \"WiziappContentHandler\");\n \n if (strpos($_SERVER['REQUEST_URI'], 'wiziapp/') !== FALSE){\n $this->inApp = TRUE;\n } \n \n if ((!empty($appToken) && !empty($udid)) || $this->inApp){\n $GLOBALS['WiziappLog']->write('debug', \"In the application display\", \"WiziappContentHandler\");\n \n $this->mobile = TRUE;\n $this->inApp = TRUE;\n $this->_removeKnownFilters();\n } else {\n $this->mobile = FALSE;\n $this->inApp = FALSE;\n\n if (strstr($_SERVER['HTTP_USER_AGENT'], 'iPhone') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPod') || strstr($_SERVER['HTTP_USER_AGENT'], 'iPad')) {\n if (WiziappContentHandler::$shouldDisplayAppstoreLinkFlag && WiziappConfig::getInstance()->appstore_url != '') {\n if (!isset($_COOKIE['WIZI_SHOW_APPSTORE_URL']) || $_COOKIE['WIZI_SHOW_APPSTORE_URL'] == 0){\n add_action('wp_head', array(&$this, 'displayAppstoreAppURL'), 1);\n WiziappContentHandler::$shouldDisplayAppstoreLinkFlag = FALSE;\n $timeout = time() + (60 * 60 * 24);\n setcookie(\"WIZI_SHOW_APPSTORE_URL\", WiziappConfig::getInstance()->appstore_url_timeout, $timeout, \"/\");\n }\n }\n }\n \n $GLOBALS['WiziappLog']->write('debug', \"Didn't recognize the headers, normal browsing\", \"WiziappContentHandler\");\n } \n }", "title": "" }, { "docid": "a58f476b1aafad991f2df70270529086", "score": "0.44152036", "text": "private function detectRemainingOperatingSystems($ua)\n {\n if (!preg_match('/(BeOS|Haiku|AmigaOS|MorphOS|AROS|VMS|RISC|Joli|OS\\/2|Inferno|Syllable|Grid|MTK|MRE|MAUI|Nucleus|QNX|VRE|SpreadTrum|ThreadX)/ui', $ua)) {\n return;\n }\n\n $patterns = [\n [ 'name' => 'BeOS', 'regexp' => [ '/BeOS/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'Haiku', 'regexp' => [ '/Haiku/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'AmigaOS', 'regexp' => [ '/AmigaOS ?([0-9.]+)/iu', '/AmigaOS/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'MorphOS', 'regexp' => [ '/MorphOS(?: ([0-9.]*))?/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'AROS', 'regexp' => [ '/AROS/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'OpenVMS', 'regexp' => [ '/OpenVMS V([0-9.]+)/iu', '/OpenVMS/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'RISC OS', 'regexp' => [ '/RISC OS(?:-NC)? ([0-9.]*)/iu', '/RISC OS/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'Joli OS', 'regexp' => [ '/Joli OS\\/([0-9.]*)/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'OS/2', 'regexp' => [ '/OS\\/2;(?: (?:U; )?Warp ([0-9.]*))?/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'Inferno', 'regexp' => [ '/Inferno/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n [ 'name' => 'Syllable', 'regexp' => [ '/Syllable/iu' ], 'type' => Constants\\DeviceType::DESKTOP ],\n\n [ 'name' => 'Grid OS', 'regexp' => [ '/Grid OS ([0-9.]*)/iu' ], 'type' => Constants\\DeviceType::TABLET ],\n\n [ 'name' => 'MRE', 'regexp' => [ '/\\(MTK;/iu', '/\\/MTK /iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'MRE', 'regexp' => [ '/MRE\\\\\\\\/iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'MRE', 'regexp' => [ '/MAUI[-_ ](?:Browser|Runtime)/iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'MRE', 'regexp' => [ '/Browser\\/MAUI/iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'MRE', 'regexp' => [ '/Nucleus RTOS\\//iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'MRE', 'regexp' => [ '/\\/Nucleus/iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'MRE', 'regexp' => [ '/Nucleus\\//iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n\n [ 'name' => 'QNX', 'regexp' => [ '/QNX/iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'VRE', 'regexp' => [ '/\\(VRE;/iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n [ 'name' => 'SpreadTrum', 'regexp' => [ '/\\(SpreadTrum;/iu' ], 'type' => Constants\\DeviceType::MOBILE ],\n\n [ 'name' => 'ThreadX', 'regexp' => [ '/ThreadX(?:_OS)?\\/([0-9.]*)/iu' ] ],\n ];\n\n $count = count($patterns);\n for ($b = 0; $b < $count; $b++) {\n for ($r = 0; $r < count($patterns[$b]['regexp']); $r++) {\n if (preg_match($patterns[$b]['regexp'][$r], $ua, $match)) {\n $this->data->os->name = $patterns[$b]['name'];\n\n if (isset($match[1]) && $match[1]) {\n $this->data->os->version = new Version([ 'value' => $match[1], 'details' => isset($patterns[$b]['details']) ? $patterns[$b]['details'] : null ]);\n } else {\n $this->data->os->version = null;\n }\n\n if (isset($patterns[$b]['type'])) {\n $this->data->device->type = $patterns[$b]['type'];\n }\n\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "c8c18298f4234ba25bec629123ebce07", "score": "0.4397367", "text": "protected function checkBrowserUCBrowser()\n {\n $matches = array();\n if (preg_match('/UC ?Browser\\/?([\\d\\.]+)/', $this->_agent, $matches)) {\n if (isset($matches[1])) {\n $this->setVersion($matches[1]);\n }\n if (stripos($this->_agent, 'Mobile') !== false) {\n $this->setMobile(true);\n } else {\n $this->setTablet(true);\n }\n $this->setBrowser(BrowserInterface::BROWSER_UCBROWSER);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a5f1896fb8ed8c927b3d28d18cb977bc", "score": "0.43859997", "text": "abstract function listBeacons($uid = '');", "title": "" }, { "docid": "1ca2ed3808e276f0c1c162b7adeaf3b9", "score": "0.43770868", "text": "function check_competence($connect)\r\n{\r\n //it takes from tablet all those manifest not yet closed\r\n \r\n}", "title": "" }, { "docid": "d35e82b0fcbf02fd35b03bf7e7a84c13", "score": "0.43693325", "text": "function index() \n\t{\n\t\t# pergi papar kandungan\n\t\t$this->papar->baca('mobile/mobile');\n\t}", "title": "" }, { "docid": "5704b4c295fd01de6131f460aa87fae1", "score": "0.43666068", "text": "function is_weixin()\n{\n if (empty($_SERVER['HTTP_USER_AGENT']) || strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') === false && strpos($_SERVER['HTTP_USER_AGENT'], 'Windows Phone') === false) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "69f04561dc36d792798c4dc54b5f66ef", "score": "0.4353309", "text": "function get_device_brand() {\r\n $data = array(\r\n '/iPhone|iPad|iPod/i' => 'Apple',\r\n '/SAMSUNG|SM-/i' => 'Samsung',\r\n '/Sony/i' => 'Sony',\r\n '/LG/i' => 'LG',\r\n '/Xiaomi|Redmi/i' => 'Xiaomi',\r\n '/realme/i' => 'Realme',\r\n '/oppo/i' => 'Oppo',\r\n '/vivo/i' => 'Vivo',\r\n '/Lenovo/i' => 'Lenovo',\r\n '/karbonn/i' => 'Karbonn',\r\n '/Panasonic/i' => 'Panasonic',\r\n '/OnePlus/i' => 'OnePlus',\r\n '/Nokia/i' => 'Nokia',\r\n '/Motorola/i' => 'Motorola',\r\n '/moto/i' => 'Motorola',\r\n '/Meizu/i' => 'Meizu',\r\n '/Lava/i' => 'Lava',\r\n '/intex/i' => 'intex',\r\n '/HTC/i' => 'HTC',\r\n '/Google/i' => 'Google',\r\n '/Nexus/i' => 'Nexus',\r\n '/Gionee/i' => 'Gionee',\r\n '/BlackBerry/i' => 'BlackBerry',\r\n '/BB/i' => 'BlackBerry',\r\n '/Asus/i' => 'Asus',\r\n '/Huawei/i' => 'Huawei',\r\n '/Micromax/i' => 'Micromax',\r\n '/ZTE/i' => 'ZTE',\r\n );\r\n foreach($data as $pattern => $brand){\r\n if(preg_match($pattern, $this->ua)){\r\n return $brand;\r\n }\r\n }\r\n return 'UNKNOWN';\r\n }", "title": "" }, { "docid": "a0bbc1ee257024c3036609b3f2b9c5d6", "score": "0.43527657", "text": "private function _check_is_mobile()\n\t{\n\t\t$current_carrier = '';\n\t\t$remote_ip = $this->_get_ip_bit($this->_remote_ip);\n\t\t\n\t\tforeach ( $this->ip_list as $ips )\n\t\t{\n\t\t\tif ( ($pos = strpos($ips, '=')) !== FALSE )\n\t\t\t{\n\t\t\t\t$current_carrier = substr($ips, 0, $pos);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$carrier_ip = explode('/', $ips);\n\t\t\t$mask = $this->_get_mask_bit($carrier_ip[1]);\n\t\t\t$carrier = $this->_get_ip_bit($carrier_ip[0]);\n\t\t\t\n\t\t\tif ( ($carrier & $mask) == ( $remote_ip & $mask) )\n\t\t\t{\n\t\t\t\t$this->_mobile = TRUE;\n\t\t\t\t$this->_mobile_carrier = $current_carrier;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b75d94c27b615c2fe019b1b38b8e0c95", "score": "0.43038893", "text": "abstract public function supportsApplicationIDs();", "title": "" }, { "docid": "53a9fcb3180fd5dac4c919a9a226af6d", "score": "0.42898503", "text": "public function checkHttpHeadersForMobile(){\n\n if(\n isset($this->httpHeaders['HTTP_ACCEPT']) &&\n (strpos($this->httpHeaders['HTTP_ACCEPT'], 'application/x-obml2d') !== false || // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/\n strpos($this->httpHeaders['HTTP_ACCEPT'], 'application/vnd.rim.html') !== false || // BlackBerry devices.\n strpos($this->httpHeaders['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false ||\n strpos($this->httpHeaders['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) ||\n isset($this->httpHeaders['HTTP_X_WAP_PROFILE']) || // @todo: validate\n isset($this->httpHeaders['HTTP_X_WAP_CLIENTID']) ||\n isset($this->httpHeaders['HTTP_WAP_CONNECTION']) ||\n isset($this->httpHeaders['HTTP_PROFILE']) ||\n isset($this->httpHeaders['HTTP_X_OPERAMINI_PHONE_UA']) || // Reported by Nokia devices (eg. C3)\n isset($this->httpHeaders['HTTP_X_NOKIA_IPADDRESS']) ||\n isset($this->httpHeaders['HTTP_X_NOKIA_GATEWAY_ID']) ||\n isset($this->httpHeaders['HTTP_X_ORANGE_ID']) ||\n isset($this->httpHeaders['HTTP_X_VODAFONE_3GPDPCONTEXT']) ||\n isset($this->httpHeaders['HTTP_X_HUAWEI_USERID']) ||\n isset($this->httpHeaders['HTTP_UA_OS']) || // Reported by Windows Smartphones.\n isset($this->httpHeaders['HTTP_X_MOBILE_GATEWAY']) || // Reported by Verizon, Vodafone proxy system.\n isset($this->httpHeaders['HTTP_X_ATT_DEVICEID']) || // Seend this on HTC Sensation. @ref: SensationXE_Beats_Z715e\n //HTTP_X_NETWORK_TYPE = WIFI\n ( isset($this->httpHeaders['HTTP_UA_CPU']) &&\n $this->httpHeaders['HTTP_UA_CPU'] == 'ARM' // Seen this on a HTC.\n )\n ){\n\n return true;\n\n }\n\n return false;\n\n }", "title": "" }, { "docid": "c8153945de7ed00458b5d665f0f62848", "score": "0.42868286", "text": "private static function isRequestExemptFromAbuse() {\n return 0 !== preg_match('@^(/+ci/+pta|/+ci/+openlogin)($|/)@', ORIGINAL_REQUEST_URI);\n }", "title": "" }, { "docid": "34631de7626686047b23a587c299f1d7", "score": "0.42706338", "text": "public function testIsMobile()\n {\n $this->assertFalse($this->executeDetector('Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98)'));\n $this->assertFalse($this->executeDetector('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)'));\n\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Windows NT 5.0; rv:5.0) Gecko/20100101 Firefox/5.0'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Windows 98; U; en; rv:1.8.0) Gecko/20060728 Firefox/1.5.0'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:7.0a2) Gecko/20110816 Firefox/7.0a2'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (X11; Linux x86_64) Gecko Firefox/5.0'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20100101 Firefox/5.0'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Macintosh; PPC MacOS X; rv:5.0) Gecko/20110615 Firefox/5.0'));\n\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; zh-cn) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27'));\n\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.04 Chromium/14.0.825.0 Chrome/14.0.825.0 Safari/535.1'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.815.0 Safari/535.1'));\n $this->assertFalse($this->executeDetector('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.813.0 Safari/535.1'));\n\n $this->assertFalse($this->executeDetector('Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00'));\n $this->assertFalse($this->executeDetector('Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50'));\n $this->assertFalse($this->executeDetector('Opera/9.80 (Windows 98; U; de) Presto/2.6.30 Version/10.61'));\n $this->assertFalse($this->executeDetector('Opera/9.80 (Macintosh; Intel Mac OS X; U; nl) Presto/2.6.30 Version/10.61'));\n\n $this->assertTrue($this->executeDetector('Mozilla/5.0 (Linux; U; Android 2.3.4; fr-fr; HTC Desire Build/GRJ22) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'));\n $this->assertTrue($this->executeDetector('Mozilla/5.0 (BlackBerry; U; BlackBerry 9850; en-US) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.115 Mobile Safari/534.11+'));\n $this->assertTrue($this->executeDetector('Mozilla/4.0 (compatible; MSIE 6.0; Windows 95; PalmSource; Blazer 3.0) 16; 160x160'));\n $this->assertTrue($this->executeDetector('SamsungI8910/SymbianOS/9.1 Series60/3.0'));\n $this->assertTrue($this->executeDetector('Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaC6-00/20.0.042; Profile/MIDP-2.1 Configuration/CLDC-1.1; zh-hk) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.2.6.9 3gpp-gba'));\n $this->assertTrue($this->executeDetector('NokiaN97/21.1.107 (SymbianOS/9.4; Series60/5.0 Mozilla/5.0; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebkit/525 (KHTML, like Gecko) BrowserNG/7.1.4'));\n $this->assertTrue($this->executeDetector('MOT-L7/NA.ACR_RB MIB/2.2.1 Profile/MIDP-2.0 Configuration/CLDC-1.1'));\n $this->assertTrue($this->executeDetector('Mozilla/5.0 (X11; U; Linux arm7tdmi; rv:1.8.1.11) Gecko/20071130 Minimo/0.025'));\n $this->assertTrue($this->executeDetector('SAMSUNG-C5212/C5212XDIK1 NetFront/3.4 Profile/MIDP-2.0 Configuration/CLDC-1.1'));\n $this->assertTrue($this->executeDetector('Mozilla/4.0 (compatible; Linux 2.6.22) NetFront/3.4 Kindle/2.5 (screen 824x1200;rotate)'));\n $this->assertTrue($this->executeDetector('SonyEricssonK800c/R8BF Browser/NetFront/3.3 Profile/MIDP-2.0 Configuration/CLDC-1.1'));\n $this->assertTrue($this->executeDetector('Opera/9.80 (J2ME/MIDP; Opera Mini/9.80 (S60; SymbOS; Opera Mobi/23.348; U; en) Presto/2.5.25 Version/10.54'));\n $this->assertTrue($this->executeDetector('Opera/9.80 (J2ME/MIDP; Opera Mini/9 (Compatible; MSIE:9.0; iPhone; BlackBerry9700; AppleWebKit/24.746; U; en) Presto/2.5.25 Version/10.54'));\n $this->assertTrue($this->executeDetector('Opera/9.80 (Windows Mobile; Opera Mini/5.1.21594/22.387; U; ru) Presto/2.5.25 Version/10.54'));\n $this->assertTrue($this->executeDetector('DoCoMo/2.0 P07A3(c500;TB;W24H15)'));\n $this->assertTrue($this->executeDetector('SoftBank/1.0/008SH/SHJ001 Browser/NetFront/3.5 Profile/MIDP-2.0 Configuration/CLDC-1.'));\n $this->assertTrue($this->executeDetector('Vodafone/1.0/V905SH/SHJ001 Java/VF-Java/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1'));\n $this->assertTrue($this->executeDetector('KDDI-SA31 UP.Browser/6.2.0.7.3.129 (GUI) MMP/2.0'));\n $this->assertTrue($this->executeDetector('KDDI-XX99 UP.Browser/6.2_7.2.7.1.K.8.400 (GUI) MMP/2.0'));\n\n $this->assertTrue($this->executeDetector('*******', 'text/html,application/vnd.wap.xhtml+xml,application/xhtml+xml'));\n }", "title": "" }, { "docid": "bdbdceab272e6a25ad4749d235cec901", "score": "0.42609552", "text": "function user_grbmobile($cmd) {\n\n\tswitch ($cmd) {\n\t case 'isMobileDevice':\n\t \t// Check the device\n\t \t$isMobile = preg_match('/(IEMobile|Windows CE|NetFront|PlayStation|PLAYSTATION|like Mac OS X|MIDP|UP\\.Browser|Symbian|Nintendo)/', $_SERVER['HTTP_USER_AGENT']);\n\t \tif($_GET['grb_mobile']=='symMobile'){\n\t \t\t$isMobile = true;\n\t \t}\n\t \t// t3lib_div::debug($isMobile); \n\t return $isMobile;\n\t break;\t \n\t \t \n\t}\n}", "title": "" }, { "docid": "8c729f7d275ab37722ae1ef6162a48c7", "score": "0.42582944", "text": "function huizingfilter($input = null)\r\n{\r\n\r\n $triggers = array('http', 'tps:/', 'tp:/', \"src=\", \"src =\", '<', '>', '><', '.js', '@S', '@s', 'GOTO ', 'DBCC ');\r\n $error = false;\r\n\r\n foreach ($triggers as $trigger) { // loops through the huizing-huizingtriggertriggertrigger\r\n if (stripos($input, $trigger) !== false) {\r\n $error = true;\r\n }\r\n }\r\n\r\n if ($error == true) {\r\n echo \"<h2>Operations interrupted: Some of your input was flagged as malicious.</h2>\";\r\n exit();\r\n } else {\r\n return \"clear\";\r\n }\r\n}", "title": "" }, { "docid": "b846a6803c1959cac62ee264a65c7b7b", "score": "0.4246821", "text": "public static function detect($useragent)\n {\n if (preg_match('/(hiphone|v919)/i', $useragent)) {\n return Mobile\\HiPhoneFactory::detect($useragent);\n }\n\n if (preg_match('/(Technisat|TechniPad|AQIPAD|TechniPhone)/', $useragent)) {\n return Mobile\\TechnisatFactory::detect($useragent);\n }\n\n if (preg_match('/(NaviPad)/', $useragent)) {\n return Mobile\\TexetFactory::detect($useragent);\n }\n\n if (preg_match('/(MediPaD)/', $useragent)) {\n return Mobile\\BewatecFactory::detect($useragent);\n }\n\n if (preg_match('/(MiPad)/', $useragent)) {\n return Mobile\\XiaomiFactory::detect($useragent);\n }\n\n if (preg_match('/(nokia)/i', $useragent)) {\n return Mobile\\NokiaFactory::detect($useragent);\n }\n\n if (preg_match('/iphone/i', $useragent)\n && preg_match('/android/i', $useragent)\n && !preg_match('/windows phone/i', $useragent)\n ) {\n return Mobile\\XiangheFactory::detect($useragent);\n }\n\n if (preg_match('/iphone/i', $useragent)\n && preg_match('/linux/i', $useragent)\n ) {\n return Mobile\\XiangheFactory::detect($useragent);\n }\n\n if (preg_match('/iphone/i', $useragent)\n && preg_match('/adr/i', $useragent)\n && preg_match('/ucweb/i', $useragent)\n ) {\n return Mobile\\XiangheFactory::detect($useragent);\n }\n\n if (preg_match('/iphone/i', $useragent)\n && preg_match('/blackberry/i', $useragent)\n ) {\n return Mobile\\BlackBerryFactory::detect($useragent);\n }\n\n if (preg_match('/(ipad|iphone|ipod|like mac os x)/i', $useragent)\n && !preg_match('/windows phone/i', $useragent)\n && !preg_match('/ adr /i', $useragent)\n && !preg_match('/iPodder/', $useragent)\n && !preg_match('/tripadvisor/i', $useragent)\n ) {\n return Mobile\\AppleFactory::detect($useragent);\n }\n\n if (preg_match('/samsung/i', $useragent)) {\n return Mobile\\SamsungFactory::detect($useragent);\n }\n\n if (preg_match('/asus/i', $useragent)) {\n return Mobile\\AsusFactory::detect($useragent);\n }\n\n if (preg_match('/mt\\-gt\\-a9500/i', $useragent)) {\n return Mobile\\HtmFactory::detect($useragent);\n }\n\n if (preg_match('/gt\\-a7100/i', $useragent)) {\n return Mobile\\SprdFactory::detect($useragent);\n }\n\n if (preg_match('/(feiteng|gt\\-h)/i', $useragent)) {\n return Mobile\\FeitengFactory::detect($useragent);\n }\n\n if (preg_match('/(cube|u30gt|u51gt|u55gt)/i', $useragent)) {\n return Mobile\\CubeFactory::detect($useragent);\n }\n\n if (preg_match('/GTX75/', $useragent)) {\n return Mobile\\UtStarcomFactory::detect($useragent);\n }\n\n if (preg_match('/gt\\-9000/i', $useragent)) {\n return Mobile\\StarFactory::detect($useragent);\n }\n\n if (preg_match('/u25gt\\-c4w/i', $useragent)) {\n return Mobile\\CubeFactory::detect($useragent);\n }\n\n if (preg_match('/(gt|sam|sc|sch|sec|sgh|shv|shw|sm|sph|continuum)\\-/i', $useragent)) {\n return Mobile\\SamsungFactory::detect($useragent);\n }\n\n if (preg_match('/(hdc|galaxy s3 ex)/i', $useragent)) {\n return Mobile\\HdcFactory::detect($useragent);\n }\n\n if (preg_match('/nexus ?(4|5)/i', $useragent)) {\n return Mobile\\LgFactory::detect($useragent);\n }\n\n if (preg_match('/nexus[ _]?7/i', $useragent)) {\n return Mobile\\AsusFactory::detect($useragent);\n }\n\n if (preg_match('/nexus 6p/i', $useragent)) {\n return Mobile\\HuaweiFactory::detect($useragent);\n }\n\n if (preg_match('/nexus 6/i', $useragent)) {\n return Mobile\\MotorolaFactory::detect($useragent);\n }\n\n if (preg_match('/nexus (one|9)/i', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/nexus(hd2| evohd2)/i', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/pantech/i', $useragent)) {\n return Mobile\\PantechFactory::detect($useragent);\n }\n\n if (preg_match('/(hp|p160u|touchpad|pixi|palm|blazer|cm\\_tenderloin)/i', $useragent)) {\n return Mobile\\HpFactory::detect($useragent);\n }\n\n if (preg_match('/(galaxy|nexus|i7110|i9100|i9300|yp\\-g|blaze)/i', $useragent)) {\n return Mobile\\SamsungFactory::detect($useragent);\n }\n\n if (preg_match('/sony/i', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/twinovo/i', $useragent)) {\n return Mobile\\TwinovoFactory::detect($useragent);\n }\n\n if (preg_match('/LG/', $useragent)) {\n return Mobile\\LgFactory::detect($useragent);\n }\n\n if (preg_match('/CCE/', $useragent)) {\n return Mobile\\CceFactory::detect($useragent);\n }\n\n if (preg_match('/htc/i', $useragent)\n && !preg_match('/WOHTC/', $useragent)\n ) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/(SmartTab7|Smart 4G)/', $useragent)) {\n return Mobile\\ZteFactory::detect($useragent);\n }\n\n if (preg_match('/(lenovo|ideatab|ideapad|smarttab)/i', $useragent)) {\n return Mobile\\LenovoFactory::detect($useragent);\n }\n\n if (preg_match('/(acer|iconia|liquid)/i', $useragent)) {\n return Mobile\\AcerFactory::detect($useragent);\n }\n\n if (preg_match('/playstation/i', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/(amazon|kindle|silk|kftt|kfot|kfjwi|kfsowi|kfthwi|sd4930ur)/i', $useragent)) {\n return Mobile\\AmazonFactory::detect($useragent);\n }\n\n if (preg_match('/amoi/i', $useragent)) {\n return Mobile\\AmoiFactory::detect($useragent);\n }\n\n if (preg_match('/(blaupunkt|endeavour)/i', $useragent)) {\n return Mobile\\BlaupunktFactory::detect($useragent);\n }\n\n if (preg_match('/ONDA/', $useragent)) {\n return Mobile\\OndaFactory::detect($useragent);\n }\n\n if (preg_match('/archos/i', $useragent)) {\n return Mobile\\ArchosFactory::detect($useragent);\n }\n\n if (preg_match('/IRULU/', $useragent)) {\n return Mobile\\IruluFactory::detect($useragent);\n }\n\n if (preg_match('/spice/i', $useragent)) {\n return Mobile\\SpiceFactory::detect($useragent);\n }\n\n if (preg_match('/Symphony/', $useragent)) {\n return Mobile\\SymphonyFactory::detect($useragent);\n }\n\n if (preg_match('/arnova/i', $useragent)) {\n return Mobile\\ArnovaFactory::detect($useragent);\n }\n\n if (preg_match('/ bn /i', $useragent)) {\n return Mobile\\BarnesNobleFactory::detect($useragent);\n }\n\n if (preg_match('/beidou/i', $useragent)) {\n return Mobile\\BeidouFactory::detect($useragent);\n }\n\n if (preg_match('/(blackberry|playbook|rim tablet|bb10)/i', $useragent)) {\n return Mobile\\BlackBerryFactory::detect($useragent);\n }\n\n if (preg_match('/caterpillar/i', $useragent)) {\n return Mobile\\CaterpillarFactory::detect($useragent);\n }\n\n if (preg_match('/B15/', $useragent)) {\n return Mobile\\CaterpillarFactory::detect($useragent);\n }\n\n if (preg_match('/(catnova|cat stargate|cat tablet)/i', $useragent)) {\n return Mobile\\CatSoundFactory::detect($useragent);\n }\n\n if (preg_match('/(coby|nbpc724)/i', $useragent)) {\n return Mobile\\CobyFactory::detect($useragent);\n }\n\n if (preg_match('/MID\\d{4}/', $useragent)) {\n return Mobile\\CobyFactory::detect($useragent);\n }\n\n if (preg_match('/WM\\d{4}/', $useragent)) {\n return Mobile\\WonderMediaFactory::detect($useragent);\n }\n\n if (preg_match('/(comag|wtdr1018)/i', $useragent)) {\n return Mobile\\ComagFactory::detect($useragent);\n }\n\n if (preg_match('/coolpad/i', $useragent)) {\n return Mobile\\CoolpadFactory::detect($useragent);\n }\n\n if (preg_match('/cosmote/i', $useragent)) {\n return Mobile\\CosmoteFactory::detect($useragent);\n }\n\n if (preg_match('/(creative|ziilabs)/i', $useragent)) {\n return Mobile\\CreativeFactory::detect($useragent);\n }\n\n if (preg_match('/cubot/i', $useragent)) {\n return Mobile\\CubotFactory::detect($useragent);\n }\n\n if (preg_match('/dell/i', $useragent)) {\n return Mobile\\DellFactory::detect($useragent);\n }\n\n if (preg_match('/(denver|tad\\-)/i', $useragent)) {\n return Mobile\\DenverFactory::detect($useragent);\n }\n\n if (preg_match('/CONNECT7PRO/', $useragent)) {\n return Mobile\\OdysFactory::detect($useragent);\n }\n\n if (preg_match('/(nec|n905i)/i', $useragent) && !preg_match('/fennec/i', $useragent)) {\n return Mobile\\NecFactory::detect($useragent);\n }\n\n if (preg_match('/SHARP/', $useragent)) {\n return Mobile\\SharpFactory::detect($useragent);\n }\n\n if (preg_match('/SH05C/', $useragent)) {\n return Mobile\\SharpFactory::detect($useragent);\n }\n\n if (preg_match('/\\d{3}SH/', $useragent)) {\n return Mobile\\SharpFactory::detect($useragent);\n }\n\n if (preg_match('/SH\\-\\d{2}(D|F)/', $useragent)) {\n return Mobile\\SharpFactory::detect($useragent);\n }\n\n if (preg_match('/(docomo|p900i)/i', $useragent)) {\n return Mobile\\DoCoMoFactory::detect($useragent);\n }\n\n if (preg_match('/(easypix|easypad|junior 4\\.0)/i', $useragent)) {\n return Mobile\\EasypixFactory::detect($useragent);\n }\n\n if (preg_match('/(Efox|SMART\\-E5)/', $useragent)) {\n return Mobile\\EfoxFactory::detect($useragent);\n }\n\n if (preg_match('/1 \\& 1/i', $useragent)) {\n return Mobile\\EinsUndEinsFactory::detect($useragent);\n }\n\n if (preg_match('/(xoro|telepad 9a1)/i', $useragent)) {\n return Mobile\\XoroFactory::detect($useragent);\n }\n\n if (preg_match('/(epad|p7901a)/i', $useragent)) {\n return Mobile\\EpadFactory::detect($useragent);\n }\n\n if (preg_match('/p7mini/i', $useragent)) {\n return Mobile\\HuaweiFactory::detect($useragent);\n }\n\n if (preg_match('/faktorzwei/i', $useragent)) {\n return Mobile\\FaktorZweiFactory::detect($useragent);\n }\n\n if (preg_match('/flytouch/i', $useragent)) {\n return Mobile\\FlytouchFactory::detect($useragent);\n }\n\n if (preg_match('/(fujitsu|m532)/i', $useragent)) {\n return Mobile\\FujitsuFactory::detect($useragent);\n }\n\n if (preg_match('/sn10t1/i', $useragent)) {\n return Mobile\\HannspreeFactory::detect($useragent);\n }\n\n if (preg_match('/DA241HL/', $useragent)) {\n return Mobile\\AcerFactory::detect($useragent);\n }\n\n if (preg_match('/(Honlin|PC1088|HL)/', $useragent)) {\n return Mobile\\HonlinFactory::detect($useragent);\n }\n\n if (preg_match('/huawei/i', $useragent)) {\n return Mobile\\HuaweiFactory::detect($useragent);\n }\n\n if (preg_match('/micromax/i', $useragent)) {\n return Mobile\\MicromaxFactory::detect($useragent);\n }\n\n if (preg_match('/triray/i', $useragent)) {\n return Mobile\\TrirayFactory::detect($useragent);\n }\n\n if (preg_match('/SXZ/', $useragent)) {\n return Mobile\\SxzFactory::detect($useragent);\n }\n\n if (preg_match('/explay/i', $useragent)) {\n return Mobile\\ExplayFactory::detect($useragent);\n }\n\n if (preg_match('/pmedia/i', $useragent)) {\n return Mobile\\PmediaFactory::detect($useragent);\n }\n\n if (preg_match('/impression/i', $useragent)) {\n return Mobile\\ImpressionFactory::detect($useragent);\n }\n\n if (preg_match('/oneplus/i', $useragent)) {\n return Mobile\\OneplusFactory::detect($useragent);\n }\n\n if (preg_match('/kingzone/i', $useragent)) {\n return Mobile\\KingzoneFactory::detect($useragent);\n }\n\n if (preg_match('/gzone/i', $useragent)) {\n return Mobile\\GzoneFactory::detect($useragent);\n }\n\n if (preg_match('/goophone/i', $useragent)) {\n return Mobile\\GooPhoneFactory::detect($useragent);\n }\n\n if (preg_match('/g\\-tide/i', $useragent)) {\n return Mobile\\GtideFactory::detect($useragent);\n }\n\n if (preg_match('/reellex/i', $useragent)) {\n return Mobile\\ReellexFactory::detect($useragent);\n }\n\n if (preg_match('/(turbopad|turbo pad)/i', $useragent)) {\n return Mobile\\TurboPadFactory::detect($useragent);\n }\n\n if (preg_match('/haier/i', $useragent)) {\n return Mobile\\HaierFactory::detect($useragent);\n }\n\n if (preg_match('/sunstech/i', $useragent)) {\n return Mobile\\SunstechFactory::detect($useragent);\n }\n\n if (preg_match('/AOC/', $useragent)) {\n return Mobile\\AocFactory::detect($useragent);\n }\n\n if (preg_match('/hummer/i', $useragent)) {\n return Mobile\\HummerFactory::detect($useragent);\n }\n\n if (preg_match('/oysters/i', $useragent)) {\n return Mobile\\OystersFactory::detect($useragent);\n }\n\n if (preg_match('/vertex/i', $useragent)) {\n return Mobile\\VertexFactory::detect($useragent);\n }\n\n if (preg_match('/gfive/i', $useragent)) {\n return Mobile\\GfiveFactory::detect($useragent);\n }\n\n if (preg_match('/iconbit/i', $useragent)) {\n return Mobile\\IconBitFactory::detect($useragent);\n }\n\n if (preg_match('/intenso/', $useragent)) {\n return Mobile\\IntensoFactory::detect($useragent);\n }\n\n if (preg_match('/INM\\d{3,4}/', $useragent)) {\n return Mobile\\IntensoFactory::detect($useragent);\n }\n\n if (preg_match('/ionik/i', $useragent)) {\n return Mobile\\IonikFactory::detect($useragent);\n }\n\n if (preg_match('/JAY\\-tech/i', $useragent)) {\n return Mobile\\JaytechFactory::detect($useragent);\n }\n\n if (preg_match('/(jolla|sailfish)/i', $useragent)) {\n return Mobile\\JollaFactory::detect($useragent);\n }\n\n if (preg_match('/kazam/i', $useragent)) {\n return Mobile\\KazamFactory::detect($useragent);\n }\n\n if (preg_match('/kddi/i', $useragent)) {\n return Mobile\\KddiFactory::detect($useragent);\n }\n\n if (preg_match('/kobo touch/i', $useragent)) {\n return Mobile\\KoboFactory::detect($useragent);\n }\n\n if (preg_match('/lenco/i', $useragent)) {\n return Mobile\\LencoFactory::detect($useragent);\n }\n\n if (preg_match('/LePan/', $useragent)) {\n return Mobile\\LePanFactory::detect($useragent);\n }\n\n if (preg_match('/(LogicPD|Zoom2|NookColor)/', $useragent)) {\n return Mobile\\LogicpdFactory::detect($useragent);\n }\n\n if (preg_match('/(medion|lifetab)/i', $useragent)) {\n return Mobile\\MedionFactory::detect($useragent);\n }\n\n if (preg_match('/meizu/i', $useragent)) {\n return Mobile\\MeizuFactory::detect($useragent);\n }\n\n if (preg_match('/hisense/i', $useragent)) {\n return Mobile\\HisenseFactory::detect($useragent);\n }\n\n if (preg_match('/minix/i', $useragent)) {\n return Mobile\\MinixFactory::detect($useragent);\n }\n\n if (preg_match('/allwinner/i', $useragent)) {\n return Mobile\\AllWinnerFactory::detect($useragent);\n }\n\n if (preg_match('/accent/i', $useragent)) {\n return Mobile\\AccentFactory::detect($useragent);\n }\n\n if (preg_match('/yota/i', $useragent)) {\n return Mobile\\YotaFactory::detect($useragent);\n }\n\n if (preg_match('/ainol/i', $useragent)) {\n return Mobile\\AinolFactory::detect($useragent);\n }\n\n if (preg_match('/supra/i', $useragent)) {\n return Mobile\\SupraFactory::detect($useragent);\n }\n\n if (preg_match('/nextway/i', $useragent)) {\n return Mobile\\NextwayFactory::detect($useragent);\n }\n\n if (preg_match('/amlogic/i', $useragent)) {\n return Mobile\\AmlogicFactory::detect($useragent);\n }\n\n if (preg_match('/adspec/i', $useragent)) {\n return Mobile\\AdspecFactory::detect($useragent);\n }\n\n if (preg_match('/m\\-way/i', $useragent)) {\n return Mobile\\MwayFactory::detect($useragent);\n }\n\n if (preg_match('/memup/i', $useragent)) {\n return Mobile\\MemupFactory::detect($useragent);\n }\n\n if (preg_match('/prestigio/i', $useragent)) {\n return Mobile\\PrestigioFactory::detect($useragent);\n }\n\n if (preg_match('/xiaomi/i', $useragent)) {\n return Mobile\\XiaomiFactory::detect($useragent);\n }\n\n if (preg_match('/MI (\\d|PAD|MAX)/', $useragent)) {\n return Mobile\\XiaomiFactory::detect($useragent);\n }\n\n if (preg_match('/HM( |\\_)(NOTE|1SC|1SW)/', $useragent)) {\n return Mobile\\XiaomiFactory::detect($useragent);\n }\n\n if (preg_match('/miui/i', $useragent)\n && !preg_match('/miuibrowser/i', $useragent)\n && !preg_match('/build\\/miui/i', $useragent)\n ) {\n return Mobile\\MiuiFactory::detect($useragent);\n }\n\n if (preg_match('/(mobistel|cynus)/i', $useragent)) {\n return Mobile\\MobistelFactory::detect($useragent);\n }\n\n if (preg_match('/moto/i', $useragent)) {\n return Mobile\\MotorolaFactory::detect($useragent);\n }\n\n if (preg_match('/WeTab/', $useragent)) {\n return Mobile\\NeofonieFactory::detect($useragent);\n }\n\n if (preg_match('/Nextbook/', $useragent)) {\n return Mobile\\NextbookFactory::detect($useragent);\n }\n\n if (preg_match('/Nintendo/', $useragent)) {\n return Mobile\\NintendoFactory::detect($useragent);\n }\n\n if (preg_match('/Nvsbl/', $useragent)) {\n return Mobile\\NvsblFactory::detect($useragent);\n }\n\n if (preg_match('/odys/i', $useragent)) {\n return Mobile\\OdysFactory::detect($useragent);\n }\n\n if (preg_match('/oppo/i', $useragent)) {\n return Mobile\\OppoFactory::detect($useragent);\n }\n\n if (preg_match('/panasonic/i', $useragent)) {\n return Mobile\\PanasonicFactory::detect($useragent);\n }\n\n if (preg_match('/pandigital/i', $useragent)) {\n return Mobile\\PandigitalFactory::detect($useragent);\n }\n\n if (preg_match('/phicomm/i', $useragent)) {\n return Mobile\\PhicommFactory::detect($useragent);\n }\n\n if (preg_match('/pipo/i', $useragent)) {\n return Mobile\\PipoFactory::detect($useragent);\n }\n\n if (preg_match('/pomp/i', $useragent)) {\n return Mobile\\PompFactory::detect($useragent);\n }\n\n if (preg_match('/qmobile/i', $useragent)) {\n return Mobile\\QmobileFactory::detect($useragent);\n }\n\n if (preg_match('/keener/i', $useragent)) {\n return Mobile\\KeenerFactory::detect($useragent);\n }\n\n if (preg_match('/sanyo/i', $useragent)) {\n return Mobile\\SanyoFactory::detect($useragent);\n }\n\n if (preg_match('/siemens/i', $useragent)) {\n return Mobile\\SiemensFactory::detect($useragent);\n }\n\n if (preg_match('/sprint/i', $useragent)) {\n return Mobile\\SprintFactory::detect($useragent);\n }\n\n if (preg_match('/intex/i', $useragent)) {\n return Mobile\\IntexFactory::detect($useragent);\n }\n\n if (preg_match('/CAL21/', $useragent)) {\n return Mobile\\GzoneFactory::detect($useragent);\n }\n\n if (preg_match('/N\\-06E/', $useragent)) {\n return Mobile\\NecFactory::detect($useragent);\n }\n\n if (preg_match('/(A|C)\\d{5}/', $useragent)) {\n return Mobile\\NomiFactory::detect($useragent);\n }\n\n if (preg_match('/one e1003/i', $useragent)) {\n return Mobile\\OneplusFactory::detect($useragent);\n }\n\n if (preg_match('/one a200(1|3|5)/i', $useragent)) {\n return Mobile\\OneplusFactory::detect($useragent);\n }\n\n if (preg_match('/F5281/', $useragent)) {\n return Mobile\\HisenseFactory::detect($useragent);\n }\n\n if (preg_match('/MOT/', $useragent)) {\n return Mobile\\MotorolaFactory::detect($useragent);\n }\n\n if (preg_match('/TBD\\d{4}/', $useragent)) {\n return Mobile\\ZekiFactory::detect($useragent);\n }\n\n if (preg_match('/TBD(B|C|G)\\d{3,4}/', $useragent)) {\n return Mobile\\ZekiFactory::detect($useragent);\n }\n\n if (preg_match('/(AC0732C|RC9724C|MT0739D|QS0716D|LC0720C)/', $useragent)) {\n return Mobile\\TriQFactory::detect($useragent);\n }\n\n if (preg_match('/ImPAD6213M\\_v2/', $useragent)) {\n return Mobile\\ImpressionFactory::detect($useragent);\n }\n\n if (preg_match('/S4503Q/', $useragent)) {\n return Mobile\\DnsFactory::detect($useragent);\n }\n\n if (preg_match('/dns/i', $useragent)) {\n return Mobile\\DnsFactory::detect($useragent);\n }\n\n if (preg_match('/D6000/', $useragent)) {\n return Mobile\\InnosFactory::detect($useragent);\n }\n\n if (preg_match('/(S|V)T\\d{5}/', $useragent)) {\n return Mobile\\TrekStorFactory::detect($useragent);\n }\n\n if (preg_match('/ONE E\\d{4}/', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/(C|D|E|F)\\d{4}/', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/Aqua\\_Star/', $useragent)) {\n return Mobile\\IntexFactory::detect($useragent);\n }\n\n if (preg_match('/Star/', $useragent)) {\n return Mobile\\StarFactory::detect($useragent);\n }\n\n if (preg_match('/texet/i', $useragent)) {\n return Mobile\\TexetFactory::detect($useragent);\n }\n\n if (preg_match('/condor/i', $useragent)) {\n return Mobile\\CondorFactory::detect($useragent);\n }\n\n if (preg_match('/s\\-tell/i', $useragent)) {\n return Mobile\\StellFactory::detect($useragent);\n }\n\n if (preg_match('/verico/i', $useragent)) {\n return Mobile\\VericoFactory::detect($useragent);\n }\n\n if (preg_match('/ruggear/i', $useragent)) {\n return Mobile\\RugGearFactory::detect($useragent);\n }\n\n if (preg_match('/telsda/i', $useragent)) {\n return Mobile\\TelsdaFactory::detect($useragent);\n }\n\n if (preg_match('/mitashi/i', $useragent)) {\n return Mobile\\MitashiFactory::detect($useragent);\n }\n\n if (preg_match('/bliss/i', $useragent)) {\n return Mobile\\BlissFactory::detect($useragent);\n }\n\n if (preg_match('/lexand/i', $useragent)) {\n return Mobile\\LexandFactory::detect($useragent);\n }\n\n if (preg_match('/alcatel/i', $useragent)) {\n return Mobile\\AlcatelFactory::detect($useragent);\n }\n\n if (preg_match('/thl/i', $useragent) && !preg_match('/LIAuthLibrary/', $useragent)) {\n return Mobile\\ThlFactory::detect($useragent);\n }\n\n if (preg_match('/T\\-Mobile/', $useragent)) {\n return Mobile\\TmobileFactory::detect($useragent);\n }\n\n if (preg_match('/tolino/i', $useragent)) {\n return Mobile\\TolinoFactory::detect($useragent);\n }\n\n if (preg_match('/toshiba/i', $useragent)) {\n return Mobile\\ToshibaFactory::detect($useragent);\n }\n\n if (preg_match('/trekstor/i', $useragent)) {\n return Mobile\\TrekStorFactory::detect($useragent);\n }\n\n if (preg_match('/3Q/', $useragent)) {\n return Mobile\\TriQFactory::detect($useragent);\n }\n\n if (preg_match('/(viewsonic|viewpad)/i', $useragent)) {\n return Mobile\\ViewSonicFactory::detect($useragent);\n }\n\n if (preg_match('/wiko/i', $useragent)) {\n return Mobile\\WikoFactory::detect($useragent);\n }\n\n if (preg_match('/vivo/', $useragent)) {\n return Mobile\\VivoFactory::detect($useragent);\n }\n\n if (preg_match('/haipai/i', $useragent)) {\n return Mobile\\HaipaiFactory::detect($useragent);\n }\n\n if (preg_match('/megafon/i', $useragent)) {\n return Mobile\\MegaFonFactory::detect($useragent);\n }\n\n if (preg_match('/UMI/', $useragent)) {\n return Mobile\\UmiFactory::detect($useragent);\n }\n\n if (preg_match('/yuandao/i', $useragent)) {\n return Mobile\\YuandaoFactory::detect($useragent);\n }\n\n if (preg_match('/yuanda/i', $useragent)) {\n return Mobile\\YuandaFactory::detect($useragent);\n }\n\n if (preg_match('/Yusu/', $useragent)) {\n return Mobile\\YusuFactory::detect($useragent);\n }\n\n if (preg_match('/Zenithink/i', $useragent)) {\n return Mobile\\ZenithinkFactory::detect($useragent);\n }\n\n if (preg_match('/zte/i', $useragent)) {\n return Mobile\\ZteFactory::detect($useragent);\n }\n\n if (preg_match('/Fly/', $useragent) && !preg_match('/FlyFlow/', $useragent)) {\n return Mobile\\FlyFactory::detect($useragent);\n }\n\n if (preg_match('/pocketbook/i', $useragent)) {\n return Mobile\\PocketBookFactory::detect($useragent);\n }\n\n if (preg_match('/geniatech/i', $useragent)) {\n return Mobile\\GeniatechFactory::detect($useragent);\n }\n\n if (preg_match('/yarvik/i', $useragent)) {\n return Mobile\\YarvikFactory::detect($useragent);\n }\n\n if (preg_match('/goclever/i', $useragent)) {\n return Mobile\\GoCleverFactory::detect($useragent);\n }\n\n if (preg_match('/senseit/i', $useragent)) {\n return Mobile\\SenseitFactory::detect($useragent);\n }\n\n if (preg_match('/twz/i', $useragent)) {\n return Mobile\\TwzFactory::detect($useragent);\n }\n\n if (preg_match('/irbis/i', $useragent)) {\n return Mobile\\IrbisFactory::detect($useragent);\n }\n\n if (preg_match('/i\\-mobile/i', $useragent)) {\n return Mobile\\ImobileFactory::detect($useragent);\n }\n\n if (preg_match('/axioo/i', $useragent)) {\n return Mobile\\AxiooFactory::detect($useragent);\n }\n\n if (preg_match('/artel/i', $useragent)) {\n return Mobile\\ArtelFactory::detect($useragent);\n }\n\n if (preg_match('/sunup/i', $useragent)) {\n return Mobile\\SunupFactory::detect($useragent);\n }\n\n if (preg_match('/evercoss/i', $useragent)) {\n return Mobile\\EvercossFactory::detect($useragent);\n }\n\n if (preg_match('/NGM/', $useragent)) {\n return Mobile\\NgmFactory::detect($useragent);\n }\n\n if (preg_match('/dino/i', $useragent)) {\n return Mobile\\DinoFactory::detect($useragent);\n }\n\n if (preg_match('/(shaan|iball)/i', $useragent)) {\n return Mobile\\ShaanFactory::detect($useragent);\n }\n\n if (preg_match('/bmobile/i', $useragent) && !preg_match('/icabmobile/i', $useragent)) {\n return Mobile\\BmobileFactory::detect($useragent);\n }\n\n if (preg_match('/modecom/i', $useragent)) {\n return Mobile\\ModecomFactory::detect($useragent);\n }\n\n if (preg_match('/overmax/i', $useragent)) {\n return Mobile\\OvermaxFactory::detect($useragent);\n }\n\n if (preg_match('/kiano/i', $useragent)) {\n return Mobile\\KianoFactory::detect($useragent);\n }\n\n if (preg_match('/manta/i', $useragent)) {\n return Mobile\\MantaFactory::detect($useragent);\n }\n\n if (preg_match('/philips/i', $useragent)) {\n return Mobile\\PhilipsFactory::detect($useragent);\n }\n\n if (preg_match('/shiru/i', $useragent)) {\n return Mobile\\ShiruFactory::detect($useragent);\n }\n\n if (preg_match('/tb touch/i', $useragent)) {\n return Mobile\\TbTouchFactory::detect($useragent);\n }\n\n if (preg_match('/NTT/', $useragent)) {\n return Mobile\\NttSystemFactory::detect($useragent);\n }\n\n if (preg_match('/pentagram/i', $useragent)) {\n return Mobile\\PentagramFactory::detect($useragent);\n }\n\n if (preg_match('/zeki/i', $useragent)) {\n return Mobile\\ZekiFactory::detect($useragent);\n }\n\n if (preg_match('/(Z221|V788D|KIS PLUS|NX402|NX501|N918St|Beeline Pro|ATLAS_W)/', $useragent)) {\n return Mobile\\ZteFactory::detect($useragent);\n }\n\n if (preg_match('/beeline/i', $useragent)) {\n return Mobile\\BeelineFactory::detect($useragent);\n }\n\n if (preg_match('/DFunc/', $useragent)) {\n return Mobile\\DfuncFactory::detect($useragent);\n }\n\n if (preg_match('/Digma/', $useragent)) {\n return Mobile\\DigmaFactory::detect($useragent);\n }\n\n if (preg_match('/axgio/i', $useragent)) {\n return Mobile\\AxgioFactory::detect($useragent);\n }\n\n if (preg_match('/roverpad/i', $useragent)) {\n return Mobile\\RoverPadFactory::detect($useragent);\n }\n\n if (preg_match('/zopo/i', $useragent)) {\n return Mobile\\ZopoFactory::detect($useragent);\n }\n\n if (preg_match('/ultrafone/', $useragent)) {\n return Mobile\\UltrafoneFactory::detect($useragent);\n }\n\n if (preg_match('/malata/i', $useragent)) {\n return Mobile\\MalataFactory::detect($useragent);\n }\n\n if (preg_match('/starway/i', $useragent)) {\n return Mobile\\StarwayFactory::detect($useragent);\n }\n\n if (preg_match('/pegatron/i', $useragent)) {\n return Mobile\\PegatronFactory::detect($useragent);\n }\n\n if (preg_match('/logicom/i', $useragent)) {\n return Mobile\\LogicomFactory::detect($useragent);\n }\n\n if (preg_match('/gigabyte/i', $useragent)) {\n return Mobile\\GigabyteFactory::detect($useragent);\n }\n\n if (preg_match('/qumo/i', $useragent)) {\n return Mobile\\QumoFactory::detect($useragent);\n }\n\n if (preg_match('/perfeo/i', $useragent)) {\n return Mobile\\PerfeoFactory::detect($useragent);\n }\n\n if (preg_match('/yxtel/i', $useragent)) {\n return Mobile\\YxtelFactory::detect($useragent);\n }\n\n if (preg_match('/doogee/i', $useragent)) {\n return Mobile\\DoogeeFactory::detect($useragent);\n }\n\n if (preg_match('/xianghe/i', $useragent)) {\n return Mobile\\XiangheFactory::detect($useragent);\n }\n\n if (preg_match('/celkon/i', $useragent)) {\n return Mobile\\CelkonFactory::detect($useragent);\n }\n\n if (preg_match('/bravis/i', $useragent)) {\n return Mobile\\BravisFactory::detect($useragent);\n }\n\n if (preg_match('/fnac/i', $useragent)) {\n return Mobile\\FnacFactory::detect($useragent);\n }\n\n if (preg_match('/etuline/i', $useragent)) {\n return Mobile\\EtulineFactory::detect($useragent);\n }\n\n if (preg_match('/tcl/i', $useragent)) {\n return Mobile\\TclFactory::detect($useragent);\n }\n\n if (preg_match('/radxa/i', $useragent)) {\n return Mobile\\RadxaFactory::detect($useragent);\n }\n\n if (preg_match('/kyocera/i', $useragent)) {\n return Mobile\\KyoceraFactory::detect($useragent);\n }\n\n if (preg_match('/prology/i', $useragent)) {\n return Mobile\\PrologyFactory::detect($useragent);\n }\n\n if (preg_match('/assistant/i', $useragent)) {\n return Mobile\\AssistantFactory::detect($useragent);\n }\n\n if (preg_match('/ MT791 /i', $useragent)) {\n return Mobile\\KeenHighFactory::detect($useragent);\n }\n\n if (preg_match('/(g100w|stream\\-s110)/i', $useragent)) {\n return Mobile\\AcerFactory::detect($useragent);\n }\n\n if (preg_match('/ (a1|a3|b1)\\-/i', $useragent)) {\n return Mobile\\AcerFactory::detect($useragent);\n }\n\n if (preg_match('/(wildfire|desire)/i', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/a101it/i', $useragent)) {\n return Mobile\\ArchosFactory::detect($useragent);\n }\n\n if (preg_match('/(sprd|SPHS|B51\\+)/i', $useragent)) {\n return Mobile\\SprdFactory::detect($useragent);\n }\n\n if (preg_match('/TAB A742/', $useragent)) {\n return Mobile\\WexlerFactory::detect($useragent);\n }\n\n if (preg_match('/ a\\d{3} /i', $useragent) && preg_match('/android 3\\.2/i', $useragent)) {\n return Mobile\\MicromaxFactory::detect($useragent);\n }\n\n if (preg_match('/S208/', $useragent)) {\n return Mobile\\CubotFactory::detect($useragent);\n }\n\n if (preg_match('/A400/', $useragent)) {\n return Mobile\\CelkonFactory::detect($useragent);\n }\n\n if (preg_match('/ (a|e|v|z|s)\\d{3} /i', $useragent)) {\n return Mobile\\AcerFactory::detect($useragent);\n }\n\n if (preg_match('/wolgang/i', $useragent)) {\n return Mobile\\WolgangFactory::detect($useragent);\n }\n\n if (preg_match('/AT\\-AS40SE/', $useragent)) {\n return Mobile\\WolgangFactory::detect($useragent);\n }\n\n if (preg_match('/AT1010\\-T/', $useragent)) {\n return Mobile\\LenovoFactory::detect($useragent);\n }\n\n if (preg_match('/united/i', $useragent)) {\n return Mobile\\UnitedFactory::detect($useragent);\n }\n\n if (preg_match('/MT6515M/', $useragent)) {\n return Mobile\\UnitedFactory::detect($useragent);\n }\n\n if (preg_match('/utstarcom/i', $useragent)) {\n return Mobile\\UtStarcomFactory::detect($useragent);\n }\n\n if (preg_match('/fairphone/i', $useragent)) {\n return Mobile\\FairphoneFactory::detect($useragent);\n }\n\n if (preg_match('/FP1/', $useragent)) {\n return Mobile\\FairphoneFactory::detect($useragent);\n }\n\n if (preg_match('/videocon/i', $useragent)) {\n return Mobile\\VideoconFactory::detect($useragent);\n }\n\n if (preg_match('/A15/', $useragent)) {\n return Mobile\\VideoconFactory::detect($useragent);\n }\n\n if (preg_match('/mastone/i', $useragent)) {\n return Mobile\\MastoneFactory::detect($useragent);\n }\n\n if (preg_match('/BLU/', $useragent)) {\n return Mobile\\BluFactory::detect($useragent);\n }\n\n if (preg_match('/nuqleo/i', $useragent)) {\n return Mobile\\NuqleoFactory::detect($useragent);\n }\n\n if (preg_match('/ritmix/i', $useragent)) {\n return Mobile\\RitmixFactory::detect($useragent);\n }\n\n if (preg_match('/wexler/i', $useragent)) {\n return Mobile\\WexlerFactory::detect($useragent);\n }\n\n if (preg_match('/exeq/i', $useragent)) {\n return Mobile\\ExeqFactory::detect($useragent);\n }\n\n if (preg_match('/ergo/i', $useragent)) {\n return Mobile\\ErgoFactory::detect($useragent);\n }\n\n if (preg_match('/pulid/i', $useragent)) {\n return Mobile\\PulidFactory::detect($useragent);\n }\n\n if (preg_match('/dexp/i', $useragent)) {\n return Mobile\\DexpFactory::detect($useragent);\n }\n\n if (preg_match('/dex/i', $useragent)) {\n return Mobile\\DexFactory::detect($useragent);\n }\n\n if (preg_match('/keneksi/i', $useragent)) {\n return Mobile\\KeneksiFactory::detect($useragent);\n }\n\n if (preg_match('/gionee/i', $useragent)) {\n return Mobile\\GioneeFactory::detect($useragent);\n }\n\n if (preg_match('/highscreen/i', $useragent)) {\n return Mobile\\HighscreenFactory::detect($useragent);\n }\n\n if (preg_match('/reeder/i', $useragent)) {\n return Mobile\\ReederFactory::detect($useragent);\n }\n\n if (preg_match('/nomi/i', $useragent)) {\n return Mobile\\NomiFactory::detect($useragent);\n }\n\n if (preg_match('/globex/i', $useragent)) {\n return Mobile\\GlobexFactory::detect($useragent);\n }\n\n if (preg_match('/AIS/', $useragent)) {\n return Mobile\\AisFactory::detect($useragent);\n }\n\n if (preg_match('/CIOtCUD/i', $useragent)) {\n return Mobile\\CiotcudFactory::detect($useragent);\n }\n\n if (preg_match('/iNew/', $useragent)) {\n return Mobile\\InewFactory::detect($useragent);\n }\n\n if (preg_match('/intego/i', $useragent)) {\n return Mobile\\IntegoFactory::detect($useragent);\n }\n\n if (preg_match('/MTC/', $useragent)) {\n return Mobile\\MtcFactory::detect($useragent);\n }\n\n if (preg_match('/(DARKMOON|DARKSIDE|CINK PEAX 2|JERRY|BLOOM|SLIDE2)/', $useragent)) {\n return Mobile\\WikoFactory::detect($useragent);\n }\n\n if (preg_match('/ARK/', $useragent)) {\n return Mobile\\ArkFactory::detect($useragent);\n }\n\n if (preg_match('/Magic/', $useragent)) {\n return Mobile\\MagicFactory::detect($useragent);\n }\n\n if (preg_match('/BQS/', $useragent)) {\n return Mobile\\BqFactory::detect($useragent);\n }\n\n if (preg_match('/BQ \\d{4}/', $useragent)) {\n return Mobile\\BqFactory::detect($useragent);\n }\n\n if (preg_match('/aquaris/i', $useragent)) {\n return Mobile\\BqFactory::detect($useragent);\n }\n\n if (preg_match('/msi/i', $useragent) && !preg_match('/msie/i', $useragent)) {\n return Mobile\\MsiFactory::detect($useragent);\n }\n\n if (preg_match('/SPV/', $useragent)) {\n return Mobile\\SpvFactory::detect($useragent);\n }\n\n if (preg_match('/Orange/', $useragent)) {\n return Mobile\\OrangeFactory::detect($useragent);\n }\n\n if (preg_match('/vastking/i', $useragent)) {\n return Mobile\\VastKingFactory::detect($useragent);\n }\n\n if (preg_match('/wopad/i', $useragent)) {\n return Mobile\\WopadFactory::detect($useragent);\n }\n\n if (preg_match('/anka/i', $useragent)) {\n return Mobile\\AnkaFactory::detect($useragent);\n }\n\n if (preg_match('/ktouch/i', $useragent)) {\n return Mobile\\KtouchFactory::detect($useragent);\n }\n\n if (preg_match('/lemon/i', $useragent)) {\n return Mobile\\LemonFactory::detect($useragent);\n }\n\n if (preg_match('/lava/i', $useragent)) {\n return Mobile\\LavaFactory::detect($useragent);\n }\n\n if (preg_match('/velocity/i', $useragent)) {\n return Mobile\\VelocityMicroFactory::detect($useragent);\n }\n\n if (preg_match('/myTAB/', $useragent)) {\n return Mobile\\MytabFactory::detect($useragent);\n }\n\n if (preg_match('/(loox|uno\\_x10|xelio|neo\\_quad10|ieos\\_quad|sky plus|maven\\_10\\_plus|space10_plus_3g)/i', $useragent)) {\n return Mobile\\OdysFactory::detect($useragent);\n }\n\n if (preg_match('/iPh\\d\\,\\d/', $useragent)) {\n return Mobile\\AppleFactory::detect($useragent);\n }\n\n if (preg_match('/Puffin\\/[\\d\\.]+I(T|P)/', $useragent)) {\n return Mobile\\AppleFactory::detect($useragent);\n }\n\n if (preg_match('/dataaccessd/', $useragent)) {\n return Mobile\\AppleFactory::detect($useragent);\n }\n\n if (preg_match('/Pre/', $useragent) && !preg_match('/Presto/', $useragent)) {\n return Mobile\\HpFactory::detect($useragent);\n }\n\n if (preg_match('/ME\\d{3}[A-Z]/', $useragent)) {\n return Mobile\\AsusFactory::detect($useragent);\n }\n\n if (preg_match('/(PadFone|Transformer)/', $useragent)) {\n return Mobile\\AsusFactory::detect($useragent);\n }\n\n if (preg_match('/(K|P)0(0|1)[0-9a-zA-Z]/', $useragent)) {\n return Mobile\\AsusFactory::detect($useragent);\n }\n\n if (preg_match('/tesla/i', $useragent)) {\n return Mobile\\TeslaFactory::detect($useragent);\n }\n\n if (preg_match('/QtCarBrowser/', $useragent)) {\n return Mobile\\TeslaMotorsFactory::detect($useragent);\n }\n\n if (preg_match('/MB\\d{3}/', $useragent)) {\n return Mobile\\MotorolaFactory::detect($useragent);\n }\n\n if (preg_match('/smart tab/i', $useragent)) {\n return Mobile\\LenovoFactory::detect($useragent);\n }\n\n if (preg_match('/onetouch/i', $useragent)) {\n return Mobile\\AlcatelFactory::detect($useragent);\n }\n\n if (preg_match('/mtech/i', $useragent)) {\n return Mobile\\MtechFactory::detect($useragent);\n }\n\n if (preg_match('/one (s|x)/i', $useragent) && !preg_match('/vodafone smart/i', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/(Tablet\\-PC\\-4|Kinder\\-Tablet)/', $useragent)) {\n return Mobile\\CatSoundFactory::detect($useragent);\n }\n\n if (preg_match('/OP\\d{3}/', $useragent)) {\n return Mobile\\OlivettiFactory::detect($useragent);\n }\n\n if (preg_match('/SGP\\d{3}/', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/sgpt\\d{2}/i', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/xperia/i', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/VS\\d{3}/', $useragent)) {\n return Mobile\\LgFactory::detect($useragent);\n }\n\n if (preg_match('/(SurfTab|VT10416|breeze 10\\.1 quad)/', $useragent)) {\n return Mobile\\TrekStorFactory::detect($useragent);\n }\n\n if (preg_match('/AT\\d{2,3}/', $useragent)) {\n return Mobile\\ToshibaFactory::detect($useragent);\n }\n\n if (preg_match('/(PAP|PMP|PMT)/', $useragent)) {\n return Mobile\\PrestigioFactory::detect($useragent);\n }\n\n if (preg_match('/(APA9292KT|PJ83100|831C|Evo 3D GSM|Eris 2\\.1)/', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/adr\\d{4}/i', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/NEXT/', $useragent)) {\n return Mobile\\NextbookFactory::detect($useragent);\n }\n\n if (preg_match('/XT\\d{3,4}/', $useragent)) {\n return Mobile\\MotorolaFactory::detect($useragent);\n }\n\n if (preg_match('/( droid)/i', $useragent)) {\n return Mobile\\MotorolaFactory::detect($useragent);\n }\n\n if (preg_match('/MT\\d{4}/', $useragent)) {\n return Mobile\\CubotFactory::detect($useragent);\n }\n\n if (preg_match('/(S|L|W|M)T\\d{2}/', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/SK\\d{2}/', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/SO\\-\\d{2}(B|C|D|E)/', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/L50u/', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/VIVO/', $useragent)) {\n return Mobile\\BluFactory::detect($useragent);\n }\n\n if (preg_match('/NOOK/', $useragent)) {\n return Mobile\\BarnesNobleFactory::detect($useragent);\n }\n\n if (preg_match('/Zaffire/', $useragent)) {\n return Mobile\\NuqleoFactory::detect($useragent);\n }\n\n if (preg_match('/BNRV\\d{3}/', $useragent)) {\n return Mobile\\BarnesNobleFactory::detect($useragent);\n }\n\n if (preg_match('/IQ\\d{3,4}/', $useragent)) {\n return Mobile\\FlyFactory::detect($useragent);\n }\n\n if (preg_match('/Phoenix 2/', $useragent)) {\n return Mobile\\FlyFactory::detect($useragent);\n }\n\n if (preg_match('/VTAB1008/', $useragent)) {\n return Mobile\\VizioFactory::detect($useragent);\n }\n\n if (preg_match('/TAB10\\-400/', $useragent)) {\n return Mobile\\YarvikFactory::detect($useragent);\n }\n\n if (preg_match('/TQ\\d{3}/', $useragent)) {\n return Mobile\\GoCleverFactory::detect($useragent);\n }\n\n if (preg_match('/RMD\\-\\d{3,4}/', $useragent)) {\n return Mobile\\RitmixFactory::detect($useragent);\n }\n\n if (preg_match('/(TERRA_101|ORION7o)/', $useragent)) {\n return Mobile\\GoCleverFactory::detect($useragent);\n }\n\n if (preg_match('/AX\\d{3}/', $useragent)) {\n return Mobile\\BmobileFactory::detect($useragent);\n }\n\n if (preg_match('/FreeTAB \\d{4}/', $useragent)) {\n return Mobile\\ModecomFactory::detect($useragent);\n }\n\n if (preg_match('/Venue/', $useragent)) {\n return Mobile\\DellFactory::detect($useragent);\n }\n\n if (preg_match('/FunTab/', $useragent)) {\n return Mobile\\OrangeFactory::detect($useragent);\n }\n\n if (preg_match('/(OV\\-|Solution 7III)/', $useragent)) {\n return Mobile\\OvermaxFactory::detect($useragent);\n }\n\n if (preg_match('/Zanetti/', $useragent)) {\n return Mobile\\KianoFactory::detect($useragent);\n }\n\n if (preg_match('/MID\\d{3}/', $useragent)) {\n return Mobile\\MantaFactory::detect($useragent);\n }\n\n if (preg_match('/FWS610_EU/', $useragent)) {\n return Mobile\\PhicommFactory::detect($useragent);\n }\n\n if (preg_match('/FX2/', $useragent)) {\n return Mobile\\FaktorZweiFactory::detect($useragent);\n }\n\n if (preg_match('/AN\\d{1,2}/', $useragent)) {\n return Mobile\\ArnovaFactory::detect($useragent);\n }\n\n if (preg_match('/(Touchlet|X7G)/', $useragent)) {\n return Mobile\\PearlFactory::detect($useragent);\n }\n\n if (preg_match('/POV/', $useragent)) {\n return Mobile\\PointOfViewFactory::detect($useragent);\n }\n\n if (preg_match('/PI\\d{4}/', $useragent)) {\n return Mobile\\PhilipsFactory::detect($useragent);\n }\n\n if (preg_match('/SM \\- /', $useragent)) {\n return Mobile\\SamsungFactory::detect($useragent);\n }\n\n if (preg_match('/SAMURAI10/', $useragent)) {\n return Mobile\\ShiruFactory::detect($useragent);\n }\n\n if (preg_match('/Ignis 8/', $useragent)) {\n return Mobile\\TbTouchFactory::detect($useragent);\n }\n\n if (preg_match('/A5000/', $useragent)) {\n return Mobile\\SonyFactory::detect($useragent);\n }\n\n if (preg_match('/FUNC/', $useragent)) {\n return Mobile\\DfuncFactory::detect($useragent);\n }\n\n if (preg_match('/iD(j|n|s|x|r)(D|Q)\\d{1,2}/', $useragent)) {\n return Mobile\\DigmaFactory::detect($useragent);\n }\n\n if (preg_match('/K910L/', $useragent)) {\n return Mobile\\LenovoFactory::detect($useragent);\n }\n\n if (preg_match('/P10(32|50)X/', $useragent)) {\n return Mobile\\LenovoFactory::detect($useragent);\n }\n\n if (preg_match('/TAB7iD/', $useragent)) {\n return Mobile\\WexlerFactory::detect($useragent);\n }\n\n if (preg_match('/ZP\\d{3}/', $useragent)) {\n return Mobile\\ZopoFactory::detect($useragent);\n }\n\n if (preg_match('/s450\\d/i', $useragent)) {\n return Mobile\\DnsFactory::detect($useragent);\n }\n\n if (preg_match('/MB40II1/i', $useragent)) {\n return Mobile\\DnsFactory::detect($useragent);\n }\n\n if (preg_match('/ M3 /', $useragent)) {\n return Mobile\\GioneeFactory::detect($useragent);\n }\n\n if (preg_match('/(W100|W200|W8_beyond)/', $useragent)) {\n return Mobile\\ThlFactory::detect($useragent);\n }\n\n if (preg_match('/NT\\-\\d{4}(S|P|T|M)/', $useragent)) {\n return Mobile\\IconBitFactory::detect($useragent);\n }\n\n if (preg_match('/Primo76/', $useragent)) {\n return Mobile\\MsiFactory::detect($useragent);\n }\n\n if (preg_match('/T(X|G)\\d{2}/', $useragent)) {\n return Mobile\\IrbisFactory::detect($useragent);\n }\n\n if (preg_match('/YD\\d{3}/', $useragent)) {\n return Mobile\\YotaFactory::detect($useragent);\n }\n\n if (preg_match('/X\\-pad/', $useragent)) {\n return Mobile\\TexetFactory::detect($useragent);\n }\n\n if (preg_match('/TM\\-\\d{4}/', $useragent)) {\n return Mobile\\TexetFactory::detect($useragent);\n }\n\n if (preg_match('/OK\\d{3}/', $useragent)) {\n return Mobile\\SunupFactory::detect($useragent);\n }\n\n if (preg_match('/ G3 /', $useragent)) {\n return Mobile\\LgFactory::detect($useragent);\n }\n\n if (preg_match('/(Zera_F|Boost IIse|Ice2|Prime S|Explosion)/', $useragent)) {\n return Mobile\\HighscreenFactory::detect($useragent);\n }\n\n if (preg_match('/iris708/', $useragent)) {\n return Mobile\\AisFactory::detect($useragent);\n }\n\n if (preg_match('/L930/', $useragent)) {\n return Mobile\\CiotcudFactory::detect($useragent);\n }\n\n if (preg_match('/SMART Run/', $useragent)) {\n return Mobile\\MtcFactory::detect($useragent);\n }\n\n if (preg_match('/X8\\+/', $useragent)) {\n return Mobile\\TrirayFactory::detect($useragent);\n }\n\n if (preg_match('/(Surfer 7\\.34|M1_Plus|D7\\.2 3G)/', $useragent)) {\n return Mobile\\ExplayFactory::detect($useragent);\n }\n\n if (preg_match('/Art 3G/', $useragent)) {\n return Mobile\\ExplayFactory::detect($useragent);\n }\n\n if (preg_match('/PMSmart450/', $useragent)) {\n return Mobile\\PmediaFactory::detect($useragent);\n }\n\n if (preg_match('/(F031|SCL24|ACE)/', $useragent)) {\n return Mobile\\SamsungFactory::detect($useragent);\n }\n\n if (preg_match('/ImPAD/', $useragent)) {\n return Mobile\\ImpressionFactory::detect($useragent);\n }\n\n if (preg_match('/K1 turbo/', $useragent)) {\n return Mobile\\KingzoneFactory::detect($useragent);\n }\n\n if (preg_match('/TAB917QC\\-8GB/', $useragent)) {\n return Mobile\\SunstechFactory::detect($useragent);\n }\n\n if (preg_match('/TAB785DUAL/', $useragent)) {\n return Mobile\\SunstechFactory::detect($useragent);\n }\n\n if (preg_match('/(TPC\\-PA10\\.1M|M7T|P93G|i75|M83g| M6 )/', $useragent)) {\n return Mobile\\PipoFactory::detect($useragent);\n }\n\n if (preg_match('/ONE TOUCH/', $useragent)) {\n return Mobile\\AlcatelFactory::detect($useragent);\n }\n\n if (preg_match('/(6036Y|4034D|5042D)/', $useragent)) {\n return Mobile\\AlcatelFactory::detect($useragent);\n }\n\n if (preg_match('/MD948G/', $useragent)) {\n return Mobile\\MwayFactory::detect($useragent);\n }\n\n if (preg_match('/P4501/', $useragent)) {\n return Mobile\\MedionFactory::detect($useragent);\n }\n\n if (preg_match('/ V3 /', $useragent)) {\n return Mobile\\InewFactory::detect($useragent);\n }\n\n if (preg_match('/PX\\-\\d{4}/', $useragent)) {\n return Mobile\\IntegoFactory::detect($useragent);\n }\n\n if (preg_match('/Smartphone650/', $useragent)) {\n return Mobile\\MasterFactory::detect($useragent);\n }\n\n if (preg_match('/MX Enjoy TV BOX/', $useragent)) {\n return Mobile\\GeniatechFactory::detect($useragent);\n }\n\n if (preg_match('/A1000s/', $useragent)) {\n return Mobile\\XoloFactory::detect($useragent);\n }\n\n if (preg_match('/P3000/', $useragent)) {\n return Mobile\\ElephoneFactory::detect($useragent);\n }\n\n if (preg_match('/M5301/', $useragent)) {\n return Mobile\\IruFactory::detect($useragent);\n }\n\n if (preg_match('/ C7 /', $useragent)) {\n return Mobile\\CubotFactory::detect($useragent);\n }\n\n if (preg_match('/GV7777/', $useragent)) {\n return Mobile\\PrestigioFactory::detect($useragent);\n }\n\n if (preg_match('/ N1 /', $useragent)) {\n return Mobile\\NokiaFactory::detect($useragent);\n }\n\n if (preg_match('/RM\\-\\d{3,4}/', $useragent) && !preg_match('/(nokia|microsoft)/i', $useragent)) {\n return Mobile\\RossMoorFactory::detect($useragent);\n }\n\n if (preg_match('/RM\\-\\d{3,4}/', $useragent)) {\n return Mobile\\NokiaFactory::detect($useragent);\n }\n\n if (preg_match('/(5130c\\-2|lumia|arm; 909|id336|genm14)/i', $useragent)) {\n return Mobile\\NokiaFactory::detect($useragent);\n }\n\n if (preg_match('/N8000D/', $useragent)) {\n return Mobile\\SamsungFactory::detect($useragent);\n }\n\n if (preg_match('/N\\d{4}/', $useragent)) {\n return Mobile\\StarFactory::detect($useragent);\n }\n\n if (preg_match('/(Rio R1|GSmart\\_T4)/', $useragent)) {\n return Mobile\\GigabyteFactory::detect($useragent);\n }\n\n if (preg_match('/7007HD/', $useragent)) {\n return Mobile\\PerfeoFactory::detect($useragent);\n }\n\n if (preg_match('/PT\\-GF200/', $useragent)) {\n return Mobile\\PantechFactory::detect($useragent);\n }\n\n if (preg_match('/IM\\-A\\d{3}(L|K)/', $useragent)) {\n return Mobile\\PantechFactory::detect($useragent);\n }\n\n if (preg_match('/K\\-8S/', $useragent)) {\n return Mobile\\KeenerFactory::detect($useragent);\n }\n\n if (preg_match('/M601/', $useragent)) {\n return Mobile\\AocFactory::detect($useragent);\n }\n\n if (preg_match('/H1\\+/', $useragent)) {\n return Mobile\\HummerFactory::detect($useragent);\n }\n\n if (preg_match('/Pacific800i/', $useragent)) {\n return Mobile\\OystersFactory::detect($useragent);\n }\n\n if (preg_match('/Impress\\_L/', $useragent)) {\n return Mobile\\VertexFactory::detect($useragent);\n }\n\n if (preg_match('/(M040|MZ\\-MX5)/', $useragent)) {\n return Mobile\\MeizuFactory::detect($useragent);\n }\n\n if (preg_match('/(NEO\\-X5)/', $useragent)) {\n return Mobile\\MinixFactory::detect($useragent);\n }\n\n if (preg_match('/Numy_Note_9/', $useragent)) {\n return Mobile\\AinolFactory::detect($useragent);\n }\n\n if (preg_match('/Novo7Fire/', $useragent)) {\n return Mobile\\AinolFactory::detect($useragent);\n }\n\n if (preg_match('/TAB\\-97E\\-01/', $useragent)) {\n return Mobile\\ReellexFactory::detect($useragent);\n }\n\n if (preg_match('/vega/i', $useragent)) {\n return Mobile\\AdventFactory::detect($useragent);\n }\n\n if (preg_match('/dream/i', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/F10X/', $useragent)) {\n return Mobile\\NextwayFactory::detect($useragent);\n }\n\n if (preg_match('/ M8 /', $useragent)) {\n return Mobile\\AmlogicFactory::detect($useragent);\n }\n\n if (preg_match('/SPX\\-\\d/', $useragent)) {\n return Mobile\\SimvalleyFactory::detect($useragent);\n }\n\n if (preg_match('/AdTab 7 Lite/', $useragent)) {\n return Mobile\\AdspecFactory::detect($useragent);\n }\n\n if (preg_match('/PS1043MG/', $useragent)) {\n return Mobile\\DigmaFactory::detect($useragent);\n }\n\n if (preg_match('/TT7026MW/', $useragent)) {\n return Mobile\\DigmaFactory::detect($useragent);\n }\n\n if (preg_match('/(Neon\\-N1|WING\\-W2)/', $useragent)) {\n return Mobile\\AxgioFactory::detect($useragent);\n }\n\n if (preg_match('/T1(0|1)8/', $useragent)) {\n return Mobile\\TwinovoFactory::detect($useragent);\n }\n\n if (preg_match('/(A1002|A811)/', $useragent)) {\n return Mobile\\LexandFactory::detect($useragent);\n }\n\n if (preg_match('/ A10/', $useragent)) {\n return Mobile\\AllWinnerFactory::detect($useragent);\n }\n\n if (preg_match('/TOUAREG8_3G/', $useragent)) {\n return Mobile\\AccentFactory::detect($useragent);\n }\n\n if (preg_match('/chagall/', $useragent)) {\n return Mobile\\PegatronFactory::detect($useragent);\n }\n\n if (preg_match('/Turbo X6/', $useragent)) {\n return Mobile\\TurboPadFactory::detect($useragent);\n }\n\n if (preg_match('/HW\\-W718/', $useragent)) {\n return Mobile\\HaierFactory::detect($useragent);\n }\n\n if (preg_match('/Air A70/', $useragent)) {\n return Mobile\\RoverPadFactory::detect($useragent);\n }\n\n if (preg_match('/SP\\-6020 QUASAR/', $useragent)) {\n return Mobile\\WooFactory::detect($useragent);\n }\n\n if (preg_match('/M717R-HD/', $useragent)) {\n return Mobile\\VastKingFactory::detect($useragent);\n }\n\n if (preg_match('/Q10S/', $useragent)) {\n return Mobile\\WopadFactory::detect($useragent);\n }\n\n if (preg_match('/CTAB785R16\\-3G/', $useragent)) {\n return Mobile\\CondorFactory::detect($useragent);\n }\n\n if (preg_match('/RP\\-UDM\\d{2}/', $useragent)) {\n return Mobile\\VericoFactory::detect($useragent);\n }\n\n if (preg_match('/(UQ785\\-M1BGV|KM\\-UQM11A)/', $useragent)) {\n return Mobile\\VericoFactory::detect($useragent);\n }\n\n if (preg_match('/RG500/', $useragent)) {\n return Mobile\\RugGearFactory::detect($useragent);\n }\n\n if (preg_match('/T9666\\-1/', $useragent)) {\n return Mobile\\TelsdaFactory::detect($useragent);\n }\n\n if (preg_match('/N003/', $useragent)) {\n return Mobile\\NeoFactory::detect($useragent);\n }\n\n if (preg_match('/AP\\-105/', $useragent)) {\n return Mobile\\MitashiFactory::detect($useragent);\n }\n\n if (preg_match('/H7100/', $useragent)) {\n return Mobile\\FeitengFactory::detect($useragent);\n }\n\n if (preg_match('/x909/', $useragent)) {\n return Mobile\\OppoFactory::detect($useragent);\n }\n\n if (preg_match('/R815/', $useragent)) {\n return Mobile\\OppoFactory::detect($useragent);\n }\n\n if (preg_match('/xda/i', $useragent)) {\n return Mobile\\O2Factory::detect($useragent);\n }\n\n if (preg_match('/TIANYU/', $useragent)) {\n return Mobile\\KtouchFactory::detect($useragent);\n }\n\n if (preg_match('/KKT20/', $useragent)) {\n return Mobile\\LavaFactory::detect($useragent);\n }\n\n if (preg_match('/MDA/', $useragent)) {\n return Mobile\\TmobileFactory::detect($useragent);\n }\n\n if (preg_match('/redmi/i', $useragent)) {\n return Mobile\\XiaomiFactory::detect($useragent);\n }\n\n if (preg_match('/G009/', $useragent)) {\n return Mobile\\YxtelFactory::detect($useragent);\n }\n\n if (preg_match('/DG\\d{3,4}/', $useragent)) {\n return Mobile\\DoogeeFactory::detect($useragent);\n }\n\n if (preg_match('/H30\\-U10/', $useragent)) {\n return Mobile\\HuaweiFactory::detect($useragent);\n }\n\n if (preg_match('/KIW\\-L21/', $useragent)) {\n return Mobile\\HuaweiFactory::detect($useragent);\n }\n\n if (preg_match('/PICOpad_S1/', $useragent)) {\n return Mobile\\AxiooFactory::detect($useragent);\n }\n\n if (preg_match('/Adi_5S/', $useragent)) {\n return Mobile\\ArtelFactory::detect($useragent);\n }\n\n if (preg_match('/Norma 2/', $useragent)) {\n return Mobile\\KeneksiFactory::detect($useragent);\n }\n\n if (preg_match('/DM015K/', $useragent)) {\n return Mobile\\KyoceraFactory::detect($useragent);\n }\n\n if (preg_match('/KC\\-S701/', $useragent)) {\n return Mobile\\KyoceraFactory::detect($useragent);\n }\n\n if (preg_match('/T880G/', $useragent)) {\n return Mobile\\EtulineFactory::detect($useragent);\n }\n\n if (preg_match('/STUDIO 5\\.5/', $useragent)) {\n return Mobile\\BluFactory::detect($useragent);\n }\n\n if (preg_match('/F3_Pro/', $useragent)) {\n return Mobile\\DoogeeFactory::detect($useragent);\n }\n\n if (preg_match('/YOGA Tablet/', $useragent)) {\n return Mobile\\LenovoFactory::detect($useragent);\n }\n\n if (preg_match('/TF300T/', $useragent)) {\n return Mobile\\AsusFactory::detect($useragent);\n }\n\n if (preg_match('/TAB\\-970/', $useragent)) {\n return Mobile\\PrologyFactory::detect($useragent);\n }\n\n if (preg_match('/AP\\-804/', $useragent)) {\n return Mobile\\AssistantFactory::detect($useragent);\n }\n\n if (preg_match('/Atlantis 1010A/', $useragent)) {\n return Mobile\\BlaupunktFactory::detect($useragent);\n }\n\n if (preg_match('/IP1020/', $useragent)) {\n return Mobile\\DexFactory::detect($useragent);\n }\n\n if (preg_match('/A66A/', $useragent)) {\n return Mobile\\EvercossFactory::detect($useragent);\n }\n\n if (preg_match('/One/', $useragent)) {\n return Mobile\\HtcFactory::detect($useragent);\n }\n\n if (preg_match('/ARM; WIN (JR|HD)/', $useragent)) {\n return Mobile\\BluFactory::detect($useragent);\n }\n\n if (preg_match('/ARM;/', $useragent)\n && preg_match('/Windows NT 6\\.(2|3)/', $useragent)\n && !preg_match('/WPDesktop/', $useragent)\n ) {\n return Mobile\\MicrosoftFactory::detect($useragent);\n }\n\n if (preg_match('/CFNetwork/', $useragent)) {\n return Mobile\\AppleFactory::detect($useragent);\n }\n\n return new GeneralMobile($useragent);\n }", "title": "" }, { "docid": "412db389e73d4590959b537919b479fd", "score": "0.424125", "text": "abstract function getBeaconsByUrl($url = '');", "title": "" }, { "docid": "5a1ff27c639ab1e663c887f34ceb5b95", "score": "0.4238751", "text": "public function match_capabilities()\n {\n }", "title": "" }, { "docid": "40fd16a197f08f730bb19888b1b6cfa8", "score": "0.42379677", "text": "function is_robots() {}", "title": "" }, { "docid": "429c6d7058673d35c90b3e24f877bb50", "score": "0.42095712", "text": "public function visit(AbstractAppleHandheld $handheld);", "title": "" }, { "docid": "b28863452709d5accd8fd45b08d5a7d4", "score": "0.4208024", "text": "function vm_ismobile(){\n\n$is_mobile=FALSE;\n$user_agent = $_SERVER['HTTP_USER_AGENT'];\n\n$user_agents_default = \"Android, AvantGo, Blackberry, Blazer, Cellphone, Danger, DoCoMo, EPOC, EudoraWeb, Handspring, HTC, Kyocera, LG, MMEF20, MMP, MOT-V, Mot, Motorola, NetFront, Newt, Nokia, Opera Mini, Palm, Palm, PalmOS, PlayStation Portable, ProxiNet, Proxinet, SHARP-TQ-GX10, Samsung, Small, Smartphone, SonyEricsson, SonyEricsson, Symbian, SymbianOS, TS21i-10, UP.Browser, UP.Link, WAP, webOS, Windows CE, hiptop, iPhone, iPod, portalmmm, Elaine/3.0, OPWV\";\n\nif(get_option('vm_user_agents')==false){\nadd_option('vm_user_agents',$user_agents_default);\n}\n$user_agents=get_option('vm_user_agents');\n$user_agents = explode(',',$user_agents);\n\nforeach($user_agents AS $agent){\nif(eregi(trim($agent),$user_agent)){\n$is_mobile=TRUE;\n}\n}\nreturn $is_mobile;\n}", "title": "" }, { "docid": "d7da65284b3473987182a6b2c734d162", "score": "0.41963154", "text": "function chromeCast(){\n\t// if ( $_GET['vastEn']=='on'){\n\t// \t$vastEnable = \"{\\n vast: true \\n}\";\n\t// }\n\t// else{\n\t// \t$vastEnable = \"{\\n vast: false \\n}\";\n\t// }\n\n\tif ($_GET['adTag'] == \"noAd\"){\n\t\t$vastEnable = \"\";\n\t}elseif (ereg(\"^vm\", $_GET['adTag'])){\n\t\t$vastEnable = \"\\n\\t\\t\\t\\t\\t advertising: \\n\\t\\t\\t\\t\\t\\t{ vast: false \\n\\t\\t\\t\\t\\t }\";\n\t}else{\n\t\t$vastEnable = \"\\n\\t\\t\\t\\t\\t advertising: \\n\\t\\t\\t\\t\\t\\t{ vast: true \\n\\t\\t\\t\\t\\t }\";\n\t}\n\n\tif ( $_GET['ccEnb']=='on'){\n\t\tif ($_GET[partnerId]=='198'){\n\t\t\t\t$ccConfiguration = \"\\t\\t\\t\\t cast: {\\n\\t\\t\\t\\t\\t receiverApplicationId: \\\"7A7E9AA2\\\", $vastEnable \\n\\t\\t\\t\\t }, \\n\";\n\t\t\t}elseif ($_GET[partnerId]=='1091'){\n\t\t\t\t$ccConfiguration = \"\\t\\t\\t\\t cast: {\\n\\t\\t\\t\\t\\t receiverApplicationId: \\\"B202D11C\\\" , $vastEnable \\n\\t\\t\\t\\t }, \\n\";\n\t\t\t\t}elseif ($_GET[partnerId]=='4171'){\n\t\t\t\t\t$ccConfiguration = \"\\t\\t\\t\\t cast: {\\n\\t\\t\\t\\t\\t receiverApplicationId: \\\"9F2FB15E\\\" , $vastEnable \\n\\t\\t\\t\\t }, \\n\";\n\t\t\t\t\t}elseif ($_GET[partnerId]=='1740481' OR $_GET[partnerId]=='1804331'){\n\t\t\t\t\t\t$ccConfiguration = \"\\t\\t\\t\\t cast: {\\n\\t\\t\\t\\t\\t receiverApplicationId: \\\"40A30D06\\\" , $vastEnable \\n\\t\\t\\t\\t }, \\n\";\n\t\t\t\t\t}\n\t}else{\n\t\t$ccConfiguration = \"\";\n\t}\n\t\t\nreturn $ccConfiguration;\n}", "title": "" }, { "docid": "289945e50763d60ad73f0e8bd855a1e4", "score": "0.41893318", "text": "function AntiBomb_WordBoot($user){\n\t\t$hostnamee = gethostbyaddr($user);\n $listaBoot = array(\n\t\t'google', 'Altavista', 'Israel', 'M247', 'barracuda', 'niw.com.au',\n\t\t'Rambler', 'Yahoo', 'AbachoBOT', 'Accoona',\t'AcoiRobot',\n\t\t'ASPSeek', 'CrocCrawler', 'Dumbot', 'amazonaws', 'ebay',\n\t\t'FAST-WebCrawler', 'GeonaBot', 'Gigabot', 'Lycos', 'MSRBOT',\n\t\t'Scooter', 'eStyle', 'Scrubby', 'facebookexternalhit', 'spider',\n\t\t'googlebot', 'crawl', 'curl', 'dataprovider', 'search',\n\t\t'googleusercontent', 'theplanet', 'microsoft', 'avast', 'majesticsEO',\n\t\t'proxad', 'theplanet', 'microsoft', 'avast', 'majesticsEO',\n\t\t'BotLink', 'bingbot', 'AhrefsBot', 'ahoy', 'AlkalineBOT', 'anthill', 'appie', 'arale', 'araneo', 'AraybOt', 'ariadne', 'arks', 'ATN_Worldwide', 'Atomz', 'bbot', 'Bjaaland', 'Ukonline', 'borg\\-bot\\/0\\.9', 'boxseabot', 'bspider', 'calif', 'christcrawler', 'CMC\\/0\\.01', 'combine', 'confuzzledbot', 'CoolBot', 'cosmos', 'Internet Cruiser Robot', 'cusco', 'cyberspyder', 'cydralspider', 'desertrealm', 'desert realm', 'digger', 'DIIbot', 'grabber', 'downloadexpress', 'DragonBot', 'dwcp', 'ecollector', 'ebiness', 'elfinbot', 'esculapio', 'esther', 'fastcrawler', 'FDSE', 'FELIX IDE', 'ESI', 'fido', 'KIT\\-Fireball', 'fouineur', 'Freecrawl', 'gammaSpider', 'gazz', 'gcreep', 'golem', 'griffon', 'Gromit', 'gulliver', 'gulper', 'hambot', 'havIndex', 'hotwired', 'htdig', 'iajabot', 'INGRID\\/0\\.1', 'Informant', 'InfoSpiders', 'inspectorwww', 'irobot', 'Iron33', 'JBot', 'jcrawler', 'Teoma', 'Jeeves', 'jobo', 'image\\.kapsi\\.net', 'KDD\\-Explorer', 'ko_yappo_robot', 'label\\-grabber', 'larbin', 'legs', 'Linkidator', 'linkwalker', 'Lockon', 'logo_gif_crawler', 'marvin', 'mattie', 'mediafox', 'MerzScope', 'NEC\\-MeshExplorer', 'MindCrawler', 'udmsearch', 'moget', 'Motor', 'msnbot', 'muncher', 'muninn', 'MuscatFerret', 'MwdSearch', 'sharp\\-info\\-agent', 'WebMechanic', 'NetScoop', 'newscan\\-online', 'ObjectsSearch', 'Occam', 'Orbsearch\\/1\\.0', 'packrat', 'pageboy', 'ParaSite', 'patric', 'pegasus', 'perlcrawler', 'phpdig', 'piltdownman', 'Pimptrain', 'pjspider', 'PlumtreeWebAccessor', 'PortalBSpider', 'psbot', 'Getterrobo\\-Plus', 'Raven', 'RHCS', 'RixBot', 'roadrunner', 'Robbie', 'robi', 'RoboCrawl', 'robofox', 'Scooter', 'Search\\-AU', 'searchprocess', 'Senrigan', 'Shagseeker', 'sift', 'SimBot', 'Site Valet', 'skymob', 'SLCrawler\\/2\\.0', 'slurp', 'ESI', 'snooper', 'solbot', 'speedy', 'spider_monkey', 'SpiderBot\\/1\\.0', 'spiderline', 'nil', 'suke', 'http:\\/\\/www\\.sygol\\.com', 'tach_bw', 'TechBOT', 'templeton', 'titin', 'topiclink', 'UdmSearch', 'urlck', 'Valkyrie libwww\\-perl', 'verticrawl', 'Victoria', 'void\\-bot', 'Voyager', 'VWbot_K', 'crawlpaper', 'wapspider', 'WebBandit\\/1\\.0', 'webcatcher', 'T\\-H\\-U\\-N\\-D\\-E\\-R\\-S\\-T\\-O\\-N\\-E', 'WebMoose', 'webquest', 'webreaper', 'webs', 'webspider', 'WebWalker', 'wget', 'winona', 'whowhere', 'wlm', 'WOLP', 'WWWC', 'none', 'XGET', 'Nederland\\.zoek', 'AISearchBot', 'woriobot', 'NetSeer', 'Nutch', 'YandexBot', 'YandexMobileBot', 'SemrushBot', 'FatBot', 'MJ12bot', 'DotBot', 'AddThis', 'baiduspider', 'SeznamBot', 'mod_pagespeed', 'CCBot', 'openstat.ru',\n\t\t'facebook');\n\tforeach($listaBoot as $t)\n\t{\n\t\tif (strpos($hostnamee,$t) !== false) {\n\t\t\treturn true;\n\t\t\tbreak;\n\t\t}\n\t}\n\t}", "title": "" }, { "docid": "6e8d739723d84eb1b3262b756d253074", "score": "0.4176467", "text": "function fsp_caps_check($caps)\n{\n return array(\n 'update_core',\n );\n}", "title": "" }, { "docid": "74366a399477e6cf4fc65f1aee23ac73", "score": "0.4172913", "text": "private function block_crawlers_on_login(): void{\n add_action(\"init\", function(){\n if($this->is_admin_login()){\n require dirname(__FILE__).\"/vendor/autoload.php\";\n $CrawlerDetect = new CrawlerDetect;\n if($CrawlerDetect->isCrawler()){\n header('HTTP/1.0 404 Not Found', true, 404);\n die();\n }\n }\n }, PHP_INT_MAX);\n }", "title": "" }, { "docid": "9c65716d071c7d50141610d1eeab3686", "score": "0.41630208", "text": "public function stop_the_insanity() {}", "title": "" }, { "docid": "46b619d16114e66f386312efa15c464d", "score": "0.41593385", "text": "function filter_bots($u_agent)\n{\n // https://github.com/JayBizzle/Crawler-Detect\n $engines = array(\n 'YandexBot' => 'YandexBot',\n 'YandexDirect' => 'YandexDirect',\n 'Googlebot' => 'Googlebot',\n );\n\n foreach ($engines as $key => $value) {\n if (stripos($u_agent, $key)) {\n return ($value);\n }\n }\n\n return false;\n}", "title": "" }, { "docid": "403992571d3483a1f353aafe75047a6a", "score": "0.4151336", "text": "private function _is_softbank()\n\t{\n\t\t$regex = '#\\ASoftBank|\\ASemulator|\\AVemulator|\\AMOT\\-|\\AMOTEMULATOR|\\AJ\\-PHONE|\\AJ\\-EMULATOR#u';\n\t\tif ( preg_match($regex, $this->_agent) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "bf5b07d454d7c24f1fb7c15eefad96e4", "score": "0.41483778", "text": "function deactivate_lump_lugin()\n{\n Laminin_Deactivate::lum_deactivate();\n}", "title": "" }, { "docid": "7d73dd9c14076226fb81197d087916a7", "score": "0.41387752", "text": "function remoteFileCallFilter($adress) {\n\n\tif ($adress == 'carrier.php') {\n\t\t$url = 'http://s3-eu-west-1.amazonaws.com/brisqq-assets/eapi/core_v2/magento_php_core/carrier.php';\n\t} elseif ($adress == 'observer.php') {\n\t\t$url = 'http://s3-eu-west-1.amazonaws.com/brisqq-assets/eapi/core_v2/magento_php_core/observer.php';\n\t} elseif ($adress == 'brisqq-price-tiers.js') {\n\t\t$url = 'http://s3-eu-west-1.amazonaws.com/brisqq-assets/eapi/core_v2/javascript_core/brisqq-price-tiers.js';\n\t} elseif ($adress == 'custom-php-brisqq.php') {\n\t\t$url = 'http://s3-eu-west-1.amazonaws.com/brisqq-assets/eapi/magento/' . integration_name() . '/custom-php-brisqq.php';\n\t}\n\n\n\tif (chromePhpLogsAutoloader()) {\n\t\tChromePhp::log(fileName(__FILE__) . '/' . __LINE__ . ' - remoteFileCallFilter function fired!');\n\t}\n\t## if cURL is enabled, call our server with cURL\n\tif (functionChecker('curl_version')) {\n\t\tif (chromePhpLogsAutoloader()) {\n\t\t\tChromePhp::log(fileName(__FILE__) . '/' . __LINE__ . ' - curl is enabled, getting ready for http request');\n\t\t}\n\t\t$code = curlMethod($url);\n\t\tif (!$code) {\n\t\t\t$code =\tfileGetContentsMethod($url);\n\t\t}\n\t\t## update the file only if it was succesfullt loaded from server, otherwise use the one previously loaded\n\t\tif ($code && functionChecker('file_put_contents')) {\n\t\t\tif ($adress == 'brisqq-price-tiers.js') {\n\t\t\t\t$test = file_put_contents(Mage::getBaseDir() . '/js/' . $adress, $code);\n\t\t\t} else {\n\t\t\t\t$test = file_put_contents(Mage::getBaseDir() . '/var/brisqq-assets/' . $adress, $code);\n\t\t\t}\n\t\t\tif (chromePhpLogsAutoloader()) {\n\t\t\t\tChromePhp::log(fileName(__FILE__) . '/' . __LINE__ . ' - http request (' . $adress . ') made succesfuly and file_PUT_contents is enabled. Next line is the return value of file_PUT_contents.');\n\t\t\t\tChromePhp::log(fileName(__FILE__) . '/' . __LINE__ . ' - ' . $test);\n\t\t\t}\n\t\t}\n\n\t}\n\t## if cURL is not enabled, load files using FILE GET CONTENTS\n\telseif (functionChecker('file_get_contents')) {\n\n\t\tif (chromePhpLogsAutoloader()) {\n\t\t\tChromePhp::log(fileName(__FILE__) . '/' . __LINE__ . ' - CURL IS DISABLED, getting ready for http request via file_get_contents');\n\t\t}\n\n\t\t$code = fileGetContentsMethod($url);\n\t\t## update the file only if it was succesfullt loaded from server, otherwise use the one previously loaded\n\t\tif ($code && functionChecker('file_put_contents')) {\n\n\t\t\t$test = file_put_contents(Mage::getBaseDir() . '/var/brisqq-assets/' . $adress, $code);\n\t\t\tif (chromePhpLogsAutoloader()) {\n\t\t\t\tChromePhp::log(fileName(__FILE__) . '/' . __LINE__ . ' - http request (' . $adress . ') made succesfuly and file_PUT_contents is enabled. Next line is the return value of file_PUT_contents.');\n\t\t\t\tChromePhp::log(fileName(__FILE__) . '/' . __LINE__ . ' - ' . $test);\n\t\t\t}\n\t\t}\n\n\t\t}\n\t## if cURL and file_get_contents are not enabled, write logs\n\telse {\n\t\tMage::log('CURL AND FILE_GET_CONTENTS ARE DISABLED! We need at least one to operate.');\n\t}\n\n}", "title": "" }, { "docid": "ad4a35b0d44cff3a5f585601ff7aca07", "score": "0.41324747", "text": "public function specific()\n {\n $this->isCloudFlare = CloudFlare::isCloudFlare();\n $this->ip = CloudFlare::getIp();\n $this->isYandexBot = $this->isUserAgentMatch('yandex.com');\n }", "title": "" }, { "docid": "3dee76d3981ffede86782204df631227", "score": "0.4132055", "text": "function deactivate_infusionsoftaffiliates() {\n}", "title": "" }, { "docid": "36c243f57756eb260bf6619f4deed10d", "score": "0.4132005", "text": "public function testInAppAndroid()\n {\n $stage = new BrowserDetect;\n $payload = new Payload('Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build/LMY48B; wv) ' .\n 'AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/43.0.2357.65 Mobile Safari/537.36');\n $result = $stage($payload);\n $this->assertTrue($result->isInApp());\n }", "title": "" }, { "docid": "3223bba292f205aa1b14d91dc43fee43", "score": "0.41320044", "text": "function allowed_uname($uname)\n {\n static $blacklist = array('rss', 'xrds', 'doc', 'main','admin', 'administrator',\n 'settings', 'notice', 'user',\n 'search', 'avatar', 'tag', 'tags',\n 'api', 'message', 'group', 'groups',\n 'local', 'gamepub', 'hotnotice', 'featured', \n 'featuredrss', 'favoritedrss', 'opensearch', \n 'facebook', 'twitter', 'attachment', \n 'conversation', 'replylist', 'hotpicture', \n 'hotmusic', 'hotvideo', 'cityhot', 'hottopics',\n \t\t\t\t\t\t 'public', 'toplist', 'homepage', \n \t\t\t\t\t\t 'share', 'peopletag', 'favorited', 'register', 'clients',\n \t\t\t\t\t\t 'crm', 'funnypeople', 'experiences', 'requestforhelp', \n\t\t\t\t\t\t\t\t 'citypeople', 'rank', 'activities', 'mplayer', 'ajax', 'uploadvideo', 'getvideostatus',\n\t\t\t\t\t\t\t\t 'discuss', 'retweet', 'game', 'gameserver', 'home', 'discussionlist', 'showtime',\n \t\t\t\t\t\t // directory name\n \t\t\t\t\t\t 'actions', 'ajax', 'api', 'clasess', 'db', 'doc-src', 'extlib', 'lib', 'scripts', 'services', 'templates', 'hooyou', 'downloads', 'plugins');\n $merged = array_merge($blacklist, common_config('uname', 'blacklist'));\n return !in_array($uname, $merged);\n }", "title": "" }, { "docid": "791efe1288159313ee0084969088f213", "score": "0.4127905", "text": "private function _fetchByMobileApp()\n\t{\n\t\t$key = '';\n\t\t\n\t\t/* Detect the app */\n\t\tif ( $this->memberData['userAgentType'] == 'mobileApp' )\n\t\t{\n\t\t\t$key = 'xmlskin';\n\t\t}\n\t\telse if ( $this->memberData['userAgentType'] == 'mobileBot' || $this->memberData['userAgentType'] == 'mobileAppLegacy' )\n\t\t{\n\t\t\t$key = 'mobile';\n\t\t\t\n\t\t\t$this->setAsMobileSkin( true );\n\t\t}\n\t\telse if ( ! IN_DEV && IPSCookie::get(\"mobileBrowser\") == 1 )\n\t\t{\n\t\t\t$key = 'mobile';\n\t\t\t\n\t\t\t$this->setAsMobileSkin( true );\n\t\t}\n\t\t\n\t\tif ( $key )\n\t\t{\n\t\t\t$useSkinID = false;\n\t\t\t\n\t\t\tforeach( $this->allSkins as $id => $data )\n\t\t\t{\n\t\t\t\tif ( $data['set_key'] == $key )\n\t\t\t\t{ \n\t\t\t\t\t$useSkinID = $data['set_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\tif ( $useSkinID )\n\t\t\t{\n\t\t\t\treturn $useSkinID;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6b9d5b7f60ebf31bf57b6a51385e6ebd", "score": "0.41270095", "text": "function __construct(){\r\n $this->detectionRules = array_merge(\r\n $this->phoneDevices, \r\n $this->tabletDevices, \r\n $this->operatingSystems, \r\n $this->userAgents\r\n );\r\n $this->userAgent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;\r\n $this->accept = isset($_SERVER['HTTP_ACCEPT']) ? $_SERVER['HTTP_ACCEPT'] : null;\r\n \r\n if (\r\n\t\tisset($_SERVER['HTTP_X_WAP_PROFILE']) ||\r\n isset($_SERVER['HTTP_X_WAP_CLIENTID']) ||\r\n isset($_SERVER['HTTP_WAP_CONNECTION']) ||\r\n\t\tisset($_SERVER['HTTP_PROFILE']) ||\r\n\t\tisset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']) || // Reported by Nokia devices (eg. C3)\r\n isset($_SERVER['HTTP_X_NOKIA_IPADDRESS']) ||\r\n isset($_SERVER['HTTP_X_NOKIA_GATEWAY_ID']) ||\r\n isset($_SERVER['HTTP_X_ORANGE_ID']) ||\r\n isset($_SERVER['HTTP_X_VODAFONE_3GPDPCONTEXT']) ||\r\n isset($_SERVER['HTTP_X_HUAWEI_USERID']) ||\r\n isset($_SERVER['HTTP_UA_OS']) || // Reported by Windows Smartphones\r\n (isset($_SERVER['HTTP_UA_CPU']) && $_SERVER['HTTP_UA_CPU'] == 'ARM') // Seen this on a HTC\r\n\t\t) {\r\n $this->isMobile = true;\r\n } elseif (!empty($this->accept) && (strpos($this->accept, 'text/vnd.wap.wml') !== false || strpos($this->accept, 'application/vnd.wap.xhtml+xml') !== false)) {\r\n $this->isMobile = true;\r\n } else {\r\n $this->_detect();\r\n } \r\n \r\n }", "title": "" }, { "docid": "53ff16192c38dd6541369db6916e00a8", "score": "0.41172937", "text": "public function isMobile()\n {\n $op = strtolower($_SERVER['HTTP_X_OPERAMINI_PHONE']);\n $ua = strtolower($_SERVER['HTTP_USER_AGENT']);\n $ac = strtolower($_SERVER['HTTP_ACCEPT']);\n\n return (\n strpos($ac, 'application/vnd.wap.xhtml+xml') !== false\n || strpos($ac, 'text/vnd.wap.wml') !== false\n || $op != ''\n || strpos($ua, 'iphone') !== false\n || strpos($ua, 'android') !== false\n || strpos($ua, 'iemobile') !== false \n || strpos($ua, 'kindle') !== false\n || strpos($ua, 'sony') !== false \n || strpos($ua, 'symbian') !== false \n || strpos($ua, 'nokia') !== false \n || strpos($ua, 'samsung') !== false \n || strpos($ua, 'mobile') !== false\n || strpos($ua, 'windows ce') !== false\n || strpos($ua, 'epoc') !== false\n || strpos($ua, 'opera mini') !== false\n || strpos($ua, 'nitro') !== false\n || strpos($ua, 'j2me') !== false\n || strpos($ua, 'midp-') !== false\n || strpos($ua, 'cldc-') !== false\n || strpos($ua, 'netfront') !== false\n || strpos($ua, 'mot') !== false\n || strpos($ua, 'up.browser') !== false\n || strpos($ua, 'up.link') !== false\n || strpos($ua, 'audiovox') !== false\n || strpos($ua, 'blackberry') !== false\n || strpos($ua, 'ericsson,') !== false\n || strpos($ua, 'panasonic') !== false\n || strpos($ua, 'philips') !== false\n || strpos($ua, 'sanyo') !== false\n || strpos($ua, 'sharp') !== false\n || strpos($ua, 'sie-') !== false\n || strpos($ua, 'portalmmm') !== false\n || strpos($ua, 'blazer') !== false\n || strpos($ua, 'avantgo') !== false\n || strpos($ua, 'danger') !== false\n || strpos($ua, 'palm') !== false\n || strpos($ua, 'series60') !== false\n || strpos($ua, 'palmsource') !== false\n || strpos($ua, 'pocketpc') !== false\n || strpos($ua, 'smartphone') !== false\n || strpos($ua, 'rover') !== false\n || strpos($ua, 'ipaq') !== false\n || strpos($ua, 'au-mic,') !== false\n || strpos($ua, 'alcatel') !== false\n || strpos($ua, 'ericy') !== false\n || strpos($ua, 'up.link') !== false\n || strpos($ua, 'vodafone/') !== false\n || strpos($ua, 'wap1.') !== false\n || strpos($ua, 'wap2.') !== false\n );\n }", "title": "" }, { "docid": "f17a6968dec6036bb2449d7c5cfc1b10", "score": "0.4112187", "text": "public function test_load_biz_call_consider()\n\t{\n\t\t//TODO: write later\t\n\t}", "title": "" }, { "docid": "084ddd0acbbc4c6d3e731dde7d0d02d5", "score": "0.41085362", "text": "function chkBrowser(){\n if (preg_match(\"/^DoCoMo/\",$_SERVER['HTTP_USER_AGENT'])){\n return \"imode\";\n }else if (preg_match(\"/iPhone/\",$_SERVER['HTTP_USER_AGENT'])){\n return \"iphone\";\n }else if(preg_match(\"/NetFront/\",$_SERVER['HTTP_USER_AGENT'])){\n return \"netfront\";\n }else if(preg_match(\"/Windows/\",$_SERVER['HTTP_USER_AGENT'])){\n return \"windows\";\n }else if(preg_match(\"/Mac OS X/\",$_SERVER['HTTP_USER_AGENT'])){\n return \"osx\";\n }else if(preg_match(\"/Safari/\",$_SERVER['HTTP_USER_AGENT'])){\n return \"safari\";\n }else return \"unix\";\n}", "title": "" }, { "docid": "79f335919a9bc7b8e7a56577df58ff1f", "score": "0.41035062", "text": "function my_hook_info_function($keyword, $params)\n{\n global $app_name, $app_version, $nama_modem;\n global $my_info_kategori, $my_info_keyword;\n // Sometime, you don't need to reply SMS from non-user number,\n // such as SMS from Service Center, message center, \n // or promotional SMS:\n $param = $params['params'];\n if (strlen($params['sender'])<=6) {\n return true;\n }\n else\n {\n // If the SMS requires reply, do it as follows:\n /*\n * return sms_send($params['sender'], \n * 'Thank your for texting us.', \n * $nama_modem);\n */\n // or simply return true without replying it:\n /*\n * return true;\n */\n $c = count($param); \n $sql_kunci = \"select k.keyword from sms_keywords k where (not (upper(k.keyword) in ('UNKNOWN',upper('$my_info_keyword')) ))\n and (k.kategori in (select s.kategori from sms_keywords s where s.keyword = '$my_info_keyword')) order by k.keyword asc\";\n if ($c!=2)\n {\n $pesan1 = 'Terimakasih. Ketik '.strtoupper($my_info_keyword).DELIMITER.'KATAKUNCI untuk bantuan.';\n $kunci = fetch_query($sql_kunci);\n $pesan2 = ''; \n foreach($kunci as $i=>$item){\n $pesan2.=','.$item['keyword'];\n }\n $pesan2 = 'Format Kata Kunci yang Tersedia: '.substr($pesan2, 1);\n unset($kunci);\n }\n else\n {\n $info_kw = strtoupper($param[1]);\n $kirim = keyword_fetch_by_keyword($info_kw); \n // $kirim = fetch_query(\"select format_sms, contoh_sms from sms_keywords where upper(keyword) = upper('$info_kw')\" );\n if (count($kirim)==0)\n {\n $pesan1 = 'Kata kunci '.strtoupper($info_kw).' tidak ditemukan. Ketik '.strtoupper($my_info_keyword).' untuk bantuan.';\n $kunci = fetch_query($sql_kunci);\n $pesan2 = ''; \n foreach($kunci as $i=>$item){\n $pesan2.=','.$item['keyword'];\n }\n $pesan2 = 'Format Kata Kunci yang Tersedia: '.substr($pesan2, 1);\n unset($kunci); \n } \n else\n {\n $pesan1 = 'Format SMS: '.$kirim['sms_format'];\n $pesan2 = 'Contoh SMS: '.$kirim['sms_sample'];\n }\n unset($kirim);\n }\n $ok1 = sms_send($params['sender'], $pesan1, $nama_modem);\n $ok2 = true;\n if (!empty($pesan2))\n {\n $ok2 = sms_send($params['sender'], $pesan2, $nama_modem);\n }\n return ($ok1 && $ok2);\n } \n}", "title": "" }, { "docid": "c12e26be466c8665669cdea4eee8de7c", "score": "0.41024396", "text": "function tincanlaunch_get_extra_capabilities() {\n return array();\n}", "title": "" }, { "docid": "9dc330980269f779c57bd097eab5f7b8", "score": "0.40989912", "text": "protected function checkBrowserBaiduSpider()\n {\n \tif (stripos($this->_agent, 'baiduspider') !== false) {\n \t\t$aresult = explode('/', stristr($this->_agent, 'baiduspider'));\n \t\t$aversion = explode(' ', $aresult[1]);\n \t\t$this->setVersion(str_replace(';', '', $aversion[0]));\n \t\t$this->_browser_name = self::BROWSER_BAIDUSPIDER;\n \t\t$this->setRobot(true);\n \t\treturn true;\n \t}\n \treturn false;\n }", "title": "" }, { "docid": "755371b44c81d368fb952cbf30c7955a", "score": "0.40915707", "text": "function silvercare_register_ubermenu_skins(){\n if( function_exists( 'ubermenu_register_skin' ) ){\n $skin_slug = 'atos-maintheme'; //replace with your skin slug\n $skin_name = '[AT_OS] Main theme'; //Replace with the name of your skin (visible to users)\n $skin_path = get_stylesheet_directory_uri() . '/asset/sass/ubermenu/ubermenu.css'; //Replace with path to the custom skin in your theme\n ubermenu_register_skin( $skin_slug , $skin_name , $skin_path );\n }\n}", "title": "" }, { "docid": "e517548be82558f0ec06ada7c36708c5", "score": "0.40849954", "text": "function is_inapp_browser() {\n\n\t// phpcs:disable\n\treturn isset( $_SERVER['HTTP_USER_AGENT'] )\n\t\t&& strpos( $_SERVER['HTTP_USER_AGENT'], 'Android' )\n\t\t&& ( strpos( $_SERVER['HTTP_USER_AGENT'], 'Instagram' ) || preg_match( '/\\bFB[\\w_]+\\//', $_SERVER['HTTP_USER_AGENT'] ) );\n\t// phpcs:enable\n}", "title": "" }, { "docid": "03596621938e5cf7c0af94a05094d51a", "score": "0.4084086", "text": "public static function isUserBarcode($value)\n {\n return preg_match('/^[a-zA-Z]{2}[0-9a-zA-Z]{3}[0-9a-zA-Z]{5}$/', $value);\n }", "title": "" }, { "docid": "44f4f669bde5ffcde4253a6086e40d13", "score": "0.40839586", "text": "private function refineBrowser(){\n global $profiler;\n global $db;\n $t = $profiler->add(\"Refining browser\");\n $qr=$db->querydb('SELECT * FROM refined_stats WHERE browser_refined=0');\n if($qr->num_rows){\n while($ro=$qr->fetch_object()){ \n $profiler->add(\"Starting useragentstring connection\");\n $url = \"http://www.useragentstring.com/?uas=\".urlencode($ro->HTTP_USER_AGENT).\"&getJSON=agent_type-agent_name-agent_version-os_name\"; \n if(($fp=fopen($url, 'rb'))!=null){\n $json = stream_get_contents($fp);\n fclose($fp);\n } \n $profiler->add(\"UAS connection completed\");\n if($result = json_decode($json, true)){\n $values['agent_type'] = isset($result['agent_type']) ? $result['agent_type'] : 'unavailable';\n $values['agent_name'] = isset($result['agent_name']) ? $result['agent_name'] : 'unavailable';\n $values['agent_version'] = isset($result['agent_version']) ? $result['agent_version'] : 'unavailable';\n $values['os_name'] = isset($result['os_name']) ? $result['os_name'] : 'unavailable';\n $values['browser_refined']=1;\n $db->update('refined_stats', $values, 'id = \"'.$ro->ID.'\"'); \n $profiler->add(\"Refined browser data\", $t);\n }\n }\n }else{\n $profiler->add('Browser not refined : no row found for browser_refined=0');\n } \n }", "title": "" }, { "docid": "195219a562bd9e3d59d612dfa9f158f3", "score": "0.40838104", "text": "private function _is_willcom()\n\t{\n\t\t$regex = '#WILLCOM|DDIPOCKET|WS0[0-9][0-9]SH|MobilePhone#u';\n\t\tif ( preg_match($regex, $this->_agent) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "3f572708f657b1ce11a1414759f4d1ea", "score": "0.40802547", "text": "private function Bad_Aba()\n\t\t{\n\t\t\t//added for GForge #6393 [MJ] - modified for GForge #11375 [MJ]\n\t\t\t$bypass = (isset($_SESSION['no_checks_ssn'])) ? $_SESSION['no_checks_ssn'] : FALSE;\n\t\t\t\n\t\t\tif ($this->config->debug->Debug_Option(DEBUG_RUN_ABA) !== FALSE && !$bypass)\n\t\t\t{\n\t\t\t\t$result = Aba_Bad( @$this->config->data['bank_aba'], @$this->config->data['bank_account'] );\n\t\t\t\t\n\t\t\t\t$target_stats = OLPStats_Spaces::getInstance(\n\t\t\t\t\t$this->config->mode,\n\t\t\t\t\t0, // No specific target id for this check\n\t\t\t\t\t$this->config->bb_mode,\n\t\t\t\t\t$this->config->config->page_id,\n\t\t\t\t\t$this->config->config->promo_id,\n\t\t\t\t\t$this->config->config->promo_sub_code\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif( $result )\n\t\t\t\t{\n\t\t\t\t\t$this->Use_Tier( NULL, FALSE );\n\t\t\t\t\t$this->Log_Event( 'ABA_BAD', 'FAIL' );\n\t\t\t\t\tif ($target_stats) $target_stats->hitStat('aba_check_fail');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->Log_Event( 'ABA_BAD', 'PASS' );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Log_Event('ABA_BAD', EVENT_SKIP);\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f1096f7ff481011447492986941a59a2", "score": "0.40798837", "text": "function check_mobile() {\n $agents = array(\n 'Windows CE', 'Pocket', 'Mobile',\n 'Portable', 'Smartphone', 'SDA',\n 'PDA', 'Handheld', 'Symbian',\n 'WAP', 'Palm', 'Avantgo',\n 'cHTML', 'BlackBerry', 'Opera Mini',\n 'Nokia'\n );\n \n // Prüfen der Browserkennung\n for ($i=0; $i<count($agents); $i++) {\n if(isset($_SERVER[\"HTTP_USER_AGENT\"]) && strpos($_SERVER[\"HTTP_USER_AGENT\"], $agents[$i]) !== false)\n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "70fad2f586d5509d4425720a8f04caef", "score": "0.40745476", "text": "private function remapWirelessAction()\n {\n $this->loadMapping('wireless_module_registry');\n $this->view_object_map['wireless_module_registry'] = $this->wireless_module_registry;\n $action = strtolower($this->action);\n if ($this->module == 'Home' && $this->action == 'index' && isset($_SESSION['isMobile'])) {\n header('Location:index.php?module=Users&action=wirelessmain&mobile=1');\n }\n elseif(isset($this->wireless_module_registry[$this->module]) && isset($_SESSION['isMobile'])){\n if ( $action == 'editview' ) $this->action = 'wirelessedit';\n if ( $action == 'detailview' ) $this->action = 'wirelessdetail';\n if ( $action == 'listview' ) $this->action = 'wirelesslist';\n }\n else {\n if ( $action == 'wirelessedit' ) $this->action = 'editview';\n if ( $action == 'wirelessdetail' ) $this->action = 'detailview';\n if ( $action == 'wirelesslist' ) $this->action = 'listview';\n if ( $action == 'wirelessmodule' ) $this->action = 'listview';\n\t\t}\n $this->do_action = $this->action;\n }", "title": "" }, { "docid": "3a38ee561293237c93a59a7c03019430", "score": "0.4068556", "text": "function woocommerce_add_tap_gateway($methods) {\n\t\t\t$methods[] = 'WC_tap';\n\t\t\treturn $methods;\n\t\t}", "title": "" }, { "docid": "935b3cb0b0a89baf6f2cd0936a74139e", "score": "0.4064215", "text": "public function testInAppWebView()\n {\n $stage = new BrowserDetect;\n $payload = new Payload('WebView');\n $result = $stage($payload);\n $this->assertTrue($result->isInApp());\n\n $stage = new BrowserDetect;\n $payload = new Payload('Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_1 like Mac OS X) ' .\n 'AppleWebKit/602.1.32 (KHTML, like Gecko) Mobile/14A403 Twitter for iPhone');\n $result = $stage($payload);\n $this->assertTrue($result->isInApp());\n\n $stage = new BrowserDetect;\n $payload = new Payload('Mozilla/5.0 (iPhone; CPU iPhone OS 10_1_1 like Mac OS X) ' .\n 'AppleWebKit/602.2.14 (KHTML, like Gecko) Mobile/14B100 MicroMessenger/6.3.30 NetType/WIFI Language/en');\n $result = $stage($payload);\n $this->assertTrue($result->isInApp());\n }", "title": "" }, { "docid": "346500da2554eb7ff36e65fc1c37ec74", "score": "0.40614706", "text": "function changeZone($userid=0, $zoneid=0){\n\tif( (false == $userid) || (false == $zoneid) )\n\treturn false;\n\tglobal $keycode, $mobileSize, $errorM;\n\n\t# Check if Handset Account is exsist in OpenX\n\n\t# if account, then test for Mobile Request, else return $zoneid as passed.\n\t\t# Get Handset Detection's information username, apikey, secret;\n\t\t$doHandsetdetection = OA_Dal::factoryDO('handsetdetection');\n\t\t$doHandsetdetection->user_id = $userid;\n\t\t$doHandsetdetection->find();\n\t\t$countH = $doHandsetdetection->getRowCount();\n\t\t$doHandsetdetection->fetch();\n\t\t$husername\t= $doHandsetdetection->husername;\n\t\t$hsecret\t= $doHandsetdetection->hsecret;\n\t\t$hapikey\t= $doHandsetdetection->hapikey;\n\t\t$hsecret \t= decrypt($hsecret, \"$keycode\");\n\t\t$hapikey \t= decrypt($hapikey, \"$keycode\");\n\t\tif(false != $countH){ #if handset detection's username, apikey and secret find in the database.\n\n\t\t\t# Define Constant used in handsetdetection.api.php functions;\n\t\t\tif(!empty($husername))\tdefine('USERNAME',\t$husername);\n\t\t\tif(!empty($hsecret))\tdefine('SECRET',\t$hsecret);\n\t\t\tif(!empty($hapikey))\tdefine('APIKEY', \t$hapikey);\n\t\t\n\t\t\t# Send Api Request to Handset Detection and Get required information about Request Type; Regular/Mobile request.\n\t\t\t$mobileInfo = array();\n\t\t\t$mobileInfo = doDetect();\n\t\t\n\n\t\t\t################\n\t\t\t# Mobile Request\n\t\t\t################\n\t\t\t# If Mobile Request\n\t\t\t# change ZoneID according to the size of Mobile Screen.\n\t\t\tif(!empty($mobileInfo) && $mobileInfo['message']=='OK') # if $message=='OK', then the application is mobile device.\n\t\t\t{\n\t\t\t\t# Change zone id to dislay banner on Mobile by checking Mobile Screen Size;\n\t\t\t\t# Get Mobile Zone's Informations\n\t\t\t\t$doMobilezones = OA_Dal::factoryDO('mobilezones');\n\t\t\t\t$doMobilezones->masterzoneid = $zoneid;\n\t\t\t\t$doMobilezones->find();\n\t\t\t\t$countM = $doMobilezones->getRowCount();\n\t\t\t\t$doMobilezones->fetch();\n\t\t\t\tif(false != $countM){ # If zone' is mapped in the database.\n\t\t\t\n\t\t\t\t\t# Make Array and store Mobile Screen display information\n\t\t\t\t\t# MR = MobileResolution\n\t\t\t\t\t$MR = array();\n\t\t\t\t\t$MR['width'] = $mobileInfo['display']['max_image_width'];\n\t\t\t\t\t$MR['height'] = $mobileInfo['display']['max_image_height'];\n\t\t\t\t\t$mz=0;\n\t\t\n// \t \t\t\t\tif( ($MR['width']>=$mobileSize['extralarge']['width']) && ($MR['height'] >= $mobileSize['extralarge']['height']) )\n\t\t\t\t\tif( $MR['width']>=$mobileSize['extralarge']['width'] )\n\t\t\t\t\t{\n\t\t\t\t\t$mz=1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( $MR['width']>=$mobileSize['large']['width'] )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t$mz=2;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif( $MR['width']>=$mobileSize['medium']['width'] )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mz=3;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tif( $MR['width']>=$mobileSize['small']['width'] )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$mz=4;\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# Check Which MobileZone is detect\n\t\t\t\t\t# Get related Mobile Zone ID\n\t\t\t\t\tswitch($mz){\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\t$zoneid = $doMobilezones->mz1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t$zoneid = $doMobilezones->mz2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t$zoneid = $doMobilezones->mz3;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t$zoneid = $doMobilezones->mz4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t$zoneid = $doMobilezones->mz4;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t $errorM .= 'Error:Mobile Zone';\n\t\t\t\t}\n\t\t\t\n\t\t\t}# End Mobile Request\n\t\t\telse{\n\t\t\t ################\n\t\t\t # Window Request\n\t\t\t ################\n\t\t\t # If Normal Request\n\t\t\t $errorM .= 'Normal Request';\n\t\t\t return $zoneid; # if request is from Window, not from Mobile\n\t\t\t \n\t\t\t}\n\t\t\t\n\n\t\t\t#################\n\t\t\t# Regular Request\n\t\t\t#################\n\t\t\t# If regular request, then don't change ZoneID\n\t\t\t# Remaing Zone id as it is.\n\t\t\t# End Regular Request\n\t\t}else{\n\t\t $errorM .= 'Handset error';\n\t\t}\n\treturn $zoneid; #return zoneid as passed if Handset Detection account is not present in OpenX for the User\n}", "title": "" }, { "docid": "ca6b1169af6cf72567e2c0d7271bad87", "score": "0.4061365", "text": "function grab2($url){$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\ncurl_setopt($ch,CURLOPT_ENCODING,'gzip');\ncurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, true);\ncurl_setopt($ch, CURLOPT_TIMEOUT, 10);\n$header[] = \"Accept-Language: en\";\n$header[] = \"User-Agent: Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en) AppleWebKit/534.1+ (KHTML, Like Gecko) Version/6.0.0.141 Mobile Safari/534.1+\";\n$header[] = \"Pragma: no-cache\";\n$header[] = \"Cache-Control: no-cache\";\n$header[] = \"Accept-Encoding: gzip,deflate\";\n$header[] = \"Content-Encoding: gzip\";\n$header[] = \"Content-Encoding: deflate\";\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $header);\n$load = curl_exec($ch);\ncurl_close($ch);\nreturn $load;\n}", "title": "" }, { "docid": "000baa1e774190bd355502153fd16f8c", "score": "0.40578645", "text": "function views_map_get_skins() {\n\n}", "title": "" }, { "docid": "d254d2a9e00443a0e01aa806239d56d6", "score": "0.4054346", "text": "function phone(){\n $smsTxt = FS(\"Webconfig/smstxt\");\n $time = '1501516800';\n $money = '500';\n $bank_card ='343253542324232323';\n $bank_name ='民生银行';\n $aa = str_replace(\n array(\"#DATE#\", \"#MONEY#\", \"#BANK#\",\"#BANKNAME#\", \"#AMOUNT#\"),\n array(date(\"Y-m-d\",$time),$money,substr($bank_card,-4),$bank_name,$money),$smsTxt['repayment_before']\n );\n echo $aa;\n \n /*$phone = \"02160433459\";\n $txt = getlink('https://www.so.com/s?q='.$phone);\n $info = get_tag(\"class\",\"mohe-mobileInfoContent\",$txt,\"td\");\n \n \n $where = get_tag(\"class\",\"gclearfix mh-detail\",$info[0],\"div\");\n if(count($where)==0){//不是骚扰电话\n echo \"HHHHHHHHHHHH\";\n $where=get_tag(\"class\",\"mh-detail\",$info[0],\"p\");\n }\n $info_txt = strip_tags ($where[0]);\n $info_array = explode(\" \",$info_txt);\n $phone_t = $info_array[0];\n $where_t = $info_array[1];\n $cmcc_t = $info_array[2];\n $type=get_tag(\"class\",\"mohe-ph-mark\",$info[0],\"span\");\n if(count($type)!=0){\n $type_t=$type[0]; \n }\n \n $result=new Result();\n $result->phone=$phone_t;\n $result->where=$where_t;\n $result->cmcc=$cmcc_t;\n $result->type=$type_t;\n \n $json=json_encode($result,JSON_UNESCAPED_UNICODE);\n wqbLog($json);\n echo $json;*/\n }", "title": "" }, { "docid": "b53a02b6d96d44222ab20908d5fac379", "score": "0.40474334", "text": "public function removeMobileUnfriendlyPlugins() {\n $addons = $this->addonManager->getEnabled();\n $plugins = array_filter($addons, Addon::makeFilterCallback(['oldType' => 'plugin']));\n\n /* @var Addon $plugin */\n foreach ($plugins as $key => $plugin) {\n if (!$plugin->getInfoValue('mobileFriendly', true) && $plugin->getPluginClass()) {\n $this->unregisterPlugin($plugin->getPluginClass());\n }\n }\n }", "title": "" }, { "docid": "88b2a8ffd7e9b73c0cc6291417312af7", "score": "0.40452486", "text": "function magichome() {\n $this->name=\"magichome\";\n $this->title=\"Magic Home\";\n $this->module_category=\"<#LANG_SECTION_DEVICES#>\";\n $this->checkInstalled();\n}", "title": "" }, { "docid": "c64fa040c78f33466134f0ad1230d1c7", "score": "0.40436944", "text": "static public function get_special_macros_to_ignore_in_bbl() {\n\n return array('\\\\href', '\\\\doi', '\\\\url');\n }", "title": "" }, { "docid": "a92412bc2a79102027449ae9cacddbfd", "score": "0.4039337", "text": "function RobotDetect($user_agent)\n {\n // Return if agent is common browser\n $common_browsers = \"Firefox|Chrome|Opera|MSIE\";\n if (preg_match(\"/\" . $common_browsers . \"/i\", $user_agent)) return 0;\n\n // Get the agent\n $agent = strstr($user_agent, '/', TRUE);\n\n // Robots\n $robots = \"abcdatos|spider|ahoythehomepagefinder|Alkaline|anthill|appie|arachnophilia|arale|araneo|araybot|architext|aretha|ariadne|arks|atn|atomz|auresys|backrub|bbot|bigbrother|bingbot|bjaaland|blackwidow|blindekuh|Bloodhound|borg-bot|boxseabot|brightnet|calif|cassandra|cgireader|checkbot|crawl|churl|cienciaficcion|cmc|Collective|combine|confuzzledbot|coolbot|core|cosmos|cruiser|cusco|cyberspyder|desertrealm|deweb|digger|diibot|directhit|dnabot|download_express|dragonbot|dwcp|e-collector|ebiness|eit|elfinbot|emacs|esculapio|esther|evliyacelebi|nzexplorer|fdse|felix|ferret|fetchrover|fido|finnish|fireball|fish|fouineur|francoroute|funnelweb|gama|gazz|gcreep|getbot|geturl|golem|googlebot|grapnel|griffon|gromit|gulliver|gulperbot|hambot|harvest|havindex|hi|hometown|wired-digital|htdig|htmlgobble|hyperdecontextualizer|iajabot|ibm|iconoclast|Ilse|imagelock|incywincy|informant|infoseek|infoseeksidewinder|inspectorwww|intelliagent|irobot|iron33|israelisearch|javabee|JBot|askjeeves|jobo|jobot|joebot|jubii|jumpstation|kapsi|katipo|kdd|kilroy|ko_yappo_robot|larbin|legs|linkidator|linkscan|linkwalker|lockon|lycos|magpie|marvin|mattie|mediafox|merzscope|meshexplorer|mnogosearch|moget|monster|motor|msnbot|muncher|muninn|muscatferret|mwdsearch|myweb|netcarta|netmechanic|netscoop|newscan-online|nhse|nomad|northstar|objectssearch|occam|octopus|openfind|orb_search|packrat|pageboy|parasite|patric|pegasus|perignator|phantom|phpdig|piltdownman|pimptrain|pioneer|pitkow|pka|plumtreewebaccessor|poppi|portalb|psbot|Puu|python|raven|rbse|resumerobot|rhcs|rixbot|roadrunner|robbie|robi|robofox|robozilla|roverbot|rules|safetynetrobot|scooter|search_au|search-info|searchprocess|senrigan|sgscout|shaggy|shaihulud|sift|simbot|site-valet|sitetech|skymob|slurp|snooper|solbot|speedy|spry|ssearcher|suke|suntek|sven|sygol|tach_bw|tarantula|tcl|techbot|templeton|titin|titan|tkwww|ucsd|udmsearch|uptimebot|urlck|us|valkyrie|victoria|visionsearch|voidbot|voyager|vwbot|w3index|w3m2|wallpaper|wanderer|webbandit|webcatcher|webcopy|webfetcher|webfoot|webinator|weblayers|weblinker|webmirror|webmoose|webquest|webreader|webreaper|webs|websnarf|webvac|webwalk|webwalker|webwatch|wget|whatuseek|whowhere|wlm|wmir|wolp|wombat|worm|wwwc|wz101|xget|Nederland.zoek|nutch|yandex|ahrefs|semrush|dotbot|trovitbot\";\n\n // Quick check if robot\n $isRobot = (stripos($robots, $agent) === FALSE) ? 0 : 1;\n\n // If quick check fails to match try a slower check.\n if ($isRobot === 0) {\n\n $robotarray = explode('|', $robots);\n\n foreach ($robotarray as $key => $value) {\n $isRobot = (stripos($user_agent, $value) === FALSE) ? 0 : 1;\n if ($isRobot === 1) {\n return $isRobot;\n }\n }\n }\n return $isRobot;\n }", "title": "" }, { "docid": "82e94df77661034cc1b894843093744f", "score": "0.4035455", "text": "private function _is_au()\n\t{\n\t\tif ( preg_match('#\\AKDDI\\-|\\AMozilla.+KDDI\\-#u', $this->_agent) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse if ( preg_match('#UP\\.Browser|\\AVodafone#u', $this->_agent) )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "162853de115dcf621285e2eb7d999bc6", "score": "0.402731", "text": "public function can_use_wincher()\n {\n }", "title": "" }, { "docid": "b16e63f8e302d11711ff42218599a54a", "score": "0.4021212", "text": "function gibBrowser()\n{\n $browserstring = $_SERVER[\"HTTP_USER_AGENT\"];\n if(eregi(\"(msie) ([0-9]{1,2}.[0-9]{1,3})\", $_SERVER[\"HTTP_USER_AGENT\"]))\n return \"IE\";\n else \n {\n if(eregi(\"(netscape6)/(6.[0-9]{1,3})\", $_SERVER[\"HTTP_USER_AGENT\"]))\n return \"Netscape\";\n else\n return \"?\";\n }\n}", "title": "" }, { "docid": "54bbe9001413ee4b7fcef4c859a01610", "score": "0.40178418", "text": "static function isMobileBrowser(){\n // 如果监测到是指定的浏览器之一则返回true\n $regex_match=\"/(nokia|iphone|android|motorola|^mot\\-|softbank|foma|docomo|kddi|up\\.browser|up\\.link|\";\n\n $regex_match.=\"htc|dopod|blazer|netfront|helio|hosin|huawei|novarra|CoolPad|webos|techfaith|palmsource|\";\n\n $regex_match.=\"blackberry|alcatel|amoi|ktouch|nexian|samsung|^sam\\-|s[cg]h|^lge|ericsson|philips|sagem|wellcom|bunjalloo|maui|\";\n\n $regex_match.=\"symbian|smartphone|midp|wap|phone|windows ce|iemobile|^spice|^bird|^zte\\-|longcos|pantech|gionee|^sie\\-|portalmmm|\";\n\n $regex_match.=\"jig\\s browser|hiptop|^ucweb|^benq|haier|^lct|opera\\s*mobi|opera\\*mini|320x320|240x320|176x220\";\n\n $regex_match.=\")/i\";\n\n // preg_match()方法功能为匹配字符,既第二个参数所含字符是否包含第一个参数所含字符,包含则返回1既true\n return preg_match($regex_match, strtolower($_SERVER['HTTP_USER_AGENT']));\n }", "title": "" }, { "docid": "76a03b2b248d12b06585be958d310686", "score": "0.4017404", "text": "public function addsmbcredit(){\r\n \t$appid \t= PageContext::$request['appid'];\r\n \t$credit \t= PageContext::$request['credit'];\r\n \t//echo $appid.':'.$plan;\r\n \t$addCredit = Cmshelper::addCreditToApp($appid, $credit);\r\n \techo $addCredit;\r\n \t// echopre($_REQUEST);\r\n \texit();\r\n }", "title": "" }, { "docid": "a583bad317db36df24d8d70286ecc16a", "score": "0.4016843", "text": "function controller_hook($controller, $item)\n{\n\tframe_hook(\"{$controller}Controller\", $item);\n}", "title": "" }, { "docid": "292cfceb9db28171c6d451d07ad0e3ec", "score": "0.40133673", "text": "function menghidupkan_laptop(){\n }", "title": "" }, { "docid": "15f2d79ff4345f6daf7e0097ac2088f0", "score": "0.40109086", "text": "private function _getUserBcmTab()\n {\n $oLogin = CDependency::getCpLogin();\n $oDisplay = CDependency::getCpHtml();\n $oPage = CDependency::getCpPage();\n $oAddress = CDependency::getComponentByName('addressbook');\n $oRight = CDependency::getComponentByName('right');\n $bAccessPipeline = $oRight->canAccess('555-123', 'view-all', CONST_OPPORTUNITY);\n\n $sHTML = $oDisplay->getBlocStart('', array('class' => 'homepageMySpace'));\n\n $asAction = array();\n\n $sURL = $oPage->getUrl('addressbook', CONST_ACTION_LIST, CONST_AB_TYPE_COMPANY,0,array('loginpk'=>(int)$oLogin->getUserPk()));\n $asAction[] = array('label' => 'My companies', 'url' => $sURL, 'pic' => '/tmp_home_icons/company_24.png');\n\n $sURL = $oPage->getUrl('addressbook', CONST_ACTION_LIST, CONST_AB_TYPE_CONTACT,0,array('loginpk'=>(int)$oLogin->getUserPk()));\n $asAction[] = array('label' => 'My connections', 'url' => $sURL, 'pic' => '/tmp_home_icons/ct_view_24.png');\n\n $sURL = $oPage->getUrl('sharedspace', CONST_ACTION_MANAGE, CONST_SS_TYPE_DOCUMENT);\n $asAction[] = array('label' => 'My documents', 'url' => $sURL, 'pic' => '/tmp_home_icons/component.png');\n\n $sURL = $oPage->getUrl('project', CONST_ACTION_LIST, CONST_PROJECT_TYPE_TASK, 0, array(CONST_PROJECT_TASK_SORT_PARAM => 'project'));\n $asAction[] = array('label' => 'My tasks', 'url' => $sURL, 'pic' => '/tmp_home_icons/menu_task_add.png');\n\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageMySpaceLink'));\n $sHTML.= $oDisplay->getActionButtons($asAction, 1, 'My workspace...', array('width' => 250));\n $sHTML.= $oDisplay->getBlocEnd();\n\n //business opportunities\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageMySpaceLink flashyTitle'));\n\n $asAction = array();\n $sURL = $oPage->getUrl('opportunity', CONST_ACTION_LIST, CONST_OPPORTUNITY, 0);\n $asAction[] = array('label' => 'My business opportunities', 'url' => $sURL, 'pic' => '/tmp_home_icons/opportunity_24.png');\n\n if ($bAccessPipeline)\n {\n $sURL = $oPage->getUrl('opportunity', CONST_ACTION_LIST, CONST_OPPORTUNITY, 0);\n $asAction[] = array('label' => 'Company pipeline', 'url' => $sURL.'&globalstat=1', 'pic' => '/tmp_home_icons/opportunity_24.png');\n }\n\n $sURL = $oPage->getUrl('opportunity', CONST_ACTION_LIST, CONST_OPPORTUNITY, 0, array('display' => 'bbook'));\n $asAction[] = array('label' => 'Tokyo Weekender Black Book', 'url' => $sURL);\n\n $sHTML.= $oDisplay->getActionButtons($asAction, 1, 'Business stats...', array('width' => 250));\n\n $sHTML.= $oDisplay->getBlocEnd();\n\n $sHTML.= $oDisplay->getFloatHack();\n $sHTML.= $oDisplay->getBlocEnd();\n $sHTML.= $oDisplay->getFloatHack();\n\n $sHTML.= $oDisplay->getBlocStart('', array('style' => 'width: 61%; float: left;'));\n\n\n //===================================================================\n // Things that have been done on the user's data (he is follower)\n if(!empty($oAddress))\n {\n $asContactActivity = $this->getContactRecentActivity((int)$oLogin->getUserPk());\n $oPage->addCssFile($oLogin->getResourcePath().'css/login.form.css');\n\n if(!empty($asContactActivity))\n {\n $sHTML.= $oDisplay->getBlocStart('homepage_contactactivityId', array('class' => 'homepageSection'));\n\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageSectionTitlte','style' => 'color: #F97807;'));\n $sHTML.= $oDisplay->getText(' Recent activity on my connections');\n $sHTML.= $oDisplay->getBlocEnd();\n\n $asArray = array();\n\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageSectionInner', 'style' => 'min-height: 30px;'));\n $nCount = 0;\n foreach($asContactActivity as $asActivity)\n {\n $sUser = $oLogin->getUserLink((int)$asActivity['loginfk'], true);\n if(empty($asArray[$nCount]['item']))\n {\n $asContactData = $oAddress->getContactByPk((int)$asActivity['followerfk']);\n $asArray[$nCount]['item'] = $asContactData['firstname'].' '.$asContactData['lastname'];\n }\n\n $asArray[$nCount]['log_link'] = $asActivity['log_link'].'#ct_tab_eventId';\n $asArray[$nCount]['log_date'] = $asActivity['log_date'];\n\n $asArray[$nCount]['action'] = strip_tags($sUser).' -> '.$asActivity['text'];\n $nCount++;\n }\n\n $sHTML.= $this->_getDisplayUserRecent(array('user_activity' => $asArray));\n\n $sHTML.= $oDisplay->getFloatHack();\n $sHTML.= $oDisplay->getBlocEnd();\n\n\n $sHTML.= $oDisplay->getFloatHack();\n $sHTML.= $oDisplay->getBlocEnd();\n $sHTML.= $oDisplay->getFloatHack();\n }\n\n $asUserActivity = $this->_getUserRecentActivity((int)$oLogin->getUserPk(), 70, 14);\n\n //Bloc Recent activity\n if(empty($asUserActivity))\n {\n $sHTML.= $oDisplay->getBlocStart('homepage_contactactivityId', array('class' => 'homepageSection', 'style' => 'min-height: 300px;'));\n $sHTML.= $oDisplay->getText('Nothing done so far o_O');\n $sHTML.= $oDisplay->getBlocEnd();\n }\n else\n {\n //===================================================================\n $sHTML.= $oDisplay->getBlocStart('homepage_useractivityId');\n\n $sHTML.= $oDisplay->getBlocStart('homepage_activityId', array('style' => 'min-height: 450px; float: left; width:100%;'));\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageSection'));\n\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageSectionTitlte'));\n $sHTML.= $oDisplay->getText('My recent activity');\n $sHTML.= $oDisplay->getBlocEnd();\n\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageSectionInner'));\n $sHTML.= $this->_getDisplayUserRecent($asUserActivity);\n $sHTML.= $oDisplay->getBlocEnd();\n $sHTML.= $oDisplay->getBlocEnd();\n $sHTML.= $oDisplay->getBlocEnd();\n\n $sHTML.= $oDisplay->getFloatHack();\n $sHTML.= $oDisplay->getBlocEnd();\n }\n\n }\n $sHTML.= $oDisplay->getFloatHack();\n $sHTML.= $oDisplay->getBlocEnd();\n\n //------------------------------------------------------------\n //------------------------------------------------------------\n // Right blocks\n $sHTML.= $this->_getUserCalendar(true);\n\n\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageSection', 'style' => 'width: 38%; max-width: 450px; float:right;'));\n $sHTML.= $oDisplay->getBlocStart('', array('class' => 'homepageSectionTitlte'));\n $sHTML.= $oDisplay->getText('My recent opportunities');\n $sHTML.= $oDisplay->getBlocEnd();\n $sHTML.= $this->_getOpportunityStats(true, false, $oLogin->getUserPk());\n $sHTML.= $oDisplay->getBlocEnd();\n\n $sHTML.= $this->_getUserStats(true);\n\n $sHTML.= $oDisplay->getFloatHack();\n\n return $sHTML;\n }", "title": "" }, { "docid": "8e55f82ce39910fe877820c67b713f8f", "score": "0.40078777", "text": "function thim_use_bbpress() {\n\tif ( function_exists( 'is_bbpress' ) ) {\n\t\treturn is_bbpress();\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "dceb4a9166a66a7d01d811d825acdf22", "score": "0.40063486", "text": "function tribe_neuter_qr () {\n\tif ( class_exists( 'Tribe__Tickets_Plus__Main' ) ) {\n\t\t$qr_class = Tribe__Tickets_Plus__Main::instance()->qr();\n\t\tremove_action( 'tribe_tickets_ticket_email_ticket_bottom', array( $qr_class, 'inject_qr' ) );\n\t}\n}", "title": "" }, { "docid": "e1db9a877b60aed89ab48fbfe10ebb28", "score": "0.40051326", "text": "function register_block_core_search() {}", "title": "" }, { "docid": "f429b44a255f63e7aa96dfc9efce922b", "score": "0.39974985", "text": "function ExactBrowserName(){\n $ExactBrowserNameUA=$_SERVER['HTTP_USER_AGENT'];\n // echo $ExactBrowserNameUA;\n\n if (strpos(strtolower($ExactBrowserNameUA), \"safari/\") and strpos(strtolower($ExactBrowserNameUA), \"opr/\")) {\n // OPERA\n $ExactBrowserNameBR=\"Opera\";\n } elseIf (strpos(strtolower($ExactBrowserNameUA), \"safari/\") and strpos(strtolower($ExactBrowserNameUA), \"chrome/\")) {\n // CHROME\n $ExactBrowserNameBR=\"Chrome\";\n } elseIf (strpos(strtolower($ExactBrowserNameUA), \"msie\")) {\n // INTERNET EXPLORER\n $ExactBrowserNameBR=\"Internet Explorer\";\n } elseIf (strpos(strtolower($ExactBrowserNameUA), \"firefox/\")) {\n // FIREFOX\n $ExactBrowserNameBR=\"Firefox\";\n } elseIf (strpos(strtolower($ExactBrowserNameUA), \"safari/\") and strpos(strtolower($ExactBrowserNameUA), \"opr/\")==false and strpos(strtolower($ExactBrowserNameUA), \"chrome/\")==false) {\n // SAFARI\n $ExactBrowserNameBR=\"Safari\";\n } else {\n // OUT OF DATA\n $ExactBrowserNameBR=\"OUT OF DATA\";\n };\n\n return $ExactBrowserNameBR;\n }", "title": "" }, { "docid": "41cd106cf9892c4b4d0d744c7c74c357", "score": "0.39910498", "text": "private function block_empty_user_agents(){\n if(isset($_SERVER['HTTP_USER_AGENT']) && strlen(trim($_SERVER['HTTP_USER_AGENT'])) == 0){\n header('HTTP/1.0 403 Forbidden');\n header(\"Content-type:text/plain; charset=utf-8\");\n exit;\n }\n }", "title": "" }, { "docid": "de18c3720659b971734b607ade7b835b", "score": "0.39897865", "text": "public function run_detect()\n {\n }", "title": "" }, { "docid": "4db8ad201e98847125c96efc639cfe34", "score": "0.39891705", "text": "public function isMobile()\r\n {\r\n $s = $this->server;\r\n if (\r\n isset($s['HTTP_ACCEPT']) &&\r\n (strpos($s['HTTP_ACCEPT'], 'application/x-obml2d') !== false || // Opera Mini; @reference: http://dev.opera.com/articles/view/opera-binary-markup-language/\r\n strpos($s['HTTP_ACCEPT'], 'application/vnd.rim.html') !== false || // BlackBerry devices.\r\n strpos($s['HTTP_ACCEPT'], 'text/vnd.wap.wml') !== false ||\r\n strpos($s['HTTP_ACCEPT'], 'application/vnd.wap.xhtml+xml') !== false) ||\r\n isset($s['HTTP_X_WAP_PROFILE']) ||\r\n isset($s['HTTP_X_WAP_CLIENTID']) ||\r\n isset($s['HTTP_WAP_CONNECTION']) ||\r\n isset($s['HTTP_PROFILE']) ||\r\n isset($s['HTTP_X_OPERAMINI_PHONE_UA']) || // Reported by Nokia devices (eg. C3)\r\n isset($s['HTTP_X_NOKIA_IPADDRESS']) ||\r\n isset($s['HTTP_X_NOKIA_GATEWAY_ID']) ||\r\n isset($s['HTTP_X_ORANGE_ID']) ||\r\n isset($s['HTTP_X_VODAFONE_3GPDPCONTEXT']) ||\r\n isset($s['HTTP_X_HUAWEI_USERID']) ||\r\n isset($s['HTTP_UA_OS']) || // Reported by Windows Smartphones.\r\n isset($s['HTTP_X_MOBILE_GATEWAY']) || // Reported by Verizon, Vodafone proxy system.\r\n isset($s['HTTP_X_ATT_DEVICEID']) || // Seend this on HTC Sensation. @ref: SensationXE_Beats_Z715e\r\n //HTTP_X_NETWORK_TYPE = WIFI\r\n ( isset($s['HTTP_UA_CPU']) &&\r\n $s['HTTP_UA_CPU'] == 'ARM' // Seen this on a HTC.\r\n )\r\n ) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "c7504564415c1e6e9fd0fe440bb3fa11", "score": "0.3984448", "text": "public function get_browser(){\n\t\t// Android\n\t\tif(preg_match('/android/i', $this->ua)){\n\t\t\t$this->browser = 'android';\n\t\t\tif(preg_match('/version\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t\t$this->engine = 'webkit';\n\t\t\t$this->engine_version = $this->get_webkit_version();\n\t\t}\n\t\t// Chrome\n\t\telseif(preg_match('/chrome/i', $this->ua) && !preg_match('/chromeframe/i', $this->ua)){\n\t\t\t$this->browser = 'chrome';\n\t\t\tif(preg_match('/chrome\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t\t$this->engine = 'webkit';\n\t\t\t$this->engine_version = $this->get_webkit_version();\n\t\t}\n\t\t// Epiphany\n\t\telseif(preg_match('/epiphany/i', $this->ua)){\n\t\t\t$this->browser = 'epiphany';\n\t\t\tif(preg_match('/epiphany\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t\tif(preg_match('/webkit/i', $this->ua)){\n\t\t\t\t$this->engine = 'webkit';\n\t\t\t\t$this->engine_version = $this->get_webkit_version();\n\t\t\t}\n\t\t\telseif(preg_match('/gecko/i', $this->ua)){\n\t\t\t\t$this->engine = 'gecko';\n\t\t\t\tif(preg_match('/rv:([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t\t$this->engine_version = $this->version_to_float($matches[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// iCab\n\t\telseif(preg_match('/icab/i', $this->ua)){\n\t\t\t$this->browser = 'icab';\n\t\t\t$this->engine = 'icab';\n\t\t\tif(preg_match('/icab\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t\t$this->engine_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t\telseif(preg_match('/iCab ([0-9\\.]+)/i',$this->ua, $matches) > 0){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t\t$this->engine_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t}\n\t\t// IE\n\t\telseif(preg_match('/msie/i', $this->ua)){\n\t\t\t$this->browser = 'ie';\n\t\t\t$this->engine = 'ie';\n\t\t\tif(preg_match('/msie ([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t\t$this->engine_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t}\n\t\t// Konqueror\n\t\telseif(preg_match('/konqueror/i', $this->ua)){\n\t\t\t$this->browser = 'konqueror';\n\t\t\t$this->engine = 'khtml';\n\t\t\tif(preg_match('/konqueror\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t\tif(preg_match('/khtml\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->engine_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t}\n\t\t// Kindle\n\t\telseif(preg_match('/kindle/i', $this->ua)){\n\t\t\t$this->browser = 'kindle';\n\t\t\tif(preg_match('/kindle\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t}\n\t\t// Midori\n\t\telseif(preg_match('/midori/i', $this->ua)){\n\t\t\t$this->browser = 'midori';\n\t\t\tif(preg_match('/midori\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t\tif(preg_match('/webkit/i', $this->ua)){\n\t\t\t\t$this->engine = 'webkit';\n\t\t\t\t$this->engine_version = $this->get_webkit_version();\n\t\t\t}\n\t\t\telseif(preg_match('/gecko/i', $this->ua)){\n\t\t\t\t$this->engine = 'gecko';\n\t\t\t\tif(preg_match('/rv:([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t\t$this->engine_version = $this->version_to_float($matches[1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// NetFront\n\t\telseif(preg_match('/netfront/i', $this->ua)){\n\t\t\t$this->browser = 'netfront';\n\t\t\tif(preg_match('/netfront\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t}\n\t\t// Opera\n\t\telseif(preg_match('/opera/i', $this->ua)){\n\t\t\t$this->engine = 'opera';\n\t\t\t$this->engine_version = $this->get_opera_version();\n\t\t\tif(preg_match('/opera mini\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->platform_type = 'mobile';\n\t\t\t\t$this->browser = 'opera mini';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->browser = 'opera';\n\t\t\t}\n\t\t\t$this->browser_version = $this->get_opera_version();\n\t\t}\n\t\t// Safari\n\t\telseif(preg_match('/safari/i', $this->ua)){\n\t\t\t$this->browser = 'safari';\n\t\t\tif(preg_match('/version\\/([0-9\\.]+)/i', $this->ua, $matches)){\n\t\t\t\t$this->browser_version = $this->version_to_float($matches[1]);\n\t\t\t}\n\t\t\t$this->engine = 'webkit';\n\t\t\t$this->engine_version = $this->get_webkit_version();\n\t\t}\n\t\t// Firefox\n\t\telseif(preg_match('/(firefox|minefield|namoroka)/i', $this->ua, $name)){\n\t\t\t$this->browser = 'firefox';\n\t\t\t$this->browser_version = $this->get_firefox_version($name[0]);\n\t\t\t$this->engine = 'gecko';\n\t\t\t$this->engine_version = $this->get_gecko_version();\n\t\t}\n\t\t// Firefox variations\n\t\telseif(preg_match('/(songbird|flock|seamonkey)/i', $this->ua)){\n\t\t\t$this->browser = 'firefox';\n\t\t\t$this->browser_version = $this->get_firefox_version(null);\n\t\t\t$this->engine = 'gecko';\n\t\t\t$this->engine_version = $this->get_gecko_version();\n\t\t}\n\t}", "title": "" } ]
b635910a26740ef5d8e689b61d3b1a0b
Retrieves a list of models based on the current search/filter conditions.
[ { "docid": "12ea5d1521ff696f37de0b53aab50ce2", "score": "0.0", "text": "public function search()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\r\n\t\t$criteria=new CDbCriteria;\r\n\r\n\t\t$criteria->compare('practiceID',$this->practiceID,true);\r\n\t\t$criteria->compare('packageID',$this->packageID,true);\r\n\t\t$criteria->compare('packageName',$this->packageName,true);\r\n\t\t$criteria->compare('days',$this->days);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria'=>$criteria,\r\n\t\t));\r\n\t}", "title": "" } ]
[ { "docid": "854446959721d496bcda8de1157d687a", "score": "0.6568504", "text": "public function getListSearchBilling($models);", "title": "" }, { "docid": "ca5a4325ac24a3e4ed5686342cc42f34", "score": "0.6558039", "text": "function modelslist()\n\t{\n\t\t$query = $this->db->get_where('models');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "c771e7387a9005fe386a0c05a837a1e4", "score": "0.6545254", "text": "protected function getSearchResults()\n {\n $searchResults = new Search();\n\n // Get all modules in autorized modules\n $modules = $this->getAutorizedModules();\n\n foreach ($modules as $module) {\n $modelClass = $module->model_class;\n\n if (method_exists($modelClass, 'getSearchResult') && property_exists($modelClass, 'searchableColumns')) {\n $searchResults->registerModel($modelClass, (array) (new $modelClass)->searchableColumns);\n }\n }\n\n $searchQuery = request('q');\n\n return $searchResults\n ->search($searchQuery)\n ->take(config('uccello.max_results.search', 50));\n }", "title": "" }, { "docid": "8d36019767b41aaf547d38c8bd1eaff0", "score": "0.64592195", "text": "public function car_models_all(){\n\t\treturn $this->car->car_models($this->data,true);\n\t}", "title": "" }, { "docid": "c7b8a60089b80e6f3925ce8e38348875", "score": "0.634803", "text": "public function buildModelCriteria()\n {\n $search = MeedleSeoQuery::create();\n $id = $this->getId();\n if ($id) {\n $search->filterById($id, Criteria::IN);\n }\n $objectId = $this->getOi();\n if ($objectId !== null) {\n $search->filterByViewId($objectId, Criteria::IN);\n }\n $objectType = $this->getOt();\n if ($objectType) {\n $search->filterByViewName($objectType, Criteria::IN);\n }\n $locale = $this->getLocale();\n if ($locale) {\n $search->filterByLocale($locale, Criteria::IN);\n }\n return $search;\n }", "title": "" }, { "docid": "1450dc9a0093a4a421d4000f2417d423", "score": "0.63153094", "text": "public function filter()\n {\n if ( !($search = $this->search) || !is_array($search) || count($search) == 0 ){\n return;\n }\n\n $this->query->where(function($query) use ($search) {\n foreach ($search as $item) {\n $this->applyModelFilter($query, $item);\n\n $deepSearchModels = ($this->model->getProperty('search') ?: [])['deep'] ?? [];\n\n //If specific column search is not defined, we can search in subchild models\n if ( !($item['column'] ?? null) ) {\n foreach ($deepSearchModels as $deepItem) {\n $classname = is_array($deepItem) ? $deepItem['model'] : $deepItem;\n\n $relation = class_basename($classname);\n $relation = is_array($deepItem) ? ($deepItem['relation'] ?? $relation) : $relation;\n\n $model = new $classname;\n\n $query->orWhereHas($relation, function($query) use ($item) {\n $this->applyModelFilter($query, $item);\n });\n }\n }\n }\n });\n }", "title": "" }, { "docid": "0606072a7323f4d3efed6acef1cc349f", "score": "0.6301443", "text": "public function AllObjects()\n {\n if (!$this->AllObjects && $this->hasValidModelClass()) {\n $this->AllObjects = DataObject::get($this->ModelClass);\n if (($q = $this->SearchQuery())) {\n $s = singleton($this->ModelClass);\n if ($s->hasDatabaseField('Title')) {\n $this->AllObjects = $this->AllObjects->filterAny(['Title:partialMatch' => $q]);\n }\n if ($s->hasDatabaseField('Description')) {\n $this->AllObjects = $this->AllObjects->filterAny(['Description:partialMatch' => $q]);\n }\n if ($s->hasDatabaseField('Content')) {\n $this->AllObjects = $this->AllObjects->filterAny(['Content:partialMatch' => $q]);\n }\n }\n $this->extend('AllObjectsFilter', $this->AllObjects);\n $this->AllObjects = $this->AllObjects->filterByCallback(function($a) {\n return $a->canView();\n });\n }\n return $this->AllObjects;\n }", "title": "" }, { "docid": "0339ce860685ef6d8985cb64366ed0b0", "score": "0.61755717", "text": "public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n\n $criteria->compare('name', $this->name, true);\n\n $criteria->compare('path', $this->path, true);\n\n $criteria->compare('last_updated_at', $this->last_updated_at, true);\n\n return new CActiveDataProvider('models', array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "66b43d70963e9335b07c268f601c2cbd", "score": "0.6152921", "text": "public function getModels()\r\r\n {\r\r\n foreach (array_keys($this->models) as $id) {\r\r\n $this->getModel($id);\r\r\n }\r\r\n\r\r\n return $this->models;\r\r\n }", "title": "" }, { "docid": "a14103b6f70c1b39e29a8712bf5add63", "score": "0.61409384", "text": "public function get()\n {\n $this->newQuery()->eagerLoad()->setClauses()->setScopes();\n\n $models = $this->query->get();\n\n $this->unsetClauses();\n\n return $models;\n }", "title": "" }, { "docid": "a14103b6f70c1b39e29a8712bf5add63", "score": "0.61409384", "text": "public function get()\n {\n $this->newQuery()->eagerLoad()->setClauses()->setScopes();\n\n $models = $this->query->get();\n\n $this->unsetClauses();\n\n return $models;\n }", "title": "" }, { "docid": "391e2cab91eadb8b23da5342408a1d62", "score": "0.6134373", "text": "function getAllModels(){\n\t\t\t$query = \"select * from \".PREFIX.\"model_master where active='1'\";\n\t\t\t$sql = $this->query($query);\n\t\t\treturn $sql;\n\t\t}", "title": "" }, { "docid": "c73aebfb020f54cf2cdc44d8141a541c", "score": "0.6130638", "text": "public function getAll()\n {\n $criterias = criteria::latest()->get();\n return $criterias;\n }", "title": "" }, { "docid": "772bc83448dafc165b98516269c6a778", "score": "0.6118169", "text": "public function getModels() {\n try {\n $stmt = $this->db->prepare('SELECT * FROM model');\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_UNIQUE);\n } catch(PDOException $e) {\n print new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "246e52699c8479f70531bb7c9c442489", "score": "0.61156696", "text": "public function search()\n {\n switch (Input::get('searchBy')) {\n case 'title': \n return $this->searchByTitle();\n case 'group':\n return $this->searchByGroup();\n case 'tag':\n return $this->searchByTags();\n case 'user': \n return $this->searchByUser();\n }\n\n return $this->getReports();\n\n }", "title": "" }, { "docid": "89f236ed14c8a492135595b604f6cff8", "score": "0.6111852", "text": "public function getList()\n {\n if ($this->modelClass == \"Order\") {\n $context = $this->getSearchContext();\n $params = $this->request->requestVar('q');\n //TODO update params DateTo, to include the day, ie 23:59:59\n $list = $context->getResults($params)\n ->exclude(\"Status\", Order::config()->hidden_status); //exclude hidden statuses\n\n $this->extend('updateList', $list);\n return $list;\n } else {\n return parent::getList();\n }\n }", "title": "" }, { "docid": "97069352fc2c348c9630e27e2cd9a03f", "score": "0.6104021", "text": "public function all()\n {\n $this->newQuery()->eagerLoad();\n\n $models = $this->query->get();\n\n $this->unsetClauses();\n\n return $models;\n }", "title": "" }, { "docid": "97069352fc2c348c9630e27e2cd9a03f", "score": "0.6104021", "text": "public function all()\n {\n $this->newQuery()->eagerLoad();\n\n $models = $this->query->get();\n\n $this->unsetClauses();\n\n return $models;\n }", "title": "" }, { "docid": "d95bafde2ea98b59618c35eb761c1cb4", "score": "0.6061758", "text": "public function all()\n {\n $this->applyCriteria();\n return $this->model->get();\n }", "title": "" }, { "docid": "59f799cdda6707c115798042610671e3", "score": "0.6054286", "text": "public function prepareFindAllWhere ()\n {\n $fieldList = '';\n\n // Get the name of the Model\n $fields = get_class_vars(get_class($this));\n\n foreach ($fields as $k => $v) {\n if ($k == 'Constraints' || $k == 'QueryType' || $k == 'Field' || $k == 'Operator' || $k == 'Value') continue;\n $fieldList .= strtolower($k) . \", \";\n }\n $fieldList = rtrim($fieldList, \", \");\n\n // Run a select query with given paramters\n return $this->abstractSelect($fieldList, $this->get_model_name($this), $this->Field, $this->Operator);\n }", "title": "" }, { "docid": "55b11257a26ab71a8b24df52182a8f20", "score": "0.60476846", "text": "public function filterModels(array $options)\n {\n $query = $this->newQuery();\n\n return $this->applyFilters($query, $options);\n }", "title": "" }, { "docid": "15dd6676ad54addcfccaba54841ec1b6", "score": "0.60387945", "text": "public function getModels()\n {\n }", "title": "" }, { "docid": "e41249ce341cb131c5e03dcd594d5a88", "score": "0.6003797", "text": "public static function getAll(){\n return Model::factory(__CLASS__)\n ->order_by_asc('date')\n ->find_many();\n }", "title": "" }, { "docid": "e16d052e50092efe1cad75d52ad1ff6a", "score": "0.59997284", "text": "public function getAll($filter)\n {\n return $this->model\n ->get();\n }", "title": "" }, { "docid": "6514b956ba2abaa64b47a683a832a9d0", "score": "0.59707975", "text": "public function getAll()\n\t{\n\t\treturn $this->modelClass::all();\n\t}", "title": "" }, { "docid": "c7b42a01407159fb6a75e427c8de26be", "score": "0.5936055", "text": "public function models(): array;", "title": "" }, { "docid": "25aba88422080fb95cdbcbe99660193e", "score": "0.5907982", "text": "public function index()\n {\n $criterias = criteria::latest()->paginate(5);\n return $criterias;\n }", "title": "" }, { "docid": "e97c0b83b124991bfab8efb772189552", "score": "0.58955544", "text": "public function car_models(){\n\t\treturn $this->car->car_models($this->data);\n\t}", "title": "" }, { "docid": "8dd27bcacbecd8935454a06ed6e61e66", "score": "0.5893352", "text": "public function filter($conditions) {\n\n $conditions = array_merge($this->conditions, $conditions);\n return $qs = new \\Jenga\\Db\\Engines\\Mongo\\Query\\QuerySet(new \\Jenga\\Db\\Engines\\Mongo\\Query\\Query(null, $conditions, $this->select_related_models));\n }", "title": "" }, { "docid": "b38ab7eff19c233a6caaf0b401adfb06", "score": "0.5884165", "text": "public function filter(Collection $models);", "title": "" }, { "docid": "b77c58c8fa99c2df11d3f9d2803ee405", "score": "0.5880632", "text": "public function getModels(): array\n {\n $this->prepare();\n\n return $this->models;\n }", "title": "" }, { "docid": "57b761e4b4ab2cf7b5897794fcf8abab", "score": "0.5875211", "text": "public static function getAll($model_name, $params = array()) {\n $default_condition = array(\"condition\" => \"status = 1 AND deleted = 0\");\n \n $obj_model = new $model_name;\n if(count($params)){\n if(!empty($params[\"condition\"])){\n $params[\"condition\"] = $params[\"condition\"] . \" AND \" . $default_condition[\"condition\"];\n }\n else{\n $params = array_merge($params, $default_condition);\n }\n return $obj_model->findAll($params);\n } else {\n return $obj_model->findAll($default_condition);\n }\n\n }", "title": "" }, { "docid": "1efd3d670060dd129ce465c4670ec4be", "score": "0.58605635", "text": "protected function prepareModels()\n {\n $pagination = $this->getPagination();\n\n if ($pagination !== false) {\n $pagination->totalCount = $this->getTotalCount();\n $limit = $pagination->getLimit();\n $page = $pagination->getPage() + 1;\n } else {\n $limit = 250;\n $page = 1;\n }\n\n if ($this->entity == 'shop') {\n return [\n $this->get($this->entity),\n ];\n }\n\n if ($this->entity == 'scripts') {\n return $this->get('shop/scripts');\n }\n\n $resp = $this->get(\n $this->entity,\n [\n 'limit' => $limit,\n 'page' => $page,\n ]\n );\n\n if ($this->expand) {\n $expanded = [];\n foreach ($resp as $item) {\n $expResp = $this->get(\"$this->entity/{$item['id']}\");\n $expanded[] = reset($expResp);\n }\n $resp = $expanded;\n }\n return $resp;\n }", "title": "" }, { "docid": "be59a8a6393f35525dec205ff471694e", "score": "0.58539295", "text": "public function newQuery(){\n $request = request();\n\n $modelInstance = $this->newModel();\n $query = (static::$model)::query();\n $query->with($this->with);\n\n foreach($this->getFields('showOnIndex') as $field){\n $table = $field->table ?? $modelInstance->getTable();\n $query->addSelect($table.'.'.$field->attribute());\n }\n\n if ($request->has('sort_'.static::name())){\n $direction = $request->get('sort_'.static::name().'_direction', 'asc');\n $query->orderBy($request->get('sort_'.static::name()), $direction);\n }\n\n if ($request->has('search_'.static::name())){\n $query->where(function($q) use ($modelInstance, $request, $query){\n $fields = $this->getFields('searchable');\n $value = $request->get('search_' . static::name());\n\n foreach($fields as $field){\n if ($field instanceof BelongsTo){\n $model = $field->getRelatedModelInstance();\n\n $query->leftJoin($model->getTable(), $field->attribute(), '=', $model->getTable().'.'.$model->getKeyName());\n $q->orWhere($model->getTable().'.'.$field->getForeignTitle(), 'like', '%'.$value.'%');\n }else {\n $q->orWhere($modelInstance->getTable().'.'.$field->attribute(), 'like', '%' . $value . '%');\n }\n }\n });\n }\n\n $this->getFilters()->where('value', '!=', null)->each(function(Filter $filter) use ($query){\n $filter->apply($query, $filter->value);\n });\n\n $this->applyAdvancedSearchInQuery($query);\n $this->buildIndexQuery($query);\n\n return $query;\n }", "title": "" }, { "docid": "4c05c2bc3b1af28775e7aee0b84c242c", "score": "0.5826668", "text": "public static function findAll()\n {\n // Appel à la connexion SQL\n $pdo = Database::getPDO();\n // La requête SQL\n // A noter que les AS sont optionnels\n $query = 'SELECT id, name, page_order AS pageOrder, created_at AS createdAt, updated_at AS updatedAt \n FROM list ORDER BY pageOrder ASC';\n // On exécute la requête\n $pdoStatement = $pdo->query($query);\n // On récupère les données sous forme de liste (tableau) d'objets ListModel\n $listsModels = $pdoStatement->fetchAll(PDO::FETCH_CLASS, 'oKanban\\Models\\ListModel');\n\n return $listsModels;\n }", "title": "" }, { "docid": "3429b7faaf6bc6c53dcd56be4c6d69cb", "score": "0.58241624", "text": "abstract function filter(Model $model);", "title": "" }, { "docid": "d99635d1fcc3a8de340d14dc709f2a9e", "score": "0.5812309", "text": "public static function getProductModels()\n {\n return Cart::content()->map->model->filter();\n }", "title": "" }, { "docid": "b37db4f7cae0cd77353ac0bb6ceb579a", "score": "0.5810163", "text": "public static function getModels($className, $filter = [], $options = [])\n {\n $options = ArrayHelper::merge([\n 'limit' => 20,\n 'offset' => null,\n 'orderBy' => [],\n 'checkPermissions' => true\n ], $options);\n\n $limit = $options['limit'];\n $offset = $options['offset'];\n $orderBy = $options['orderBy'];\n $checkPermissions = $options['checkPermissions'];\n\n $model = static::createModel($className);\n $query = $model->find($checkPermissions);\n\n if ($filter)\n $query->where = $filter;\n\n if ($limit)\n $query->limit = $limit;\n\n if ($offset)\n $query->offset = $offset;\n\n if ($orderBy)\n $query->orderBy = $orderBy;\n\n return $query->all();\n }", "title": "" }, { "docid": "1ecdd959b240d912f087e391964ad441", "score": "0.5802227", "text": "public function getAll()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "c64f166beb1dc939b03c724272807171", "score": "0.5788216", "text": "public function search()\r\n\t{\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "4b2f8692717ab0f75a011c5913776722", "score": "0.57855284", "text": "public function getModels($request, $response, $args)\n {\n $validation = $this->validator->validate($request, [\n 'selected_model' => v::notEmpty(),\n 'search' => v::notEmpty(),\n ]);\n if ($validation->failed()) {\n return $response->withJson(['return' => 'Error', 'msg' => 'There is aan error (validation error)']);\n }\n\n $model = $request->getParam('selected_model');\n $search = $request->getParam('search');\n if ($model == 'product') {\n $models = Product::getAllProductsIds($search);\n } elseif ($model == 'order') {\n $models = Order::getAllOrdersIds($search);\n }\n\n return $response->withJson(['return' => 'Success', 'model' => $models]);\n }", "title": "" }, { "docid": "9d2085ee47e48f943edb2a538a7c41d7", "score": "0.57825816", "text": "public function query()\n {\n $model = app($this->model);\n $query = $model->query();\n $selectedIds = collect($this->request()->get('selected_ids'))->filter();\n\n if ($selectedIds->isNotEmpty()) {\n $obscure = property_exists($model, 'obscure') && is_array($model->obscure) ? $model->obscure : config('cortex.foundation.obscure');\n\n if (in_array(app('request.accessarea'), $obscure['areas'])) {\n $selectedIds = $selectedIds->map(function ($value) {\n return optional(Hashids::decode($value))[0];\n });\n\n $query->whereIn($model->getKeyName(), $selectedIds);\n } else {\n $query->whereIn($model->getRouteKeyName(), $selectedIds);\n }\n }\n\n return $this->scope()->applyScopes($query);\n }", "title": "" }, { "docid": "a0f9ca57ab7f1a43209181dea82c6087", "score": "0.57689524", "text": "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // data\n $data = $dataProvider->getData();\n\n // related data\n $relatedData = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersData = array();\n if (isset($_GET[$this->_model])) {\n $filtersData[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersData[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersData)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $data, $relatedData, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "title": "" }, { "docid": "87c7a20c7d8066c137bd9b25ee942676", "score": "0.576147", "text": "public function getModels()\n {\n return $this->models;\n }", "title": "" }, { "docid": "87c7a20c7d8066c137bd9b25ee942676", "score": "0.576147", "text": "public function getModels()\n {\n return $this->models;\n }", "title": "" }, { "docid": "bb35830b9d1a72f88148896c67d9c3b8", "score": "0.57531214", "text": "public function searchObjects(Request $request)\n {\n return DetectableObject::where('name', 'LIKE', '%' . $request->q . '%')->get();\n }", "title": "" }, { "docid": "a721c2e58b40923c00663ac4843a251c", "score": "0.5753025", "text": "public function filter(){\n $builder = $this->builderRequest($this->model());\n\n //return collection\n return $this->paginateResponse($builder);\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.57522315", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "494ed28d0542aeefb8c405fbd491663e", "score": "0.5750102", "text": "public function all()\r\n {\r\n return $this->model->get();\r\n }", "title": "" }, { "docid": "e58b2241f33aef877594ffa3e1f8d45f", "score": "0.57381654", "text": "public function all()\n {\n return $this->requestUtil->get($this->modelUrl);\n }", "title": "" }, { "docid": "56a4ae32071204770419535a4e2df42e", "score": "0.57372075", "text": "protected function queryList()\n {\n // Sanity check\n $dataClass = $this->dataRecord->getDataClass();\n if (!$dataClass) {\n return ArrayList::create();\n }\n\n // Setup\n $singleton = $this->dataRecord->getDataSingleton();\n\n // Create list\n $list = $singleton->get();\n\n // Setup filters\n $filters = [];\n foreach ($singleton->config()->get('searchable_fields') as $field) {\n $value = $this->getRequest()->getVar(str_replace('.', '_', $field ?? ''));\n if (!$value) {\n continue;\n }\n\n // if the searchable field is a relationship, it must be an exact match (ID match) if not partial is fine.\n $matchType = $this->instanceHasRelationship($singleton, $field) ? \"ExactMatch\" : \"PartialMatch\";\n $filters[$field . ':' . $matchType] = $value;\n }\n $list = $list->filter($filters);\n\n // Sort\n $sort = $this->getRequest()->getVar('Sort');\n if ($sort) {\n $dir = 'ASC';\n if ($this->getRequest()->getVar('Dir')) {\n $dir = $this->getRequest()->getVar('Dir');\n }\n if ($this->canSortBy($sort)) {\n $list = $list->sort($sort, $dir);\n }\n }\n\n return $list;\n }", "title": "" }, { "docid": "925c2919579f038a73e5cc3cbbaae992", "score": "0.5730063", "text": "public function model()\n {\n return Models::all()->lists('model','model');\n }", "title": "" }, { "docid": "0c6c57b4fd08e46a7b4520e66be4cb93", "score": "0.5727566", "text": "public function matching() {\n $filters = null;\n foreach ($this->getValidFilterableFields() as $field) {\n if (Input::has($field)) {\n $filters ['findBy'.ucfirst($field)] = Input::get($field);\n }\n }\n return $this->getService()->matching($filters);\n }", "title": "" }, { "docid": "235e707fe66995ddf1c8f67f68d37d78", "score": "0.5727164", "text": "public function buildModelCriteria()\n {\n $search = CategoryQuery::create();\n\n\n if (null !== $category_id = $this->getCategoryId()) {\n $search->filterById();\n }\n\n if (null !== $category_title = $this->getCategoryTitle()) {\n $title = CategoryDocumentI18nQuery::create();\n $title->filterByTitle();\n }\n\n return $search;\n }", "title": "" }, { "docid": "5df998ddeaf48e8df301f4822153c7a3", "score": "0.57032484", "text": "public function customSearch()\n {\n return Laratables::recordsOf(UserCustomSearch::class);\n }", "title": "" }, { "docid": "ad5004f8c88e4adec34f28c951359829", "score": "0.5696941", "text": "public function all()\n {\n $qResult = $this->prepareExecute(\"SELECT * FROM {$this->table()} AS t\");\n $result = [];\n\n foreach ($qResult as $item) {\n $result[] = $this->newModel($item);\n }\n\n return $result;\n }", "title": "" }, { "docid": "4926bac3b6ddeecb6d84fdb3611cf736", "score": "0.5696938", "text": "public function buildModelCriteria()\n {\n $search = AdvancedDescriptionObjectQuery::create();\n\t\t\n $id = $this->getId();\n if ($id) {\n $search->filterById($id, Criteria::IN);\n }\n $objtype = $this->getObjtype();\n if ($objtype) {\n $search->filterByObjtype($objtype, Criteria::IN);\n }\n $objid = $this->getObjid();\n if ($objid) {\n $search->filterByObjid($objid, Criteria::IN);\n }\n\n return $search;\n }", "title": "" }, { "docid": "183af4998bb20b453eb792918516abd6", "score": "0.5695662", "text": "private function fetch_models( ){\n\n $model_config = (new Model_Configuration())->model_for($this->model_name);\n\n $id_field = $model_config['key_column'];\n\n $table_name = $model_config['table_name'];\n\n $join_clause = $this->join_clause( $this->duplicate_fields);\n\n $offset = $this->offset ?\n\n $this->offset :\n $this->page_number * $this->chunk_size - $this->chunk_size;\n\n\n $SQL = \"SELECT DISTINCT a.* FROM `$table_name` a INNER JOIN `$table_name` b ON $join_clause WHERE a.$id_field <> b.$id_field LIMIT $this->chunk_size OFFSET $offset\";\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": Fetch SQL is $SQL\");\n\n if ( $db_result = (new Database())->query( $SQL ) ){\n\n // Fetch rows\n while ( $row = (new Fetch_Associative_Values(new Query_Result($db_result)))->as_array() )\n\n $this->array_values[] = (new Model($this->model_name))->seed_from($row);\n\n\n if ( $this->firebug ) \\FB::info(get_called_class().\": Found \" . count( $this->array_values).\" Models\");\n\n }\n\n }", "title": "" }, { "docid": "c35b298c00d53b82467f2934d8f4ab13", "score": "0.5694244", "text": "public function search()\n {\n if(!$this->validate()){\n return null;\n }\n $query = (new Query())\n ->select(['o.id', 'first_name','last_name', 'link','quantity','created_at', 'status', 'mode', 'name' ])\n ->from('orders o')\n ->leftJoin('users u', 'o.user_id = u.id')\n ->leftJoin('services s', 'o.service_id = s.id')\n ->orderBy('o.id DESC');\n\n\n $dataProvider = new ActiveDataProvider(\n [\n 'query' => $this->applyFilters($query),\n 'pagination' => [\n 'pagesize' => Yii::$app->params['records_on_page']\n ]\n ]\n );\n\n return $this->prepareData($dataProvider);\n }", "title": "" }, { "docid": "b51fcb28c8f5a80d1983c43add544ac2", "score": "0.56715673", "text": "public static function get($model_name, $params = array()) {\n $default_condition = array(\"condition\" => \"status = 1 AND deleted = 0\");\n \n $obj_model = new $model_name;\n if(count($params)){\n if(!empty($params[\"condition\"])){\n $params[\"condition\"] = $params[\"condition\"] . \" AND \" . $default_condition[\"condition\"];\n }\n else{\n $params = array_merge($params, $default_condition);\n }\n return $obj_model->find($params);\n } else {\n return $obj_model->find($default_condition);\n }\n\n \n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.56703377", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "3a33e3da3692d742c7bf420b4a90b554", "score": "0.56675696", "text": "public function getApplicationListByCondition() {\n return $this->getListByCondition();\n }", "title": "" }, { "docid": "f68754c55d84f4f52bec984bb82a8ca0", "score": "0.56639326", "text": "abstract public function getSearches();", "title": "" }, { "docid": "e6646c3e2878d3943756297c88a9b12e", "score": "0.5650967", "text": "function query($get_count = FALSE) {\n $filters = array();\n\n if (isset($this->filter)) {\n foreach ($this->filter as $filter) {\n $filters[] = $filter->generate();\n }\n }\n /**\n * @todo Add an option for the filters to be 'and' or 'or'.\n */\n return $filters;\n }", "title": "" }, { "docid": "6ee4df439b206426d3f1819c216376a8", "score": "0.56453973", "text": "function getAllModels(): array\n{\n $excluded = array('AppModel', 'Behavior', 'Interface');\n $directory = __DIR__ . '/../../app/Model/';\n\n $scanned_directory = array_diff(scandir($directory), array('..', '.'));\n $models = [];\n\n foreach ($scanned_directory as $file) {\n $modelName = pathinfo($file)['filename'];\n\n if (! in_array($modelName, $excluded)) {\n $models[] = $modelName;\n }\n }\n\n return $models;\n}", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.564325", "text": "public function getFilters();", "title": "" }, { "docid": "79d326ca36f9dd3f98de05a4b70f09af", "score": "0.564325", "text": "public function getFilters();", "title": "" }, { "docid": "abf7fcd2a542d21b68556ef7d125ea7d", "score": "0.564287", "text": "public function getAll()\n {\n return $this->_model::all();\n }", "title": "" }, { "docid": "8204a230bd117b4ba6bae4f73e5b1f8e", "score": "0.56423086", "text": "public function getResults($model)\n {\n return $this->relation($model)->getResults();\n }", "title": "" }, { "docid": "b45b071fd1b7a16d448e81e03846fe88", "score": "0.5638331", "text": "public function filter(Request $request){ \n $records = Lote::select('*');\n $filters = $request->all();\n foreach($filters as $filter) {\n switch ($filter->type) {\n case 'gt':\n $records->where($filter->field, '>', $filter->value);\n break;\n case 'lt':\n $records->where($filter->field, '<', $filter->value);\n break;\n case 'eq':\n $records->where($filter->field, '=', $filter->value);\n break;\n case 'like':\n $records->where($filter->field, 'like', '%'.$filter->value.'%');\n break;\n }\n }\n\n $records = $records->get();\n return $records;\n }", "title": "" }, { "docid": "13b4ddf6a41b331cd94c0f3551d23046", "score": "0.5637027", "text": "public function findAll() {\r\n\t\treturn $this->filter()->getQuery ()->execute();\r\n\t}", "title": "" }, { "docid": "f0d9923fd383569631cd227df4069d62", "score": "0.56293094", "text": "public static function getAll()\n\t{\n\t\tif (func_num_args() == 0) {\n\t\t\t$search_parameters = array();\n\t\t} else {\n\t\t\tlist($search_parameters) = func_get_args();\n\t\t}\n\t\t$result = self::getRESTClient()->get(static::$controller, $search_parameters);\n\t\t$objects = array();\n\t\tif (array_key_exists(static::$object_xml_name, $result)) {\n\t\t\tforeach ($result[static::$object_xml_name] as $object_data) {\n\t\t\t\t$objects[] = new static($object_data);\n\t\t\t}\n\t\t}\n\t\treturn new kyResultSet($objects);\n\t}", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.56282246", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.56282246", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.56282246", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "702048ea5257c7f3e1f0bc6b3442c969", "score": "0.562753", "text": "public function getAll()\n {\n return $this->model->paginate(\\Config::get('app.limit'));\n }", "title": "" }, { "docid": "8ade34f2fd9e607b62baa8a9139fdb09", "score": "0.5625297", "text": "protected function possibleModels()\n {\n $modelPath = is_dir(app_path('Models')) ? app_path('Models') : app_path();\n\n return collect((new Finder)->files()->depth(0)->in($modelPath))\n ->map(fn ($file) => $file->getBasename($this->extension))\n ->values()\n ->all();\n }", "title": "" }, { "docid": "3e20b159502c3842133ebf106a759f56", "score": "0.5623084", "text": "public function getFiltering(): array;", "title": "" }, { "docid": "66fac23a8d583a2f4cf6f15b73d80d1c", "score": "0.5620318", "text": "public function getSearchOperations();", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.560956", "text": "public function getCriteria();", "title": "" }, { "docid": "1469caa083471dbf3d5de7d257223599", "score": "0.560956", "text": "public function getCriteria();", "title": "" }, { "docid": "90d616b5b746e11fd559e9219e3ea2ed", "score": "0.56010854", "text": "public function search() {\n\t\tif (isset($_GET['pageSize'])) {\n\t Yii::app()->user->setState('pageSize',(int)$_GET['pageSize']);\n\t unset($_GET['pageSize']);\n\t }\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\n\t\t$criteria=new CDbCriteria;\n\t\tif(isset($condition_search))\n\t\t\t$criteria->addCondition($condition_search);\n\t\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type);\n\t\n\t\t$sort = new CSort();\n\t\t$sort->defaultOrder = 'name';\n\t\t$sort->attributes = array(\n\t\t 'name',\n\t\t);\n\t\t$sort->applyOrder($criteria);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array('pageSize'=> Yii::app()->user->getState('pageSize',10)),\n\t\t\t'sort'=>$sort,\t\t\t\t\n\t\t));\n\t}", "title": "" }, { "docid": "a8ad0c33401438f1164421d2b658e767", "score": "0.55949223", "text": "protected function getModels(): array\n {\n return [];\n }", "title": "" }, { "docid": "77ef3a35be254763f008a632ab771641", "score": "0.55892295", "text": "public function CustomSearch()\n {\n\n $type = Type::limit(50)->get();\n\n $category = Category::limit(50)->get();\n\n $data = [\n 'type'=> count($type) > 0 ? $type : 'no types',\n 'category'=> count($category) > 0 ? $category : 'no category'\n ];\n return $data;\n }", "title": "" }, { "docid": "b55a2c93e52b6072dd95ebc83c2c0cb3", "score": "0.55892295", "text": "public function getListFiltered()\n {\n return $this->api\n ->setPostData()\n ->execute(\"process-instance\");\n }", "title": "" }, { "docid": "24852352d344aa0494dc06d0ac44c89b", "score": "0.5569456", "text": "private function findModels($modulo, $limit = 1)\n {\n // Classe {modulo}Search \n $modulo = '\\common\\models\\search\\\\'.ucfirst($modulo).'Search'; \n \n // Filters SearchModel\n $searchModel = new $modulo;\n $searchModel->pageSize = Yii::$app->request->get('limit', $limit);\n $searchModel->id = Yii::$app->request->get('id', null);\n \n // ActiveDataProvider Search\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $dataProvider;\n }", "title": "" }, { "docid": "156af7b54347b366b08e50c65fad2fae", "score": "0.55687547", "text": "public function get()\n {\n $models = $this->hydrate($this->query->get()->all());\n\n return collect($models);\n }", "title": "" }, { "docid": "9ad5f181086f2157e783f0b516b2fa60", "score": "0.5559113", "text": "public function getAvailableModels()\n {\n $extraModels = $this->getExtraModelsAsArray();\n $arr = $this->getBaseModels();\n return array_merge($arr, $extraModels);\n }", "title": "" }, { "docid": "8937d82e40a89faf1a88475de820ced9", "score": "0.55569357", "text": "public function getList()\n {\n return $this->model\n ->orderBy('id', 'desc')\n ->get();\n }", "title": "" }, { "docid": "feecd0548579dba2b50ff8d436aafba6", "score": "0.555428", "text": "public function all()\n {\n return $this->model::all();\n }", "title": "" }, { "docid": "4046111944d195b8d9edba6e73fb5e36", "score": "0.55542445", "text": "public static function getRelatedModels(Model $model, array $options)\n {\n return static::$modelClass::query()->where($options['searchingColumn'], $model->id)->get();\n }", "title": "" }, { "docid": "c3e9e8f0d89be3388b6926d7cb785f5d", "score": "0.55522174", "text": "public function search($params)\n {\n \t$this->load($params);\n \t\n \tif(!$this->validate())\n \t{\n \t\treturn null;\n \t}\n \t//Save the serach model type to the session.\n \t//This will tell the main layout the current search model type and reset the selection input for searching.\n \t//$session=yii::$app->session->set('SEARCH_MODEL_TYPE',$this->model_type);\n \t$this->model_type=yii::$app->session->get('SEARCH_MODEL_TYPE');\n \tif(empty($this->model_type)){\n \t\t$this->model_type=yii::$app->params['searchModelType'];\n \t\tyii::$app->session->set('SEARCH_MODEL_TYPE',$this->model_type);\n \t}\n \t\n \tswitch ($this->model_type)\n \t{\n \t\tcase MODEL_TYPE_BRAND:\n \t\t\t$searchModel = new BrandSearch();\n \t\t\tbreak;\n \t\tcase MODEL_TYPE_GOODS:\n \t\t\t$searchModel = new GoodsSearch();\n \t\t\tbreak;\n \t\tcase MODEL_TYPE_POSTS:\n \t\t\t$searchModel = new PostsSearch();\n \t\t\tbreak;\n \t\tcase MODEL_TYPE_SOLR:\n \t\t\t$searchModel = new SolrSearch();\n \t\t\tbreak;\n \t\tdefault:\n \t\t\treturn null;\n \t}\n \t$searchModel->keyWords=$this->keyWords;\n \t//var_dump($this->keyWords);\n \t//die();\n \treturn $dataProvider = $searchModel->search($params);\n\n }", "title": "" }, { "docid": "ccd41a6d80aa4a476d8bbf309f81421e", "score": "0.5550643", "text": "public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('creation_date', $this->creation_date, true);\n $criteria->compare('change_date', $this->change_date, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('email', $this->email, true);\n $criteria->compare('theme', $this->theme, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('type', $this->type);\n $criteria->compare('status', $this->status);\n $criteria->compare('ip', $this->ip);\n $criteria->compare('is_faq', $this->is_faq);\n $criteria->compare('category_id', $this->category_id);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n 'sort' => array('defaultOrder' => 'status ASC, change_date ASC'),\n ));\n }", "title": "" }, { "docid": "7238fb4b56ac8e3121f4ae5978cacf94", "score": "0.55486935", "text": "public function find(\\Modler\\Model $model, array $where = array()){}", "title": "" }, { "docid": "8667ee236b4aa9da726eb2c55af5b809", "score": "0.55470914", "text": "public function models() {\n\n\t\t$models = array();\n\n\t\t// Figuring out the controllers path will have to be more clever\n\t\tif ($path_objects = opendir($this->path() . \"/models\")) {\n\t\t\n\t\t\t// Loop through \n\t\t\twhile (($file = readdir($path_objects)) !== false) {\n\n\t\t\t\tif (strpos($file, '.') != 0 && $file != '_initialize.php' && $file != '_default.php') {\n\n\t\t\t\t\t$models[] = str_replace('.php', '', $file);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\n\t\tclosedir($path_objects);\n\t\t\n\t\treturn $models;\n\n\t}", "title": "" }, { "docid": "e3436d306208e7650dbcf4de25d10555", "score": "0.55452055", "text": "public function filters()\n {\n return [\n 'clientOptions' => Customers::select('id','full_name')->has('sales')->orderBy('full_name')->get(),\n 'employeeOptions' => Employee::has('sales')->orderBy('name')->get()];\n }", "title": "" }, { "docid": "337ed89f2065e7d40b1e6d13cd895888", "score": "0.5542147", "text": "public function index()\n {\n return search::all();\n }", "title": "" }, { "docid": "5f62994fcd489bf2a5254e4673a49ba2", "score": "0.55411595", "text": "public function search(){\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('logicType', $this->logicType, true);\n $criteria->compare('modelName', $this->modelName, true);\n $criteria->compare('createDate', $this->createDate, true);\n $criteria->compare('lastUpdated', $this->lastUpdated, true);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }", "title": "" }, { "docid": "b9a75221fe5aed14c59bad238b6d1baf", "score": "0.5538371", "text": "function get_all_carmodel($params = array())\r\n {\r\n $this->db->order_by('id', 'desc');\r\n if(isset($params) && !empty($params))\r\n {\r\n $this->db->limit($params['limit'], $params['offset']);\r\n }\r\n return $this->db->get('carmodel')->result_array();\r\n }", "title": "" }, { "docid": "f6e4c4b68a69ce9028cf55b6ef22355f", "score": "0.5535931", "text": "private function getSearchFields(Model $model)\n {\n $search = $model->getSearchFields();\n foreach ($search as $field => $condition) {\n if (is_numeric($field)) {\n $search[$condition] = '=';\n unset($search[$field]);\n }\n }\n\n return $search;\n }", "title": "" }, { "docid": "2f05baeb9aab78826da4194063da1ef2", "score": "0.5534603", "text": "public function &getModels() {\n return $this->models;\n }", "title": "" } ]
88442cce51223f4dda92be6e779783d5
return une seul adult
[ { "docid": "115f70bd0c0a4b3ffc9cb47bdc30c79f", "score": "0.64542204", "text": "public function getadult($id)\r\n {\r\n $sql=\"select * from adult where id_adult= ?\";\r\n $rep=$this->executerRequete($sql,array($id));\r\n if ($rep->rowCount() == 1){\r\n return $rep->fetch(); } // Accès à la première ligne de résultat\r\n else{\r\n throw new Exception(\"Aucun éleve ne correspond 0 l4identifiqnt fourni\");}\r\n }", "title": "" } ]
[ { "docid": "a5ed5753c41476082532edc504e2b1be", "score": "0.6438805", "text": "public function getAdult()\n {\n return $this->adult;\n }", "title": "" }, { "docid": "a5ed5753c41476082532edc504e2b1be", "score": "0.6438805", "text": "public function getAdult()\n {\n return $this->adult;\n }", "title": "" }, { "docid": "9aeac422ad0ace02accef9d254045e95", "score": "0.6310148", "text": "static public function enableAdult()\n {\n self::$_isAdult = true;\n }", "title": "" }, { "docid": "f778ae4513c4749c5318579ea5b34006", "score": "0.6165504", "text": "public function etat(){\n $article = new article(WebTools::fromRequest('id'));\n if($article->getAffichage() == 1){\n return\"Oui\";\n }else{\n return\"Non\";\n }\n }", "title": "" }, { "docid": "7684a4bd5767b2aec4af5e8182316ddb", "score": "0.61524767", "text": "public function getAdult() {\n\t\treturn $this->getConfig()->getAdult();\n\t}", "title": "" }, { "docid": "505b2a7c5dc00c13f27cc7fd847b0bf5", "score": "0.61100185", "text": "public function getAdult()\n {\n return isset($this->Adult) ? $this->Adult : null;\n }", "title": "" }, { "docid": "0a071c713dbca15b774d7a5c07b50bf9", "score": "0.5938229", "text": "public function getAdults()\r\n {\r\n $sql = \"select * from adult\";\r\n $personnel= $this->executerRequete($sql);\r\n return $personnel;\r\n }", "title": "" }, { "docid": "adafb1c5b2048bd8d9675b513ccb135c", "score": "0.59175736", "text": "static public function disableAdult()\n {\n self::$_isAdult = false;\n }", "title": "" }, { "docid": "adbe381f188bf92b91fa3e24863a7da8", "score": "0.58899814", "text": "function amende($date1, $duree){\n\t$datetime1 = new DateTime(retour($date1, $duree));\n\t$datetime2 = new DateTime(date('Y-m-d'));\n\t$interval = date_diff($datetime1, $datetime2);\n\t$retard= $interval->format('%R%a');\n\t\tif ($retard <= 0) {\n\t\t\treturn '0 €';\n\t\t}\n\t\telse{\n\t\t\treturn $retard*0.05.\" €\";\n\t\t}\n\t}", "title": "" }, { "docid": "e5e3304be1eb73d5e402043f4d446b6d", "score": "0.57945037", "text": "static function faireGreve ()\r\n {\r\n echo \"(ON FAIT GREVE)\";\r\n // SI JE VEUX UTILISER LA PROPRIETE static\r\n echo Enseignant::$cours;\r\n }", "title": "" }, { "docid": "5fa5b907f7aaea993f989d75fb116cad", "score": "0.57637185", "text": "function scrape_product_adult($page) {\n\n\t \t$adult = 0;\n\n\t $div = self::get_div('id=\"wayfinding-breadcrumbs_container', $page);\n\t if (strpos(strtolower($div), \"sex\") !== false) $adult = 1;\n\t if (strpos(strtolower($div), \"exotic apparel\") !== false) $adult = 1;\n\n\t $div = self::get_div('id=\"wayfinding-breadcrumbs_feature', $page);\n\t if (strpos(strtolower($div), \"sex\") !== false) $adult = 1;\n\t if (strpos(strtolower($div), \"exotic apparel\") !== false) $adult = 1;\n\n\t $regex = '/dildo|penis|\\\\bg.spot\\\\b|\\\\bvagina|\\\\banal\\\\b|vibrator|\\\\bmasturbat|\\\\bclitor|\\\\bsex\\\\b|\\\\berection\\\\b|crotchless/i';\n\n\t\t\t$title = self::scrape_product_title($page);\n\t if (preg_match($regex, $title)) $adult = 1;\n\n\n\t $regex = '/dildo|penis|\\\\bg.spot\\\\b|\\\\banal\\\\b|vibrator|\\\\bmasturbat|\\\\bclitor|\\\\berection\\\\b|crotchless/i';\n\n\t\t\t$description = self::scrape_product_description($page);\n\t if (preg_match($regex, $description)) $adult = 1;\n\n\t // Bullet points\n\n\t \t$ul = self::get_div('id=\"feature-bullets', $page, 0, true);\n\t \t$li = self::get_div_repeat('<li', $ul);\n\n\t \tforeach ($li as $key => $value) {\n\t\t if (preg_match($regex, $value)) $adult = 1;\n\t \t}\n\n\t return $adult;\n\t }", "title": "" }, { "docid": "12a712868ee9685a5e951a4aba14c5ed", "score": "0.5756189", "text": "function cek_semester()\n{\n\t$CI = &get_instance();\n\t//ambil tahun\n\t$cur_semester_angka = (date(\"n\") <= 6) ? 2 : 1;\n\t$semester = date(\"Y\") . $cur_semester_angka;\n\t$angkatan = substr($CI->session->userdata('username'), 0, 4);\n\n\tif ($semester % 2 != 0) {\n\t\t$a = (($semester + 10) - 1) / 10;\n\t\t$b = $a - $angkatan;\n\t\t$c = ($b * 2) - 1;\n\t} else {\n\t\t$a = (($semester + 10) - 2) / 10;\n\t\t$b = $a - $angkatan;\n\t\t$c = $b * 2;\n\t}\n\n\treturn $c;\n}", "title": "" }, { "docid": "ef41549b990e29974737e04ab8de2a03", "score": "0.5755599", "text": "public function etudiant() {\n $listFrais = $this->frais;\n $frais = $listFrais[0];\n $etudiant = $frais->getEtudiant();\n// foreach ($listFrais as $frais) {\n// $total+=$frais->getMontantFrais();\n// }\n\n return $etudiant;\n }", "title": "" }, { "docid": "5be8dc1c645dd31b86f525fe055c04e7", "score": "0.56986785", "text": "function nombreJoursAnnee($intAnnee){\n return bissextile($intAnnee)? 366:365;\n}", "title": "" }, { "docid": "0c9ab9d2ba5db9c7141a85908ce83f08", "score": "0.56325954", "text": "public function selectTotalStudentAdmission()\n {\n $query=\"SELECT * FROM admission_students\";\n $restlt=database::connect()->query($query);\n if($restlt->num_rows>0){\n return $restlt;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "3a2d457f696562dc3611391e5eb87a1b", "score": "0.5548818", "text": "function adhclub_action_insert_adhassur(){\n\tinclude_spip('inc/autoriser');\n\tif (!autoriser('creer','adhassur'))\n\t\treturn false;\n\t// nouvelle assurance\n\t$adhvaleur=array(\n\t\t'titre'=> 'nouvelle',\n\t\t'descriptif'=> 'NOW()',\n\t\t'mnt_assur'=> '0.0',\n\t);\n\t$id_assur = sql_insertq(\"spip_adhassurs\", $adhvaleur);\n\n\tif (!$id_assur){\n\t\tadhclub_log(\"editer_adhassur : adhclub_action_insert_adhassur : impossible d'ajouter une assurance\", true);\n\t\treturn false;\n\t} \n\treturn $id_assur;\t\n}", "title": "" }, { "docid": "fca749cf0a3070ee8a2c125e2f95d727", "score": "0.5544087", "text": "function AfficherNomAgeDeux($nom = \"Nom par défaut\", $anneNaissance = 20){ // ()obligatory but can be empty\n\t\t\t// $nom = ... is the default value if no argument afficherNomAge\n\t\t\t$retour = $nom . \" a \" . calculAgeDeux($anneNaissance) . \" ans.\";\n\t\t\treturn $retour;\n\t\t}", "title": "" }, { "docid": "c495371d716c064647738b63837ea301", "score": "0.5537277", "text": "public function getAdultAllowed() { return $this->adultAllowed; }", "title": "" }, { "docid": "ed654ea80cbc370158efc6dfa693d7fd", "score": "0.55212265", "text": "function cariSisaAngsur($lama,$angsur_ke)\r\n\t{\r\n\t\t$sisa_ags = $lama - $angsur_ke;\r\n\t\treturn $sisa_ags;\r\n\t}", "title": "" }, { "docid": "34c664455395c192d02bc0a7c3b7edeb", "score": "0.55199647", "text": "public function soutienDeja ($etud) {\r\n $query=$this->db->prepare(\"SELECT count(no_sout) as total\r\n FROM soutenance\r\n WHERE no_etud = ?\");\r\n \r\n $query->bindValue(1, $etud, PDO::PARAM_INT);\r\n $query->execute();\r\n return $query->fetch(PDO::FETCH_OBJ);\r\n }", "title": "" }, { "docid": "eff0126964cee748b56417d7449f76dc", "score": "0.5517821", "text": "public function recevoirDegats(){\n $this->_degats += 5; \n\n if( $this->_degats >= 100){\n return self::PERSONNAGE_TUE; \n }\n\n return self::PERSONNAGE_FRAPPE; \n //Si les degats dépasent ou atteignent 100, indiquer que le personnage est mort\n //Sinon indiquer une valeur qui signifie qu'il a été touché \n }", "title": "" }, { "docid": "b97f3c07d6b1bac0e06ff1bbe3b27dad", "score": "0.55090654", "text": "function getPretAchReteta($gestiune_id) {\n\t\t//incarc materiile prime\n\t\t$mps = $this -> getMateriiPrime(1);\n\t\t$pret_ach = 0;\n\t\tforeach($mps as $mp) {\n\t\t\t$prod = new Produse($mp['produs_id']);\n\t\t\t$pret_ach += $mp['cantitate']*$prod -> getPretMediuAchizitie($gestiune_id);\n\t\t}\n\t\treturn $pret_ach;\n\t}", "title": "" }, { "docid": "30f49f3e552119c937189dfe5ad7179c", "score": "0.5449239", "text": "function calculate_age($dateDeNaissance){\n\tlist($jour, $mois, $annee) = explode(\"-\", $dateDeNaissance);\n\t$moisJour = $mois.$jour;\n\t$currentYear = date(\"Y\");\n\t$currentMonthDay = date(\"md\");\n\tif($currentMonthDay < $moisJour){\n\t\t$age = $currentYear - $annee - 1;\n\t}else{\n\t\t$age = $currentYear - $annee;\n\t}\n\techo $age;\n}", "title": "" }, { "docid": "76edb6276c53ba428ce20df1da0e7fb8", "score": "0.5426159", "text": "public function isAdult() {\n\t\t$age = $this->AgeReal;\n\t\t\n\t\tif (!empty($this->age) && $age < 18)\n\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e60ac626004464348ab262792a6c65e1", "score": "0.5420123", "text": "public function estudiante()\n {\n return self::ESTUDIANTE;\n }", "title": "" }, { "docid": "e7f6aed50ce1c2bc100b92ae98655f54", "score": "0.54188937", "text": "function dame_estilo($dia_imprimir){\n\tglobal $mes,$ano,$dia_solo_hoy,$tiempo_actual;\n\t//dependiendo si el día es Hoy, Domigo o Cualquier otro, devuelvo un estilo\n\tif ($dia_solo_hoy == $dia_imprimir && $mes==date(\"n\", $tiempo_actual) && $ano==date(\"Y\", $tiempo_actual)){\n\t\t//si es hoy\n\t\t$estilo = \" class='hoy'\";\n\t}else{\n\t\t$fecha=mktime(12,0,0,$mes,$dia_imprimir,$ano);\n\t\tif (date(\"w\",$fecha)==0){\n\t\t\t//si es domingo \n\t\t\t$estilo = \" class='domingo'\";\n\t\t}else{\n\t\t\t//si es cualquier dia\n\t\t\t$estilo = \" class='diario'\";\n\t\t}\n\t}\n\treturn $estilo;\n}", "title": "" }, { "docid": "54dea0328d0f575bb6a38c800fb1c28f", "score": "0.54111415", "text": "function bissextile($intAnnee){\n return date(\"L\", strtotime(\"01-01-\".$intAnnee)) ? true:false;\n}", "title": "" }, { "docid": "02d8b3c81a211286dc15366817ef6904", "score": "0.5384718", "text": "function madre (){\n $vieja = 555;\n return $vieja;\n }", "title": "" }, { "docid": "e590ade2016edc2a5a46bd8d2e7dfd98", "score": "0.5380484", "text": "public function get_men_persent(){\r\r\n\t\t\r\r\n $query = \"SELECT U.* FROM \" . $this->table_users . \" AS U INNER JOIN \" . $this->table_personal . \" AS P ON U.role = 'CAA' AND U.id = P.user_id AND P.gender = 'Male'\";\r\r\n\t\t\r\r\n\t\t$stmt = $this->conn->getCount($query);\r\r\n\t\t\r\r\n\t\t$persent = (int)(($stmt * 100)/$this->get_totalCAAs());\r\r\n \r\r\n return $persent;\r\r\n\t\t\r\r\n\t}", "title": "" }, { "docid": "0677696fce2bfaf0f05cdc9a2e426ca2", "score": "0.5357769", "text": "public function getAmendement();", "title": "" }, { "docid": "0839503b27caef7072910683fbd04ece", "score": "0.5356506", "text": "function MESES_ANTIGUEDAD() {\r\n\tglobal $_ARGS;\r\n\tglobal $_PARAMETRO;\r\n\tlist($anios, $meses, $dias) = getTiempo(formatFechaDMA($_ARGS['_FECHA_INGRESO']), formatFechaDMA($_ARGS['_HASTA']));\r\n\t$cantidad = $meses + ($anios * 12);\r\n\treturn intval($cantidad);\r\n}", "title": "" }, { "docid": "c5a59a9583044537d4cba623e3c0888d", "score": "0.53528285", "text": "function AfficherNomAgeTrois($nom = \"Nom par défaut\", $anneNaissance = 20){\n\t\t\t// $nom = ... is the default value if no argument afficherNomAge\n\t\t\t\n\t\t\t$age = calculAgeTrois($anneNaissance);\n\t\t\t$retour = $nom . \" a \" . $age . \" ans \";\n\t\t\t\n\t\t\tif($age < 18) {\n\t\t\t\t$retour .= \" (mineur).\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$retour .= \" (majeur).\";\n\t\t\t}\n\t\t\t\n\t\t\treturn $retour;\n\t\t}", "title": "" }, { "docid": "3536efbd4af32f41348e290e23d95a45", "score": "0.53514117", "text": "public function kalkulasiAlpaNTelat() {\r\n $yeseterday = now()->yesterday()->format('Y-m-d');\r\n }", "title": "" }, { "docid": "0ee901a3c7e1c83e6ba5f1633395d5b9", "score": "0.53507143", "text": "public function getAnnee()\n {\n return $this->annee;\n }", "title": "" }, { "docid": "b5edc09ad0430c539754d53b18d2264f", "score": "0.53424114", "text": "public function getOndaSeptal()\n {\n return $this->ondaSeptal;\n }", "title": "" }, { "docid": "1810e2abc97198e5039f4224fd1d6342", "score": "0.5331857", "text": "public function estVivant(){\n if($this->_sante <= 0 ){\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "a48908c67b57e45ac743a687a8220105", "score": "0.53219664", "text": "function get_depts_stu()\n\t{\n\t\t$query = $this->db->get_where($this->table_depts,array('type' => 'academic' ));\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "fc71de0d1182a54b913dbb004d545570", "score": "0.53209025", "text": "function avancer() {\r\n //parametre : neant\r\n //retuour\r\n //recupere l'agilité\r\n $agility = $this->get(\"agility\");\r\n //recupere la salle + 1\r\n $nextRoom = $this->get(\"room\") + 1;\r\n\r\n //si agility est superieur ou egal a nextroom\r\n if (($agility >= $nextRoom) AND ($nextRoom <= 10)) {\r\n //on avance dans la room suivante = room +1\r\n $this->set(\"room\", $nextRoom);\r\n $this->set(\"agility\", $this->get('agility') - $nextRoom);\r\n //appel de la methode qui met a jour les stats\r\n $this->update();\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "903d189d3e054890e98309f3458c7679", "score": "0.53133565", "text": "public static function last_einsatz() {\n return -365;\n }", "title": "" }, { "docid": "945dfe5423ab063145d06c9e3f55f1cb", "score": "0.52986574", "text": "function cst($constante) {\n return $constante;\n }", "title": "" }, { "docid": "86d502fdba2f406d42e89eee12221a91", "score": "0.5297802", "text": "function selmundat($xent, &$area, &$habit, &$freg, &$dia_fer, &$des_fer ) {\n\t$sqls=\"select * from munp1.municip where cod = '$xent'\";\n\t$ress=mysql_db_query(\"munp1\",$sqls); //\n\t\tif ($ress) {\n\t\t\t\t$regs=mysql_fetch_array($ress);\n\t\t\t\tif ( $regs ) {\n\t\t\t\t\t\t\t\t$area = $regs[\"med_area\"];\n\t\t\t\t\t\t\t\t$habit = $regs[\"num_habit\"];\n\t\t\t\t\t\t\t\t$freg = $regs[\"num_freg\"];\n\t\t\t\t\t\t\t\t$dia_fer = $regs[\"dat_fermun\"];\n\t\t\t\t\t\t\t\t$des_fer = $regs[\"des_fermun\"];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmysql_free_result($ress);\n\t\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t\t}\n \t\t\t\t\telse return 0;\n\t\t }\n// printf(\"vai sair 0\");\nreturn 0;\n}", "title": "" }, { "docid": "e06f1054fc313c16105e0925649f5b9a", "score": "0.52966344", "text": "function age($naiss) {\r\nlist($annee, $mois, $jour) = explode('-', $naiss);\r\n$today['mois'] = date('n');\r\n$today['jour'] = date('j');\r\n$today['annee'] = date('Y');\r\n$annees = $today['annee'] - $annee;\r\nif ($today['mois'] <= $mois) {\r\nif ($mois == $today['mois']) {\r\nif ($jour > $today['jour'])\r\n$annees--;\r\n}\r\nelse\r\n$annees--;\r\n}\r\nreturn $annees;\r\n}", "title": "" }, { "docid": "b925ce769b1a9921948cffca7f5c937e", "score": "0.5286451", "text": "public function getDiaAtualSemana($strDataAAAAMMDD){\r\n $arrStrData = explode(\"-\", $strDataAAAAMMDD);\r\n \r\n $intAno = $arrStrData[0]; \r\n $intMes = $arrStrData[1];\r\n $intDia = $arrStrData[2];\r\n \r\n $intDiaSemana = date(\"w\", mktime(0, 0, 0, $intMes, $intDia, $intAno)); \r\n $strDiaSemana = \"\";\r\n $strMes = \"\";\r\n \r\n switch($intDiaSemana) {\r\n case\"0\": $strDiaSemana = \"Domingo\"; break;\r\n case\"1\": $strDiaSemana = \"Segunda-Feira\"; break;\r\n case\"2\": $strDiaSemana = \"Ter&ccedil;a-Feira\"; break;\r\n case\"3\": $strDiaSemana = \"Quarta-Feira\"; break;\r\n case\"4\": $strDiaSemana = \"Quinta-Feira\"; break;\r\n case\"5\": $strDiaSemana = \"Sexta-Feira\"; break;\r\n case\"6\": $strDiaSemana = \"S&aacute;bado\"; break;\r\n }\r\n\r\n switch ($intMes){\r\n case \"01\": $strMes = \"Janeiro\"; break;\r\n case \"02\": $strMes = \"Fevereiro\"; break;\r\n case \"03\": $strMes = \"Mar&ccedil;o\"; break;\r\n case \"04\": $strMes = \"Abril\"; break;\r\n case \"05\": $strMes = \"Maio\"; break;\r\n case \"06\": $strMes = \"Junho\"; break;\r\n case \"07\": $strMes = \"Julho\"; break;\r\n case \"08\": $strMes = \"Agosto\"; break;\r\n case \"09\": $strMes = \"Setembro\"; break;\r\n case \"10\": $strMes = \"Outubro\"; break;\r\n case \"11\": $strMes = \"Novembro\"; break;\r\n case \"12\": $strMes = \"Dezembro\"; break;\r\n }\r\n \r\n return $strDiaSemana.\", \".$intDia.\" de \".$strMes.\" de \".$intAno;\r\n }", "title": "" }, { "docid": "41a1e096e9319909e67c802778391a6b", "score": "0.52781063", "text": "public function getAnos()\n {\n\n ///haciendo PRUEBA con dias comparados\n //FECHA ACTUAL\n $hoydia=date(\"d\");\n $hoymes=date(\"m\");\n $hoyano=date(\"Y\");\n\n //FECHA DE USR\n $cumpleanos = $this->cumple;\n $fecha = str_replace(\"/\",\"-\",$cumpleanos);\n $fechaYear = date('Y',strtotime($fecha));\n $fechaMes = date('m',strtotime($fecha));\n $fechaDia = date('d',strtotime($fecha));\n\n //si el mes es el mismo o mayor pero el día inferior aun no ha cumplido años, le quitaremos un año al actual\n if (($fechaMes == $hoymes) && ($fechaDia > $hoydia)) {\n $hoyano=($hoyano-1);\n }\n if ($fechaMes > $hoymes){\n $hoyano=($hoyano-1);\n }\n\n $edad = ($hoyano - $fechaYear);\n return $edad . ' Años';\n }", "title": "" }, { "docid": "f5c2debc0814bc992713c4bb66af59a3", "score": "0.52740514", "text": "public function get_age()\n {\n if ( isset( $this->birth_date ) )\n return date('Y') - $this->birth_date->format('Y');\n else\n return 'inconnu';\n }", "title": "" }, { "docid": "12cb7fd7b0ce450336b09917a13f3bfe", "score": "0.52492636", "text": "function getDaysSinceRamadan(){ //tells you the day of Ramadan itself\r\n\t\t$uae_time = time() + (15 * 60 * 60) - (6 * 60);\r\n\t\t$days = floor(($uae_time - $this->getRamadanDate()) / (24 * 60 * 60)); \r\n\t\techo \"<!--\"; \r\n\t\techo $uae_time;\r\n\t\techo \"-->\";\r\n\t\treturn $days;\r\n\t}", "title": "" }, { "docid": "a1db4143fa536925442d670673e1ecbb", "score": "0.5246259", "text": "public function gameOne()\n {\n\n $this->show('jeuadulte1', [\"sujet\" => \"\",\"adjectif\" => \"\",\"verbe\" => \"\",\"complement\" => \"\",\"adjectif2\" => \"\"]);\n }", "title": "" }, { "docid": "125cb0440ba18990af6b8afbdb98c1f5", "score": "0.5240312", "text": "public function earnMoney(){\n\t\t//return Person::$money; -> Ok\n\t\t//keyword : self giup truy cap vao thuoc tinh la static - self chi dung cho bien static\n\t\t//return self::$money; - o ngoai lop thi khong the dung tu khoa self ma phai dung Person::$money\n\t\t$m = self::$money;\n\t\t//$e = self::getInfoEmail();\n\t\t$e = $this->getInfoEmail();// Khi mot phuong thuc ko phai static trieu goi mot phuong thuc la static thi dung con tro $this binh thuong\n\t\treturn $m.'--'.$e;\n\t}", "title": "" }, { "docid": "a2640c9b26fc20c1c2e8cb70f7aee267", "score": "0.5234395", "text": "public function getLaatsteKeerAangemeld() {\n return $this->LaatsteKeerAangemeld;\n }", "title": "" }, { "docid": "2fc1b0e4b6ea14466bc81187bbb3ad64", "score": "0.5222079", "text": "public function gagnerExperience()\n{\n // Cette méthode doit ajouter 1 à l'expérience du personnage.\n echo $this->_experience +1;\n\n}", "title": "" }, { "docid": "b6269280395857b61cbcb7ca07abc631", "score": "0.52082384", "text": "public function getAnamnese() {\n\t\t$query = $this->db->get('anamnese');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "f90fb683e80b77363f9c77f13cf62262", "score": "0.52002656", "text": "function plusYear(){ return $this->plusYears(1); }", "title": "" }, { "docid": "ce3aa9f7431d8d8d1d4e2e9d137b27a0", "score": "0.5199922", "text": "public function jouer() {\n $this->joie=$this->joie*4; //la premiere assigne de la joie et la suite multiplie par 4 le résultat\n $this->hygiène=$this->hygiène-2;\n }", "title": "" }, { "docid": "51c5a06e4fe3b9d0dc5186777fda01a4", "score": "0.5192393", "text": "function CenaOpravyInfrastruktury( $id_zeme, $id_ligy ){\n\tglobal $db;\n\t\n\t$suma = 0;\n\t\n\t$query = \"SELECT infrastruktura_now, oprava_infrastruktury FROM \n\t\t\tin_game_zeme WHERE id_zeme='$id_zeme' and\n\t\t\t\tid_ligy='$id_ligy'\";\n\t$res = $db->Query( $query );\n\t$row = $db->GetFetchRow( $res );\n\t$inf = $row[0];\n\t$oprava = $row[1];\n\t\n\n\tif($inf <25){\n\t\t$suma = ( floor( $inf / 5 ) ) * 200;\n\t\tif ($suma == 0) {$suma = 150;}\n\t}\n\telse if($inf <50){\n\t\t$suma = ( floor( $inf / 5 ) - 5 ) * 700 + 1000;\n\t}\n\telse if($inf <75){\n\t\t$suma = ( floor( $inf / 5 ) - 10 ) * 2000 + 4500;\n\t}\n\telse {\n\t\t$suma = ( floor( $inf / 5 ) - 15 ) * 7000 + 14500;\n\t}\n\n\t$suma = $suma * ( 1 + $oprava * 5 ); \n\treturn $suma;\n}", "title": "" }, { "docid": "28c95a6ea2d01ccc09c4caec43ca4340", "score": "0.518461", "text": "function obtener_edad( $birthDate )\r\n{\r\n\t//la variable viene como año, mes, dia. así que el orden cambia a 1,2,0\r\n\t//explode the date to get month, day and year\r\n\t$birthDate = explode(\"/\", $birthDate);\r\n\t//get age from date or birthdate\r\n\t$age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $birthDate[1], $birthDate[2], $birthDate[0]))) > date(\"md\")\r\n\t\t? ((date(\"Y\") - $birthDate[0]) - 1)\r\n\t\t: (date(\"Y\") - $birthDate[0]));\r\n\treturn $age;\r\n}", "title": "" }, { "docid": "24261c9c21a71eb04cc9184685e5bdc9", "score": "0.51827383", "text": "function hitungTotal($angsuran,$jml_denda)\r\n\t{\r\n\t\t//hitung total pembayaran\r\n\t\t$tobay = $angsuran + $jml_denda ; \r\n \t\treturn $tobay;\r\n\t}", "title": "" }, { "docid": "34172ca328874b8385cd00c18a841516", "score": "0.5181132", "text": "public function attaque($cible){\n if($cible->isDead()){ //Si cible morte, ne pas attaquer\n echo $cible->getName() . \" est déjà mort(e) <br>\";\n\n }else{ //Si la cible est vivante, on peut attaquer\n $degat = $this->attaque + rand(0,5); //Addition de l'attaque + d'une valeur au hasard entre 0 et 5\n\n $cible->vie -= ($degat - $cible->armure); //On retire le nombre de points d'attaque (de l'attaquant) aux points de vie de la cible\n $cible->empecherPVNegatif();\n if($cible->isDead()){ //Si l'attaque a tué le personnage\n echo $this->name . \" a tué \" . $cible->name . \"<br>\";\n }\n }\n }", "title": "" }, { "docid": "c1606fc9c569c18bb294cf5c73e449f0", "score": "0.5168031", "text": "function la_date($give){\n $today = microtime(true);\n $micro = sprintf(\"%06d\",($today - floor($today)) * 1000000);\n $dates = new DateTime(date('Y-m-d'.$micro,$today));\n#scinder la date.\n $today_sep= explode('/', $dates);\n#identifier la table avec le jour et le mois.\n $le_jour = $today_sep[0];\n $le_mois = $today_sep[1];\n $l_annee = $today_sep[2];\n $le_mois = array ('1' => 'JANVIER','2' => 'FEVRIER','3' => 'MARS','4' => 'AVRIL','5' => 'MAI','6' => 'JUIN','7' => 'JUILLET','8' => 'AOUT','9' => 'SEPTEMBRE','10' => 'OCTOBRE','11' => 'NOVEMBRE','12' => 'DECEMBRE');\n\n#verifier que le nombre de seconde entré est arrondi à un int.\n $count_days = round($give/60/60/24);\n#trouver le nouveau jour.\n $day_of_event = $le_jour - $count_days;\n#donner la date reelle.\n $le_jour = $day_of_event;\n echo \"L'évènement a eu lieu le \" . $le_jour . \" \". $le_mois . \" \" . $le_mois ;\n}", "title": "" }, { "docid": "0eaaeec0024c75bdc733cdb8bfd07456", "score": "0.5166066", "text": "function getCertificadoLaboral()\n\t{\n\t\tglobal $conexion;\n\t \t$resultado=mysqli_query($conexion, \"SELECT * FROM datospersonales where usuario='\".$_SESSION['usuario'].\"'\");\n\t \treturn $resultado;\n\t}", "title": "" }, { "docid": "5852a64079312b28b4039f7019fb264c", "score": "0.51624066", "text": "function calculaEdad($fecha)\n\t{\n\tlist($Y,$m,$d) = explode(\"-\",$fecha);\n\treturn( date(\"md\") < $m.$d ? date(\"Y\")-$Y-1 : date(\"Y\")-$Y );\n\t}", "title": "" }, { "docid": "d03a32af4ca28678ee110a4298deaf50", "score": "0.51511383", "text": "public function getCandidat();", "title": "" }, { "docid": "5a32a947bfb54c0ed0de9f79c0a6df22", "score": "0.51502275", "text": "public function getActeur()\n {\n return $this->acteur;\n }", "title": "" }, { "docid": "4a68863568a3b55bc975e79ca9f2c8c1", "score": "0.5148133", "text": "public function assurance(){\n\t\t$datas = ASSURANCE::findBy([\"vehicule_id =\"=> $this->getId()], [], [\"finished\"=>\"DESC\"]);\n\t\tif (count($datas) >= 1) {\n\t\t\treturn $datas[0];\n\t\t}else{\n\t\t\treturn new ASSURANCE();\n\t\t}\n\t}", "title": "" }, { "docid": "391433a42219ae9cfffb43d343761e45", "score": "0.5144185", "text": "public function getEdad(){\n $fecha=$this->fecha_n;\n list($Y,$m,$d) = explode(\"-\",$fecha);\n return( date(\"md\") < $m.$d ? date(\"Y\")-$Y-1 : date(\"Y\")-$Y ); \n }", "title": "" }, { "docid": "748c1470927fc041131a8331194054c9", "score": "0.5105251", "text": "public static function antiguedad($fecha){\n $dif=\"0\";\n if($fecha){\n $cumpleanos = new DateTime($fecha);\n $hoy = new DateTime();\n $annos = $hoy->diff($cumpleanos);\n $dif= $annos->y;\n }\n return $dif;\n }", "title": "" }, { "docid": "4e7a5176b62011db7e47e8a2e7807d87", "score": "0.51034486", "text": "public function calcularEdad($fecha)\n\t{\n\t\t\n\t\tif (!$fecha)\n\t\t{\n\t\t\t$edad = 'Fecha de nacimiento no especificada';\n\t\t}\n\t\telse {\n\t\t\t$datetime1 = new \\DateTime($fecha);\n\t\t\t$datetime2 = new \\DateTime(\"now\");\n\t\t\t$interval = $datetime1->diff($datetime2);\n\t\t\t\n\t\t\tif ($interval->format('%y') < 1){\n\t\t\t\t// Si es menos que un año, se contabiliza los meses\n\t\t\t\tif ($interval->format('%m') < 1)\n\t\t\t\t{\n\t\t\t\t\t// Si es menos que un mes, se contabilizan los días\n\t\t\t\t\t$edad = $interval->format('%d').' días';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$edad = $interval->format('%m').' meses';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$year = $interval->format('%y')==1 ? 'año' : 'años';\n\t\t\t\tif ($interval->format('%m') == 0)\n\t\t\t\t{\n\t\t\t\t\t$edad = $interval->format('%y').' '.$year;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$edad = $interval->format('%y').' '.$year.' y ';\n\t\t\t\t\tif ($interval->format('%m') < 2){\n\t\t\t\t\t\t$edad .= $interval->format('%m').' mes';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ($interval->format('%m') == 0)\n\t\t\t\t\t\t\t$edad = $interval->format('%m') ;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$edad .= $interval->format('%m').' meses';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n return $edad;\n\n\t}", "title": "" }, { "docid": "d304c3f1f550f994bd0d7c5574991b1f", "score": "0.5101595", "text": "function calc_edadconstruccion($anioConstruccion) {\r\n\tif ($anioConstruccion >= 0) {\r\n\t\treturn (integer)date('Y') - (integer)$anioConstruccion;\t\r\n\t}\r\n\treturn 0;\r\n}", "title": "" }, { "docid": "c4b6aaca2bf26d42f0745ee0c3111c7b", "score": "0.5100697", "text": "function utyGetSaison()\n{\n\tif (isset($_SESSION['Saison']))\n\t\treturn $_SESSION['Saison'];\n\n\t$myBdd = new MyBdd();\n\t$saison = $myBdd->GetActiveSaison();\n\n\treturn $saison;\n}", "title": "" }, { "docid": "8f8eb20c1f0fb389555dbbd0b2d8d0e8", "score": "0.5097157", "text": "function totalAdjudicado(){\n $this->procedimiento='adq.f_cotizacion_det_ime';\n $this->transaccion='ADQ_TOTALADJ_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_cotizacion_det','id_cotizacion_det','int4');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "b07fbb617fe508db06ebe4610c80b827", "score": "0.50962776", "text": "function getAttendance()\n {\n }", "title": "" }, { "docid": "bc4a9012af2581ac0898b47d92b36d9d", "score": "0.50903654", "text": "public function getAdminDividedLastYear(){\n try { \n $select = $this->select()\n \n ->from($this,array(\"alreadydivided\"=>\"SUM(with_satisfaction)\"))\n ->where('payment_status=?',1)\n ->where('YEAR(pay_date)=?',date('Y', strtotime('-1 year')));\n \n $res = $this->getAdapter()->fetchRow($select);\n if ($res){\n return $res;\n }\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n } \n \n }", "title": "" }, { "docid": "8ee4fea309b2f4b741f133848b09b267", "score": "0.50766915", "text": "public function getInscricaoestadual()\n {\n return $this->inscricaoestadual;\n }", "title": "" }, { "docid": "c00c6da095acfe80115038c27a61f1ae", "score": "0.5071323", "text": "public function despedida(){\n return \"Gracias por Visitarnos, Hasta pronto {$this->nombre}\";\n }", "title": "" }, { "docid": "f350f3602878eb3a12ae2deedf2a8441", "score": "0.50690895", "text": "function scoreLigne1() {\r\n $score = 0;\r\n if(lignePleine(0)) {\r\n $score = $this->nombres[0][11]; \r\n }else {\r\n for($num = 2;$num < 12;$num++) {\r\n if(estCase(0,$num) && $this->nombres[0][$num] != 0) {\r\n $score++;\r\n }\r\n }\r\n }\r\n return $score;\r\n }", "title": "" }, { "docid": "2c3436346a4fbafb7ebe3e3a0bbffce6", "score": "0.50625", "text": "function stok_gudang_expired()\n\t{\n\t\tif ($this->session->userdata('logged_in') == true)\n\t\t{\n\t\t\t$data['page_name'] = 'stok';\n\t\t\t$data['page_title'] = 'Stok Obat Gudang Expired';\n\t\t\t\n\t\t\t$data['list_obat']\t\t= $this->m_crud->get_list_obat('1');\n\t\t\t\n\t\t\t$this->template->display('stok_obat_gudang_expired', $data);\n\t\t} else {\n\t\t\tredirect('login');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "2e52ccd2862ad2545c8cfccafcfa4ab2", "score": "0.5059025", "text": "public function slogan();", "title": "" }, { "docid": "f8d57dda76ab3202ddac21ab4d7d1d65", "score": "0.50525296", "text": "public function getEscuela()\n\t{\n\t\t$escuelaEmpleado=0;\n\t\t$escuelaIngresada=Session::get('escuela');\n\t\t $tipo=Login::tipoEmpleado();\n\t\t$cod=Auth::user()->COD_EMPLEADO;\n\t\t$esc = DB::select('SELECT ee.COD_ESCUELA FROM empleado as e inner join empleado_escuela as ee on e.COD_EMPLEADO=ee.COD_EMPLEADO where e.COD_EMPLEADO=?',array($cod));\n\t\tif ($tipo==1 || $tipo==2) {\n\t\t\t$escuelaEmpleado=1;\n\t\t}\n\t\t foreach ($esc as $e) \n\t\t { \n\t\t \t$es=$e->COD_ESCUELA; \n\t\t \tif ($es==$escuelaIngresada) {\n\t\t \t\t$escuelaEmpleado=1;\n\t\t \t}\n\t\t }\n\t\t return $escuelaEmpleado;\n\t}", "title": "" }, { "docid": "7f53d4abd90f1ecb877ce8eacd39071f", "score": "0.5051958", "text": "public function setAdult($adult = false) {\n\t\t$this->getConfig()->setAdult($adult);\n\t}", "title": "" }, { "docid": "12b955486f43b66e64ed4103f4a83604", "score": "0.50496334", "text": "public function ultimoSaludo() {\n\t\treturn 'Saludo guardado: '.$this->ultimo_saludo;\n\t}", "title": "" }, { "docid": "d7452f92fad7ef1397f307edf2dd8b94", "score": "0.50486165", "text": "function anticipo(){//mamy\n\t\t//$numPoliza \t\t\t=\t $this->CaptPolizasModel->getLastNumPoliza();\n\t\t$Exercise = $this->CaptPolizasModel->getExerciseInfo();\n\t\t$Ex = $Exercise->fetch_assoc();\n\t\t$_SESSION['anticipo']=1;\n\t\tif(isset($_COOKIE['ejercicio']) AND isset($_COOKIE['periodo']))\n\t\t{\n\t\t\t$Ex['EjercicioActual'] = $_COOKIE['ejercicio'];\n\t\t\t$Ex['IdEx'] = $this->CaptPolizasModel->idex($_COOKIE['ejercicio']);\n\t\t\t$Ex['PeriodoActual'] = $_COOKIE['periodo'];\n\t\t}\n\t\tif($Ex['PeriodoActual'] != 13)\n\t\t{\n\t\t\t$this->CaptPolizasModel->savePoliza($Ex['IdOrganizacion'],$Ex['IdEx'],$Ex['PeriodoActual'],1,2);\n\t\t\techo \"<script>window.location = 'index.php?c=CaptPolizas&f=Capturar'</script>\";\n\t\t}\n\t\telseif($this->CaptPolizasModel->CuentaSaldosConfigurado() != -1)\n\t\t{\n\t\t\t$this->CaptPolizasModel->savePoliza($Ex['IdOrganizacion'],$Ex['Ejercicio'],$Ex['Periodo'],1,2);\n\t\t\techo \"<script>window.location = 'index.php?c=CaptPolizas&f=Capturar'</script>\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo \"Para generar la poliza del periodo 13 es necesario configurar la cuenta de saldos en la pantalla de Asignación de Cuentas.\";\n\t\t}\n\t}", "title": "" }, { "docid": "e13fe603124977024d0ea9d73f99d587", "score": "0.5044235", "text": "public static function informationOfActor(){\n\n if(self::PAYS == \"France\" && self::LANGUE == \"Fr\"){\n\n return \"<p>La lange est le français pour tout mes acteurs</p>\";\n }\n\n return \"<p> Aucune langue détécté</p>\";\n }", "title": "" }, { "docid": "28fed8d521ceb08882c7f1f222d19954", "score": "0.503782", "text": "abstract static function mehrKolonien();", "title": "" }, { "docid": "a0de0f258ee8f98e7e459731c95f0919", "score": "0.5035983", "text": "function vermenigvuldig($aantalkeer, $getal) {\n if ($aantalkeer == 0) {\n return 0;\n } else if ($aantalkeer == 1) {\n return $getal;\n } else {\n return vermenigvuldig($aantalkeer-1, $getal) + $getal;\n }\n}", "title": "" }, { "docid": "d26aa68e1e82470ac3076dd84b6a52dc", "score": "0.50339353", "text": "public function getEnseignants($anneeacad){\r\n $query = \"SELECT p.*, f.LIBELLE AS FK_FONCTION, \"\r\n . \"ar.LIBELLE AS FK_ARRONDISSEMENT, \"\r\n . \"dept.LIBELLE AS FK_DEPARTEMENT, \"\r\n . \"reg.LIBELLE AS FK_REGION, \"\r\n . \"stru.ETABLISSEMENT AS FK_STRUCTURE, \"\r\n . \"cat.LIBELLE AS FK_CATEGORIE, \"\r\n . \"di.LIBELLE AS FK_DIPLOME, \"\r\n . \"st.LIBELLE AS FK_STATUT \"\r\n . \"FROM personnels p \"\r\n . \"LEFT JOIN fonctions f ON f.IDFONCTION = p.FONCTION \"\r\n . \"LEFT JOIN arrondissements ar ON ar.IDARRONDISSEMENT = p.ARRONDISSEMENT \"\r\n . \"LEFT JOIN departements dept ON dept.IDDEPARTEMENT = ar.DEPARTEMENT \"\r\n . \"LEFT JOIN regions reg ON reg.IDREGION = dept.REGION \"\r\n . \"LEFT JOIN etablissements stru ON stru.IDETABLISSEMENT = p.STRUCTURE \"\r\n . \"LEFT JOIN categories cat ON cat.IDCATEGORIE = p.CATEGORIE \"\r\n . \"LEFT JOIN diplomes di ON di.IDDIPLOME = p.DIPLOME \"\r\n . \"LEFT JOIN statut_personnels st ON st.IDSTATUTPERSONNEL = p.STATUT \"\r\n . \"WHERE p.IDPERSONNEL IN (\"\r\n . \"SELECT ens.PROFESSEUR \"\r\n . \"FROM enseignements ens \"\r\n . \"INNER JOIN classes c ON c.IDCLASSE = ens.CLASSE AND c.ANNEEACADEMIQUE = :anneeacad\"\r\n . \") \"\r\n . \"ORDER BY p.NOM\";\r\n return $this->query($query, [\"anneeacad\" => $anneeacad]);\r\n }", "title": "" }, { "docid": "58d5cc3938e438393ff49f9e597b20b0", "score": "0.5033642", "text": "private function get_adm_seccion(): string\n {\n $funcion = __FUNCTION__;\n $evento = (new adm_seccion())->$funcion();\n if(errores::$error){\n return $this->error->error(mensaje: 'Error al obtener evento', data: $evento);\n }\n return $evento;\n }", "title": "" }, { "docid": "6359965f3bfdb5f1ee0d0c72a9eb23e7", "score": "0.50291884", "text": "function disponibilidad($comensales, $fecha, $hora){ //se podran hacer 20 comensales por hora\r\n $disponibilidad=false;\r\n\r\n $conn=conectarBD(); //la conexion dentro para solo abrirla en la reservas y no a todo aquel que entre en la web\r\n\r\n //sacar la suma de comensales\r\n $sql=\"SELECT SUM(comensales) as total_comensales FROM reserva WHERE fecha='$fecha' AND hora='$hora'\";\r\n $resultado=mysqli_query($conn, $sql); //el $resultado no es valido y hay que tratarlo\r\n $row=mysqli_fetch_assoc($resultado);\r\n $total_comensales=$row['total_comensales'];\r\n\r\n if($total_comensales+$comensales<=20){\r\n $disponibilidad=true;\r\n }\r\n\r\n desconectarBD($conn);\r\n\r\n return $disponibilidad;\r\n}", "title": "" }, { "docid": "122b065862d2486cd6664aea74fa2452", "score": "0.5027964", "text": "public function perimetrePave()\n {\n return ((parent::perimetre()*2)+($this->getHauteur()*4));\n }", "title": "" }, { "docid": "47507a1cf38ffceaa8d54313d2d0ecb3", "score": "0.5022139", "text": "public function checkAnniversary() {\n\t\t\t \n\t\t global $sessionHandler;\n\t\t $date = date('Y-m-d');\n\t\t $year = date('Y');\n\t\t\t \n\t\t $userId = $sessionHandler->getSessionVariable('UserId');\n\t\t\t\t \n\t\t $query = \"SELECT count(userId) as cnt from user_wishes where userId='\".add_slashes($userId).\"' and lastWishDate >= '\".$date.\"' and \n\t\t\t\t\t\t Year(lastWishDate) in('\".$year.\"') and wishBit> 0 AND wishFormat='A'\";\n\t\t \n\t\t return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\t\t\t\t\n }", "title": "" }, { "docid": "3e5aeac32ceab1dc6ddd6e029dd30e52", "score": "0.50204945", "text": "function addYear(){ $this->addYears(1); }", "title": "" }, { "docid": "13af7aa7dbfbf8972f0fc57331c48723", "score": "0.5020312", "text": "public function getRealSem()\n {\n date_default_timezone_set('US/Hawaii');\n $curDate = date('Y-m-d');\n $dateParts = explode('-',$curDate);\n $curYear = $dateParts[0];\n $curDate = strtotime(date('Ymd')); // current date timestamp\n $curMonth = $dateParts[1];\n\n\n $sprSummer = strtotime($curYear.\"0520\");\n $sumFall = strtotime($curYear.\"0820\");\n //die(var_dump($curDate));\n //die(var_dump($curDate > $sprSummer));\n\n if ($curDate < $sprSummer) {\n $this->curSem = \"Spring\";\n } else if ($curDate > $sumFall) {\n $this->curSem = 'Fall';\n } else {\n $this->curSem = 'Summer';\n }\n \n //if ($curMonth < 7) {\n // $this->curSem = 'Spring';\n //} else {\n // $this->curSem = 'Fall';\n //}\n \n $this->curSem .= ' ' . $curYear;\n //die($this->curSem);\n \n return $this->curSem;\n }", "title": "" }, { "docid": "4f01a3b45be0c695b20785e4f619b633", "score": "0.50186497", "text": "public function getCandidature();", "title": "" }, { "docid": "e2eebe4d8f435d36b977585443c9722e", "score": "0.5018628", "text": "function fetch_sum_data_paiement_date($jour1, $jour2)\n {\n $montant;\n $query = $this->db->query(\"SELECT SUM(montant) AS montant FROM profile_reservation WHERE jour BETWEEN '\".$jour1.\"' AND '\".$jour2.\"' AND etat_reservation=1 \");\n if ($query->num_rows() > 0) {\n # code...\n\n foreach ($query->result_array() as $key) {\n # code...\n $montant = $key['montant'];\n }\n }\n else{\n $montant = 0;\n }\n\n return $montant;\n }", "title": "" }, { "docid": "3860d4afb3361058d32fb8764e9eec66", "score": "0.50165206", "text": "public function ingresoValeEstado($date){\r\n\t\t$mes = $date['mes'];\r\n\t\t$year = $date['anio'];\r\n\t\t$anio = date('Y');\r\n\t\t\tif($year==$anio){\r\n\t\t\t$sql = (\"SELECT * FROM meses WHERE MesesCodigo = $mes AND estado = 1\");\r\n\t\t\t$consulta = $this->db->query($sql);\r\n\t\t\tif($consulta->num_rows() > 0){\r\n\t\t\t\treturn TRUE;\r\n\t\t\t}else{\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "30a0238f206156c8762f6b0caa9e445d", "score": "0.50151473", "text": "public static function spain()\n {\n return Self::where('nombre','Espana')->first()->id;\n }", "title": "" }, { "docid": "289a272640c68c34ecf0e4ffeeb51765", "score": "0.50076157", "text": "function apuesta($dinero)\n\t{\n\t\tif($_SESSION['cant_coincidencias']==2)\n\t\t{\n\t\t\t$dinero+=30;\n\t\t}\n\t\telseif($_SESSION['cant_coincidencias']==3)\n\t\t{\n\t\t\t$dinero+=50;\n\t\t}\n\t\telseif($_SESSION['cant_coincidencias']<=1)\n\t\t{\n\t\t\t$dinero-=10;\n\t\t}\n\t\treturn $dinero;\n\t}", "title": "" }, { "docid": "f096f1000eee777621e52821410abb1c", "score": "0.50064933", "text": "public function getAcompteDu() {\n return $this->acompteDu;\n }", "title": "" }, { "docid": "07370f8c850abc1a50e1641e3ff5a9f8", "score": "0.500602", "text": "function getDam(){ return $this->dam;}", "title": "" }, { "docid": "acc786b979d6808e6b7b94f0816f2ad1", "score": "0.50035554", "text": "function EnviarNuevaSolicitud()\n\t{}", "title": "" }, { "docid": "aa8d2c1fb55a1b7e9b4d8d9723140f82", "score": "0.50014997", "text": "function anos_servicio($f_ingreso,$f_actual)\r\n{\r\n$fecha_fin=explode(\"-\",$f_actual);\r\n$dia=$fecha_fin[2];\r\n$mes=$fecha_fin[1];\r\n$ano=$fecha_fin[0];\r\n//fecha de nacimiento\r\n$fecha=explode(\"/\", $f_ingreso);\r\n$dia_ingreso=$fecha[0];\r\n$mes_ingreso=$fecha[1];\r\n$ano_ingreso=$fecha[2];\r\n//si el mes es el mismo pero el dia inferior aun no ha cumplido años, le quitaremos un año al actual\r\nif (($mes_ingreso == $mes) && ($dia_ingreso > $dia)) {\r\n$ano=($ano-1); }\r\n//si el mes es superior al actual tampoco habra cumplido años, por eso le quitamos un año al actual\r\nif ($mes_ingreso > $mes) {\r\n$ano=($ano-1);}\r\n//ya no habria mas condiciones, ahora simplemente restamos los años y mostramos el resultado como su edad\r\n$anos_servicio=($ano-$ano_ingreso);\r\nreturn($anos_servicio);\r\n}", "title": "" }, { "docid": "82b8537f1c8218f893008a3287e1e86f", "score": "0.49944547", "text": "public function getSaida()\n {\n return $this->saida;\n }", "title": "" } ]
70a92dacb03bcd0c85a4ff34a07e2863
Post Type : Formulir
[ { "docid": "16a14f63d8c723ae8319cd8c8cfc11e5", "score": "0.68828636", "text": "function form_pt_init() {\r\n $labels = array(\r\n 'name' => _x('Formulir', 'post type general name', 'axa_financial'),\r\n 'singular_name' => _x('Formulir', 'post type singular name', 'axa_financial'),\r\n 'add_new' => _x('Add New', 'formulir', 'axa_financial'),\r\n 'add_new_item' => __('Add New Formulir', 'axa_financial'),\r\n 'edit_item' => __('Edit Branch', 'axa_financial'),\r\n 'new_item' => __('New Formulir', 'axa_financial'),\r\n 'all_items' => __('All Formulir', 'axa_financial'),\r\n 'view_item' => __('View Formulir', 'axa_financial'),\r\n 'search_items' => __('Search Formulir', 'axa_financial'),\r\n 'not_found' => __('No Formulir found', 'axa_financial'),\r\n 'not_found_in_trash' => __('No Formulir found in Trash', 'axa_financial'),\r\n 'parent_item_colon' => '',\r\n 'menu_name' => __('Formulir', 'axa_financial')\r\n\r\n );\r\n $args = array(\r\n 'labels' => $labels,\r\n 'public' => true,\r\n 'publicly_queryable' => true,\r\n 'show_ui' => true,\r\n 'show_in_menu' => true,\r\n 'query_var' => true,\r\n 'rewrite' => array( 'slug' => _x( 'form', 'URL slug', 'axa_financial' ) ),\r\n 'capability_type' => 'post',\r\n 'has_archive' => true,\r\n 'hierarchical' => false,\r\n 'menu_position' => null,\r\n 'supports' => array( 'title' )\r\n );\r\n register_post_type('form', $args);\r\n}", "title": "" } ]
[ { "docid": "8a9c5ddc0c50f0f2d8369ca5749d7646", "score": "0.7375725", "text": "public function getPostCustomPostType() : string;", "title": "" }, { "docid": "72d4d99fbeada8e33de4eb4922ba9bf6", "score": "0.71540374", "text": "function bbp_forum_post_type()\n{\n}", "title": "" }, { "docid": "297e12bcc963e7a2f47f23873014ff8d", "score": "0.7041628", "text": "static function register_post_type() {\r\n\t}", "title": "" }, { "docid": "862ca75df1fc6a9cf189e9712e896c3c", "score": "0.7024444", "text": "function createProofCustomPostType(){\n $labels = array(\n 'name' => _x( 'Proofs', 'Post Type General Name', 'crg_text_domain' ),\n 'singular_name' => _x( 'Proof', 'Post Type Singular Name', 'crg_text_domain' ),\n 'menu_name' => __( 'Proofs', 'crg_text_domain' ),\n 'parent_item_colon' => __( 'Parent Proof:', 'crg_text_domain' ),\n 'all_items' => __( 'All Proofs', 'crg_text_domain' ),\n 'view_item' => __( 'View Proof', 'crg_text_domain' ),\n 'add_new_item' => __( 'Add New Proof', 'crg_text_domain' ),\n 'add_new' => __( 'Add New', 'crg_text_domain' ),\n 'edit_item' => __( 'Edit Proof', 'crg_text_domain' ),\n 'update_item' => __( 'Update Proof', 'crg_text_domain' ),\n 'search_items' => __( 'Search Proof', 'crg_text_domain' ),\n 'not_found' => __( 'Not found', 'crg_text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'crg_text_domain' ),\n );\n $args = array(\n 'label' => __( 'Proof', 'crg_text_domain' ),\n 'description' => __( 'Proofs', 'crg_text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'trackbacks', 'revisions', 'custom-fields'),\n 'taxonomies' => array( 'Proof-type' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n //'menu_icon' => $menu_icon,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'post',\n );\n register_post_type('Proof', $args);\n \n wp_insert_term( __('Wordpress'),'Proof-type', array( 'description' => __('A link to a Wordpress ad'),'slug' => 'feature'));\n }", "title": "" }, { "docid": "e2469c21c0396cc0aebce7ed0188a2de", "score": "0.70236564", "text": "private function registerType () {\n // Check if not empty\n if (empty($this->args) === false) {\n // Register the post type to the back-end\n register_post_type(\"forms\", $this->args);\n }\n }", "title": "" }, { "docid": "7b62b64183d67828be36088487d94a59", "score": "0.7022326", "text": "public static function create_form_lift_post_type() {\n\t\t//forms\n\t\t$labels = array(\n\t\t\t'name' => __( 'FormLift' ),\n\t\t\t'singular_name' => __( 'Infusionsoft Form' ),\n\t\t\t'add_new' => __( 'Add Form' ),\n\t\t\t'add_new_item' => __( 'Add Form' ),\n\t\t\t'all_items' => __( 'All Forms' ),\n\t\t\t'edit_item' => __( 'Edit Form' ),\n\t\t\t'new_item' => __( 'New Form' ),\n\t\t\t'view' => __( 'View' ),\n\t\t\t'view_item' => __( 'View Form' ),\n\t\t\t'search_items' => __( 'Search Forms' ),\n\t\t\t'not_found' => __( 'No Forms Found' ),\n\t\t\t'not_found_in_trash' => __( 'No Forms Found In Trash' ),\n\t\t\t'archives' => __( 'Form Archives' )\n\t\t);\n\n\t\t$args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => false, // it's not public, it shouldn't have it's own permalink, and so on\n\t\t\t'publicly_queryable' => true, // you should be able to query it\n\t\t\t'show_ui' => true, // you should be able to edit it in wp-admin\n\t\t\t'exclude_from_search' => true, // you should exclude it from search results\n\t\t\t'show_in_nav_menus' => false, // you shouldn't be able to add it to menus\n\t\t\t'has_archive' => false, // it shouldn't have archive page\n\t\t\t'rewrite' => array(\n\t\t\t\t'slug' => 'forms'\n\t\t\t), // it shouldn't have rewrite rules\n\t\t\t'show_in_admin_bar' => false,\n\t\t\t'menu_icon' => plugins_url( 'assets/images/icon-20x20.png', __FILE__ ),\n\t\t\t'capability_type' => 'post',\n\t\t\t'map_meta_cap' => true,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'author',\n// 'editor'\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( 'infusion_form', $args );\n\n\t\t//campaigns\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Campaign', 'taxonomy general name', 'textdomain' ),\n\t\t\t'singular_name' => _x( 'Campaign', 'taxonomy singular name', 'textdomain' ),\n\t\t\t'search_items' => __( 'Search Campaigns', 'textdomain' ),\n\t\t\t'all_items' => __( 'All Campaigns', 'textdomain' ),\n\t\t\t'parent_item' => __( 'Parent Campaign', 'textdomain' ),\n\t\t\t'parent_item_colon' => __( 'Parent Campaign:', 'textdomain' ),\n\t\t\t'edit_item' => __( 'Edit Campaign', 'textdomain' ),\n\t\t\t'update_item' => __( 'Update Campaign', 'textdomain' ),\n\t\t\t'add_new_item' => __( 'Add New Campaign', 'textdomain' ),\n\t\t\t'new_item_name' => __( 'New Campaign Name', 'textdomain' ),\n\t\t\t'menu_name' => __( 'Campaigns', 'textdomain' )\n\t\t);\n\n\t\t$args = array(\n\t\t\t'hierarchical' => true,\n\t\t\t'labels' => $labels,\n\t\t\t'show_ui' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'campaign' ),\n\t\t);\n\n\t\tregister_taxonomy(\n\t\t\t'campaigns',\n\t\t\tarray( 'infusion_form' ),\n\t\t\t$args\n\t\t);\n\t}", "title": "" }, { "docid": "8cdebbb7484b91d48601feea14a1fab1", "score": "0.6939817", "text": "function type() {\n\t\treturn $this->_post->post_type;\n\t}", "title": "" }, { "docid": "46da3e89694295f12e6f3ae5fffdbeeb", "score": "0.6931577", "text": "function cfcpt_save_custom_post_type($post_id,$post) {\n\t\tglobal $wpdb;\n\t\tif($post->post_type == 'revision') { return; }\n\t\t// if(isset($_POST['cfcpt'])) {\n\t\t// \t$post_type = get_post_meta($post_id,'_post_type',true);\n\t\t// \tcfcpt_update_post($post_id,$post_type);\n\t\t// }\n\t}", "title": "" }, { "docid": "29a1d361f6077908f6f9ad411bb61062", "score": "0.68480796", "text": "function jcf_set_post_type( $post_type ){\n\tglobal $jcf_post_type;\n\t$jcf_post_type = $post_type;\n}", "title": "" }, { "docid": "0f8299e520dd4f330da1b5c9feb5cf48", "score": "0.6805507", "text": "function jcf_get_post_type(){\n\tglobal $jcf_post_type;\n\treturn $jcf_post_type;\n}", "title": "" }, { "docid": "6a75d388a58b2f44f7c95beda21b14a6", "score": "0.67969966", "text": "function settings_post_types_option() {\n\t\tglobal $edit_flow;\n\t\t$edit_flow->settings->helper_option_custom_post_type( $this->module );\n\t}", "title": "" }, { "docid": "d6355638ad1c63c86ad1d379cfd8b7b0", "score": "0.6742195", "text": "public function getPostTypeName();", "title": "" }, { "docid": "ceace6def4e368c5c976edb4f7e4ef09", "score": "0.6731133", "text": "function rep_create_post_type() {\n\t/*$name = 'name';\n\n\tregister_post_type(\n\t\t$name,\n\t\tarray(\n\t\t\t'labels' => Rep\\Helpers\\post_type_labels( $name ),\n\t\t\t'public' => true,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'query_var' => true,\n\t\t\t'capability_type' => 'post',\n\t\t\t'has_archive' => false,\n\t\t\t'hierarchical' => false,\n\t\t\t'menu_position' => 99,\n\t\t\t'supports' => array(\n\t\t\t\t'title',\n\t\t\t\t'editor',\n\t\t\t\t'thumbnail',\n\t\t\t\t'excerpt',\n\t\t\t\t'custom-fields',\n\t\t\t\t'page-attributes',\n\t\t\t)\n\t\t)\n\t);*/\n}", "title": "" }, { "docid": "45447f53e9b51de0368515bfda25280b", "score": "0.6726132", "text": "function opubco_register_post_types()\n{\n //Register post types here (using register_post_type)\n}", "title": "" }, { "docid": "820b1e9cde16e1d4d0dc09190ea5c2a6", "score": "0.67137885", "text": "function bbp_reply_post_type()\n{\n}", "title": "" }, { "docid": "4855565cd7fde16217e0a197dc93a3d6", "score": "0.6679255", "text": "function bbp_topic_post_type()\n{\n}", "title": "" }, { "docid": "079474800103a86ab926a317fb2d2e67", "score": "0.6667349", "text": "function testimony_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Testimonios', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Testimonio', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Testimonios', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Testimonio', 'text_domain' ),\n\t\t'archives' => __( 'Testimonio Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Testimonio Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Testimonio:', 'text_domain' ),\n\t\t'all_items' => __( 'Todos los testimonios', 'text_domain' ),\n\t\t'add_new_item' => __( 'Añadir Testimonio', 'text_domain' ),\n\t\t'add_new' => __( 'Añadir Testimonio', 'text_domain' ),\n\t\t'new_item' => __( 'Nuevo Testimonio', 'text_domain' ),\n\t\t'edit_item' => __( 'Editar Testimonio', 'text_domain' ),\n\t\t'update_item' => __( 'Actualizar Testimonio', 'text_domain' ),\n\t\t'view_item' => __( 'Ver Testimonio', 'text_domain' ),\n\t\t'view_items' => __( 'Ver Testimonios', 'text_domain' ),\n\t\t'search_items' => __( 'Buscar Testimonio', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into testimonio', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this testimonio', 'text_domain' ),\n\t\t'items_list' => __( 'Lista de Testimonios', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Navegación de la lista de testimonios', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filtrar la lista de testimonios', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Testimonio', 'text_domain' ),\n\t\t'description' => __( 'testimonio de clientes y colaboradores', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array('title', 'editor', 'thumbnail', 'page-attributes', 'post-formats', ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-admin-comments',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'testimony', $args );\n\n}", "title": "" }, { "docid": "5bf5f09bb34d49b7afe0d703b728ea99", "score": "0.6654758", "text": "function web_post_type(){\r\n register_post_type('Web Development',\r\n array(\r\n 'rewrite' => array('slug' => 'Web Development'),\r\n 'labels' => array(\r\n 'name' => 'Web Development',\r\n 'singular_name' => 'Web Development',\r\n 'add_new_item' => 'Add New Web Development',\r\n 'edit_item' => 'Edit Web Development'\r\n ),\r\n 'menu-icon' => 'dashicons-editor-removeformatting',\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title', 'thumbnail', 'editor', 'excerpt', 'comments'\r\n )\r\n )\r\n );\r\n}", "title": "" }, { "docid": "6d94316e3873137a63b256b5612727d8", "score": "0.6627996", "text": "function register_post_types()\n{\n // GET CPTUI Fields\n require \"config/cptui-settings.php\";\n}", "title": "" }, { "docid": "4f8801d8665122e0eb3f0bbd90d661df", "score": "0.66179514", "text": "public function create_post_type() {\n\n\t\t\t$this->register_post_type( array(\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'menu_position' => 6.9,\n\t\t\t\t'menu_icon' => 'dashicons-star-filled',\n\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t'show_in_nav_menus' => false,\n\t\t\t\t'can_export' => true,\n\t\t\t\t'has_archive' => false,\n\t\t\t\t'exclude_from_search' => true,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'rewrite' => false,\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t'register_rating' => 'add_rating_metabox',\n\t\t\t\t'show_in_rest' => true,\n\t\t\t) );\n\n\t\t}", "title": "" }, { "docid": "170358143226370deca15c6c37485c73", "score": "0.6610077", "text": "function _add_cf7bdb_post_type()\n{\n register_post_type( 'cf7bdb_entries', array(\n 'label' => 'CF7 Better Database Plugin Entries',\n 'labels' => array(\n 'singular_name' => 'CF7BDB Entry',\n 'all_items' => 'View Entries',\n 'edit_item' => 'Edit Entry',\n 'new_item' => 'New Entry',\n 'view_item' => 'View Entry',\n 'search_items' => 'Search Form Submissions',\n 'not_found' => 'No matching entries were found',\n 'menu_name' => 'CF7 Entries',\n ),\n 'description' => 'Submitted form entries for Contact Form 7.',\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'hierarchical' => true, // Allows specifying a parent, which will be the Form ID\n 'supports' => array('title', 'editor', 'author', 'custom-fields', 'revisions'),\n ) );\n}", "title": "" }, { "docid": "fb4556f0ffefc8d48c95cb25f4d12455", "score": "0.65982187", "text": "function register_acm_post_type() {\n\t\tregister_post_type( $this->post_type, array( 'labels' => $this->post_type_labels, 'public' => false, 'rewrite' => false ) );\n\t}", "title": "" }, { "docid": "d09038ba1a9daaafe57ec5cc4953efbd", "score": "0.659523", "text": "public function registerPostType() {\n $args = array(\n 'label' => $this->label,\n 'description' => 'This post type describes a data storage for data of different data types',\n 'public' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => false,\n 'menu_position' => 12,\n 'menu_icon' => 'dashicons-portfolio',\n 'taxonomies' => array(\n $this->getTypeTaxonomyName()\n ),\n 'has_archive' => false,\n 'map_meta_cap' => true,\n 'supports' => array(\n 'title',\n 'editor'\n )\n );\n register_post_type(\n $this->post_type,\n $args\n );\n }", "title": "" }, { "docid": "155d3f7fbb6829f0daa58a9118f740e4", "score": "0.6589879", "text": "function contact_post_type() {\n // Labels\n $labels = array(\n 'name' => _x(\"Kontaktinfos\", \"post type general name\"),\n 'singular_name' => _x(\"Kontaktinfos\", \"post type singular name\"),\n 'menu_name' => 'Kontaktinfos',\n 'add_new' => _x(\"Neue Kontaktinformation\", \"Produkt\"),\n 'add_new_item' => __(\"Kontaktinformation Hinzufügen\"),\n 'edit_item' => __(\"Kontaktinformation bearbeiten\"),\n 'new_item' => __(\"Neue Kontaktinformation\"),\n 'view_item' => __(\"Kontaktinformation öffnen\"),\n 'search_items' => __(\"Kontaktinformation suchen\"),\n 'not_found' => __(\"Keine Kontaktinformationen gefunden.\"),\n 'not_found_in_trash' => __(\"Keine Kontaktinformationen im Papierkorb gefunden.\"),\n 'parent_item_colon' => ''\n );\n // Register post type\n register_post_type('contactinfo' , array(\n 'labels' => $labels,\n 'public' => true,\n 'has_archive' => false,\n 'menu_icon' => 'dashicons-id-alt',\n 'rewrite' => array('slug' => 'contactinfo'),\n 'supports' => array('title', 'editor')\n ) );\n}", "title": "" }, { "docid": "27a6e9152ea69ad60639ac8605cd1a34", "score": "0.6589406", "text": "private function registerMetaformType() {\n register_post_type ('metaform', [\n 'labels' => [\n 'name' => __( 'Metaforms', 'metaform' ),\n 'singular_name' => __( 'Metaform', 'metaform' ),\n 'add_new' => __( 'Add Metaform', 'metaform' ),\n 'add_new_item' => __( 'Add New Metaform', 'metaform' ),\n 'edit_item' => __( 'Edit Metaform', 'metaform' ),\n 'new_item' => __( 'New Metaform', 'metaform' ),\n 'view_item' => __( 'View Metaform', 'metaform' ),\n 'search_items' => __( 'Search Metaforms', 'metaform' ),\n 'not_found' => __( 'No Metaforms found', 'metaform' ),\n 'not_found_in_trash' => __( 'No Metaforms in trash', 'metaform' ),\n 'menu_name' => __( 'Metaforms', 'metaform' ),\n 'all_items' => __( 'Metaforms', 'metaform' )\n ],\n 'taxonomies' => ['category'],\n 'public' => true,\n 'has_archive' => true,\n 'show_in_rest' => true,\n 'supports' => ['title', 'editor'],\n 'capabilities' => [\n 'edit_post' => 'metaform_edit', \n 'read_post' => 'metaform_read', \n 'delete_post' => 'metaform_delete', \n 'edit_posts' => 'metaform_edit', \n 'edit_others_posts' => 'metaform_edit_others', \n 'publish_posts' => 'metaform_publish',\n 'read_private_posts' => 'metaform_read_private', \n 'create_posts' => 'metaform_edit', \n ]\n ]);\n }", "title": "" }, { "docid": "3dc41a3fbc8088098c35411931f1f8d3", "score": "0.65887666", "text": "function getACFLayoutPostType()\n{\n\n $name = [\n 'label' => 'Name',\n 'name' => 'name',\n 'type' => 'text',\n 'instructions' => 'Non utilizzare spazio o lettere maiuscole.',\n 'required' => 0,\n 'wrapper' => [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ];\n\n $placeholder = [\n 'label' => 'Placeholder',\n 'name' => 'placeholder',\n 'type' => 'text',\n 'instructions' => '',\n 'required' => 0,\n 'wrapper' => [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ];\n\n $width = [\n 'label' => 'Width',\n 'name' => 'width',\n 'type' => 'text',\n 'instructions' => 'Utilizzare le classi di bootstrap',\n 'required' => 0,\n 'wrapper' => [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => 'col-lg-12',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ];\n\n $text = [\n 'label' => 'Testo',\n 'name' => 'text',\n 'type' => 'text',\n 'instructions' => '',\n 'required' => 0,\n 'wrapper' => [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ];\n\n $required = [\n 'label' => 'Campo Obbligatorio',\n 'name' => 'required',\n 'type' => 'true_false',\n 'instructions' => '',\n 'required' => 0,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'message' => '',\n 'default_value' => 0,\n 'ui' => 1,\n 'ui_on_text' => '',\n 'ui_off_text' => '',\n ];\n\n $icon = [\n 'label' => 'Icona',\n 'name' => 'icon',\n 'type' => 'image',\n 'instructions' => '',\n 'required' => 0,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'return_format' => 'array',\n 'preview_size' => 'medium',\n 'library' => 'all',\n 'min_width' => '',\n 'min_height' => '',\n 'min_size' => '',\n 'max_width' => '',\n 'max_height' => '',\n 'max_size' => '',\n 'mime_types' => '',\n ];\n\n\n return [\n [\n 'label' => 'Email destinatario',\n 'name' => 'to',\n 'type' => 'text',\n 'instructions' => 'Lasciare vuota per inviare la mail alla mail impostata sulle impostazioni',\n 'required' => 0,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ],\n [\n 'label' => 'Oggetto email',\n 'name' => 'object',\n 'type' => 'text',\n 'instructions' => '',\n 'required' => 0,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => '',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ],\n [\n 'label' => 'Header From',\n 'name' => 'headerFrom',\n 'type' => 'text',\n 'instructions' => '',\n 'required' => 0,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => 'From: nome sito <[email protected]>',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ],\n [\n 'label' => 'Header ReplyTo',\n 'name' => 'headerReplyTo',\n 'type' => 'text',\n 'instructions' => '',\n 'required' => 0,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => 'Reply-To: [nome] <[email]>',\n 'placeholder' => '',\n 'prepend' => '',\n 'append' => '',\n 'maxlength' => '',\n ],\n [\n 'label' => 'Campi del form',\n 'name' => 'campiForm',\n 'type' => 'flexible_content',\n 'instructions' => '',\n 'required' => 1,\n 'wrapper' => [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'layouts' => [\n 'text' => [\n 'name' => 'text',\n 'label' => 'Text',\n 'display' => 'block',\n 'sub_fields' => [\n $name,\n $placeholder,\n $width,\n $required\n ],\n 'min' => '',\n 'max' => '',\n ],\n 'email' => [\n 'name' => 'email',\n 'label' => 'Email',\n 'display' => 'block',\n 'sub_fields' => [\n $name,\n $placeholder,\n $width,\n $required\n ],\n 'min' => '',\n 'max' => '',\n ],\n 'file' => [\n 'name' => 'file',\n 'label' => 'File',\n 'display' => 'block',\n 'sub_fields' => [\n $name,\n $placeholder,\n $width,\n $required,\n $icon\n ],\n 'min' => '',\n 'max' => '',\n ],\n 'textarea' => [\n 'name' => 'textarea',\n 'label' => 'Area di testo',\n 'display' => 'block',\n 'sub_fields' => [\n $name,\n $placeholder,\n $width,\n $required\n ],\n 'min' => '',\n 'max' => '',\n ],\n 'checkbox' => [\n 'name' => 'checkbox',\n 'label' => 'Checkbox',\n 'display' => 'block',\n 'sub_fields' => [\n $name,\n $text,\n $width,\n $required\n ],\n 'min' => '',\n 'max' => '',\n ],\n 'data' => [\n 'name' => 'data',\n 'label' => 'Data',\n 'display' => 'block',\n 'sub_fields' => [\n $name,\n $placeholder,\n $width,\n $required\n ],\n 'min' => '',\n 'max' => '',\n ],\n 'ora' => [\n 'name' => 'ora',\n 'label' => 'Ora',\n 'display' => 'block',\n 'sub_fields' => [\n $name,\n $placeholder,\n $width,\n ],\n 'min' => '',\n 'max' => '',\n ],\n 'button' => [\n 'name' => 'button',\n 'label' => 'Pulsante di invio',\n 'display' => 'block',\n 'sub_fields' => [\n $text,\n $width,\n ],\n 'min' => '',\n 'max' => '',\n ],\n ],\n 'button_label' => 'Aggiungi Campo',\n 'min' => '',\n 'max' => '',\n ],\n [\n 'label' => 'Contenuto Mail',\n 'name' => 'content_mail',\n 'type' => 'textarea',\n 'instructions' => 'Inserire il contenuto della mail che arriverà all\\'amministratore del sito oppure alla mail in alto, se inserita.<br>\n Richiamare i campi con le parentesi quadre []<br>\n Ad esempio, se ho creato un campo che ha come nome \"telefono\", lo posso richiamare con la stringa \"[telefono]\"',\n 'required' => 1,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => '',\n 'placeholder' => '',\n 'maxlength' => '',\n 'rows' => 3,\n 'new_lines' => 'br',\n ],\n [\n 'label' => 'Inserire i campi da allegare alla mail come file',\n 'name' => 'attachment',\n 'type' => 'textarea',\n 'instructions' => 'Esempio se il campo si chiama file-pdf: [file-pdf]',\n 'required' => 0,\n 'wrapper' => \n [\n 'width' => '',\n 'class' => '',\n 'id' => '',\n ],\n 'default_value' => '',\n 'placeholder' => '',\n 'maxlength' => '',\n 'rows' => 3,\n 'new_lines' => '',\n ],\n ];\n}", "title": "" }, { "docid": "a4951a4e9056e1abbe162c1c3265f6ce", "score": "0.6578205", "text": "function sugarforms_custom_post_types() {\n global $sugar_icon;\n register_post_type ('sugarform',array(\n 'labels'=>array(\n 'name'=>__('SugarForms'),\n 'singular_name'=>__('SugarForm'),\n 'add_new' => __('Add New'),\n 'add_new_item' => __('Add New Form'),\n 'edit_item' => __('Edit Form')\n ),\n 'description'=>'SugarForms',\n 'menu_icon'=>$sugar_icon,\n 'menu_position'=>105,\n 'public'=>true,\n 'has_archive'=>false,\n 'show_ui'=>true,\n 'show_in_nav_menus' => false,\n 'supports'=>array('title','editor'),\n 'rewrite' => array( 'slug' => 'sugarform', 'with_front' => true ),\n 'can_export'=>true\n ));\n \n // flush rewrite rules\n //flush_rewrite_rules( $hard );\n }", "title": "" }, { "docid": "b1621b1036546dd20983ce29add32223", "score": "0.6560737", "text": "function register_post_types(){\n\t\t}", "title": "" }, { "docid": "25d8b1770fa4bf4b4aa8f593d6adf3a9", "score": "0.6538686", "text": "function create_travel_films_post_type() {\n\tif (get_field('travel_films_post_type_label', 'option')) {\n\t\t$travel_films_label = get_field('travel_films_post_type_label', 'option');\n\t} else {\n\t\t$travel_films_label = 'Travel Films';\n\t}\n\n\t// Set the portfolio post type slug\n\tif (get_field('travel_films_post_type_slug', 'option')) {\n\t\t$travel_films_slug = get_field('travel_films_post_type_slug', 'option');\n\t} else {\n\t\t$travel_films_slug = 'travel-films';\n\t}\n\n\tregister_post_type( 'travel-films',\n\t\tarray(\n\t\t\t'labels' => array(\n\t\t\t\t'name'\t\t\t=> __( $travel_films_label ),\n\t\t\t\t'singular_name' => __( $travel_films_label )\n\t\t\t),\n\t\t'public' \t\t=> true,\n\t\t'has_archive' \t=> false,\n\t\t'menu_position' => 20,\n\t\t'rewrite' => array('slug' => $travel_films_slug),\n\t\t'menu_icon' \t=> 'dashicons-screenoptions',\n\t\t'supports' \t\t=> array('title', 'thumbnail', 'editor'),\n\t\t'taxonomies' \t=> array('travel-films-categories', 'travel-films-tags')\n\t\t)\n\t);\n\n\tadd_post_type_support( 'travel-films', 'post-formats', array( 'image', 'video', 'link', 'audio' ) );\n}", "title": "" }, { "docid": "dd1f6952e0421f1cfc66d0934db916ec", "score": "0.65384924", "text": "public function setup_post_type() {\n\t\tnew WPGP_CPT_GUEST_POST();\n\t}", "title": "" }, { "docid": "5ce1541a331785b9b01b9c65d92f5fa2", "score": "0.6534088", "text": "public function add_post_type_support() {\n\t\tadd_post_type_support( APP_POST_TYPE, AMP_QUERY_VAR );\n\t}", "title": "" }, { "docid": "cbdb1009a80c16350c103c5dd69cac9c", "score": "0.65264004", "text": "function wpmudev_create_post_type() {\n\n\t// set up labels\n$labels = array(\n'name' => 'Testimony Entries',\n'singular_name' => 'Testimony Entry',\n'add_new' => 'Add New Testimony',\n'add_new_item' => 'Add New Testimony Entry',\n'edit_item' => 'Edit Testimony',\n'new_item' => 'New Testimony',\n'all_items' => 'All Testimony',\n'view_item' => 'View Testimony',\n'search_items' => 'Search Testimony',\n'not_found' => 'No Testimony Entries Found',\n'not_found_in_trash' => 'No Testimony Entries found in Trash',\n'parent_item_colon' => '',\n'menu_name' => 'Testimonies',\n);\n//register post type\nregister_post_type( 'powell-testimony', array(\n'labels' => $labels,\n'has_archive' => true,\n'public' => true,\n'supports' => array( 'title'),\n'exclude_from_search' => true,\n'capability_type' => 'post',\n'rewrite' => array( 'slug' => 'Testimony' ),\n)\n);\n \n}", "title": "" }, { "docid": "8b06fa3228cd352139b18b384016d70b", "score": "0.6526186", "text": "function service_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Services', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Service', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Servicios', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Servicios', 'text_domain' ),\n\t\t'archives' => __( 'Archivo de servicio', 'text_domain' ),\n\t\t'attributes' => __( 'Atributos de servicio', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Servicio principal', 'text_domain' ),\n\t\t'all_items' => __( 'Todos los servicios', 'text_domain' ),\n\t\t'add_new_item' => __( 'Añadir nuevo servicio', 'text_domain' ),\n\t\t'add_new' => __( 'Añadir nuevo', 'text_domain' ),\n\t\t'new_item' => __( 'Nuevo servicio', 'text_domain' ),\n\t\t'edit_item' => __( 'Editar servicio', 'text_domain' ),\n\t\t'update_item' => __( 'Actualizar servicio', 'text_domain' ),\n\t\t'view_item' => __( 'Ver servicio', 'text_domain' ),\n\t\t'view_items' => __( 'Ver servicios', 'text_domain' ),\n\t\t'search_items' => __( 'Buscar servicio', 'text_domain' ),\n\t\t'not_found' => __( 'No encontrado', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'No encontrado en la papelera', 'text_domain' ),\n\t\t'featured_image' => __( 'Imagen destacada', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Establecer imagen destacada', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remover imagen destacada', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Usar como imagen destacada', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insertar en el servicio', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Subido a este servicio', 'text_domain' ),\n\t\t'items_list' => __( 'Lista de servicios', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Lista de navegación de servicios', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filtrar lista de servicios', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Service', 'text_domain' ),\n\t\t'description' => __( 'Servicios en la página de inicio', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'menu_icon' => 'dashicons-awards',\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'service', $args );\n\n}", "title": "" }, { "docid": "09aa1de26dd41fdac6ca418e34c0ca50", "score": "0.6518539", "text": "public function type()\n {\n return static::POST;\n }", "title": "" }, { "docid": "68fc6931aca07357df27b2bd9284b675", "score": "0.65175444", "text": "function register_post_type() {\n register_post_type( 'cfs', array(\n 'public' => false,\n 'show_ui' => true,\n 'capability_type' => 'page',\n 'hierarchical' => false,\n 'supports' => array( 'title' ),\n 'menu_icon' => 'dashicons-carrot',\n 'query_var' => false,\n 'menu_position' => 120,\n 'labels' => array(\n 'name' => __( 'Field Groups', 'cfs' ),\n 'singular_name' => __( 'Field Group', 'cfs' ),\n 'all_items' => __( 'All Field Groups', 'cfs' ),\n 'add_new_item' => __( 'Add New Field Group', 'cfs' ),\n 'edit_item' => __( 'Edit Field Group', 'cfs' ),\n 'new_item' => __( 'New Field Group', 'cfs' ),\n 'view_item' => __( 'View Field Group', 'cfs' ),\n 'search_items' => __( 'Search Field Groups', 'cfs' ),\n 'not_found' => __( 'No Field Groups found', 'cfs' ),\n 'not_found_in_trash' => __( 'No Field Groups found in Trash', 'cfs' ),\n ),\n ));\n }", "title": "" }, { "docid": "cee3fa4c664f686fd6e3249295a8f385", "score": "0.6514234", "text": "function bbp_form_forum_type()\n{\n}", "title": "" }, { "docid": "a6c0c9dc90b6c31fe4036ffceadd3da2", "score": "0.6509718", "text": "public static function setPostType($post_type): void;", "title": "" }, { "docid": "81b56f7e26c080cba481c93999475905", "score": "0.6508424", "text": "function custom_post_type() {\n $labels = array(\n 'name' => _x('pekar', 'Post Type General Name', 'text_domain'),\n 'singular_name' => _x('pekar', 'Post Type Singular Name', 'text_domain'),\n 'menu_name' => __('Pekar', 'text_domain'),\n 'name_admin_bar' => __('Pekar', 'text_domain'),\n 'archives' => __('Item Archives', 'text_domain'),\n 'attributes' => __('Item Attributes', 'text_domain'),\n 'parent_item_colon' => __('Parent Item:', 'text_domain'),\n 'all_items' => __('All Items', 'text_domain'),\n 'add_new_item' => __('Add New Item', 'text_domain'),\n 'add_new' => __('Add New', 'text_domain'),\n 'new_item' => __('New Item', 'text_domain'),\n 'edit_item' => __('Edit Item', 'text_domain'),\n 'update_item' => __('Update Item', 'text_domain'),\n 'view_item' => __('View Item', 'text_domain'),\n 'view_items' => __('View Items', 'text_domain'),\n 'search_items' => __('Search Item', 'text_domain'),\n 'not_found' => __('Not found', 'text_domain'),\n 'not_found_in_trash' => __('Not found in Trash', 'text_domain'),\n 'featured_image' => __('Featured Image', 'text_domain'),\n 'set_featured_image' => __('Set featured image', 'text_domain'),\n 'remove_featured_image' => __('Remove featured image', 'text_domain'),\n 'use_featured_image' => __('Use as featured image', 'text_domain'),\n 'insert_into_item' => __('Insert into item', 'text_domain'),\n 'uploaded_to_this_item' => __('Uploaded to this item', 'text_domain'),\n 'items_list' => __('Items list', 'text_domain'),\n 'items_list_navigation' => __('Items list navigation', 'text_domain'),\n 'filter_items_list' => __('Filter items list', 'text_domain'),\n );\n $args = array(\n 'label' => __('Pekar', 'text_domain'),\n 'description' => __('Post Type Description', 'text_domain'),\n 'labels' => $labels,\n 'supports' => array(),\n 'taxonomies' => array('category', 'post_tag'),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'show_in_admin_bar' => true,\n 'show_in_nav_menus' => true,\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'capability_type' => 'page',\n );\n register_post_type('Pekar', $args);\n}", "title": "" }, { "docid": "1ddf55d4f4f7022561be8ab1ecd3a4a4", "score": "0.6505868", "text": "function bbp_register_post_types()\n{\n}", "title": "" }, { "docid": "d4379e2b9a2fb2d86a1db54524e9c64c", "score": "0.64983356", "text": "function questionnaire_renewal_custom_post_type() {\n register_post_type('questionnaire_renew', array(\n 'public' => true,\n 'labels' => array(\n 'name' => __( 'Questionnaires Renewal' ),\n 'singular_name' => __( 'Questionnaire Renewal' )\n ),\n 'public' => true,\n 'supports' => array( 'title', 'author', 'custom-fields'),\n ));\n}", "title": "" }, { "docid": "e10993611f1affc6f27fe288fa5100e8", "score": "0.64959013", "text": "public function setting_text_post_type() {\n $args = array(\n 'class' => 'code'\n );\n $this->setting_text_input( 'post_type', $args );\n }", "title": "" }, { "docid": "050e2a56ff86f13a27aca73d2dbfc285", "score": "0.6472428", "text": "public function __construct () {\n\n // Post type labels\n $this->labels = [\n \"name\" => _x( \"Forms\", \"Post Type General Name\", \"text_domain\" ),\n \"singular_name\" => _x( \"Form\", \"Post Type Singular Name\", \"text_domain\" ),\n \"menu_name\" => __( \"Forms\", \"text_domain\" ),\n \"name_admin_bar\" => __( \"Form\", \"text_domain\" ),\n \"add_new_item\" => __( \"Add new form\", \"text_domain\" ),\n ];\n\n // Post type arguments\n $this->args = [\n \"label\" => __( \"Form\", \"text_domain\" ),\n \"description\" => __( \"All available forms that are registered within the site\", \"text_domain\" ),\n \"labels\" => $this->labels,\n \"supports\" => [\"title\"],\n \"hierarchical\" => false,\n \"public\" => false,\n \"show_ui\" => true,\n \"show_in_menu\" => true,\n \"menu_position\" => 80,\n \"menu_icon\" => \"dashicons-email\",\n \"show_in_admin_bar\" => true,\n \"show_in_nav_menus\" => true,\n \"can_export\" => false,\n \"has_archive\" => false,\n \"exclude_from_search\" => true,\n \"publicly_queryable\" => false,\n \"rewrite\" => false,\n 'map_meta_cap'\t\t => false,\n \"capability_type\" => \"form\",\n \"capabilities\" => [\n \"publish_posts\" => \"publish_form\",\n \"edit_posts\" => \"edit_form\",\n \"edit_others_posts\" => \"edit_others_form\",\n \"delete_posts\" => \"delete_form\",\n \"delete_others_posts\" => \"delete_others_form\",\n \"read_private_posts\" => \"read_private_form\",\n \"edit_post\" => \"edit_form\",\n \"delete_post\" => \"delete_form\",\n \"read_post\" => \"read_form\",\n ]\n ];\n\n // Options page options\n $this->options = [\n \"page_title\" => \"Settings\",\n \"menu_title\" => \"Settings\",\n \"menu_slug\" => \"forms_settings\",\n \"capability\" => \"activate_plugins\",\n \"position\" => false,\n \"parent_slug\" => \"edit.php?post_type=forms\",\n \"redirect\" => true,\n \"post_id\" => \"publish_form\",\n \"autoload\" => false,\n \"update_button\"\t\t=> __(\"Save\", \"acf\"),\n \"updated_message\"\t=> __(\"Settings saved\", \"acf\"),\n ];\n\n // Set the .json fields location\n // To be imported by ACF\n $this->fields = (object) [\n \"settings\" => __DIR__ . \"/../../fields/settings.json\",\n \"fields\" => __DIR__ . \"/../../fields/fields.json\"\n ];\n\n // Set some random honeypot fields to be randomly parsed within the field\n $this->honey = [\n \"head\",\n \"shoulder\",\n \"knees\",\n \"toes\"\n ];\n }", "title": "" }, { "docid": "4a6023e5719a2a8ac6b66875376dc7e6", "score": "0.6462775", "text": "function bbp_is_custom_post_type($the_post = \\false)\n{\n}", "title": "" }, { "docid": "3b9ac155e3a901b2c3c370d5e7c1800b", "score": "0.6456595", "text": "function forge_register_post_types() {\r\n\r\n\t// pass in an array of post types. Define their post slug and labels\r\n\t$the_post_types = array(\r\n\t\tarray(\r\n\t\t\t'post_slug'\t\t=>\t'resources',\r\n\t\t\t'post_label'\t=>\t'Resources',\r\n\t\t\t'post_single' \t=>\t'Resource',\r\n\t\t\t'rewrite_slug'\t=> 'our-resources',\r\n\t\t\t'show_in_rest' \t=> \ttrue,\r\n\t\t\t'menu_icon'\t\t=> 'dashicons-book'\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'post_slug' \t=>\t'case-studies',\r\n\t\t\t'post_label' \t=>\t'Case Studies',\r\n\t\t\t'post_single' \t=>\t'Case Study',\r\n\t\t\t'rewrite_slug' \t=> 'our-case-studies',\r\n\t\t\t'show_in_rest' \t=> \ttrue,\r\n\t\t\t'menu_icon'\t\t=> 'dashicons-portfolio',\r\n\t\t\t'template' =>\tarray(\r\n\t\t\t\tarray( 'acf/organization-results' ),\r\n\t\t\t\tarray( 'core/paragraph' ),\r\n\t\t\t\tarray( 'acf/cta-banner' ),\r\n\t\t\t),\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'post_slug' \t=>\t'careers',\r\n\t\t\t'post_label' \t=>\t'Careers',\r\n\t\t\t'post_single' \t=>\t'Career',\r\n\t\t\t'rewrite_slug' \t=> 'our-careers',\r\n\t\t\t'show_in_rest' \t=> \ttrue,\r\n\t\t\t'menu_icon'\t\t=> 'dashicons-id'\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'post_slug' \t=>\t'product',\r\n\t\t\t'post_label' \t=>\t'Products',\r\n\t\t\t'post_single'\t=>\t'Product',\r\n\t\t\t'rewrite_slug' \t=> 'product',\r\n\t\t\t'show_in_rest' \t=> \ttrue,\r\n\t\t\t'menu_icon'\t\t=> 'dashicons-feedback',\r\n\t\t\t'taxonomies'\t=> array( 'post_tag' ),\r\n\t\t\t'template' =>\tarray(\r\n\t\t\t\t\t\t\t\t\tarray( 'acf/product-overview' ),\r\n\t\t\t\t\t\t\t\t\tarray( 'acf/product-benefits' ),\r\n\t\t\t\t\t\t\t\t\tarray( 'acf/product-features' ),\r\n\t\t\t\t\t\t\t\t\tarray( 'acf/product-form' ),\r\n\t\t\t\t\t\t\t\t\tarray( 'acf/product-bottom-bar' ),\r\n\t\t\t\t\t\t\t\t),\r\n\t\t\t'template_lock' => 'all',\r\n\t\t),\r\n\t);\r\n\r\n\t// loop through post type array and register post types\r\n\tforeach($the_post_types as $post_type){\r\n\r\n\t\t$default = array(\r\n\t\t\t'labels' => array(\r\n\t\t\t\t'name' \t\t\t\t\t=> __($post_type['post_label'], 'post type general name'), /* This is the Title of the Group */\r\n\t\t\t\t'singular_name' \t\t=> __($post_type['post_single'], 'post type singular name'), /* This is the individual type */\r\n\t\t\t\t'add_new' \t\t\t\t=> __('Add New', 'custom post type item'), /* The add new menu item */\r\n\t\t\t\t'add_new_item'\t\t\t=> __('Add New '.$post_type['post_single'].''), /* Add New Display Title */\r\n\t\t\t\t'edit'\t\t\t\t\t=> __( 'Edit' ), /* Edit Dialog */\r\n\t\t\t\t'edit_item'\t\t\t\t=> __('Edit '.$post_type['post_single'].''), /* Edit Display Title */\r\n\t\t\t\t'new_item'\t\t\t\t=> __('New '.$post_type['post_single']), /* New Display Title */\r\n\t\t\t\t'view_item'\t\t\t\t=> __('View '.$post_type['post_single']), /* View Display Title */\r\n\t\t\t\t'search_items'\t\t\t=> __('Search '.$post_type['post_single']), /* Search Custom Type Title */\r\n\t\t\t\t'not_found'\t\t\t\t=> __('Nothing found in the Database.'), /* This displays if there are no entries yet */\r\n\t\t\t\t'not_found_in_trash'\t=> __('Nothing found in Trash'), /* This displays if there is nothing in the trash */\r\n\t\t\t\t'parent_item_colon'\t\t=> ''\r\n\t\t\t), /* end of arrays */\r\n\t\t\t// 'menu_icon' \t\t\t=> '',\r\n\t\t\t'public' \t\t\t\t=> true,\r\n\t\t\t'publicly_queryable'\t=> true,\r\n\t\t\t'exclude_from_search'\t=> false,\r\n\t\t\t'show_ui' \t\t\t\t=> true,\r\n\t\t\t'query_var' \t\t\t=> true,\r\n\t\t\t'has_archive'\t\t\t=> false,\r\n\t\t\t'menu_position'\t\t\t=> 5, /* this is what order you want it to appear in on the left hand side menu */\r\n\t\t\t'rewrite'\t\t\t\t=> array('with_front' => false, 'slug' => $post_type['rewrite_slug']),\r\n\t\t\t'capability_type'\t\t=> 'post',\r\n\t\t\t'hierarchical'\t\t\t=> false,\r\n\t\t\t/* the next one is important, it tells what's enabled in the post editor */\r\n\t\t\t'supports'\t\t\t\t=> array( 'title', 'editor', 'thumbnail', 'revisions','excerpt')\r\n\t\t);\r\n\r\n\t\t$args = wp_parse_args( $post_type, $default );\r\n\r\n\t\t/* (http://codex.wordpress.org/Function_Reference/register_post_type) */\r\n\t\tregister_post_type( $post_type['post_slug'], $args);\r\n\r\n\t}\r\n\r\n\t// array used to register taxonomies for post types.\r\n\t$taxonomy_types = array(\r\n\t\tarray(\r\n\t\t\t'tax_slug'\t\t=>\t'resource-types',\r\n\t\t\t'tax_label'\t\t=>\t'Resource Types',\r\n\t\t\t'tax_single'\t=>\t'Resource Type',\r\n\t\t\t'post_type'\t\t=>\t'resources',\r\n\t\t\t'rewrite_slug'\t=>\t'resource-types'\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'tax_slug'\t\t=>\t'resource-topics',\r\n\t\t\t'tax_label'\t\t=>\t'Resource Topics',\r\n\t\t\t'tax_single'\t=>\t'Resource Topic',\r\n\t\t\t'post_type'\t\t=>\t'resources',\r\n\t\t\t'rewrite_slug'\t=>\t'resource-topics'\r\n\t\t),\r\n\t\tarray(\r\n\t\t\t'tax_slug'\t\t=>\t'support-types',\r\n\t\t\t'tax_label'\t\t=>\t'Support Types',\r\n\t\t\t'tax_single'\t=>\t'Support Type',\r\n\t\t\t'post_type'\t\t=>\t'support',\r\n\t\t\t'rewrite_slug'\t=>\t'support-types'\r\n\t\t)\r\n\t);\r\n\r\n\t// loop through $taxonomy_types and register taxonomies.\r\n\tforeach($taxonomy_types as $taxonomy){\r\n\r\n\t\t$default = array(\r\n\t\t\t'hierarchical' => true, /* if this is true it acts like categories */\r\n\t\t\t'show_in_rest' => true,\r\n \t\t'labels' => array(\r\n \t\t\t'name' \t\t\t\t=> __( $taxonomy['tax_label'] ), /* name of the custom taxonomy */\r\n \t\t\t'singular_name' \t=> __( $taxonomy['tax_single'] ), /* single taxonomy name */\r\n \t\t\t'search_items'\t\t=> __( 'Search '.$taxonomy['tax_label'] ), /* search title for taxomony */\r\n \t\t\t'all_items'\t\t\t=> __( 'All '.$taxonomy['tax_label'] ), /* all title for taxonomies */\r\n \t\t\t'parent_item'\t\t=> __( 'Parent '.$taxonomy['tax_single'] ), /* parent title for taxonomy */\r\n \t\t\t'parent_item_colon' => __( 'Parent '.$taxonomy['tax_single'].':' ), /* parent taxonomy title */\r\n \t\t\t'edit_item'\t\t\t=> __( 'Edit '.$taxonomy['tax_single'] ), /* edit custom taxonomy title */\r\n \t\t\t'update_item'\t\t=> __( 'Update '.$taxonomy['tax_single'] ), /* update title for taxonomy */\r\n \t\t\t'add_new_item'\t\t=> __( 'Add New '.$taxonomy['tax_single'] ), /* add new title for taxonomy */\r\n \t\t\t'new_item_name'\t\t=> __( 'New '.$taxonomy['tax_single'].' Name' ) /* name title for taxonomy */\r\n \t\t),\r\n \t\t'show_ui' \t=> true,\r\n \t\t'query_var' => true,\r\n \t\t'rewrite' => array( 'slug' => $taxonomy['rewrite_slug'] ),\r\n\t\t);\r\n\r\n\t\t$args = wp_parse_args( $taxonomy, $default );\r\n\r\n\t\tregister_taxonomy( $taxonomy['tax_slug'], $taxonomy['post_type'], $args);\r\n\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "a249849de59a33c01561a5955a450c58", "score": "0.645584", "text": "function gt_custom_post_type(){\r\n\tregister_post_type('project',\r\n array(\r\n \t'rewrite' => array('slug' => 'projects'),\r\n \t'labels' => array(\r\n \t\t'name' => 'Projects',\r\n \t\t'singular_name' => 'Project',\r\n \t\t'add_new_item' => 'Add New Project',\r\n \t\t'edit_item' => 'Edit Project'\r\n \t),\r\n \t'menu-icon' => 'dashicons-clipboard',\r\n \t'public' => true,\r\n \t'has_archive' => true,\r\n \t'supports' => array(\r\n \t\t'title', 'thumbnail', 'editor', 'excerpt', 'comments'\r\n \t)\r\n )\r\n );\r\n}", "title": "" }, { "docid": "d138cc0b707fd317fcd18ac3cb3cf362", "score": "0.64531416", "text": "function custom_post_type() {\n\t\t\t$labels = array(\n\t\t\t\t\t'name' => 'Meus Trabalhos',\n\t\t\t\t\t'singular_name' => 'Meu Trabalho',\n\t\t\t\t\t'menu_name' => 'Meus Trabalhos',\n\t\t\t\t\t'all_items' => 'Todos Trabalhos',\n\t\t\t\t\t'view_item' => 'Ver Trabalho',\n\t\t\t\t\t'add_new_item' => 'Novo Trabalho',\n\t\t\t\t\t'add_new' => 'Novo Trabalho', \n\t\t\t\t\t'edit_item' => 'Editar Trabalho', \n\t\t\t\t\t'update_item' => 'Atualizar Trabalho', \n\t\t\t\t\t'search_items' => 'Buscar Trabalho', \n\t\t\t\t\t'not_found' => 'Não foram encontrados trabalhos.', \n\t\t\t\t\t'not_found_in_trash' => 'Nenhum trabalho encontrado na lixeira' \n\t\t\t);\n\t\t\t \n\t\t\t// Set options Custom Post Type\n\t\t\t$args = array(\n\t\t\t\t\t'labels' => $labels,\n\t\t\t\t\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'revisions', 'custom-fields' ),\n\t\t\t\t\t'hierarchical' => false,\n\t\t\t\t\t'public' => true,\n\t\t\t\t\t'show_ui' => true,\n\t\t\t\t\t'show_in_menu' => true,\n\t\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t\t'menu_position' => 5,\n\t\t\t\t\t'can_export' => true,\n\t\t\t\t\t'has_archive' => true,\n\t\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t\t'capability_type' => 'post',\n\t\t\t\t\t'show_in_rest' => true,\n\t\t\t\t\t'rewrite' => array('slug' => 'meu-trabalho'),\n\t\t\t);\n\t\t\t \n\t\t\t// Register\n\t\t\tregister_post_type( 'work', $args );\n\t \n}", "title": "" }, { "docid": "069bd04ebe6ad5e8d2e01cc5919eb944", "score": "0.6451051", "text": "function the_post( $post ) {\n\n $schema = array();\n\n if ( isset( self::$_post_type_to_schema[ $post->post_type ] ) ) {\n $schema[ 'name' ] = self::$_post_type_to_schema[ $post->post_type ];\n $schema[ 'fields' ] = self::get_schema_fields( $schema['name'] );\n }\n\n if ( is_object( $post ) ) {\n $schema = (object) $schema;\n $post->schema = $schema;\n } else {\n $post['schema'] = $schema;\n }\n\n }", "title": "" }, { "docid": "dc6ccaa3e6634dc1b4e8405c0ea53db4", "score": "0.6441421", "text": "public function initPostType(){\n\t\tregister_post_type( $this->posType, $this->argsRegister() );\n\t}", "title": "" }, { "docid": "2f2eca5cc3d1db6f9add3544fa51d1a0", "score": "0.6431234", "text": "public function registerPostType()\n {\n $labels = array(\n 'name' => $this->nameSingular,\n 'singular_name' => $this->nameSingular,\n 'add_new' => sprintf(__('Add new %s', 'api-alarm-manager'), $this->nameSingular),\n 'add_new_item' => sprintf(__('Add new %s', 'api-alarm-manager'), $this->nameSingular),\n 'edit_item' => sprintf(__('Edit %s', 'api-alarm-manager'), $this->nameSingular),\n 'new_item' => sprintf(__('New %s', 'api-alarm-manager'), $this->nameSingular),\n 'view_item' => sprintf(__('View %s', 'api-alarm-manager'), $this->nameSingular),\n 'search_items' => sprintf(__('Search %s', 'api-alarm-manager'), $this->namePlural),\n 'not_found' => sprintf(__('No %s found', 'api-alarm-manager'), $this->namePlural),\n 'not_found_in_trash' => sprintf(__('No %s found in trash', 'api-alarm-manager'), $this->namePlural),\n 'parent_item_colon' => sprintf(__('Parent %s:', 'api-alarm-manager'), $this->nameSingular),\n 'menu_name' => $this->namePlural,\n );\n\n $this->args['labels'] = $labels;\n\n register_post_type($this->slug, $this->args);\n\n return $this->slug;\n }", "title": "" }, { "docid": "e093f96e84b8727e88de2ff84248bd8e", "score": "0.6430626", "text": "public function register_post_types()\n\t{ }", "title": "" }, { "docid": "6d04a4f3254b464c37f0c1cf77030f8d", "score": "0.6429511", "text": "function ctmeta_register_post_type() {\n\n\t\t// Get plugin object\n\t\tglobal $ctmeta_plugin;\n\n\t\t// Args\n\t\t$args = array(\n\t\t\t'labels' => array( 'name' => __( 'CTmeta post type', $ctmeta_plugin->textdomain ) ),\n\t\t\t'public' => false,\n\t\t\t'supports' => array( 'title', 'custom-fields' )\n\t\t);\n\n\t\t// Register post type\n\t\tregister_post_type( ctmeta_settings( 'post_type_name' ), $args );\n\t}", "title": "" }, { "docid": "0315f0b8ddedc2f47f6c0f6ddcae42a3", "score": "0.6427504", "text": "function register_post_type() {\n\t\tglobal $et_theme_opt;\n\n\t\t$portfolio_slug = ( strlen( get_theme_mod( 'portfolio_permalink', 'portfolio' ) ) > 0 ) ? get_theme_mod( 'portfolio_permalink', 'portfolio' ) : _x( 'portfolio', 'portfolio permalink slug', 'goya' );\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Portfolio', 'post type general name', 'goya' ),\n\t\t\t'singular_name' => esc_html__( 'Portfolio Item','goya' ),\n\t\t\t'rewrite' => array('slug' => esc_html__( 'portfolios','goya' )),\n\t\t\t'add_new' => _x('Add New', 'portfolio item', 'goya'),\n\t\t\t'add_new_item' => esc_html__('Add New Portfolio Item','goya'),\n\t\t\t'edit_item' => esc_html__('Edit Portfolio Item','goya'),\n\t\t\t'new_item' => esc_html__('New Portfolio Item','goya'),\n\t\t\t'view_item' => esc_html__('View Portfolio Item','goya'),\n\t\t\t'all_items' => esc_html__('All Portfolio','goya'),\n\t\t\t'search_items' => esc_html__('Search Portfolio','goya'),\n\t\t\t'not_found' => esc_html__('No Portfolio items found','goya'),\n\t\t\t'not_found_in_trash' => esc_html__('Nothing found in Trash','goya'),\n\t\t\t'parent_item_colon' => ''\n\t );\n\t \n\t $args = array(\n\t\t\t'labels' => $labels,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'hierarchical' => false,\n\t\t\t'menu_icon' => 'dashicons-schedule',\n\t\t\t'menu_position' => null,\n\t\t\t'supports' => array('title', 'editor', 'excerpt', 'thumbnail', 'custom-fields'),\n\t\t\t'show_in_rest' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'query_var' => true,\n\t\t\t'taxonomies' => array( 'portfolio-category' ),\n\t\t\t'has_archive' => ( get_theme_mod( 'portfolio_main_page', 'automatic' ) == 'automatic' ) ? true : false,\n\t\t\t'rewrite' => array(\n\t\t\t'slug' => untrailingslashit( $portfolio_slug ),\n\t\t\t'with_front' => false\n\t\t\t),\n\t\t\t'capability_type' => 'post',\n\t ); \n\t \n\t register_post_type('portfolio',$args);\n\t flush_rewrite_rules();\n\n\t}", "title": "" }, { "docid": "5d8378aad9f9ca9c61512b300b1b4c1f", "score": "0.6421641", "text": "function custom_post_type()\n{\n\t$labels = array(\n\t\t'name' => 'Empresas',\n\t\t'singular_name' => 'Empresa',\n\t\t'menu_name' => 'Empresa',\n\t\t'name_admin_bar' => 'Empresas',\n\t);\n\t$args = array(\n\t\t'label' => 'Empresas',\n\t\t'description' => 'Empresas creadas',\n\t\t'labels' => $labels,\n\t\t'taxonomies' => array('rubro'),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_icon' => 'dashicons-tide',\n\t\t'supports' => array('title', 'editor', 'page-attributes'),\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'empresas',\n\t\t\t'with_front' => false\n\t\t),\n\t\t'has_archive' => 'empresas',\n\t);\n\tregister_post_type('empresas', $args);\n\n\t$labels = array(\n\t\t'name' => 'Servicios',\n\t\t'singular_name' => 'Servicio',\n\t\t'menu_name' => 'Servicios',\n\t\t'name_admin_bar' => 'Servicios',\n\t);\n\t$args = array(\n\t\t'label' => 'Servicios',\n\t\t'description' => 'Servicios creadas',\n\t\t'labels' => $labels,\n\t\t'taxonomies' => array('rubro'),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_icon' => 'dashicons-rest-api',\n\t\t'supports' => array('title', 'editor', 'page-attributes'),\n\t\t'menu_position' => 6,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'servicios',\n\t\t\t'with_front' => false\n\t\t),\n\t\t'has_archive' => 'servicios',\n\t);\n\tregister_post_type('servicios', $args);\n\n\t$labels = array(\n\t\t'name' => 'Presupuestos',\n\t\t'singular_name' => 'Presupuesto',\n\t\t'menu_name' => 'Presupuestos',\n\t\t'name_admin_bar' => 'Presupuestos',\n\t);\n\t$args = array(\n\t\t'label' => 'Presupuestos',\n\t\t'description' => 'Presupuestos creados',\n\t\t'labels' => $labels,\n\t\t'taxonomies' => array('rubro', 'categorias'),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_icon' => 'dashicons-excerpt-view',\n\t\t'supports' => array('title', 'editor', 'page-attributes'),\n\t\t'menu_position' => 6,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'presupuestos',\n\t\t\t'with_front' => false\n\t\t),\n\t\t'has_archive' => 'presupuestos',\n\t);\n\tregister_post_type('presupuestos', $args);\n\n\t$labels = array(\n\t\t'name' => 'Propuestas',\n\t\t'singular_name' => 'Propuesta',\n\t\t'menu_name' => 'Propuestas',\n\t\t'name_admin_bar' => 'Propuestas',\n\t);\n\t$args = array(\n\t\t'label' => 'Propuestas',\n\t\t'description' => 'Propuestas creadas',\n\t\t'labels' => $labels,\n\t\t'taxonomies' => array('rubro', 'categorias'),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_icon' => 'dashicons-excerpt-view',\n\t\t'supports' => array('title', 'editor', 'page-attributes'),\n\t\t'menu_position' => 6,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'post',\n\t\t'rewrite' => array(\n\t\t\t'slug' => 'propuestas',\n\t\t\t'with_front' => false\n\t\t),\n\t\t'has_archive' => 'propuestas',\n\t);\n\tregister_post_type('propuestas', $args);\n}", "title": "" }, { "docid": "6ec60c31a5241570a93495eb4b58d71c", "score": "0.64108336", "text": "function create_post_type() {\n\t\tregister_post_type( 'gig',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Gigs' ),\n\t\t\t\t\t'singular_name' => __( 'Gig' ),\n\t\t\t\t\t'add_new' => __( 'Add New' ),\n\t\t\t\t\t'add_new_item' => __( 'Add New Gig' ),\n\t\t\t\t\t'edit' => __( 'Edit' ),\n\t\t\t\t\t'edit_item' => __( 'Edit Gig' ),\n\t\t\t\t\t'new_item' => __( 'New Gig' ),\n\t\t\t\t\t'view' => __( 'View Gig' ),\n\t\t\t\t\t'view_item' => __( 'View Gig' ),\n\t\t\t\t\t'search_items' => __( 'Search Gigs' ),\n\t\t\t\t\t'not_found' => __( 'No gigs found' ),\n\t\t\t\t\t'not_found_in_trash' => __( 'No gigs found in Trash' ),\n\t\t\t\t\t'parent' => __( 'Parent Gig' ),\n\t\t\t\t\t),\n\t\t\t\t'description' => 'A gig is a scheduled Carnival Band Performance',\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'capability_type' => 'gig',\n\t\t\t\t'capabilities' => array(\n\t\t\t\t\t'publish_posts' => 'publish_gigs',\n\t\t\t\t\t'edit_posts' => 'edit_gigs',\n\t\t\t\t\t'edit_others_posts' => 'edit_others_gigs',\n\t\t\t\t\t'delete_posts' => 'delete_gigs',\n\t\t\t\t\t'delete_others_posts' => 'delete_others_gigs',\n\t\t\t\t\t'read_private_posts' => 'read_private_gigs',\n\t\t\t\t\t'edit_post' => 'edit_gig',\n\t\t\t\t\t'delete_post' => 'delete_gig',\n\t\t\t\t\t'read_post' => 'read_gig',\n\t\t\t\t),\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'menu_position' => 5,\n\t\t\t\t'menu_icon' => carnieUtil::get_url() . \"/images/saxophone16.png\",\n\t\t\t\t'supports' => array('title', 'editor', 'revisions', 'author', 'excerpt', 'comments'),\n\t\t\t\t'taxonomies' => array('post_tag', 'events'),\n\t\t\t\t'register_meta_box_cb' => array($this, 'register_meta_box'),\n\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "833babbaa80fe7f147a11c78ac43a447", "score": "0.6407508", "text": "function add_post_type_support() {\n\t\tadd_post_type_support( 'post', 'publicize' );\n\t}", "title": "" }, { "docid": "fbe7b4443b4afe63fa2f2486a6710ee8", "score": "0.64058477", "text": "function custom_post_type_meerwaarde() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Meerwaarde', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'Meerwaarde', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'Meerwaarde', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'Meerwaarde', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'Post Type', 'text_domain' ),\n\t\t'description' => __( 'Post Type Description', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'Meerwaarde', $args );\n\n}", "title": "" }, { "docid": "84dc1962235e1d964c4b362772731e55", "score": "0.64049613", "text": "function cpt_lvm_publicacoes_save_data( $post_id = false, $post = false ) {\n if ( $post->post_type == 'lvm_publicacoes' ) {\n \n }\n}", "title": "" }, { "docid": "b6282ba98bff967a25243ca41eed3a34", "score": "0.6398382", "text": "public function register_form() {\n\t\t\n\t\t//make sure the Front end simple post plugin is active\n\t\tif ( ! function_exists( 'bp_new_simple_blog_post_form' ) )\n\t\t\treturn;\n\n\t\t$user_id = get_current_user_id();\n\t\t$post_status = bcg_get_group_post_status( $user_id );\n\t\t$group_id = bp_get_current_group_id();\n\n\t\t$settings = array(\n\t\t\t'post_type'\t\t\t\t\t=> bcg_get_post_type(),\n\t\t\t'post_author'\t\t\t\t=> $user_id,\n\t\t\t'post_status'\t\t\t\t=> $post_status,\n\t\t\t'comment_status'\t\t => bcg_get_option( 'comment_status' ),\n\t\t\t'show_comment_option'\t\t=> bcg_get_option( 'show_comment_option' ),\n\t\t\t'custom_field_title'\t\t=> '',//we are only using it for hidden field, so no need to show it\n\t\t\t'custom_fields'\t\t\t\t=> array(\n\t\t\t\t'_is_bcg_post' => array( 'type' => 'hidden', 'label' => '', 'default' => 1 ),\n\t\t\t\t'_bcg_group_id' => array( 'type' => 'hidden', 'label' => '', 'default' => $group_id )\n\t\t\t),\n\t\t\t'allow_upload'\t\t\t => bcg_get_option( 'allow_upload' ),\n\t\t\t'upload_count'\t\t\t => 0,\n\t\t\t'has_post_thumbnail'\t => 1,\n\t\t\t'current_user_can_post' => bcg_current_user_can_post(),\n\t\t\t'update_callback'\t\t => array( $this, 'on_save' ),\n\t\t);\n\n\t\tif ( bcg_get_option( 'enable_taxonomy' ) ) {\n\n\t\t\t$taxonomies = array();\n\t\t\t$tax = bcg_get_taxonomies();\n\n\t\t\tif ( ! empty( $tax ) ) {\n\n\t\t\t\tforeach ( (array) $tax as $tax_name ) {\n\t\t\t\t\t$view = 'checkbox';\n\t\t\t\t\t//is_taxonomy_hierarchical($tax_name);\n\n\t\t\t\t\t$taxonomies[$tax_name] = array(\n\t\t\t\t\t\t'taxonomy'\t\t=> $tax_name,\n\t\t\t\t\t\t'view_type'\t\t=> 'checkbox',//currently only checkbox\n\t\t\t\t\t);\n\n\n\t\t\t\t\tif ( bp_is_group() ) {\n\t\t\t\t\t\t$taxonomies[$tax_name]['include'] = bcg_get_categories( bp_get_current_group_id() );\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\tif ( ! empty( $taxonomies ) ) {\n\t\t\t\t$settings['tax'] = $taxonomies;\n\t\t\t}\n\n\t\t}\n\n\t //use it to add extra fields or filter the post type etc\n\n\t\t$settings = apply_filters( 'bcg_form_args', $settings );\n\t\tbp_new_simple_blog_post_form( 'bcg_form', $settings );\n\n\t}", "title": "" }, { "docid": "89e3b17b3a82a64c48f6ad86b822b76f", "score": "0.6394671", "text": "function _elysium_post_type() {\n \t\t\tregister_post_type( 'elysium', array(\n 'labels' => array(\n 'name' => __( 'Medlemmar', 'elysium' ),\n 'singular_name' => __( 'Medlem', 'elysium' ),\n 'menu_name' => __( 'Medlemmar', 'elysium' ),\n 'new_item' => __( 'Lägg till medlem', 'elysium' ),\n 'add_new' => __( 'Lägg till medlem', 'elysium' ),\n 'add_new_item' => __( 'Lägg till medlem', 'elysium' ),\n 'not_found' => __( 'Vi hittade ingen medlem', 'elysium' ),\n 'not_found_in_trash' => __( 'Vi hittade ingen medlem i soptunnan', 'elysium' )\n ),\n 'public' => true,\n 'show_ui' => true,\n 'show_in_nav_menus' => true,\n 'publicly_queryable' => true,\n 'exclude_from_search' => true,\n 'menu_icon' \t\t\t\t=> 'dashicons-id',\n 'rewrite' => array('slug' => 'medlemmar'),\n 'supports' => array( 'title' ),\n 'capability_type' => 'post'\n ) );\n \t}", "title": "" }, { "docid": "34d5319ed0bb1cf43985c8f70fef5680", "score": "0.6393803", "text": "public static function register_post_type() {\n static::$_post_args['labels'] = static::$_post_labels;\n register_post_type( static::$_post_type, static::$_post_args );\n }", "title": "" }, { "docid": "3a8dd44148159e274911e9867cc79f82", "score": "0.63803613", "text": "public static function registerPostType()\n {\n // industry post type\n register_post_type(\n self::$postType,\n array(\n 'labels' => array(\n 'name' => __(self::$postTypeName),\n 'singular_name' => __(self::$postTypeSingularName)\n ),\n 'menu_icon' => self::$postTypeMenuIcon,\n 'public' => true,\n 'has_archive' => true,\n 'capability_type' => 'page',\n 'supports' => array(\n 'title',\n 'editor',\n 'thumbnail',\n 'revisions',\n ),\n 'rewrite' => array(\n 'slug' => self::$postTypeSlug,\n ),\n )\n );\n }", "title": "" }, { "docid": "5285bbc6c63da246d974442e9585929a", "score": "0.63782924", "text": "function wordepress_init_post_type( $post_type_name ) {\n global $wp_post_types;\n\n if( isset( $wp_post_types[ $post_type_name ] ) ) {\n $wp_post_types[$post_type_name]->show_in_rest = true;\n $wp_post_types[$post_type_name]->rest_base = $post_type_name;\n $wp_post_types[$post_type_name]->rest_controller_class = 'WP_REST_Posts_Controller';\n }\n}", "title": "" }, { "docid": "25f68ddaaea326008970c49c327c8ac0", "score": "0.6369734", "text": "function fr_register_post_types(){\n register_post_type('projects', [\n 'label' => 'Projets',\n 'labels' => [\n 'singular_name' => 'Projet',\n 'add_new_item' => 'Ajouter un projet'\n ],\n 'description' => 'Ajouter un projet sur la page d\\'accueil',\n 'hierarchical' => true,\n 'supports' => array('title', 'thumbnail', 'custom-fields', 'excerpt', 'revisions'),\n 'public' => true,\n 'menu_position'=> 5,\n ]);\n}", "title": "" }, { "docid": "7993f7420d30040234b48264aadddf61", "score": "0.6367699", "text": "public function register_post_types()\n {\n }", "title": "" }, { "docid": "7993f7420d30040234b48264aadddf61", "score": "0.6367699", "text": "public function register_post_types()\n {\n }", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6361146", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6361146", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6361146", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6361146", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "715417d2c0aa92736f4dfaf09fad2047", "score": "0.6361146", "text": "public function register_post_types() {\n\n\t}", "title": "" }, { "docid": "9b442f2366dbbd3fb0dcad635e74ddc0", "score": "0.6356846", "text": "function gt_lead_post_type(){\r\n register_post_type('Lead Generation',\r\n array(\r\n 'rewrite' => array('slug' => 'lead_generation'),\r\n 'labels' => array(\r\n 'name' => 'Lead Generation',\r\n 'singular_name' => 'Lead Generation',\r\n 'add_new_item' => 'Add New Lead Generation',\r\n 'edit_item' => 'Edit Lead Generation'\r\n ),\r\n 'menu-icon' => 'dashicons-admin-customizer',\r\n 'public' => true,\r\n 'has_archive' => true,\r\n 'supports' => array(\r\n 'title', 'thumbnail', 'editor', 'excerpt', 'comments'\r\n )\r\n )\r\n );\r\n}", "title": "" }, { "docid": "e728ed261f6686610b07c3a90d27137d", "score": "0.6354603", "text": "public function register_printable_form_post_type() {\n\n\t\t$printable_form_labels = array(\n\t\t\t'name' => _x( 'Printable Form Channels', 'Post Type General Name', 'ptv-for-wordpress' ),\n\t\t\t'singular_name' => _x( 'Printable Form Channel', 'Post Type Singular Name', 'ptv-for-wordpress' ),\n\t\t\t'menu_name' => __( 'Printable Form Channels', 'ptv-for-wordpress' ),\n\t\t\t'name_admin_bar' => __( 'Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'archives' => __( 'Printable Form Channel Archives', 'ptv-for-wordpress' ),\n\t\t\t'attributes' => __( 'Printable Form Channel Attributes', 'ptv-for-wordpress' ),\n\t\t\t'parent_item_colon' => __( 'Parent Printable Form Channel:', 'ptv-for-wordpress' ),\n\t\t\t'all_items' => __( 'Printable Form Channels', 'ptv-for-wordpress' ),\n\t\t\t'add_new_item' => __( 'Add New Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'add_new' => __( 'Add New', 'ptv-for-wordpress' ),\n\t\t\t'new_item' => __( 'New Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'edit_item' => __( 'Edit Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'update_item' => __( 'Update Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'view_item' => __( 'View Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'view_items' => __( 'View Printable Form Channels', 'ptv-for-wordpress' ),\n\t\t\t'search_items' => __( 'Search Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'not_found' => __( 'Not found', 'ptv-for-wordpress' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'ptv-for-wordpress' ),\n\t\t\t'featured_image' => __( 'Featured Image', 'ptv-for-wordpress' ),\n\t\t\t'set_featured_image' => __( 'Set featured image', 'ptv-for-wordpress' ),\n\t\t\t'remove_featured_image' => __( 'Remove featured image', 'ptv-for-wordpress' ),\n\t\t\t'use_featured_image' => __( 'Use as featured image', 'ptv-for-wordpress' ),\n\t\t\t'insert_into_item' => __( 'Insert into Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'ptv-for-wordpress' ),\n\t\t\t'items_list' => __( 'Printable Form Channels list', 'ptv-for-wordpress' ),\n\t\t\t'items_list_navigation' => __( 'Printable Form Channels list navigation', 'ptv-for-wordpress' ),\n\t\t\t'filter_items_list' => __( 'Filter services list', 'ptv-for-wordpress' ),\n\t\t);\n\n\t\t$printable_form_args = array(\n\t\t\t'label' => __( 'Printable Form Channel', 'ptv-for-wordpress' ),\n\t\t\t'labels' => $printable_form_labels,\n\t\t\t'supports' => array( 'title' ),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'menu_position' => 60,\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'capability_type' => 'page',\n\t\t\t'show_in_menu' => 'ptv-menu',\n\t\t);\n\n\t\tregister_post_type( 'ptv-printable-form', $printable_form_args );\n\n\t}", "title": "" }, { "docid": "c2e8e645e18e9a16cc2c3369ce1ed791", "score": "0.6344028", "text": "public function registerPostType()\n {\n $labels = array(\n 'name' => _x(self::$label, self::$post_type),\n 'singular_name' => _x(self::$label, self::$post_type),\n 'add_new' => _x('Add Journal', self::$post_type),\n 'add_new_item' => __('Add Journal'),\n 'edit_item' => __('Edit Journal'),\n 'new_item' => __('New Journal'),\n 'view_item' => __('View Journal'),\n 'search_items' => __('Search Journal'),\n 'not_found' => __('No Child found'),\n 'not_found_in_trash' => __('No Journal found in Trash'),\n 'parent_item_colon' => '',\n 'menu_name' => __(self::$label)\n );\n\n // Some arguments and in the last line 'supports', we say to WordPress what features are supported on the Project post type\n $this->shows_type = array(\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => true,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=' . Children::$post_type,\n 'query_var' => true,\n 'rewrite' => array('slug' => 'child-journal'),\n 'capability_type' => 'post',\n 'map_meta_cap' => true,\n 'has_archive' => true,\n 'hierarchical' => false,\n 'menu_icon' => ADMIN_URI . '/images/children.png',\n 'supports' => array('title', 'editor', 'author', 'thumbnail'),\n 'taxonomies' => array(self::$taxonomy),\n );\n\n register_post_type(self::$post_type, $this->shows_type);\n }", "title": "" }, { "docid": "d66ac148a98c1f74c88af0af5ee03bee", "score": "0.6342435", "text": "function webinar_post_type() {\t\n\t\tregister_post_type( $this->post_type ,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Webinar' ),\n\t\t\t\t\t'singular_name' => __( 'Webinar' ),\n\t\t\t\t\t'add_new' => __( 'Add New' ),\n\t\t\t\t\t'add_new_item' => __( 'Add New Webinar' ),\n\t\t\t\t\t'edit' => __( 'Edit' ),\n\t\t\t\t\t'edit_item' => __( 'Edit Webinar' ),\n\t\t\t\t\t'new_item' => __( 'New Webinar' ),\n\t\t\t\t\t'view' => __( 'View Webinar' ),\n\t\t\t\t\t'view_item' => __( 'View Webinar' ),\n\t\t\t\t\t'search_items' => __( 'Search Webinar' ),\n\t\t\t\t\t'not_found' => __( 'No Webinar found' ),\n\t\t\t\t\t'not_found_in_trash' => __( 'No Webinar found in Trash' ),\n\t\t\t\t\t'parent' => __( 'Parent Webinar' ),\n\t\t\t\t),\n\t\t\t\t'piblic' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'show_in_nav_menus' => true,\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'rewrite'=>array('slug'=>'webinar'),\n\t\t\t\t'menu_position'=>5,\n\t\t\t\t'menu_icon' =>'dashicons-video-alt2',\t\t\t\n\t\t\t\t'supports' => array('title', 'thumbnail')\n\t\t\t)\n\t\t);\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "140f1476ea2707730bbf84afdb08ae04", "score": "0.63371575", "text": "public static function urich_tourbook_post_type() {\n $cap_type = 'post';\n $plural = 'Tours';\n $single = 'Tour';\n $cpt_name = 'tours';\n $opts['can_export'] = TRUE;\n $opts['capability_type'] = $cap_type;\n $opts['description'] = 'Booking Tour Custom Post Type';\n $opts['exclude_from_search'] = FALSE;\n $opts['has_archive'] = TRUE;\n $opts['hierarchical'] = FALSE;\n $opts['map_meta_cap'] = TRUE;\n $opts['menu_icon'] = 'dashicons-palmtree';\n $opts['menu_position'] = 20;\n $opts['public'] = TRUE;\n $opts['publicly_querable'] = TRUE;\n $opts['query_var'] = TRUE;\n $opts['register_meta_box_cb'] = '';\n $opts['rewrite'] = TRUE;\n $opts['show_in_admin_bar'] = TRUE;\n $opts['show_in_menu'] = TRUE;\n $opts['show_in_nav_menu'] = TRUE;\n $opts['supports'] = ['title', 'editor', 'thumbnail', 'revisions', 'post-formats'];\n\n $opts['labels']['add_new'] = esc_html__( \"Add New {$single}\", 'urich-tourbook' );\n $opts['labels']['add_new_item'] = esc_html__( \"Add New {$single}\", 'urich-tourbook' );\n $opts['labels']['all_items'] = esc_html__( $plural, 'urich-tourbook' );\n $opts['labels']['edit_item'] = esc_html__( \"Edit {$single}\" , 'urich-tourbook' );\n $opts['labels']['menu_name'] = esc_html__( $plural, 'urich-tourbook' );\n $opts['labels']['name'] = esc_html__( $plural, 'urich-tourbook' );\n $opts['labels']['name_admin_bar'] = esc_html__( $single, 'urich-tourbook' );\n $opts['labels']['new_item'] = esc_html__( \"New {$single}\", 'urich-tourbook' );\n $opts['labels']['not_found'] = esc_html__( \"No {$plural} Found\", 'urich-tourbook' );\n $opts['labels']['not_found_in_trash'] = esc_html__( \"No {$plural} Found in Trash\", 'urich-tourbook' );\n $opts['labels']['parent_item_colon'] = esc_html__( \"Parent {$plural} :\", 'urich-tourbook' );\n $opts['labels']['search_items'] = esc_html__( \"Search {$plural}\", 'urich-tourbook' );\n $opts['labels']['singular_name'] = esc_html__( $single, 'urich-tourbook' );\n $opts['labels']['view_item'] = esc_html__( \"View {$single}\", 'urich-tourbook' );\n register_post_type( strtolower( $cpt_name ), $opts );\n }", "title": "" }, { "docid": "15c738987b09c604a0db570f4e571379", "score": "0.63327163", "text": "function udpac_production_post_type() {\n $labels = array(\n 'name' => _x( 'Productions', 'Post Type General Name', 'text_domain' ),\n 'singular_name' => _x( 'Production', 'Post Type Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Production', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Production:', 'text_domain' ),\n 'all_items' => __( 'All Productions', 'text_domain' ),\n 'view_item' => __( 'View Production', 'text_domain' ),\n 'add_new_item' => __( 'Add New Production', 'text_domain' ),\n 'add_new' => __( 'Add New', 'text_domain' ),\n 'edit_item' => __( 'Edit Production', 'text_domain' ),\n 'update_item' => __( 'Update Production', 'text_domain' ),\n 'search_items' => __( 'Search Productions', 'text_domain' ),\n 'not_found' => __( 'Not found', 'text_domain' ),\n 'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n );\n $rewrite = array(\n 'slug' => 'show',\n 'with_front' => true,\n 'pages' => false,\n 'feeds' => true,\n );\n $args = array(\n 'label' => __( 'production', 'text_domain' ),\n 'description' => __( 'A Show or Production', 'text_domain' ),\n 'labels' => $labels,\n 'supports' => array( 'title', 'editor', 'thumbnail', 'revisions', 'custom-fields', ),\n 'taxonomies' => array( 'category' ),\n 'hierarchical' => false,\n 'public' => true,\n 'show_ui' => true,\n 'show_in_menu' => true,\n 'show_in_nav_menus' => true,\n 'show_in_admin_bar' => true,\n 'menu_position' => 5,\n 'menu_icon' => '',\n 'can_export' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'publicly_queryable' => true,\n 'rewrite' => $rewrite,\n 'capability_type' => 'page',\n 'show_in_rest' => true,\n );\n register_post_type( 'production', $args );\n}", "title": "" }, { "docid": "079d1afeeea50384d79206c47a72ffe2", "score": "0.6332418", "text": "function productos_type(){\n $labels = array(\n 'name' => 'Productos',\n 'singular_name' => 'Producto',\n 'menu_name' => 'Productos',\n );\n $args =array(\n 'label' => 'Productos',\n 'descripion' => 'Productos de DSG',\n 'labels' => $labels,\n 'supports' => array('title', 'editor', 'thumbnail', 'revisions'),\n 'public' => true,\n 'show_in_menu' => true,\n 'menu_position' => 5,\n 'menu_icon' => 'dashicons-cart',\n 'can_export' => true,\n 'publicly_queryable' => true,\n 'rewrite' => true,\n 'show_in_rest' => true,\n );\n register_post_type( 'producto', $args); \n}", "title": "" }, { "docid": "14cf7439a2d5acf58764ec7e05d252b3", "score": "0.63292134", "text": "function ps_set_post_type()\n {\n $this->post_type = '_' . 'qcards';\n }", "title": "" }, { "docid": "226ef46b7347494e12db2fb5d49cefa3", "score": "0.6320328", "text": "function matsedel_init()\n{\n register_post_type(\n 'matsedel',\n array(\n 'labels' => array(\n 'name' => __('Matsedlar'),\n 'singular_name' => __('Matsedel')\n ),\n 'public' => true,\n 'has_archive' => false,\n 'query_var' => true,\n )\n );\n}", "title": "" }, { "docid": "60b263c839239d21df54bb363f6d6cd0", "score": "0.6318104", "text": "function matchmaking_blog_cpt() {\n\n\t\t\t$labels = array(\n\t\t\t\t'name' => _x( 'Matchmaking Posts', 'Post Type General Name', 'vida' ),\n\t\t\t\t'singular_name' => _x( 'Matchmaking Post', 'Post Type Singular Name', 'vida' ),\n\t\t\t\t'menu_name' => __( 'Matchmaking Blog', 'vida' ),\n\t\t\t\t'name_admin_bar' => __( 'Matchmaking Post', 'vida' ),\n\t\t\t\t'archives' => __( 'Matchmaking Post Archives', 'vida' ),\n\t\t\t\t'attributes' => __( 'Matchmaking Post Attributes', 'vida' ),\n\t\t\t\t'parent_item_colon' => __( 'Parent Matchmaking Post:', 'vida' ),\n\t\t\t\t'all_items' => __( 'All Posts', 'vida' ),\n\t\t\t\t'add_new_item' => __( 'Add New Matchmaking Post', 'vida' ),\n\t\t\t\t'add_new' => __( 'Add New Post', 'vida' ),\n\t\t\t\t'new_item' => __( 'New Matchmaking Post', 'vida' ),\n\t\t\t\t'edit_item' => __( 'Edit Matchmaking Post', 'vida' ),\n\t\t\t\t'update_item' => __( 'Update Matchmaking Post', 'vida' ),\n\t\t\t\t'view_item' => __( 'View Matchmaking Post', 'vida' ),\n\t\t\t\t'view_items' => __( 'View Matchmaking Posts', 'vida' ),\n\t\t\t\t'search_items' => __( 'Search Matchmaking Post', 'vida' ),\n\t\t\t\t'not_found' => __( 'Not found', 'vida' ),\n\t\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'vida' ),\n\t\t\t\t'featured_image' => __( 'Featured Image', 'vida' ),\n\t\t\t\t'set_featured_image' => __( 'Set featured image', 'vida' ),\n\t\t\t\t'remove_featured_image' => __( 'Remove featured image', 'vida' ),\n\t\t\t\t'use_featured_image' => __( 'Use as featured image', 'vida' ),\n\t\t\t\t'insert_into_item' => __( 'Insert into post', 'vida' ),\n\t\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this post', 'vida' ),\n\t\t\t\t'items_list' => __( 'Matchmaking Posts list', 'vida' ),\n\t\t\t\t'items_list_navigation' => __( 'Posts list navigation', 'vida' ),\n\t\t\t\t'filter_items_list' => __( 'Filter posts list', 'vida' ),\n\t\t\t);\n\t\t\t$rewrite = array(\n\t\t\t\t'slug' => 'matchmaking',\n\t\t\t\t'with_front' => true,\n\t\t\t\t'pages' => true,\n\t\t\t\t'feeds' => true,\n\t\t\t);\n\t\t\t$args = array(\n\t\t\t\t'label' => __( 'Matchmaking Post', 'vida' ),\n\t\t\t\t'description' => __( 'ViDA Matchmaking Blog', 'vida' ),\n\t\t\t\t'labels' => $labels,\n\t\t\t\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),\n\t\t\t\t'taxonomies' => array( 'matchmaking_category' ),\n\t\t\t\t'hierarchical' => false,\n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'show_in_menu' => true,\n\t\t\t\t'menu_position' => 5,\n\t\t\t\t'menu_icon' => 'dashicons-welcome-write-blog',\n\t\t\t\t'show_in_admin_bar' => true,\n\t\t\t\t'show_in_nav_menus' => false,\n\t\t\t\t'can_export' => true,\n\t\t\t\t'has_archive' => false,\t\t\n\t\t\t\t'exclude_from_search' => false,\n\t\t\t\t'publicly_queryable' => true,\n\t\t\t\t'query_var' => 'matchmaking',\n\t\t\t\t//'query_var' => false,\n\t\t\t\t'rewrite' => $rewrite,\n\t\t\t\t'capability_type' => 'post',\n\t\t\t\t//'register_meta_box_cb' => array( $this, 'vida_matchmaking_blog_cpt_hide_meta_boxes' )\n\t\t\t);\n\t\t\tregister_post_type( 'matchmaking', $args );\n\n\t\t}", "title": "" }, { "docid": "5bbd1e4426e744449c2923139ed79957", "score": "0.6316", "text": "function test_cpt_init()\n{\n $args = array(\n 'public' => true,\n 'label' => 'TestPosts',\n 'singular_name' => 'TestPost'\n );\n register_post_type('TestPosts', $args);\n}", "title": "" }, { "docid": "722f4a4071a96ae908b54deb36e987d2", "score": "0.6314236", "text": "public function register_post_types() {\n }", "title": "" }, { "docid": "eeae226c7db2689d92bbea2e133966f4", "score": "0.63129216", "text": "public function getPostTypes()\n\t{\n\t\treturn $this->_viewHelper->getRequest()->getParam(self::VAR_NAME_POST_TYPE);\t\n\t}", "title": "" }, { "docid": "16550a853242b76501931062e5340240", "score": "0.6304896", "text": "function faq_post_type() {\n\n// Set UI labels for Custom Post Type\n\t$labels = array(\n\t\t'name' => _x( 'FAQ', 'Post Type General Name', 'sage' ),\n\t\t'singular_name' => _x( 'FAQ', 'Post Type Singular Name', 'sage' ),\n\t\t'menu_name' => __( 'FAQ', 'sage' ),\n\t\t'parent_item_colon' => __( 'Parent FAQ', 'sage' ),\n\t\t'all_items' => __( 'All FAQs', 'sage' ),\n\t\t'view_item' => __( 'View FAQ', 'sage' ),\n\t\t'add_new_item' => __( 'Add New FAQ', 'sage' ),\n\t\t'add_new' => __( 'Add New', 'sage' ),\n\t\t'edit_item' => __( 'Edit FAQ', 'sage' ),\n\t\t'update_item' => __( 'Update FAQ', 'sage' ),\n\t\t'search_items' => __( 'Search FAQ', 'sage' ),\n\t\t'not_found' => __( 'Not Found', 'sage' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'sage' ),\n\t);\n\t\n// Set other options for Custom Post Type\n\t\n\t$args = array(\n\t\t'label' => __( 'FAQ', 'sage' ),\n\t\t'description' => __( 'New FAQs to showcase', 'sage' ),\n\t\t'labels' => $labels,\n\t\t// Features this CPT supports in Post Editor\n\t\t'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'custom-fields', ),\n\t\t// You can associate this CPT with a taxonomy or custom taxonomy. \n\t\t'taxonomies' => array( 'genres' ),\n\t\t/* A hierarchical CPT is like Pages and can have\n\t\t* Parent and child items. A non-hierarchical CPT\n\t\t* is like Posts.\n\t\t*/\t\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_in_admin_bar' => true,\n\t\t'menu_position' => 5,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\t\n\t// Registering your Custom Post Type\n\tregister_post_type( 'FAQ', $args );\n\n}", "title": "" }, { "docid": "308390225ae5a85b7fa1c212daff1399", "score": "0.62962943", "text": "public function getWpPostType(): WpPostTypeInterface;", "title": "" }, { "docid": "4165a72b408ed6dbff97984d40af2b2b", "score": "0.62961686", "text": "public function add_custom_post_type()\n\t{\n\t\t$labels = array(\n\t\t\t'name' => _x( 'Jobs', 'Post Type General Name', 'text_domain' ),\n\t\t\t'singular_name' => _x( 'Job', 'Post Type Singular Name', 'text_domain' ),\n\t\t\t'menu_name' => __( 'Jobs', 'text_domain' ),\n\t\t\t'name_admin_bar' => __( 'Job', 'text_domain' ),\n\t\t\t'archives' => __( 'Job Archives', 'text_domain' ),\n\t\t\t'attributes' => __( 'Job Attributes', 'text_domain' ),\n\t\t\t'parent_item_colon' => __( 'Parent Job:', 'text_domain' ),\n\t\t\t'all_items' => __( 'All Jobs', 'text_domain' ),\n\t\t\t'add_new_item' => __( 'Add New Job', 'text_domain' ),\n\t\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t\t'new_item' => __( 'New Job', 'text_domain' ),\n\t\t\t'edit_item' => __( 'Edit Job', 'text_domain' ),\n\t\t\t'update_item' => __( 'Update Job', 'text_domain' ),\n\t\t\t'view_item' => __( 'View Job', 'text_domain' ),\n\t\t\t'view_items' => __( 'View Jobs', 'text_domain' ),\n\t\t\t'search_items' => __( 'Search Job', 'text_domain' ),\n\t\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t\t'insert_into_item' => __( 'Insert into Job', 'text_domain' ),\n\t\t\t'uploaded_to_this_item' => __( 'Uploaded to this job', 'text_domain' ),\n\t\t\t'items_list' => __( 'Jobs list', 'text_domain' ),\n\t\t\t'items_list_navigation' => __( 'Jobs list navigation', 'text_domain' ),\n\t\t\t'filter_items_list' => __( 'Filter jobs list', 'text_domain' ),\n\t\t);\n\t\t$rewrite = array(\n\t\t\t'slug' => 'job',\n\t\t\t'with_front' => true,\n\t\t\t'pages' => true,\n\t\t\t'feeds' => true,\n\t\t);\n\t\t$args = array(\n\t\t\t'label' => __( 'Job', 'text_domain' ),\n\t\t\t'description' => __( 'A Journo Resources job listing', 'text_domain' ),\n\t\t\t'labels' => $labels,\n\t\t\t'supports' => array( 'title' ),\n\t\t\t'hierarchical' => false,\n\t\t\t'public' => true,\n\t\t\t'show_ui' => true,\n\t\t\t'show_in_menu' => true,\n\t\t\t'menu_position' => 5,\n\t\t\t'menu_icon' => 'dashicons-carrot',\n\t\t\t'show_in_admin_bar' => true,\n\t\t\t'show_in_nav_menus' => true,\n\t\t\t'can_export' => true,\n\t\t\t'has_archive' => true,\n\t\t\t'exclude_from_search' => false,\n\t\t\t'publicly_queryable' => true,\n\t\t\t'rewrite' => $rewrite,\n\t\t\t'capability_type' => 'post',\n\t\t\t'show_in_rest' => true,\n\t\t\t'rest_base' => 'jobs',\n\t\t);\n\t\tregister_post_type( 'jr_joblisting', $args );\n\t}", "title": "" }, { "docid": "78f2586faee3064478f5c6f3fac0a036", "score": "0.6294621", "text": "function bbp_get_forum_post_type()\n{\n}", "title": "" }, { "docid": "e3379450631567188283af38a281d0ef", "score": "0.62894464", "text": "abstract public function getFormType();", "title": "" }, { "docid": "e7fefddd2fbb89f0be99c714fee2036f", "score": "0.6282466", "text": "function bbp_get_reply_post_type()\n{\n}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.6281116", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.6281116", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "957a773cc313eb49ca22e7ec9f34f48d", "score": "0.6281116", "text": "function register_post_types() {\n\t}", "title": "" }, { "docid": "08efabf6f95f7fb028323bee9833e0d8", "score": "0.627588", "text": "public function swp_ds_main() {\n\n register_post_type( 'jQTransfer',\n array(\n \t'labels' => array(\n\t 'name' => __( 'jQTransfer' ),\n\t 'singular_name' => __( 'jQTransfer' ),\n\t 'add_new' => __( 'Add New' ),\n\t 'add_new_item' => __( 'Add New' ),\n\t 'edit_item' => __( 'Edit' ),\n\t 'new_item' => __( 'Add New' ),\n\t 'view_item' => __( 'View' ),\n\t 'search_items' => __( 'Search' ),\n\t 'not_found' => __( 'No entries found' ),\n\t 'not_found_in_trash' => __( 'No entries found in trash' )\n\t ),\n\t 'public' => true,\n\t //'supports' => array( 'title', 'editor', 'thumbnail', 'comments' ),\n\t 'supports' => array( 'title' ),\n\t 'capability_type' => 'post',\n\t 'rewrite' => array(\"slug\" => \"jqtransfer\"), // Permalinks format\n\t 'menu_position' => 5,\n\t 'register_meta_box_cb' => array( $this, 'add_jqtransfer_metaboxes' )\n )\n );\n\n }", "title": "" }, { "docid": "44aae71ee7f6297439dd0e5b93ff848c", "score": "0.62679094", "text": "public function feme_register_postype()\n {\n $labels = array(\n 'name' => __( 'Productos', 'fe-me' ),\n 'singular_name' => __( 'Producto', 'fe-me' ),\n 'add_new' => __( 'Añadir nuevo producto', 'fe-me' ),\n 'add_new_item' => __( 'Añadir nuevo producto', 'fe-me' ),\n 'edit' => __( 'Editar', 'fe-me' ),\n 'edit_item' => __( 'Editar producto', 'fe-me' ),\n 'new_item' => __( 'Nuevo producto', 'fe-me' ),\n 'view' => __( 'Ver producto', 'fe-me' ),\n 'view_item' => __( 'Ver producto', 'fe-me' ),\n 'search items' => __( 'Buscar productos', 'fe-me' ),\n 'not_found' => __( 'Ningun producto encontrado', 'fe-me' ),\n 'not_found_in_trash' => __( 'No hay productos en la papelera', 'fe-me' ),\n );\n\n /**\n * Arguments for the 'register_post_type' function\n *\n * @var array $args\n */\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => false,\n 'description' => __( 'Informa de tus productos y servicios' , 'fe-me' ),\n 'public' => true,\n 'menu_position' => 20,\n 'menu_icon' => 'dashicons-format-gallery',\n 'has_archive' => 'fe-productos',\n 'rewrite_rules' => array( 'slug' => 'fe-productos', 'with_front' => false ),\n 'supports' => array( 'title', 'editor', 'thumbnail' ),\n );\n\n register_post_type( 'feme_productos', $args );\n }", "title": "" }, { "docid": "fb84be910851f3898cbe278fc7a18431", "score": "0.6266741", "text": "function custom_post_type() {\n\n\t$labels = array(\n\t\t'name' => _x( 'news', 'Post Type General Name', 'text_domain' ),\n\t\t'singular_name' => _x( 'news', 'Post Type Singular Name', 'text_domain' ),\n\t\t'menu_name' => __( 'News', 'text_domain' ),\n\t\t'name_admin_bar' => __( 'News', 'text_domain' ),\n\t\t'archives' => __( 'Item Archives', 'text_domain' ),\n\t\t'attributes' => __( 'Item Attributes', 'text_domain' ),\n\t\t'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n\t\t'all_items' => __( 'All Items', 'text_domain' ),\n\t\t'add_new_item' => __( 'Add New Item', 'text_domain' ),\n\t\t'add_new' => __( 'Add New', 'text_domain' ),\n\t\t'new_item' => __( 'New Item', 'text_domain' ),\n\t\t'edit_item' => __( 'Edit Item', 'text_domain' ),\n\t\t'update_item' => __( 'Update Item', 'text_domain' ),\n\t\t'view_item' => __( 'View Item', 'text_domain' ),\n\t\t'view_items' => __( 'View Items', 'text_domain' ),\n\t\t'search_items' => __( 'Search Item', 'text_domain' ),\n\t\t'not_found' => __( 'Not found', 'text_domain' ),\n\t\t'not_found_in_trash' => __( 'Not found in Trash', 'text_domain' ),\n\t\t'featured_image' => __( 'Featured Image', 'text_domain' ),\n\t\t'set_featured_image' => __( 'Set featured image', 'text_domain' ),\n\t\t'remove_featured_image' => __( 'Remove featured image', 'text_domain' ),\n\t\t'use_featured_image' => __( 'Use as featured image', 'text_domain' ),\n\t\t'insert_into_item' => __( 'Insert into item', 'text_domain' ),\n\t\t'uploaded_to_this_item' => __( 'Uploaded to this item', 'text_domain' ),\n\t\t'items_list' => __( 'Items list', 'text_domain' ),\n\t\t'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n\t\t'filter_items_list' => __( 'Filter items list', 'text_domain' ),\n\t);\n\t$args = array(\n\t\t'label' => __( 'news', 'text_domain' ),\n\t\t'description' => __( 'Post Type Description', 'text_domain' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor' ),\n\t\t'taxonomies' => array( 'category', 'post_tag' ),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => true,\n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'can_export' => true,\n\t\t'has_archive' => true,\n\t\t'exclude_from_search' => false,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'page',\n\t);\n\tregister_post_type( 'news', $args );\n\n}", "title": "" }, { "docid": "f75228c267265fcedb87637b5dcdf045", "score": "0.6258678", "text": "function custom_post_type() {\n \t\n \t//Let's call and create the custom post type\n \t$event = new Custom_Post_Type( 'Event', array( 'show_in_menu' => true, 'menu_position' => 25, 'has_archive' => true, 'taxonomies' => array('events')), array('menu_name' => 'Calendar') );\n \t$event->add_meta_box(\n \t\t'Event Details',\n \t\tarray(\n \t\t\t'Start Date'\t=>\t'text',\n \t\t\t'Starts at'\t\t=>\t'text',\n \t\t\t'End Date'\t\t=>\t'text',\n \t\t\t'Ends at'\t\t=>\t'text',\n \t\t\t'Where'\t\t\t=>\t'text',\n \t\t\t'RSVP'\t\t\t=>\t'checkbox',\n \t\t\t'Entry Fee'\t\t=>\t'text'\n \t\t),\n \t\t'side'\n \t) ;\n\n\t}", "title": "" }, { "docid": "5920c740189c8e3d3fedf79cd268c5ea", "score": "0.6250201", "text": "public static function postTypes() {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "e31883ac2d6468c6e1a52f12cc93b1fd", "score": "0.6244686", "text": "function una_custom_post_factsheet() {\n register_post_type( 'unafactsheet',\n array(\n 'labels' => array(\n 'name' => __( 'Policy', 'Policies' ),\n 'singular_name' => __( 'Policy' ),\n 'add_new' => __( 'Add New', 'Policy' ),\n 'add_new_item' => __( 'Add Policy' ),\n 'edit_item' => __( 'Edit Policy' ),\n 'new_item' => __( 'New Policy' ),\n 'view_item' => __( 'View Policy' ),\n 'all_items' => __( 'All Policies' ),\n 'search_items' => __('Search Policies'),\n 'not_found' => __('No Policy found.'),\n 'featured_image' => __( 'Policy Image' ),\n 'set_featured_image' => __( 'Set image' ),\n 'remove_featured_image' => __( 'Remove image'),\n ),\n 'description' => __('Description to describe'),\n 'public' => true,\n 'show_ui' => true,\n 'hierarchical' => true,\n 'has_archive' => true,\n 'exclude_from_search' => false,\n 'rewrite' => array('slug' => 'policy','with_front' => false),\n 'supports' => array(\n 'title',\n 'editor',\n 'excerpt',\n 'thumbnail',\n 'revisions',\n ),\n 'menu_position' => 4,\n 'show_in_rest' => false, // set to false to disable GB\n 'menu_icon' => get_stylesheet_directory_uri() . '/img/logos/icon-unafactsheet.svg',\n 'query_var' => true,\n 'taxonomies' => array(\n 'post_tag',\n )\n )\n );\n register_taxonomy_for_object_type( 'post_tag', 'unafactsheet' );\n }", "title": "" }, { "docid": "1b5a66ae26bd8c78a6fd84cc02457e4a", "score": "0.62429684", "text": "abstract public function getFormFieldType();", "title": "" }, { "docid": "e49c4b7158d2b131be2ee0e37d162a78", "score": "0.6241936", "text": "function asucasa_custom_type_post (){\n\n\t$labels = array(\n\t\t'name'=> 'Clientes', \n\t\t'singular_name' => 'Cliente', \n\t\t'add_new' => 'Add Item', \n\t\t'all_items' => 'All Items', \n\t\t'add_new_item' => 'Add Item', \n\t\t'edit_item' => 'Edit Item', \n\t\t'new_item' => 'New Item', \n\t\t'view_item' => 'View Item', \n\t\t'search_item' => 'Search Clientes', \n\t\t'not_found' => 'No Items Found', \n\t\t'not_found_in_trash' => 'No Items found in Trash', \n\t\t'parent_item_colon' => 'Parent Item'\n\t);\n\t$args = array(\n\t\t'labels' => $labels, \n\t\t'public' => true, \n\t\t'has_archive' => true, \n\t\t'publicly_queryable' => true, \n\t\t'query_var' => true, \n\t\t'rewrite' => true, \n\t\t'capability_type' => 'post', \n\t\t'hierarchical' => false, \n\t\t'supports' => array(\n\t\t\t'title', 'editor', 'excerpt', 'thumbnail', 'revisions',), \n\t\t'menu_positions' => 5, \n\t\t'exclude_from_search' => false, \n\t\t'publicly_queryable' => true \n\t);\n\tregister_post_type('cliente', $args);\n}", "title": "" } ]
5899f8f8ce7cd9f8e8f3d672bfd4a6bf
returns a pretty bootstrap badge
[ { "docid": "9b225ebf56ff8c4b2e345696ab85ec49", "score": "0.0", "text": "function prettify_profilestate($state) {\n switch ($state) {\n\t\tcase 0: $pps = '<span class=\"label label-default\">Offline</span>'; break;\n\t\tcase 1: $pps = '<span class=\"label label-primary\">Online</span>'; break;\n\t\tcase 2: $pps = '<span class=\"label label-primary\">Busy</span>'; break;\n\t\tcase 3: $pps = '<span class=\"label label-primary\">Away</span>'; break;\n\t\tcase 4: $pps = '<span class=\"label label-primary\">Away</span>'; break;\n\t\tcase 5: $pps = '<span class=\"label label-info\">Ready to trade</span>'; break;\n\t\tcase 6: $pps = '<span class=\"label label-info\">Ready to play</span>'; break;\n }\n\n return $pps;\n}", "title": "" } ]
[ { "docid": "9b8337cb9342ec0d1e8bfe66ad409f17", "score": "0.7107464", "text": "public function getBadge()\r\n {\r\n if (self::isOverdue())\r\n return Label::danger(Yii::t('TaskModule.views_index_index', 'Overdue'))->icon('fa fa-exclamation-triangle')->options(['style' => 'margin-right: 3px;'])->right();\r\n\r\n return null;\r\n }", "title": "" }, { "docid": "279ebaaf052287e3ac96cc39dee986d8", "score": "0.7017566", "text": "public function getStatusBadges()\n {\n $badges = '';\n if ($this->hasActionState())\n $badges .= '<span class=\"label label-warning\">&nbsp;</span>';\n if ($this->hasRemainsWarningState())\n $badges .= '<span class=\"label label-danger\">' . $this->remains . '</span>';\n if ($this->remains == 0)\n $badges .= '<span class=\"label label-default\">&nbsp;</span>';\n/* if ($this->status == self::STATUS_NOT_PROCESSED)\n $badges .= '<span class=\"label label-info\">&nbsp;</span>';*/\n return $badges;\n }", "title": "" }, { "docid": "9214af98441f05b85f2745e6fd1d8143", "score": "0.68729365", "text": "function labeljson($msg, $color){\n $lbl='<div class=\"text-center\"><span class=\"badge badge-'.$color.'\">'.$msg.'</span></div>';\n return $lbl;\n}", "title": "" }, { "docid": "601f711d77da1e388637b917d8762cfa", "score": "0.67859674", "text": "public function getIsActiveBadgeAttribute(): string\n {\n return sprintf(<<<'html'\n <span class=\"badge badge-%s\">\n <i class=\"fa fa-%s\"></i> %s\n </span>\n html,\n $this->is_active ? 'success' : 'danger',\n $this->is_active ? 'check-circle' : 'times-circle',\n $this->is_active ? trans('Active') : trans('Not Active')\n );\n }", "title": "" }, { "docid": "61a370c98d6f4c26c5fda7841c28ae89", "score": "0.6760581", "text": "public function adminBSBButtonBadgeInfoFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), ArrayHelper::get($args, \"large\", false), \"btn-info\");\n }", "title": "" }, { "docid": "2477de20ef3de7ad47ebe9c02e87eb03", "score": "0.6759772", "text": "public function badge($style = 'blue')\n {\n $self = $this;\n\n return $this->unescape()->as(function ($value) use ($self, $style) {\n [$class, $background] = $self->formatStyle($style);\n\n return collect($value)->map(function ($name) use ($class, $background) {\n return \"<span class='badge bg-{$class}' $background>$name</span>\";\n })->implode(' ');\n });\n }", "title": "" }, { "docid": "90637d67baa3572d3699085119951fa3", "score": "0.67401165", "text": "public function getStatusLabelAttribute()\n {\n if ($this->id_satuan >= 0) {\n return '<span class=\"badge badge-secondary>Draft</span>';\n }\n return '<span class=\"badge badge-success>Publish</span>';\n }", "title": "" }, { "docid": "fbd65b2f6923dadb205c556d414a8e17", "score": "0.6676751", "text": "protected function setBadge(){\n\t\n\t\tif($this->addBadge==false){\n\t\t\treturn false;\n\t\t}\n\t\t$this->totalChilderen = (int) $this->totalChilderen;\n\t\tif(isset($this->totalChilderen) and $this->totalChilderen > 0){\n\t\t\treturn \"<span class=\\\"$this->badgeClass\\\">$this->totalCount</span>\";\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "5ab3af6c289bd5b87891da25ae036a4d", "score": "0.6557124", "text": "public function get_menu_badge() {\n\t\t\treturn ( monstroid_dashboard_updater()->force_has_update() )\n\t\t\t\t\t? '<span class=\"update-plugins count-1 md-badge\" ><span class=\"update-count\">1</span></span>'\n\t\t\t\t\t: '';\n\t\t}", "title": "" }, { "docid": "0a549c52d98059c72c69235b586d0fc9", "score": "0.6510157", "text": "public function getStatus($status){\n\t\t$badge = '';\n\t\tswitch($status){\n\t\t\tcase 'A':\n\t\t\t\t$badge = \"<span class='badge badge-success'>Activo</span>\";\n\t\t\t\tbreak;\n\t\t\tcase 'S':\n\t\t\t\t$badge = \"<span class='badge badge-important'>Desactivado</span>\";\n\t\t\t\tbreak;\n\t\t\tcase 'P':\n\t\t\t\t$badge = \"<span class='badge badge-warning'>Pendiente</span>\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $badge;\n\n\t}", "title": "" }, { "docid": "6f98c6517ac22c42672aa2fa837deb58", "score": "0.64710253", "text": "private function _formatItemBadge($item)\n {\n // only show badge or arrow\n\n $badge = ArrayHelper::getValue($item, 'badge', null);\n\n if ($badge !== null) {\n return Html::tag(\n \"span\", \n Html::tag( \"span\", $badge[\"label\"], [\n \"class\" => \"m-badge m-badge--\" . $badge['type']\n ]), \n [\n \"class\" => \"m-menu__link-badge\"\n ]\n );\n } else {\n if (!empty($item['items'])) {\n return Html::tag('i', '', [\n \"class\" => \"m-menu__ver-arrow la la-angle-right\"\n ]);\n }\n }\n\n return '';\n }", "title": "" }, { "docid": "287e34f6dfedd5ab023e4ecc6cd03055", "score": "0.6452428", "text": "public function colorBadge() {\n \n if ($this->id_estado == self::ESTADO_BORRADOR){\n $color = 'badge-warning';\n// $classAndIcon[\"icon\"] = \"fa fa-balance-scale \" . $classAndIcon['color'];\n }\n elseif ($this->id_estado == self::ESTADO_PENDIENTE){\n $color = 'badge-info';\n// $classAndIcon[\"icon\"] = \"fa fa-check-square-o \" . $classAndIcon['color'];\n }elseif ($this->id_estado == self::ESTADO_EN_PROGRESO){\n $color = 'badge-primary';\n// $classAndIcon['icon'] = \"fa fa-file-text-o \" . $classAndIcon['color'];\n }elseif ($this->id_estado == self::ESTADO_FINALIZADO){\n $color = 'badge-success';\n// $classAndIcon['icon'] = \"fa fa-file-text-o \" . $classAndIcon['color'];\n }elseif ($this->id_estado == self::ESTADO_FINALIZADO_PARCIAL){\n $color = 'badge-success';\n// $classAndIcon['icon'] = \"fa fa-file-text-o \" . $classAndIcon['color'];\n }elseif ($this->id_estado == self::ESTADO_ANULADA){\n $color = 'badge-danger';\n// $classAndIcon['icon'] = \"fa fa-file-text-o \" . $classAndIcon['color'];\n }\n \n return $color;\n }", "title": "" }, { "docid": "cfa88520cdc925575d098ecefbc1fdd3", "score": "0.63959545", "text": "public function getBadge()\n {\n return $this->badge;\n }", "title": "" }, { "docid": "8b0bf5cf4186225d4fd45e3c959a775e", "score": "0.6364746", "text": "public function adminBSBButtonBadgeDangerFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), ArrayHelper::get($args, \"large\", false), \"btn-danger\");\n }", "title": "" }, { "docid": "5150cc440a17b39ba581ed6d86690ebc", "score": "0.63480496", "text": "public function adminBSBButtonBadgeSuccessFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), ArrayHelper::get($args, \"large\", false), \"btn-success\");\n }", "title": "" }, { "docid": "51cb17fd8796aab6d2ff1be0af59e2cb", "score": "0.6332743", "text": "static function badge($text, $direction=\"\"){\n \t\n \t$class = ($direction==\"\")?\"\":\"pull-$direction\";\n \treturn \"<span class='badge $class'>$text</span>\";\n }", "title": "" }, { "docid": "5295b75bb1ba0114c33c312913c851cb", "score": "0.6319719", "text": "function tdLabel($type, $text, $width = '60px')\n{\n return \"<label class='badge badge-$type tdcenter' style='width: $width; line-height: 15px; margin-top: 7px; display: inline-block;'>$text</label>\";\n}", "title": "" }, { "docid": "a36d679b928fc6bd0021b85291e0fa88", "score": "0.62955326", "text": "public function adminBSBButtonBadgePrimaryFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), ArrayHelper::get($args, \"large\", false), \"btn-primary\");\n }", "title": "" }, { "docid": "d17e2db6bc10635ddd3ec4375cbf92bc", "score": "0.627625", "text": "public function adminBSBButtonBadgeMaterialDesignFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), ArrayHelper::get($args, \"large\", false), static::materialDesignColor(ArrayHelper::get($args, \"color\", \"red\"), \"bg-\"));\n }", "title": "" }, { "docid": "451f839053681b9eda07c6e54787c28b", "score": "0.6268822", "text": "function get_status_badge( $book_status ){\n\t$book_status = strtolower($book_status);\n\t$statuses = array('approved' => 'primary', 'completed' => 'success', 'pending' => 'warning', 'unknown' => 'secondary');\n\n\t$colour = parse_arg( $book_status, $statuses );\n\tif ( !array_key_exists($book_status, $statuses) || empty($book_status) ){\n\t\t$book_status = 'unknown';\n\t\t$colour = 'secondary';\n\t}\n\n\treturn sprintf( '<span class=\"badge badge-%1$s\">%2$s</span>', $colour, strtoupper($book_status) );\n}", "title": "" }, { "docid": "65b9d123d43a8eaa1b04cd01fab8376c", "score": "0.62215996", "text": "function wp_ozh_lcc_badge_css() {\r\n\tglobal $wp_ozh_lcc_badge;\r\n\twp_ozh_lcc_badge_init();\r\n\t$bg = $wp_ozh_lcc_badge['bg'];\r\n\t$fg = $wp_ozh_lcc_badge['fg'];\r\n\t$d1 = $wp_ozh_lcc_badge['d1'];\r\n\t$d2 = $wp_ozh_lcc_badge['d2'];\r\n\t$l1 = $wp_ozh_lcc_badge['l1'];\r\n\t$l2 = $wp_ozh_lcc_badge['l2'];\r\n\t$l3 = $wp_ozh_lcc_badge['l3'];\r\n\t$label = stripslashes($wp_ozh_lcc_badge['label']);\r\n\t$count = $wp_ozh_lcc_badge['count'];\r\n\r\n\techo <<<HTML\r\n\t<style>\r\n\t#lcc_div {\r\n\t\tbackground:#$bg !important;\r\n\t\tcolor:#$fg !important;\r\n\t\twidth:86px !important;\r\n\t\theight:18px !important;\r\n\t\tfont-size:10px !important;\r\n\t\tfont-family:Arial !important;\r\n\t\tborder:1px solid #$d1 !important;\r\n\t\tborder-left:1px solid #$l1 !important;\r\n\t\tborder-top:1px solid #$l1 !important;\r\n\t}\r\n\t#lcc_div2 {\r\n\t\tfloat:left !important;\r\n\t\tmargin:1px !important;\r\n\t\tbackground:#$l2 !important;\r\n\t\tborder:1px solid #$d2 !important;\r\n\t\tborder-right:1px solid #$l3 !important;\r\n\t\tborder-bottom:1px solid #$l3 !important;\r\n\t\twidth:30px !important;\r\n\t\ttext-align:right !important;\r\n\t}\r\n\t#lcc_div3 {\r\n\t\tpadding-top:2px !important;\r\n\t\tmargin-right:2px !important;\r\n\t\tfloat:right !important;\r\n\t}\r\n\t</style>\r\n\r\n\t<div id=\"lcc_div\">\r\n\t\t<div id=\"lcc_div2\">$count</div> <div id=\"lcc_div3\">$label</div>\r\n\t</div>\r\n\r\nHTML;\r\n\r\n}", "title": "" }, { "docid": "9917968c18bb3b4130476e105c23834f", "score": "0.62202454", "text": "public function getBadges()\n {\n return view('dashboard.badges');\n }", "title": "" }, { "docid": "67317b0b2d4d0d4119e6c55d1becefe8", "score": "0.621065", "text": "public function adminBSBButtonBadgeDefaultFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), ArrayHelper::get($args, \"large\", false), \"btn-default\");\n }", "title": "" }, { "docid": "e7e7a6e862ec7eafb3a780df99949423", "score": "0.62034726", "text": "function qa_user_badge( $user_id, $echo = true, $mobile = false ) {\n\t\n\t$user_point\t=\tqa_get_user_point( $user_id );\n\t$levels\t\t=\tget_option( 'qa_level', array() );\n\t$badge\t\t=\t'';\n\n\tif(!empty($levels)){\n\t\tforeach($levels as $key => $level) {\n\t\t\tif( $level->qa_badge_point <= $user_point ) {\n\n\t\t\t\tif(!$mobile)\n\t\t\t\t\t$badge\t.=\t'<span title=\"'. $user_point .'\" class=\"user-badge\" style=\"background-color:'. $level->qa_badge_color .';\">';\n\t\t\t\telse\n\t\t\t\t\t$badge\t.=\t'<span title=\"'. $user_point .'\" class=\"user-badge\" style=\"color:'. $level->qa_badge_color .';\">';\n\n\t\t\t\t$badge\t.=\t $level->post_title;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$badge\t\t.=\t'</span>';\n\t} \n\n\t$badge = $badge != '</span>' ? $badge : '<span title=\"'.__(\"Default\", ET_DOMAIN).'\" class=\"user-badge\">'.__(\"Default\", ET_DOMAIN).'</span>'; \n\n\tif($echo) echo $badge;\n\telse return $badge;\n}", "title": "" }, { "docid": "864682729d3d6214f6310e18699905d6", "score": "0.61518455", "text": "public function getBadgeAttribute(): string\n {\n $achievements = $this->achievements()->count();\n $badges = config('settings.badges');\n\n if (array_key_exists($achievements, $badges)) {\n return $badges[$achievements];\n }\n\n $key = collect($badges)->keys()->filter(fn(int $count) => $count <= $achievements)->sort()->last() ?: 0;\n\n return $badges[$key];\n }", "title": "" }, { "docid": "fbbbffe6f6d151a38a5b164d08be3256", "score": "0.60269004", "text": "public function badgeRender(): ResponseInterface\n {\n return $this->file($this->pwaPush()->resources('/assets/dist/img/test-mode.badge.png'), null, 'inline');\n }", "title": "" }, { "docid": "fb676f69251e23337834b265d4a3bc07", "score": "0.6009953", "text": "public function adminBSBButtonBadgeListFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), false, static::materialDesignColor(ArrayHelper::get($args, \"color\", \"red\"), \"bg-\"), true, ArrayHelper::get($args, \"link\"));\n }", "title": "" }, { "docid": "b2ad99ade2c45d21c64540199124128d", "score": "0.6007825", "text": "public function adminBSBButtonBadgeWarningFunction(array $args = []): string {\n return $this->adminBSBBadge(ArrayHelper::get($args, \"content\"), ArrayHelper::get($args, \"label\"), ArrayHelper::get($args, \"large\", false), \"btn-warning\");\n }", "title": "" }, { "docid": "414d6572e472210ec279422e6ade99de", "score": "0.59720665", "text": "public function get_badge_name() {\n\n\t\t$names = array(\"Fluffy\", \"Wolfy\", \"Skunky\", \"Lion\", \"Leopard\",\n\t\t\t\"Chewtoy\", \"Catnip\", \"Mouse\", \"Paws\");\n\n\t\t$retval = $this->get_random_from_set($names) \n\t\t\t. $this->get_number(0, 99);\n\n\t\treturn($retval);\n\n\t}", "title": "" }, { "docid": "b3433189be4a3b000f079851c6c3d768", "score": "0.59181017", "text": "public function getFormattedValue(): HtmlString\n {\n $icon = $this->value ? 'check-circle' : 'x-circle';\n $color = $this->value ? 'text-green-500' : 'text-red-500';\n\n return new HtmlString(\n view(\"components.heroicon.{$icon}\", ['class' => \"{$color} inline-block\"])->render()\n );\n }", "title": "" }, { "docid": "47c53b01e6e43f240cd66d9e948f6f31", "score": "0.58462447", "text": "protected function get__badge()\n\t{\n\t\treturn array(\n\t\t\t0\t=> 'ipsBadge ipsBadge_intermediary ipsPos_right',\n\t\t\t1\t=> $this->type === 'custom' ? 'content_block_add_type_custom' : 'content_block_add_type_plugin',\n\t\t);\n\t}", "title": "" }, { "docid": "4515ba8627745d2d72427eb84869462b", "score": "0.5827675", "text": "function qa_status_coloured($code, $label=\"\", $suffix=\"\") {\n $status = qa_approval_status($code);\n\n $title = $status;\n if ($label == \"\") {\n $label = $status;\n }\n else {\n $title = $status;\n }\n if ($label == \"\") $label = \"--\";\n if ($title == \"\") $title = \"No approvals\";\n\n return \"<span \"\n . \"style=\\\"color:\" . qa_approval_colour($code) . \"\\\"\"\n . \"title=\\\"$title $suffix\\\"\"\n . \">\"\n . $label\n . \"</span>\";\n}", "title": "" }, { "docid": "d35e03405c3939d7c70c703894f97fdf", "score": "0.5827529", "text": "public function getDisplayTagAttribute()\n {\n $tag = Config::get('lorekeeper.item_tags.' . $this->tag);\n if($tag) return '<span class=\"badge\" style=\"color: '.$tag['text_color'].';background-color: '.$tag['background_color'].';\">'.$tag['name'].'</span>';\n return null;\n }", "title": "" }, { "docid": "b708b9c2a1a44735c483cb99a24761e5", "score": "0.5751174", "text": "public function generate(): string\n {\n $status = Tags::NBSP;\n if ($this->statusData['status-type'] !== '' && $this->statusData['status-text'] !== '') {\n $status = [\n Tags::div(\n $this->getConstant($this->statusData['status-text']),\n ['class' => $this->getConstant($this->statusData['status-type'])]\n )\n ];\n }\n return Tags::div($status, ['class' => 'status']);\n }", "title": "" }, { "docid": "91b730550d025d755b345b125d2a512c", "score": "0.5751047", "text": "public function status($status)\n {\n if ($status == 1) {\n return $status = \"<span class='badge badge-success'>Approved</span>\";\n } \n if ($status == 0) {\n return $status = \"<span class='badge badge-warning'>Pending</span>\";\n } \n if ($status == 2) {\n return $status = \"<span class='badge badge-danger'>Canceled</span>\";\n }\n \n }", "title": "" }, { "docid": "2282f84c09778b6f323c15e63d634632", "score": "0.5747943", "text": "public function getStatus(){\n if ($this->status === 'PUBLISHED'){\n return '<span class=\"label label-success\">' . $this->status . '</span>';\n }\n return '<span class=\"label label-warning\">' . $this->status . '</span>';\n }", "title": "" }, { "docid": "214b1f0dcebba1f5971b6f2018f0417b", "score": "0.5731121", "text": "public static function displayBadges(User $user): string\n {\n $badges = '';\n\n foreach ($user->badges as $badge) {\n $badges .= Html::tag('span', UserBadge::$badges[$badge->type], ['class' => 'badge badge-pill badge-primary']);\n }\n\n return $badges;\n }", "title": "" }, { "docid": "8a547b42d6c0dd2ab7b0391a1e7c157c", "score": "0.57248944", "text": "function badges() {\n\t\n\t\t// Setup array\n\t\t$badges = array();\n\t\t\n\t\t// Role Badges\n\t\tif ( 'administrator' == $this->roles[0] || 'bbp_moderator' == $this->roles[1] || 'bbp_keymaster' == $this->roles[1] ) {\n\t\t\t$badges['tfteam'] = array(\n\t\t\t\t'name'\t\t=> 'TF Team Member',\n\t\t\t\t'class'\t\t=> 'tfteam',\n\t\t\t\t'tier'\t\t=> 'gold' \n\t\t);}\t\n\t\telseif ( 'zenimax' == $this->roles[0] ) {\n\t\t\t$badges['zenimax'] = array(\n\t\t\t\t'name'\t\t=> 'ZeniMax Online Staff',\n\t\t\t\t'class'\t\t=> 'zenimax',\n\t\t\t\t'tier'\t\t=> 'gold' \n\t\t);}\t\t\t\n\t\t\n\t\t// Veterancy Badges\n\t\tif( $this->regdate <= strtotime( '11/12/2012' ) ) {\n\t\t\t$badges['founder']\t= array(\n\t\t\t\t'name'\t\t=> 'Founder',\n\t\t\t\t'class'\t\t=> 'founder',\n\t\t\t\t'tier'\t\t=> 'gold' \n\t\t);}\n\t\tif( $this->regdate <= strtotime( '-1 year' ) ) {\n\t\t\t$badges['veteran']\t= array(\n\t\t\t\t'name'\t\t=> 'One Year Veteran',\n\t\t\t\t'class'\t\t=> 'veteran',\n\t\t\t\t'tier'\t\t=> 'bronze' \n\t\t);}\n\t\tif( $this->regdate <= strtotime( '-2 years' ) ) {\n\t\t\t$badges['veteran']\t= array(\n\t\t\t\t'name'\t\t=> 'Two\tYear Veteran',\n\t\t\t\t'class'\t\t=> 'veteran',\n\t\t\t\t'tier'\t\t=> 'silver' \n\t\t);}\n\t\t\t\n\t\t// Posting Badges\n\t\tif( $this->posts['total'] >= 10 ) {\n\t\t\tif \t\t( $this->posts['total'] >= 1000 ) \t$badge_tier = 'gold';\n\t\t\telseif \t( $this->posts['total'] >= 100 ) \t$badge_tier = 'silver';\n\t\t\telse\t\t\t\t\t\t\t\t\t\t$badge_tier = 'bronze';\n\t\t\t$badges['posting']\t= array(\n\t\t\t\t'name'\t\t=> $this->rank['rank_title'],\n\t\t\t\t'class'\t\t=> 'posting',\n\t\t\t\t'tier'\t\t=> $badge_tier \n\t\t);}\n\t\tif ( isset( $this->posts['articles'] ) && $this->posts['articles'] > 0 ) {\n\t\t\t$badges['author'] = array(\n\t\t\t\t'name'\t\t=> 'Contributor',\n\t\t\t\t'class'\t\t=> 'author',\n\t\t\t\t'tier'\t\t=> 'gold',\n\t\t);}\n\t\t\n\t\t// Social Badges\n\t\tif ( 1 <= bp_get_total_group_count_for_user( $this->id ) ) {\n\t\t\t$badges['grouped'] = array(\n\t\t\t\t'name'\t\t=> \"It's Dangerous To Go Alone...\",\n\t\t\t\t'class'\t\t=> 'grouped',\n\t\t\t\t'tier'\t\t=> 'bronze',\n\t\t);}\n\t\tif ( groups_is_user_member( $this->id , 1 ) ) {\n\t\t\t$badges['ermember'] = array(\n\t\t\t\t'name'\t\t=> 'Entropy Rising Member',\n\t\t\t\t'class'\t\t=> 'ermember',\n\t\t\t\t'tier'\t\t=> 'gold',\n\t\t);}\n\t\tif ( $this->donor >= 5 ) {\n\t\t\t$badges['supporter'] = array(\n\t\t\t\t'name'\t\t=> 'Tamriel Foundry Supporter',\n\t\t\t\t'class'\t\t=> 'supporter',\n\t\t\t\t'tier'\t\t=> 'gold',\n\t\t);}\t\t\n\t\t\n\t\t// Game Badges\n\t\tif ( '' != $this->faction ) {\n\t\t\t$badges['declared'] = array(\n\t\t\t\t'name'\t\t=> 'Declared Allegiance',\n\t\t\t\t'class'\t\t=> $this->faction,\n\t\t\t\t'tier'\t\t=> 'bronze',\n\t\t);}\n\t\tif ( $this->charname && $this->race && $this->class && $this->prefrole ) {\n\t\t\t$badges['character'] = array(\n\t\t\t\t'name'\t\t=> 'In Character!',\n\t\t\t\t'class'\t\t=> 'character',\n\t\t\t\t'tier'\t\t=> 'silver',\n\t\t);}\t\t\t\n\t\treturn $badges;\n\t}", "title": "" }, { "docid": "a271d98b690e86a8984540d1fcfbefa8", "score": "0.56950593", "text": "public function getBadgeClass() {\n\n\t\treturn $this->badgeClass;\n\t}", "title": "" }, { "docid": "0500225ff87153e398898004f3186862", "score": "0.56767315", "text": "function tutsplus_get_message_markup( $message, $severity ) {\n\n $output = '<div class=\"alert alert-' . $severity . ' alert-dismissable\">';\n $output .= '<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">';\n $output .= '<i class=\"fa fa-times-circle\"></i>';\n $output .= '</button>';\n $output .= '<p class=\"text-center\">' . $message . '</p>';\n $output .= '</div>';\n\n return $output;\n\n}", "title": "" }, { "docid": "8f5c93b89b7806eb547653f344156aa9", "score": "0.5676708", "text": "public function getBadgeValue()\n\t{\n\t\treturn null;\n\t}", "title": "" }, { "docid": "c110803044b0fa986d8fb439cea7eda8", "score": "0.56753474", "text": "function status_warning($status) {\n return '<span class=\"label label-warning\">' . $status . '</span>';\n}", "title": "" }, { "docid": "f5d5bf9028c1f98b78f1e2c9bbc3c3fc", "score": "0.5668538", "text": "public function printBadge(){\n $argID=$this->input->post('userid');\n $data=$this->Audit_started_model->getprintbadgecode($argID);\n foreach($data as $r):\n echo $r->badge_code;\n endforeach;\n \n }", "title": "" }, { "docid": "2bf5f3e8166d5977cfa1c4ced4c72af5", "score": "0.56650215", "text": "function get_addthis_badge($options = null)\n{\n $string = '';\n $username = sfConfig::get('app_rt_social_networking_service_username');\n $option_string = '';\n \n if(!is_null($options))\n {\n $options['url'] = isset($options['url']) ? $options['url'] : '';\n $options['title'] = isset($options['title']) ? $options['title'] : '';\n $options['description'] = isset($options['description']) ? $options['description'] : '';\n $option_string = sprintf(' addthis:url=\"%s\" addthis:title=\"%s\" addthis:description=\"%s\" ', $options['url'], $options['title'], $options['description']);\n }\n\n $string = <<< EOS\n<a class=\"addthis_button\" $option_string href=\"http://www.addthis.com/bookmark.php?v=250&amp;username=$username\"><img src=\"http://s7.addthis.com/static/btn/v2/lg-share-en.gif\" width=\"125\" height=\"16\" alt=\"Bookmark and Share\" style=\"border:0; float:left; margin-right:10px;\"/></a><script type=\"text/javascript\" src=\"http://s7.addthis.com/js/250/addthis_widget.js#username=$username\"></script>\nEOS;\n\n return $string;\n}", "title": "" }, { "docid": "66c97e0a4d6549b83a2c2c321eec15b5", "score": "0.5645894", "text": "public static function badge($contents, $type=false)\n\t{\n\t\tif ($contents == '') { return false; }\n\t\tif (empty($type)) { $type == 'default'; }\n\t\tif (!is_array($attrs)) { $attrs = array(); }\n\t\t$attrs['class'] = (!empty($attrs['class'])) ? ($attrs['class'] . ' badge badge-' . $type) : ('badge badge-' . $type);\n\t\treturn Format::xhe('span', $contents, $attrs);\n\t}", "title": "" }, { "docid": "ba9c1ac8274b868b0b4fc32396f018ed", "score": "0.5643158", "text": "public function getGradeColor($grade){\n\n\t\t\tif ( $grade == \"A1\" ){\n\t \treturn '<span class=\"badge badge-success\">A1</span>';\n\t }\n\t else if ( $grade == \"B3\" ){\n\t \treturn '<span class=\"badge badge-info\">B3</span>';\n\t }\n\t else if ( $grade == \"C5\" ){\n\t \treturn '<span class=\"badge badge-warning\"i>C5</span>';\n\t } \n\t\t}", "title": "" }, { "docid": "70758292054e8a3200a068b8d44e785e", "score": "0.56334", "text": "public function displayBadge($atts, $content=null) {\r\n\t\t//DB Plugin Options\r\n\t\t$options = get_option($this->ZDGCC_DB_option);\r\n\t\t\r\n\t\treturn $this->WidgetHTML($options);\r\n\t}", "title": "" }, { "docid": "a3597c7ef7ebecdd0c7065db98212118", "score": "0.5587149", "text": "function get_tweetmeme_badge($options = null)\n{\n return '';\n \n $option_string = '';\n\n $string = '';\n\n if(isset($options['url']))\n {\n $url = $options['url'];\n $string = <<< EOS\n<script type=\"text/javascript\">\ntweetmeme_url = '$url';\ntweetmeme_style = 'compact';\n</script>\nEOS;\n }\n\n $string .= <<< EOS\n<script type=\"text/javascript\" src=\"http://tweetmeme.com/i/scripts/button.js\"></script>\nEOS;\n\n return $string;\n}", "title": "" }, { "docid": "6b9afad30dcabafcee7e74bfa91a94c8", "score": "0.5549008", "text": "function get_social_networking_badge($options = null)\n{\n if(sfConfig::get('app_rt_social_networking_service') === 'tweetmeme')\n {\n return get_tweetmeme_badge($options);\n }\n\n if(!sfConfig::has('app_rt_social_networking_service') || !sfConfig::has('app_rt_social_networking_service_username'))\n {\n return '';\n }\n\n if(sfConfig::get('app_rt_social_networking_service') === 'addthis')\n {\n return get_addthis_badge($options);\n }\n\n if(sfConfig::get('app_rt_social_networking_service') === 'sharethis')\n {\n return get_sharethis_badge($options);\n }\n}", "title": "" }, { "docid": "716c29dbc8219778762ea0146107efc6", "score": "0.54744816", "text": "protected function _toHtml() {\n\t\n\t \t$whereIam = Mage::getDesign()->getArea();\n\t\n\t \tif ($whereIam == 'adminhtml') {\n\t\t $sealCSS = 'position:relative;top:35px;text-align:center;width:96px;';\n\t } else {\n\t $sealCSS = 'margin-top: 30px; float: right;top:25px;'; \n\t } \n\t\n\t $badgeImgUrl = Mage::getDesign()->getSkinBaseUrl() . 'Rublon/img/rublon_badge.svg';\n\t \n\t\t$helper = Mage::helper('rublonmodule');\n\t\treturn sprintf(<<<'END'\n\t\t \n\t\t\t<div style=\"%s\" id=\"RublonSeal\">\n\t\t\t\t<div id=\"rublon-seal\"><div class=\"rublon-seal-link\"><div id=\"RublonBadgeWidget\"><img src=\"%s\"></div><a style=\"color:#0073aa;text-decoration:none;font-size:10px\" id=\"RublonBadgeLink\" href=\"https://rublon.com\" target=\"_blank\">Rublon 2FA</a></div></div>\n\t\t\t</div>\n\t\t\t<script type=\"text/javascript\">\n\t\t \n\t\t (function (d, s, id) { var js; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = \"https://code.rublon.com/rublon-sdk-js-sa\"; var p = d.getElementsByTagName(s)[0]; p.parentNode.insertBefore(js, p); })(document, \"script\", \"RublonConsumerJs-sdk\");\n\t\t \n\t\t\tif (document.addEventListener) {\n\t\t\t\tdocument.addEventListener(\"DOMContentLoaded\", function() {\n\t\t\t\t\tif (document.getElementById(\"loginForm\")) { // admin login\n\t\t\t\t\t\tvar seal = document.getElementById(\"RublonSeal\");\n\t\t\t\t\t\tvar node = seal.parentNode;\n\t\t\t\t\t\tnode.removeChild(seal);\n\t\t\t\t\t\tnode.appendChild(seal);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t\t</script>\nEND\n\t\t\t, $sealCSS, $badgeImgUrl );\n\t}", "title": "" }, { "docid": "7624e1d4a6316e2e59440cd49a6b0467", "score": "0.5458111", "text": "public function SupportBadgeCount($event) {\n // Fetch current return val\n $result = $event->getReturnVal();\n\n $params = $event->getParams();\n\n // Set return val if not set\n if (!isset($result['body_end']))\n $result['body_end'] = null;\n\n // Set return val if not set\n if (!isset($result['head']))\n $result['head'] = null;\n\n $result['head'][\"supportmanageraddons\"] = '\n\t\t\t\t<style type=\"text/css\">\n\t\t\t\t<!--\n\t\t\t\t.spro_badge {\n\t\t\t\t\ttop: -8px;\n\t\t\t\t\tfont-size: 10px;\n\t\t\t\t\tfont-weight: 700;\n\t\t\t\t\tfloat: none !important; position: relative;\n\t\t\t\t\tpadding: 2px 5px 3px 5px;color: #fff;\n\t\t\t\t\tbackground-image: linear-gradient(#fa3c45, #dc0d17);\n\t\t\t\t\tbackground-image: -webkit-gradient(linear, center top, center bottom, from(#fa3c45), to(#dc0d17));\n\t\t\t\t\tbackground-image: -webkit-linear-gradient(#fa3c45, #dc0d17);\n\t\t\t\t\t-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .7);\n\t\t\t\t\tbox-shadow: 0px 1px 1px rgba(0,0,0,0.7);\n\t\t\t\t\ttext-shadow: 0px -1px 0px rgba(0,0,0,0.4);\n\t\t\t\t\t-webkit-border-radius: 10px;\n\t\t\t\t\t-moz-border-radius: 10px;border-radius: 10px;\n\t\t\t\t}\n\t\t\t\t-->\n\t\t\t\t</style>\n\t\t\t';\n\n // Update return val -- ONLY set if admin portal\n if ($params['portal'] == \"admin\")\n $result['body_end'][\"supportmanageraddons\"] = \"\n\t\t\t\t<!-- display admin ticket count menu badge-->\n\t\t\t\t<script>\n\t\t\t\tjQuery(function($){\n\t\t\t\tif( $(\\\"a[href='\".WEBDIR.Configure::get(\"Route.admin\").\"/plugin/support_manager/admin_main/']\\\").length )\n\t\t\t\t{\n\t\t\t\t $( document ).ready(function() {\n\t\t\t\t\t$.get( '\".WEBDIR.Configure::get(\"Route.admin\").\"/plugin/support_manager_addons/admin_tickets_count/', function(newRowCount){\n\t\t\t\t\t $(\\\"a[href='\".WEBDIR.Configure::get(\"Route.admin\").\"/plugin/support_manager/admin_main/']\\\").html( newRowCount.trim() );\n\t\t\t\t\t});\n\t\t\t\t });\n\t\t\t\t setInterval(function(){\n\t\t\t\t\t$.get( '\".WEBDIR.Configure::get(\"Route.admin\").\"/plugin/support_manager_addons/admin_tickets_count/', function(newRowCount){\n\t\t\t\t\t $(\\\"a[href='\".WEBDIR.Configure::get(\"Route.admin\").\"/plugin/support_manager/admin_main/']\\\").html( newRowCount.trim() );\n\t\t\t\t\t});\n\t\t\t\t // },25000);\n\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<!-- end display admin ticket count menu badge-->\n\t\t\t\";\n\n // Update return val -- ONLY set if client portal\n if ($params['portal'] == \"client\")\n $result['body_end'][\"supportmanageraddons\"] = \"\n\t\t\t\t<!-- display admin ticket count menu badge-->\n\t\t\t\t<script>\n\t\t\t\tjQuery(function($){\n\t\t\t\tif( $(\\\"a[href='\".WEBDIR.Configure::get(\"Route.client\").\"/plugin/support_manager/client_main/']\\\").length )\n\t\t\t\t{\n\t\t\t\t $( document ).ready(function() {\n\t\t\t\t\t$.get( '\".WEBDIR.Configure::get(\"Route.admin\").\"/plugin/support_manager_addons/client_tickets_count/', function(newRowCount){\n\t\t\t\t\t $(\\\"a[href='\".WEBDIR.Configure::get(\"Route.client\").\"/plugin/support_manager/client_main/']\\\").html( newRowCount.trim() );\n\t\t\t\t\t});\n\t\t\t\t });\n\t\t\t\t setInterval(function(){\n\t\t\t\t\t$.get( '\".WEBDIR.Configure::get(\"Route.admin\").\"/plugin/support_manager_addons/client_tickets_count/', function(newRowCount){\n\t\t\t\t\t $(\\\"a[href='\".WEBDIR.Configure::get(\"Route.client\").\"/plugin/support_manager/client_main/']\\\").html( newRowCount.trim() );\n\t\t\t\t\t});\n\t\t\t\t },35000);\n\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<!-- end display admin ticket count menu badge-->\n\t\t\t\";\n\n\n // Update return val\n $event->setReturnVal($result);\n }", "title": "" }, { "docid": "ec4e1600c67a459fde3bbd275cc86fbd", "score": "0.54490864", "text": "public function get_status_formated() {\n return \"<h3>\" . \"Health: \" . $this->get_health() . \"<br/>\" .\n \"Strength: \" . $this->get_strength() . \"<br/>\" .\n \"Defence: \" . $this->get_defence() . \"<br/>\" .\n \"Speed: \" . $this->get_speed() . \"<br/>\" .\n \"Luck: \" . $this->get_luck() . \"<br/>\" .\n \"</h3>\";\n }", "title": "" }, { "docid": "ae7cab71fa9b81c6a336ec1d8c50a874", "score": "0.5443572", "text": "function getFormattedVersion() \n\t{\n\t\t$len = (substr($this->version.'',-1) == '0')?1:2;\n\t\treturn '<abbr title=\"v'.str_pad($this->version,3,'0',STR_PAD_LEFT).'\">'.number_format($this->version/100,$len).'</abbr>';\n\t}", "title": "" }, { "docid": "2b22b053fa09c4ef13c8ba0200d3fb17", "score": "0.5382915", "text": "public function create()\n {\n return view(\"crm.badge.create\");\n }", "title": "" }, { "docid": "480964ed4917eaf58025c6e19030b3f2", "score": "0.53597236", "text": "function GetAsHtml()\r\n\t\t{\r\n\t\t\tif ($this->_statuscode->GetStatusCode() == '' )\r\n\t\t\t{\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn $this->_statuscode->GetStatusCode();\r\n\t\t\t\t//return '<img src=\"' . .\r\n\t\t\t\t//\t'\" alt=\"' . Config::GetPluginSlug() . '\" class=\"' .\r\n\t\t\t\t//\tConfig::GetPluginSlug() . $this->_active_filter . '\" />';\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "788bb8effda519b392e47423b81b65b1", "score": "0.5352517", "text": "public function getBadges()\n {\n return $this->_badges;\n }", "title": "" }, { "docid": "263f53ee884c4ba31e8bbf58c08dadec", "score": "0.53465754", "text": "function um_mycred_show_badges_header() {\n\tif ( ! UM()->options()->get('mycred_show_badges_in_header') ) {\n\t\treturn;\n\t}\n\techo UM()->myCRED_API()->show_badges( um_profile_id() );\n}", "title": "" }, { "docid": "532a7d22c505e9d9f6d4afcadf3ba47b", "score": "0.53446454", "text": "public function getCompletedAtLabel()\n {\n if ($this->isComplete()) {\n $class = 'label label-success';\n $icon = 'fa fa-check';\n $message = $this->completed_at;\n } else {\n $class = 'label label-danger';\n $icon = 'fa fa-times';\n $message = 'No report has been created.';\n }\n\n $icon = HTML::create('i', '', ['class' => $icon]);\n\n return HTML::raw(\"<span class='$class'>$icon $message</span>\");\n }", "title": "" }, { "docid": "9cccab8b7e520c0bfdf9f48b2e82fdae", "score": "0.53181577", "text": "public function getMethodLabelAfterHtml()\n {\n $paymentCode = $this->getMethod()->getCode();\n $logoValue = Mage::getStoreConfig('payment/' . $paymentCode . '/image');\n $logoPosition = Mage::getStoreConfig('payment/' . $paymentCode . '/position');\n\n if ($logoPosition != 'hidden') {\n if (!empty($logoValue)) {\n $url = Mage::getBaseUrl('media') . 'ops/paymentLogo/' . $logoValue;\n } else {\n $url = Mage::helper('ops/payment')->getPaymentDefaultLogo($paymentCode);\n }\n\n return \"<span class='payment-logo $logoPosition'><img src='$url' alt='$paymentCode' title='$paymentCode'/></span>\";\n }\n\n return '';\n }", "title": "" }, { "docid": "d784c5c3ad852537cb9f663e0de966df", "score": "0.53001076", "text": "public function info()\n {\n return $this->color('blue');\n }", "title": "" }, { "docid": "23400641530293e9532cc03d632e2bf5", "score": "0.5267855", "text": "public function getShowBadge(): bool\n {\n return (bool) $this->getData('show_badge');\n }", "title": "" }, { "docid": "7cab3fd9d587586b8fce1ad83c3639cc", "score": "0.5260208", "text": "public static function RP_baseline_html() {\n\t$baseline = '<section id=\"related-posts\" class=\"related-posts\">';\n\t$baseline .= '<a href=\"#\" class=\"get-related-posts\">Get related posts</a>';\n \t$baseline .= '<div class=\"ajax-loader\"><img src=\"' . plugin_dir_url( __FILE__ ) . 'css/spinner.svg\" width=\"32\" height=\"32\" /></div>';\n\t$baseline .= '</section><!-- .related-posts -->';\n\n\treturn $baseline;\n// return \"rbtm baseline\";\n }", "title": "" }, { "docid": "e85adc5fc47d72028ee19a7ecd733624", "score": "0.52552205", "text": "public function get_name() {\n return get_string('crontask', 'block_custom_badge');\n }", "title": "" }, { "docid": "1bb4e2cfa69bd98b8739542278932a1a", "score": "0.5253957", "text": "function get_sharethis_badge($options = null)\n{\n $string = '';\n $username = sfConfig::get('app_rt_social_networking_service_username');\n $option_string = '';\n use_javascript('http://w.sharethis.com/button/sharethis.js#publisher='.$username);\n \n if(!is_null($options))\n {\n $options['url'] = isset($options['url']) ? $options['url'] : '';\n $options['title'] = isset($options['title']) ? $options['title'] : '';\n $options['description'] = isset($options['description']) ? $options['description'] : '';\n $option_string = sprintf(' url=\"%s\", title=\"%s\", summary=\"%s\" ', $options['url'], $options['title'], $options['description']);\n $option_string = sprintf('{ url: \"%s\", title: \"%s\", summary: \"%s\" }', $options['url'], $options['title'], $options['description']);\n }\n\n $string = <<< EOS\n<script language=\"javascript\" type=\"text/javascript\">\n\tSHARETHIS.addEntry($option_string, {button:true} );\n</script>\nEOS;\n\n return $string;\n}", "title": "" }, { "docid": "a15e95a4c70ca18870a76eb214563932", "score": "0.5249642", "text": "public function getLabelStatus($large = false)\n\t{\n\t\t$size = $large ? 'label-large ' : '';\n\t\t$label = '<span class=\"label '.$size.'\">Unknown</span>';\n\t\t$status = $this->getStatus();\n\n\t\tswitch ($status) {\n\t\t\tcase 'active':\n\t\t\t\t$label = '<span class=\"label '.$size.'label-success\">Verified</span>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'not active':\n\t\t\t\t$label = '<span class=\"label '.$size.'label-warning\">Not Verified</span>';\n\t\t\t\tbreak;\n\n\t\t\tcase 'suspended':\n\t\t\t\t$label = '<span class=\"label '.$size.'label-important\">Suspended</span>';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'banned':\n\t\t\t\t$label = '<span class=\"label '.$size.'label-inverse\">Banned</span>';\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $label;\n\t}", "title": "" }, { "docid": "517d1b7310d9c6bb491349261ae0857a", "score": "0.524811", "text": "public function getStartedAtLabel()\n {\n if ($this->started_at) {\n $class = 'label label-success';\n $icon = 'fa fa-check';\n $message = $this->started_at;\n } else {\n $class = 'label label-danger';\n $icon = 'fa fa-times';\n $message = 'Has not been started.';\n }\n\n $icon = HTML::create('i', '', ['class' => $icon]);\n\n return HTML::raw(\"<span class='$class'>$icon $message</span>\");\n }", "title": "" }, { "docid": "73cf001bd41ede17b13521ab621597c4", "score": "0.523878", "text": "function addCategoryBadge($type){\n\t\n\t//get the category slug\n\t\n\t$thisCat = get_the_category();\n\t$catName = $thisCat[0]->slug;\n\t$catCount = \"\";\n\t//echo(\"catName = \" . $catName );\n\t$catLink = get_category_link($thisCat[0]->cat_ID);\n\t$newColour = \"\";\n\t//check slug against category names and switch the CSS class\n\t\n\tswitch ($catName) {\n case \"graphics\":\n $newColour = \"graphics\";\n break;\n case \"websites\":\n $newColour = \"websites\";\n break;\n case \"video\":\n $newColour = \"video\";\n break;\n\tcase \"coding\":\n\t\t$newColour = \"coding\";\n\t\tbreak;\n\tdefault:\n $newColour = \"secondary\";\n}\n\tif($type === \"tab\"){\n\t//add the required class to the badge span\n\techo ('<span class=\"badge badge-' .$newColour. ' category-badge\"><a href=\"' .$catLink. '\">' .$catName. '</a></span>');\n\t}\n\telse if($type === \"header\")\n\t{\n\techo ('<span class=\"badge badge-' .$newColour. ' category-badge category-header\"><a href=\"' .$catLink. '\">' .$catName. '</a></span>');\t\n\t}\n\t \n}", "title": "" }, { "docid": "835651194c66cf21f428df13f7eb3d60", "score": "0.52371466", "text": "public static function wpbadger_award_choose_badge () {\n\n\t\t$badge_list_array = array();\n\n\t\t$query = new WP_Query( array( 'post_type' => 'badge' ) );\n\t\t\n\t\twhile ( $query->have_posts() ) : $query->the_post();\n\t\t\t$badge_title_version = the_title(null, null, false) . \" (\" . \n\t\t\t\t\t\t\t\t\t\tget_post_meta(get_the_ID(), 'wpbadger-badge-version', true) . \")\";\n\n\t\t\t$badge_list_array[get_the_ID()] = $badge_title_version;\n\t\tendwhile;\n\n\t\treturn $badge_list_array;\n\t}", "title": "" }, { "docid": "36516449873ebfa659728e7ac1f36325", "score": "0.52182734", "text": "protected function get_badge_type_data() {\n return array('default' => __('Default', 'mmcp'), 'primary' => __('Primary', 'mmcp'), 'secondary' => __('Secondary', 'mmcp'), 'success' => __('Success', 'mmcp'), 'danger' => __('Danger', 'mmcp'), 'warning' => __('Warning', 'mmcp'), 'info' => __('Info', 'mmcp'));\n }", "title": "" }, { "docid": "a3e40cffc21821caad2ae3987c13053d", "score": "0.52164793", "text": "function drupstrap_status_messages($vars) {\n $display = $vars['display'];\n $output = '';\n\n $status_heading = array(\n 'status' => t('Status message'),\n 'error' => t('Error message'),\n 'warning' => t('Warning message'),\n );\n foreach (drupal_get_messages($display) as $type => $messages) {\n $output .= \"<div class=\\\"alert alert-block alert-$type\\\">\\n\";\n $output .= \" <a class=\\\"close\\\" data-dismiss=\\\"alert\\\" href=\\\"#\\\">×</a>\\n\";\n if (!empty($status_heading[$type])) {\n $output .= '<h4 class=\"alert-heading hide\">' . $status_heading[$type] . \"</h4>\\n\";\n }\n if (count($messages) > 1) {\n $output .= \" <ul>\\n\";\n foreach ($messages as $message) {\n $output .= ' <li>' . $message . \"</li>\\n\";\n }\n $output .= \" </ul>\\n\";\n }\n else {\n $output .= $messages[0];\n }\n $output .= \"</div>\\n\";\n }\n return $output;\n}", "title": "" }, { "docid": "146a0c7ddf89e70e8c9eca2b668d7732", "score": "0.52142364", "text": "public static function aboutTab() {\n ?>\n <div class=\"container admin\">\n\t\t\t <h1>About us</h1>\n <div class=\"intro-dash\">\n <div class=\"cont-title-dash\">\n \n <p class=\"lead\">\n The main function of this plugin is to create, manage and send badges. <br>\n Once a badge has been sent, the receiver has the possibility to take his badge through a link\n that is inserted in the email.<br>\n After successive steps, the user can get his own badge also he has the possibility to send\n it to the <a href=\"https://openbadges.org/\">Mozilla Open Badges</a> platform.\n </p>\n <H2>Shortcodes</h2>\n <p class=\"lead\">\n The front-end function can be used in any page with the shortcode <b>[send_badge]</b>.<br><br>\n\n If we need to show just one of the 3 types, we can use the following shortcodes:<br>\n <b>[send-badge form=\"a\"] </b>: to send the badge to yourself.<br>\n <b>[send-badge form=\"b\"] </b>: to send the badge to one user at a time.<br>\n <b>[send-badge form=\"c\"] </b>: to send the badge to multiple users at a time.\n </p>\n <H2>Documentation</h2>\n <p class=\"lead\">\n The official documentation can be found at <a href=\"https://github.com/Badges4Languages/OpenBadgesFramework/\">GitHub.</a><br>\n <ul>\n <li><a href=\"https://github.com/Badges4Languages/OpenBadgesFramework/blob/master/doc/badges-for-languages.md\">Badges4Languages.</a></li>\n <li><a href=\"https://github.com/Badges4Languages/OpenBadgesFramework/blob/master/doc/documentation-general.md\">General documentation.</a></li>\n <li><a href=\"https://github.com/Badges4Languages/OpenBadgesFramework/blob/master/doc/documentation-technical.md\">Technical documentation.</a></li>\n <li><a href=\"https://github.com/Badges4Languages/OpenBadgesFramework/blob/master/doc/documentation-integrations.md\">Integrations.</a></li>\n <li><a href=\"https://github.com/Badges4Languages/OpenBadgesFramework/blob/master/doc/folder-structure.md\">The folder structure.</a></li>\n </ul>\n </p>\n </div>\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "10e290728ed5a4662d80ffe89e4390c7", "score": "0.5198613", "text": "public static function getProductBakStatuesLabel($status) {\n $config = UebModel::model('product')->getProductBakStatues();\n return isset($config[$status]) ? $config[$status] : 'unknow';\n }", "title": "" }, { "docid": "42c653d6db97df8011fd8c32391e3347", "score": "0.5195552", "text": "function unedtrivial_draw_stats($success){\n $square = '<i class=\"fa fa-stop\" aria-hidden=\"true\"></i>';\n $green = round(10 * $success / 100);\n $red = 10 - $green;\n \n echo get_string('answerstats1', 'unedtrivial') . \"<br>\";\n echo '<font color=\"green\">';\n for($i=0;$i<$green;$i++) {\n echo $square;\n }\n echo '</font><font color=\"red\">';\n for($i=0;$i<$red;$i++) {\n echo $square;\n }\n echo \"</font> \" . $green . \"%<br>\";\n}", "title": "" }, { "docid": "dce1ca2000639088b9144d3ce0aa1246", "score": "0.5187315", "text": "public function htmlInfo()\n {\n return nl2br($this->info());\n }", "title": "" }, { "docid": "615b2ef5a60bac08b19bda10cf2940c6", "score": "0.51566875", "text": "function toString()\n {\n $return = '';\n $return .= $this->renderStatusLine();\n $return .= \"\\r\\n\";\n $return .= parent::toString();\n\n return $return;\n }", "title": "" }, { "docid": "b63f6317f719cd599796ff96f4ae5c18", "score": "0.514188", "text": "public function render()\n\t{\n\t\treturn '\n\t\t<div style=\"border: 5px solid '.$this->cardHtmlColor.'; padding:20px; margin: 10px; width: 20px;\">\n\t\t\t'.$this->suite.' '.$this->rank.'\n\t\t</div>\n\t\t';\n\t}", "title": "" }, { "docid": "b8a8be450165ab27ea993d3b975bb99e", "score": "0.5132517", "text": "function sample_items_display_status_message($status, $message) {\n ?>\n <div class=\"<?php echo $status; ?>\"><?php echo $message; ?></div>\n <?php\n}", "title": "" }, { "docid": "303fa3f6bb761212ede47bc473e57dde", "score": "0.5130231", "text": "function __approvedJobRequestEmailMessage(){\n\treturn \"We have approved your talent request.<br><br><br>\".\n\t\t\t\t\t\"<img src='http://ictadmin.com.au/images/page_art/fa-phone_256_20_0077bb_none.png' style='width:15px;height:15px;'>\".\" +61 452 364 793<br>\".\n\t\t\t\t\t\"<img src='http://www.myiconfinder.com/uploads/iconsets/256-256-791373a6801d994466b6c7e8bd45289d-email.png' style='width:15px;height:15px;'>\".\" [email protected]\";\n}", "title": "" }, { "docid": "39e340e745be54dd595b5813590d6b51", "score": "0.51292014", "text": "public function __invoke($msg, $badge = ' Go ')\n {\n $this->console->writeLine();\n\n $this->console->writeLine(\n str_pad('', $this->width - 1, '=', STR_PAD_RIGHT),\n Color::GREEN\n );\n\n $this->console->write('=', Color::GREEN);\n $this->console->write(\n str_pad('' . Module::NAME, $this->width - 3, ' ', STR_PAD_BOTH)\n );\n $this->console->writeLine('=', Color::GREEN);\n\n $this->console->writeLine(\n str_pad('', $this->width - 1, '=', STR_PAD_RIGHT),\n Color::GREEN\n );\n\n $this->console->writeLine();\n\n $this->console->write($badge, Color::NORMAL, Color::YELLOW);\n $this->console->write(' ');\n $this->console->writeLine($msg . ' ...');\n $this->console->writeLine();\n\n }", "title": "" }, { "docid": "86fe56043d9a90bfb70f84983ed39f91", "score": "0.5129097", "text": "public function getPingCodeStr()\n {\n $val = (int)$this->get('pingstatus');\n $socketstr = socket_strerror($val);\n $strtoupdate = \"<i class=\\\"icon-ping-%s fa fa-exclamation-circle %s \"\n . \"fa-1x\\\" title=\\\"$socketstr\\\"></i>\";\n ob_start();\n if ($val === 0) {\n printf($strtoupdate, 'up', 'green');\n } else {\n printf($strtoupdate, 'down', 'red');\n }\n return ob_get_clean();\n }", "title": "" }, { "docid": "8de846da3e8f3d4f90588c32f7b04f3c", "score": "0.5117747", "text": "public function generatebadge($argID){\n $data=$this->Audit_started_model->getgeneratebadge($argID);\n redirect(base_url(\"admin/audit_started\")); \n }", "title": "" }, { "docid": "0ba89b6541b4eefd5ce3349a6174b9c3", "score": "0.51127684", "text": "public function getProfilesBarHtml()\n {\n return $this->getProfilesBarBlock()->toHtml(); \n }", "title": "" }, { "docid": "23d2ca866886d04068220d2473ce5f57", "score": "0.51102096", "text": "function formatSuccess($type, $message)\n{\n return '<b style=\"color: green;\">' . $type . ': </b>' . $message . \"<br>\\n\";\n}", "title": "" }, { "docid": "cea766764d5e9ff818a411d353b5bb41", "score": "0.51013106", "text": "public function label()\n\t{\n\t\treturn __('Groundcontact balance');\n\t}", "title": "" }, { "docid": "d730575197aea408d2c29164ac1a181d", "score": "0.5099462", "text": "private static function getStatusIcon($valid)\n {\n return ($valid) ? '<span class=\"dashicons dashicons-yes success-message\"></span>' : '<span class=\"dashicons dashicons-no-alt error-message\"></span>';\n }", "title": "" }, { "docid": "90615ea89c9e27c78358d27d81eda069", "score": "0.50985694", "text": "static public function bugsnag() {\n\t\t$bugsnag_api_key = GLUTTON_BUGSNAG_API_KEY;\n\t\t$app_version = static::version();\n\t\techo <<<SNIPPET\n\t\t<script src=\"//d2wy8f7a9ursnm.cloudfront.net/bugsnag-2.min.js\"\n\t\t\tdata-apikey=\"{$bugsnag_api_key}\"\n\t\t\tdata-appversion=\"{$app_version}\"></script>\nSNIPPET;\n\t}", "title": "" }, { "docid": "a4d8315db1dac5a7138dd5c084654923", "score": "0.50921434", "text": "public function getText()\n {\n $message = __(\n \"We advise you to update the extension if you wish to get the \" .\n \"latest fixes and evolutions. \" .\n \"To update the extension, please click here : \"\n ) . \"<a href='\" . $this->readMeUrl . \"' target='_blank'>\" . $this->readMeUrl . \"</a>\";\n $title = __(\"HiPay Enterprise %1 available\", $this->newVersion);\n\n return __('<b>' . $title . '</b><br/>' . $message);\n }", "title": "" }, { "docid": "7b2debae1c117d4cca8755b10abdf3d8", "score": "0.5087781", "text": "public function getActivoSpanAttribute()\n\t{\n\t\t# Retornamos HTML-Element\n\t\t$format = new HtmlString('<span class=' . ($this->activo ? 'toast_success' : 'toast_error') . \">&nbsp;$this->activo_text&nbsp;</span>\");\n\t\t# Si Ajax, retornamos HTML-String\n\t\tif (request()->ajax()) {\n\t\t\treturn $format->toHtml();\n\t\t}\n\t\treturn $format;\n\t}", "title": "" }, { "docid": "69db141d5921bab59f19b755ca1ffb51", "score": "0.50856006", "text": "public function level()\n {\n return $this->icon() . ' ' . $this->name();\n }", "title": "" }, { "docid": "494753746259a1655fe99e03da1c145e", "score": "0.5079898", "text": "public function getStatusLabel();", "title": "" }, { "docid": "a984483a5d480913892236d78279767a", "score": "0.5075526", "text": "public function userStatus()\n {\n if ($this->active == 1) {\n return \"<span class='label label-success'>Active</span>\";\n }\n\n return \"<span class='label label-danger'>Blocked</span>\";\n }", "title": "" }, { "docid": "be356e730a2e1666027debae867a9de1", "score": "0.50746465", "text": "function sim_nao($status)\n {\n if ($status == '1')\n return '<span class=\"label label-success\">Sim</span>';\n else\n return '<span class=\"label label-danger\">Não</span>';\n }", "title": "" }, { "docid": "e10e4b4858819fb2a485aca4c327df35", "score": "0.50531256", "text": "protected function noticeBlock()\n {\n if (count($this->availableMethods()) == 0) {\n return '<div>\n\t <ul class=\"messages\">\n\t <li class=\"notice-msg\">\n\t <ul>\n\t <li>' . __(\"Can't continue with payment,because vendor did not specify payment method(s).\") . '</li>\n\t </ul>\n\t </li>\n\t </ul>\n\t </div>';\n }\n return '';\n\n }", "title": "" }, { "docid": "9ae08756714023ba82bafd7625bd0620", "score": "0.5050325", "text": "function bootstrap_code_prettifier( $html ){\n $classes = 'pre-scrollable prettyprint linenums';\n\n // check if there are already classes assigned to the anchor\n if ( preg_match('/<pre.*? class=\"/', $html) ) {\n $html = preg_replace('/(<pre.*? class=\".*?)(\".*?\\/>)/', '$1 ' . $classes . ' $2', $html);\n } else {\n $html = preg_replace('/(<pre.*?)(\\/>)/', '$1 class=\"' . $classes . '\" $2', $html);\n }\n return $html;\n}", "title": "" }, { "docid": "2056afd5151fae1689052cd2deefc4df", "score": "0.5045738", "text": "public function statusLabelClass()\n {\n switch ($this->entity->status) {\n case Status::DRAFT:\n return 'bg-red';\n break;\n case Status::PENDING:\n return 'bg-orange';\n break;\n case Status::PUBLISHED:\n return 'bg-green';\n break;\n case Status::UNPUBLISHED:\n return 'bg-purple';\n break;\n default:\n return 'bg-red';\n break;\n }\n }", "title": "" }, { "docid": "2056afd5151fae1689052cd2deefc4df", "score": "0.5045738", "text": "public function statusLabelClass()\n {\n switch ($this->entity->status) {\n case Status::DRAFT:\n return 'bg-red';\n break;\n case Status::PENDING:\n return 'bg-orange';\n break;\n case Status::PUBLISHED:\n return 'bg-green';\n break;\n case Status::UNPUBLISHED:\n return 'bg-purple';\n break;\n default:\n return 'bg-red';\n break;\n }\n }", "title": "" }, { "docid": "6a0b8c87f4be51f78e8e856e374354d8", "score": "0.5035488", "text": "function news_get_badge_tag() {\n $tags = get_the_tags(get_post()->ID);\n\n if (!$tags) {\n echo 'News';\n return;\n };\n\n $stringifyTags = '';\n foreach($tags as $key => $tag) {\n if ($key == 0) {\n $stringifyTags = $tag->name;\n } else {\n $stringifyTags .= ', ' . $tag->name;\n }\n }\n\n echo $stringifyTags;\n}", "title": "" }, { "docid": "964e5c13f728193a57ddd84288e163fc", "score": "0.5033397", "text": "public function testItCanAccessShowBadgePage()\n {\n $this->logInAsUser();\n\n $this->get('/u/' . $this->user->slug . '/badges')\n ->see($this->user->name . '\\'s Badges')\n ->assertResponseStatus(200);\n }", "title": "" }, { "docid": "65d8cc24c83a9baf661019279d10e4e0", "score": "0.50233996", "text": "public function render( $message = '' ) {\n\t\t$output = '<div class=\"progress-bar\" style=\"width: 100%; height: 15px; background-color: #FFFFFFF; border: 1px solid #e6db55;\">\n <div class=\"progress\" style=\"height: 100%; background-color: Yellow; width: ' . $this->barWidth() . '%;\"></div>\n </div>\n <div class=\"message\" style=\"clear:both;\">' . $message . '</div>';\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "e232f58a45ad7f2fd6af2a7a6d7ae10c", "score": "0.50192165", "text": "public function getTagLine()\n {\n $code = $this->getCode();\n $text = 'Klarna Payments';\n switch ($code) {\n case 'klarna_pay_now':\n $text = 'Simple and secure.';\n break;\n case 'klarna_pay_later':\n $text = 'Pay X days after delivery';\n break;\n case 'klarna_pay_over_time':\n $text = 'Pay over time';\n break;\n case 'klarna_direct_debit':\n $text = 'Fast and simple';\n break;\n case 'klarna_direct_bank_transfer':\n $text = 'Simple and secure.';\n break;\n }\n return __($text);\n }", "title": "" }, { "docid": "98d396a397372365ff886e4f9780a528", "score": "0.5019149", "text": "public function message()\n {\n return 'High risk score.';\n }", "title": "" } ]
21f79d17b78cc9c27376f4fdfa57d963
> add an emot. icon to message pane This inserts the text $icon in the currently selected textarea field. If the second argument is an event object, the function will prevent it from firing the default event handler. This argument is optional. You may also want to see the manual on chapter "templates and skins: new functions smilies" (toc might be subject to change)
[ { "docid": "e551555c335e1460710d2a65e509157d", "score": "0.7171564", "text": "function yanaAddIcon($icon, $event = null)\n{\n}", "title": "" } ]
[ { "docid": "b3f6e3e2a45df552f00929db4949dcfb", "score": "0.6302658", "text": "function emoticonhelpbutton($form, $field, $return = false) {\n\t\n\tglobal $CFG, $SESSION;\n\t\n\t$SESSION->inserttextform = $form;\n\t$SESSION->inserttextfield = $field;\n\t$imagetext = '<img src=\"' . $CFG->pixpath . '/s/smiley.gif\" alt=\"\" class=\"emoticon\" style=\"margin-left:3px; padding-right:1px;width:15px;height:15px;\" />';\n\t$help = helpbutton ( 'emoticons', get_string ( 'helpemoticons' ), 'moodle', true, true, '', true, $imagetext );\n\tif (! $return) {\n\t\techo $help;\n\t} else {\n\t\treturn $help;\n\t}\n}", "title": "" }, { "docid": "f065ff65d95a541ada82843d6acecaf7", "score": "0.6065729", "text": "function appInstructionsIcon($title, $message){\r\n\t?>\t<a onmouseover=\"this.T_TITLE='<?echo $title;?>';this.T_SHADOWCOLOR='#3D3F3E';return escape('<?echo $message;?>')\" href=\"javascript:;\" class=\"eventMain\"><img src=\"<?echo CalAdminRoot;?>/images/icons/iconInfo.gif\" width=\"16\" height=\"16\" alt=\"\" border=\"0\"></a><?\r\n\t}", "title": "" }, { "docid": "854131f598d7c3d99ceb7d3ae924c236", "score": "0.58523744", "text": "public function add_icon( $id, $icon, $context = 'section' ) {\n\t\tself::$icons[ $context ][ $id ] = trim( $icon );\n\t}", "title": "" }, { "docid": "8cae0eef6f71c6d8d557788a50ece05d", "score": "0.5827624", "text": "public function enableEmojiIcons(Event $event)\n {\n $markdown = $event['markdown'];\n\n // Initialize Text example\n $markdown->addInlineType(':', 'EmojiIcon');\n\n // Add function to handle this\n $markdown->inlineEmojiIcon = function($excerpt) {\n // Search $excerpt['text'] for regex and store whole matching string in $matches[0], store icon name in $matches[1]\n if (preg_match('/^:(?:icon )?icon-([a-zA-Z0-9- ]+):/', $excerpt['text'], $matches))\n {\n return array(\n 'extent' => strlen($matches[0]),\n 'element' => array(\n 'name' => 'i',\n 'text' => '',\n 'attributes' => array(\n 'class' => $this->iconClass.' icon-'.$matches[1],\n ),\n ),\n );\n }\n };\n }", "title": "" }, { "docid": "298eb2f032ee39ff6e043e827e0a1a07", "score": "0.57609695", "text": "function placeholder_emoticon_chooser()\n{\n\t\t$em=new ocp_tempcode();\n\t\tforeach (placeholder_emoticons() as $emo)\n\t\t{\n\t\t\t$code=$emo[2];\n\t\t\t$em->attach(do_lorem_template('EMOTICON_CLICK_CODE',array('_GUID'=>'93968e9ff0308fff92d1d45e433557e2','FIELD_NAME'=>'post','CODE'=>$code,'IMAGE'=>apply_emoticons($code))));\n\t\t}\n\t\treturn $em;\n}", "title": "" }, { "docid": "f80c13cb5746842f7819916da7c1629e", "score": "0.57336736", "text": "function turnitintool_modform_help_icon($element, $string, $module, $mform) {\n if (is_callable(array($mform,'addHelpButton'))) {\n $mform->addHelpButton($element, $string, $module);\n } else {\n $mform->setHelpButton($element, array($string, get_string($string, $module), $module));\n }\n}", "title": "" }, { "docid": "d1bb5b0161a04fe99863ed09ef62a5bc", "score": "0.5688141", "text": "public function addMessage($message, $icon)\n {\n $this->messages[] = $message;\n $this->icons[] = $icon;\n }", "title": "" }, { "docid": "28665fcd748b92086e7c20cdc1f3c37f", "score": "0.5628145", "text": "function getMsgBox($in_msg,$icon='icon_note')\t{\n\t\tglobal $BACK_PATH;\n\t\t$msg = '<img'.t3lib_iconWorks::skinImg($BACK_PATH,'gfx/'.$icon.'.gif','width=\"18\" height=\"16\"').' alt=\"\" />'.htmlspecialchars($in_msg);\n\t\t$msg = '\n\n\t\t\t<!--\n\t\t\t\tMessage box:\n\t\t\t-->\n\t\t\t<table cellspacing=\"0\" class=\"bgColor4\" id=\"typo3-msgBox\">\n\t\t\t\t<tr>\n\t\t\t\t\t<td>'.$msg.'</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t\t';\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "ef992ac3be2e0d307c61f9a8a4806a64", "score": "0.562514", "text": "public function setAddIcon($addicon) {\n $this->addicon = $addicon;\n }", "title": "" }, { "docid": "b4a7b03d0afecbcb36850a9ec2f09ac1", "score": "0.5624842", "text": "function alertBox($message, $icon = \"\", $type = \"\") {\n return \"<div class=\\\"alertMsg $type\\\"><span>$icon</span> $message <a class=\\\"alert-close\\\" href=\\\"#\\\">x</a></div>\";\n }", "title": "" }, { "docid": "e1d986b36ae475e07a88b87924dc7855", "score": "0.55758923", "text": "public function icon($icon,$text=false,$tip=false,$options=[],$tag = 'span')\n\t{\n\t\t $iconTag = $tip ? 'span' : $tag;\n\t\t $html = \"<$iconTag class='icon-$icon\".(isset($options['class'])?\" \".$options['class']:\"\").\"'\";\n\t\t if($tip)\n\t\t \t$options['title'] = $tip;\n\t\t foreach($options as $attr=>$val)\n\t\t {\n\t\t \tif($attr != 'class')\n\t\t\t\t$html .=\" $attr='$val'\";\n\t\t }\n\n\t\t $html .= \"></$iconTag>\".($text?\"&nbsp;$text\":\"\");\n\n\t\t if($tip)\n\t\t {\n\t\t \t$html = \"<$tag class='tip' title='$tip'>$html</$tag>\";\n\t\t }\n\t\t return $html;\n\t}", "title": "" }, { "docid": "251be254d797d2ea8a46b3f81d6a00e8", "score": "0.55164915", "text": "function minti_icon( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n \t'icon' => 'mac'\n ), $atts));\n \n\t$out = '<span class=\"iconbox-'. $icon .'\"></span>';\n return $out;\n}", "title": "" }, { "docid": "527ff006dd0682e321a26f3d3c57b3a3", "score": "0.5514313", "text": "function icon_ion($text, $icon_name, $iconIsRight = true)\r\n{\r\n return hsprintf(\r\n '%s <i class=\"ion-%s\"></i> %s',\r\n $iconIsRight ? $text : \"\",\r\n $icon_name,\r\n !$iconIsRight ? $text : \"\"\r\n );\r\n}", "title": "" }, { "docid": "e8ea5333dd4ba443350efbb4a26f7247", "score": "0.5503773", "text": "public function icon($icon)\n {\n $this->options['menu_icon'] = $icon;\n }", "title": "" }, { "docid": "9d98b78776cf62bd8e5a3cdd1afe16da", "score": "0.5503573", "text": "function icon($icon, $icon_class = '')\n{\n $icon_class = 'icon ' . $icon_class;\n\n return\n \"<span class='$icon_class'>\n <i class='$icon'></i>\n </span>\";\n}", "title": "" }, { "docid": "fdf1fa83980a59e1ed8e1b9ea09b5292", "score": "0.54951227", "text": "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfIconPathIsGiven() {}", "title": "" }, { "docid": "c7f3479362b746b2fc3e734fbafad76f", "score": "0.5470839", "text": "public static function set_tinymce_button_icon() {\n\t\t?>\n<style>\ni.mce-i-wcopc {\n\tfont: 400 20px/1 dashicons;\n\tpadding: 0;\n\tvertical-align: top;\n\tspeak: none;\n\t-webkit-font-smoothing: antialiased;\n\t-moz-osx-font-smoothing: grayscale;\n\tmargin-left: -2px;\n\tpadding-right: 2px\n}\n</style>\n<?php\n\t}", "title": "" }, { "docid": "abe70b13061413d646c98fdc58d14699", "score": "0.5451501", "text": "function theme_action_icon($url, $image_url, $text) {\r\n return \"<a href='$url'><img src='$image_url' /></a>\";\r\n}", "title": "" }, { "docid": "926fa60f7d3553f06b2d5a50410691d2", "score": "0.5412785", "text": "function convert_emoticon($code=\"\", $image=\"\")\n\t{\n\t\tif (!$code or !$image) return;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Remove slashes added by preg_quote\n\t\t//-----------------------------------------\n\t\t\n\t\t$code = stripslashes($code);\n\t\t\n\t\t$this->emoticon_count++;\n\t\t\n\t\treturn \"<!--emo&\".trim($code).\"--><img src='{$this->ipsclass->vars['EMOTICONS_URL']}/$image' border='0' style='vertical-align:middle' alt='$image' /><!--endemo-->\";\n\t}", "title": "" }, { "docid": "f6f9d77bc1f1c67728a3da3d89067595", "score": "0.5338257", "text": "function nesia_cat_add_new_meta_field() {\r\r\n\t// this will add the custom meta field to the add new term page\r\r\n require_once 'theme-icons-set.php';\r\r\n\t?>\r\r\n\t<div class=\"form-field\">\r\r\n\t\t<label for=\"term_meta[icon]\"><?php _e( 'Choose an icon', 'nesia' ); ?></label>\r\r\n <div class=\"nesia-icon-wrapper\">\r\r\n <ul class=\"the-icons\">\r\r\n <?php foreach( $icons as $icon ) : ?>\r\r\n <li><i title=\"<?php echo $icon;?>\" class=\"<?php echo $icon;?>\"></i></li>\r\r\n <?php endforeach; ?>\r\r\n </ul>\r\r\n <input type=\"hidden\" name=\"term_meta[icon]\" id=\"term_meta[icon]\">\r\r\n </div><!-- .nesia-icon-wrapper -->\r\r\n\t\t<p class=\"description\"><?php _e( 'Select an icon for category icon.','nesia' ); ?></p>\r\r\n\t</div>\r\r\n <script>\r\r\n jQuery('.the-icons li').click(function(){\r\r\n var $el = jQuery(this),\r\r\n icon_name = jQuery('i', this).attr('class');\r\r\n $el.parent().next('input').val(icon_name);\r\r\n $el.addClass('active').siblings().removeClass('active');\r\r\n });\r\r\n </script> \r\r\n<?php\r\r\n}", "title": "" }, { "docid": "9de512d485b6803b1537210faa3cf295", "score": "0.53382343", "text": "function bbcode_add_smiley ($bbcode_container, $smiley, $replace_by) {}", "title": "" }, { "docid": "cbbbb9ca809eda5ddb64376e3e0af47d", "score": "0.5328963", "text": "public function addMenuIcon()\n { \n ?>\n <style>\n #adminmenu #toplevel_page_<?php echo $this->args['menu_slug']; ?> .wp-menu-image:before {\n content: \"\\<?php echo $this->args['icon_code']; ?>\"; \n font-family: 'FontAwesome' !important;\n font-size: 18px !important;\n }\n </style>\n <?php\n }", "title": "" }, { "docid": "3c56cbbc99da111507c578c206345da5", "score": "0.529484", "text": "function get_tb_dialog_icon($item, $image_name, $name, $id, &$lang) {\n// global $class_path;\n $class_path = $this->get_class_path();\n\n return '\n <img id=\"'.$item.'_'.$name.'\" onclick=\"active_rich = '.$id.'; show_dialog(\\''.$item.'\\')\" alt=\"'.$lang->item($item).'\" src=\"'.$class_path.'rich_files/images/'.$image_name.'.gif\" align=\"absMiddle\" width=\"20\" height=\"20\" />\n ';\n }", "title": "" }, { "docid": "e015dbeb025f973d0d8f527af9da0668", "score": "0.5293545", "text": "function icon($icon_name,$icon_title=''){\n\t$h='<span class=\"icon fa fa-'.$icon_name.'\"></span>';\n\tif($icon_title!=''){ $h.='<span class=\"icon-text-label\">'.$icon_title.'</span>'; }\n\treturn $h;\n}", "title": "" }, { "docid": "a0d21abc92bb9854c85a758d20a6d8ef", "score": "0.5292439", "text": "public function setIcon($icon)\n\t{\n\t\t$this->icon = $icon;\n\t}", "title": "" }, { "docid": "be25b79361b5b4b2c05ec437277e935a", "score": "0.52755094", "text": "protected function _quickiconButton( $link, $image, $text, $path=null, $target='', $onclick='' ) {\r\n\t \tif( $target != '' ) {\r\n\t \t\t$target = 'target=\"' .$target. '\"';\r\n\t \t}\r\n\t \tif( $onclick != '' ) {\r\n\t \t\t$onclick = 'onclick=\"' .$onclick. '\"';\r\n\t \t}\r\n\t \tif( $path === null || $path === '' ) {\r\n\t \t\t$path = 'components/com_joomfish/assets/images/';\r\n\t \t}\r\n\t\t?>\r\n\t\t<div style=\"float:left;\">\r\n\t\t\t<div class=\"icon\">\r\n\t\t\t\t<a href=\"<?php echo $link; ?>\" <?php echo $target;?> <?php echo $onclick;?>>\r\n\t\t\t\t\t<?php echo JHTML::_('image.administrator', $image, $path, NULL, NULL, $text ); ?>\r\n\t\t\t\t\t<span><?php echo $text; ?></span>\r\n\t\t\t\t</a>\r\n\t\t\t</div>\r\n\t\t</div>\r\n\t\t<?php\r\n\t }", "title": "" }, { "docid": "b6def1aca6648976532396a0ef389fcd", "score": "0.5270745", "text": "function quickiconButton( $link, $image, $text, $modal = 0 )\n\t{\n\t\t//initialise variables\n\t\t$lang \t\t= & JFactory::getLanguage();\n \t\t?>\n\n\t\t<div style=\"float:<?php echo ($lang->isRTL()) ? 'right' : 'left'; ?>;\">\n\t\t\t<div class=\"icon\">\n\t\t\t\t<?php\n\t\t\t\tif ($modal == 1) {\n\t\t\t\t\tJHTML::_('behavior.modal');\n\t\t\t\t?>\n\t\t\t\t\t<a href=\"<?php echo $link; ?>\" style=\"cursor:pointer\" class=\"modal\" rel=\"{handler: 'iframe', size: {x: 900, y: 500}}\">\n\t\t\t\t<?php\n\t\t\t\t} else {\n\t\t\t\t?>\n\t\t\t\t\t<a href=\"<?php echo $link; ?>\">\n\t\t\t\t<?php\n\t\t\t\t}\n\n\t\t\t\t\techo JHTML::_('image', 'administrator/components/com_flexicontent/assets/images/'.$image, $text );\n\t\t\t\t?>\n\t\t\t\t\t<span><?php echo $text; ?></span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "41303acfb13a30152721c29cfd8fb98d", "score": "0.5266584", "text": "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUnderscoredExtensionNameAndIconPathNotGiven() {}", "title": "" }, { "docid": "598e5132733f5e8627a264fc8f9568fa", "score": "0.5232147", "text": "function wb_message_box($parent, $message, $title = null, $style = null) {}", "title": "" }, { "docid": "236976c5ca4be182b24f956136099996", "score": "0.52155304", "text": "function theme_action_icon($url, $image_url, $text) {\n\tif (setting_fetch('buttonintext') == 'yes') {\n\t\tif ($text == 'MAP')\n\t\t{\n\t\t\treturn \"<a href='$url' alt='$text' target='_blank'>$text</a>\";\n\t\t}\n\t\treturn \"<a href='$url'>$text</a>\";\n\t} else {\n\t\tif ($text == 'MAP')\n\t\t{\n\t\t\treturn \"<a href='$url' alt='$text' target='_blank'><img src='$image_url' alt='$text' /></a>\";\n\t\t}\n\t\treturn \"<a href='$url'><img src='\".BASE_URL.$image_url.\"' alt='$text' /></a>\";\n\t}\n}", "title": "" }, { "docid": "b589aaabab98f7cfa9ef10aa407b582f", "score": "0.5200186", "text": "function icon_ic($text, $icon_name, $iconIsRight = true)\r\n{\r\n throw new \\Exception('Deprecated. As in, already not available anymore.');\r\n return hsprintf(\r\n '%s <i class=\"ic-%s\"></i> %s',\r\n $iconIsRight ? $text : \"\",\r\n $icon_name,\r\n !$iconIsRight ? $text : \"\"\r\n );\r\n}", "title": "" }, { "docid": "59b07add13bcac15236929c76507540e", "score": "0.5182848", "text": "public function setEditIcon($editicon) {\n $this->editicon = $editicon;\n }", "title": "" }, { "docid": "a3ffe9e9ed5219c89328df75c69c53f4", "score": "0.51782423", "text": "function icono($file, $title, $width = '24px', $height = false, $extra = false, $alt = false, $echo = false) {\n if (!$alt)\n $alt = $title;\n if (!$height)\n $height = $width;\n $URL = URL_IMG . \"icons/$file\";\n $img = <<<____IMG\n <img src=\"$URL\" width=\"$width\" height=\"$height\" alt=\"$alt\" title=\"$title\" $extra />\n____IMG;\n if ($echo)\n echo $img;\n else\n return $img;\n return;\n}", "title": "" }, { "docid": "46b9a2faac732972757c6ec70a807595", "score": "0.51753694", "text": "public function registerPluginTriggersAddPluginWhichSetsPluginIconPathIfUsingUpperCameCasedExtensionNameAndIconPathNotGiven() {}", "title": "" }, { "docid": "52caa908375cc6fa70c55cddbaca91e3", "score": "0.51749104", "text": "public function form($instance) {\n $instance = wp_parse_args((array) $instance, ['icons' => '']);\n \t\t\n echo\n '<textarea style=\"width: 100%; margin: 15px 0 10px; height: 200px;\" id=\"', $this->get_field_id('icons') ,'\" name=\"', $this->get_field_name('icons') ,'\">',\n $instance['icons'],\n '</textarea>';\n \t}", "title": "" }, { "docid": "f90c28efc70c286bbed1227f784f01ea", "score": "0.51660883", "text": "public function setIcon( $icon )\n\t\t{\n\t\t\t$this->_icon = $icon;\n\t\t}", "title": "" }, { "docid": "cf0642fea0eb44d6baa3c34a5d51726f", "score": "0.5160057", "text": "function turnitintool_help_icon($page, $title, $module='moodle', $image=true, $linktext=false, $text='', $return=false, $imagetext='') {\n global $OUTPUT;\n if (is_callable(array($OUTPUT,'help_icon'))) {\n if (!$return) {\n echo $OUTPUT->help_icon($page, 'turnitintool');\n } else {\n return $OUTPUT->help_icon($page, 'turnitintool');\n }\n } else {\n return helpbutton($page, $title, $module, $image, $linktext, $text, $return, $imagetext);\n }\n}", "title": "" }, { "docid": "b504fe26982187d9bfd95bb17b100de1", "score": "0.5155515", "text": "function quickiconButton($link, $image, $text)\n\t{\n\t\t$lang = JFactory::getLanguage();\n\t\t?>\n\t\t<div class=\"span2\">\n\t\t\t<div class=\"icon\">\n\t\t\t\t<a href=\"<?php echo $link; ?>\">\n\t\t\t\t\t<?php \n\t\t\t\t\t$src = JURI::base().'components/com_obhelpdesk/assets/images/icons/'. $image;\n\t\t\t\t\t$title = $text;\n\t\t\t\t\techo '<img src=\"'.$src.'\" title=\"'.$title.'\"/>';\n\t\t\t\t\t?>\n\t\t\t\t\t<span><?php echo $text; ?></span>\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "253c38095f89e83f834b25fb144b5ae0", "score": "0.510584", "text": "function display_icon($image, $alt_text = '', $additional_attributes = array ()) {\n\t\techo Display::return_icon ( $image, $alt_text, $additional_attributes );\n\t}", "title": "" }, { "docid": "3fd3d28109cb98ca5172a7277614384d", "score": "0.5105415", "text": "function forumPLG_restoreEmoticons($str) {\r\n if (function_exists(msg_showsmilies)) {\r\n return msg_restoreEmoticons($str);\r\n } else {\r\n forum_xchsmilies($str);\r\n }\r\n}", "title": "" }, { "docid": "ebecf5f7682cc247c128be37ed534a3e", "score": "0.5100152", "text": "function change_emailnote ($arg) {\n\n $arg['comment_notes_before'] = __('<p class=\"comment-notes\">' . __( 'email address is not displayed.' ) . ( $req ? $required_text : '' ) . '</p>');\n\n return $arg;\n\n}", "title": "" }, { "docid": "9024b88588992d1bdbffde8c667126a0", "score": "0.50908285", "text": "public function SetIcon() {\n\n if ($this->icon) {\n echo '<link rel=\"shortcut icon\" href=\"'.$this->icon.'.ico\" />';\n }\n }", "title": "" }, { "docid": "76bcce0244bb253859ae091a315e727a", "score": "0.5079512", "text": "function font_awesome_icon($icon_class='',$aria_hidden='true'){\r\n return ' <i class=\"'.$icon_class.'\" aria-hidden=\"'.$aria_hidden.'\"></i>';\r\n}", "title": "" }, { "docid": "440b5e2e3c747b05ac286659636b1aef", "score": "0.5069043", "text": "function get_tb_action_icon($item, $image_name, $name, $id, &$lang) {\n// global $class_path;\n $class_path = $this->get_class_path();\n\n return '\n <img id=\"'.$item.'_'.$name.'\" onclick=\"active_rich = '.$id.'; do_action(\\''.$item.'\\')\" alt=\"'.$lang->item($item).'\" src=\"'.$class_path.'rich_files/images/'.$image_name.'.gif\" align=\"absMiddle\" width=\"20\" height=\"20\" />\n ';\n }", "title": "" }, { "docid": "bf15cacae68f73f5a0d1d94a4d7b01a4", "score": "0.504753", "text": "function get_tb_dialog_icon_ns($item, $image_name, $name, $id, &$lang) {\n// global $class_path;\n $class_path = $this->get_class_path();\n\n return '\n <img id=\"'.$item.'_'.$name.'\" onmousedown=\"mouse_down(true, this);\" onmouseup=\"mouse_down(false, this);\" onclick=\"active_rich = '.$id.'; show_dialog(\\''.$item.'\\')\" title=\"'.$lang->item($item).'\" src=\"'.$class_path.'rich_files/images/'.$image_name.'.gif\" align=\"absMiddle\" width=\"20\" height=\"20\" onmouseover=\"mouse_over(true, this);\" onmouseout=\"mouse_over(false, this);\" />\n ';\n }", "title": "" }, { "docid": "d61ac25511550ec0e075398869ed2a41", "score": "0.5016706", "text": "public function add_fab_icon() {\n\n\t\tif ( wp_doing_ajax() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$svg_allowed = array(\n\t\t\t'svg' => array(\n\t\t\t\t'id' => true,\n\t\t\t\t'class' => true,\n\t\t\t\t'aria-hidden' => true,\n\t\t\t\t'aria-labelledby' => true,\n\t\t\t\t'role' => true,\n\t\t\t\t'xmlns' => true,\n\t\t\t\t'width' => true,\n\t\t\t\t'height' => true,\n\t\t\t\t'viewbox' => true, // <= Must be lower case!\n\t\t\t),\n\t\t\t'g' => array( 'fill' => true ),\n\t\t\t'title' => array( 'title' => true ),\n\t\t\t'path' => array(\n\t\t\t\t'd' => true,\n\t\t\t\t'fill' => true,\n\t\t\t),\n\t\t);\n\n\t\t$gridicon_help = file_get_contents( __DIR__ . '/gridicon-help.svg', true );\n\n\t\t// Add tracking data to link to be picked up by Calypso for GA and Tracks usage.\n\t\t$tracking_href = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'utm_source' => 'wp_admin',\n\t\t\t\t'utm_medium' => 'other',\n\t\t\t\t'utm_content' => 'jetpack_masterbar_inline_help_click',\n\t\t\t\t'flags' => 'a8c-analytics.on',\n\t\t\t),\n\t\t\t'https://wordpress.com/help'\n\t\t);\n\n\t\t// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t// We trust that output in the template has been escaped.\n\t\techo load_template(\n\t\t\t__DIR__ . '/inline-help-template.php',\n\t\t\ttrue,\n\t\t\tarray(\n\t\t\t\t'href' => $tracking_href,\n\t\t\t\t'icon' => $gridicon_help,\n\t\t\t\t'svg_allowed' => $svg_allowed,\n\t\t\t)\n\t\t);\n\t\t// phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped\n\n\t}", "title": "" }, { "docid": "1d3594f2b1f0fe6d2825fc8faab9dd29", "score": "0.501432", "text": "public function icon(): string;", "title": "" }, { "docid": "bc867d09de2e4ab5362272e07d7fae94", "score": "0.5011768", "text": "function update_mymoodle_icon() {\n\t\n\tglobal $CFG, $USER;\n\t\n\tif (! empty ( $USER->editing )) {\n\t\t$string = get_string ( 'updatemymoodleoff' );\n\t\t$edit = '0';\n\t} else {\n\t\t$string = get_string ( 'updatemymoodleon' );\n\t\t$edit = '1';\n\t}\n\t\n\treturn \"<form $CFG->frametarget method=\\\"get\\\" action=\\\"$CFG->wwwroot/my/index.php\\\">\" . \"<div>\" . \"<input type=\\\"hidden\\\" name=\\\"edit\\\" value=\\\"$edit\\\" />\" . \"<input type=\\\"submit\\\" value=\\\"$string\\\" /></div></form>\";\n}", "title": "" }, { "docid": "0bcce4296ada6f9e6659406cd1a259a6", "score": "0.5009708", "text": "public function post_page_edit_icon(){\n global $current_screen;\n\n if($current_screen->parent_base != 'edit' ) return;\n\n $p = explode('?', $current_screen->parent_file );\n\n if( count($p) < 2 ) return;\n\n parse_str( $p[1], $args );\n\n if( !isset($args['post_type']) ) return;\n\n $type = $args['post_type'];\n\n if( empty($this->fields_info['types'][$type]['menu_icon']) ) return;\n\n $icon = $this->fields_info['types'][$type]['menu_icon'];\n $icon = str_replace( '-16.', '-32.', $icon );\n ?><style type=\"text/css\">\n body #icon-post, body #icon-edit {\n background: url(\"<?php echo EASYPOSTTYPES_ICONS_URL.$icon;?>\") no-repeat 50% 50%;\n }\n </style><?php\n\n }", "title": "" }, { "docid": "a8236d607d1f8147f27984ce70a8fc62", "score": "0.5006507", "text": "function add_edit_text_icon($page_id, $id = NULL)\n {\n if ($id != null) {\n $text_icon = $this->Text_icon_model->get_text_icon_by_id($page_id, $id);\n $data['text_icon_id'] = $text_icon[0]->id;\n $data['icon'] = $text_icon[0]->icon;\n $data['icon_color'] = $text_icon[0]->icon_color;\n $data['icon_position'] = $text_icon[0]->icon_position;\n $data['icon_shape'] = $text_icon[0]->icon_shape;\n $data['icon_background_color'] = $text_icon[0]->icon_background_color;\n $data['icon_hover_color'] = $text_icon[0]->icon_hover_color;\n $data['icon_hover_background'] = $text_icon[0]->icon_hover_background;\n $data['icon_title'] = $text_icon[0]->title;\n $data['content'] = $text_icon[0]->content;\n $data['title_color'] = $text_icon[0]->title_color;\n $data['title_position'] = $text_icon[0]->title_position;\n $data['content_title_color'] = $text_icon[0]->content_title_color;\n $data['content_title_position'] = $text_icon[0]->content_title_position;\n $data['content_color'] = $text_icon[0]->content_color;\n $data['content_position'] = $text_icon[0]->content_position;\n $data['redirect'] = $text_icon[0]->redirect;\n $data['redirect_url'] = $text_icon[0]->redirect_url;\n $data['open_new_tab'] = $text_icon[0]->open_new_tab;\n $data['background_hover_color'] = $text_icon[0]->background_hover_color;\n $data['hover_title_color'] = $text_icon[0]->hover_title_color;\n $data['content_title_hover'] = $text_icon[0]->content_title_hover;\n $data['text_hover_color'] = $text_icon[0]->text_hover_color;\n $data['background_color'] = $text_icon[0]->background_color;\n $data['sort_order'] = $text_icon[0]->sort_order;\n $data['status'] = $text_icon[0]->status;\n } else {\n $data['text_icon_id'] = \"\";\n $data['icon'] = \"\";\n $data['icon_color'] = \"\";\n $data['icon_position'] = \"\";\n $data['icon_shape'] = \"\";\n $data['icon_background_color'] = \"\";\n $data['icon_hover_color'] = \"\";\n $data['icon_hover_background'] = \"\";\n $data['icon_title'] = \"\";\n $data['content'] = \"\";\n $data['title_color'] = \"\";\n $data['title_position'] = \"\";\n $data['content_title_color'] = \"\";\n $data['content_title_position'] = \"\";\n $data['content_color'] = \"\";\n $data['content_position'] = \"\";\n $data['redirect'] = \"\";\n $data['redirect_url'] = \"\";\n $data['open_new_tab'] = \"\";\n $data['background_hover_color'] = \"\";\n $data['hover_title_color'] = \"\";\n $data['text_hover_color'] = \"\";\n $data['content_title_hover'] = \"\";\n $data['background_color'] = \"\";\n $data['sort_order'] = \"\";\n $data['status'] = \"\";\n }\n \n $data['page_id'] = $page_id;\n $data['title'] = ($id != null) ? 'Edit Text Icon' : 'Add Text Icon' . ' | Administrator';\n $data['heading'] = (($id != null) ? 'Edit' : 'Add') . ' Text Icon';\n $this->load->view('template/meta_head', $data);\n $this->load->view('text_icon_header');\n $this->admin_header->index();\n $this->load->view('add_edit_text_icon', $data);\n $this->load->view('template/footer_content');\n $this->load->view('script');\n $this->load->view('template/footer');\n }", "title": "" }, { "docid": "eadba11a77b64d37bd52baab211ce0d9", "score": "0.5001596", "text": "function idaho_glyphicon_func( $atts, $content = '' ) {\n\n\t/** Returnable html string. */\n\t$icon = (string) '';\n\n\t$name = $atts[0];\n\n\t$icon .= sprintf('<span class=\"glyphicons glyphicons-%1$s\"></span>',\n\t\tesc_attr( $name )\n\t);\n\n\t/** Strip out new lines to avoid auto <p>s. */\n\treturn $icon;\n}", "title": "" }, { "docid": "d15ba13b984ba364fa1ae138b679cbee", "score": "0.4991056", "text": "function testEditemoticon()\n\t{\n\t\tocf_edit_emoticon($old_code='X:)',$code='Z:D',$theme_img_code='images/smile.jpg',$relevance_level=2,$use_topics=0,$is_special=0);\n\n\t\t// Test the forum was actually created\n\t\t$this->assertTrue('Z:D'==$GLOBALS['FORUM_DB']->query_value('f_emoticons','e_code ',array('e_code'=>'Z:D')));\n\t}", "title": "" }, { "docid": "3886059db4eb2642201be496283aa0f6", "score": "0.49902245", "text": "function setIconName($name);", "title": "" }, { "docid": "3b070fb197be66922e0d03715ef603e9", "score": "0.49808824", "text": "public function edit(Poseicon $poseicon)\n {\n //\n }", "title": "" }, { "docid": "cbeeea9d170fc0d6759eb0a6880cf9c2", "score": "0.4977378", "text": "function wrapIcon($icon,$row)\t{\r\n\t\t\t// Add title attribute to input icon tag\r\n\t\t$theIcon = $this->addTagAttributes($icon,($this->titleAttrib ? $this->titleAttrib.'=\"'.$this->getTitleAttrib($row).'\"' : ''));\r\n\t\t\t\t\r\n\t\t\t// Wrap icon in click-menu link.\r\n\t\tif (!$this->ext_IconMode)\t{\r\n\t\t\t$tempObj = $this->getData();\r\n\t\t\t$pid = $tempObj->getPid($row);\r\n\t\t\t$pid = ($pid ? $pid : $this->tree->rootPid);\r\n\t\t\t$theIcon = tx_graytree_div::clickMenuWrap($this->extKey,$theIcon, $tempObj->table, $pid, $tempObj->getId($row), 0, $addParams='', $enDisItems='', '', $this->clickMenuScript);\r\n\t\t} elseif (!strcmp($this->ext_IconMode,'wrapIcon: titlelink'))\t{\r\n\r\n\t\t\t// unused for now\r\n\t\t\t$aOnClick = 'return jumpTo(\\''.$this->getJumpToParam($row).'\\',this,\\''.$this->domIdPrefix.$this->getId($row).'_'.$this->bank.'\\',\\'\\');';\r\n\t\t\t$theIcon='<a href=\"#\" onclick=\"'.htmlspecialchars($aOnClick).'\">'.$theIcon.'</a>';\r\n\t\t}\r\n\t\treturn $theIcon;\r\n\t}", "title": "" }, { "docid": "2b5ae9e7d1af1756b7bf957aed3eabe7", "score": "0.4970792", "text": "function wrapIcon($icon,$row)\t{\n\t\treturn $this->addTagAttributes($icon,' title=\"id='.$row['uid'].'\"');\n\t}", "title": "" }, { "docid": "12766f5f434d70e627f964e0bee673e7", "score": "0.49669313", "text": "function msg_box($title, $content, $showtips = '1', $nobutton = false)\n{\n global $bm_skin, $pgo, $temfilename, $gl;\n \n define(\"IN_MSGBOX\", true);\n \n if ($showtips) {\n $msg_box_title = \"$title\";\n $msg_box_detail = \"$gl[376] {$title} $gl[377]<br /><br />\";\n } else {\n \t$msg_box_title = \"$title\";\n }\n require(\"newtem/$temfilename/global.php\");\n\teval(load_hook('int_global_msg_box'));\n \n echo $pgo[0];\n}", "title": "" }, { "docid": "096a80c1c7b9c212691a0b61989fc2be", "score": "0.49589923", "text": "function addTagAttributes($icon,$attr)\t{\r\n\t\treturn ereg_replace(' ?\\/?>$','',$icon).' '.$attr.' />';\r\n\t}", "title": "" }, { "docid": "6dd664e6ef6714db0a323f547bfc340a", "score": "0.49568757", "text": "public function addMessage(string $content, string $title = NULL, string $type = 'info', string $icon = null): void {\n\t\t$this->array [] = new FlashMessage ( $content, $title, $type, $icon );\n\t}", "title": "" }, { "docid": "b15ba7218cb0c5899fe187e9a00ec7c4", "score": "0.49559617", "text": "public function addMessage(MessageInterface $message);", "title": "" }, { "docid": "f0e2dd86be507ad6620db76f754637e7", "score": "0.49553093", "text": "public function icon($x, $y, $icon)\n {\n // if the driver does not support output, do nothing\n if (!method_exists($this, 'chr')) {\n return;\n }\n\n switch ($icon) {\n case Widget::ICON_BLOCK_FILLED:\n $ch1 = '#';\n break;\n case Widget::ICON_HEART_OPEN:\n $ch1 = '-';\n break;\n case Widget::ICON_HEART_FILLED:\n $ch1 = '#';\n break;\n case Widget::ICON_ARROW_UP:\n $ch1 = '^';\n break;\n case Widget::ICON_ARROW_DOWN:\n $ch1 = 'v';\n break;\n case Widget::ICON_ARROW_LEFT:\n $ch1 = '<';\n break;\n case Widget::ICON_ARROW_RIGHT:\n $ch1 = '>';\n break;\n case Widget::ICON_CHECKBOX_OFF:\n $ch1 = 'N';\n break;\n case Widget::ICON_CHECKBOX_ON:\n $ch1 = 'Y';\n break;\n case Widget::ICON_CHECKBOX_GRAY:\n $ch1 = 'o';\n break;\n case Widget::ICON_SELECTOR_AT_LEFT:\n $ch1 = '>';\n break;\n case Widget::ICON_SELECTOR_AT_RIGHT:\n $ch1 = '<';\n break;\n case Widget::ICON_ELLIPSIS:\n $ch1 = '_';\n break;\n case Widget::ICON_STOP:\n $ch1 = '[';\n $ch2 = ']';\n break;\n case Widget::ICON_PAUSE:\n $ch1 = '|';\n $ch2 = '|';\n break;\n case Widget::ICON_PLAY:\n $ch1 = '>';\n $ch2 = ' ';\n break;\n case Widget::ICON_PLAYR:\n $ch1 = '<';\n $ch2 = ' ';\n break;\n case Widget::ICON_FF:\n $ch1 = '>';\n $ch2 = '>';\n break;\n case Widget::ICON_FR:\n $ch1 = '<';\n $ch2 = '<';\n break;\n case Widget::ICON_NEXT:\n $ch1 = '>';\n $ch2 = '|';\n break;\n case Widget::ICON_PREV:\n $ch1 = '|';\n $ch2 = '<';\n break;\n case Widget::ICON_REC:\n $ch1 = '(';\n $ch2 = ')';\n break;\n }\n\n if (isset($ch1)) {\n $this->chr($x, $y, $ch1);\n }\n if (isset($ch2)) {\n \t$this->chr($x+1, $y, $ch2);\n }\n }", "title": "" }, { "docid": "ac48664ca529da0d9d758115dae74044", "score": "0.49426264", "text": "function showMailIcon($approver, $approver_eid, $approver_name, $type_id) {\n\t$html=\"<a href=\\\"resend.php?approval=$approver&eid=$approver_eid&type_id=$type_id\\\" onmouseover=\\\"return overlib('Resend request to $approver_name', TEXTPADDING, 10, WIDTH, 300, WRAPMAX, 300, AUTOSTATUS, BGCOLOR, '#E68B2C', CGCOLOR, '#E68B2C', FGCOLOR, '#FFFF99');\\\" onmouseout=\\\"nd();\\\"><img src=\\\"../images/resend_email.gif\\\" width=\\\"19\\\" height=\\\"16\\\" border=\\\"0\\\" align=\\\"absmiddle\\\"></a>\";\n\t\n\treturn $html;\n}", "title": "" }, { "docid": "dd292e5408b97ff75625524ee7a70e39", "score": "0.49346256", "text": "public function add_default_icon_wrap(){\n\t\tif (is_admin()) {\n\t\t\t$screen = get_current_screen();\n\n\t\t\t$array = [\n\t\t\t\t'dashboard' => 'fa-dashboard',\n\t\t\t\t'edit-post' => 'fa-pencil',\n\t\t\t\t'post' => 'fa-pencil',\n\t\t\t\t'edit-category' => 'fa-unlink',\n\t\t\t\t'edit-post_tag' => 'fa-tag',\n\t\t\t\t'upload' => 'fa-upload',\n\t\t\t\t'media' => 'fa-upload',\n\t\t\t\t'edit-page' => 'fa-pencil',\n\t\t\t\t'page' => 'fa-pencil',\n\t\t\t\t'edit-comments' => 'fa-comment',\n\t\t\t\t'themes' => 'fa-paint-brush',\n\t\t\t\t'widgets' => 'fa-th-large',\n\t\t\t\t'nav-menus' => 'fa-th-list',\n\t\t\t\t'plugins' => 'fa-plug',\n\t\t\t\t'users' => 'fa-users',\n\t\t\t\t'profile' => 'fa-user',\n\t\t\t\t'options-general' => 'fa-cog',\n\t\t\t\t'options-writing' => 'fa-cog',\n\t\t\t\t'options-reading' => 'fa-cog',\n\t\t\t\t'options-discussion' => 'fa-cog',\n\t\t\t\t'options-media' => 'fa-cog',\n\t\t\t\t'options-permalink' => 'fa-cog',\n\n\t\t\t\t//Extra page\n\t\t\t\t//'user_maharat' => 'fa-user'\n\t\t\t];\n\t\t\tforeach($array as $screen_id => $icon_wrap) {\n\n\t\t\t\t//Extrapage\n\t\t\t\tif (strlen(strstr($screen->id,'_page_')) >0) {\n\t\t\t\t\tif(strstr($screen->id,'_page_'.$screen_id)) {\n\t\t\t\t\t\tadd_action_once('adminpage_icon', function() use ($screen_id, $array) {\n\t\t\t\t\t\t\techo \"fa {$array[$screen_id]}\";\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//base wordpress page\n\t\t\t\tif ($screen->id == $screen_id) {\n\t\t\t\t\tadd_action_once('adminpage_icon', function() use ($screen_id, $array) {\n\t\t\t\t\t\techo \"fa {$array[$screen_id]}\";\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a0a195ebf7d13287dcab3b20e8836daf", "score": "0.49271005", "text": "function i($code){\n\n $icon = '<i class=\"fa fa-'.$code.'\"></i>';\n\n return $icon;\n\n }", "title": "" }, { "docid": "ed70e36091b3fe0bccbd8ff9575e4f56", "score": "0.49134514", "text": "function addMessage($message)\n{\n\t$name = ($message['action']) ? '*'.$message['name'] : $message['name'];\n\t$text = $message['text'];\n//----- Debut ajout CI --------------\t\n//\t$name = html_entity_decode(htmlentities($name, ENT_COMPAT, 'UTF-8'));\n//\t$text = html_entity_decode(htmlentities($message['text'], ENT_COMPAT, 'UTF-8'));\n//----- Fin ajout CI --------------\t\n\t$time = $message['time'];\n\t$line = $time.'||'.$name.'||'.$text;\t\n\t\n//----- Debut ajout CI (securite supplementaire) --------\t\n\tif (isset($_COOKIE['spip_session'])) {\n//----- Fin ajout CI --------------\t\t\n\t\t// just write to file\n\t\t$file = fopen(LACE_FILE, 'a');\n\t\tfwrite($file, $line.\"\\n\");\n\t\tfclose($file);\n//----- Debut ajout CI ------------\t\n\t}\n//----- Fin ajout CI --------------\t\n \n}", "title": "" }, { "docid": "aaa475dfb9a1f24abf365c80c5aee55c", "score": "0.49132386", "text": "function addIcon(Icon $icon) {\n\t\t$this->getIconContainer()->addExtraComponent($icon);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d0f50cf76f873e538b61f7c1b52c68f3", "score": "0.4911157", "text": "function newt_push_help_line($text = NULL)\n{\n}", "title": "" }, { "docid": "00cc1211ba4dcb78c07b3ed3b04577ca", "score": "0.4902317", "text": "public function textInput( $attribute = '', $icon = '',$options = [] ){\n\t\t$fieldOption = [ 'options' => ['class' => 'form-group has-feedback '],\n\t\t\t'errorOptions'=>['tag'=>'div','class'=>'alert alert-warning'],\n\t\t\t'inputTemplate' => '<div class=\"input-group input-group-alternative\"> <div class=\"input-group-prepend\"><span class=\"input-group-text\"><i class=\"ni ni-'.$icon.'\"></i></span></div>{input}</div>',\n\t\t];\n\t\treturn $this->form->field($this->model, $attribute, $fieldOption)->textInput(['autofocus' => true,'placeholder'=>$this->model->getAttributeLabel($attribute)])->label(false);\n\t}", "title": "" }, { "docid": "3bf8faff370d693240df2d82ff169aa0", "score": "0.4901741", "text": "function insert_button(& $event, $param) {\n $event->data[] = array (\n 'type' => 'format',\n 'title' => $this->getLang('photowidget'),\n 'icon' => '../../plugins/photowidget/toolbar/PhotoWidget.png',\n\t\t'open' =>'<photowidget feed=\"\" width=\"300\" height=\"300\">',\n 'close' => '</photowidget>',\n );\n}", "title": "" }, { "docid": "db52a37bbf4272296c855a0891f547dd", "score": "0.4895501", "text": "public function addEmoticon($aVals, $sFileName = null)\n\t{\n\t\t// check completeness of the array\n\t\t$aForm = array(\n\t\t\t'title' => array(\n\t\t\t\t'message' => Phpfox::getPhrase('emoticon.select_a_module'),\n\t\t\t\t'type' => 'string:required'\n\t\t\t),\n\t\t\t'text' => array(\n\t\t\t\t'message' => Phpfox::getPhrase('emoticon.provide_a_emoticon_symbol'),\n\t\t\t\t'type' => 'string:required'\n\t\t\t),\n\t\t\t'package_path' => array(\n\t\t\t\t'message' => Phpfox::getPhrase('emoticon.define_a_path_for_the_package'),\n\t\t\t\t'type' => 'string:required'\n\t\t\t)\n\t\t);\n\n\t\t$this->validator()->process($aForm, $aVals);\n\t\t\n\t\tif (!Phpfox_Error::isPassed())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// check that there is not another replace for the same package\n\t\t$bExists = $this->database()->select('*')\n\t\t\t->from($this->_sTable)\n\t\t\t->where('text = \\'' . $aVals['text'] . '\\'')\n\t\t\t->execute('getSlaveRow');\n\n\t\t// if is not updating and the one in the DB matches in text and package_PATH then throw an error\n\t\tif (!isset($aVals['emoticon_id']) && isset($bExists['emoticon_id']) && $bExists['emoticon_id'] > 0)\n\t\t{\t\t\t\n\t\t\treturn Phpfox_Error::set(Phpfox::getPhrase('emoticon.symbol_already_exists'));\n\t\t}\n\n\t\t// if is updating then update all the fields except the image field right away\n\t\tif (isset($aVals['emoticon_id']) && $aVals['emoticon_id'] > 0)\n\t\t{\n\t\t\t$aUpdate = array(\n\t\t\t\t'title' => Phpfox::getLib('parse.input')->clean($aVals['title']),\n\t\t\t\t'text' => Phpfox::getLib('parse.input')->clean($aVals['text']),\n\t\t\t\t'package_path' => Phpfox::getLib('parse.input')->clean($aVals['package_path'])\n\t\t\t);\n\t\t\t\n\t\t\t$this->database()->update($this->_sTable, $aUpdate, 'emoticon_id = ' . (int)$aVals['emoticon_id']);\n\t\t}\n\n\t\t// Upload image\n\t\tif (!empty($aVals['file']['tmp_name']))\n\t\t{\n\t\t\tif ($sFileName === null)\n\t\t\t{\n\t\t\t\t$oFile = Phpfox::getLib('file');\n\t\t\t\t$oImage = Phpfox::getLib('image');\n\t\t\t\t\n\t\t\t\t$aImage = $oFile->load('file', array('png', 'jpg', 'gif'));\n\t\t\t\t\n\t\t\t\tif ($aImage === false)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$sFileName = Phpfox::getLib('parse.input')->cleanFileName(preg_replace(\"/^(.*?)\\.(jpg|jpeg|gif|png)$/i\", \"$1\", $aVals['file']['name']));\n\t\t\t\t\n\t\t\t\t$sDirectory = $this->database()->select('package_path')\n\t\t\t\t\t->from(Phpfox::getT('emoticon_package'))\n\t\t\t\t\t->where('package_path =\\'' . $this->database()->escape(Phpfox::getLib('parse.input')->clean($aVals['package_path'])) . '\\'')\n\t\t\t\t\t->execute('getSlaveField');\t\t\t\t\t\n\n\t\t\t\t$sDirectory = Phpfox::getParam('core.dir_emoticon') . $sDirectory . PHPFOX_DS;\n\t\n\t\t\t\tif (!($sFileName = $oFile->upload('file', $sDirectory, $sFileName, false, 0644, false)))\n\t\t\t\t{\n\t\t\t\t\treturn Phpfox_Error::set(Phpfox::getPhrase('emoticon.image_could_not_be_uploaded'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\n\t\tif (isset($aVals['emoticon_id']) && is_numeric($aVals['emoticon_id']))\n\t\t{\n\t\t\t// Update the image field\n\t\t\t$this->database()->update($this->_sTable, array('title' => $this->preParse()->clean($aVals['title']), 'text' => $this->preParse()->clean($aVals['text'])), 'emoticon_id = ' . (int) $aVals['emoticon_id']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// insert in the database\n\t\t\t$aInsert = array(\n\t\t\t\t'title' => $this->preParse()->clean($aVals['title']),\n\t\t\t\t'text' => $this->preParse()->clean($aVals['text']),\n\t\t\t\t'image' => str_replace('%s', '', $sFileName),\n\t\t\t\t'package_path' => Phpfox::getLib('parse.input')->clean($aVals['package_path'])\n\t\t\t);\n\t\t\t\t\n\t\t\t$this->database()->insert($this->_sTable, $aInsert);\n\t\t}\n\n\t\t// remove cache\n\t\t$this->cache()->remove('emoticon');\n\t\t$this->cache()->remove('emoticon_parse');\t\t\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d5f7d756178e4d859deababe0e048869", "score": "0.48900813", "text": "public function get_icon() {\n // FIXME: This is from the tutorial\n return 'fa fa-pencil';\n }", "title": "" }, { "docid": "a981c32ad09844202ebe6a52e9ba72c5", "score": "0.48844323", "text": "function placeholder_emoticons()\n{\n\t$smilies=array();\n\t$smilies[':constipated:'][] = 'EMOTICON_IMG_CODE_THEMED';\n\t$smilies[':constipated:'][] = 'ocf_emoticons/constipated';\n\t$smilies[':constipated:'][] = ':constipated:';\n\n\t$smilies[':upsidedown:'][] = 'EMOTICON_IMG_CODE_THEMED';\n\t$smilies[':upsidedown:'][] = 'ocf_emoticons/upsidedown';\n\t$smilies[':upsidedown:'][] = ':upsidedown:';\n\n\t$smilies[':depressed:'][] = 'EMOTICON_IMG_CODE_THEMED';\n\t$smilies[':depressed:'][] = 'ocf_emoticons/depressed';\n\t$smilies[':depressed:'][] = ':depressed:';\n\n\t$smilies[':christmas:'][] = 'EMOTICON_IMG_CODE_THEMED';\n\t$smilies[':christmas:'][] = 'ocf_emoticons/christmas';\n\t$smilies[':christmas:'][] = ':christmas:';\n\n\treturn $smilies;\n}", "title": "" }, { "docid": "4fd3db13c8f690bb271d3ea24ddb63d5", "score": "0.4878304", "text": "function get_tb_action_icon_ns($item, $image_name, $name, $id, &$lang) {\n// global $class_path;\n $class_path = $this->get_class_path();\n\n return '\n <img id=\"'.$item.'_'.$name.'\" onmousedown=\"mouse_down(true, this);\" onmouseup=\"mouse_down(false, this);\" onclick=\"active_rich = '.$id.'; do_action(\\''.$item.'\\')\" title=\"'.$lang->item($item).'\" src=\"'.$class_path.'rich_files/images/'.$image_name.'.gif\" align=\"absMiddle\" width=\"20\" height=\"20\" onmouseover=\"mouse_over(true, this);\" onmouseout=\"mouse_over(false, this);\" />\n ';\n }", "title": "" }, { "docid": "79695c4d781504cf3f5dc3637660ea36", "score": "0.48767856", "text": "public function add( $msg );", "title": "" }, { "docid": "4dc034775c5a45cf3147f21c662535a2", "score": "0.4869478", "text": "public function addCustomMessage($attribute, $rule, $message);", "title": "" }, { "docid": "93eb2073a36a552c0a03fb7e982af858", "score": "0.48595297", "text": "function input_tiny_mce($label,$name,$value='',$help=''){\r\n $str=\"\";\r\n $str.=input_area($label,$name,$value,'custom_tiny_mce','3',$help,'F');\r\n return $str;\r\n}", "title": "" }, { "docid": "8a7a015546d50e36676b4a73fa47b711", "score": "0.48590866", "text": "public function get_icon() {\n return 'eicon-alert';\n }", "title": "" }, { "docid": "55aba4a294d3fd05bdc7e351c8588102", "score": "0.48542398", "text": "function GetNotifIcon($type)\n\t{\n\tglobal $template_phrases;\n\tif ($type == 1)\n\t\t$return = $GLOBALS['common_path'].'comment_ico.jpg';\n\tif ($type == 2)\n\t\t$return = $GLOBALS['common_path'].'comment_ico.jpg';\n\t\t\n\treturn($return);\n\t}", "title": "" }, { "docid": "4cfbfa413960b19018e95acd1f247be4", "score": "0.48522967", "text": "function add_info_message($message) { /* what happens if there is a ' in the message string or a \\n ?? <<<<<<<< */\n\techo \"<script>\\n\";\n\techo \" dojo.ready(function() {\\n\";\n\techo \" infoarea = dojo.byId('infoarea');\\n\";\n\techo \" infoarea.innerHTML += '\" . str_replace ( \"\\n\", \"<br>\", str_replace ( \"'\", \"\\\\'\", $message ) ) . \"' + '<br>';\\n\";\n\techo \" });\\n\";\n\techo \"</script>\\n\";\n}", "title": "" }, { "docid": "85aa74b03419bd372da4cc7565cfcea3", "score": "0.4849836", "text": "function add_information_message($name, $label, $message, $no_margin = false)\r\n {\r\n $html = '<div id=\"' . $name . '\" class=\"row\"><div class=\"formc' . ($no_margin ? ' formc_no_margin' : '') . '\">';\r\n if ($label)\r\n {\r\n $html .= '<b>' . $label . '</b><br />';\r\n }\r\n $html .= $message . '</div></div>';\r\n $this->addElement('html', $html);\r\n }", "title": "" }, { "docid": "827a2043f6c8c7c9f1d016f18dc71ff4", "score": "0.48488307", "text": "function addonse_render_icon( $settings = [], $old_icon_id = 'icon', $new_icon_id = 'selected_icon', $attributes = [] ) {\n // Check if its already migrated\n $migrated = isset( $settings['__fa4_migrated'][ $new_icon_id ] );\n // Check if its a new widget without previously selected icon using the old Icon control\n $is_new = empty( $settings[ $old_icon_id ] );\n\n $attributes['aria-hidden'] = 'true';\n\n if ( addonse_is_elementor_version( '>=', '2.6.0' ) && ( $is_new || $migrated ) ) {\n \\Elementor\\Icons_Manager::render_icon( $settings[ $new_icon_id ], $attributes );\n } else {\n if ( empty( $attributes['class'] ) ) {\n $attributes['class'] = $settings[ $old_icon_id ];\n } else {\n if ( is_array( $attributes['class'] ) ) {\n $attributes['class'][] = $settings[ $old_icon_id ];\n } else {\n $attributes['class'] .= ' ' . $settings[ $old_icon_id ];\n }\n }\n printf( '<i %s></i>', \\Elementor\\Utils::render_html_attributes( $attributes ) );\n }\n}", "title": "" }, { "docid": "a434c64085af46cf51bf8b94f7081367", "score": "0.48375773", "text": "public function addExtraMsgForUI( $aMsg )\n\t{\n\t\t$theMsgs = $this->getExtra('extra_msg');\n\t\tif ( !empty($theMsgs) ) $theMsgs .= \"\\n\";\n\t\t$theMsgs .= $aMsg;\n\t\treturn $this->putExtra('extra_msg', $theMsgs);\n\t}", "title": "" }, { "docid": "806d6670e63eacc2220127fdd611bffc", "score": "0.48349285", "text": "public function icon() {\n\t\treturn 'reveal';\n\t}", "title": "" }, { "docid": "ac6e7eb32402e67bc0c0ccfff65dd763", "score": "0.4831534", "text": "function image_url_hack_insert($msg)\n{\n if (empty($msg['imageurl'])) return $msg;\n\n $msg['message'] = \"<center><img src=\\\"\" .\n escapequotes($msg['imageurl']) . \"\\\"></center><p>\\n\" .\n $msg['message'];\n\n return $msg;\n}", "title": "" }, { "docid": "9d2ed92be6fc30db78adf088a0d3316e", "score": "0.4825857", "text": "function link_to_with_icon($icon, $route_name, $route_args = [], $text = '', $icon_class = '', $button_class = '')\n{\n $url = route($route_name, $route_args);\n $button_class = 'button is-white ' . $button_class;\n $icon_class = 'icon ' . $icon_class;\n\n return\n \"<p class='field'>\n <a class='$button_class' href=$url>\n <span class='$icon_class'>\n <i class='$icon'></i>\n </span>\n <span>&nbsp;$text</span>\n </a>\n </p>\";\n}", "title": "" }, { "docid": "08629027e4a32d369674711d1cb45964", "score": "0.4820175", "text": "public function icon(string $name, string $source, array $options = []): void;", "title": "" }, { "docid": "e237c3488395945bf6a88aa9293a7065", "score": "0.48200515", "text": "function posting_gen_topic_icons($mode, $icon_id)\n{\n\tglobal $phpbb_root_path, $config, $template, $cache;\n\n\t// Grab icons\n\t$icons = $cache->obtain_icons();\n\n\tif (!$icon_id)\n\t{\n\t\t$template->assign_var('S_NO_ICON_CHECKED', ' checked=\"checked\"');\n\t}\n\n\tif (sizeof($icons))\n\t{\n\t\t$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;\n\n\t\tforeach ($icons as $id => $data)\n\t\t{\n\t\t\tif ($data['display'])\n\t\t\t{\n\t\t\t\t$template->assign_block_vars('topic_icon', array(\n\t\t\t\t\t'ICON_ID'\t\t=> $id,\n\t\t\t\t\t'ICON_IMG'\t\t=> $root_path . $config['icons_path'] . '/' . $data['img'],\n\t\t\t\t\t'ICON_WIDTH'\t=> $data['width'],\n\t\t\t\t\t'ICON_HEIGHT'\t=> $data['height'],\n\n\t\t\t\t\t'S_CHECKED'\t\t\t=> ($id == $icon_id) ? true : false,\n\t\t\t\t\t'S_ICON_CHECKED'\t=> ($id == $icon_id) ? ' checked=\"checked\"' : '')\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "b0e3b044e62e9fcef8489fea22f7ee72", "score": "0.48111257", "text": "function displayIcon($d,$field,$image,$title,$appl) {\n if (isset($d[$field]) && strlen($d[$field])>4)\n if(showField($d,$field))\n echo '<a target=\"_blank\" href=\"'.$appl.getFieldValue($d[$field]).'\" title=\"'.$title.'\"><img src=\"images/'.$image.'\" /></a>';\n else\n echo '<a href=\"#\" onclick=\"hiddenData(\\''.$title.'\\');\" title=\"'.$title.'\"><img src=\"images/'.$image.'\" /></a>';\n}", "title": "" }, { "docid": "b3825186e99c96c4cbc53018efc3838e", "score": "0.4804049", "text": "public function setTextContent($msg);", "title": "" }, { "docid": "f4d7a6ff480949bf8916a63d510d4d07", "score": "0.4802888", "text": "function addText($msg)\n\t{\n\t\t$this->message = (string) $msg;\n\t}", "title": "" }, { "docid": "f5e6c09cf5bd41d2ed06d0dd1c44d7e7", "score": "0.47928008", "text": "function form_maker_create_textarea($element_info) {\n\n}", "title": "" }, { "docid": "86acda0c3ea8578eddca26fdcfcdb662", "score": "0.47864524", "text": "function generate_smilies_bar($doc)\n{\n global $sm_search, $sm_replace, $lang, $barsmilies;\n\n $sarr = array();\n for ($i=0; $i<$barsmilies; ++$i)\n {\n array_push($sarr, '<a href=\"javascript:paste_smilie(', $doc, ',\\'', $sm_search[$i], '\\')\">', $sm_replace[$i], '</a>');\n }\n if ($barsmilies < count($sm_search))\n array_push($sarr, '&nbsp;&nbsp;<a style=\"font-family: arial, tahoma, verdana; font-size: 11px;\" href=\"javascript:spopup(\\'', $doc, '\\', 400, 400, 1)\">', $lang['all_smilies'], '</a>');\n return implode('',$sarr); \n\n}", "title": "" }, { "docid": "0d2c142062e61b36c6f107829711ac32", "score": "0.47827634", "text": "public function addMessageAndSave(string $content, string $title = NULL, string $type = 'info', string $icon = null): void {\n\t\t$this->addMessage($content,$title,$type,$icon);\n\t\tUSession::set ( self::FLASH_BAG_KEY, $this->array );\n\t}", "title": "" }, { "docid": "dd19444aa566e5d86071cc65d6b9c988", "score": "0.47783726", "text": "public function ips_editor($form_field=\"\",$initial_content=\"\",$images_path=\"\",$rte_mode=0,$editor_id='ed-0',$smilies='') {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$this->settings['extraJsModules']\t.= \",editor\";\n$bbcodes \t\t\t\t\t\t\t= IPSLib::fetchBbcodeAsJson();\n$show_sidebar\t\t\t\t\t\t= IPSCookie::get('emoticon_sidebar');\n$show_sidebar_class \t\t\t\t= $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'with_sidebar' : '';\n$show_sidebar_style\t\t\t\t\t= $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? '' : \"style='display:none'\";\n$show_sidebar_link\t\t\t\t\t= $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'true' : 'false';\n\n$IPBHTML .= <<<EOF\n\t<!--top-->\n\t<input type='hidden' name='{$editor_id}_wysiwyg_used' id='{$editor_id}_wysiwyg_used' value='0' />\n\t<input type='hidden' name='editor_ids[]' value='{$editor_id}' />\n\t<div class='ips_editor {$show_sidebar_class}' id='editor_{$editor_id}'>\nEOF;\n\tif( $this->settings['_remove_emoticons'] == 0 )\n\t{\n\t\t$IPBHTML .= <<<EOF\n\t\t<div class='sidebar row1 altrow' id='{$editor_id}_sidebar' {$show_sidebar_style}>\n\t\t\t<h4><img src='{$this->settings['img_url']}/close_popup.png' alt='{$this->lang->words['icon']}' id='{$editor_id}_close_sidebar' /><span>{$this->lang->words['emoticons_template_title']}</span></h4>\n\t\t\t<div id='{$editor_id}_emoticon_holder' class='emoticon_holder'></div>\n\t\t\t<div class='show_all_emoticons' id='{$editor_id}_showall_bar'>\n\t\t\t\t<input type='button' value='{$this->lang->words['show_all_emotes']}' id='{$editor_id}_showall_emoticons' class='input_submit emoticons' />\n\t\t\t</div>\n\t\t</div>\nEOF;\n\t}\n\t\n\t$IPBHTML .= <<<EOF\n\t\t<div id='{$editor_id}_controls' class='controls'>\n\t\t\t<ul id='{$editor_id}_toolbar_1' class='toolbar' style='display: none'>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_removeformat' class='rte_control rte_button' title='{$this->lang->words['js_tt_noformat']}'><img src='{$this->settings['img_url']}/rte_icons/remove_formatting.png' alt='{$this->lang->words['js_tt_noformat']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_togglesource' class='rte_control rte_button' title='{$this->lang->words['js_tt_htmlsource']}'><img src='{$this->settings['img_url']}/rte_icons/toggle_source.png' alt='{$this->lang->words['js_tt_htmlsource']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_otherstyles' class='rte_control rte_menu rte_special' title='{$this->lang->words['box_other_desc']}' style='display: none'>{$this->lang->words['box_other']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_fontname' class='rte_control rte_menu rte_font' title='{$this->lang->words['box_font_desc']}'>{$this->lang->words['box_font']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_fontsize' class='rte_control rte_menu rte_fontsize' title='{$this->lang->words['box_size_desc']}'>{$this->lang->words['box_size']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_forecolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_font_col']}'><img src='{$this->settings['img_url']}/rte_icons/font_color.png' alt='{$this->lang->words['js_tt_font_col']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<!--<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_backcolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_back_col']}'><img src='{$this->settings['img_url']}/rte_icons/background_color.png' alt='{$this->lang->words['js_tt_back_col']}' /></span>\n\t\t\t\t</li>-->\n\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_spellcheck' class='rte_control rte_button' title='{$this->lang->words['js_tt_spellcheck']}'><img src='{$this->settings['img_url']}/rte_icons/spellcheck.png' alt='{$this->lang->words['js_tt_spellcheck']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_r_small' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizesmall']}'><img src='{$this->settings['img_url']}/rte_icons/resize_small.png' alt='{$this->lang->words['js_tt_resizesmall']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_r_big' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizebig']}'><img src='{$this->settings['img_url']}/rte_icons/resize_big.png' alt='{$this->lang->words['js_tt_resizebig']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_help' class='rte_control rte_button' title='{$this->lang->words['js_tt_help']}'><a href='{$this->settings['board_url']}/index.php?app=forums&amp;module=extras&amp;section=legends&amp;do=bbcode' title='{$this->lang->words['js_tt_help']}'><img src='{$this->settings['img_url']}/rte_icons/help.png' alt='{$this->lang->words['js_tt_help']}' /></a></span>\n\t\t\t\t</li>\t\t\t\n\t\t\t\t<li class='right sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_undo' class='rte_control rte_button' title='{$this->lang->words['js_tt_undo']}'><img src='{$this->settings['img_url']}/rte_icons/undo.png' alt='{$this->lang->words['js_tt_undo']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_redo' class='rte_control rte_button' title='{$this->lang->words['js_tt_redo']}'><img src='{$this->settings['img_url']}/rte_icons/redo.png' alt='{$this->lang->words['js_tt_redo']}' /></span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<ul id='{$editor_id}_toolbar_2' class='toolbar' style='display: none'>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_bold' class='rte_control rte_button' title='{$this->lang->words['js_tt_bold']}'><img src='{$this->settings['img_url']}/rte_icons/bold.png' alt='{$this->lang->words['js_tt_bold']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_italic' class='rte_control rte_button' title='{$this->lang->words['js_tt_italic']}'><img src='{$this->settings['img_url']}/rte_icons/italic.png' alt='{$this->lang->words['js_tt_italic']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_underline' class='rte_control rte_button' title='{$this->lang->words['js_tt_underline']}'><img src='{$this->settings['img_url']}/rte_icons/underline.png' alt='{$this->lang->words['js_tt_underline']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_strikethrough' class='rte_control rte_button' title='{$this->lang->words['js_tt_strike']}'><img src='{$this->settings['img_url']}/rte_icons/strike.png' alt='{$this->lang->words['js_tt_strike']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_subscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sub']}'><img src='{$this->settings['img_url']}/rte_icons/subscript.png' alt='{$this->lang->words['js_tt_sub']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_superscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sup']}'><img src='{$this->settings['img_url']}/rte_icons/superscript.png' alt='{$this->lang->words['js_tt_sup']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_insertunorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/unordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_insertorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/ordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span>\n\t\t\t\t</li>\nEOF;\n\n\t\t\tif( $this->settings['_remove_emoticons'] == 0 )\n\t\t\t{\n$IPBHTML .= <<<EOF\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_emoticons' class='rte_control rte_button' title='{$this->lang->words['js_tt_emoticons']}'><img src='{$this->settings['img_url']}/rte_icons/emoticons.png' alt='{$this->lang->words['js_tt_emoticons']}' /></span>\n\t\t\t\t</li>\nEOF;\n\t\t\t}\n\n$IPBHTML .= <<<EOF\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_link' class='rte_control rte_palette' title='{$this->lang->words['js_tt_link']}'><img src='{$this->settings['img_url']}/rte_icons/link.png' alt='{$this->lang->words['js_tt_link']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_image' class='rte_control rte_palette' title='{$this->lang->words['js_tt_image']}'><img src='{$this->settings['img_url']}/rte_icons/picture.png' alt='{$this->lang->words['js_tt_image']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_email' class='rte_control rte_palette' title='{$this->lang->words['js_tt_email']}'><img src='{$this->settings['img_url']}/rte_icons/email.png' alt='{$this->lang->words['js_tt_email']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_ipb_quote' class='rte_control rte_button' title='{$this->lang->words['js_tt_quote']}'><img src='{$this->settings['img_url']}/rte_icons/quote.png' alt='{$this->lang->words['js_tt_quote']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_ipb_code' class='rte_control rte_button' title='{$this->lang->words['js_tt_code']}'><img src='{$this->settings['img_url']}/rte_icons/code.png' alt='{$this->lang->words['js_tt_code']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_media' class='rte_control rte_palette' title='{$this->lang->words['js_tt_media']}'><img src='{$this->settings['img_url']}/rte_icons/media.png' alt='{$this->lang->words['js_tt_media']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_justifyright' class='rte_control rte_button' title='{$this->lang->words['js_tt_right']}'><img src='{$this->settings['img_url']}/rte_icons/align_right.png' alt='{$this->lang->words['js_tt_right']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_justifycenter' class='rte_control rte_button' title='{$this->lang->words['js_tt_center']}'><img src='{$this->settings['img_url']}/rte_icons/align_center.png' alt='{$this->lang->words['js_tt_center']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_justifyleft' class='rte_control rte_button' title='{$this->lang->words['js_tt_left']}'><img src='{$this->settings['img_url']}/rte_icons/align_left.png' alt='{$this->lang->words['js_tt_left']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_indent' class='rte_control rte_button' title='{$this->lang->words['js_tt_indent']}'><img src='{$this->settings['img_url']}/rte_icons/indent.png' alt='{$this->lang->words['js_tt_indent']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_outdent' class='rte_control rte_button' title='{$this->lang->words['js_tt_outdent']}'><img src='{$this->settings['img_url']}/rte_icons/outdent.png' alt='{$this->lang->words['js_tt_outdent']}' /></span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div id='{$editor_id}_wrap' class='editor'>\n\t\t\t<textarea name=\"{$form_field}\" class=\"input_rte\" id=\"{$editor_id}_textarea\" rows=\"10\" cols=\"60\" tabindex=\"0\">{$initial_content}</textarea>\n\t\t</div>\n\t</div>\n\n\t<!-- Toolpanes -->\n\t<script type=\"text/javascript\">\n\t//<![CDATA[\n\t$('{$editor_id}_toolbar_1').show();\n\t$('{$editor_id}_toolbar_2').show();\n\t// Rikki: Had to remove <form>... </form> because Opera would see </form> and not pass the topic icons / hidden fields properly. Tried \"</\" + \"form>\" but when it is parsed, it had the same affect\n\tipb.editor_values.get('templates')['link'] = new Template(\"<label for='#{id}_url'>{$this->lang->words['js_template_url']}</label><input type='text' class='input_text' id='#{id}_url' value='http://' tabindex='10' /><label for='#{id}_urltext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_urltext' value='{$this->lang->words['js_template_default']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_link']}' tabindex='12' />\");\n\n\tipb.editor_values.get('templates')['image'] = new Template(\"<label for='#{id}_img'>{$this->lang->words['js_template_imageurl']}</label><input type='text' class='input_text' id='#{id}_img' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_img']}' tabindex='11' />\");\n\n\tipb.editor_values.get('templates')['email'] = new Template(\"<label for='#{id}_email'>{$this->lang->words['js_template_email_url']}</label><input type='text' class='input_text' id='#{id}_email' tabindex='10' /><label for='#{id}_emailtext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_emailtext' value='{$this->lang->words['js_template_email_me']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_email']}' tabindex='12' />\");\n\n\tipb.editor_values.get('templates')['media'] = new Template(\"<label for='#{id}_media'>{$this->lang->words['js_template_media_url']}</label><input type='text' class='input_text' id='#{id}_media' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_media']}' tabindex='11' />\");\n\n\tipb.editor_values.get('templates')['generic'] = new Template(\"<div class='rte_title'>#{title}</div><strong>{$this->lang->words['js_template_example']}</strong><pre>#{example}</pre><label for='#{id}_option' class='optional'>#{option_text}</label><input type='text' class='input_text optional' id='#{id}_option' tabindex='10' /><label for='#{id}_text' class='tagcontent'>#{value_text}</label><input type='text' class='input_text _select tagcontent' id='#{id}_text' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_add']}' tabindex='12' />\");\n\n\tipb.editor_values.get('templates')['toolbar'] = new Template(\"<ul id='#{id}_toolbar_#{toolbarid}' class='toolbar' style='display: none'>#{content}</ul>\");\n\n\tipb.editor_values.get('templates')['button'] = new Template(\"<li><span id='#{id}_cmd_custom_#{cmd}' class='rte_control rte_button specialitem' title='#{title}'><img src='{$this->settings['img_url']}/rte_icons/#{img}' alt='{$this->lang->words['icon']}' /></span></li>\");\n\n\tipb.editor_values.get('templates')['menu_item'] = new Template(\"<li id='#{id}_cmd_custom_#{cmd}' class='specialitem clickable'>#{title}</li>\");\n\n\tipb.editor_values.get('templates')['togglesource'] = new Template(\"<fieldset id='#{id}_ts_controls' class='submit' style='text-align: left'><input type='button' class='input_submit' value='{$this->lang->words['js_template_update']}' id='#{id}_ts_update' />&nbsp;&nbsp;&nbsp; <a href='#' id='#{id}_ts_cancel' class='cancel'>{$this->lang->words['js_template_cancel_source']}</a></fieldset>\");\n\n\tipb.editor_values.get('templates')['emoticons_showall'] = new Template(\"<input class='input_submit emoticons' type='button' id='#{id}_all_emoticons' value='{$this->lang->words['show_all_emoticons']}' />\");\n\n\tipb.editor_values.get('templates')['emoticon_wrapper'] = new Template(\"<h4><span>{$this->lang->words['emoticons_template_title']}</span></h4><div id='#{id}_emoticon_holder' class='emoticon_holder'></div>\");\n\n\t// Add smilies into the mix\n\tipb.editor_values.set( 'show_emoticon_link', true );\n\tipb.editor_values.set( 'emoticons', \\$H({ $smilies }) );\n\tipb.editor_values.set( 'bbcodes', \\$H( $bbcodes ) );\n\n\tipb.vars['emoticon_url'] = \"{$this->settings['emoticons_url']}\";\n\n\tEvent.observe(window, 'load', function(e){\n\t\tipb.editors[ '{$editor_id}' ] = new ipb.editor( '{$editor_id}', USE_RTE );\n\t});\n\n\t//]]>\n\t</script>\n\nEOF;\n//--endhtml--//\nreturn $IPBHTML;\n}", "title": "" }, { "docid": "453746ba832ca3496440c5234e5d4e74", "score": "0.47748196", "text": "function wp_ozh_yourls_customicon($in) {\n\treturn WP_PLUGIN_URL.'/'.plugin_basename(dirname(dirname(__FILE__))).'/res/icon.gif';\n}", "title": "" }, { "docid": "2d44e8c2d0c382aac3ce43615b41f564", "score": "0.47730744", "text": "function help_button_vml($library, $helpitem, $title) {\n global $OUTPUT;\n\n // WAFA: help icon no longer take links.\n return '';\n}", "title": "" }, { "docid": "e5799f994a6ade2ad291825f27d7808a", "score": "0.47687933", "text": "public function setIcon($icon, $inner = null)\n {\n $this->icon = Icon::factory($icon);\n return $this;\n }", "title": "" }, { "docid": "4617d5c8c8d664e634b0e0ca3b8b78a2", "score": "0.4767155", "text": "function showCommentIcon($approver, $approver_name, $request_id) {\n\t$html=\"<a href=\\\"comments.php?eid=$approver&request_id=$request_id&type=private\\\" title=\\\"Send private message to $approver_name\\\" onmouseover=\\\"return overlib('Send private message to $approver_name', TEXTPADDING, 10, WIDTH, 300, WRAPMAX, 300, AUTOSTATUS, BGCOLOR, '#E68B2C', CGCOLOR, '#E68B2C', FGCOLOR, '#FFFF99');\\\" onmouseout=\\\"nd();\\\" rel=\\\"gb_page_center[675,325]\\\"><img src=\\\"../images/comments.gif\\\" width=\\\"19\\\" height=\\\"16\\\" border=\\\"0\\\" align=\\\"absmiddle\\\"></a>\";\n\t\n\treturn $html;\n}", "title": "" }, { "docid": "b7fbfaf216a59538c2c71a5d97187eea", "score": "0.47612616", "text": "function StampaMessaggio($messaggio,$errore,$icona) {\r\n if($errore!=0){\r\n print \"<div id=\\\"stampamessaggio\\\">\\n\";\r\n print \"<table class=\\\"tabellamessaggi\\\">\\n<tr>\\n<th class=\\\"testo\\\">\\n\";\r\n \r\n switch ($icona) {\r\n case 1:\r\n print \"<img src=\\\"./Immagini/check.png\\\" alt=\\\"\\\" width=\\\"35\\\" height=\\\"30\\\" /></th>\\n\";\r\n break;\r\n \r\n case 2:\r\n print \"<img src=\\\"./Immagini/cross.png\\\" alt=\\\"\\\" width=\\\"35\\\" height=\\\"30\\\" /></th>\\n\";\r\n break;\r\n }\r\n \r\n print \"<th class=\\\"testomessaggio\\\">\".$messaggio.\"</th>\\n\";\r\n print \"<th class=\\\"testo\\\"><input type=\\\"button\\\" name=\\\"chiudimessaggio\\\" id=\\\"ChiudiMessaggio\\\" value=\\\"ok\\\" onClick=\\\"ChiudiMessaggio();\\\" /></th>\\n\";\r\n print \"</tr>\\n</table>\\n\"; \r\n print \"</div>\\n\";\r\n }\r\n return;\r\n}", "title": "" }, { "docid": "b5ff589574e1c079bde26293958a2bcb", "score": "0.47578004", "text": "function change_admin_icon($args){\r\n$args['menu_icon'] = 'dashicons-format-aside';\r\nreturn $args;\r\n}", "title": "" } ]
9fa10a571a5a34bdf9c2dc1ff25ae87f
Fetch a user with a specific id
[ { "docid": "b4fff75a5bb242f0ee1d5e09f325d1f4", "score": "0.0", "text": "public function getById($id){\n if (is_numeric($id)){\n $this->load(array(\"id=?\", $id));\n $query = $this->query;\n return $query[0];\n }\n }", "title": "" } ]
[ { "docid": "33722c71735ca4203941c548460e92cc", "score": "0.83090204", "text": "public function getUserById($id){\n return $this->findOne('user.id = :id', ['id' => $id]);\n }", "title": "" }, { "docid": "c1efac738910a5c8c898db1522c1ed65", "score": "0.82194513", "text": "public function get_user($id) {\n \n }", "title": "" }, { "docid": "0fd932428e097267ae065f466db3d9eb", "score": "0.8079803", "text": "public function getUser($id);", "title": "" }, { "docid": "3ff5f137f9df84880986ece84ef40d97", "score": "0.80394745", "text": "public function getUserById($id)\n {\n return $this->user->where('id',$id)->get()->first();\n }", "title": "" }, { "docid": "04ba9f04a3e4368f1386c0c2b29bbaa2", "score": "0.78665566", "text": "public function getUser($id)\n {\n return $this->createQueryBuilder('u')\n ->where('u.id = :id')\n ->setParameter('id', $id)\n ->getQuery()\n ->getOneOrNullResult();\n }", "title": "" }, { "docid": "2e562368a180ed309eaae3d0aa66893d", "score": "0.7781826", "text": "public function getUserById($id)\n {\n $id = (int)$id;\n $data = $this->DBManager->findOne(\"SELECT * FROM user WHERE id = \".$id);\n return $data;\n }", "title": "" }, { "docid": "24bab699b114c584f23213cf57433477", "score": "0.7776607", "text": "public function findUserById($id){\r\n return $this->model->find()\r\n ->where(['id' => $id])\r\n ->one();\r\n }", "title": "" }, { "docid": "0be796da6899a170f102d2f4c14fc76c", "score": "0.7773597", "text": "public function getUser($id) {\n return User::fetch($id);\n }", "title": "" }, { "docid": "089a88c787348d8432775cc24ddd804d", "score": "0.7716298", "text": "public function getUserById($id)\n {\n return $this->userRepository->find($id);\n }", "title": "" }, { "docid": "02259f26784c3f8c84f57d42fec9a838", "score": "0.7715272", "text": "public function getUserById($id) {\n\t\t$oQB = $this->createQueryBuilder('U');\n\t\t$oQB->select()\n\t\t\t->where($oQB->expr()->eq('U.id', ':id'))\n\t\t\t->setParameter(':id', $id);\n\t\t\n\t\t$aResult = $oQB->getQuery()->getOneOrNullResult();\n\t\t\n\t\treturn $aResult;\n\t}", "title": "" }, { "docid": "1e91dd2a2e0a56caeed9d070313d1545", "score": "0.7695071", "text": "function getuserById($id_user);", "title": "" }, { "docid": "c92f8f79b5dd635e1daf4cedd4027854", "score": "0.7690148", "text": "public function loadUserById($id);", "title": "" }, { "docid": "927431be75c14881fe290b285f1a1fd3", "score": "0.76509583", "text": "function getUserById($id)\n {\n $query = $this->db->prepare('SELECT * FROM usuario WHERE id = ?');\n $query->execute([$id]);\n\n //Obtengo la respuesta con un fetch\n return $query->fetch(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "207f1344c1218c94b22689e1af8f627b", "score": "0.7637179", "text": "function getUser($id)\n {\n\n $q = $this->getDb()->prepare('SELECT * FROM users WHERE id = :id');\n $q->execute(Array('id'=> $id));\n $User = $q->fetch();\n return $User;\n }", "title": "" }, { "docid": "b83a5360d51dbf6867783cda7e5a0ff6", "score": "0.76323485", "text": "public static function getUserById($id) {\n if ($id) {\n $sql = \"SELECT * FROM user WHERE id = :id\";\n\n $result = $GLOBALS['db']->prepare($sql);\n $result->bindParam(':id', $id, \\PDO::PARAM_INT);\n $result->setFetchMode(\\PDO::FETCH_ASSOC);\n $result->execute();\n\n return $result->fetch();\n }\n\n }", "title": "" }, { "docid": "1eca2fcb4ebaa7aa7c08f53e6fc2b611", "score": "0.76312953", "text": "public function getUserById($id)\n\t{\n\t\treturn $this->getUser()->getUserById($id);\n\t}", "title": "" }, { "docid": "93a0ef3c0af48cff8900aa9e3ee7e4a7", "score": "0.76268154", "text": "public function userById_get(){\n\n $id = $this->get('id');\n $result = $this->user_model->getUserById( $id );\n\n if($result){\n\n $this->response($result, 200); \n exit;\n\n }\n }", "title": "" }, { "docid": "67ce2f9717f75e82fabc1a5018981a8e", "score": "0.7620897", "text": "public function getUser($id) {\n\n $query = 'SELECT * FROM `user` WHERE `u_id`=:id';\n\n return $this->query(\n $query, \n array(\n 'id' => array(\n 'VAL' => $id,\n 'TYPE' => PDO::PARAM_STR\n )\n )\n );\n \n }", "title": "" }, { "docid": "3dcf0971c6da025dd4e7a07e17c95e87", "score": "0.7617579", "text": "public function getById($id) {\r\n $sql = \"SELECT * FROM user where id=?\";\r\n $args = func_get_args();\r\n $stmt = parent::execPreppedStmt($sql, $args);\r\n $result = $stmt->fetch();\r\n if ($result) {\r\n $user = new User($result['id'], $result['email'], $result['pw'], $result['naam'],$result['salt']);\r\n }\r\n return $user;\r\n }", "title": "" }, { "docid": "abe723b744bc34b7f17d1bbf2d669d53", "score": "0.7610049", "text": "public static function getUserById($id)\n {\n if($id){\n $db = Db::getConnection();\n $sql=\"SELECT * FROM user WHERE id = :id\";\n \n $result = $db->prepare($sql);\n $result->bindParam(\":id\", $id,PDO::PARAM_INT);\n \n $result->setFetchMode(PDO::FETCH_ASSOC);\n $result->execute();\n \n return $result->fetch();\n }\n }", "title": "" }, { "docid": "09a267cd79f54a888e4e88fbeea23cdc", "score": "0.7599106", "text": "public function get(int $id): User;", "title": "" }, { "docid": "bd29738812a8dc8f6b4a2e27e199b4f7", "score": "0.75971884", "text": "public function get_user_by_id( $id )\n {\n //check id validity\n if( !$this->checkId( $id ) )\n return \"Err get user by id: id is not valid\";\n\n //create a new Instance from UserFullDataMapper\n $MapperInstance = new M\\UserFullDataMapper( $this->dataBase );\n\n // create an array for user id\n $condition = array( 'UserId' => $id );\n\n // prepare input field fro find the user by it's Id\n $condition = $this->prepareCondition( $condition );\n //find and return user\n return $MapperInstance->find( $condition );\n\n\n }", "title": "" }, { "docid": "e8094ebcf4c47e722c0f4d63580acb1c", "score": "0.7596402", "text": "public function getUser($id)\n {\n return Resource\\User::find($id);\n }", "title": "" }, { "docid": "93caaaa92b7a2ddac50135ecaae5cb48", "score": "0.75962436", "text": "public function findUserById($id)\n\t{\n\t\treturn $this->findUser(['id' => $id])->one();\n\t}", "title": "" }, { "docid": "02844cb634bdac6bb58910d5df871458", "score": "0.7584032", "text": "public function find($id) {\n return $this->user->find($id);\n }", "title": "" }, { "docid": "63b53bed7576a2e13a3153401f012b10", "score": "0.7573555", "text": "public function get($id) {\n $db = new DB();\n $result = $db->select('User', \"*\", \"user_id = $id\");\n return new User($result);\n }", "title": "" }, { "docid": "78a1f2b0aee7d737aadad319a0cd9a34", "score": "0.7559873", "text": "public function retrieve($id)\n\t{\n\t\tif(!is_null($id))\n\t\t{\n\t\t\treturn User::find($id);\n\t\t}\n\t}", "title": "" }, { "docid": "ab491b54932719a318168b6678cf34c9", "score": "0.75584704", "text": "static function getUser(int $id) : User {\n \n $singleSelect = \"SELECT * FROM User WHERE UserID = :id\";\n\n //Prepare the query\n self::$db->query($singleSelect);\n\n //Set the bind parameters\n self::$db->bind(':id', $id);\n\n //Execute the query\n self::$db->execute();\n\n //Get the row\n return self::$db->singleResult();\n\n }", "title": "" }, { "docid": "92828dab1bce513126166164e5d19ba6", "score": "0.7556144", "text": "public function getUserById($id) {\n\t\t\t$sql = \"SELECT * FROM users WHERE id = $id\";\n\t\t\t$query = $this->conn->query($sql) or die(\"Error Occurred... \".$this->conn->error);\n\t\t\tif ($query->num_rows == 1) {\n\t\t\t\t$result = $query->fetch_assoc();\n\t\t\t}\n\t\t\treturn $result;\n\n\t\t}", "title": "" }, { "docid": "1b73eba06460afb5dfd0ace28f9d6c69", "score": "0.75519323", "text": "public function findById($id)\n {\n return $this->em->getRepository(User::getClassName())->findOneBy(array('id' => $id));\n }", "title": "" }, { "docid": "f95282477eaaae240369473131e38f9c", "score": "0.75420535", "text": "public function read($id) {\n return User::find($id);\n }", "title": "" }, { "docid": "9eee14adbc74e6596152b0713a4d434f", "score": "0.75394076", "text": "public function getUserById($id)\n {\n $id = (int) $id;\n return $this->getDbTable('user')->getUserById($id);\n }", "title": "" }, { "docid": "ebed8bed8f82c83dc932694a7ab1d2fc", "score": "0.7536156", "text": "public function findUserById($id)\n {\n return $this->findUser(['id' => $id])->one();\n }", "title": "" }, { "docid": "ebed8bed8f82c83dc932694a7ab1d2fc", "score": "0.7536156", "text": "public function findUserById($id)\n {\n return $this->findUser(['id' => $id])->one();\n }", "title": "" }, { "docid": "8081e2bc29879a236e1d18b0c1fc65f1", "score": "0.7526184", "text": "public function findByUser($id) {\n\t\t$sql = \"SELECT * FROM *PREFIX*\".self::$table.\" WHERE lower(user_id) = lower(?)\";\n\t\treturn $this->findEntity($sql, [$id]);\n\t}", "title": "" }, { "docid": "e9fbc5c9937cb51bb64400ece0a81eff", "score": "0.752114", "text": "public function get($id): User\n {\n }", "title": "" }, { "docid": "eb29360ac4a0bf0b68da1356a749dc6b", "score": "0.75188315", "text": "public function getUserById($id)\n {\n $bdd = new Database('localhost','3306', 'glsi_blog', 'root', '');\n $bdd->connect();\n $id = (int) $id;\n\n $request = $bdd->query('SELECT * FROM User WHERE id = \"'.$id.'\"');\n $data = $request->fetch(PDO::FETCH_ASSOC);\n\n $user = ($data === false) ? null : ($data);\n return $user;\n }", "title": "" }, { "docid": "a78d9ffaa0e67c73d2f85c3818afecae", "score": "0.7515265", "text": "public function getUserById($id)\n {\n $id = (int) $id;\n return $this->getResource('User')->getUserById($id);\n }", "title": "" }, { "docid": "fe9aa57d1455613d6c16a61390f59552", "score": "0.7509085", "text": "private function fetch_user($id)\n {\n $user = DB::table('role_user')\n ->where('role_user.user_id', '=', $id)\n ->left_join('users', 'role_user.user_id', '=', 'users.id')\n ->left_join('roles', 'role_user.role_id', '=', 'roles.id')\n ->take(1)\n ->get(array(\n 'roles.id as role',\n 'users.username',\n 'users.name',\n 'users.email'));\n\n return ($user !== null) ? $user : null;\n }", "title": "" }, { "docid": "ed8a790714243e5aa4365ab120d745fa", "score": "0.7496421", "text": "public function get_user($id)\n\t{\n\t\t$que = $this->db->get_where($this->table, array('id' => $id));\n\t\t$user = $que->row();\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "231a92461ea0609f1ff673dc40154841", "score": "0.74870217", "text": "public function find($id)\n {\n return $this->user->find($id);\n }", "title": "" }, { "docid": "777156d7668e110108f619d53e81d617", "score": "0.7474807", "text": "public function getuserbyid($id){\n\t\t\t$user = User::find($id);\n\t\t\treturn response()->json(['data'=>$user]);\n\t\t}", "title": "" }, { "docid": "a5bd689bd165cf6d1977b7da0c4f71b0", "score": "0.7463516", "text": "public static function findUser($id)\n \n {\n $db = Db::getConnection();\n $sql = \"SELECT * FROM users WHERE id=:id\";\n \n try {\n \n $result = $db->prepare($sql);\n $result->bindValue(\":id\", $id);\n $result->execute();\n \n $user = $result->fetch(PDO::FETCH_ASSOC);\n \n return $user;\n \n } catch(PDOException $e){\n echo $sql.\"<br>\".$e->getMessage();\n \n }\n \n \n }", "title": "" }, { "docid": "fb43c44aa685757b8f7283283a94ba36", "score": "0.7461549", "text": "function get_user($id)\n\t{\n\t\treturn get_instance()->kbcore->users->get($id);\n\t}", "title": "" }, { "docid": "2dd83febb84eb5781f66ea04001c2ad9", "score": "0.74593496", "text": "public function getUserById($id){\n $this->db->query(\"SELECT * FROM accounts WHERE id = :id\");\n\n $this->db->bind(':id', $id);\n \n $row = $this->db->single();\n\n return $row;\n }", "title": "" }, { "docid": "5be92b693ebb90653e1753d749d94a4e", "score": "0.7445391", "text": "public function find($id) {\n return User::find($id);\n }", "title": "" }, { "docid": "381f55b5d7d7d04f12aa24850d261180", "score": "0.7444416", "text": "function getUser($id){\n\t\t\t$str_query=\"SELECT * FROM cuisine_user WHERE user_id='$id'\";\n\t\t\treturn $this->query($str_query);\n\t\t}", "title": "" }, { "docid": "44512493a9d6b11d5a0db40abdc8136c", "score": "0.7441306", "text": "public function getUserById($id){\n\t\t\t$this->db->query('SELECT * FROM users WHERE id = :id');\n\t\t\t$this->db->bind(':id', $id);\n\t\t\t$row = $this->db->single();\n\t\t\treturn $row;\n\t\t}", "title": "" }, { "docid": "9fd260c0ea21616a93286672d897c3a9", "score": "0.74348086", "text": "public function getUserById($id)\n {\n return User::with('profile')->whereId($id)->firstOrFail();\n }", "title": "" }, { "docid": "7f08bdd1a2393ebb5c4f2f4a70008f1f", "score": "0.742527", "text": "public function get($id)\n {\n return $this->where('user_id = ?', $id)->fetch($this->table);\n }", "title": "" }, { "docid": "88f8c400c973a5f621576320727647fa", "score": "0.74252", "text": "public function getUser($id) {\n //sql to return user object\n\n $sql = \"select * from user where user_id=\" . '\"' . $id . '\"';\n $result = mysqli_query($this->plink, $sql);\n\n\n $count = mysqli_num_rows($result);\n $row = mysqli_fetch_assoc($result);\n $user = new User();\n if ($count == 1) {\n $user = $this->user($row);\n }\n return $user;\n }", "title": "" }, { "docid": "b4c39a16e3521b559780fc17c40774c6", "score": "0.7424248", "text": "function user_get($id = null){\n\n $id = (int) $this->get('id',TRUE);\n\t\t $response = [\n 'status' => Rest_data::HTTP_FORBIDDEN,\n 'message' => 'Forbidden',\n ];\n $data = ($id) ? $this->user->select_user_id($id) : $this->user->select_user();\n\t\tif ($data) { \n $this->response($data, Rest_data::HTTP_OK); \n return;\n\t\t}\n\t\t$this->response($response, Rest_data::HTTP_FORBIDDEN);\n\n\t }", "title": "" }, { "docid": "9a0f640ed53f138275defcf1727115b8", "score": "0.7420277", "text": "public function user_get($id = 0) {\n\t\t//otherwise single row will be returned\n\t\t$users = $this->user->getRows($id);\n\t\t\n\t\t//check if the user data exists\n\t\tif(!empty($users)){\n\t\t\t//set the response and exit\n\t\t\t//OK (200) being the HTTP response code\n\t\t\t$this->response($users, REST_Controller::HTTP_OK);\n\t\t}else{\n\t\t\t//set the response and exit\n\t\t\t//NOT_FOUND (404) being the HTTP response code\n\t\t\t$this->response([\n\t\t\t\t'status' => FALSE,\n\t\t\t\t'message' => 'No user were found.'\n\t\t\t], REST_Controller::HTTP_NOT_FOUND);\n\t\t}\n\t}", "title": "" }, { "docid": "b8d6fcf0e804eea90afbf96e442d4882", "score": "0.74049014", "text": "public function getUserById(int $id) {\n $stmt = $this->database->connect()->prepare(\n 'SELECT u.id, u.id_users_details, u.email, u.password, ru.name as role FROM users u \n LEFT JOIN (SELECT ur.id_users, r.name FROM roles r RIGHT JOIN users_roles ur ON r.id = ur.id_roles) ru ON u.id = ru.id_users \n WHERE u.id = :id'\n );\n $stmt->bindParam(':id', $id, PDO::PARAM_INT);\n $stmt->execute();\n $user = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if ($user === false) {\n return null;\n }\n\n return new User(\n $user['email'],\n $user['role'],\n $user['password']\n );\n }", "title": "" }, { "docid": "8f3a2bc64ff44038dc13091440729de6", "score": "0.7399047", "text": "public function getUser( $id ){\n $user = new UserModel();\n return $user->getById( $id );\n }", "title": "" }, { "docid": "7eb368195227fa00fbbd3886467e9d14", "score": "0.73986745", "text": "public function user_get($id = 0) {\n //otherwise single row will be returned\n $triva = $this->TrivaModel->getRows($id);\n \n //check if the user data exists\n if(!empty($triva)){\n //set the response and exit\n $this->response($triva, 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": "8b3b7ef1c89b206499430fe6640b398b", "score": "0.7392657", "text": "public function getUser($id)\n {\n $stmt = $this->select('*', \"id=$id\");\n $user = $stmt->fetch(\\PDO::FETCH_OBJ);\n $stmt->closeCursor();\n return $user;\n }", "title": "" }, { "docid": "b6dd1e6865f1e013e703973c09b8c78c", "score": "0.73905635", "text": "public function getById($id): User;", "title": "" }, { "docid": "465a7dd510a730ff7ab2ce142b1bff2b", "score": "0.7380117", "text": "public function find($id)\n {\n return User::find($id);\n }", "title": "" }, { "docid": "465a7dd510a730ff7ab2ce142b1bff2b", "score": "0.7380117", "text": "public function find($id)\n {\n return User::find($id);\n }", "title": "" }, { "docid": "abb0c8d25577b059b63d0915c9088c01", "score": "0.7379712", "text": "public function find($id)\n\t{\n\t\treturn User::find($id);\n\t}", "title": "" }, { "docid": "e10d4ed695bbaa8f04bd8154e5433fdc", "score": "0.7374666", "text": "public function getUserById($id){\n $this->db->query('SELECT * FROM users WHERE id = :id');\n // Bind values\n $this->db->bind(':id', $id);\n\n $row = $this->db->single();\n\n return $row;\n }", "title": "" }, { "docid": "9b0eba26ae6b2973ae8dccbd52c72b75", "score": "0.73658687", "text": "public function getUserByUserId($id)\n {\n return User::with('profile')->whereid($id)->firstOrFail();\n }", "title": "" }, { "docid": "c5cd3d78b9ff0c9c18bbc5aeebc58630", "score": "0.7365825", "text": "public static function get_user(int $id)\n {\n return TableRegistry::get('users')\n ->find('all')\n ->where([\n 'users.user_id' => $id\n ])\n ->first();\n }", "title": "" }, { "docid": "d3be29421233a4ad3598a86faf2436fb", "score": "0.7365537", "text": "static function getUserById($id){\r\n $connection = User::getConnection();\r\n $query = $connection->prepare('\r\n SELECT id, username\r\n FROM user\r\n WHERE id = :id\r\n LIMIT 1\r\n ');\r\n $query->bindValue(':id', $id, PDO::PARAM_INT);\r\n $query->execute();\r\n $result = $query->fetch(PDO::FETCH_ASSOC);\r\n if ($result) {\r\n return new User($result['id'], $result['username']);\r\n } else {\r\n return NULL;\r\n }\r\n }", "title": "" }, { "docid": "0141dd339017648428ba408582504eca", "score": "0.7346947", "text": "function get_user_by_id($id) {\r\n\t\t$this->db->where('user_id', $id);\r\n\t\t$query = $this->db->get('user');\r\n\t\treturn $query->result();\r\n\t}", "title": "" }, { "docid": "60247ba0b17ae012a14678ff58d5bad7", "score": "0.73363674", "text": "public function get($id)\n\t{\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tid,\n\t\t\t\tnick_name AS nickName,\n\t\t\t\tfirst_name AS firstName,\n\t\t\t\tlast_name AS lastName,\n\t\t\t\temail_address AS emailAddress,\n\t\t\t\tis_admin AS isAdmin,\n\t\t\t\tcreated_at AS created_at,\n\t\t\t\tsalt,\n\t\t\t\tpassword\n\t\t\tFROM user\n\t\t\tWHERE id = :id\n\t\t\";\n\n\t\t$stmt = $this->conn->prepare($sql);\n\t\t$stmt->bindValue(':id', $id);\n\t\t$result = $stmt->execute();\n\t\tif (!$result) {\n\t\t\tthrow new Database('Database error', 500);\n\t\t}\n\n\t\treturn $stmt->fetchObject('\\Lcvs\\Entity\\User');\n\t}", "title": "" }, { "docid": "24eddd58d29fd1343ad72c75ed161553", "score": "0.7336306", "text": "public function get_user($id = null) {\n if (is_null($id)) {\n return $this->user;\n }\n else {\n list($user) = $this->user_instance->get([\n 'id' => $id,\n ]);\n\n return $user;\n }\n }", "title": "" }, { "docid": "62b0574036c015b59dee0b5618c9e26d", "score": "0.7319468", "text": "public function getUser($id)\n {\n try {\n $connection = $this->openDb();\n $dbId = $connection->real_escape_string($id);\n\n $dbresult = $connection->query(\"SELECT * FROM users WHERE id=$dbId\");\n\n $result = mysqli_fetch_object($dbresult);\n\n $this->closeDb($connection);\n\n return $result;\n } catch (Exception $e) {\n $this->showError(\"Get user error\", $e->getMessage());\n }\n }", "title": "" }, { "docid": "4ebd62edcfb3d0308ac09b54b92337f5", "score": "0.7304723", "text": "function getUser($id){\n $user = User::findOrFail($id);\n return $user;\n }", "title": "" }, { "docid": "ba143582b2219061f9cc0e06fb7d57c0", "score": "0.7296929", "text": "function getUserById($id){\r\n\t\tglobal $db;\r\n\t\t$query = \"SELECT * FROM usuarios 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": "c604ed19f248800bbdabc29ce9486e89", "score": "0.729604", "text": "public function findByUser($id) {\n\t\treturn $this->mapper->findByUser($id);\n\t}", "title": "" }, { "docid": "78720e0baae52bd4e22d25ed81fbf755", "score": "0.7290614", "text": "function getUserById($id){\n\t\tglobal $db;\n\t\t$query = \"SELECT * FROM users WHERE id=\" . $id;\n\t\t$result = mysqli_query($db, $query);\n\n\t\t$user = mysqli_fetch_assoc($result);\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "1adf3cbfd98b34e34cd56e744a3b4954", "score": "0.72860086", "text": "public function get_user_by_id($id)\n {\n $user = $this->db->get_where('users', array(\n 'id' => $id\n ))->row();\n return $user;\n }", "title": "" }, { "docid": "64a4f69b326997b5a9480f410bfeaca0", "score": "0.7278916", "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": "0de0109229f02465100e411ff7e1526d", "score": "0.72783446", "text": "public static function getUserById( $id ) {\n $db = init_db();\n $req = $db->prepare( \"SELECT * FROM user WHERE id = ?\" );\n $req->execute( array( $id ));\n $db = null;\n return $req->fetch();\n }", "title": "" }, { "docid": "e66c4fbc63bc7fc5be23572247b80a4d", "score": "0.72647053", "text": "public function getOneRest($id)\n {\n $user = $this\n ->createQueryBuilder('u')\n ->andWhere('u.id = :id')\n ->setParameters(array('id' => $id))\n ->getQuery()\n ->getOneOrNullResult()\n ;\n \n return $user;\n }", "title": "" }, { "docid": "e0f2a0bcd3417ef5821d1d696578b590", "score": "0.7262169", "text": "public function show(int $id)\n {\n return $this->em->getRepository(User::class)->findOneBy(['id' => $id]);\n }", "title": "" }, { "docid": "2c29427aff7d88bc89a96c11a2c639a8", "score": "0.72616726", "text": "public function getuserbyid($id)\n {\n $users = DB::table('users')->where('id' , $id )->get();\n if (count($users) == 0 )\n {\n return response()->json([\n 'message' => \"No user found with this id-$id\"\n ]);\n }\n\n return response()->json([\n \"id\" => $users[0]->id,\n \"First_Name\" => $users[0]->First_Name,\n \"Last_Name\" => $users[0]->Last_Name\n ]);\n\n\n }", "title": "" }, { "docid": "3be854e479cd250a36de5526c6924fa9", "score": "0.7261393", "text": "public function read($id) : User\n {\n }", "title": "" }, { "docid": "31ff9d05b5466b8ef1beb5eea4811362", "score": "0.7255625", "text": "function userGet($id)\n {\n }", "title": "" }, { "docid": "247dfb67fb332bf71666e968cd00180e", "score": "0.72532296", "text": "public function getUser($id)\n {\n global $db;\n $req = $db->prepare('\n SELECT *\n FROM user\n WHERE id = ?');\n $result = $req->execute(array($id));\n $user = $req->fetch();\n $req->closeCursor();\n return $user;\n }", "title": "" }, { "docid": "e2d266386a9f2f977d0a58cba8a2664a", "score": "0.72509485", "text": "function get_user_by_id($id) {\n global $db;\n $sql = 'SELECT * FROM users WHERE userID = :id';\n try {\n\t $stmt = $db->prepare($sql);\n\t $stmt->bindValue(':id', $id);\n\t $stmt->execute();\n\t $user = $stmt->fetch();\n\t $stmt->closeCursor();\n\t return $user;\n } catch (PDOException $e) {\n display_error('Database error.');\n \tdie($e->getMessage());\n }\n}", "title": "" }, { "docid": "9cf9ffa24d2307972bf23f28b3311b43", "score": "0.7239511", "text": "public function getUser($id = 0) {\n $response = (is_numeric($id) && intval($id) != 0) ? $this->user->find($id) : $this->user->all();\n return response()->json($response);\n }", "title": "" }, { "docid": "edd9d6d1e393627ff0df1c7fae25838a", "score": "0.7234439", "text": "function getUser($id)\n {\n // Simple check\n if (empty($id)) {\n return null;\n }\n\n if ($user = $this->limpid->users->get($id))\n return $user;\n\n return null;\n }", "title": "" }, { "docid": "ca1639dd0995cbeb0865e841dbe88c04", "score": "0.72341394", "text": "public function getUser($id)\n\t\t{\n\t\t\treturn getRupaUser($id);\n\t\t}", "title": "" }, { "docid": "c508563ee654602006dab1a97f1bafc2", "score": "0.72174025", "text": "public function getById($id)\n {\n return User::where('idusuario', $id)->firstOrFail();\n }", "title": "" }, { "docid": "7b69450f6bfc8fb28d65ff66be549bfc", "score": "0.72139394", "text": "function getSingleUser($id){\n\t$res = getSingleUserDB($id);\n\treturn $res;\n}", "title": "" }, { "docid": "a33eb9d0c88ef2134f0b65ab06a197c9", "score": "0.72135884", "text": "public function getOneUserById($id) {\n $this->where('id', $id);\n return $this->get('users');\n }", "title": "" }, { "docid": "d46b20bf5ab559ca0fb14998d5da9872", "score": "0.721245", "text": "public function getUser($id)\n {\n # code...\n $users = $this->getUsers(\"WHERE `id`=$id\");\n if($users && count($users)>0)\n return $users[0];\n\n return null; \n \n\n }", "title": "" }, { "docid": "a7ff4293be49f467f511e01bed25d336", "score": "0.7212229", "text": "public function get_user_by_id($id)\r\n\t{\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('users');\r\n\t\t$this->db->where('id',$id);\r\n $query = $this->db->get();\r\n return $query->row();\r\n\t}", "title": "" }, { "docid": "0e88c14aef5aa27173db9bf1f7d3574e", "score": "0.7205092", "text": "public function byUser($id);", "title": "" }, { "docid": "bdc40dadd897bf540f279d74198fda03", "score": "0.71893376", "text": "public function getUser($id) {\n if(!is_int($id))\n throw new \\InvalidArgumentException('First parameter must be integer');\n\n $url = sprintf(\n '%s/api/v3/users/%d?private_token=%s',\n\n $this->getClient()->getApiUrl(),\n $id,\n urlencode($this->getClient()->getToken())\n );\n\n return $this->getRequest($url);\n }", "title": "" }, { "docid": "c58e2bd56aefcffaedd0b1406308132b", "score": "0.7186792", "text": "public static function selectUserById($id)\n {\n $user = DB::table('users')->whereId($id)->first();\n return $user;\n }", "title": "" }, { "docid": "9a0788a48bcd6b2691c0228a5b476c9f", "score": "0.71852535", "text": "public function show($id)\n {\n return $user=User::find($id);\n }", "title": "" }, { "docid": "4d2c858836f632ac03c7f7e1b98133f0", "score": "0.71803385", "text": "public function inspect_user($id) {\n return get_request($awoochi_endpoint + '/users/' + $id);\n }", "title": "" }, { "docid": "6d9a39123a698ba7e0943899eed3a304", "score": "0.7178506", "text": "public function getById(int $id) : UserInterface;", "title": "" }, { "docid": "faadc263d0a55a6b25deaf0eefce9c9a", "score": "0.717525", "text": "public function show($id)\n {\n return User::find($id);\n }", "title": "" }, { "docid": "faadc263d0a55a6b25deaf0eefce9c9a", "score": "0.717525", "text": "public function show($id)\n {\n return User::find($id);\n }", "title": "" }, { "docid": "faadc263d0a55a6b25deaf0eefce9c9a", "score": "0.717525", "text": "public function show($id)\n {\n return User::find($id);\n }", "title": "" }, { "docid": "faadc263d0a55a6b25deaf0eefce9c9a", "score": "0.717525", "text": "public function show($id)\n {\n return User::find($id);\n }", "title": "" } ]
06b048169d6000dd8f2954c77b1ec598
Show the form for creating a new resource.
[ { "docid": "a7805173b898ec5acd2ff5f3e3d86e5c", "score": "0.0", "text": "public function create()\n {\n $docente = new Docente();\n return view('admin.docentes.crear_editar', compact('docente'));\n }", "title": "" } ]
[ { "docid": "342bff56b62a745961c012a3ac82c12a", "score": "0.78761816", "text": "public function create()\n {\n return view('admin.resource.add');\n }", "title": "" }, { "docid": "0f0380ef896e8b1a4af511fb039fe879", "score": "0.7760756", "text": "public function create()\n\t{\n $config = $this->getFormData();\n $config['submit'] = route('app.resources.create');\n $config['title_name'] = trans('app.adminCreate');\n\n return view('admin.adminForm', $config);\n\t}", "title": "" }, { "docid": "6c38527badbdce8b6b216794aa375cb3", "score": "0.76253194", "text": "public function actionCreate()\n\t{\t\t \n\t\t$this->render('resource_create');\n\t}", "title": "" }, { "docid": "c1a53014b3e8009982c57be36ab41329", "score": "0.75948673", "text": "public function create()\n {\n return $this->showForm('create');\n }", "title": "" }, { "docid": "242a7cb221f0fcd944a681fe88c407cd", "score": "0.758405", "text": "public function create()\n {\n return view('Admin.ourresource.create');\n\n }", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "2bc399e3e37eaad09b15e38f2a68e11a", "score": "0.75727344", "text": "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "title": "" }, { "docid": "6b956805f751faa8511a724099e60375", "score": "0.75421274", "text": "public function create()\n {\n return view('manager.resources.create');\n }", "title": "" }, { "docid": "c22dae1333d29c28ed855dcb7f069232", "score": "0.7491396", "text": "public function create()\n {\n return view('resources.create');\n }", "title": "" }, { "docid": "a5965dde1f081c94296e801e6c603bf5", "score": "0.7453085", "text": "public function create()\n {\n \n $resourceTypes = ResourceTypes::getResourceTypeList();\n return view('admin.resources.create')->with('resourceTypes', $resourceTypes);\n \n }", "title": "" }, { "docid": "242700e7542efa06d08edc5984b0a155", "score": "0.737826", "text": "public function create()\n {\n return view ('form');\n }", "title": "" }, { "docid": "de323787673e065c237bffd0e406bc4a", "score": "0.73594564", "text": "public function create()\n {\n\n return view(\"form\");\n }", "title": "" }, { "docid": "1b16c1f4677bd0ac799e087490d4d05b", "score": "0.73507345", "text": "public function create() {\n return view($this->className . '/form', [\n 'className' => $this->className,\n 'pageTitle' => $this->classNameFormatado . '- Cadastro de registro'\n ]);\n }", "title": "" }, { "docid": "7d107bfef62a964a62e6cab8ee6f69b7", "score": "0.7329499", "text": "public function create() {\n return view('forms::create');\n }", "title": "" }, { "docid": "dd9fd892621ec1d56e7ab98a0de05edb", "score": "0.7309871", "text": "public function create()\n {\n $entity = $this->model;\n\n $relationshipOptions = $this->getModelRelationshipData();\n\n $fields = $this->getFormFields();\n $title = $this->getFormTitle();\n $route = $this->getRoute();\n $bladeLayout = $this->bladeLayout;\n\n return view('crud-forms::create',\n compact(\n 'entity',\n 'fields',\n 'title',\n 'route',\n 'bladeLayout',\n 'relationshipOptions'\n )\n );\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "9814fd9ae63509e6eb41bf23f7a94615", "score": "0.72809595", "text": "public function create()\n {\n return view('forms.create');\n }", "title": "" }, { "docid": "42de9969dbd16cbf3f496acd505422d8", "score": "0.7249422", "text": "public function create()\n {\n // shows a view to create a new resource\n return view('dashboard.admin.create');\n \n }", "title": "" }, { "docid": "82fc0d08b2c5c77ba23e8e4650269a74", "score": "0.7246853", "text": "public function create()\n {\n $this->authorize('create', $this->resource->getModel());\n\n $this->data['data'] = [];\n $this->data['routeUrl'] = route($this->module->getName() . '.store');\n $this->data['attributes'] = $this->resource->getAttributes();\n $this->data['module'] = $this->module;\n\n // $this->data['data'] = factory(\\Quill\\Post\\Models\\Post::class)->make();\n // $this->data['data']['id'] = null;\n // $this->data['data']['published_at'] = \\Carbon\\Carbon::now()->toDateTimeString();\n\n return template('form', $this->data, $this->module->getName());\n }", "title": "" }, { "docid": "443ec0ef783ddb885e44582de73c662e", "score": "0.7235326", "text": "public function create()\n\t{\n $mode = \"create\";\n return $this->showForm('create');\n\t}", "title": "" }, { "docid": "43bb6b172a2f963c4f3b6d2948331c7b", "score": "0.7217289", "text": "public function create()\n {\n return view('createForm');\n }", "title": "" }, { "docid": "fbc59fca75b99a403174397ba5d8d285", "score": "0.7216552", "text": "public function create()\n {\n $modelClass = $this->modelClass;\n $model = new $modelClass;\n $model->fill(Input::all());\n $view = View::make(\n $this->getViewName('create'),\n compact('model') + array(\n 'pageTitle' => 'Cadastrar '.$this->resourceTitle,\n 'formView' => $this->getViewName('_form'),\n 'formContentView' => $this->getViewName('_formContent'),\n )\n );\n $view = $this->beforeRender($view, 'create');\n return $this->beforeRenderForm($view, $model);\n\n }", "title": "" }, { "docid": "29282129b8e24a976f037c589580f34b", "score": "0.7208537", "text": "public function create()\n {\n $this->page_title = trans('resource_sub_type.new');\n\n return view('resource_sub_type.new', $this->vdata);\n }", "title": "" }, { "docid": "162ece72aeff2332b943711b91bbb0cd", "score": "0.72039485", "text": "public function create()\n {\n\n $model = $this->repository->getNew();\n $this->document->breadcrumbs([\n trans('ecommerce::default.'.$this->codename.'.index') => admin_route('ecommerce.'.$this->codename.'.index'),\n trans('ecommerce::default.'.$this->codename.'.create') => '',\n ]);\n\n $this->document->page->title(\n trans('ecommerce::default.'.$this->codename.'.index')\n .' > '\n .trans('ecommerce::default.'.$this->codename.'.create')\n );\n\n return view('ecommerce::'.$this->codename.'.form', [\n 'model' => $model,\n 'target' => 'ecommerce.'.$this->codename.'.store',\n 'codename' => $this->codename,\n 'repository' => $this->repository,\n ]);\n }", "title": "" }, { "docid": "ae7f980d6b32481951f3c9b739cad405", "score": "0.7199489", "text": "public function create()\n {\n return view(\"konsumen.form\");\n }", "title": "" }, { "docid": "69bd3270f11ddfa5b575696d29a4add6", "score": "0.71814996", "text": "public function create()\n {\n\n return view('shift.form_create');\n }", "title": "" }, { "docid": "0529bd22c7b669b06d0917bb468bcd97", "score": "0.716538", "text": "public function create() {\n\t\t$this->authorize('create', $this->repo->model());\n\t\treturn view($this->view . 'form', $this->repo->getPreRequisite(), $this->repo->getBasicPreRequisite());\n\n\t}", "title": "" }, { "docid": "d7dfab79c6b07da6e5e0913e8540eeb9", "score": "0.7157242", "text": "public function create()\n {\n return view('dashboard.forms.create');\n }", "title": "" }, { "docid": "cdccf0772168a4c3198ad8229762752f", "score": "0.7155322", "text": "public function create()\n {\n return $this->view('form');\n }", "title": "" }, { "docid": "b53b216bb126e4de0f5a98bea729535e", "score": "0.71506757", "text": "public function newAction()\n {\n $this->view->form = new \\BarangForm(null, ['edit' => true]);\n }", "title": "" }, { "docid": "d6aa2e924016ff1dae18f8f678fe212a", "score": "0.7145264", "text": "public function create()\n\t{\n\t\t$form = new Form;\n\t\t$allow_tabs = array('create');\n\t\t$tab = 'create';\n\t\treturn View::make('backend.forms.create', compact('form', 'allow_tabs', 'tab'));\n\t}", "title": "" }, { "docid": "7e262dd36752e23255d5ea03566e8de7", "score": "0.7122985", "text": "public function create()\n {\n $model = $this->model;\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "fa84f7150b87a66588bfc89685d8fe4c", "score": "0.71158516", "text": "public function create()\n {\n return view('form');\n }", "title": "" }, { "docid": "1dcbdf778b346aa6793b44e6dbdc0ed3", "score": "0.71093065", "text": "public function create()\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n return view('layouts.create')->with(compact('forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "e764b1be55fc315cb37574f6c835bc08", "score": "0.7105658", "text": "public function create()\n {\n $data['url'] = route('admin.'.$this->route . '.store');\n $data['title'] = 'Add ' . $this->viewName;\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n\n return view('admin.general.add_form')->with($data);\n }", "title": "" }, { "docid": "f62dd87066b4faf01871596fb587ea88", "score": "0.7074242", "text": "public function create()\n {\n return view('template.product.form_create');\n }", "title": "" }, { "docid": "ccd8c86bf091e74199a4226d7941ad10", "score": "0.7057411", "text": "public function newAction()\n {\n $entity = new Supplier();\n $form = $this->createCreateForm($entity);\n\n return $this->render('AcmeSetupBundle:Supplier:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "2b41dd9ed0cf1461dd65f8e05b0a94a1", "score": "0.70571953", "text": "public function create()\n {\n return $this->showForm();\n }", "title": "" }, { "docid": "d152222964aa1bb46555c71d1b40a042", "score": "0.70524913", "text": "public static function newForm() {\n self::check_admin();\n $abilities = Ability::allAbilities();\n View::make('suunnitelmat/new_species.html', array('abilities' => $abilities));\n }", "title": "" }, { "docid": "a5da52bd87409b9af679915f54a22668", "score": "0.70512646", "text": "public function create()\n {\n if(!Auth::user()->hakAkses($this->hakAkses['add'])){\n $this->authorize('forceFail');\n }\n $class = $this->getResourceModel();\n $kategori = Kategori::get();\n return view($this->filterCreateView('_resources.create'), $this->filterCreateViewData([\n 'kategoriList' => $kategori,\n 'record' => new $class(),\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "c69f303d7cafa0864b25b452417d3c13", "score": "0.70510703", "text": "public function create()\n\t{\n\t\treturn view('actions.create');\n\t}", "title": "" }, { "docid": "b20c44fdc751207aaea30b2a981f6a0d", "score": "0.7047574", "text": "public function create()\n\t{\n\t\t//\n\t\treturn \\View::make('concepto/concepto_new');\n\n\t}", "title": "" }, { "docid": "956b2245921b775d19eaa349523daabc", "score": "0.7040791", "text": "public function create()\n {\n return view($this->layout.'form');\n }", "title": "" }, { "docid": "607b994b80e66fe45602a00379ab7779", "score": "0.70308834", "text": "public function create()\n {\n //return the create view (form)\n return view('books.create');\n }", "title": "" }, { "docid": "6039f43b38d3c6d347e4435587e3a07f", "score": "0.7027638", "text": "public function create()\n {\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "6785b7a8807f193c101c96ffd2379b91", "score": "0.70223033", "text": "public function create()\n\t{\n\t\t//\n\t\treturn View::make('resources.create') ;//转向资源服务器注册页面\n\t}", "title": "" }, { "docid": "f576188dbc8ae5f6631165826f306b3b", "score": "0.70178926", "text": "public function create()\n {\n return view(\"{$this->viewPath}.create\", [\n 'title' => trans('main.add') . ' ' . trans('main.medicalforms'),\n ]);\n }", "title": "" }, { "docid": "66b746538eaf7a550c7b3a12968b96a6", "score": "0.70147324", "text": "public function create()\n {\n return view('supplier.form');\n }", "title": "" }, { "docid": "aeb469b25992f994059bfd2f69df4c25", "score": "0.7014434", "text": "public function create()\n {\n return view('admin.service.form');\n }", "title": "" }, { "docid": "55d25b23118347b43838f0584440d7bc", "score": "0.7013096", "text": "public function create()\n {\n return view('resturants::create');\n }", "title": "" }, { "docid": "d466d099f3186e4452b5ebba7c196cf6", "score": "0.70112854", "text": "public function create()\n {\n return view('design/form');\n }", "title": "" }, { "docid": "7c7e2891f4af9318822aa65308553f78", "score": "0.7010465", "text": "public function create()\n {\n return view('pages.superAdmin.minerba.form');\n }", "title": "" }, { "docid": "ca18b8d268ff390165b891429ae27a70", "score": "0.70104074", "text": "public function create()\n\t{\n\t\treturn view('admin.alergenosForm');\n\t}", "title": "" }, { "docid": "248b476c0f07013b389c79c904231f2a", "score": "0.70046955", "text": "public function create()\n {\n return view('admin.car.add');\n }", "title": "" }, { "docid": "8786022d988565af6dda1dead367404f", "score": "0.7004673", "text": "public function create()\n {\n return view('patal.form');\n }", "title": "" }, { "docid": "91dd937891cf552bdb6c058f3730d93b", "score": "0.6998989", "text": "public function newAction()\n {\n $entity = new foo();\n $form = $this->createForm(new fooType(), $entity);\n\n return $this->render('ScrunoBoardBundle:foo:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "ed1d0f0eb0fcdbf172b956b19927920e", "score": "0.6997593", "text": "public function create()\n {\n $class = $this->getModelClassFromRoute();\n if (method_exists($class, 'newDefault')) {\n $object = $class::newDefault(request()->input('parent_id'));\n } else {\n $object = new $class;\n }\n $formConfig = $this->getFormConfig($object);\n $validationRules = $this->getValidationRules();\n return view($this->editPage, compact('object', 'formConfig', 'validationRules'));\n }", "title": "" }, { "docid": "1bfdf35b31b995ec54621f89216a2f60", "score": "0.69961935", "text": "public function create()\n {\n // Hacia el formulario\n return view('Catalogo.registro'); // La del formulario\n }", "title": "" }, { "docid": "68eb563182e9ed0d6524bc0b6aac22af", "score": "0.69939756", "text": "public function create()\n\t{\n\t\t// load the create form (app/views/professor/create.blade.php)\n\t\t$this->layout->content = View::make('professor.create');\n\t}", "title": "" }, { "docid": "875a928015f9ba1940490c7d9dfd8a9c", "score": "0.69916135", "text": "public function create()\n {\n // return view('presensi.form', ['action' => 'create']);\n }", "title": "" }, { "docid": "b544fbb7e499f8abdc514265eaa72c80", "score": "0.6990788", "text": "public function create(){\n return View('salonists.addForm');\n }", "title": "" }, { "docid": "6c77fcad45300d9322c483f2cf6f0bf9", "score": "0.69900626", "text": "public function create()\n\t{\n\t\treturn view('proyek.create');\n\t}", "title": "" }, { "docid": "b383bd109b3b044055bbdeced7efa8e7", "score": "0.6983602", "text": "public function create()\n {\n return view('leite.form');\n }", "title": "" }, { "docid": "67d0fea7e3e0bbada82422aa97f9be53", "score": "0.6977097", "text": "function showCreateForm(){\n return view('admin.Direktori.Koorsek.create');\n }", "title": "" }, { "docid": "432a42bd0e4b7b7dd13b0343e81c9f33", "score": "0.6974407", "text": "public function create()\n {\n //\n return view('libros/libroForm');\n }", "title": "" }, { "docid": "176f4e5ee5bb1d8842d9ba4652636fd5", "score": "0.69725794", "text": "public function create()\n {\n $route = action($this->getActionRoute('store'), $this->action_url_params);\n\n $form = $this->createService->createForm($route);\n\n return view($this->templateAdd, [\n 'form' => $form,\n 'title' => $this->getTitle('create'),\n 'module_title' => $this->getTitle('index'),\n 'controller' => $this->getController(),\n ]);\n }", "title": "" }, { "docid": "2c0ef64bd4ac157d6004a7d4b574de6f", "score": "0.6966141", "text": "public function create()\n {\n // restituisco la view del form\n return view('products.create');\n }", "title": "" }, { "docid": "2643780d203b8c752744e38942ce260d", "score": "0.69652045", "text": "public function create()\n {\n $book = new Book();\n $book->load('authorList.details');\n $book->load('publisher');\n $actionRoute = 'books.saveNew';\n $pageTitle = 'Books - New';\n return view('books._books_form', compact('book', 'actionRoute', 'pageTitle'));\n }", "title": "" }, { "docid": "db317dc07de792187038b7e4a5f863fd", "score": "0.69643784", "text": "public function newAction()\n {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ManuTfeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "title": "" }, { "docid": "9cb057d0f77e53e0cce5708d50a6481b", "score": "0.6962359", "text": "public function create()\n {\n return view('new');\n }", "title": "" }, { "docid": "cb7c11c08e93409d4584dc81a4310a7e", "score": "0.695854", "text": "public function getCreate()\n {\n return view('pages.form.create');\n }", "title": "" }, { "docid": "ea30089b05638deecfcdcc640118738c", "score": "0.69564354", "text": "public function create()\n {\n return view('student.add');\n }", "title": "" }, { "docid": "faab52446786eb57de6d45ef5c9751a9", "score": "0.6954935", "text": "public function create()\n {\n $countries = Country::all();\n $pageTitle = trans(config('dashboard.trans_file').'add_new');\n $submitFormRoute = route('cities.store');\n $submitFormMethod = 'post';\n return view(config('dashboard.resource_folder').$this->controllerResource.'form', compact('countries', 'pageTitle', 'submitFormRoute', 'submitFormMethod'));\n }", "title": "" }, { "docid": "0224b799194fa807284fdd74a5365a99", "score": "0.6949657", "text": "public function create()\n {\n return view('anggota.form');\n }", "title": "" }, { "docid": "07b43788dfee25823f1bfa779101007b", "score": "0.69488627", "text": "public function create()\n {\n return view('hrm::create');\n }", "title": "" }, { "docid": "1276876980c60661df1af9ecd3659454", "score": "0.6946296", "text": "public function create()\n\t{\n\t\treturn View::make('nssf.create');\n\t}", "title": "" }, { "docid": "7e9a15ef80239f891446dfc2d6f5483e", "score": "0.69416964", "text": "public function create()\r\n {\r\n $form=[\r\n \"value\" => \"add\",\r\n \"name\" => \"Add Person\",\r\n \"submit\" => \"Save\"\r\n ];\r\n\r\n return view('person/form',compact('form'));\r\n }", "title": "" }, { "docid": "291a5c3487f9cfc359ff3c6584319cba", "score": "0.69416463", "text": "public function backCreateAction()\n {\n $options['domain'] = Constants::BACK;\n $options['type'] = Constants::FORM_CREATE;\n \n // parameter used to filter and show only the resources that belong to the logged organization\n $options['organization'] = $this->get('security.context')->getToken()->getUser()->getId();\n \n $resource = new Resource();\n $form = $this->createForm(new ResourceType(), $resource, $options);\n \n $request = $this->getRequest();\n \n if ($request->getMethod() == 'POST')\n {\n $form->bindRequest($request);\n\n if ($form->isValid())\n {\n $em = $this->getDoctrine()->getEntityManager();\n \n $dateStartLock = $resource->getDateStartLock();\n $dateEndLock = $resource->getDateEndLock();\n \n // it is supposed that a locked period takes full days\n if ($dateStartLock) $dateStartLock->setTime(0, 0, 0);\n if ($dateEndLock) $dateEndLock->setTime(23, 59, 59);\n \n $em->persist($resource);\n $em->flush();\n\n return $this->redirect($this->generateUrl('back_resource_read', array('id' => $resource->getId())));\n }\n } \n\n return $this->render('PFCDTourismBundle:Back/Resource:create.html.twig', array(\n 'resource' => $resource,\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "7a30ea5382a9dccea0e45dd1992baee9", "score": "0.6940094", "text": "public function create()\n {\n return view ('riwayat.create');\n }", "title": "" }, { "docid": "247a32ac1bdaf7bc58b7ca130d237b9c", "score": "0.6936969", "text": "public function create()\n {\n //\n return view('admin.concept.create');\n }", "title": "" }, { "docid": "812e658b540562d8e395333553c52241", "score": "0.6934265", "text": "public function create()\n {\n return view('rekening.add');\n }", "title": "" }, { "docid": "680ca688d269a5dc28ed1ec460cb5137", "score": "0.69331574", "text": "public function create()\n {\n return view('harian.create');\n }", "title": "" }, { "docid": "8250d2da73f4073c78bd103641c0eaeb", "score": "0.6925077", "text": "public function create() {\n $title = 'Cadastro Professor';\n return view('professor.create', compact('title'));\n }", "title": "" }, { "docid": "dbe0d9d5c58ac6a21b5fb5512e594696", "score": "0.69249064", "text": "public function create()\n {\n return view('lijst.create');\n }", "title": "" }, { "docid": "a917cc1c921d761746db4cf9f3e12a3a", "score": "0.6924233", "text": "public function create()\n {\n return view($this->options['route-views'].\"save\")\n ->with('options', $this->options)\n ->with('typeForm', 'create');\n }", "title": "" }, { "docid": "35452bee2b2408494a78f76b38ce24ce", "score": "0.6923358", "text": "public function create()\n {\n return view('crud.create', array('title' => $this->title,'title_create' => $this->title_create,\n 'route_path' => $this->route,'form' => $this->form) );\n }", "title": "" }, { "docid": "83ebdde393be7960c0a3149b40b830fa", "score": "0.69206", "text": "public function create()\n {\n //\n return view('guest.sample.submit-property2');\n }", "title": "" }, { "docid": "ce1853ac01959995d112bb4d44014367", "score": "0.6918359", "text": "public function create()\n {\n //\n return view('ijinkeluars.create');\n }", "title": "" }, { "docid": "87632e3ed9e4e251e3f5a4dfa4cc4e5e", "score": "0.69181925", "text": "public function create()\n {\n // Place here the initial data and show\n // Ahh screw it, Show Everything!!!\n\n return view('record.create');\n\n }", "title": "" }, { "docid": "e90d65170f9bc3dd1e2b969826600c53", "score": "0.6914271", "text": "public function create()\n {\n return view('ekskul.create');\n }", "title": "" }, { "docid": "d7102125563abfe0d8b4c4534cc7ed82", "score": "0.6914158", "text": "public function create()\n {\n $this->array['action'] = 'create';\n \n $this->parameters_to_create_edit();\n\n return $this->show_view('create-edit', $this->array);\n }", "title": "" }, { "docid": "d7a4baeb06d3d8108dc3b6b8cf2d22f0", "score": "0.6906848", "text": "public function newAction()\n {\n global $config;\n\n if(empty($this->crumbs->crumbs['new']['label']))\n $this->crumbs->add('New', '/', 'New', false); \n\n $form = new AcademicyearsForm(new Academicyears(), array('new' => true));\n $this->view->setVar(\"form\", $form);\n }", "title": "" }, { "docid": "72d216b75443b4090ac0a1387c18009c", "score": "0.6906656", "text": "public function create()\n {\n //\n return view('crud.add');\n }", "title": "" }, { "docid": "0b940b83fdd9503e0b64330c52106d41", "score": "0.69053364", "text": "public function create()\n {\n return view('inventariss.create');\n }", "title": "" }, { "docid": "08b863cf334fdb6d69bfe339f48ba738", "score": "0.689754", "text": "public function create()\n {\n $outlet = new Outlet;\n $isCreate = true;\n return view('outlet.form', compact('outlet', 'isCreate'));\n }", "title": "" }, { "docid": "f75befff50f97c865afe13ee1e94f3b1", "score": "0.6896097", "text": "public function createAction()\n {\n $action = $this->view->url(['action' => 'save'], 'controllers');\n $this->view->propertyForm = $this->service->getFormForCreating($action);\n }", "title": "" }, { "docid": "27fad6d884340578087d232e3218a94d", "score": "0.68955874", "text": "public function create()\n {\n return view('backpages.formInfo');\n }", "title": "" }, { "docid": "b3b948e870ae293f1e987afea2e063f7", "score": "0.6891714", "text": "public function create()\n {\n return view('panel.warehouse-management.warehouse-rack.form-create');\n }", "title": "" } ]
18b97c64d4567195a6c30f41261de6a5
select para obtener el regalo
[ { "docid": "3842e901e253e0fd877bf920b5c917c4", "score": "0.0", "text": "public static function getById($str_codigo){\r\n // Consulta de la tabla Alumnos\r\n $consulta = \"SELECT * FROM tbl_regalos WHERE str_codigo = ?\";\r\n\r\n try {\r\n // Preparar sentencia\r\n $comando = Database::getInstance()->getDb()->prepare($consulta);\r\n // Ejecutar sentencia preparada\r\n $comando->execute(array($str_codigo));\r\n // Capturar primera fila del resultado\r\n $row = $comando->fetch(PDO::FETCH_ASSOC);\r\n return $row;\r\n\r\n } catch (PDOException $e) {\r\n // Aquí puedes clasificar el error dependiendo de la excepción\r\n // para presentarlo en la respuesta Json\r\n return -1;\r\n }\r\n }", "title": "" } ]
[ { "docid": "6599cfafed37f9a127b9649a2cb8566e", "score": "0.7282439", "text": "public function getSelect();", "title": "" }, { "docid": "f8cfd83b6d59239af42496eabc2319d9", "score": "0.7226363", "text": "function SelectReservas()\n {\n try{\n $sql=\"SELECT \".RESERVA_COLUMN_NICK_USUARIO.\", \".RESERVA_COLUMN_NOMBRE_AULA.\", \".RESERVA_COLUMN_FECHA.\", \".RESERVA_COLUMN_HORAINIRESER.\", \".RESERVA_COLUMN_HORAFINRESER.\" FROM \".TABLA_RESERVA;\n //echo $sql; \n $resultset = $this->conecxion->query($sql);\n return $resultset; \n }\n catch(PDOException $e){\n $this->error=$e->getMessage();\n }\n }", "title": "" }, { "docid": "c5bf4161592fbba7a060b47fa1de3c58", "score": "0.70582324", "text": "function selectTipoCredito(){\n$conexion=conectarse();\n\n\t#consulta para mostrar los tipos credito\n\t$consulta=\"SELECT Nombre FROM tbltipocredito ORDER BY Nombre\";\n\t#ejecutar consulta\n\t$ejecutar_consulta=$conexion->query($consulta);\n\n\twhile ($registro = $ejecutar_consulta-> fetch_assoc()) {\n\techo \"<option value='\".utf8_decode($registro[\"Nombre\"]).\"'>\".utf8_decode($registro[\"Nombre\"]).\"</option>\";\n\t}\n\t$conexion->close();\n}", "title": "" }, { "docid": "2ab7bd78022f7ae2c4cbfdcc0f243ad8", "score": "0.7041347", "text": "public function select(){\n\t$sql=\"SELECT * FROM actividad_economica WHERE estado='ACT'\";\n\treturn ejecutarConsulta($sql);\n}", "title": "" }, { "docid": "4ed5838e8a3f295287fc9fd287f15b49", "score": "0.7025388", "text": "public function select(){\n\t$sql=\"SELECT * FROM comp_pago WHERE condicion=1\";\n\treturn ejecutarConsulta($sql);\n}", "title": "" }, { "docid": "bfe2fabfe836ed83dce4a7ed4c258be1", "score": "0.6977174", "text": "public function ejecutarSelect(){\n\t\t$sentencia=$this->crearSelect(\"t_solicitud\",\"*\",\"\",\"\");\t\n\t \t$resultado=$this->ejecutarSentencia($sentencia);\n\t \t\t\n\t \treturn $resultado;\n\t}", "title": "" }, { "docid": "488391c369d7e6a696ed5baa9bbe6a32", "score": "0.6975973", "text": "public function select($candidato);", "title": "" }, { "docid": "a0a3c2e80c5dcf2babe00dd0a8df08fc", "score": "0.69724363", "text": "public function select(){\r\n\t\t$sql = \"SELECT * FROM seccion\";\r\n\t\treturn ejecutarConsulta($sql);\r\n\t}", "title": "" }, { "docid": "cd3628a4c60dcb8df30a6fab01a0befb", "score": "0.68791467", "text": "public function mdl_select(\n\t\t){\n\t\t\t$nhandle_conexion_bd = parent::_crear_conexion_bd();\n\t\t\tparent::set_names();\n\n\t\t\t$ssql_sentencia = \"call apr_web_arc_prioridad_select()\";\n\t\t\t$ssql_objeto = $nhandle_conexion_bd->prepare($ssql_sentencia);\n\t\t\t$ssql_objeto->execute();\n\t\t\treturn $ssql_resultado = $ssql_objeto->fetchAll(PDO::FETCH_ASSOC);\n\t\t}", "title": "" }, { "docid": "0d27d34d145d3a379dc9bf41bd1ec03a", "score": "0.681137", "text": "public function select()\n\t{\n\t\t$sql = \"SELECT * FROM programa WHERE condicion='1'\";\n\t\treturn ejecutarConsulta($sql);\n\t}", "title": "" }, { "docid": "f3fa4f909713f95f6cec7f559e54950a", "score": "0.6795519", "text": "public function Listar(){\n \t\t\t$receita = new Receita();\n\n \t\t\t//Chama o método para selecionar os registros\n \t\t\treturn $receita::Select();\n \t\t}", "title": "" }, { "docid": "7b443952a4c5e2b95fb09e4386e4f558", "score": "0.67892396", "text": "public function select1(){\n $this->sql =\" SELECT *\n FROM tbltipo_documento\n INNER JOIN tblestado_general\n ON tblestado_general.est_gen_id = tbltipo_documento.tblestado_general_est_gen_id\n WHERE est_gen_nombre = 'ACTIVO'\";\n return $this->execute($this->sql);\n }", "title": "" }, { "docid": "8925f04d90ef70f5eaaa9340712b1027", "score": "0.67814183", "text": "function crearSelect ($nombre, $valoract, $con, $mostrar, $valor)\n {\n echo '<select name=\"' . $nombre .'\"> ';\n\t while ($registro = $con->getRegistro())\n\t {\n\t $val_mostrar = minusculas ($registro[$mostrar]);\n\t $val_valor = $registro[$valor];\n\t $selected = '';\n\t if ($valoract == $val_valor)\n\t {\n\t $selected = 'selected';\n\t $val_retornar = $val_mostrar;\n\t }\n echo '<option value=\"' . $val_valor . '\" ' . $selected . '>' .\n $val_mostrar .\n '</option>\n ';\n\t }\n echo '</select>\n ';\n return $val_retornar;\n }", "title": "" }, { "docid": "f26da0eb4d34223dd9dd4a4e10e85ba2", "score": "0.67510533", "text": "function selectUsuario($tipo){\n$conexion=conectarse();\n\t\n\t#consulta para mostrar todos los usarios o solo los que son socios.\n\t# Esto se utiliza principalmente en la parte de Nuevo deposito\n\n if ($tipo==\"todos\") {\n \t$consulta=\"SELECT Nombre FROM tblusuario ORDER BY Nombre\";\t\n }else{\n \t$consulta=\"SELECT Nombre FROM tblusuario WHERE TipoUsuario='Socio' ORDER BY Nombre \";\t\n }\n\t\n\t#Ejecutar consulta\n\n\t$ejecutar_consulta=$conexion->query($consulta);\n\n\twhile ($registro = $ejecutar_consulta-> fetch_assoc()) {\n\techo \"<option value='\".utf8_decode($registro[\"Nombre\"]).\"'>\".utf8_decode($registro[\"Nombre\"]).\"</option>\";\n\t}\n\t$conexion->close();\n}", "title": "" }, { "docid": "94cd6bfe4f6b5f411ffc6f2ca1a38f83", "score": "0.6720077", "text": "function generaSelect()\r\n{\r\n\tinclude (\"db_link/conex.php\");\r\n\t\r\n\t$consulta=pg_query(\"\r\n SELECT id, descripcion\r\n FROM estados_v\");\r\n\t\r\n\t\r\n\r\n\t// Voy imprimiendo el primer select compuesto por los paises\r\n\techo \"<select name='select1' id='select1' class='campotexto' onChange='cargaContenido(this.id)' required='required'>\";\r\n\techo \"<option value='0'>Selecciona el Estado</option>\";\r\n\t\r\n\twhile($registro=pg_fetch_row($consulta))\r\n\t{\r\n\t\techo \"<option value='\".$registro[0].\"'>\".$registro[1].\"</option>\";\r\n\t}\r\n\techo \"</select>\";\r\n}", "title": "" }, { "docid": "10238beb4eb390703d48802eec08581f", "score": "0.6650925", "text": "public function select($registro_voto){\n $cedula=$registro_voto->getCedula();\n$fecha=$registro_voto->getFecha();\n\n try {\n $sql= \"SELECT `cedula`, `fecha`, `voto1`\"\n .\"FROM `registro_voto`\"\n .\"WHERE `cedula`='$cedula' AND`fecha`='$fecha'\";\n $data = $this->ejecutarConsulta($sql);\n $registro_voto = new Registro_voto();\n for ($i=0; $i < count($data) ; $i++) {\n $registro_voto->setCedula($data[$i]['cedula']);\n $registro_voto->setFecha($data[$i]['fecha']);\n $registro_voto->setVoto1($data[$i]['voto1']);\n\n }\n return $registro_voto; \n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "title": "" }, { "docid": "0a616f21c66476f5b2d1f26b42e205c8", "score": "0.6637266", "text": "function selectCredito($id){\n$conexion=conectarse();\n\n\t/*\n\t* El id se utiliza para ser mas especifico en la busqueda, al hacer clic en enlaces con el nombre \n\t*del credito vencidos o por pagar , envian el id por medio del metodo GET y aqui los captura,\n\t*para realizar la consulta.\n\t* -- Si tiene id obtendra el credito espesifico y que su estado sea estado diferente a pagado\n\t* -- si no tiene id tendra todo los Creditos que su estado sea por pagar o Vencido\n\t*/\n\n\tif($id!=\"\"){\n\t\t$buscar=\"t1.id_credito=\".$id.\" and t1.Estado <> 'pagado'\";\n\t}else{\n\t\t$buscar=\"t1.Estado='por pagar' or t1.Estado='vencido'\";\n\t}\n\n\t# Consulta para mostrar los creditos\n\t$consulta=\"SELECT t2.Nombre, t1.id_credito FROM tblcredito AS t1 INNER JOIN tbltipocredito AS t2 ON t1.id_tipoCredito = t2.id_tipoCredito WHERE $buscar\" ;\n\t\n\t#Ejecutar consulta\n\t$ejecutar_consulta=$conexion->query($consulta);\n\n\t#Obtener los datos de la consulta\n\twhile ($registro = $ejecutar_consulta-> fetch_assoc()) {\n\techo \"<option value='\".utf8_decode($registro[\"id_credito\"]).\"'>\".utf8_decode($registro[\"Nombre\"]).\"</option>\";\n\t}\n\t$conexion->close();\n}", "title": "" }, { "docid": "dd4df41ee157179ed8bf142d499bc896", "score": "0.6597771", "text": "function comboEmpresas() {\n $query = new Query(\"SG\");\n\n $query->sql = \"SELECT id_empresa, nombre_empresa FROM empresa where status = 1\";\n $empresas = $query->select(\"obj\");\n\n if ($empresas) {\n foreach ($empresas as $empresa) {\n echo <<<HTML\n <option value=\"$empresa->id_empresa\">$empresa->nombre_empresa</option>\nHTML;\n }\n } else {\n echo <<<html\n <option value=''>No hay empresas disponibles</option>\nhtml;\n }\n}", "title": "" }, { "docid": "d3737209c651f0d5e1b6d20c7190b34f", "score": "0.6575803", "text": "public function selecionarAction() { \r\n // Recupera os parametros da requisição\r\n $params = $this->_request->getParams();\r\n \r\n // Instancia a classe de sistemas web\r\n $sistemas = new WebSistemaModel();\r\n \r\n // Define os filtros para a cosulta\r\n $where = $sistemas->addWhere(array(\"CD_SISTEMA = ?\" => $params['cd_sistema']))->getWhere();\r\n \r\n // Recupera o sistema selecionado\r\n $sistema = $sistemas->fetchRow($where);\r\n \r\n // Reenvia os valores para o formulário\r\n $this->_helper->RePopulaFormulario->repopular($sistema->toArray(), \"lower\");\r\n }", "title": "" }, { "docid": "a9e74e76918cd956fb72f7446b60b2af", "score": "0.6575549", "text": "public function selectReservas(){\n\n\t\t$Campos=\"SELECT R.IdReserva,\n\t\t\t\t R.ResNom,\n\t\t\t\t R.ResApe,\n\t\t\t\t R.ResTipDoc,\n\t\t\t\t R.ResNumDoc,\n\t\t\t\t R.ResNumCel,\n\t\t\t\t R.ResEmail,\n\t\t\t\t R.ResNumPer,\n\t\t\t\t R.ResObs,\n\t\t\t\t R.ResFec,\n\t\t\t\t R.ResHorIni,\n\t\t\t\t R.ReservaEstado,\n\t\t\t\t R.ResFecReg,\n\t\t\t\t R.ResHorReg\n\t\t\t\t FROM reservas as R\n\t\t\t\t WHERE R.IdReserva='$this->Parametro'\";\n\n\t include_once(\"../Motordb/conexiondb.php\");\n\t $QueryCampos = mysqli_query($conexion,$Campos);\n\n\t try {\n\n\t\t\tif ($QueryCampos==true && $this->MetodoUpd==\"true\"){\n\n\t\t\t\twhile ($Row = mysqli_fetch_array($QueryCampos)) {\n\n\t\t\t\t\tinclude_once(\"../Forms/AdminReservas.php\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\techo \"<script>alert('¡Vaya¡ Ocurrio un error en la función listar Reservas para editar');</script>\";\n\t\t\t\techo \"<script>window.location.href='../Forms/MenuPrincipal.php?ADC=Retroceso';</script>\";\n\t\t\t}\n\t\t} catch (Exception $e) {\n\t\t\techo $e->getMessage();\n\t\t\tdie();\n\t\t}\n\n\t \n\t}", "title": "" }, { "docid": "6e13881a964cb85755065b10cee4d87c", "score": "0.6569687", "text": "function consultar_select($id, $columna_descripcion, $tabla){\n\t\t//Primero conectarse a la bd\n\t\t$conexion_bd = conectar_bd();\n\n\t\t$resultado = '<select name =\"'.$tabla.'\"><option value=\"\" disabled selected>Selecciona una opción</option>';\n\n \t$consulta = \"SELECT $id, $columna_descripcion FROM $tabla\";\n \t$resultados = $conexion_bd->query($consulta);\n \twhile ($row = mysqli_fetch_array($resultados, MYSQLI_BOTH)) {\n\t\t\t$resultado .= '<option value=\"'.$row[\"$id\"].'\">'.$row[\"$columna_descripcion\"].'</option>';\n\t\t}\n \n \t// desconectarse al termino de la consulta\n\t\tdesconectar_bd($conexion_bd);\n\n\t\t$resultado .= '</select><label>'.$tabla.'</label></div>';\n\n\t\treturn $resultado;\n\n\t}", "title": "" }, { "docid": "f6875e9ca97bca3aa72924c9a087c17e", "score": "0.65629065", "text": "function consultaCliente($_seleccion, $_dato){\n \t$this->consulta_connect->OpenPostgres();\n \tif($_seleccion==\"Cuenta\"){\n \t\t$Informacion = \t$this->consulta_connect->PostgresFunctionTable(\"toma.toma_lectura_by_cuenta(\".$_dato.\")\");\n \t}else{\n \t\t$Informacion = \t$this->consulta_connect->PostgresFunctionTable(\"toma.Toma_Lectura_By_Medidor('\".$_dato.\"')\");\n \t}\n\t\t\t\n\t\t\treturn $this->consulta_connect->QueryToJson($Informacion,[\"cuenta\",\"medidor\",\"str_lectura\",\"descripcion_anomalia\",\"mensaje\",\"descripcion_critica\",\"nombre\",\"fecha_toma\"],[null,null,null,null,null,null,null,null],false);\n\t\t\t$this->consulta_connect->ClosePostgres();\n }", "title": "" }, { "docid": "57ed2ac60f3ec7958bbaf0f3a2e90db2", "score": "0.6561477", "text": "public function selectP()\n {\n $sql=\"SELECT * FROM bus where estado=1\";\n return ejecutarConsulta($sql);\n }", "title": "" }, { "docid": "c128f5202bcf725b5aeecada5b66e0f3", "score": "0.6549485", "text": "public function Listar(){\n $convenios = new Convenio();\n\n // Chama o metodo para selecionar os registros\n return $convenios::Select();\n }", "title": "" }, { "docid": "669b4d60d2a08619f5fd62676a8c9b0c", "score": "0.6534659", "text": "function servicios()\n{\n\tglobal $con;\n\t$sql = \"Select id,Nombre from servicios2 \n\twhere `Estado_de_servicio` like '-1' \n\tor `Estado_de_servicio` like 'on' order by Nombre\";\n\t$consulta = mysql_query($sql,$con);\n\t$texto = \"<select name='servicios' id='servicios' onchange='dame_el_valor()'>\";\n\t$texto.=\"<option value=0>--Seleccione Servicio--</option>\";\n\twhile(true == ($resultado = mysql_fetch_array($consulta))) {\n\t\t$texto .= \"<option value='\".$resultado[0].\"'>\".$resultado[1].\"</option>\";\n\t}\n\t$texto .= \"</select>\";\n\treturn $texto;\n}", "title": "" }, { "docid": "255c69a1c305164873920edd02b4c219", "score": "0.65328217", "text": "function select($campof, $filtro, $t, $value)\n {\n global $admins;\n echo ' <select class=\"form-select \" id=\"select-filtro-' . $campof . '\" name=\"' . $campof . '\" style=\"width:115px;\">';\n echo \" <option value='Todos' >Todos</option>\";\n foreach ($filtro as $num) {\n if ($t != '') {\n $v = $admins[$t][0][array_search($num, array_column($admins[$t][0], 0))][$t];\n /**nos da la id */\n if ($t == 'servidor')\n $v = $admins[$t][0][array_search($num, array_column($admins[$t][0], 0))]['host'];\n /**nos da la id */\n } else $v = $num;\n if ($num == $value) {\n echo \"<option value='$num' selected>$v</option>\";\n } else {\n echo \"<option value='$num'>$v</option>\";\n }\n }\n echo ' </select>';\n }", "title": "" }, { "docid": "6cc304a60a458d04428b22d7d806d3b5", "score": "0.64991665", "text": "public function select($ventas);", "title": "" }, { "docid": "e0da0b104f9d5d3b79ca3c66ab9fa279", "score": "0.6498129", "text": "function createSelect($select){\n\tswitch($select)\n {\n case 1:\n $tbl = 'Reviewer';\n break;\n default:\n $tbl = 'Genres';\n }\n\n\t// nối kết CSDL, truy vấn dữ liệu\n\trequire \"dbmusic.inc.php\";\n\t$sql = \"SELECT * FROM $tbl\";\n\t$result = $conn->query($sql)\n\t\t\tor die (\"Query failed: \" . $conn->error);\n\n\tif ($result->num_rows > 0) {\n\t// với mỗi mẩu tin, xuất ra 1 thẻ option tương ứng\n\t\twhile ($row = $result->fetch_row()) {\n\t\t\t echo \"<option value='\", $row['0'], \"'>\";\n\t\t\t echo $row[\"1\"], \"</option>\";\n\t\t}\n\t} \n\t$conn->close();\n}", "title": "" }, { "docid": "576aab5bbe95536ab66115ab57d930f9", "score": "0.6496876", "text": "function tousLesBenevoles(){\n\t$req=\"Select id, nom, prenom from benevole\";\n\treturn $req;\n}", "title": "" }, { "docid": "4d8c15026e853f1830075a938ce40622", "score": "0.6482304", "text": "function seleciona_capitao($id_time)\n{\n\trequire($_SERVER['DOCUMENT_ROOT'] . '/conecta.php');\n\t\n\t$query = \"select fk_capitao from equipe where id_equipe = \" . $id_time;\n\t$rs=mysqli_query($conn,$query);\n\t\n\tif(gettype($rs) == \"object\")\n\t{\n\t\tif (mysqli_num_rows($rs) != 0)\n\t\t{\n\t\t\t$rw=mysqli_fetch_assoc($rs);\n\t\t\t$capitao = $rw['fk_capitao'];\n\t\t}\n\t}\n\t\n\t$query = \"select id_atleta,nome from atleta where fk_equipe = \" . $id_time;\n\t$rs=mysqli_query($conn,$query);\n\t$result = '<select name=\"capitao\">';\n\t$result = $result . '<option value=\"0\" >Nenhum</option>';\n\t\n\tif(isset($capitao))\n\t{\n\t\twhile($rw=mysqli_fetch_assoc($rs))\n\t\t{\n\t\t\t$result = $result . '<option value=\"' . $rw['id_atleta'] . '\" ';\n\t\t\tif($rw['id_atleta'] == $capitao)\n\t\t\t{\n\t\t\t\t$result = $result . 'selected=\"selected\" ';\n\t\t\t}\n\t\t\t$result = $result . '>' . $rw['nome'] . '</option>';\n\t\t}\n\t}\n\telse\n\t{\n\t\twhile($rw=mysqli_fetch_assoc($rs))\n\t\t{\n\t\t\t$result = $result . '<option value=\"' . $rw['id_atleta'] . '\" >' . $rw['nome'] . '</option>';\n\t\t}\n\t}\n\t\n\t$result = $result . '</select>';\n\tmysqli_close($conn);\n\treturn $result;\n}", "title": "" }, { "docid": "f4b168109f6609d732ba27411d0774b1", "score": "0.6472726", "text": "public function selectSecretaire(){\n $bdd=Connexion::getInstance();\n $req=\"select * from utilisateur u,service s\n where u.idService=s.idService\n and idStatus=\".self::NIVEAU_2;\n $rep=$bdd->query($req);\n return $rep->fetchall();\n \n }", "title": "" }, { "docid": "f6eb8f8ed445d897ce437c41c26c268e", "score": "0.6471732", "text": "public function select ($info)\r\n\t{\r\n\t\tif (is_int($info))\r\n {\r\n $q = $this->_db->query('SELECT id, nom, degat, experience, niveau, puissance, coup, UNIX_TIMESTAMP(date_coup) AS date_coup, date_connection, time_endormi, atout, type FROM personnages_v2 WHERE id = '.$info);\r\n //$donnees = $q->fetch(PDO::FETCH_ASSOC);\r\n \r\n $perso = $q->fetch(PDO::FETCH_ASSOC);\r\n }\r\n //sinon selectioner un Characters en utilisant son nom\r\n else\r\n {\r\n $q = $this->_db->prepare('SELECT id, nom, degat, experience, niveau, puissance, coup, UNIX_TIMESTAMP(date_coup) AS date_coup, date_connection, time_endormi, atout, type FROM personnages_v2 WHERE nom = :nom');\r\n $q->execute([':nom' => $info]);\r\n $perso = $q->fetch(PDO::FETCH_ASSOC);\r\n }\r\n switch ($perso['type'])\r\n {\r\n case 'guerrier': return new Guerrier($perso);\r\n case 'magicien': return new Magicien($perso);\r\n default: return null;\r\n }\r\n\t}", "title": "" }, { "docid": "860539b969f14c4169d2d1c842bc49f1", "score": "0.64693344", "text": "function select($consulta)\r\n\t{\r\n \t\t$link=Conectarse();\r\n \t\t//echo $consulta.\"\\n\";\t \r\n\r\n\t\t$rows=0;\r\n\t\t\r\n \t\t$ejecuta_query=mysql_query($consulta, $link);\r\n\t\tif($ejecuta_query){\r\n \t\t\t$rows=mysql_num_rows($ejecuta_query);\r\n \t\t\t$cols = mysql_num_fields($ejecuta_query);\r\n\t\t}\r\n \t\t//echo \"rows = \".$rows.\" cols = \".$cols;\r\n\r\n \t\tif($rows > 0){\r\n\t\t//\techo \"se encontraron datos y se va a rellenar el arreglo.\";\r\n\t\t\tfor ($i = 0; $i < $rows; $i++){\r\n\t\t\t\tfor($j=0; $j < $cols ; $j++){\r\n\t\t\t\t\t$arreglo[$i][$j]=mysql_result($ejecuta_query,$i,$j);\r\n\t\t\t\t\t//echo $arreglo[$i][$j];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$arreglo[0][0]=\"vacio\";\r\n\r\n\t\t}\r\n\r\n\t\tmysql_close($link);\r\n\t\treturn $arreglo;\r\n\t}", "title": "" }, { "docid": "70fbf4dcf45a7ee8ccca3b7f801a213c", "score": "0.64692146", "text": "function regselect()\n{\n\tglobal $con;\n\n\n\t$result = mysqli_query($con, \"select * from region\");\n\n\t\t\t\twhile ($row = mysqli_fetch_array($result)):\n\n\n\t\t\t\techo \"\n\t\t\t\t\t<option value=\".$row['r_id'].\">\".$row['region_name'].\"</option>\n\n\n\t\t\t\t\";\n\t\t\tendwhile;\n\n\n}", "title": "" }, { "docid": "ed093efec5c0b8ad72e92a0097be026f", "score": "0.64550364", "text": "function i3geoestat_tipo_regiao($codigo_tipo_regiao=\"\",$completo=true){\n if($completo == true){\n $colunas = \"*\";\n } else {\n $colunas = \"codigo_tipo_regiao,nome_tipo_regiao,descricao_tipo_regiao\";\n }\n $sql = \"select $colunas from \". $_SESSION[\"esquemaadmin\"] .\"i3geoestat_tipo_regiao \";\n if($codigo_tipo_regiao != \"\"){\n $sql .= \"WHERE codigo_tipo_regiao = \" . $codigo_tipo_regiao*1;\n $sql .= \" ORDER BY nome_tipo_regiao\";\n return $this->getData($sql)[0];\n } else {\n $sql .= \" ORDER BY nome_tipo_regiao\";\n return $this->getData($sql);\n }\n }", "title": "" }, { "docid": "f782bbf7c9b6db8ec1489caf9bceb5ee", "score": "0.64430606", "text": "public function autoSelect(){\n $model=M(\"guest\");\n $q = strtolower($_POST[\"queryString\"]);\n $map['gust_name'] = array('like', '%'.$q.'%');\n $map['gust_sn'] = array('like', '%'.$q.'%');\n $map['_logic'] = 'OR';\n $list = $model->where($map)->field('gust_name,gust_sn')->select();\n foreach ( $list as $row){\n\n echo $row['gust_name'].\"\\n\";\n }\n }", "title": "" }, { "docid": "80f80f290c06be0a143f13eb647b52c7", "score": "0.64208925", "text": "function selectHtml($login, $name, $condicion, $parametros, $valorSelecctionado = \"\", $blanco = true, $orderby = \"1\") {\r\n $select = \"<select name='$name' login='$login'>\";\r\n if ($blanco) {\r\n $select.= \"<option value='' >&nbsp $ </option>\";\r\n }\r\n $lista = $this->getList($condicion, $parametros, $orderby);\r\n foreach ($lista as $obejeto) {\r\n $selected = \"\";\r\n if ($obejeto->getLogin() == $valorSelecctionado) {\r\n $selected = \"selected\";\r\n }\r\n\r\n $select = \"<option $selected value='\" . $obejeto->getLogin() . \"' >\" .\r\n $obejeto->getClave() . \",\" . $obejeto->getNombre() .\r\n $obejeto->getApellidos() . \",\" . $obejeto->getEmail() .\r\n $obejeto->getFechaalta() . \",\" . $obejeto->getIsactivo() .\r\n $obejeto->getIsroot() . \",\" . $obejeto->getRol() .\r\n $obejeto->getFechalogin() . \"</option>\";\r\n }\r\n\r\n $select.=\"</select>\";\r\n return $select;\r\n }", "title": "" }, { "docid": "844878b45d4241e59a0a771d132e7f8d", "score": "0.64193475", "text": "function generaSelect2() { //creacioon de combo para las Regiones\n $conexion = new conexion;\n $conexion->conectar();\n if ($_SESSION[\"TipoFarmacia\"] == 1) {\n $comp = \" and mfe.HabilitadoFarmacia='S'\";\n } else {\n $comp = \"\";\n }\n $consulta = pg_query(\"select mfe.IdFarmacia,Farmacia,mfe.HabilitadoFarmacia \n from mnt_farmacia mf\n inner join mnt_farmaciaxestablecimiento mfe\n on mf.Id=mfe.IdFarmacia\n where mfe.IdEstablecimiento=\".$_SESSION[\"IdEstablecimiento\"].\"\n and mfe.IdModalidad=\".$_SESSION[\"IdModalidad\"].\"\n \" . $comp);\n $conexion->desconectar();\n // Voy imprimiendo el primer select compuesto por los paises\n echo \"<select name='farmacia' id='farmacia' onChange='cargaContenido8(this.value,this.id)'>\";\n echo \"<option value='0'>SELECCIONE UNA FARMACIA</option>\";\n while ($registro = pg_fetch_row($consulta)) {\n if ($registro[1] != \"--\") {\n echo \"<option value='\" . $registro[0] . \"'>\" . $registro[1] . \"</option>\";\n }\n }\n echo \"</select>\";\n }", "title": "" }, { "docid": "d96aaab1124e3100c8c0fd0152223650", "score": "0.6410564", "text": "public function getclienteinternoat() {\n\t\t$procedure = \"call usp_at_capa_getclienteinternoat()\";\n\t\t$query = $this->db-> query($procedure);\n\t\t \n\t\tif ($query->num_rows() > 0) {\n \n\t\t\t $listas = '<option value=\"0\" selected=\"selected\">::Elegir</option>';\n\t\t\t \n\t\t\t foreach ($query->result() as $row)\n\t\t\t {\n\t\t\t\t $listas .= '<option value=\"'.$row->CCLIENTE.'\">'.$row->RAZONSOCIAL.'</option>'; \n\t\t\t }\n\t\t\t\treturn $listas;\n\t\t}{\n\t\t\t return false;\n\t\t}\t\n\t}", "title": "" }, { "docid": "8d78bedc04123bab436448097e7d140a", "score": "0.6407763", "text": "function usuario_datos_consultar($id,$tipo,$campo){\n$link=Conectarse(); \nif($tipo == 'usuario'){$tabla= 'd9_users'; $clave ='id'; $w = \"LIMIT 1\"; }\nelseif($tipo == 'cliente'){$tabla= 'clientes'; $clave ='id_cliente'; $w = \"LIMIT 1\";}\nelseif($tipo == 'cie_10'){$tabla= 'cie_10'; $clave ='codigo'; $w = \"LIMIT 1\";}\nelseif($tipo == 'turnos_usuario'){$tabla= 'turnos'; $clave ='id_turno'; $w = \"LIMIT 1\";}\nelseif($tipo == 'atencion_inicial'){$tabla= 'atencion_inicial'; $clave ='id_atencion_inicial'; $w = \"LIMIT 1\";}\nelseif($tipo == 'inconsistencias'){$tabla= 'inconsistencias'; $clave ='id_inconsistencia'; $w = \"LIMIT 1\";}\nelseif($tipo == 'consultas_referencia'){$tabla= 'atencion_inicial'; $clave ='id_usuario'; $w ='ORDER BY `timestamp_atencion` DESC'; $lista ='1'; $campo ='*'; $nombre_select=\"control\";}\nelse{}\nmysql_query(\"SET NAMES 'utf8'\");\n$consulta = \"SELECT $campo FROM $tabla WHERE $clave = '$id' $w \";\n$sql=mysql_query($consulta,$link);\n\nif (mysql_num_rows($sql)!='0'){\nif($lista =='1'){$resultado .= \"<select name='$nombre_select'>\";}\nwhile( $row = mysql_fetch_array( $sql ) ) {\nif($lista !='1'){\n$resultado .= $row[$campo] ;\n\t\t\t\t\t }else{/// si se pide una lista se dan los valores del select\n\t\t\t\t\t \t$resultado .= \"<option value='$row[control]'>\".date('Y-m-d G:i',$row[timestamp_atencion]).\"</option>\";\n\t\t\t\t\t \t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\t\t\t\tif($lista !='1'){$resultado= \"[$id]\";}\n\t\t\t\t\t\t\t\t\t\t\t\telse{/// si se pide una lista se dan los valores del select\n\t\t\t\t\t \t$resultado .= \"<img src='images/atencion.gif' alt='[!]' title='Opss! No hay información sobre $tabla'> Opss! No hay información sobre $tabla \";\n\t\t\t\t\t \t\t\t\t\t\t\t\t\t} return $resultado;\nif($lista =='1'){$resultado .=\"</select>\";}\n\t\t\t\t\t \t\t\t\t\t\t}\n\nreturn $resultado;\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t }", "title": "" }, { "docid": "2c40f9df1aedaca9bc3e84fc3b2bb519", "score": "0.64055705", "text": "function listarCaractFiltro(){\n\t\t$this->procedimiento='kaf.ft_activo_fijo_caract_sel';\n\t\t$this->transaccion='SKA_CARALL_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del quotemeta(str)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tuery\n\t\t$this->captura('clave','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "title": "" }, { "docid": "d414caa30b509b9245b5fe1c884eed76", "score": "0.6405145", "text": "public function getSelectObject();", "title": "" }, { "docid": "05180b82d240e29546e4526b24ff1d9f", "score": "0.640247", "text": "public function Do_select_Example1(){\n\n\t}", "title": "" }, { "docid": "052a5b81099632dd04ae5c744bfe99a8", "score": "0.6400168", "text": "function geraOpcao($tabela,$select,$instituicao){\n\tif($instituicao != \"\"){\n\t\t$sql = \"SELECT * FROM $tabela WHERE idInstituicao = $instituicao OR idInstituicao = 999 ORDER BY 2 ASC\";\n\t}else{\n\t\t$sql = \"SELECT * FROM $tabela ORDER BY 2\";\n\t}\n\t$con = bancoMysqli();\n\t$query = mysqli_query($con,$sql);\n\twhile($option = mysqli_fetch_row($query)){\n\t\tif($option[0] == $select){\n\t\t\techo \"<option value='\".$option[0].\"' selected >\".$option[1].\"</option>\";\t\n\t\t}else{\n\t\t\techo \"<option value='\".$option[0].\"'>\".$option[1].\"</option>\";\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "dad2bc46451006ce6940670570da97c3", "score": "0.6398052", "text": "function getRegalosParaConsulta($estadoRegalo) {\r\n\t$query = \"SELECT idRegalo, nombreRegalo, precioRegalo, fechaReservacion FROM `regalos` WHERE estadoRegalo=\".$estadoRegalo;\r\n\t$mysql = mysql_query($query);\r\n\treturn $mysql;\r\n}", "title": "" }, { "docid": "dee10ebc155967679a8d78d7374bf5f0", "score": "0.63917506", "text": "function select_generico($tabela){\n $conn = conecta_bd();\n $sql =\"select * from $tabela\";\n $fields = [$tabela,'editar','excluir'];\n tabela($tabela,$conn, $sql, $fields);\n }", "title": "" }, { "docid": "1b0ded94a6f7e95a3291e5348be582a0", "score": "0.6382345", "text": "public function Buscar(){\n \t\t\t$idReceita = $_GET['id'];\n\n \t\t\t//INSTANCIA A CLASSE CONTATO\n \t\t\t$receita = new Receita();\n\n \t\t\t//DEFINE O ID DO CONTATO COM O VALOR DA VARIÁVEL\n \t\t\t$receita->id_receita_medica = $idReceita;\n\n \t\t\t//CHAMA O MÉTODO DA MODEL PARA APAGAR O REGISTRO\n \t\t\t$rs = $receita::SelectById($receita);\n \t\t\t//require_once('views_cms/tipo_quarto.php');\n\n return $rs;\n \t\t}", "title": "" }, { "docid": "8db8933402e31d665d0a0a65950e3b0c", "score": "0.6368788", "text": "public function select()\n\t{\n\t\t$aeropuerto = session('aeropuerto')->id;\n\t\t$procedencia = 1;\n\t\t//$procedencia = 2;\n\t\t$peso = 3000;\n\t\t$nacionalidad = 1;\n\t\t//$nacionalidad = 2;\n\n\t\t$tipoMatriculas = TipoMatricula::all();\n\t\t$otrosCargos = OtrosCargo::where('aeropuerto_id', $aeropuerto)\n\t\t\t\t\t\t\t->where('cantidad_unidades','<>',0)\n\t\t\t\t\t\t\t->where('peso_desde','<=', $peso)\n\t\t\t\t\t\t\t->where('peso_hasta','>=', $peso)\n\t\t\t\t\t\t\t->where('procedencia', $procedencia)\n\t\t\t\t\t\t\t->where('nacionalidad_matricula', $nacionalidad)\n\t\t\t\t\t\t\t->where('tipo_matricula', 1)\n\t\t\t\t\t\t\t->orderBy('nombre_cargo')->lists('nombre_cargo', 'id');\n\t\t\n\t\treturn view(\"testing.select\", compact(\"otrosCargos\", \"tipoMatriculas\", \"peso\", \"procedencia\", \"nacionalidad\"));\n\t}", "title": "" }, { "docid": "bd35e7ccd16c6efd2bcd1f52b6c4c600", "score": "0.6366522", "text": "public function getSelectData(){\n\t\t\t\n\t\t$this->db->query(\"SELECT id_tipo_usuario AS id, nombre from tipo_usuario\");\n\t\t\n\t\treturn $this->db->fetchAll();\n\n\t}", "title": "" }, { "docid": "de84744dbfffc559649a6a15475662c2", "score": "0.6344926", "text": "function seleccionar_persona_asignar_proyecto() {\n $sql = \"select * \n from usuarios us\n order by us.ap_paterno ASC \";\n $consulta = $this->db->query($sql);\n //return ($consulta->row());\n return($consulta);\n }", "title": "" }, { "docid": "448ffecca1697428022c27e6bbf54f05", "score": "0.6335125", "text": "public function SelecId() {\n \n \t $db= new conexion(); \n\t\t\t \n\t $cadena = \"SELECT * FROM tbservicios where Id='$this->Id'\";\n\t\n\t\t $ejecutor=$db->query($cadena);\n \n\t\t return($ejecutor);\n }", "title": "" }, { "docid": "ebd25a15d1296549d0fb529b695e7199", "score": "0.632684", "text": "function selecionar($campo1, $campo2, $valor, $conn) {\r\n\t\t\r\n\t\t// Comando SQL\r\n\t\t$sql = \"SELECT \" . $campo1 . \" FROM locacao WHERE \". $campo2 . \" = '$valor'\";\r\n\t\t\r\n\t\t// Resultado da Query\r\n\t\t$result = $conn->query($sql);\r\n\t\t\r\n\t\treturn $result;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4b92239d614f9c0612435b59489b1e13", "score": "0.6320289", "text": "abstract protected function select2Field();", "title": "" }, { "docid": "0f51b3b2c5879b060bdbae34441e0d93", "score": "0.631783", "text": "function combo_rapido($nombre,$datos,$valor,$pref= NULL,$evento = NULL){\n // section 127-0-1-1--c11e6e5:13385070ca2:-8000:0000000000000C1F begin\n $salida = NULL;\n $salida.=\"<select name = \\\"$pref$nombre\\\" id = \\\"$nombre\\\" $evento>\";\n if (is_array($datos) || is_object($datos))\n foreach ($datos as $idDatos => $valorDatos) {\n\t\tif ($valorDatos==$valor)\n $salida.=\"<option selected = \\\"selected\\\" $evento value = \\\"$valorDatos\\\">$idDatos</option>\";\n else\n $salida.=\"<option value = \\\"$valorDatos\\\">$idDatos</option>\";\n }\n $salida.= \"</select>\";\n return $salida;\n // section 127-0-1-1--c11e6e5:13385070ca2:-8000:0000000000000C1F end\n }", "title": "" }, { "docid": "e6e5a090ee5676ac60d37dab76b643ea", "score": "0.6306063", "text": "public function getSelect() {\n $check = true;\n $qry = \"Select\";\n $fund = DB::table('fund')->pluck('namefund', 'idfund')->toArray();\n return view('template.updatefund', compact('fund', $fund),array(\"qry\" => $qry,\"check\"=>$check));\n }", "title": "" }, { "docid": "d02848d702625e9d5664d33a096f39ec", "score": "0.6304531", "text": "function getRegalosInterfazConsultas() {\r\n\t$query = \"SELECT idRegalo, nombreRegalo, precioRegalo, fechaReservacion, estadoRegalo FROM `regalos` WHERE estadoRegalo=1 OR estadoRegalo=2 ORDER BY estadoRegalo\";\r\n\t$mysql = mysql_query($query);\r\n\treturn $mysql;\r\n}", "title": "" }, { "docid": "a75a512da17b855a013dadf23cd89000", "score": "0.6302039", "text": "function selectMedicos(){\n\n\t\t\t$sql = \"SELECT id_usuario,CONCAT(usuarios.nombre,' ',usuarios.apellido) AS nombre_usuario FROM usuarios WHERE privilegio='3' ORDER BY id_usuario DESC\";\n\t\t\t@$statement = Conexion::Conectar();\n\t\t\t$consulta = $statement->query($sql)->fetchAll();\n\t\t\techo \"\n\t\t\t<select name='medico' id='medico' class='form-control medico'>\n\t\t\t\";\n\t\t\t\n\t\t\tforeach ($consulta as $value) {\n\t\t\t echo \n\t\t\t ' \n <option value=\"'.$value['id_usuario'].'\">'.$value['nombre_usuario'].'</option> \n \t\n\t\t\t ';\n\t\t\t}\n\t\t\techo \"\n\t\t\t</select>\n\t\t\t\";\n\t\t}", "title": "" }, { "docid": "805638fc865dac7de4d18bead10d578b", "score": "0.629789", "text": "public function select($curso_has_estudiante){\n $curso_curso_id=$curso_has_estudiante->getCurso_curso_id()->getCurso_id();\n$estudiante_estudiante_id=$curso_has_estudiante->getEstudiante_estudiante_id()->getEstudiante_id();\n\n try {\n $sql= \"SELECT `curso_curso_id`, `estudiante_estudiante_id`\"\n .\"FROM `curso_has_estudiante`\"\n .\"WHERE `curso_curso_id`='$curso_curso_id' AND`estudiante_estudiante_id`='$estudiante_estudiante_id'\";\n $data = $this->ejecutarConsulta($sql);\n for ($i=0; $i < count($data) ; $i++) {\n $curso = new Curso();\n $curso->setCurso_id($data[$i]['curso_curso_id']);\n $curso_has_estudiante->setCurso_curso_id($curso);\n $estudiante = new Estudiante();\n $estudiante->setEstudiante_id($data[$i]['estudiante_estudiante_id']);\n $curso_has_estudiante->setEstudiante_estudiante_id($estudiante);\n\n }\n return $curso_has_estudiante; } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n return null;\n }\n }", "title": "" }, { "docid": "a6a36c35cf20098ef6643e4f4af4fb1e", "score": "0.6297348", "text": "public function Select(){\n\n //Query para selecionar a tabela contatos\n $sql1=\"SELECT * FROM tbl_historico_paciente;\";\n\n //Instancio o banco e cria uma variavel\n $conex = new Mysql_db_include_paciente();\n\n /*Chama o método para conectar no banco de dados e guarda o retorno da conexao na variavel*/\n $PDO_conex = $conex->Conectar();\n\n //Executa o select no banco de dados e guarda o retorno na variavel select\n $select = $PDO_conex->query($sql1);\n\n // contador\n $cont = 0;\n\n //Estrutura de repetição para pegar dados\n while ($rs = $select->fetch(PDO::FETCH_ASSOC)){\n\n // Cria um array de dados na classe $list_contatos\n $list_receitas[] = new Historico();\n\n // Guarda os dados vindos do banco no indice de objetos criado\n $list_receitas[$cont]->id_historico_paciente = $rs['id_historico_paciente'];\n\n $dat = new DateTime($rs['data']);\n\n $list_receitas[$cont]->data = $dat->format('d/m/Y');\n $list_receitas[$cont]->descricao = $rs['descricao'];\n\n\n // Soma mais um no contador\n $cont+=1;\n\n\n\n //Apenas retorna o $list_contatos se existir dados no banco de daos\n\n }\n if (isset($list_receitas)) {\n # code...\n return $list_receitas;\n }\n //Fechar a conexão com o banco de dados\n $conex->Desconectar();\n }", "title": "" }, { "docid": "b7365ee6b77acd0597301eed16ce4e6b", "score": "0.62972987", "text": "function ComboEmpleados(){\nconexion::conectar();\n\t$querySelect=\"select NombreEmpleado, IdEmpleado\n\t\t\t\tfrom mnt_empleados\n\t\t\t\twhere IdTipoEmpleado='ALM'\";\n\t$resp=pg_query($querySelect);\t\n\t$combo='<select id=\"IdEmpleado\" name=\"IdEmpleado\">\n <option value=\"0\">[Seleccione...]</option>';\n\twhile($row=pg_fetch_array($resp)){\n\t\t$combo.=\"<option value='\".$row[\"IdEmpleado\"].\"'>\".$row[\"NombreEmpleado\"].\"</option>\";\n\t}\n\t$combo.=\"</select>\";\n\treturn($combo);\nconexion::desconectar();\n}", "title": "" }, { "docid": "c8029785e34a48207544bb36ef17271a", "score": "0.627588", "text": "public function Listar(){\n\t\t\t$funcionario = new Funcionario();\n\n\t\t\t//Chama o método para selecionar os registros\n\n\t\t\treturn $funcionario::Select();\n\t\t}", "title": "" }, { "docid": "fe0ff766fc9c3708a39c8af272c83484", "score": "0.62746733", "text": "private function genereteSelect()\n {\n return $this->_select.$this->_from.$this->_join.$this->_where.$this->_group.$this->_having.$this->_order.$this->_limit;\n }", "title": "" }, { "docid": "b8c1953db5c7c997f57e4fee308042cc", "score": "0.62475157", "text": "function getSelect($koneksi, $select){\n\t\t$query = \"SELECT id, $select, nama FROM $select\";\n\n\t\t// prepare\n\t\t$statement = $koneksi->prepare($query);\n\t\t// execute\n\t\t$statement->execute();\n\t\t$result = $statement->fetchAll();\n\n\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "88d05ced92915812617b17c8c7ad039b", "score": "0.62427396", "text": "function consultar_select_modem()\n\t{\n\t\t$this->sql=\"SELECT * FROM phones order by \".'phones.\"ID\"'.\"\";\n\t\t$this->rs=$this->procesar_query($this->sql);\n\t\treturn $this->rs;\n\t}", "title": "" }, { "docid": "4267936891f721aafdab7ca6f173620b", "score": "0.62398374", "text": "public function getIdServicoSelecionado(){\r\n\t\t$this->resultado = $this->db->query(\" select id from {$this->tabela} where id_catalogo = {$id_catalogo} AND id_servico = {$id_servico} \");\r\n\t\treturn $this->resultado;\r\n\t}", "title": "" }, { "docid": "23c3619cf70d7bb4e30fd041d2b71115", "score": "0.6232358", "text": "function testeSelectPorUmParametro(){\n $oPaciente = new lPaciente();\n $oPaciente->createTablePaciente();\n print_r($oPaciente->insertPacienteCompleto(\"Teste1\", \"1234567\",\"364.964.588-00\", \"Unimed\", \"M\", \"A-\", \"1993-05-31\", \"Rua 7\", \"539879878888\", \"[email protected]\"));\n print_r(\"\\n\");\n print_r($oPaciente->insertPacienteCompleto(\"Teste2\", \"1234567\",\"364.964.588-77\", \"Plano B\", \"F\", \"A+\", null, null, null, \"[email protected]\"));\n print_r(\"\\n\\n\");\n /* ..:: Consulta utilizando os metodos 'get' ::.. */\n /* Retornam um array de lPaciente */\n\n print_r($oPaciente->getPacienteByCodigo(\"P0001\"));\n // print_r($oPaciente->getPacienteByNome(\"Teste1\"));\n // print_r($oPaciente->getPacienteByCPF(\"364.964.588-00\"));\n // print_r($oPaciente->getPacienteByPlanoDeSaude(\"Unimed\"));\n // print_r($oPaciente->getPacienteByGenero(\"M\"));\n // print_r($oPaciente->getPacienteByTipoSanguineo(\"A+\"));\n // print_r($oPaciente->getPacienteByDtNascimento(\"1993-05-31\"));\n // print_r($oPaciente->getPacienteByEndereco(\"Rua 7\"));\n // print_r($oPaciente->getPacienteByTelefone(\"539879878888\"));\n // print_r($oPaciente->getPacienteByEmail(\"[email protected]\"));\n\n \n /* ..:: Consultas equivalentes às acima mas utilizando o metodo 'selectPaciente' ::.. */ \n /* Retonam um array de SimpleXMLElement */\n\n print_r($oPaciente->selectPaciente(\"P0001\")); // Busca pelo Codigo\n // print_r($oPaciente->selectPaciente(null,\"Teste1\")); // Busca pelo Nome\n // print_r($oPaciente->selectPaciente(null,null,\"1234567\")); // Busca somente pela senha\n // print_r($oPaciente->selectPaciente(null,null,null,\"364.964.588-00\")); // Busca somente pelo CPF\n // print_r($oPaciente->selectPaciente(null,null,null,null, \"Unimed\")); // Busca somente pelo Plano de Saude\n // print_r($oPaciente->selectPaciente(null,null,null,null,null, \"M\")); // Busca somente pelo Genero\n // print_r($oPaciente->selectPaciente(null,null,null,null,null,null, \"A+\")); // Busca somente pelo Tipo Sanguineo\n // print_r($oPaciente->selectPaciente(null,null,null,null,null,null,null, \"1993-05-31\")); // Busca somente pela Data de Nascimento\n // print_r($oPaciente->selectPaciente(null,null,null,null,null,null,null,null, \"Rua 7\")); // Busca somente pelo Endereco\n // print_r($oPaciente->selectPaciente(null,null,null,null,null,null,null,null,null, \"539879878888\")); // Busca somente pelo Telefone\n // print_r($oPaciente->selectPaciente(null,null,null,null,null,null,null,null,null,null, \"[email protected]\")); // Busca somente pelo E-mail\n}", "title": "" }, { "docid": "8813af9f5e93bea374c966d1bcd94322", "score": "0.62320423", "text": "function seleccionarCursosSinProfe() {\n $conn = connect();\n $sql = \"select * from curso where profesor_rut = '0' \";\n $result = $conn->query($sql);\n\n while ($fila = $result->fetch_assoc()) {\n echo '<option value=' . $fila['idcurso'] . '>' . $fila['nombre'] . '</option>';\n }\n\n $conn->close();\n}", "title": "" }, { "docid": "277bf34f44ff82acc6e4d356550ec545", "score": "0.6227205", "text": "function combo($mostrar,$valores,$nombre,$valor=\"\",$evento=\"\"){\n\n \t\t$filas_ = $this->filas_campos($tabla,\" $mostrar as mostrar, $enlace \",array($enlace => $valor));\n\t\t\n\t\t\t$salida = \"<select name = \\\"$nombre\\\" id = \\\"$nombre\\\" onchange = \\\"$evento\\\" >\n\t\t\t\t\t<option selected >Seleccione</option>\\n\";\n\t\t\tdo{\n\t\t\t\t$salida.=\"<option value = \\\"\".$valores.\"\\\">\".$mostrar.\"</option>\\n\";\n\t\t\t}while($filas_[0] = mysql_fetch_assoc($filas_[1]));\n\t\t\t$salida.= \"</select>\\n\";\n\t\t\n\t\treturn $salida;\n\t}", "title": "" }, { "docid": "23106766b33a7810c9888c1f79a69d63", "score": "0.6214806", "text": "public function selectPatient(){\n $bdd=Connexion::getInstance();\n $req=\"select * from patient \";\n $rep=$bdd->query($req);\n return $rep->fetchall();\n \n }", "title": "" }, { "docid": "7debe9689e62a3cb51bc93bffaea917b", "score": "0.6201899", "text": "function generarConsulta(){\n\n\t\t/*\tswitch ($opc) {\n\t\t\t\tcase 'dia':\n\t\t\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and cast(fec as date) = '$par_bus' group by d.cod_rub\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'men':\n\t\t\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and TO_CHAR(fec, 'YYYY-MM') = '$par_bus' group by d.cod_rub\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'anu':\n\t\t\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and TO_CHAR(fec, 'YYYY') = '$par_bus' group by d.cod_rub\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and cast(fec as date) = current_date group by d.cod_rub\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t*/\n\t\tif (isset($_GET[opc]) and isset($_GET[par_bus])){\n\t\t\tif($_GET[opc] == \"dia\"){\n\t\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and cast(fec as date) = '$_GET[par_bus]' group by d.cod_rub\";\n\t\t\t}\n\t\t\telse if($_GET[opc] == \"men\"){\n\t\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and TO_CHAR(fec, 'YYYY-MM') = '$_GET[par_bus]' group by d.cod_rub\";\n\t\t\t}\n\t\t\telse if($_GET[opc] == \"anu\"){\n\t\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and TO_CHAR(fec, 'YYYY') = '$_GET[par_bus]' group by d.cod_rub\";\n\t\t\t}\n\t\t} \n\t\telse{\n\t\t\treturn \"select d.cod_rub, sum(d.mon) tot from co_factura f, co_factura_detalle d where f.cod_fac = d.cod_fac and cast(fec as date) = current_date group by d.cod_rub\";\n\t\t}\n\t}", "title": "" }, { "docid": "5e07db9b5059546ef601fdbe735dffd9", "score": "0.6201778", "text": "private function seletorEstClientes() {\n\t\trequire_once 'models/ClienteModel.php';\n\t\t\n\t\t$objeto = new ClienteModel();\n\t\t$vetor = $objeto->_list();\n\t\t\n\t\t$select = \"<select name='idcliente' id='idcliente' >\";\n\t\t$select .= \"<option value='0' selected='selected'>Todos</option>\";\n\t\tforeach ($vetor as $item) {\n\t\t\t$select .= \"<option value='\".$item->getPkCliente().\"'>\".$item->getPkCliente().\" - \".$item->getNomeFantasia().\"</option>\";\n\t\t}\n\t\t$select .= \"</select>\";\n\t\t\n\t\treturn $select;\n\t}", "title": "" }, { "docid": "abad3c7edf8c7c2377c53eff73e2fdfd", "score": "0.61989576", "text": "static public function ctrCargarSelectOrientacion(){\r\n\r\n $tabla = \"tbl_orientacion\";\r\n\r\n $respuesta = ModeloModalidades::mdlCargarSelect($tabla);\r\n\r\n return $respuesta;\r\n\r\n }", "title": "" }, { "docid": "072d5293f02f6f111761e9d7a4ac579c", "score": "0.61976135", "text": "function consult_seleccionar($data){\n\t\t// se crea la variable que trae los datos\n\t\t$id=strip_tags($data);\n\t\t// se crea una variable que instancia la clase de conexion con la base de datos\n\t\t$mysqli= new conect_database();\n\t\t// se crea una variable que es igual a la variable que se utilizo para instanciar anteriormente y esta es igual a la consulta que se prepara\n\t\t$query=$mysqli->prepare(\"select * from t_usuarios where id_usuarios='\".$id.\"'\");\n\t\t// tambien es igual a la ejecusion de la consulta\n\t\t$query->execute();\n\t\t// se utiliza una variable privada para almacenar todo el proceso mensionado anteriormente\n\t\t$this->consult=$query->get_result();\n\t\t// se realiza un ciclo con la data y la variable privada que tiene todo\n\t\twhile ($data=$this->consult->fetch_row()) {\n\t\t\t// se almacena toda la data dentro de la otra variable privada\n\t\t\t$this->dataAll[]=$data;\n\t\t}\n\t\t// se retorna lo que se guardo anteriormente en la variable privada\n\t\treturn $this->dataAll;\n\t}", "title": "" }, { "docid": "ab66d81295a98f15e06ce0556133a2c6", "score": "0.6188063", "text": "function select( $mysqli, $table, $tp, $name ){\n $sql='SELECT * FROM ' . $table;\n if( !$resultado = $mysqli->query( $sql ) ){\n throw new Exception ('No se accedio a datos');\n }else{\n\t switch( $tp ){\n\t \tcase 'select': viewSelect($resultado, $name);break;\n\t \tcase 'radio': viewradio($resultado, $name);break;\n\t \tcase 'checkbox': viewCheckbox($resultado, $name);break;\n case 'file': viewImputFile($name);break;\n\t \tdefault: viewInput($name);\n\t }\n\t}\n}", "title": "" }, { "docid": "04302987889bb8284f94bdc42fefcebf", "score": "0.6187855", "text": "function obtener_personas($conexion) { \n $output = ''; \n \n $sql = \"SELECT * FROM personas ORDER BY id_persona DESC\"; \n $result = mysqli_query($conexion, $sql); \n $output .= '<option id=\"opt_vacio\" value=\"Admin\" disabled selected>Propietarios registrados</option>'; \n while($row = mysqli_fetch_array($result)) \n { \n $output .= '<option value=\"'.$row[\"id_persona\"].'\">'.$row[\"Nombre_persona\"].'</option>'; \n } \n return $output; \n }", "title": "" }, { "docid": "92e85c6cf1ac4abd411aa45e655bd0f7", "score": "0.6187487", "text": "function select($filter){\n $this->query = \"select \";\n\n\n if(sizeof($filter) == 0){\n\n $this->query = $this->query . \"* \";\n\n }else if(sizeof($filter) > 0){\n\n $this->query = $this->query.$this->singleDerdari($filter);\n\n }\n\n }", "title": "" }, { "docid": "dbc5e246b2b08ae96928dcbd79e62aaf", "score": "0.61847156", "text": "function select($id){\r\n\t\t$sql = \"SELECT SEQ_SITUACAO_CHAMADO , DSC_SITUACAO_CHAMADO\r\n\t\t\t FROM gestaoti.situacao_chamado\r\n\t\t\t\tWHERE SEQ_SITUACAO_CHAMADO = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\t\t$row = pg_fetch_object($result, 0);\r\n\t\t$this->SEQ_SITUACAO_CHAMADO = $row->seq_situacao_chamado;\r\n\t\t$this->DSC_SITUACAO_CHAMADO = $row->dsc_situacao_chamado;\r\n\t}", "title": "" }, { "docid": "a72e75d65c789a147c839d4ac776d2be", "score": "0.61845434", "text": "public function vermarcas(){\n\n $res=$this->conexion->query(\"SELECT * FROM dtm_marcas ORDER BY nombre ASC\");\n while($row= mysqli_fetch_assoc($res)){\n if (isset($_GET['marca']) && $_GET['marca'] == $row['nombre']) {\n ?>\n <option value='<?php echo $row[\"nombre\"];?>' selected><?php echo $row[\"nombre\"]; ?></option>\n <?php \n } else {\n ?>\n <option value='<?php echo $row[\"nombre\"];?>'><?php echo $row[\"nombre\"]; ?></option>\n <?php \n }\n }\n }", "title": "" }, { "docid": "e4337a9a3f687ff3940b2340b6545d31", "score": "0.6184033", "text": "static public function mdlCargarSelect($tabla){\r\n\r\n $stmt = ConexionBD::Abrir_Conexion()->prepare(\"SELECT * FROM $tabla\");\r\n $stmt -> execute();\r\n\r\n return $stmt -> fetchall();\r\n\r\n }", "title": "" }, { "docid": "f3b7188ed3b16fa29e2749540e217424", "score": "0.61760575", "text": "public static function find(){\n include (\"connection.php\");\n\t\t\treturn mysqli_query($conexion,\"select * from tipoCuentas;\")\t\n\t\t\t\tor die(\"Problemas en el select\".mysqli_error($conexion));\n }", "title": "" }, { "docid": "6dfc05c5266e02568ac8a9ce11b2698f", "score": "0.6175091", "text": "function select($filtros = NULL) {\n $sql = \"\n\t\tSELECT \t\n\t\t\t*\n\t\tFROM \n\t\t\t$this->_table \n\t\tWHERE \";\n\n \tif ($this->db->field_exists('id_estado', $this->_table)) {\n\t\t\t$sql .= $this->_table.\".id_estado = \".ESTADOS::ALTA;\n\t\t}\n\n\t\tif ($filtros == NULL) {\n\t\t\tif( substr($sql, -6) == 'WHERE ') {\n\t\t\t\t$sql .= \" 1\";\n\t\t\t} \n\t\t} else if (is_array($filtros)) {\n foreach ($filtros as $key => $value) {\n $sql .= $this->_table.\".\".$key.\"='\".$value.\"' AND\";\n }\n $sql = substr($sql, 0, 3);\n } else {\n $sql .= $this->_table.\".\".$this->_id.\"= '$filtros'\";\n }\n\n $sql .= \"\n\t\tORDER BY \n\t\t\t$this->_table.$this->_order\n\t\tLIMIT \n\t\t\t$this->_limit\";\n\t\t\n return $this->getQuery($sql);\n }", "title": "" }, { "docid": "221c39c580233c6a358fc5acf9b4f89a", "score": "0.6174729", "text": "function geraOpcaoPublicado($tabela,$select,$instituicao){\n\tif($instituicao != \"\"){\n\t\t$sql = \"SELECT * FROM $tabela WHERE publicado = 0 AND idInstituicao = $instituicao OR idInstituicao = 999 \";\n\t}else{\n\t\t$sql = \"SELECT * FROM $tabela WHERE publicado = 1\";\n\t}\n\t$con = bancoMysqli();\n\t$query = mysqli_query($con,$sql);\n\twhile($option = mysqli_fetch_row($query)){\n\t\tif($option[0] == $select){\n\t\t\techo \"<option value='\".$option[0].\"' selected >\".$option[1].\"</option>\";\t\n\t\t}else{\n\t\t\techo \"<option value='\".$option[0].\"'>\".$option[1].\"</option>\";\t\n\t\t}\n\t}\n}", "title": "" }, { "docid": "435446dd1122a91e8fd15fa5f044157e", "score": "0.6170026", "text": "function select_dati_personali() {\r\n\t$db_conn=connessione();\r\n\t$cod = $_SESSION[\"cod_utente\"];\r\n\tif ($db_conn and !empty($cod)) {\r\n\t\t$s=\"SELECT nome, telefono FROM utenti WHERE codice = $cod\";\r\n\t\t$result = query($s, $db_conn, \"select dati utente\");\r\n\t\tif (mysqli_num_rows($result) == 1) {\r\n\t\t\t$row = fetch_row($result);\r\n\t\t\treturn $row;\r\n\t\t} else {\r\n\t\t\ttorna_indietro();\r\n\t\t}\r\n\t} else {\r\n\t\ttorna_indietro();\r\n\t}\r\n\tclose($db_conn);\r\n}", "title": "" }, { "docid": "17cc4996f01d950d7332ba8afb4305a7", "score": "0.6167424", "text": "private function sql_query_select_record()\n {\n // visualizza una o piu' righe\n // TODO l'ordine delle PK ritornate dalla query e` casuale\n $this->sql = \"select * from \" . $this->config[\"table_name\"]\n . \" where \" . $this->sql_pk_filter($_REQUEST[\"pk_values\"]);\n\n $this->query_result = $this->sql_mgr->query($this->sql);\n if (! $this->query_result)\n {\n $this->set_error( \"DB Error.\" );\n }\n\n return $this->query_result;\n }", "title": "" }, { "docid": "abf34db4055e18ddde212a1b7c8b3059", "score": "0.61614203", "text": "function dameproducto(){\n\t $consulta_mysql=\"\n\t\t SELECT \n\t\t\t\ttbproducto.nvchproducto,\n\t\t\t\ttbproducto.intidproducto,\n\t\t\t\ttbproducto.nvchcantidad\n\t\t\tfrom \n\t\t\ttbproducto\n\t \";\n\t $resultado_consulta_mysql=mysql_query($consulta_mysql);\n\t while($registro = mysql_fetch_array($resultado_consulta_mysql)){\n\t echo \"\n\t <option style='' value='\".$registro['intidproducto'].\"'>\n\t \tPROD000\".$registro['intidproducto'].\" - \".$registro['nvchproducto'].\" - distribuidor: \".$registro['nvchcantidad'].\"\".$registro['inidproducto'].\"\n\t </option>\n\t \";\n\t }\n\t}", "title": "" }, { "docid": "894701937cc93deea2fe4c5f0e03193e", "score": "0.6155836", "text": "function select_funcionario(){\n $conn = conecta_bd();\n $sql =\"SELECT id_usuario, nome,login, tipo_funcionario cargo,cpf,email,status_usuario status FROM funcionario, usuario, status_usuario, tipo_funcionario \"\n . \"WHERE fk_usuario = id_usuario AND fk_status_usuario = id_status_usuario AND fk_tipo_funcionario = id_tipo_funcionario\";\n $fields = ['nome','login','cargo','cpf','email','status','editar'];\n tabela('usuario',$conn, $sql, $fields);\n }", "title": "" }, { "docid": "71283ce441d2e8e77b73e390b04f4cc8", "score": "0.615452", "text": "function clientes($cliente)\n{\n\tinclude(\"../conexion.php\");\n\t$sql = \"Select Id,Nombre from clientes where `Estado_de_cliente` like '-1' or `Estado_de_cliente` like 'on' order by Nombre\";\n\t$consulta = mysql_query($sql,$con);\n\twhile(true == ($resultado = mysql_fetch_array($consulta)))\n\t{\n\t\tif($cliente == $resultado[0])\n\t\t$seleccionado = \"selected\";\n\t\telse\n\t\t$seleccionado = \"\";\n\t\t$texto .= \"<option \".$seleccionado.\" value='\".$resultado[0].\"'>\".$resultado[1].\"</option>\";\n\t}\n\treturn $texto;\n}", "title": "" }, { "docid": "94f4f3b4b6b4e96194b45a5257779fd9", "score": "0.6150666", "text": "function select($id){\r\n\t\t$sql = \"SELECT * FROM gestaoti.tarefa WHERE SEQ_TAREFA_TI = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\r\n\t\t$row = pg_fetch_object($result, 0);\r\n\t\t$this->SEQ_TAREFA_TI = $row->seq_tarefa_ti;\r\n\t\t$this->NUM_MATRICULA_RECURSO = $row->num_matricula_recurso;\r\n\t\t$this->SEQ_OS = $row->seq_os;\r\n\t\t$this->SEQ_EPM = $row->seq_epm;\r\n\t\t$this->SEQ_STATUS_TAREFA_TI = $row->seq_status_tarefa_ti;\r\n\t\t$this->DAT_CRIACAO_TAREFA = $row->dat_criacao_tarefa;\r\n\t\t$this->DAT_ATUALIZACAO_TAREFA = $row->dat_atualizacao_tarefa;\r\n\t\t$this->NUM_MATRICULA_LIDER = $row->num_matricula_lider;\r\n\t\t$this->FLG_APROVA_EXTRA = $row->flg_aprova_extra;\r\n\t\t$this->NUM_MATRICULA_LIDER_APROVA = $row->num_matricula_lider_aprova;\r\n\t\t$this->DAT_APROVACAO_EXTRA = $row->dat_aprovacao_extra;\r\n\t\t$this->QTD_HORA_TOTAL_UTEIS = $row->qtd_hora_total_uteis;\r\n\t}", "title": "" }, { "docid": "ac91a2a728dbacc8c37a2c184ae90979", "score": "0.6148873", "text": "function seleccion1T(){\n\t\t\t$periodo = $this -> actualselecc;\n\t\t\t\n\t\t\tif(Session::get_data('tipousuario')!=\"ALUMNO\"){\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t\t\n\t\t\tunset($this -> pendientes);\n\t\t\tunset($this -> pmaterias);\n\t\t\t\n\t\t\t$id = Session::get_data('registro');\n\t\t\t\n\t\t\t$tiempos = new SeleccionTiempo();\n\t\t\t\n\t\t\t$tiempo = $tiempos -> find_first(\"registro=\".$id.\" AND periodo=\".$this -> actualselecc);\n\t\t\t\n\t\t\t$yi = substr($tiempo -> inicio,0,4);\n\t\t\t$mi = substr($tiempo -> inicio,5,2);\n\t\t\t$di = substr($tiempo -> inicio,8,2);\n\t\t\t$hi = substr($tiempo -> inicio,11,2);\n\t\t\t$ii = substr($tiempo -> inicio,14,2);\n\t\t\t\n\t\t\t$yf = substr($tiempo -> fin,0,4);\n\t\t\t$mf = substr($tiempo -> fin,5,2);\n\t\t\t$df = substr($tiempo -> fin,8,2);\n\t\t\t$hf = substr($tiempo -> fin,11,2);\n\t\t\t$if = substr($tiempo -> fin,14,2);\n\t\t\t\n//\t\t\t$di++;$di++;\n\t\t\tif($di<10)\n\t\t\t\t$di = \"0\".$di;\n\t\t\t\n\t\t\t$this -> inicio = $di.\"-\".$mi.\"-\".$yi.\" (\".$hi.\":\".$ii.\")\";\n\t\t\t$this -> fin = $df.\"-\".$mf.\"-\".$yf.\" (\".$hf.\":\".$if.\")\";\n\t\t\t\n\t\t\t$inicio = mktime($hi,$ii,0,$mi,$di,$yi);\n\t\t\t$fin = mktime($hf,$if,0,$mf,$df,$yf);\n\t\t\t\n\t\t\tif($inicio<time() && $fin>time()){\n\t\t\t\t$this -> acceso = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->redirect('alumno/seleccion');\n\t\t\t}\n\t\t\t\n\t\t\t$planesmaterias = new Planmateria();\n\t\t\t$xpkardex = new Xpkardex();\n\t\t\t$kardex = new KardexIng();\n\t\t\t\n\t\t\t$pmaterias = $planesmaterias -> find(\"idplan=\".$this -> idplan.\" ORDER BY clavemateria\");\n\t\t\t\n\t\t\t//QUITAR MATERIAS QUE YA ESTAN EN KARDEX O COMO MATERIA SOLICITADA PARA KARDEX\n\t\t\t$xxx = 0;\n\t\t\tif($pmaterias) foreach($pmaterias as $p){\n\t\t\t\t$n = $kardex -> count(\"registro=\".$id.\" AND clavemat='\".$p -> clavemateria.\"'\");\n\t\t\t\tif($n==0){\n\t\t\t\t\t$n = $xpkardex -> count(\"registro=\".$id.\" AND materia='\".$p -> clavemateria.\"'\");\n\t\t\t\t\tif($n==0){\n\t\t\t\t\t\t$this -> pmaterias[$xxx] = $p;\n\t\t\t\t\t\t$xxx++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif($this -> pmaterias){ \n\t\t\t\t$nnn = 0;\n\t\t\t\tforeach($this -> pmaterias as $tmp){\n\t\t\t\t\t$this -> matitas[$nnn] = $tmp -> clavemateria .\" - \". $this -> sacarMateria($tmp -> clavemateria, $this -> plan);\n\t\t\t\t\t$nnn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this -> pendientes = $xpkardex -> find(\"registro=\".$id);\n\n\t\t\t$nnn=0;\n\t\t\tif($this -> pendientes){ \n\t\t\t\tforeach($this -> pendientes as $tmp){\n\t\t\t\t\t$this -> matelocas[$nnn] = \n\t\t\t\t\t\t\t$tmp -> materia.\" - \".$this -> sacarMateria($tmp -> materia, $this -> plan);\n\t\t\t\t\t$nnn++;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c1d89a37f3bd1ca9189333bd8b347521", "score": "0.6141052", "text": "function oracle_select($SELECT, $oracle_conexion){\n\t$consulta_oracle = $SELECT;\n\n\t$sentencia_oracle = oci_parse($oracle_conexion, $consulta_oracle);\n\n\t/* Errores Oracle */\n\tif (!$sentencia_oracle) {\n\t $e = oci_error($conexion);\n\t print htmlentities($e['message']);\n\t exit;\n\t}\n\n\t$resultado_oracle = oci_execute($sentencia_oracle, OCI_DEFAULT);\n\tif (!$resultado_oracle) {\n\t $e = oci_error($sentencia_oracle);\n\t echo htmlentities($e['message']);\n\t exit;\n\t}\n\n\t/* Resultados Oracle */\n\treturn $sentencia_oracle;\n\n}", "title": "" }, { "docid": "79214f7fc1cc2bae5f6870702cc746a6", "score": "0.61331564", "text": "function selectPreguntasModeloEducativo(){\n $sql = \"SELECT pr.id,pr.nombre_pregunta,sub.nombre_subcategoria FROM t_preguntas AS pr\n INNER JOIN t_subcategoria_preguntas AS sub ON pr.id_subcategoria = sub.id\n WHERE pr.id_encuesta = 6\";\n $request = $this->select_all($sql);\n return $request;\n }", "title": "" }, { "docid": "4bba4cded18ebae8ae2564838a334ba2", "score": "0.6129243", "text": "function generarListaDoctoresParaSelect(){\n $conexion = GenerarConexion();\n try{\n // set the PDO error mode to exception\n $conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $consulta = \"SELECT Doctor.ci, concat_ws(' ',Doctor.nombre, Doctor.apellido), Doctor.especialidad FROM Doctor\";\n $sentencia = $conexion->prepare($consulta);\n $sentencia->execute();\n $resultado = $sentencia->fetchAll();\n echo \"hasta aca OK\";\n foreach($resultado as $dato){\n echo \"<option value='\".$dato['ci'].\"'>\".$dato[1].\"-\".$dato[2].\"</option>\";\n }\n }\n \n catch(PDOException $e){\n echo \"Error \".$e->getMessage();\n }\n\n $conexion=null;\n }", "title": "" }, { "docid": "8c2078adb30c2fe181c6cfe7ad4bfbf3", "score": "0.6127651", "text": "function select_piatto($codice) {\r\n\t$db_conn=connessione();\r\n\t$cod_admin = $_SESSION[\"cod_admin\"];\r\n\tif ($db_conn and !empty($codice) and !empty($cod_admin)) {\r\n\t\t$s=\"SELECT titolo,testo,prezzo,immagine,cod_admin,testo_en,titolo_en,tipo FROM piatti WHERE codice = $codice AND cod_admin = $cod_admin\";\r\n\t\t$result = query($s, $db_conn, \"select piatto\");\r\n\t\tif (mysqli_num_rows($result) == 1) {\r\n\t\t\t$row = fetch_row($result);\r\n\t\t\treturn $row;\r\n\t\t} else {\r\n\t\t\ttorna_indietro();\r\n\t\t}\r\n\t} else {\r\n\t\ttorna_indietro();\r\n\t}\r\n\tclose($db_conn);\r\n}", "title": "" }, { "docid": "660e66da2c960f092cd7672d959b8f24", "score": "0.61237234", "text": "function select($id){\r\n\t\t$sql = \"SELECT SEQ_ATIVIDADE_CHAMADO , SEQ_SUBTIPO_CHAMADO , DSC_ATIVIDADE_CHAMADO , QTD_MIN_SLA_TRIAGEM , QTD_MIN_SLA_ATENDIMENTO ,\r\n\t\t\t\t\t FLG_ATENDIMENTO_EXTERNO, FLG_FORMA_MEDICAO_TEMPO, QTD_MIN_SLA_SOLUCAO_FINAL, SEQ_EQUIPE_TI, TXT_ATIVIDADE,\r\n\t\t\t\t\t SEQ_TIPO_OCORRENCIA,FLG_EXIGE_APROVACAO,NUM_MATRICULA_APROVADOR,NUM_MATRICULA_APROVADOR_SUBSTITUTO\r\n\t\t\t FROM gestaoti.atividade_chamado\r\n\t\t\t\tWHERE SEQ_ATIVIDADE_CHAMADO = $id\";\r\n\t\t$result = $this->database->query($sql);\r\n\t\t$result = $this->database->result;\r\n\t\t$row = pg_fetch_object($result, 0);\r\n\t\t$this->SEQ_ATIVIDADE_CHAMADO = $row->seq_atividade_chamado;\r\n\t\t$this->SEQ_SUBTIPO_CHAMADO = $row->seq_subtipo_chamado;\r\n\t\t$this->DSC_ATIVIDADE_CHAMADO = $row->dsc_atividade_chamado;\r\n\t\t$this->QTD_MIN_SLA_TRIAGEM = $row->qtd_min_sla_triagem;\r\n\t\t$this->QTD_MIN_SLA_ATENDIMENTO = $row->qtd_min_sla_atendimento;\r\n\t\t$this->QTD_MIN_SLA_SOLUCAO_FINAL = $row->qtd_min_sla_solucao_final;\r\n\t\t$this->FLG_ATENDIMENTO_EXTERNO = $row->flg_atendimento_externo;\r\n\t\t$this->FLG_FORMA_MEDICAO_TEMPO = $row->flg_forma_medicao_tempo;\r\n\t\t$this->SEQ_EQUIPE_TI = $row->seq_equipe_ti;\r\n\t\t$this->TXT_ATIVIDADE = $row->txt_atividade;\r\n\t\t$this->SEQ_TIPO_OCORRENCIA = $row->seq_tipo_ocorrencia;\r\n\t\t$this->NUM_MATRICULA_APROVADOR = $row->num_matricula_aprovador;\r\n\t\t$this->NUM_MATRICULA_APROVADOR_SUBSTITUTO = $row->num_matricula_aprovador_substituto;\r\n\t\t$this->FLG_EXIGE_APROVACAO = $row->flg_exige_aprovacao;\r\n\t}", "title": "" }, { "docid": "64dcd5926de328de52a475349cac736e", "score": "0.6111078", "text": "function SelectReservasExistente($nombreCortoAula,$fReserva,$horaIniresr,$horaFinreser)\n {\n try{\n $sql=\"SELECT \".RESERVA_COLUMN_NICK_USUARIO.\", \".RESERVA_COLUMN_NOMBRE_AULA.\", \".RESERVA_COLUMN_FECHA.\", \".RESERVA_COLUMN_HORAINIRESER.\", \".RESERVA_COLUMN_HORAFINRESER.\" FROM \".TABLA_RESERVA.\" WHERE \".RESERVA_COLUMN_NOMBRE_AULA.\"='\".$nombreCortoAula.\"' AND \".RESERVA_COLUMN_FECHA.\"='\".$fReserva.\"' AND \".RESERVA_COLUMN_HORAINIRESER.\"='\".$horaIniresr.\"' AND \".RESERVA_COLUMN_HORAFINRESER.\"='\".$horaFinreser.\"'\";\n //echo $sql; \n $resultset = $this->conecxion->query($sql); \n if($resultset->rowCount()>=1) \n return true;\n else\n return false; \n }\n catch(PDOException $e){\n $this->error=$e->getMessage();\n }\n }", "title": "" }, { "docid": "a799af79f1b5403f3c997ab1ba711d5a", "score": "0.61079097", "text": "static public function mdlCargarSelect($tabla){\r\n\r\n $stmt = ConexionBD::Abrir_Conexion()->prepare(\"SELECT * FROM $tabla\");\r\n \t$stmt -> execute();\r\n\r\n \treturn $stmt -> fetchall();\r\n\r\n }", "title": "" }, { "docid": "a799af79f1b5403f3c997ab1ba711d5a", "score": "0.61079097", "text": "static public function mdlCargarSelect($tabla){\r\n\r\n $stmt = ConexionBD::Abrir_Conexion()->prepare(\"SELECT * FROM $tabla\");\r\n \t$stmt -> execute();\r\n\r\n \treturn $stmt -> fetchall();\r\n\r\n }", "title": "" }, { "docid": "60c61bad2ef3e6d1314fbf9c18f58a4a", "score": "0.60958433", "text": "function select_ponto(){\n if(!isset($_SESSION)) {session_start();}\n $conn = conecta_bd();\n $sql =\"SELECT * FROM ponto, funcionario WHERE ponto.fk_usuario = funcionario.fk_usuario\";\n if(isset($_SESSION['tipo'])) {\n if ($_SESSION['tipo'] == 2) {\n $sql .= \" AND ponto.fk_usuario =\" . $_SESSION[\"user\"];\n $fields = ['nome','data_hora_entrada','data_hora_saida','horas_trabalhadas'];\n tabela('ponto',$conn, $sql, $fields);\n }else{\n $fields = ['nome','data_hora_entrada','data_hora_saida','horas_trabalhadas','editar','excluir'];\n tabela('ponto',$conn, $sql, $fields);\n }\n }\n }", "title": "" }, { "docid": "b8ef96f6820177cf03edc5317aa1028e", "score": "0.6086803", "text": "function testeSelectPorMaisDeUmParametro(){\n $oPaciente = new lPaciente();\n $oPaciente->createTablePaciente();\n print_r($oPaciente->insertPacienteCompleto(\"Teste1\", \"1234567\",\"364.964.588-00\", \"Unimed\", \"M\", \"A-\", \"1993-05-31\", \"Rua 7\", \"539879878888\", \"[email protected]\"));\n print_r(\"\\n\");\n print_r($oPaciente->insertPacienteCompleto(\"Teste2\", \"1234567\",\"364.964.588-77\", \"Plano B\", \"F\", \"A+\", null, null, null, \"[email protected]\"));\n print_r(\"\\n\\n\");\n\n /* ..:: Selecao utilizando multiplos campos ::.. */\n print_r($oPaciente->selectPaciente(null, \"Teste2\", \"1234567\",\"364.964.588-77\", \"Plano B\", \"F\", \"A+\", null, null, null, \"[email protected]\"));\n}", "title": "" }, { "docid": "44947af295d760cebc28b8db4eead632", "score": "0.60839105", "text": "private function sql_query_select()\n {\n $this->sql = \"SELECT * FROM \" . $this->config[\"table_name\"];\n if (isset($this->config[\"table_sql_select\"]))\n {\n $this->sql = $this->config[\"table_sql_select\"];\n }\n\n // aggiungi filtri\n $this->sql = $this->sql_add_filter($this->sql);\n\n // aggiungi paginazione\n $this->sql = $this->sql_mgr->sql_select_limit(\n $this->sql,\n $this->paginator->offset,\n $this->paginator->row_count);\n\n $this->query_result = $this->sql_mgr->query($this->sql);\n if (! $this->query_result)\n {\n $this->set_error( \"DB Error.\" );\n }\n\n return $this->query_result;\n }", "title": "" }, { "docid": "7a94e92153c426a583bf5e6e884e96e4", "score": "0.6082918", "text": "function seleccionarCursos() {\n $conn = connect();\n $sql = \"select * from curso where idcurso!=0\";\n $result = $conn->query($sql);\n\n while ($fila = $result->fetch_assoc()) {\n echo '<option value=' . $fila['idcurso'] . '>' . $fila['nombre'] . '</option>';\n }\n\n $conn->close();\n}", "title": "" } ]
61cfcf0875f575cb73f964851b6eda3d
Lists all Payment models.
[ { "docid": "eea8b833d63912a230777398207dd93b", "score": "0.67541575", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Payment::find()->orderBy(['created_at' => SORT_DESC]),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" } ]
[ { "docid": "81f68ca5d3c59d0ae29f0a2a12c1aa26", "score": "0.7259484", "text": "public function index()\n {\n return Payments::all();\n }", "title": "" }, { "docid": "6829655d766a20bf214f8ddc1019104b", "score": "0.71455884", "text": "public function actionIndex()\n {\n $searchModel = new PaymentSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a3dea9f239ba0cc41b2592f28586defa", "score": "0.70117384", "text": "public function allAction()\n {\n $em = $this->getDoctrine()->getManager();\n $payments = $em->getRepository(PaymentInfos::class)->findAll();\n\n return $this->render(\n 'PaymentBundle:admin:list.html.twig',\n [\n 'payments' => $payments,\n 'menu_level' => 'payment_admin'\n ]\n );\n }", "title": "" }, { "docid": "56fd85ee7272132e31b9ddcb4ae03fb2", "score": "0.69099927", "text": "public function index()\n {\n\n return new ManagePaymentCollection(ManagePayment::with('pyFID','pySI.studInfo','pysy','pysem','pyyl','pycat')->orderBy('id','DESC')->paginate(10));\n }", "title": "" }, { "docid": "d8ac4f2f1c61d29526e2934a0ea7029a", "score": "0.67964315", "text": "public function actionIndex() {\n return $this->txindex ( \"app\\models\\Payment\" );\n }", "title": "" }, { "docid": "98074f382a4197906d6b17ff0b4a61fb", "score": "0.6680378", "text": "public function index()\n {\n return new PaymentMethodCollection(\n PaymentMethodResource::collection(\n PaymentMethod::all()\n )\n );\n }", "title": "" }, { "docid": "9040b2f61aca53650dcfb0ba8b654bcf", "score": "0.6664259", "text": "public function getPaymentsAction()\n {\n $limit = (int) $this->Request()->getParam('limit', 20);\n $offset = (int) $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', []);\n $filter = $this->Request()->getParam('filter', []);\n\n $query = $this->getRepository()->getPaymentQuery($filter, $sort, $limit, $offset);\n\n $result = $query->getArrayResult();\n $totalResult = $this->getManager()->getQueryCount($query);\n $this->View()->assign(['success' => true, 'data' => $result, 'total' => $totalResult]);\n }", "title": "" }, { "docid": "8818da6c139bc8ce194a5a25d4310814", "score": "0.66540164", "text": "public function index()\n {\n $data['payments'] = StorePaymentInfo::orderBy('id', 'DESC')->paginate(10);\n return view(\"Payment::index\", $data);\n }", "title": "" }, { "docid": "3cab7a490661f04e2d304d9703bbf6c6", "score": "0.6638905", "text": "public function index()\n\t{\n\t\treturn View::make('payment.index')\n\t\t\t\t\t\t->with('payments',Payment::all())\n\t\t\t\t\t\t->with('title', 'All Payments');\n\t}", "title": "" }, { "docid": "fe8998ffec17959e81fd863892f9ac89", "score": "0.66233337", "text": "public function index()\n {\n $payments = Payment::latest()->paginate(2);\n return view('admin.payment.index',compact('payments')) ;\n }", "title": "" }, { "docid": "c2a6b7714ea275221afb4c8a73f7d81c", "score": "0.66027814", "text": "public function index()\n {\n if(\\Gate::allows('isAdmin') || \\Gate::allows('isAuthor') ){\n\n return Payment::all();\n }\n }", "title": "" }, { "docid": "af2b90df12c90bae8c1b82cc6cf6ad80", "score": "0.6586968", "text": "public function index()\n\t{\n\t\t$payments = Payment::all();\n\t\treturn view('admin.payments.index')->with(compact(\"payments\"));\n\t}", "title": "" }, { "docid": "5b50be507926e3dd2904eea56e3315ac", "score": "0.6578383", "text": "public function index()\n {\n\n $this->authorize('index', Payment::class);\n return response()->json([\n 'payments' => $this->payment->index( app()->make('request') )\n ]);\n // $payments = Paypalpayment::getAll(['count' => null, 'start_index' => 0], Paypalpayment::apiContext());\n \n // return response()->json([$payments->toArray()], 200);\n }", "title": "" }, { "docid": "47f5f347793d92111f06dd7009903d6f", "score": "0.6526241", "text": "public function index()\n {\n return response()->json(Payment::paginate(15), 200);\n }", "title": "" }, { "docid": "5c3756c3032ae606435e09cbbaab03da", "score": "0.6500965", "text": "public function actionIndex()\n {\n \n $model = new Paymentinvoice();\n $modelacc = new Accounts();\n \n $searchModel = new PaymentinvoiceSearch();\n $searchModelacc = new AccountsSearch();\n \n // $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $query = Paymentinvoice::find()->with('payer', 'supplier')->orderBy('created_at DESC');\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n \n return $this->render('index', [\n 'model' =>$model,\n 'modelacc' =>$modelacc,\n 'searchModel' => $searchModel,\n 'searchModelacc' => $searchModelacc,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "fe6bf781238505f74be15854fba07c75", "score": "0.6433558", "text": "public function index()\n {\n $payments = Payment::orderBy('created_at', 'desc')->paginate(10);\n return view('pages.payment.index', compact('payments'));\n }", "title": "" }, { "docid": "1dbc9613823803ed7229f6fd2fae17d4", "score": "0.6425809", "text": "public function index()\n {\n //\n $payments=Payment::all();\n return view('payment.index',compact('payments'));\n }", "title": "" }, { "docid": "7cebaa54c4225e442529b297d80605e8", "score": "0.6417846", "text": "public function index()\n {\n\n $payments = PaymentMethods::all();\n return view('admin.payment-method.index', ['payments' => $payments]);\n }", "title": "" }, { "docid": "d992fdcb640ddae56ede95d18b02c754", "score": "0.640815", "text": "public function index()\n {\n\t\t$payments = Payment::get();\n\n\t\treturn view('payments.index',compact('payments'));\n\t}", "title": "" }, { "docid": "47a0f9c51d23762b3a856c6a3fc22422", "score": "0.6405294", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ORFSStoreBundle:PaymentMethods')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "ab6a7981a7af8d37cc71f7fe6cc15bb5", "score": "0.6320512", "text": "public function index()\n {\n \n $payment = Payment::orderBy('id', 'ASC')->paginate(10);\n return response()->json($payment);\n\n }", "title": "" }, { "docid": "d3da02a421ec5c5ddd810b12f37fc79b", "score": "0.63061583", "text": "public function payments()\n {\n return $this->hasMany(Payment::class);\n }", "title": "" }, { "docid": "d3da02a421ec5c5ddd810b12f37fc79b", "score": "0.63061583", "text": "public function payments()\n {\n return $this->hasMany(Payment::class);\n }", "title": "" }, { "docid": "d3da02a421ec5c5ddd810b12f37fc79b", "score": "0.63061583", "text": "public function payments()\n {\n return $this->hasMany(Payment::class);\n }", "title": "" }, { "docid": "5f32892965df1675b9529e455d61eed0", "score": "0.62704897", "text": "public function index()\n {\n $payment_methods=Payment::all();\n return view('admin.payment_method',compact('payment_methods'));\n }", "title": "" }, { "docid": "f038d494687d2c5c93aa5828d1231823", "score": "0.62659055", "text": "public function index()\n {\n $payments=\\App\\Payment::latest()->get();\n return view('payments.index',compact('payments'));\n }", "title": "" }, { "docid": "506c3924326654141fd602c76ec8a696", "score": "0.6250862", "text": "public function index()\n {\n $pay_methods = Pay_method::all();\n return $pay_methods;\n }", "title": "" }, { "docid": "f8c99c06c3cb714925702f609ed0046f", "score": "0.6231223", "text": "public function index()\n {\n $payments = $this->paymentRepo->getAllPayment();\n return view('admin.pages.payment.index', compact('payments'));\n }", "title": "" }, { "docid": "84eaae4930ad58eccc537912eb2d0029", "score": "0.62294054", "text": "public function paymentList() {\n // Table header.\n $header = [\n 'id' => $this->t('Id'),\n 'title' => $this->t('Title'),\n 'txt_id' => $this->t('Trasaction Id'),\n 'amount' => $this->t('Amount'),\n 'status' => $this->t('Payment Status'),\n 'date' => $this->t('Payment Date'),\n ];\n\n $rows = [];\n\n $uid = $this->currentUser()->id();\n\n foreach (NPPObject::getAll($uid) as $payment) {\n $entity_id = $payment->entity_id;\n $entity = $this->entityTypeManager()->getStorage('node')->load($entity_id);\n $url = new Url('entity.node.canonical', ['node' => $entity_id]);\n $title = $entity->getTitle();\n // Row with attributes on the row and some of its cells.\n $rows[] = [\n 'data' => [\n $entity_id,\n $this->l($title, $url),\n $payment->txn_id,\n $payment->amount . ' ' . $payment->currency,\n $payment->status,\n ($payment->timestamp) ? \\Drupal::service('date.formatter')->format($payment->timestamp) : '',\n ],\n ];\n }\n\n $table = [\n '#type' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#attributes' => [\n 'id' => 'bd-contact-table',\n ],\n ];\n\n if (empty($rows)) {\n $no_record_message = '<div class=\"npp_no_record_message\">No Payment you have done yet.</div>';\n }\n\n $element = [\n '#markup' => \\Drupal::service('renderer')->render($table) . $no_record_message,\n ];\n\n return $element;\n }", "title": "" }, { "docid": "4467e8d9e982d489bdf92873eb8b74ee", "score": "0.6202979", "text": "public function getAllPayment($id)\n\t{\n\t\t$store = Store::where(\"id\",$id)->where(\"deleted\",0)->firstOrFail();\n\t\t$payments = $store->payments();\n\t\t$array=[\n\t\t\t'store'=>$store,\n\t\t\t'active'=>'store',\n\t\t\t'payments'=>$payments\n\t\t];\n\t\treturn view(\"store.all_payments\",$array);\n\t}", "title": "" }, { "docid": "08d41a05d9c0a59ab2dbc52586c48687", "score": "0.61939955", "text": "public function index()\n {\n $payments = Payment::all();\n $total = count($payments);\n\n $resource = new Collection($payments, new PaymentTransformer($total), 'payments');\n // need \"toArray()\" if not toArray() it will error: UnexpectedValueException, because -> createData() return an object.\n return $this->manager->createData($resource)->toArray();\n }", "title": "" }, { "docid": "96f98ddf96ad7f1a368533fa05f8099b", "score": "0.6190116", "text": "public function getAllPayments(): array\n {\n }", "title": "" }, { "docid": "93cd96788437f26369325a473ecd323f", "score": "0.61684114", "text": "public function payments()\n {\n return $this->hasMany('App\\Payment');\n }", "title": "" }, { "docid": "93cd96788437f26369325a473ecd323f", "score": "0.61684114", "text": "public function payments()\n {\n return $this->hasMany('App\\Payment');\n }", "title": "" }, { "docid": "3bf4a790dd13d76e9b89a52bfd94d666", "score": "0.6140492", "text": "public function index(Request $request)\n {\n return PaymentMethodResource::collection($request->user()->paymentMethods);\n }", "title": "" }, { "docid": "c01c20909ec1acc580e93b41981780ed", "score": "0.61122936", "text": "public function index()\n\t{\n\t\t$result = OrderModel::with('OrderDetail')\n\t\t->Search(Input::get('SOrderID'),Input::get('SFullName'),\n\t\t\tInput::get('SAdress'),Input::get('STel'),\n\t\t\t$this->conv_data_db(Input::get('SOrderDate')),$this->conv_data_db(Input::get('EOrderDate')),\n\t\t\t$this->conv_data_db(Input::get('SPaymantDate')),$this->conv_data_db(Input::get('EPaymantDate')),\n\t\t\t$this->conv_data_db(Input::get('SDeliveredDate')),$this->conv_data_db(Input::get('EDeliveredDate')),\n\t\t\t'2')\n\t\t->orderby('OrderDate','DESC')\n\t\t->paginate(20);\n\t\t$Payment1 = PaymentModel::get()->toArray();\n\t\t//$result = OrderModel::paginate(20);\n\t\t//echo \"<pre>\";print_r($Payment);echo \"</pre>\";\n\t\t$Payment = array();\n\t\tforeach ($Payment1 as $key => $value) {\n\t\t\t$Payment[$value['OrderID']] = $value['PaymentDate'];\n\t\t}\n\t\t//echo \"<pre>\";print_r($result);echo \"</pre>\";\n\t\treturn View::make(\"back_setup/Payment\",array('result'=>$result,'Payment'=>$Payment));\n\t}", "title": "" }, { "docid": "87bce634ff7cc5c8127623431cbc5db9", "score": "0.61094356", "text": "public function index()\n {\n $pay_types = Payment::all();\n return view('admin.employees.payments.index', compact('pay_types'));\n }", "title": "" }, { "docid": "87bce634ff7cc5c8127623431cbc5db9", "score": "0.61094356", "text": "public function index()\n {\n $pay_types = Payment::all();\n return view('admin.employees.payments.index', compact('pay_types'));\n }", "title": "" }, { "docid": "1e620262813f0d8e3d9653a46f37a32a", "score": "0.61085135", "text": "public function index()\n {\n\n if(Auth::user()->hasRole('admin')){\n $payments = Payment::paginate(15);\n }else{\n $payments = Payment::where('user_id',Auth::user()->id)->paginate(15);\n }\n\n $page_title = 'Payment Entry';\n $page_description = 'List of all Payment History';\n return view('pages.payment.list', compact('page_title', 'page_description','payments'));\n }", "title": "" }, { "docid": "f3db7ac43c861fd2a7c4bdc69fdbc6d8", "score": "0.6101647", "text": "public function index()\n {\n\n $pays = Payment::where('is_paid','=',0)->take(5)->orderBy('created_at','asc')->get();\n return view('admin.payments',['pays'=>$pays]);\n }", "title": "" }, { "docid": "9e2282c5fac983bc1088abb0f829c606", "score": "0.61006016", "text": "public function payments() {\n return $this->hasMany('App\\Models\\Payment', 'payment_invoiceid', 'bill_invoiceid');\n }", "title": "" }, { "docid": "b43ba6e3452914f87e275e41c10ff913", "score": "0.60998714", "text": "public function index()\n {\n $payments = payment::latest()->paginate(10);\n $cards = card::latest()->paginate(10);\n return view('payment.index', compact('payments', 'cards'))\n ->with('i', (request() -> input ('page', 1)-1)*10);\n }", "title": "" }, { "docid": "b6a00e2ddcfc5804f7ddd1013fa6292a", "score": "0.6096848", "text": "public function getPaymentAction()\n {\n /** @var PaymentTranslator $paymentTranslator */\n $paymentTranslator = $this->get('swag_backend_order.payment_translator');\n\n /** @var \\Shopware\\Components\\Model\\QueryBuilder $builder */\n $builder = $this->get('models')->createQueryBuilder();\n $builder->select(['payment'])\n ->from(Payment::class, 'payment')\n ->orderBy('payment.active', 'DESC');\n\n $paymentMethods = $builder->getQuery()->getArrayResult();\n\n $languageId = $this->getBackendLanguage();\n\n foreach ($paymentMethods as &$paymentMethod) {\n $paymentMethod = $paymentTranslator->translate($paymentMethod, $languageId);\n }\n unset($paymentMethod);\n\n $total = count($paymentMethods);\n\n $this->view->assign(\n [\n 'data' => $paymentMethods,\n 'total' => $total,\n 'success' => true,\n ]\n );\n }", "title": "" }, { "docid": "4a2e2bab1c78dc8aa782c7ad9e982ae9", "score": "0.609238", "text": "public function index()\n {\n $payments = Payment::orderBy('priority','asc')->get();\n\n return view('frontend.pages.checkouts',compact('payments'));\n }", "title": "" }, { "docid": "6514b956ba2abaa64b47a683a832a9d0", "score": "0.6061403", "text": "public function getAll()\n\t{\n\t\treturn $this->modelClass::all();\n\t}", "title": "" }, { "docid": "17cadd56413a917fe04904852fd60086", "score": "0.6060756", "text": "public function paymentAdminList() {\n\n // Table header.\n $header = [\n 'id' => $this->t('Id'),\n 'title' => $this->t('Title'),\n 'txt_id' => $this->t('Trasaction Id'),\n 'amount' => $this->t('Amount'),\n 'status' => $this->t('Payment Status'),\n 'date' => $this->t('Payment Date'),\n ];\n\n $rows = [];\n\n foreach (NPPObject::getAll() as $payment) {\n $entity_id = $payment->entity_id;\n $entity = $this->entityTypeManager()->getStorage('node')->load($entity_id);\n $url = new Url('entity.node.canonical', ['node' => $entity_id]);\n $title = $entity->getTitle();\n // Row with attributes on the row and some of its cells.\n $rows[] = [\n 'data' => [\n $entity_id,\n $this->l($title, $url),\n $payment->txn_id,\n $payment->amount . ' ' . $payment->currency,\n $payment->status,\n ($payment->timestamp) ? \\Drupal::service('date.formatter')->format($payment->timestamp) : '',\n ],\n ];\n }\n\n $table = [\n '#type' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n '#attributes' => [\n 'id' => 'bd-contact-table',\n ],\n ];\n\n if (empty($rows)) {\n $no_record_message = '<div class=\"npp_no_record_message\">No Record found.</div>';\n }\n\n $element = [\n '#markup' => \\Drupal::service('renderer')->render($table) . $no_record_message,\n ];\n\n return $element;\n }", "title": "" }, { "docid": "768f0d1eabc3e1de7a413e271d28203b", "score": "0.6056977", "text": "public function index()\n { \n $paymentTypes = PaymentType::all();\n return view('administrator.paymentTypes.index',compact('paymentTypes'));\n }", "title": "" }, { "docid": "a73773cd8637d167df5e56e6ba242199", "score": "0.6036948", "text": "public function getPayments()\n {\n return $this->hasMany(Payment::class, ['id_booking' => 'id']);\n }", "title": "" }, { "docid": "52a5f4ad40d65cf3e676d52a34cce86b", "score": "0.60361", "text": "public function payments(){\n\n return $this->hasMany('TanSAO\\Payment');\n }", "title": "" }, { "docid": "b9160a8cbfa480f5060d5aeb38c271bc", "score": "0.60132205", "text": "public function index()\n {\n abort_unless(\\Gate::allows('payment_access'), 403);\n\n $all_payments = Payment::all();\n $payments = array();\n foreach ($all_payments as $key => $payment) {\n if($payment['card_number']) {\n $payment['card_number'] = $this->mask_cc($payment['card_number']);\n }\n array_push($payments,$payment);\n }\n\n return view('admin.payments.index', compact('payments'));\n }", "title": "" }, { "docid": "b5340a46cc9c821c217d7f6ee779d6a7", "score": "0.6007", "text": "public function index()\n {\n $total_payments = Payment::count();\n $total_payments_price = Payment::sum('price');\n $month_payments = Payment::where('month', date('Y-m'))->count();\n $month_payments_price = Payment::where('month', date('Y-m'))->sum('price');\n $proccess_payments = Payment::where('status', 'processing')->count();\n $proccess_payments_price = Payment::where('status', 'processing')->sum('price');\n $done_payments = Payment::where('status', 'paid')->count();\n $done_payments_price = Payment::where('status', 'paid')->sum('price');\n $hold_payments = Payment::where('admin_status', 'hold')->count();\n $hold_payments_price = Payment::where('admin_status', 'hold')->sum('price');\n $billed_payments = Payment::where('admin_status', 'billed')->count();\n $billed_payments_price = Payment::where('admin_status', 'billed')->sum('price');\n $refund_payments = Payment::where('admin_status', 'refund')->count();\n $refund_payments_price = Payment::where('admin_status', 'refund')->sum('price');\n\n return view('backend.payments.index', [\n 'total_payments' => $total_payments,\n 'total_payments_price' => $total_payments_price,\n 'month_payments' => $month_payments,\n 'month_payments_price' => $month_payments_price,\n 'proccess_payments' => $proccess_payments,\n 'proccess_payments_price' => $proccess_payments_price,\n 'done_payments' => $done_payments,\n 'done_payments_price' => $done_payments_price,\n 'hold_payments' => $hold_payments,\n 'hold_payments_price' => $hold_payments_price,\n 'billed_payments' => $billed_payments,\n 'billed_payments_price' => $billed_payments_price,\n 'refund_payments' => $refund_payments,\n 'refund_payments_price' => $refund_payments_price,\n ]);\n }", "title": "" }, { "docid": "478078c37797a51a572b0ceb644f8e68", "score": "0.60053605", "text": "public function index()\n {\n // $payments=Payment::all();\n // return view('payment.index', compact('payments'));\n\n // $invoices=Invoice::all();\n $payments = DB::table('payments')\n ->leftJoin('chartaccounts', 'payments.chartaccount', '=', 'chartaccounts.id')\n ->leftJoin('accounts as name', 'payments.mainaccount', '=', 'name.id')\n ->leftJoin('subaccounts', 'payments.subaccount1', '=', 'subaccounts.subid')\n ->leftJoin('subaccounts as w2', 'payments.subaccount2', '=', 'w2.subid')\n ->leftJoin('subaccounts as w3', 'payments.subaccount3', '=', 'w3.subid')\n ->leftJoin('subaccounts as w4', 'payments.subaccount4', '=', 'w4.subid')\n ->leftJoin('subaccounts as w5', 'payments.subaccount5', '=', 'w5.subid')\n ->leftJoin('subaccounts as w6', 'payments.subaccount6', '=', 'w6.subid')\n ->select('payments.*', 'subaccounts.accountname as subaccount1n',\n 'name.name as name',\n 'chartaccounts.accountname as chartaccountn',\n 'w2.accountname as subaccount2n',\n 'w3.accountname as subaccount3n',\n 'w4.accountname as subaccount4n',\n 'w5.accountname as subaccount5n',\n 'w6.accountname as subaccount6n')\n ->get();\n return view('payment.index', compact('payments'));\n }", "title": "" }, { "docid": "d23859aadf3234b0d1f514615561d794", "score": "0.6004379", "text": "public function getAllData()\n {\n return DB::table('log_payment')->where('id', '=', 1)->paginate(10);\n }", "title": "" }, { "docid": "b98ec4690e800742957a658c7428b73d", "score": "0.60019636", "text": "public function index()\n {\n //$payments = Payment::all();\n $payments = Payment::where('user_id', auth()->user()->id)->get();\n\n return $this->sendResponse($payments, 'Payments retrieved successfully.');\n }", "title": "" }, { "docid": "8d1dd37a531bc7ac25bf37ce430658c1", "score": "0.60017127", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => SubscriberPayment::find(),\n 'sort' => ['defaultOrder' => ['created_at' => SORT_DESC]],\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "ee4cafe6951bcc4d21c09978988277be", "score": "0.5997977", "text": "public function index()\n {\n $this->authorize('show-payment');\n $payments = \\App\\Payment::orderBy('payment_date', 'desc')->with('donation.retreat')->paginate(100);\n //dd($donations);\n return view('payments.index', compact('payments'));\n }", "title": "" }, { "docid": "65fbe1cd513c1906884a8cf3b31fcaf5", "score": "0.5981637", "text": "public function list ()\n {\n $this->jsonResponse($this->model->findAll());\n }", "title": "" }, { "docid": "abfcc363dd6196d57d4d8229d97dc50f", "score": "0.5973721", "text": "public function index()\n {\n $payment = Payment::all()->sortByDesc('updated_at');\n $response = [\n 'status' => '200',\n 'message' => 'Ok',\n 'data' => PaymentResource::collection($payment)\n ];\n return response()->json($response, 200);\n }", "title": "" }, { "docid": "7e915ac869937a913750a9dafe6cdfdc", "score": "0.5959734", "text": "public function getPayments();", "title": "" }, { "docid": "e142e4a05c4cdf160b04329fbbd4ae71", "score": "0.59566414", "text": "public function index()\n {\n $a = PaymentOption::all();\n return Resource::collection($a);\n }", "title": "" }, { "docid": "d773bbc84dad9da4ecf4c37b1ca851f0", "score": "0.59308267", "text": "public function all()\n {\n return Model::all();\n }", "title": "" }, { "docid": "1641b46212883381fde4b229bfddb389", "score": "0.59294397", "text": "public function index()\n {\n return view('pagos.payment');\n }", "title": "" }, { "docid": "2a2b81b4cac71e45ef4bdb46d3f3c7b9", "score": "0.59249306", "text": "public function getAll()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "133ca5cade83ebd25c1996f7c9b74e04", "score": "0.5914308", "text": "public function index()\n {\n $payments = DB::table('payments')\n ->join('accounts', 'payments.fk_account', '=', 'accounts.id')\n ->select('payments.*', 'accounts.account_no','accounts.account_name')\n ->get();\n return view('admin.account.payments.index')->with('payments',$payments);\n }", "title": "" }, { "docid": "a47b08daa0c4961d5e9583e24ab11d0e", "score": "0.5900945", "text": "public function getPayments(){\n //initialisation of the method to get all the payments\n $payments = payment::all();\n \n //a method to call all the payments\n return response() ->json(['payments'=>$payments],200);\n\n\n }", "title": "" }, { "docid": "af93cb9222d76344640246a600730a0e", "score": "0.5899893", "text": "public function index()\n {\n\t\t$payments = Payment::join('suppliers', 'payments.supplier_id', '=', 'suppliers.id')\n\t\t\t\t\t\t\t\t\t->select('payments.*','suppliers.s_name', 'suppliers.credit')\n\t\t\t\t\t\t\t\t\t->get();\n\t\t\n\t\treturn compact('payments');\n }", "title": "" }, { "docid": "89172f25c812195094bd858c0a9786e4", "score": "0.58964735", "text": "public function index()\n\t{\n\t\t$mPUPaymentTransactions = MPUPaymentTransaction::with(['paymentUser', 'paymentReceiver'])->paginate(10);\n\n\t\treturn view('mPUPaymentTransactions.index')\n\t\t\t->with('mPUPaymentTransactions', $mPUPaymentTransactions);\n\t}", "title": "" }, { "docid": "abf7fcd2a542d21b68556ef7d125ea7d", "score": "0.58874166", "text": "public function getAll()\n {\n return $this->_model::all();\n }", "title": "" }, { "docid": "d7cfa3fa5990ee648c1f7c9042daeb31", "score": "0.58861977", "text": "public function index()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "423d95723a4b7213f80233aaa34bda46", "score": "0.5884137", "text": "public function payments()\n {\n return $this->hasManyThrough(Payment::class, Operation::class);\n }", "title": "" }, { "docid": "f7439c0615e1674a801b60f83ea73c7a", "score": "0.588259", "text": "public function payments()\n {\n return $this->morphMany(Payment::class, 'paymentable');\n }", "title": "" }, { "docid": "1ecdd959b240d912f087e391964ad441", "score": "0.5872246", "text": "public function getAll()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "df100ee2d11ee561df4c2994248b877f", "score": "0.58614033", "text": "public function index()\n {\n $courses = Course::latest()->paginate(20);\n $payment = Payment::SpanningPayment(12,true)->get();\n return view('admin.courses.all',compact(\"courses\"));\n }", "title": "" }, { "docid": "e16f211e54b4acadb46b4d6156fd7892", "score": "0.58600575", "text": "public function getAll()\n {\n $this->checkModel();\n }", "title": "" }, { "docid": "fdcabdc3a3a34c813f36c74b94cd2322", "score": "0.5859172", "text": "public function index()\n {\n $payment_methods = $this->payment_method->all();\n\n return view('master-admin.payment-method.index', ['payment_methods' => $payment_methods]);\n }", "title": "" }, { "docid": "feecd0548579dba2b50ff8d436aafba6", "score": "0.58491355", "text": "public function all()\n {\n return $this->model::all();\n }", "title": "" }, { "docid": "9e49ebeee7f99c25788273262c0c1ff1", "score": "0.5848957", "text": "public function index(Request $request)\n {\n $payments = Payment::index();\n return view('payments.index', compact('payments'));\n }", "title": "" }, { "docid": "163090ef9cedfb5a0687f8f75c86e05e", "score": "0.5844472", "text": "public function paymentmethods() {\n return $this->belongsTo ( PaymentMethod::class );\n }", "title": "" }, { "docid": "40908ac57d699d15c167c3c99b547894", "score": "0.58423585", "text": "public function index()\n {\n return $this->model->all();\n }", "title": "" }, { "docid": "29c49c2458e5db795fccf546318c613a", "score": "0.5836745", "text": "public function index(Request $request)\n {\n // Extract filters values\n $tax_id = $request->get('tax_id');\n $state_id = $request->get('state_id');\n $county_id = $request->get('county_id');\n\n // Assemble primary DB query\n $query = Payment::with(['tax', 'county', 'county.state']);\n if ($tax_id) {\n $query->where('tax_id', $tax_id);\n if ($state_id) {\n if ($county_id) {\n $query->where('county_id', $county_id);\n } else {\n // First load all counties\n $counties = County::where('state_id', $state_id)->get();\n $counties_plucked = $counties->pluck('id');\n $query->whereIn('county_id', $counties_plucked->toArray());\n }\n }\n }\n $payments = $query->paginate(10);\n\n // We will also need TAX rates data\n $rates_data = State::getTaxesRatesOverview();\n\n return view(\n 'mgmt.payments.list',\n [\n 'payments' => $payments,\n 'rates_data' => $rates_data,\n 'current_tax_id' => $tax_id,\n 'current_state_id' => $state_id,\n 'current_county_id' => $county_id,\n ]\n );\n }", "title": "" }, { "docid": "535d145c89f994b83274c522bf2abc28", "score": "0.58228546", "text": "public function getAll()\n {\n return $this->model->orderBy('id', 'DESC')->get();\n }", "title": "" }, { "docid": "494ed28d0542aeefb8c405fbd491663e", "score": "0.581532", "text": "public function all()\r\n {\r\n return $this->model->get();\r\n }", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.5814621", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.5814621", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "bec9fc65b5fc294bc432e40203265f4a", "score": "0.5814621", "text": "public function getAll()\n\t{\n\t\treturn $this->model->all();\n\t}", "title": "" }, { "docid": "702048ea5257c7f3e1f0bc6b3442c969", "score": "0.5812331", "text": "public function getAll()\n {\n return $this->model->paginate(\\Config::get('app.limit'));\n }", "title": "" }, { "docid": "5e62eb8cedc8ad2641808c3ae0608ed6", "score": "0.5808919", "text": "public function index()\n {\n $paymentMethod = PaymentMethod::all();\n //$paymentMethod = PaymentMethod::all()->where($paymentMethod->softDelete,false);\n return response()->json($paymentMethod);\n }", "title": "" }, { "docid": "fa5f1a3cc0b07cbead3e8f318f8c2ad3", "score": "0.5807506", "text": "public function index(Request $request)\n {\n if ($select = request()->query('list')) {\n return $this->mpesaBulkPaymentRepository->listAll($this->formatFields($select));\n } else\n $data = MpesaBulkPaymentResource::collection($this->mpesaBulkPaymentRepository->getAllPaginate());\n return $this->respondWithData($data);\n }", "title": "" }, { "docid": "a1c06ef47c6448124e5dd2a2069feb6a", "score": "0.5806299", "text": "public function getAll()\n {\n return $this->model->orderBy('id', 'desc')->get();\n }", "title": "" }, { "docid": "e41249ce341cb131c5e03dcd594d5a88", "score": "0.5797722", "text": "public static function getAll(){\n return Model::factory(__CLASS__)\n ->order_by_asc('date')\n ->find_many();\n }", "title": "" }, { "docid": "a8f1cfa7d27b3f4fabd9e7e088fdd676", "score": "0.57942843", "text": "public function get_all_payment_data()\n\t{\n\t\t$this->db->select('accounts.*, ie_heads.head_title');\n\t\t$this->db->from('accounts');\n\t\t$this->db->join('ie_heads','accounts.ie_head = ie_heads.id');\n\t\t$this->db->where('accounts.account_type','payment')->where('accounts.status', 'a');\n\t\t$result = $this->db->order_by('id', 'desc')->get()->result();\n\n\t\tif($result){\n\t\t\treturn $result;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "a2cd531768d3c1b38ce7b598803420cf", "score": "0.57914263", "text": "public function index()\n {\n $payment_methods = Payment_Method::paginate(env('PAGINATE_SIZE'));\n\n if($payment_methods->first()){\n return $this->respond($payment_methods);\n } else{\n return $this->respondNotFound('Oops! no hay Medios de Pago');\n }\n }", "title": "" }, { "docid": "9d07b6c8e9c33ae3587d0a92f62b8851", "score": "0.57894725", "text": "public function index()\n {\n return Transaction::all();\n }", "title": "" }, { "docid": "5ebcb190cd8f75d8fd93fe6997b8609e", "score": "0.5782706", "text": "public function index()\n {\n $payment_methods = PaymentMethod::where('module_status', '=', 1)->get();\n return view('paymentmethodsetting::index', compact('payment_methods'));\n }", "title": "" }, { "docid": "2b881b6dfbfc5081f4a47b80d23cc205", "score": "0.5777849", "text": "public function index()\n {\n $modelList = ModoPago::all();\n return $this->sendResponse($modelList, \"LISTA DE MODO PAGOS RECUPERADA\");\n }", "title": "" }, { "docid": "c5cb0eee7d143e996a23de40badd9a22", "score": "0.5773896", "text": "public function list(){\n\t\t\t\n\t\t\t$customermodel = new Customer();\n\t\t\t$data = $customermodel->All();\n\n\t\t\tinclude_once('views/customer/list.php');\n\t\t}", "title": "" }, { "docid": "1fdaa93c7c461b294d9868725ae14d0f", "score": "0.5770993", "text": "public function index()\n {\n //\n $loan_payments=LoanPayment::all();\n return view('loanpayment.all')->with(['loanPayments'=>$loan_payments]);\n\n }", "title": "" }, { "docid": "102f8a49c87b091f66aa02ed74d75cea", "score": "0.5764212", "text": "public function all()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "f421c60540d4441a369f26a94c5f9c0f", "score": "0.57628053", "text": "public function index()\n {\n $view = view('point-purchasing::app.purchasing.point.fixed-assets.payment-order.index');\n $list_payment_order = FixedAssetsPaymentOrder::joinFormulir()->notArchived()->selectOriginal()->orderByStandard();\n $list_payment_order = FixedAssetsPaymentOrderHelper::searchList($list_payment_order, \\Input::get('date_from'), \\Input::get('date_to'), \\Input::get('search'));\n $view->list_payment_order = $list_payment_order->paginate(100);\n return $view;\n }", "title": "" }, { "docid": "fa97d69841d43785b5c0f212be5dd352", "score": "0.5760112", "text": "public function index()\n {\n if (! Gate::allows('bank_payment_access')) {\n return abort(401);\n }\n\n\n $bank_payments = BankPayment::all();\n\n return view('admin.bank_payments.index', compact('bank_payments'));\n }", "title": "" } ]
0f6bda5f81dec9c8ec45383b68aac47e
region "Get & set"
[ { "docid": "337727d09c7e7e8583ebdb928f468b7a", "score": "0.0", "text": "public function getId()\n\t{\n\t\treturn $this->id;\n\t}", "title": "" } ]
[ { "docid": "5f243afbf0e4b744d494368621edb3d6", "score": "0.7158831", "text": "public function getset($key, $value);", "title": "" }, { "docid": "3d1975087b310895dc9cfb4dfe1b62bf", "score": "0.69193697", "text": "abstract protected function get();", "title": "" }, { "docid": "3d1975087b310895dc9cfb4dfe1b62bf", "score": "0.69193697", "text": "abstract protected function get();", "title": "" }, { "docid": "7979f78c1fa51270b02029f96b70ffb7", "score": "0.6883443", "text": "public function getSet($key, $value) {}", "title": "" }, { "docid": "35f8ff218e4c2a5ffd6533829018fd5f", "score": "0.68696386", "text": "abstract protected function _get();", "title": "" }, { "docid": "8b70cde59fbf9db8dd650beace370f5d", "score": "0.6779909", "text": "public function getSet($key, $value) { }", "title": "" }, { "docid": "66af83cdcd03f677ae290b1e6e584692", "score": "0.67191094", "text": "function get()\n {\n }", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.6714829", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.6714829", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.6714829", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.6714829", "text": "abstract public function get();", "title": "" }, { "docid": "8158a471118e315d59ced41e99200d8a", "score": "0.65876424", "text": "public function __set($name,$value){\r\n return $this->set($name,$value);\r\n }", "title": "" }, { "docid": "696b3e558d50ec05e84078f9a83d0d16", "score": "0.6578153", "text": "function get()\n {\n\n\n }", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6550535", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6550535", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6550535", "text": "public static function setters();", "title": "" }, { "docid": "acf410ed6ad720575a2a43675358557d", "score": "0.6550535", "text": "public static function setters();", "title": "" }, { "docid": "9389326f81acab9807758ce0ef1cfb9b", "score": "0.64592344", "text": "function setValue($m);", "title": "" }, { "docid": "9389326f81acab9807758ce0ef1cfb9b", "score": "0.64592344", "text": "function setValue($m);", "title": "" }, { "docid": "122400ab00413260210d1fda6b1e3e45", "score": "0.6446179", "text": "public function get ();", "title": "" }, { "docid": "f45b14c386a4400fcabef2d47849fa76", "score": "0.64429855", "text": "function __set($nm, $value)\n {\n echo \"Property name is - $nm<br> Value is - $value\";\n }", "title": "" }, { "docid": "27c849017a79a0eaadffc92800387043", "score": "0.6427302", "text": "function __set($name, $value) { return $this->set($name, $value); }", "title": "" }, { "docid": "f0b59e857a09ad01e06f2f1a0700b13e", "score": "0.64180994", "text": "public function __set($name, $value) {}", "title": "" }, { "docid": "30c6778740fd99d75a4710e316fcfada", "score": "0.63884735", "text": "public function set($value) {}", "title": "" }, { "docid": "331f7485c4f12cc09c765ce210fc49aa", "score": "0.63745767", "text": "function set($key, $value);", "title": "" }, { "docid": "6a386048cfe0afb08ca560116fd151a8", "score": "0.6372504", "text": "public static function get();", "title": "" }, { "docid": "9f441dcd6fcca201412845c75c744913", "score": "0.6319135", "text": "abstract function set($name, $value);", "title": "" }, { "docid": "fa97f46c3bdd4f10b40a90f356e7a2b2", "score": "0.62867486", "text": "public function __set($key, $value) {}", "title": "" }, { "docid": "7237241153c31e2fb3a325920f287e3a", "score": "0.62769276", "text": "public abstract function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62420636", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.62403375", "text": "public function get();", "title": "" }, { "docid": "10d378d15db0b0f87e4a989ee93a59fb", "score": "0.6238184", "text": "public function __set($name, $value);", "title": "" }, { "docid": "2d0559995e4e364b3cb80cb0b9b9cb02", "score": "0.61977637", "text": "public function setGet($name, $value)\n {\n $this->get[$name] = $value;\n }", "title": "" }, { "docid": "70f81c7a47d87eddf2ba6837d21aa08c", "score": "0.61949277", "text": "abstract public function set($name, $value);", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.6193843", "text": "public function set($value);", "title": "" }, { "docid": "b76b97201b2dcff516912811113b1a1d", "score": "0.61864734", "text": "function set($key,$val) {\n\t\treturn $this->document[$key]=$val;\n\t}", "title": "" }, { "docid": "ebb4ccdae48bb5d90eaeb09535dc92c3", "score": "0.6176215", "text": "public function set( $key, $value );", "title": "" }, { "docid": "36e1c47beaf620a64ca0a4aa1e917982", "score": "0.6172739", "text": "public function set($key, $value) {}", "title": "" }, { "docid": "36e1c47beaf620a64ca0a4aa1e917982", "score": "0.6172739", "text": "public function set($key, $value) {}", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.6171792", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.6171792", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.6171792", "text": "public function set($name, $value);", "title": "" }, { "docid": "30fada460675e1e916265113e5e7e860", "score": "0.6171792", "text": "public function set($name, $value);", "title": "" }, { "docid": "215f6ec065a77fd5cb5a1b082fedeaa5", "score": "0.6146858", "text": "static function set($name, $value)\n {\n self::$__data[$name] = $value;\n return $value;\n }", "title": "" }, { "docid": "8e80f11a382b3c0a56ba1d35d038cf9b", "score": "0.61144", "text": "public function __set($key, $value);", "title": "" }, { "docid": "ee3e88f416316c3ca7718437f6aeb52b", "score": "0.6089971", "text": "function setValue($value);", "title": "" }, { "docid": "a649b50e2754c10edf7b8a68cc338f37", "score": "0.60564387", "text": "public function set($key, $value, $type = 'GET');", "title": "" }, { "docid": "aa59e7d585c70b434510a9c940f2ec5a", "score": "0.60284287", "text": "abstract public function get(): mixed;", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6021252", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6021252", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6021252", "text": "public static function getters();", "title": "" }, { "docid": "a4f4d3d40bcaa246b079dddfe54537df", "score": "0.6021252", "text": "public static function getters();", "title": "" }, { "docid": "487cdea2614a6ea3700e9cf3ccb4e36f", "score": "0.6003217", "text": "function set($name, $value)\n {\n if( !$this->changed )\n $prev = $this->get($name,null); \n $this->data[$name] = $value;\n if( $this->session_name )\n $_SESSION[$this->session_name][$name] = $value;\n if( !$this->changed ) \n $this->changed = ($prev !== $value);\n return $value;\n }", "title": "" }, { "docid": "bcf1169ade8c8e86f1fa6e987e2d64b9", "score": "0.599279", "text": "public function __get($var);", "title": "" }, { "docid": "4b90bab25757a70be100e9784bd2f6cb", "score": "0.598892", "text": "public function set(string $name, $value);", "title": "" }, { "docid": "d3ba358d4dda7adb463048383f33908b", "score": "0.5983581", "text": "public function get() {}", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.59767485", "text": "public function set($key, $value);", "title": "" } ]
9370798449288ffa7d43a2993c072f60
/ Register the 'primary' sidebar.
[ { "docid": "44d98646699282a947bcb910959d3b2a", "score": "0.7387882", "text": "function my_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'primary',\n 'name' => ( 'Primary Sidebar' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '',\n //'after_widget' => '</div></div>',\n //'before_title' => '<div class=\"sidebar-heading\"> <h2>',\n // 'after_title' => '</div></h2>',\n )\n );\n /* Repeat register_sidebar() code for additional sidebars. */\n}", "title": "" } ]
[ { "docid": "ffefc1f12592d0af0f3cca1909afc60a", "score": "0.8460263", "text": "function basetheme_insert_primary_sidebar() {\n\n\tget_sidebar( 'primary' ); // Loads the sidebar-primary.php template.\n\t \n}", "title": "" }, { "docid": "3e09799a46480e23b2fb09f3ae286b42", "score": "0.7855431", "text": "function add_main_sidebar() {\n register_sidebar(array(\n 'name' => 'Main sidebar',\n 'description' => 'This is the main sidebar that may used in every where in the template.',\n 'id' => 'main-sidebar',\n 'class' => 'main-sidebar',\n 'before_widget' => '<div class=\"widget\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3><div class=\"widget-body\">',\n\n ));\n}", "title": "" }, { "docid": "a7fa2d38d7054935b21961c29d4b163a", "score": "0.77105457", "text": "function legendaryposeidon_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'primary',\n 'name' => __( 'Primary Sidebar' ),\n 'description' => __( 'They told me I did not need this.' ),\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}", "title": "" }, { "docid": "1043305ec126ab72ab7b330f482a7ccb", "score": "0.76141036", "text": "function get_primary_sidebar() {\n\tif ( is_active_sidebar( 'sidebar1' ) ) {\n\t\tdynamic_sidebar( 'sidebar1' );\n\t}\n}", "title": "" }, { "docid": "a99fd42a47feacbee68abc184b5614f4", "score": "0.7575231", "text": "function sidebar_init(){\n register_sidebar(\n array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar-1',\n 'class' => 'custom',\n 'description' => 'Standard sidebar',\n 'before_widget' => '<div class=\"widgetRow\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h1 class=\"widgetTitle\">',\n 'after_title ' => '</h1>',\n )\n );\n }", "title": "" }, { "docid": "9065ef4a52057476771f52e6b2e0754c", "score": "0.7484563", "text": "function my_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'primary',\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 }", "title": "" }, { "docid": "5a34d0314e99c050ef04895575726161", "score": "0.7428189", "text": "function main_page_sidebar()\n {\n register_sidebar(\n [\n 'name' => __('ناحیه ابزارک اصلی', 'persian_bourse'),\n 'id' => 'main_page_sidebar',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ]\n );\n\n // Register widgets\n register_widget('Persian_Recent_Posts');\n register_widget('Persian_Side_Tab');\n register_widget('Persian_Side_Video');\n }", "title": "" }, { "docid": "c8908ced13ac401b6ea3cd067b16e430", "score": "0.7415272", "text": "function yourfitness_sidebar_primary_template() {\n\n\tif ( stripos( yourfitness_get_layout(), 'sp' ) === false || !yourfitness_has_widget_area( 'sidebar-a' ) )\n\t\treturn;\n\n\tget_sidebar( 'a' );\n\n}", "title": "" }, { "docid": "e313746589e9aa986ee583f1e9b80ffb", "score": "0.74014145", "text": "function my_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'primary',\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}", "title": "" }, { "docid": "5d1f682a0d1f3cf052d4a334b12b0b2e", "score": "0.7269746", "text": "function function_register_sidebars() \n{\n register_sidebar( array(\n 'name' => __( 'Main Sidebar Area', LANG ),\n 'id' => 'sidebar-main',\n 'description' => __( 'Despliega el sidebar Principal', LANG ),\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": "1526069308f886fca3bfc1b9e76c7896", "score": "0.71475726", "text": "function my_register_sidebars() {\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'primary',\n\t\t\t'name' => __( 'Primary Sidebar' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n\t\n\t/* Register the secondary sidebar. */\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'secondary',\n\t\t\t'name' => __( 'Secondary Sidebar' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n\t\n\t \n\t\n\t\n\t/* Repeat register_sidebar() code for additional sidebars. */\n}", "title": "" }, { "docid": "9732d957bea9f978323166d9427653ca", "score": "0.7119691", "text": "static function wpbucket_custom_sidebar() {\n $args_sidebar = array(\n 'name' => esc_html__( 'Main Sidebar', 'yowel' ),\n 'id' => 'blog-sidebar-id',\n 'description' => esc_html__( 'Main Sidebar', 'yowel' ),\n 'class' => 'widget',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget_title\"><span>',\n 'after_title' => '</span></h4>'\n );\n\n register_sidebar( $args_sidebar );\n }", "title": "" }, { "docid": "ede574d2e53d0711b1402f3bfc51c64c", "score": "0.7116417", "text": "function custom_landing_page_sidebar() {\n register_sidebar(\n array (\n 'name' => __( 'Landing Page Sidebar', 'synack' ),\n 'id' => 'custom-side-bar',\n 'description' => __( 'Custom Sidebar', 'synack' ),\n 'before_widget' => '<div class=\"widget-content\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n}", "title": "" }, { "docid": "5161c0ffbfbe42551d723983078539c9", "score": "0.7114785", "text": "function basetheme_insert_secondary_sidebar() {\n\n\tget_sidebar( 'secondary' ); // Loads the sidebar-secondary.php template.\n\t \n}", "title": "" }, { "docid": "d03e0eeb83a21ea5a16e27c823bb7090", "score": "0.70927334", "text": "function string_theory_sidebar_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Top Sidebar', 'stringtheory' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => __( 'Horizontal sidebar that appears on the top.', 'stringtheory' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => __( 'Footer Widget Area', 'stringtheory' ),\n\t\t'id' => 'sidebar-3',\n\t\t'description' => __( 'Appears in the footer section of the site.', 'stringtheory' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "title": "" }, { "docid": "2188a5a3a839283867ce75f231c80c72", "score": "0.70765316", "text": "function CFCC2018_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Primary Widget Area', 'CFCC2018' ),\n\t\t'id' => 'primary-widget-area',\n\t\t'description' => __( 'The primary widget area', 'CFCC2018' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '<hr />',\n\t\t'before_title' => '<h5>',\n\t\t'after_title' => '</h5>',\n\t) );\n}", "title": "" }, { "docid": "f49684d18cc43109722d32e8eb5e9ad1", "score": "0.7065633", "text": "function basetheme_insert_subsidiary_sidebar() {\n\n\tget_sidebar( 'subsidiary' );\n\t \n}", "title": "" }, { "docid": "d51fa3559f928c9275dead6eb198d45c", "score": "0.7049233", "text": "function _widgets_init()\n{\n\n register_sidebar( array(\n 'name' => 'Left sidebar',\n 'id' => 'left_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n}", "title": "" }, { "docid": "e3e3c7abe54d5f3c5f05559177c5dc77", "score": "0.7039581", "text": "function register_custom_widget_sidebar(){\n\tregister_sidebar(array(\n\t\t'name'=>__('Primary Sidebar1','theme_name'),\n\t\t'id'=>'sidebar-1',\n\t\t'before_widget'=>'<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget'=>'</aside>',\n\t\t'before_title'=>'<h1 class=\"widget-title\">',\n\t\t'after_title'=>'</h1>',\n\t));\n\tregister_sidebar(array(\n\t\t'name'=>__('Primary Sidebar3','theme_name'),\n\t\t'id'=>'sidebar-3',\n\t\t'before_widget'=>'<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget'=>'</aside>',\n\t\t'before_title'=>'<h1 class=\"widget-title\">',\n\t\t'after_title'=>'</h1>',\n\t));\n\tregister_sidebar(array(\n\t\t'name'=>__('Primary Sidebar2','theme_name'),\n\t\t'id'=>'sidebar-2',\n\t\t'before_widget'=>'<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget'=>'</aside>',\n\t\t'before_title'=>'<h1 class=\"widget-title\">',\n\t\t'after_title'=>'</h1>',\n\t));\n}", "title": "" }, { "docid": "3b511b05f5c56922f8b4bd753b07359a", "score": "0.70129895", "text": "function my_register_sidebars() {\n register_sidebar(\n array(\n 'name' => 'main Sidebar',\n\t\t\t'id' => 'main-sidebar',\n\t\t\t'description' => 'Widgets for the main sidebar.',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4>',\n\t\t\t'after_title' => '</h4>'\n )\n );\n}", "title": "" }, { "docid": "05a3f49d7ff9454aa58a1b99cde2fefc", "score": "0.7010817", "text": "function underscores_starter_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'underscores_starter' ),\n\t\t'id' => 'main-sidebar',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "title": "" }, { "docid": "2687a88cd3efab559b5191151ab05ccc", "score": "0.69950455", "text": "function rw_widgets_init() {\n // Located at the top of the sidebar.\n register_sidebar( array(\n 'name' => __( 'Sidebar', 'rotorwash' ),\n 'id' => 'primary-widget-area',\n 'description' => __( 'The primary widget area', 'rotorwash' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "title": "" }, { "docid": "596463dc61ceb141d8f4427d609b99aa", "score": "0.6993775", "text": "public function sidebar_init() {\n\n\t\tregister_sidebar( array(\n\t\t\t'name' => 'Custom sidebar',\n\t\t\t'id' => 'custom_sidebar_1',\n\t\t\t'before_widget' => '<div>',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t\t'after_title' => '</h2>',\n\t\t) );\n\n\t}", "title": "" }, { "docid": "b7fbafa414737bd0b4ac46df7a41ec50", "score": "0.6991854", "text": "function sidebar(){\n register_sidebar( // esta funcion nos sirve para registrar un widget que sera despues llamado en el frontend para mostrarlo\n // con la funcion dynamic_sidebar, la cual necesita el id registrado\n array(\n 'name' => 'Pie de página', // nombre de la zona de widgets a registrar\n 'id' => 'footer', // id con el cual se mostrará\n 'description' => 'Zona de Widgets para pie de página', // descripcion de la zona de widget\n 'before_title' => '<p class=\"d-none\">', // html antes del titulo de la zona del widget\n 'after_tile' => '</p>', // html de fin del titulo\n 'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">', // devuelve las clases y id pertinentes por si solo wordpress\n 'after_widget' => '</div>'\n )\n );\n}", "title": "" }, { "docid": "a9ba00c68256e6710b22d7dfbfd2836d", "score": "0.69807905", "text": "function ob_sidebar() {\n\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' => 'Student Sidebar',\n\t\t\t'id' => 'ob-sidebar',\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t'after_title' => '</h4>',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "29b20170b023437a6a9b90f55d42c5f4", "score": "0.697517", "text": "function katerynacustomtheme_widgets_init() {\n register_sidebar([\n 'name' => esc_html__( 'Main Sidebar', 'katerynacustomtheme'),\n 'id' => 'main-sidebar',\n 'description' => esc_html__( 'Add widgets for main sidebar here', 'katerynacustomtheme' ),\n 'before_widget' => '<section class=\"widget\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>',\n ]);\n}", "title": "" }, { "docid": "d11ca52a2e8afe75e29a9c1bd62b765c", "score": "0.6942958", "text": "function my_register_sidebars() {\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'primary',\n\t\t\t'name' => __( 'Primary Sidebar' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n\t\n\t\n\t/* Register the mid-page widget area. */\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'mid-page',\n\t\t\t'name' => __( 'Mid-Page Widget Area' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n\t\n\t/* Register the lower-page widget area. */\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'lower-page',\n\t\t\t'name' => __( 'Lower-Page Widget Area' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n\t\n}", "title": "" }, { "docid": "cca31c66c5e5fb661083a841c7feff45", "score": "0.69326216", "text": "function tlh_register_sidebars() {\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'sidebar1',\n\t\t\t'name' => __( 'Sidebar 1' ),\n\t\t\t'description' => __( 'The first (primary) sidebar.' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t\t'after_title' => '</h4>',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "a23cd34187a63a6324a6304a0def43db", "score": "0.6911047", "text": "function growup_sidebar_init(){\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' => esc_html__( 'Growup Sidebar', 'growuptheme'),\n\t\t\t'id' => 'growup-sidebar',\n\t\t\t'description' => 'Dynamic Right Sidebar',\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"growup-widget %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h2 class=\"growup-widget-title\">',\n\t\t\t'after_title' => '</h2>'\n\t\t)\n\t);\n}", "title": "" }, { "docid": "888c34ce9a1f8f565b1f5749443762b3", "score": "0.68856853", "text": "function widgets_init() {\r\n register_sidebar( array(\r\n 'name' => 'Sidebar Widget Area',\r\n 'id' => 'sidebar-widget-area',\r\n 'description' => 'The sidebar widget area',\r\n 'before_widget' => '',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<div class=\"sidebar-head\">\r\n\t\t\t \t<h3>',\r\n 'after_title' => '</h3></div><div class=\"sidebar widget\">',\r\n ) );\r\n \r\n}", "title": "" }, { "docid": "aa2a9d96affb2f5c590e4e440cde1a2f", "score": "0.68658364", "text": "function register_sidebar_locations() {\n register_sidebar(\n array(\n 'id' => 'blog-sidebar',\n 'name' => __( 'Blog Sidebar' ),\n 'description' => __( 'sidebar op blog' ),\n \n )\n );\n register_sidebar(\n array(\n 'id' => 'recept-sidebar',\n 'name' => __( 'Recept Sidebar' ),\n 'description' => __( 'sidebar op recepten pagina' ),\n \n )\n );\n register_sidebar(\n array(\n 'id' => 'footer',\n 'name' => __( 'Footer' ),\n 'description' => __( 'sidebar in footer' ),\n \n )\n );\n /* Repeat register_sidebar() code for additional sidebars. */\n}", "title": "" }, { "docid": "2098907b1f7b1758822f69ac3c678ff7", "score": "0.6864422", "text": "function inkpro_sidebars_init() {\r\n\r\n\t\t// Blog Sidebar\r\n\t\tregister_sidebar(\r\n\t\t\tarray(\r\n\t\t\t\t'name' \t\t=> esc_html__( 'Blog Sidebar', 'inkpro' ),\r\n\t\t\t\t'id' \t\t=> 'sidebar-main',\r\n\t\t\t\t'description' \t\t=> esc_html__( 'Appears in blog pages if it contains widgets', 'inkpro' ),\r\n\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t'after_widget' \t\t=> '</div></aside>',\r\n\t\t\t\t'before_title' \t \t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t'after_title' \t \t=> '</h3>',\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t// Page Sidebar\r\n\t\tregister_sidebar(\r\n\t\t\tarray(\r\n\t\t\t\t'name' \t\t=> esc_html__( 'Page Sidebar', 'inkpro' ),\r\n\t\t\t\t'id' \t\t=> 'sidebar-page',\r\n\t\t\t\t'description' \t\t=> esc_html__( 'Appears in pages if it contains wigets', 'inkpro' ),\r\n\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"clearfix widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t'after_widget'\t\t=> '</div></aside>',\r\n\t\t\t\t'before_title' \t\t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t'after_title' \t\t=> '</h3>',\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t// Woocommerce Siderbar\r\n\t\tif ( class_exists( 'Woocommerce' ) ) {\r\n\t\t\tregister_sidebar(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' \t\t=> esc_html__( 'Shop Sidebar', 'inkpro' ),\r\n\t\t\t\t\t'id' \t\t=> 'woocommerce',\r\n\t\t\t\t\t'description' \t\t=> esc_html__( 'Appears in WooCommerce pages if a layout with sidebar is set', 'inkpro' ),\r\n\t\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t\t'after_widget' \t=> '</div></aside>',\r\n\t\t\t\t\t'before_title' \t\t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t\t'after_title' \t\t=> '</h3>',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Discography Siderbar\r\n\t\tif ( class_exists( 'Wolf_Discography' ) ) {\r\n\t\t\tregister_sidebar(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' \t\t=> esc_html__( 'Discography Sidebar', 'inkpro' ),\r\n\t\t\t\t\t'id' \t\t=> 'sidebar-discography',\r\n\t\t\t\t\t'description' \t\t=> esc_html__( 'Appears on the discography pages if a layout with sidebar is set', 'inkpro' ),\r\n\t\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t\t'after_widget' \t\t=> '</div></aside>',\r\n\t\t\t\t\t'before_title' \t\t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t\t'after_title' \t\t=> '</h3>',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Videos Siderbar\r\n\t\tif ( class_exists( 'Wolf_Videos' ) ) {\r\n\t\t\tregister_sidebar(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' \t\t=> esc_html__( 'Videos Sidebar', 'inkpro' ),\r\n\t\t\t\t\t'id' \t\t=> 'sidebar-videos',\r\n\t\t\t\t\t'description' \t\t=> esc_html__( 'Appears on the videos pages if a layout with sidebar is set', 'inkpro' ),\r\n\t\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t\t'after_widget' \t\t=> '</div></aside>',\r\n\t\t\t\t\t'before_title' \t\t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t\t'after_title' \t\t=> '</h3>',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Albums Siderbar\r\n\t\tif ( class_exists( 'Wolf_Albums' ) ) {\r\n\t\t\tregister_sidebar(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' \t\t=> esc_html__( 'Albums Sidebar', 'inkpro' ),\r\n\t\t\t\t\t'id' \t\t=> 'sidebar-albums',\r\n\t\t\t\t\t'description' \t\t=> esc_html__( 'Appears on the albums pages if a layout with sidebar is set', 'inkpro' ),\r\n\t\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t\t'after_widget' \t\t=> '</div></aside>',\r\n\t\t\t\t\t'before_title' \t\t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t\t'after_title' \t\t=> '</h3>',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Events Siderbar\r\n\t\tif ( class_exists( 'Wolf_Events' ) ) {\r\n\t\t\tregister_sidebar(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'name' \t\t=> esc_html__( 'Events Sidebar', 'inkpro' ),\r\n\t\t\t\t\t'id' \t\t=> 'sidebar-events',\r\n\t\t\t\t\t'description' \t\t=> esc_html__( 'Appears on the events pages if a layout with sidebar is set', 'inkpro' ),\r\n\t\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t\t'after_widget' \t\t=> '</div></aside>',\r\n\t\t\t\t\t'before_title' \t\t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t\t'after_title' \t\t=> '</h3>',\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t// Footer Sidebar\r\n\t\tregister_sidebar(\r\n\t\t\tarray(\r\n\t\t\t\t'name' \t\t=> esc_html__( 'Footer Widget Area', 'inkpro' ),\r\n\t\t\t\t'id' \t\t=> 'sidebar-footer',\r\n\t\t\t\t'description' \t\t=> esc_html__( 'Appears in the footer section of the site', 'inkpro' ),\r\n\t\t\t\t'before_widget' \t=> '<aside id=\"%1$s\" class=\"widget %2$s\"><div class=\"widget-content\">',\r\n\t\t\t\t'after_widget'\t\t=> '</div></aside>',\r\n\t\t\t\t'before_title' \t\t=> '<h3 class=\"widget-title\">',\r\n\t\t\t\t'after_title' \t\t=> '</h3>',\r\n\t\t\t)\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "329cb6c6beb79e28263d889eccb7866f", "score": "0.6857354", "text": "function shbase_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'Main Sidebar', 'shbase' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</div>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "title": "" }, { "docid": "56860c71cce8c9dd1840033621924a5d", "score": "0.68407506", "text": "function creare_boilerplate_widgets_init() {\n\t\n\t// Primary sidebar area\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'creare-boilerplate' ),\n\t\t'id' => 'sidebar-1',\n\t\t'description' => '',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<p class=\"widget-title\">',\n\t\t'after_title' => '</p>',\n\t) );\n\t\n\t// Secondary sidebar area\n\tregister_sidebar( array(\n\t\t'name' => __( 'Secondary Sidebar', 'creare-boilerplate' ),\n\t\t'id' => 'sidebar-2',\n\t\t'description' => '',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<p class=\"widget-title\">',\n\t\t'after_title' => '</p>',\n\t) ); \n\t\n\t// Additional sidebar area, uncomment if needed\n\t/* register_sidebar( array(\n\t\t'name' => __( 'Additional Sidebar', 'creare-boilerplate' ),\n\t\t'id' => 'sidebar-3',\n\t\t'description' => '',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) ); */\n}", "title": "" }, { "docid": "370af8fbb3d49f1bd64c570e818524f5", "score": "0.68370193", "text": "function silver_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'silver' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "title": "" }, { "docid": "aa4116685d137936810973533971fafb", "score": "0.6834534", "text": "function basetheme_insert_feature_sidebar() {\n\n\tget_sidebar( 'feature' ); // Loads the sidebar-primary.php template.\n\t \n}", "title": "" }, { "docid": "7e6956e816586420f669f9ce3176bb62", "score": "0.68283796", "text": "private function _register_sidebars()\n {\n register_sidebar(\n array(\n 'name' => 'Homepage Sidebar',\n 'id' => 'homepage_sidebar',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n )\n );\n }", "title": "" }, { "docid": "aaf919174db8fe8c6684eb09da4b1b77", "score": "0.6810959", "text": "function klippe_mikado_register_sidebars() {\n\t\t\n\t\tregister_sidebar(\n\t\t\tarray(\n\t\t\t\t'id' => 'sidebar',\n\t\t\t\t'name' => esc_html__( 'Sidebar', 'klippe' ),\n\t\t\t\t'description' => esc_html__( 'Default Sidebar', 'klippe' ),\n\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t'before_title' => '<div class=\"mkdf-widget-title-holder\"><h4 class=\"mkdf-widget-title\">',\n\t\t\t\t'after_title' => '</h4></div>'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "46a2bbb087fe75d2181e44ba087c755f", "score": "0.680354", "text": "function wpyaml_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar1',\n\t\t'name' => __('Sidebar 1', 'wpyaml'),\n\t\t'description' => __('The first (primary) sidebar.', 'wpyaml'),\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>',\n\t\t'after_title' => '</h4>',\n\t));\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\tregister_sidebar(array(\n\t\t'id' => 'sidebar2',\n\t\t'name' => __('Sidebar 2', 'wpyaml'),\n\t\t'description' => __('The second (secondary) sidebar.', 'wpyaml'),\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\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\t*/\n}", "title": "" }, { "docid": "9683a795efb5d2d82dfcd703029be04d", "score": "0.67861855", "text": "function gridster_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'themefurnace' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<div class=\"sidebarwidget\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3 class=\"sidetitle\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "title": "" }, { "docid": "10f3653e1261902ba22fdc00fff00bfd", "score": "0.677807", "text": "function joints_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar1',\n\t\t'name' => __('Sidebar 1', 'jointswp'),\n\t\t'description' => __('The first (primary) 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\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\t// legacy sidebars - may need refactor\n\n\t/* add a widget area to the expanding top bar - relates to sidebar-titlebar.php */\n\n\tregister_sidebar(array(\n\t\t'id' => 'titlebar',\n\t\t'name' => __('Title Bar', 'jointswp'),\n\t\t'description' => __('The top title bar widget 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 /* add widgets for home page grid*/\n\n\tregister_sidebar(array(\n\t\t'id' => 'home_grid1',\n\t\t'name' => __('Home Grid One', 'jointswp'),\n\t\t'description' => __('The home widget grid, position one.', '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' => 'home_grid2',\n\t\t'name' => __('Home Grid Two', 'jointswp'),\n\t\t'description' => __('The home widget grid, position two.', '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' => 'home_grid3',\n\t\t'name' => __('Home Grid Three', 'jointswp'),\n\t\t'description' => __('The home widget grid, position three.', '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' => 'home_grid4',\n\t\t'name' => __('Home Grid Four', 'jointswp'),\n\t\t'description' => __('The home widget grid, position four.', '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' => 'home_grid5',\n\t\t'name' => __('Home Grid Five', 'jointswp'),\n\t\t'description' => __('The home widget grid, position five.', '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' => 'home_grid6',\n\t\t'name' => __('Home Grid Six', 'jointswp'),\n\t\t'description' => __('The home widget grid, position six.', '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\t/* adds banner for featured article widget for news page */\n\tregister_sidebar(array(\n\t\t'id' => 'featured_article',\n\t\t'name' => __('Featured Article', 'jointswp'),\n\t\t'description' => __('The news sidebar on the left.', '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 /* adds side bar widget for news page */\n\tregister_sidebar(array(\n\t\t'id' => 'news_sidebar',\n\t\t'name' => __('News Sidebar', 'jointswp'),\n\t\t'description' => __('The news sidebar on the left.', '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/* adds side bar widget for Help page */\n\tregister_sidebar(array(\n\t\t'id' => 'help_sidebar',\n\t\t'name' => __('Help Sidebar', 'jointswp'),\n\t\t'description' => __('The Customer Support 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\t/* adds side bar widget for Help page */\n\tregister_sidebar(array(\n\t\t'id' => 'event_sidebar',\n\t\t'name' => __('Event Sidebar', 'jointswp'),\n\t\t'description' => __('The Customer Support 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\t\n\t/* adds widget with countdown timer*/\n\tregister_sidebar(array(\n\t\t'id' => 'countdown_grid',\n\t\t'name' => __('Countdown Grid', 'jointswp'),\n\t\t'description' => __('The home widget grid, countdown.', '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\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": "4086056e21912c08fc9773fedf936308", "score": "0.67773765", "text": "function register_malaika_sidebars(){\n\n\tregister_sidebar(array(\n\t\t'name' => __('Primary'),\n\t\t'id' => __('Sidebar_1'),\n\t\t'description' => __( 'A short description of the sidebar_1.' ),\n\n\t\t));\n\tregister_sidebar(array(\n\t\t'name' => __('Sidebar 2'),\n\t\t'id' =>__('Sidebar_2'),\n\t\t'description' => __( 'A short description of the Sidebar_2.' ),\n\n\t\t));\n}", "title": "" }, { "docid": "e5f8a6bfaaa3ae259c8b763694fe556f", "score": "0.67674774", "text": "function bones_register_sidebars() {\n register_sidebar(array(\n 'id' => 'sidebar1',\n 'name' => __( 'Sidebar 1', 'bonestheme' ),\n 'description' => __( 'The first (primary) sidebar.', 'bonestheme' ),\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}", "title": "" }, { "docid": "b33c31a7581c9eed1733c13e9627f747", "score": "0.67667615", "text": "public function register_sidebar() {\r\n\r\n register_sidebar(\r\n array(\r\n 'id' => 'wp-mega-menu',\r\n 'name' => __(\"WP Mega Menu Pro Widgets\", APMM_PRO_TD),\r\n 'description' => __(\"Do not manually edit this area.\", APMM_PRO_TD)\r\n )\r\n );\r\n }", "title": "" }, { "docid": "41d5cd47526b04125283df0e6072512a", "score": "0.67632765", "text": "function je_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Front Page',\n 'id' => 'je_front_page',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n\n}", "title": "" }, { "docid": "e6e336b396234d6a82669d90a430318f", "score": "0.6745737", "text": "function inline_do_sidebar() {\n\n\tif ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( 'Sidebar One' ) ) {\n\t\techo '<div class=\"widget text-widget\">';\n\t\t\techo '<h3 class=\"widget-title\">';\n\t\t\t\t_e( 'Primary Sidebar Area', 'inline' );\n\t\t\techo '</h3>';\n\t\t\techo '<p>';\n\t\t\t\tprintf( __( 'This is the primary sidebar area. Go to your <a href=\"%s\">Widgets Panel</a> and start dragging in widgets to make the sidebar active.', 'inline' ), admin_url( 'widgets.php' ) );\n\t\t\techo '</p>';\n\t\techo '</div><!--end .text-widget-->';\n\t}\n\n}", "title": "" }, { "docid": "274246e1795a9ff4ef71a5c6a6de2ba1", "score": "0.6726832", "text": "function add_sidebars_init() {\t\n\tregister_sidebar(array(\n\t\t'name' => __('Home Page Hero', 'roots'),\n\t\t'id' => 'jumbo',\n\t\t'description' => __( 'Used to place slider on the home page', 'roots' ),\n\t\t'before_widget' => '<section id=\"hero\" class=\"custom-jumbotron jumbotron\"><div class=\"container\"><div class=\"feature-bg container\"></div> ',\n\t\t'after_widget' => '</div></section>',\n\t\t'before_title' => '<h1 style=\"display:none;\" class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t)); \n \tregister_sidebar(array(\n\t\t'name' => __('Left Sidebar', 'roots'),\n\t\t'id' => 'left-sidebar',\n\t\t'description' => __( 'Creates widgetized area underneath sidenav', 'roots' ),\n\t\t'before_widget' => '<section class=\"widget %1$s %2$s\"><div class=\"widget-inner\">',\n\t\t'after_widget' => '</div></section>',\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 Widgets 1', 'roots'),\n\t\t'id' => 'footer-widgets-1',\n\t\t'description' => __( 'Creates widgetized area on home page', 'roots' ),\n\t\t'before_widget' => '<section class=\"widget %1$s %2$s\"><div class=\"widget-inner\">',\n\t\t'after_widget' => '</div></section>',\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 Menu', 'roots'),\n\t\t'id' => 'footer-widgets-2',\n\t\t'description' => __( 'Used to display menu in footer', 'roots' ),\n\t\t'before_widget' => '<section class=\"widget %1$s %2$s\"><div class=\"widget-inner\">',\n\t\t'after_widget' => '</div></section>',\n\t\t'before_title' => '<h3 class=\"widget-title\" style=\"display:none;\">',\n\t\t'after_title' => '</h3>',\n\t)); \n\tregister_sidebar(array(\n\t\t'name' => __('Footer Widgets 3', 'roots'),\n\t\t'id' => 'footer-widgets-3',\n\t\t'description' => __( 'Used to place copyright, site map & privacy policy, and social media links in footer', 'roots' ),\n\t\t'before_widget' => '<section class=\"widget %1$s %2$s\"><div class=\"widget-inner\">',\n\t\t'after_widget' => '</div></section>',\n\t\t'before_title' => '<h3 class=\"widget-title\" style=\"display:none;\">',\n\t\t'after_title' => '</h3>',\n\t)); \t\n\tregister_sidebar(array(\n\t\t'name' => __('Mobile Footer Widgets', 'roots'),\n\t\t'id' => 'mobile-footer-widgets',\n\t\t'description' => __( 'Used to provide mobile only widgets which display Quick Links, Press, and Social Media icons', 'roots' ),\n\t\t'before_widget' => '<section class=\"widget %1$s %2$s\"><div class=\"widget-inner\">',\n\t\t'after_widget' => '</div></section>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t)); \n register_sidebar(array(\n\t\t'name' => __('Utility Sidebar', 'roots'),\n\t\t'id' => 'utility-sidebar',\n\t\t'description' => __( 'An extra sidebar to allow us to place content on pages (an example are the posts appearing on Press page)', 'roots' ),\n\t\t'before_widget' => '<section class=\"widget %1$s %2$s\"><div class=\"widget-inner\">',\n\t\t'after_widget' => '</div></section>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n )); \n}", "title": "" }, { "docid": "4f48bec39a8d36e6f1a4c8c8e60479a5", "score": "0.67267865", "text": "function theme_widgets_init()\n{\n\tregister_sidebar(array(\n\t\t'name' => 'Right Sidebar',\n\t\t'id' => 'sidebar-primary',\n\t\t'before_widget' => '<div class=\"widget-right\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2>',\n\t\t'after_title' => '</h2>',\n\t));\n}", "title": "" }, { "docid": "3988f5616645119e2778348b501658d4", "score": "0.6726471", "text": "function wp_arch_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Sidebar', 'wp_arch_A' ),\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}", "title": "" }, { "docid": "8a28ab6adecb18709f1eb2a056cd8c2d", "score": "0.67234904", "text": "function smallwins_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Sidebar', 'smallwins' ),\n 'id' => 'sidebar',\n 'before_widget' => '<section 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": "57de3585de1ed2dc86ea5c3dc6d8feae", "score": "0.67229354", "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": "ce37fcb67be2fbf12dea83bac864ccd9", "score": "0.6716904", "text": "function 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\t);\n\tregister_sidebar(\n\t\tarray_merge(\n\t\t\t$shared_args,\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Footer #1', 'boomradio' ),\n\t\t\t\t'id' => 'sidebar-1',\n\t\t\t\t'description' => __( 'Widgets in this area will be displayed in the first column in the footer.', 'twentytwenty' ),\n\t\t\t)\n\t\t)\n\t);\n\tregister_sidebar(\n\t\tarray_merge(\n\t\t\t$shared_args,\n\t\t\tarray(\n\t\t\t\t'name' => __( 'Footer #2', 'boomradio' ),\n\t\t\t\t'id' => 'sidebar-2',\n\t\t\t\t'description' => __( 'Widgets in this area will be displayed in the second column in the footer.', 'twentytwenty' ),\n\t\t\t)\n\t\t)\n\t);\n register_sidebar(\n array_merge(\n $shared_args,\n array(\n 'name' => __( 'Footer #3', 'boomradio' ),\n 'id' => 'sidebar-3',\n 'description' => __( 'Widgets in this area will be displayed in the second column in the footer.', 'twentytwenty' ),\n )\n )\n );\n}", "title": "" }, { "docid": "17b45e76aca3f67fa62f31dae35ec4b8", "score": "0.67134345", "text": "function mytheme_widget_setup(){\r\n\tregister_sidebar(\r\n\t\tarray(\r\n\t\t\t'name' => 'Sidebar',\r\n\t\t\t'id' => 'sidebar-1',\r\n\t\t\t'class' => 'custom',\r\n\t\t\t'description' => 'Standard Sidebar',\r\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t\t'after_widget' => '</aside>',\r\n\t\t\t'before_widget' => '<h1 class=\"widget-title\">',\r\n\t\t\t'before_widget' => '</h1>',\r\n\t\t\t)\r\n\t\t);\r\n}", "title": "" }, { "docid": "7eae0e82921a0dfbef03c76103e39bb5", "score": "0.67059666", "text": "function joints_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar1',\n\t\t'name' => __('Sidebar 1', 'jointstheme'),\n\t\t'description' => __('The first (primary) sidebar.', 'jointstheme'),\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', 'jointstheme'),\n\t\t'description' => __('The offcanvas sidebar.', 'jointstheme'),\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\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', 'jointstheme'),\n\t\t'description' => __('The second (secondary) sidebar.', 'jointstheme'),\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": "eb2f0ce9a32cf6c5d8428460e55db5eb", "score": "0.6702631", "text": "function ronald_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n}", "title": "" }, { "docid": "530c2965cfb669d73bcd65679862eb8f", "score": "0.6701044", "text": "function base_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'base' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n}", "title": "" }, { "docid": "90236784a30d90e2ceecdb21aee674f8", "score": "0.6699018", "text": "function churchy_sidebar(){\n\tget_sidebar();\n}", "title": "" }, { "docid": "7091d67f1fbfd0e000eb7d3887f4e9ab", "score": "0.66903025", "text": "function my_register_sidebars() {\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'primary',\n\t\t\t'name' => __( 'Primary Sidebar' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n\n\t/* Register the secondary sidebar. */\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'id' => 'sticky-nav',\n\t\t\t'name' => __( 'Sticky Nav' ),\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'description' => ( 'Sticky Sidebar' ),\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t\t'after_title' => '</h3>'\n\t\t)\n\t);\n /* Register the search sidebar. */\n register_sidebar(\n array(\n 'id' => 'search',\n 'name' => __( 'Search 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\t// /* Register the footer widget area. */\n\t// register_sidebar(\n\t// \tarray(\n\t// \t\t'id' => 'foot',\n\t// \t\t'name' => __( 'Footer Widget Area' ),\n\t// \t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t// \t\t'after_widget' => '</div>',\n\t// \t\t'before_title' => '<h3 class=\"widget-title\">',\n\t// \t\t'after_title' => '</h3>'\n\t// \t)\n\t// );\n\n\n\t/* Repeat register_sidebar() code for additional sidebars. */\n}", "title": "" }, { "docid": "8ac29fa946b556348f999c96072a722e", "score": "0.66844124", "text": "function archive_page_sidebar()\n {\n register_sidebar(\n [\n 'name' => __('ناحیه ابزارک برگه آرشیو', 'persian_bourse'),\n 'id' => 'archive_page_sidebar',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ]\n );\n register_widget('persian_category');\n }", "title": "" }, { "docid": "e02efa23c972b07243ebd81ef2f0e94e", "score": "0.6683864", "text": "function sii_widgets_init() {\n // example register_sidebar, not actually used anywhere on Front End (yet?)\n\tregister_sidebar( array(\n\t\t'name' => 'Sidebar',\n\t\t'id' => 'sidebar_1',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h3>',\n\t\t'after_title' => '</h3>',\n\t) );\n\n}", "title": "" }, { "docid": "d6fffcbb8017a14d886190d1ca044763", "score": "0.66747004", "text": "function register_widget_areas()\n{\n register_sidebar([\n 'id' => 'sidebar',\n 'name' => __('Sidebar', config('textdomain')),\n 'description' => __('Website sidebar', config('textdomain')),\n 'before_title' => '<h5>',\n 'after_title' => '</h5>',\n ]);\n}", "title": "" }, { "docid": "4956921b0ada13a979daddde5280f62b", "score": "0.6672018", "text": "function solarity_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar1',\n\t\t'name' => __( 'Sidebar 1', 'solarity' ),\n\t\t'description' => __( 'The first (primary) sidebar.', 'solarity' ),\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' => 'blog',\n\t\t'name' => __( 'Blog Sidebar', 'solarity' ),\n\t\t'description' => __( 'The blog sidebar.', 'solarity' ),\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' => 'single',\n\t\t'name' => __( 'Single Sidebar', 'solarity' ),\n\t\t'description' => __( 'The single post sidebar.', 'solarity' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t));\n\n\t/*\n\tReference the banner sidebar with sidebar-banner.php\n\n\t*/\n}", "title": "" }, { "docid": "f4b64aebbbf24e3328f3ce293dc9dfa0", "score": "0.6669832", "text": "function roots_display_sidebar() {\n $sidebar_config = new Roots_Sidebar(\n \n // Conditional tag checks\n array(\n 'is_404',\n 'is_front_page'\n ),\n \n //Page template checks (via is_page_template())\n array(\n 'page-custom.php',\n 'page-fullwidth.php',\n 'page-featured.php',\n 'page-product.php',\n 'page-landing.php'\n )\n );\n\n return $sidebar_config->display;\n}", "title": "" }, { "docid": "0da34046d29d9f998c188da07cc46f43", "score": "0.6658528", "text": "function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'newwpwebsite' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'newwpwebsite' ),\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": "f78c5c9e372b546876bea70fe3ef89f2", "score": "0.66582346", "text": "function eruma_ichi_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'eruma_ichi' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</aside>\",\n\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t'after_title' => '</h1>',\n\t) );\n }", "title": "" }, { "docid": "2f4bd256eb15e9f12beb046efc55d450", "score": "0.66548955", "text": "function arphabet_widgets_init() {\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}", "title": "" }, { "docid": "e3c81f252d6df8682891633845601474", "score": "0.6642184", "text": "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n\n }", "title": "" }, { "docid": "f0873d5207105f449cfccfa6b39b7453", "score": "0.66394466", "text": "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar_blog',\n 'before_widget' => '<div class=\"sidebar-module\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>',\n ) );\n}", "title": "" }, { "docid": "dedc60cd93199bd30be54d1998644bdc", "score": "0.6638884", "text": "function perfection_sidebars() {\n\n\t$args = array(\n\t\t'id' => 'main-sidebar',\n\t\t'class' => 'main-sidebar-area',\n\t\t'name' => __( 'Main Sidebar', 'perfection' ),\n\t\t'description' => __( 'on default layout and located on right side on blog posts', 'perfection' ),\n\t\t'before_title' => '<h5>',\n\t\t'after_title' => '</h5>',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"card my-4 %2$s\">',\n\t\t'after_widget' => '</div>',\n\t);\n\tregister_sidebar( $args );\n\n\t$args = array(\n\t\t'id' => 'sidebar-contact',\n\t\t'class' => 'sidebar-contact-area',\n\t\t'name' => __( 'Footer Widget Area', 'perfection' ),\n\t\t'description' => __( 'This is the contact widget in the footer area.', 'perfection' ),\n\t\t'before_title' => '<h4>',\n\t\t'after_title' => '</h4>',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"card my-4 %2$s\">',\n\t\t'after_widget' => '</div>',\n\t);\n\tregister_sidebar( $args );\n\n\t$args = array(\n\t\t'id' => 'sidebar-secondary',\n\t\t'class' => 'sidebar-secondary-area',\n\t\t'name' => __( 'Sidebar Secondary Widget', 'perfection' ),\n\t\t'description' => __( 'Widget that displays on blog posts.', 'perfection' ),\n\t\t'before_title' => '<h5>',\n\t\t'after_title' => '</h5>',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"card my-4 %2$s\">',\n\t\t'after_widget' => '</div>',\n\t);\n\tregister_sidebar( $args );\n\n}", "title": "" }, { "docid": "b30d2fe4a1cc39c47256facd1397c2f8", "score": "0.6621093", "text": "function pew_register_sidebars() {\n register_sidebar(array(\n 'id' => 'sidebar1',\n 'name' => __( 'Sidebar', 'pew' ),\n 'description' => __( 'Arrastra aquí los elementos de tu sidebar.', 'pew' ),\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 /*\n to add more sidebars or widgetized areas, just copy\n and edit the above sidebar code. In order to call\n your new sidebar just use the following code:\n\n Just change the name to whatever your new\n sidebar's id is, for example:\n\n register_sidebar(array(\n 'id' => 'sidebar2',\n 'name' => __( 'Sidebar 2', 'pew' ),\n 'description' => __( 'The second (secondary) sidebar.', 'pew' ),\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 To call the sidebar in your template, you can just copy\n the sidebar.php file and rename it to your sidebar's name.\n So using the above example, it would be:\n sidebar-sidebar2.php\n\n */\n}", "title": "" }, { "docid": "a5f70ce5d0597e5769fc5b0e60759674", "score": "0.6619294", "text": "function Gymstudio_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));\nregister_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}", "title": "" }, { "docid": "7bc27d91a5325cb9d64a53884df7c9b6", "score": "0.66105807", "text": "function simple_bootstrap_widget_init() {\n register_sidebar( array(\n 'name' => __('Main Sidebar', 'simple_bootstrap'),\n 'id' => 'main-sidebar',\n 'description' => __('Widgets added here will appear in all pages using the template Two Column Template', 'simple_bootstrap'),\n 'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after-title' => '</h2>'\n ));\n}", "title": "" }, { "docid": "126e6dcbc5c651e0ef1ab6b3ab7d8e09", "score": "0.66001326", "text": "function OurWidgetsInit() {\n //Pro kalendář na sidebaru napravo\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<section>',\n\t\t 'after_widget' => '</section>',\n ));\n register_sidebar( array(\n 'name' => 'Sidebar - údaje o škole',\n 'id' => 'sidebar2',\n 'before_widget' => '<section>',\n 'after_widget' => '</section>',\n)); \n //Pro galerii dole\n register_sidebar( array(\n 'name' => 'Footer - galerie',\n 'id' => 'footer-galerie',\n 'before_widget' => '<section>',\n\t\t 'after_widget' => '</section>',\n )); \n}", "title": "" }, { "docid": "e6c99f69468b92d3ed273229bec76503", "score": "0.6594193", "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": "e6c99f69468b92d3ed273229bec76503", "score": "0.6594193", "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": "431d2a9083483bba8fb200a541060d27", "score": "0.6592439", "text": "function hereditary_widgets_init() {\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '<h1>',\n 'after_title' => '</h1>',\n ) );\n\n register_sidebar( array(\n 'name' => 'Page Sidebar',\n 'id' => 'page-sidebar',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n register_sidebar( array(\n 'name' => 'Footer',\n 'id' => 'footer',\n 'before_widget' => '<div class=\"card\"><div class=\"card-block\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h1 class=\"card-title\">',\n 'after_title' => '</h1>',\n ) );\n\n\n}", "title": "" }, { "docid": "43192606e7761766785b0892996f7774", "score": "0.6584145", "text": "function vuetiful_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Page Sidebar', 'vuetiful' ),\n\t\t'id' => 'page_sidebar', \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}", "title": "" }, { "docid": "e0e606d92307fb28255bb4cb4a92f687", "score": "0.6581874", "text": "function zilla_sidebars_init() {\n register_sidebar(array(\n 'name' => __('Main Sidebar', 'zilla'),\n 'description' => __('Widget area for blog pages.', 'zilla'),\n 'id' => 'sidebar-main',\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(array(\n 'name' => __('Upper Home Page', 'zilla'),\n 'description' => __('Widget area for the home page.', 'zilla'),\n 'id' => 'upper-home-page',\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(array(\n 'name' => __('Lower Home Page', 'zilla'),\n 'description' => __('Widget area for the home page.', 'zilla'),\n 'id' => 'lower-home-page',\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": "03b5501b5e4d95e735a08a25f412707c", "score": "0.6563337", "text": "function cws_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'CWS Primary Sidebar', 'set-slug' ),\n\t\t'id' => 'set-sidebar',\n\t\t'description' => __( 'Widgets in this area will be shown on all posts and pages, except frontpage.', 'theme-slug' ),\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=\"widgettitle\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => __( 'CWS Secondary Sidebar', 'set-slug' ),\n\t\t'id' => 'set-sidebar-two',\n\t\t'description' => __( 'This is a secondary sidebar to house widgets after a page break.', 'theme-slug' ),\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=\"widgettitle\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "title": "" }, { "docid": "f04f387f29eea59c3e04e7f33995bc36", "score": "0.65576494", "text": "function arphabet_widgets_init() {\r\n\r\n register_sidebar(\r\n array(\r\n 'name' => __( 'Primary Widget Area', 'twentyten' ),\r\n 'id' => 'primary-widget-area',\r\n 'description' => __( 'Add widgets here to appear in your sidebar.', 'twentyten' ),\r\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\r\n 'after_widget' => '</li>',\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>',\r\n )\r\n );\r\n\r\n}", "title": "" }, { "docid": "b414e9e794b55e4061b914fb1d77ea61", "score": "0.65557635", "text": "function front_page_widget_areas() {\n\n register_sidebar( array(\n \"name\" => \"Front Page Tools Section\",\n \"id\" => \"front_page_tools_sidebar\",\n \"before_widget\" => \"<div>\",\n \"after_widget\" => \"</div>\"\n ) );\n\n}", "title": "" }, { "docid": "0819b7a8cfdeeaa6f9f07d4c24a9a28d", "score": "0.654226", "text": "public static function registerSidebars()\n {\n /**\n * PLEASE BE SURE TO PREFIX ALL ID'S WITH 'envoy-'\n */\n \n register_sidebar(array(\n 'id' => 'envoy-header',\n 'name' => 'Header',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => ''\n ));\n \n register_sidebar(array(\n 'id' => 'envoy-sidebar-left',\n 'name' => 'Left Sidebar',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n \n register_sidebar(array(\n 'id' => 'envoy-sidebar-right',\n 'name' => 'Right Sidebar',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>'\n ));\n \n register_sidebar(array(\n 'id' => 'envoy-footer',\n 'name' => 'Footer',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => ''\n ));\n }", "title": "" }, { "docid": "9cdf7fbb12614e6d8547936ca404cffb", "score": "0.65421176", "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}", "title": "" }, { "docid": "bf80444d93b8a27458dcce4e412f6fad", "score": "0.65140903", "text": "function bravodms_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => __( 'Sidebar', 'bravodms' ),\n\t\t'id' => 'sidebar-1',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</aside>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>',\n\t) );\n}", "title": "" }, { "docid": "eb1116c9306e46677f4483dd8d370fc6", "score": "0.65057254", "text": "function awesome_widget_setup(){\n\n\tregister_sidebar(\n\n\t\tarray(\n\t\t\t'name' => 'Sidebar ',\n\t\t\t'id' => 'sidebar-1',\n\t\t\t'description' => 'Standard Sidebar',\n\t\t\t'class' => '',\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' => '<h2 class=\"widget-title\">',\n\t\t\t'after_title' => '</h2>',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "d15b275c142a57bf65a0dde547147206", "score": "0.6493341", "text": "function wpdocs_theme_slug_widgets_init(){\n\n// adding custom right sidebar\n\tregister_sidebar(array(\n\t\t'name'=>\"Right Sidebar\",\n\t\t'id'=>'right-sidebar',\n\t\t'description'=>\"this is my right 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=\"widgettitle\">',\n\t\t'after_title'=>'</h2>'));\n\n\n// adding left custom sidebar\n\tregister_sidebar(array(\n\t\t'name'=>\"Left Sidebar\",\n\t\t'id'=>'left-sidebar',\n\t\t'description'=>\"this is my left 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=\"widgettitle\">',\n\t\t'after_title'=>'</h2>'));\n}", "title": "" }, { "docid": "1a3404c95302623af08a3a7a24e20416", "score": "0.64905053", "text": "function kl1_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Home Main Menu Widget',\n\t\t'id' => 'home_main_widget',\n\t\t'before_widget' => '<div class=\"c_signup\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4>',\n\t\t'after_title' => '</h4>',\n\t) );\n\n register_sidebar( array(\n 'name' => 'Right Sidebar Widget Area',\n 'id' => 'right_sidebar_widget',\n 'before_widget' => '<div class=\"widget__sidebar\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>',\n ) );\n\n}", "title": "" }, { "docid": "01a02c247277c60931056c6ccbb43857", "score": "0.6484153", "text": "function inline_sidebar_structure_start() {\n\n\tdo_action( 'inline_before_main_sidebar' );\n\techo '<div id=\"sidebar\">';\n\techo '<div class=\"sidebar widget-area\">';\n\tdo_action( 'inline_before_main_sidebar_widgets' );\n\n}", "title": "" }, { "docid": "6ba28d2e8983e62874777ce9ec664fbe", "score": "0.6483938", "text": "function base_theme_widgets_init() {\n\t// Area 1, located at the top of the sidebar.\n\tregister_sidebar( array(\n\t\t'name' => 'Primary Widget Area',\n\t\t'id' => 'primary-widget-area',\n\t\t'description' => 'The primary 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\n}", "title": "" }, { "docid": "cfc892ee6fe20fbdd563a3fdb5f93f65", "score": "0.6483874", "text": "function zax_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Home right sidebar 1',\n\t\t'id' => 'sidebar-1',\n\t\t'description' => '',\n \t'class' => '',\n\t\t'before_widget' => '<div class=\"panel panel-default\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<div class=\"panel-heading\">',\n\t\t'after_title' => '</div>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Home footer 1',\n\t\t'id' => 'sidebar-2',\n\t\t'description' => '',\n \t'class' => '',\n\t\t'before_widget' => '<div class=\"panel panel-default\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<div class=\"panel-heading\">',\n\t\t'after_title' => '</div>',\n\t) );\n}", "title": "" }, { "docid": "66921673cf2d97e40b519948894ba1fc", "score": "0.64812785", "text": "function start_side() {\n\t?>\n\t<div id=\"sidebar\">\n\t<?php\n}", "title": "" }, { "docid": "73cf30c73d0648b31e2856e76557742b", "score": "0.6474096", "text": "function sidebar(){\n\t\t\t$data = array(\n\t\t\t\t'name_first' => $this->userInfo('name_first'),\n\t\t\t\t'name_last' => $this->userInfo('name_last')\n\t\t\t);\n\t\t\treturn $this->build_template($this->get_template(\"sidebar\"),$data);\n\t\t}", "title": "" }, { "docid": "8cbd9e192b76a428849c7c9346681106", "score": "0.64735264", "text": "function handcraftedwp_widgets_init() {\r\n\tregister_sidebar( array (\r\n\t\t'name' => __( 'Sidebar', 'themename' ),\r\n\t\t'id' => 'sidebar',\r\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\" role=\"complementary\">',\r\n\t\t'after_widget' => \"</aside>\",\r\n\t\t'before_title' => '<h4 class=\"widget-title\">',\r\n\t\t'after_title' => '</h4>',\r\n\t) );\r\n}", "title": "" }, { "docid": "5e18bd5d6e1062d4d0f9c12212eb08f2", "score": "0.6471589", "text": "function aton_qodef_header_standard_widget_areas() {\n register_sidebar(array(\n 'name' => esc_html__('Right From Main Menu', 'aton'),\n 'id' => 'qodef-right-from-main-menu',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s qodef-right-from-main-menu-widget\">',\n 'after_widget' => '</div>',\n 'description' => esc_html__('Widgets added here will appear on the right hand side from the main menu', 'aton')\n ));\n }", "title": "" }, { "docid": "19e3d593b19667cca707af08c454041b", "score": "0.64633566", "text": "public function register_sidebars() {\r\n\t\t// Sidebar Widgets\r\n\t\t// Location: left or right side\r\n\t\tregister_sidebar( array(\r\n\t\t\t'name' => 'home-right',\r\n\t\t\t'before_widget' => '<div class=\"widget-area widget-sidebar\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h4>',\r\n\t\t\t'after_title' => '</h4>',\r\n\t\t) );\r\n\r\n\t\t// Footer Widgets\r\n\t\tregister_sidebar( array(\r\n\t\t\t'name' => 'footer',\r\n\t\t\t'before_widget' => '<div class=\"widget-area widget-footer col-lg-4 col-md-4 col-sm-4 col-xs-4\">',\r\n\t\t\t'after_widget' => '</div>',\r\n\t\t\t'before_title' => '<h4>',\r\n\t\t\t'after_title' => '</h4>',\r\n\t\t) );\r\n\r\n\t\t// Screensaver Widgets\r\n\t\tregister_sidebar( array(\r\n\t\t\t'name' => 'screensaver',\r\n\t\t\t'before_widget' => '',\r\n\t\t\t'after_widget' => '',\r\n\t\t\t'before_title' => '',\r\n\t\t\t'after_title' => '',\r\n\t\t) );\r\n\r\n\t}", "title": "" }, { "docid": "db2c13d6d587bf26a7764980978684b7", "score": "0.6458206", "text": "function arphabet_widgets_init() {\r\n\r\n register_sidebar( array(\r\n 'name' => 'central widget area',\r\n 'id' => 'central',\r\n 'before_widget' => '<div class=\"central\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2 class=\"rounded\">',\r\n 'after_title' => '</h2>',\r\n ) );\r\n\r\n register_sidebar( array(\r\n 'name' => __( 'Content Sidebar' ),\r\n 'id' => 'content',\r\n 'description' => __( 'content' ),\r\n 'before_widget' => '<div class=\"maincontent\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h1 class=\"widget-title\">',\r\n 'after_title' => '</h1>',\r\n ) );\r\n register_sidebar( array(\r\n 'name' => __( 'Content 2 Sidebar' ),\r\n 'id' => 'content2',\r\n 'description' => __( 'content2' ),\r\n 'before_widget' => '<div class=\"maincontent2\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h1 class=\"widget-title\">',\r\n 'after_title' => '</h1>',\r\n ) );\r\n}", "title": "" }, { "docid": "473cd5345b46026bce8c408e44893fce", "score": "0.64534515", "text": "function bones_register_sidebars() {\r\r\n register_sidebar(array(\r\r\n 'id' => 'right-feature',\r\r\n 'name' => 'Right Sidebar Feature',\r\r\n 'description' => 'Used on feature article pages.',\r\r\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\r\n 'after_widget' => '</div>'\r\r\n ));\r\r\n\r\r\n register_sidebar(array(\r\r\n 'id' => 'right-album',\r\r\n 'name' => 'Right Sidebar Album',\r\r\n 'description' => 'Used on album article pages.',\r\r\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\r\n 'after_widget' => '</div>'\r\r\n ));\r\r\n \r\r\n register_sidebar(array(\r\r\n \t'id' => 'left',\r\r\n \t'name' => 'Left Sidebar',\r\r\n \t'description' => 'Used only on the homepage page template.',\r\r\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\r\n \t'after_widget' => '</div>'\r\r\n ));\r\r\n \r\r\n}", "title": "" }, { "docid": "995c1cc27ba492c85d233f4b3c2fe2f5", "score": "0.643598", "text": "function roots_display_sidebar() {\n $sidebar_config = new Roots_Sidebar(\n /**\n * Conditional tag checks (http://codex.wordpress.org/Conditional_Tags)\n * Any of these conditional tags that return true won't show the sidebar\n *\n * To use a function that accepts arguments, use the following format:\n *\n * array('function_name', array('arg1', 'arg2'))\n *\n * The second element must be an array even if there's only 1 argument.\n */\n array(\n 'is_404',\n 'is_front_page'\n ),\n /**\n * Page template checks (via is_page_template())\n * Any of these page templates that return true won't show the sidebar\n */\n array(\n 'template-custom.php'\n )\n );\n\n return apply_filters('roots_display_sidebar', $sidebar_config->display);\n}", "title": "" }, { "docid": "611131812d1a3262be9674680f8b043f", "score": "0.6434371", "text": "function jbb_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar1',\n\t\t'name' => __('Sidebar 1', 'jbbtheme'),\n\t\t'description' => __('The first (primary) sidebar.', 'jbbtheme'),\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' => 'upcomingevents',\n\t\t'name' => __('Upcoming Events', 'jbbtheme'),\n\t\t'description' => __('Upcoming Events widget on home page', 'jbbtheme'),\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' => 'calendarevents',\n\t\t'name' => __('Calendar Events', 'jbbtheme'),\n\t\t'description' => __('Calendar Events sidebar', 'jbbtheme'),\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\tregister_sidebar(array(\n\t\t'id' => 'learnsingle',\n\t\t'name' => __('learnsingle', 'jbbtheme'),\n\t\t'description' => __('Learn Single Sidebar', 'jbbtheme'),\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 register_sidebar(array(\n\t\t'id' => 'learn',\n\t\t'name' => __('learn', 'jbbtheme'),\n\t\t'description' => __('Learn Section Sidebar', 'jbbtheme'),\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\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', 'jbbtheme'),\n\t\t'description' => __('The second (secondary) sidebar.', 'jbbtheme'),\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": "2b27c458cab94aa14c0771e20d1455f8", "score": "0.64241123", "text": "function sf_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t\t'name' => 'sidebar',\n\t\t\t'id' => 'sidebar1',\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</div>',\n\t\t\t'before_title' => '<h4 classs>',\n\t\t\t'after_title' => '</h4>'\n\t) );\n\t\n\tregister_sidebar( array(\n\t\t\t'name' => 'footer',\n\t\t\t'id' => 'footer1'\n\t) );\n\t\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": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "8f5529ba137277265d5572c380aac566", "score": "0.76910913", "text": "public function editAction()\n {\n $this->view->title .= ' - Edit Resource';\n\n $id = $this->_getParam('id');\n if (empty($id)) {\n throw new RuntimeException('Missing parameter id.');\n }\n\n $resourceResource = $this->_helper->modelResource('Resources');\n $resource = $resourceResource->find($id);\n if (!count($resource)) {\n throw new RuntimeException('Cannot found resource ' . $id);\n }\n $resource = $resource->getIterator()->current();\n\n $form = $this->_helper->form();\n $request = $this->getRequest();\n if ($request->isPost() && $form->isValid($request->getPost())) {\n $data = $form->getValues();\n unset($data['id']); //unset data for zf 1.6\n $resource->populate($data);\n if (!$resource->save()) {\n throw new RuntimeException('Save Resource failure!');\n }\n\n $this->_helper->flashMessenger(\"Save Resource \\\"{$resource->name}\\\" successful!\");\n $this->view->messages = $this->_helper->flashMessenger->getCurrentMessages();\n $this->_helper->flashMessenger->clearCurrentMessages();\n }\n $form->setDefaults($resource->toArray());\n $form->setDefault('id', $resource->id);\n $this->view->form = $form;\n }", "title": "" }, { "docid": "5069ab4d37ad8824f8739ff562d0d370", "score": "0.74427706", "text": "function editForm() {\n render(\"guest/update\");\n }", "title": "" }, { "docid": "6f88bb286afae4ce47ad9810da77dffb", "score": "0.7220439", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Super_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "84fa42f4318791adb736d823ce255f40", "score": "0.7115206", "text": "public function edit() {\n \n $partner = $this->partner_model->get_by_id($this->input->get('id'));\n if (!is_null($partner)) {\n echo $this->load->view('partner/edit_form', array(\n 'id' =>$partner->id,\n 'name' => $partner->name\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "7f75b87329616886dbf4cacf219053f8", "score": "0.7070694", "text": "public function editAction()\n {\n $this->formClass = EditForm::class;\n\n return parent::editAction();\n }", "title": "" }, { "docid": "da32ec30ea6b151bdb0d8c95b7fbef49", "score": "0.7062849", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\tif (Auth::id() !== ($resource->user_id))\n\t\t{\n\t\t\treturn Redirect::back()->withFlashMessage('You cannot edit this resource');\n\t\t}\n\n\t\treturn View::make('resources.edit')->with('resource', $resource);\n\t}", "title": "" }, { "docid": "5a02684925f991ee39abcb153d80d058", "score": "0.7008457", "text": "public function edit()\r\n {\r\n return view('hr::edit');\r\n }", "title": "" }, { "docid": "06b34b79c3a9b611ad6ef22ee71c20e7", "score": "0.6987668", "text": "public function edit()\n {\n return view('redistask::edit');\n }", "title": "" }, { "docid": "53fbc8894a41287014c5edbb650194bf", "score": "0.6966032", "text": "public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Resource::get(intval($id));\r\n\t\t\r\n\t\tlist(,$resource_imgs) = Gou_Service_ResourceImg::getList(0, 10, array('resource_id'=>intval($id)), array('id'=>'ASC'));\r\n\t\t$this->assign('resource_imgs', $resource_imgs);\r\n\t\t\r\n\t\t$this->assign('info', $info);\r\n\t}", "title": "" }, { "docid": "7e492dbc3c5834bd8dcf322b6e0bebf4", "score": "0.6945628", "text": "public function editAction() {\n $patientID = $this->getParam('id');\n\n $form = new Application_Form_Patient();\n $form->getElement('submit')->setLabel(\"Daten ändern\");\n\n $request = $this->getRequest();\n\n // Wenn das Formular abgesedet wurde, neue Daten Speichern\n // Wenn kein post Request vorliegt => Erster Seitenaufruf, Patient wird anhand der uebergebenen ID ins Formular eingetragen.\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($request->getPost())) {\n $patient = new Application_Model_Patient_Patient($form->getValues());\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->save($patient);\n return $this->_helper->redirector('list');\n }\n } else {\n $patient = new Application_Model_Patient_Patient();\n $mapper = new Application_Model_Patient_PatientMapper();\n $mapper->find($patientID, $patient);\n\n\n $form->populate($patient->getKeyValueArray());\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "a5aafcf2a2bbeb05f135b2394c4525d2", "score": "0.6944655", "text": "public function action_edit() {\n\t\tif (empty($this->id)) {\n\t\t\tthrow new Kohana_Exception('No ID received for view');\n\t\t}\n\n\t\t$this->load_model('edit');\n\n\t\tif ( ! empty($_POST)) {\n\t\t\t$this->save_model();\n\t\t}\n\n\t\t$this->template->page_title = 'Edit - ' . $this->page_title_append;\n\t\t$view_title = $this->get_page_title_message('editing_item');\n\t\t$view_content = $this->model->get_form(array(\n\t\t\t'mode' => 'edit',\n\t\t));\n\t\t$this->add_default_view($view_title, $view_content);\n\t}", "title": "" }, { "docid": "5528e9d735a1d9a4a8c37629a76211ee", "score": "0.6944128", "text": "public function show_editform() {\n $this->item_form->display();\n }", "title": "" }, { "docid": "5984290a0d4758b0ead36edab74a7fcb", "score": "0.69379073", "text": "public function edit($id)\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n $data = $this->model->find($id);\n return view('admin.layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "439b2cee9a4232572f243ce40fe7ff37", "score": "0.6936526", "text": "public function edit($id)\n\t{\n\t\t$resource = Resource::find($id);\n\n\t\t// queries the schools db table, orders by type and lists type and id\n\t \t$school_options = DB::table('schools')->orderBy('type', 'asc')->lists('type','type');\n\t \t$year_options = DB::table('years')->lists('year','year');\n\t \t$unit_options = DB::table('units')->lists('unit','unit');\n\t \t$resourceTypes_options = DB::table('resource_types')->orderBy('type', 'asc')->lists('type','type');\n\n\t \t$options = [\n\n\t \t\t'school_options' => $school_options, \n\t \t\t'year_options' => $year_options, \n\t \t\t'unit_options' => $unit_options,\n\t \t\t'resourceType_options' => $resourceTypes_options\n\t \t];\n\n\t return View::make('resources.edit', array('options' => $options, 'resource' => $resource));\n\n\n\n\t}", "title": "" }, { "docid": "44db8e15fc1352a7c519823621a72cc9", "score": "0.69331795", "text": "public function edit()\n {\n return view('coreplanification::edit');\n }", "title": "" }, { "docid": "6f12de6367ed6b5e724959286c687d98", "score": "0.6924614", "text": "public function edit($id)\n\t{\n\t\t$model = SysDetailFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysDetailFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'detailformmanager/update/'.$id,\n \t'model' => $model,\n \t]);\n\n\t\treturn View::make('dynaflow::detailformmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "32d0551d54bd22e3701bf40a8c1cbd2e", "score": "0.6904719", "text": "public function edit()\n {\n return view('partnermanagement::edit');\n }", "title": "" }, { "docid": "7b1b04ea22eb307dae4782d1893d684f", "score": "0.68787277", "text": "public function edit()\n {\n return view('app::edit');\n }", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.68687415", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "bd55c6cca624fddd49faf3e7f8d44ebc", "score": "0.6867638", "text": "public function editAction()\n {\n// \treturn array('form'=>$form);\n }", "title": "" }, { "docid": "311e3f6fa3d20c187430d7b70defb091", "score": "0.68635666", "text": "public function editAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "a093d663f095c2eff827fd56ba3f1c5c", "score": "0.6835696", "text": "public function edit()\n {\n return view('taskmanagement::edit');\n }", "title": "" }, { "docid": "96e7a1a8798dd32cbc9d0fff02092958", "score": "0.683385", "text": "public function edit($id)\n\t{\n\t\t$this->resources = array('driver' => $this->resource\n \t\t\t\t\t\t);\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, $this->resources);\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, $this->resources)->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "9c40deb595ac4a285fa76f490ad8b576", "score": "0.67989755", "text": "public function fieldEditAction() {\n\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n $form->setTitle('Edit Form Question');\n $form->removeElement('search');\n $form->removeElement('display');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $form->removeElement('error');\n $form->removeElement('style');\n }\n }", "title": "" }, { "docid": "e3fad094d4252fd72e2502d403dfc367", "score": "0.67960227", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "38b95b158cfbd7d6008eb1313d74dead", "score": "0.67904013", "text": "public function editProduct()\n {\n $this->configureFormRenderer('required');\n\n $this->productForm->addProductId();\n $this->productForm->populateFrom($product = $this->catalog->productOf($id = 1));\n\n echo $this->view->render('examples/edit-information.html.twig', [\n 'form' => $this->productForm->buildView(),\n ]);\n }", "title": "" }, { "docid": "1f3e62c409733532dc3f0f85568bdbb0", "score": "0.6761064", "text": "public function edit($id)\n\t{\n\t\treturn view($this->plural.'.edit', [$this->singular => $this->model->findOrFail($id)]);\n\t}", "title": "" }, { "docid": "2e451cbecb2a4edf2e18ea359a84b198", "score": "0.6758181", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('OffresBundle:Offres')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Offres entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('OffresBundle:Offres:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "1ad8f42c84160b8c6ce6296389de89c9", "score": "0.6757268", "text": "function edit( $resource ){\n\n $brands = allWithoutTrash('product_brands' );\n\n\n $stocks = get('inventory', $resource);\n\n $product = get( 'products', $resource );\n\n return view( 'admin/product/add_product', compact( 'product', 'brands', 'stocks' ));\n}", "title": "" }, { "docid": "c687e229c70d5b2bb3174acd2887d935", "score": "0.67551833", "text": "public function edit($id)\n {\n //Open form in edit mode.\n $product = Product::findOrFail($id);\n return view('admin.Products.edit')->with('product', $product);\n }", "title": "" }, { "docid": "aae9d312c6fa709ae12d3c879ef9a3f2", "score": "0.67495203", "text": "public function edit(Form $form)\n {\n $form = Form::find($form->id);\n $data = array(\n 'form' => $form,\n 'types' => $this->getType()\n );\n return view('./form/form', $data);\n }", "title": "" }, { "docid": "173e18a8d00009c51c3e2b096afa35c6", "score": "0.67494076", "text": "public function edit()\n {\n $rmk = Specialization::find($id);\n return view('specialization.edit', compact('rmk'));\n }", "title": "" }, { "docid": "de59ebe43d3ccd460af8c204a2ce504f", "score": "0.674883", "text": "public function editAction()\n {\n# $page = $this->_helper->db->findById();\n# $this->view->form = $this->_getForm($page);\n# $this->_processPageForm($page, 'edit');\n }", "title": "" }, { "docid": "bcf716390400a7068b7e1c48017f7c0f", "score": "0.67475426", "text": "function edit()\n\t{\n\t\t$id = $this->ci->uri->segment($this->config['uri_segment']+1);\n\t\treturn $this->_form($id);\n\t}", "title": "" }, { "docid": "7b5265e5c66828f2674f182bfb554b6b", "score": "0.67471254", "text": "public function edit()\n {\n return view('feaccount::edit');\n }", "title": "" }, { "docid": "7e53728fc096714ffa60b9478bd64083", "score": "0.67435557", "text": "function edit()\n {\n JRequest::setVar('view', 'team');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737808", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "7cb2b004357f9ffd5cddc45388789b2a", "score": "0.6736445", "text": "public function edit($id)\n {\n $this->data['obj'] = FormObject::find($id);\n $this->data['title'] = \"Edit \" . $this->data['obj']->name . \" Property\";\n $this->data['url'] = 'system/form-objects/' . $id;\n $this->data['method'] = 'put';\n $this->data['sites'] = Site::whereActive(1)->get()->all();\n\n $this->data['hotels'] = Hotel::all();\n\n return view('system.forms.form-object', $this->data);\n }", "title": "" }, { "docid": "a57bcfb849abf842f54ab142f87778dc", "score": "0.6734803", "text": "public function edit($id)\n {\n $resource = Resource::findOrFail($id);\n return view('admin.portal.edit', compact('resource'));\n }", "title": "" }, { "docid": "ff86c2f46684f81c5fd959adb2807f9e", "score": "0.67255336", "text": "public function edit($id)\n {\n $product = $this->products->findById($id);\n return View::make('products._form', compact('product'));\n }", "title": "" }, { "docid": "e144891e4fdc3366376e396b701fbf99", "score": "0.6711672", "text": "public function edit()\n\t{\n\t\t$jInput = JFactory::getApplication()->input;\n\t\t$jInput->set('view', 'item');\n\t\t$jInput->set('layout', 'default');\n\t\t$jInput->set('hidemainmenu', 1);\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "c53a972e2af2970da7bb04372311a3a5", "score": "0.669989", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('AppBundle:Programas')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programas entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('AppBundle:Programas:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "aae7f4b0c772355bb99330a14ba29014", "score": "0.6696947", "text": "public function edit($id)\n\t{\n return View::make('matrimonials.edit');\n\t}", "title": "" }, { "docid": "883502561745369884d7fc695ef1624e", "score": "0.6691808", "text": "public function edit($id)\n\t{\n return View::make('requirements.edit');\n\t}", "title": "" }, { "docid": "439487f339021f8335c9eeaa79db8fa8", "score": "0.6690575", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $data['title'] = $this->title;\n $tbl = $this->table->find($id);\n $data['form'] = $formBuilder->create('App\\Forms\\TypeBookForm', [\n 'method' => 'PUT',\n 'model' => $tbl,\n 'url' => route($this->uri.'.update', $id)\n ]);\n\n $data['url'] = route($this->uri.'.index');\n return view($this->folder.'.create', $data);\n }", "title": "" }, { "docid": "1507a482b7f295d6473bdf19d6d3da89", "score": "0.6678381", "text": "function edit( $resource ){\n\n $receivables = get( 'receivables', $resource );\n\n return view( 'admin/receivables/add_receivables', compact( 'receivables' ) );\n\n}", "title": "" }, { "docid": "2e96703e3ded22777d115212adcbfa8e", "score": "0.66781634", "text": "public function edit($id)\n {\n return view('manage::edit');\n }", "title": "" }, { "docid": "f2990bfbaee0f3cc29d99eb0cccdfc5d", "score": "0.6674401", "text": "public function edit(Entity $entity)\n {\n $this->authorize('update', $entity);\n\n return view('entities.edit', [\n 'entity' => $entity,\n ]);\n }", "title": "" }, { "docid": "b182548861e62c722e9b46c8496db241", "score": "0.6673116", "text": "public function edit($id)\n {\n $this->setOperation('update');\n if ($this->tienePermiso('update')) {\n\n // get entry ID from Request (makes sure its the last ID for nested resources)\n $id = $this->getCurrentEntryId() ?? $id;\n $entry = $this->getEntry($id);\n\n $this->data = array();\n // get the info for that entry\n $this->data['title'] = $this->getTitle() ?? trans('cesi::core.crud.edit') . ' ' . $this->entity_name;\n $this->data['heading'] = $this->getHeading() ?? $this->entity_name_plural;\n $this->data['subheading'] = $this->getSubheading() ?? trans('cesi::core.crud.edit').' '.$this->entity_name;\n $this->data['entry'] = $entry;\n $this->data['contentClass'] = $this->getEditContentClass();\n $this->data['routerAlias'] = $this->getRouterAlias();\n $this->data['resourceAlias'] = $this->getResourceAlias();\n $this->data['hasUploadFields'] = $this->hasUploadFields('update', $entry->getKey());\n\n // TODO ?? $this->data['saveAction'] = $this->getSaveAction();\n // $this->data['fields'] = $this->getCrud()->getUpdateFields($id);\n\n $this->data['id'] = $id;\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->getEditView(), $this->filterEditViewData($this->data));\n } else {\n return view('cesi::errors.401');\n }\n }", "title": "" }, { "docid": "23695efbb416dcbac50f5655f76220eb", "score": "0.6671321", "text": "public function edit()\n {\n return view('mpcs::edit');\n }", "title": "" }, { "docid": "9eabaca39cbbc769fdc4d4613662986d", "score": "0.6670628", "text": "public function edit($id)\n {\n $form = Form::find( $id );\n return view('editar', [\n 'item' => $form,\n ]);\n }", "title": "" }, { "docid": "98a687ec9cd21bb18a66914c17a84262", "score": "0.666875", "text": "function viewedit() {\n $id = Request::read('email');\n $error = Request::read('r'); \n \n if($error == -1){\n $error = 'No se ha editado';\n }\n \n $usuario = $this->getModel()->getUsuario($id);\n $email = $usuario->getEmail();\n \n \n $this->getModel()->addData('email', $email);\n $this->getModel()->addData('error', $error);\n \n $this->getModel()->addFile('form', 'sections/user/formEdit.html');\n }", "title": "" }, { "docid": "8aecb685b024e89667372cb88e6534b5", "score": "0.6665608", "text": "public function edit()\n {\n $product = $this->model('IndexModel')->get($this->getParam()['id']);\n\n $this->template('edit', $product);\n }", "title": "" }, { "docid": "897c904da29480933d49a2afe6a447fa", "score": "0.6664957", "text": "public function edit()\n {\n return view('core::edit');\n }", "title": "" }, { "docid": "47e15a6904083b2dac82790c56050341", "score": "0.66649014", "text": "public function showEditJobForm($id){\n \t$jobData = Job::find($id);\n \treturn view('employer.employer_edit_job', compact('jobData'));\n }", "title": "" }, { "docid": "55bfb83b470d662ff8fb0f9f1f658c98", "score": "0.6653699", "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('Toomdrix\\Pm\\ProjectController@update', $form->project->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "028c8bc8d418c3bcb062ed6c39f57a64", "score": "0.6643353", "text": "public function edit($id)\n {\n $asociado = Asociado::getPersonaAsociadoSingle($id);\n $asociado->persona;\n $title = 'Editad asociado: '.$asociado->persona->primer_nombre;\n $form_data = ['route' => ['asociado.update',$asociado->id],'method' => 'PUT'];\n $cliente_id_field = '';\n $cliente_id = $asociado->cliente_id;\n\n return view('asociado.form')->with(compact('asociado','title','form_data','cliente_id_field','cliente_id'));\n }", "title": "" }, { "docid": "45821cecfbb5732cd269059f6aad418f", "score": "0.66403663", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'view', 'editlieux' );\n\t\tJRequest::setVar( 'layout', 'edit_form' );\n\n\t\tparent::display();\n\t}", "title": "" }, { "docid": "e4c3c0cbb7ac2570554ac1a25beb95aa", "score": "0.66388327", "text": "public function edit()\n {\n return view('berita::edit');\n }", "title": "" }, { "docid": "ab2518ea287ee8d0a67051d27dc511a8", "score": "0.66294515", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->membership->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['membership' => $this->membership]);\n\t}", "title": "" }, { "docid": "55c0c1d3fd64720346563285fe8ebb07", "score": "0.6628236", "text": "public function edit($id)\n {\n return view('employee.edit_form',['employee' => User::findOrFail($id)]);\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "4ba8a0764293ed6e4bdc9a47879f5cdb", "score": "0.66251445", "text": "public function edit($id)\n {\n $item = Provider::find($id);\n return View('provider.form', [\"item\" => $item, 'type' => 'edit']);\n }", "title": "" }, { "docid": "c2183a818e413caf29da395ac5aa45fe", "score": "0.6625103", "text": "public function edit($id)\n\t{\n\t\t$datos['empresa'] = Empresa::find($id);\n\t\t$datos['form'] = array('route'=> array('datos.empresas.update', $id), 'method' => 'PATCH');\n\t\t\n\t\treturn View::make('datos/empresas/list-edit-form')->with('datos', $datos);\n\t}", "title": "" }, { "docid": "1a4ead4c141c44cd189d59dd857cc05f", "score": "0.6621553", "text": "public function edit($field)\n {\n $field = Fields::find($field);\n return view('admin.fields.form',[\n 'active' => 'Fields',\n 'action' => 'Edit',\n 'field' => $field,\n ]);\n }", "title": "" }, { "docid": "5004b89ebea0b269b185830cb2f7e2f7", "score": "0.6621499", "text": "public function edit($id)\n {\n $this->view->guest = $this->model->edit($id);\n $this->view->render($this->_path . '/edit');\n \n }", "title": "" }, { "docid": "4085123883432653825ea3d6eca4c3ba", "score": "0.66196555", "text": "public function edit(Form $form, Event $event)\n {\n return view('form.edit', compact('event', 'form'));\n }", "title": "" }, { "docid": "8310a47ca16507655295572f382e4e29", "score": "0.6616868", "text": "public function edit($id)\n {\n // first : retrieve flower info and show the form to update flower\n }", "title": "" }, { "docid": "8c2bb4ce9efff69262207822b4887159", "score": "0.66112494", "text": "public function edit($id)\n {\n $template = (object) $this->template;\n $form = $this->form();\n $data = Penduduk::findOrFail($id);\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "9a57ebf3330d38ff3b1cfbadfc9fc69b", "score": "0.66103256", "text": "function edit() {\n\t\t\n\t\tif ($_POST) {\n\t\t\t$this->entity->update($_POST);\n\t\t\t$this->_relative_redirect('view');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "12e1c226dd6ae426a8e7bea555851773", "score": "0.6606947", "text": "public function edit($id)\n {\n \t$manufacturer = Manufacturer::findOrFail($id);\n return view('backend.module.manufacturer.edit',['manufacturer' => $manufacturer]);\n }", "title": "" }, { "docid": "c6087fca66897a650dc6e75718832e74", "score": "0.66025347", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->generic_medication->id], 'method' => 'PUT'];\n \n return view(self::$prefixView . 'formm', compact('form_data'))\n \t->with(['generic_medication' => $this->generic_medication]);\n\t}", "title": "" }, { "docid": "a12dc077ea7b8efef6338c64b0b115cb", "score": "0.66000247", "text": "public function edit($id)\n {\n // get the nerd\n $product = Product::find($id);\n\n // show the edit form and pass the nerd\n return View::make('products.edit')\n ->with('product', $product);\n }", "title": "" }, { "docid": "2b5fb043a3c87778cf2cebbc780df3b7", "score": "0.659838", "text": "public function edit()\n\t{\n\t\tparent::edit();\n\t}", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "6d657e63dc93b082619d2f7dcb0b720c", "score": "0.65891075", "text": "public function edit($id)\n {\n //mostrar formulario d edicion\n }", "title": "" }, { "docid": "7b2f75aaedf8589b46dde92aafda12f3", "score": "0.6586938", "text": "public function editAction()\n\t{\n\t\t$accountId = $this->_getParam('id');\n\t\t$accountTable = new AccountTable();\n\t\tif ($accountId) $account = $accountTable->find($accountId);\n\t\telse {\n\t\t\t/* Redirect to some error page */\n\t\t}\n\t\t\n\t\t/* Setup view data */\n\t\t$view = $this->getView();\n\t\t\n\t\t$view->title = \"Edit Account\";\n\t\t$view->account = $account;\n\t\t$view->error = NULL;\n\t\t\n\t\t/* And render it */\t\t\n\t\t$this->render('account/AccountEditView.php');\n\t}", "title": "" }, { "docid": "7f6e393f74ad5b78eb86af1fb59ad0f7", "score": "0.65856075", "text": "public function edit($id)\n {\n $data = User::findOrFail($id);\n $template = (object)$this->template;\n $form = $this->form();\n return view('admin.master.edit',compact('template','form','data'));\n }", "title": "" }, { "docid": "2ca5925eff8fd2c9f2e5fb536e2717b3", "score": "0.65842867", "text": "function edit()\n\t{\n\t\tJRequest::setVar( 'edit', true );\n\t\t$model\t=& $this->getModel( 'Item' );\n\t\t$model->checkout();\n\n\t\t$view =& $this->getView( 'Item' );\n\t\t$view->setModel( $model, true );\n\t\t// Set the layout and display\n\t\t$view->setLayout('form');\n\t\t$view->edit();\n\t}", "title": "" }, { "docid": "df89a714812746e77528c831bc256a8a", "score": "0.6574023", "text": "public function edit($id)\n {\n $this->user->offers()->findOrFail($id);\n\n return view('admin.offer.edit_form', [\n 'route_base_url' => 'offer',\n 'model_name' => '\\App\\Models\\Offer',\n 'model_id' => $id,\n ]);\n }", "title": "" }, { "docid": "568ce94a39ba9f1d0b81cd0579729a5f", "score": "0.6571842", "text": "public function edit()\n {\n $view = $this->getView('election', 'html');\n $view->setModel($this->getModel('election'), true);\n //JRequest::setVar('hidemainmenu', 1);\n\n $view->display();\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "ce4fc37201a9083467febf6f580c94ee", "score": "0.6567868", "text": "public function edit($id) {\n $urinalysis = Urinalysis::ConsolidatedId($id)->first();\n $urinalysisRef = UrinalysisRef::all();\n return view('pages.urinalysis.form', [\"urinalysis\" => $urinalysis, 'urinalysisRef' => $urinalysisRef, 'mode' => 'EDIT']);\n }", "title": "" }, { "docid": "df0197e5108b918276674eb05562c1d7", "score": "0.65657616", "text": "public function editAction()\n {\n $page = Pages::findFirst(\n [\n 'conditions' => 'id = :id:',\n 'bind' => ['id' => (int) $this->dispatcher->getParam('id')],\n ]\n );\n if ($page === false) {\n return $this->dispatcher->forward(['action' => 'error404']);\n }\n $this->assets\n ->collection('ace')\n ->addJs('scripts/ace/ace.js');\n $page->content = htmlentities($page->content);\n $this->view->page = $page;\n $this->view->title = $page->title.' – Edit ';\n $editable = new \\stdClass();\n $editable->content = $page->content;\n $editable->id = $page->id;\n $this->view->form = new \\Kolibri\\Forms\\Edit($editable);\n }", "title": "" }, { "docid": "d49dc9860beddbcef1bd1992ac80ce76", "score": "0.656234", "text": "public function action_edit()\r\n\t{\r\n\t\t$item_id = $this->request->param('params');\r\n\r\n\t\t$element = ORM::Factory($this->_resource, $item_id);\r\n\r\n\t\t$form = Formo::form()->orm('load', $element);\r\n\t\t$form->add('update', 'submit', 'Save');\r\n\r\n\t\tif($form->load($_POST)->validate())\r\n\t\t{\r\n\t\t\tif($this->_update_passed($form, $element))\r\n\t\t\t{\r\n\t\t\t\t$element->save();\r\n\t\t\t\t$form->orm('save_rel', $element);\r\n\r\n\t\t\t\t$this->request->redirect(Route::get($this->_route_name)->uri( array('controller' => $this->controller)));\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->_update_error($form, $element);\r\n\t\t}\r\n\r\n\t\t$view = $this->template->content;\r\n\t\t$view->set(\"formo\", $form);\r\n\t}", "title": "" }, { "docid": "469fc3592be913e351b579a5c9fe18dc", "score": "0.65604365", "text": "public function edit()\n {\n $organization = OwnerOrganization::find(0);\n return view('modules.system.OwnerOrganization.form', compact('organization'));\n }", "title": "" }, { "docid": "59702db081c964bfd257f5f4ed31ec07", "score": "0.6559696", "text": "public function edit($id){\n $entry = Entry::find($id);\n $this->authorize('update', $entry); //Access Controll using policies\n return view('entries.edit',compact('entry'));\n }", "title": "" }, { "docid": "3cee07ed8f37cad18680bc48310b6842", "score": "0.6559204", "text": "public function edit()\n {\n return view('tenderpurchaserequest::edit');\n }", "title": "" }, { "docid": "531deb797a3602e8ea456bf473e6c600", "score": "0.6543909", "text": "public function edit($id)\n\t{\n\t\t$record = Record::find($id);\n\n\t\treturn View::make('records.edit', compact('record'));\n\t}", "title": "" }, { "docid": "5c6c8de62974cc03322207e7d02b68d7", "score": "0.6542949", "text": "public function edit($id) {\r\n\t\t$data ['aluno'] = Aluno::findOrFail ( $id );\r\n\t\t$data ['page_title'] = 'Editar aluno';\r\n\t\treturn view ( 'paginas.cadastro.aluno.create-edit' )->with ( $data );\r\n\t}", "title": "" }, { "docid": "0108853fa0d0f8ddd5e30d5bd2f3f67d", "score": "0.6542555", "text": "public function edit($id)\n\t{\n // Get the student\n $student = Student::find($id);\n\n // show the edit form and pass the nerd\n return View::make('students.edit')->with('student', $student);\n\t}", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "3d60dba5b14a240b364d0e8824386a7e", "score": "0.6542473", "text": "public function edit($id)\n {\n $electric = $this->electricService->findById($id);\n return view('electric.update' ,compact('electric'));\n }", "title": "" }, { "docid": "4530461421ee8156467d6dfae72cde9c", "score": "0.6540356", "text": "public function edit($id)\n {\n static::setInstanceModel($model = $this->model()->findOrFail($id));\n $this->renderForm($model);\n $this->renderButton($model);\n return view(static::$baseView.'.edit');\n }", "title": "" }, { "docid": "5cddc5545db4d8408b496a8b468427fc", "score": "0.6539553", "text": "public function edit($project_id) {\n $project = Project::withTrashed()->where('id', $project_id)->first();\n\n if (empty($project)) {\n return abort(404);\n }\n $form = new AdministrationForm();\n $form->route(Administration::route('projects.store'));\n $form->model($project);\n $form->route(Administration::route('projects.update', $project->id));\n $form->method('PUT');\n $form->form(ProjectForm::class);\n\n\n Breadcrumbs::register('administration', function ($breadcrumbs) {\n $breadcrumbs->parent('base');\n $breadcrumbs->push(trans('projects::admin.module_name'), Administration::route('projects.index'));\n $breadcrumbs->push(trans('administration::admin.edit'));\n });\n\n Administration::setTitle(trans('projects::admin.article') . ' - ' . trans('administration::admin.edit') . ' #' . $project->id);\n\n return $form->generate();\n }", "title": "" } ]
1c82a988f20b5909e9f39c5323dbf5aa
/ / / / / / / / /
[ { "docid": "280c424f84b8e77cebbb99df089dc71f", "score": "0.0", "text": "public function offsetGet($index) {\n switch (true) {\n case method_exists($this, $name = \"row_get_$index\"):\n return $this->$name();\n case $index === '__class':\n return Core_Types::real_class_name_for($this);\n default:\n return isset($this->attrs[(string) $index]) ? $this->attrs[(string) $index] : null;\n }\n }", "title": "" } ]
[ { "docid": "efbbce513dc2a51f3bfc504c0ee44111", "score": "0.49858907", "text": "function getRight() ;", "title": "" }, { "docid": "70d8f38d06a7735f3e68af30d652ff67", "score": "0.48908338", "text": "private function getWebLargeTreeShape() {\n $shape = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXXXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXXXXXXXXXX\" . '<br />';\n $shape .= \"\" .\"XXXXXXXXXXXXXXXXXXX\" . '<br />';\n return $shape;\n }", "title": "" }, { "docid": "9e7d58451da30c6e2454cfea7a240051", "score": "0.4870746", "text": "function habilidade85pts();", "title": "" }, { "docid": "75121405bd58a5155e99fad7dab2b5c1", "score": "0.48309898", "text": "function cumpleanos() {\n\t}", "title": "" }, { "docid": "6e3dfa539b01bbc70ab6d06651b3b7be", "score": "0.4826885", "text": "function FullTree();", "title": "" }, { "docid": "c7fbd8583bc7c2af868a2a40d26ee210", "score": "0.4809726", "text": "static function block($k,$v){\n$ret=''; $u=self::$unit; $w=$u; $h=$u/2; $b=self::$base; $x=$v[0]*$u; $y=$b-$v[1]*$u;\n$ratio=255/48; \n$clr=self::mkclr($k*$ratio);\n$ret.='[#'.$clr.',gray,,,1:attr]['.$x.','.$y.','.$w.','.$h.',,id'.$k.':rect]';\n$ret.='[black,:attr]['.($x+16).','.($y+16).'§'.$k.':text]';\nreturn $ret;}", "title": "" }, { "docid": "9a0227702a80973d11165bee0fec2397", "score": "0.47796845", "text": "abstract protected function determineRootline() ;", "title": "" }, { "docid": "d385a9719f99539bf4bfa45cc945034b", "score": "0.47561666", "text": "public function regest();", "title": "" }, { "docid": "bf30dea5b553e789c31bb679cfd9dcbc", "score": "0.473456", "text": "function left(){\n\t}", "title": "" }, { "docid": "19aa9ea60125515b8e81c8580141c0a6", "score": "0.47279057", "text": "private function getWebLargeStarShape() {\n $shape = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXXXXXX\" . '<br />';\n $shape .= \"\" . \"+XXXXXXXXXXXXXXXXX+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n return $shape;\n }", "title": "" }, { "docid": "dbbc9d154113090ee3596942b09b8791", "score": "0.4695073", "text": "private function _getResult(){\r\n\r\n $position = $this->_startPoint;\r\n $tile = $this->_getTile($position);\r\n $path[] = $position;\r\n\r\n while(!$this->_checkEnd($position)){\r\n $direction= $tile->getLastMove();\r\n $position = $this->_getNewPosition($position,$direction);\r\n $tile = $this->_getTile($position);\r\n $path[] = $position;\r\n }\r\n\r\n return $path;\r\n }", "title": "" }, { "docid": "5da5fb40101e4cfef9c05bb67bd0e60f", "score": "0.46932098", "text": "function moveToRightHandSystem($x,$y,$maxY)\n{\n\t$newY = -1*($y-$maxY);\n\treturn array('x' => $x,'y' => $newY);\n}", "title": "" }, { "docid": "19fabc48c9233c8ec7b30da7ea6399ae", "score": "0.46784747", "text": "function getPath ();", "title": "" }, { "docid": "1bbd0957747c342f7d7f1aae280f5394", "score": "0.4668873", "text": "function render() ;", "title": "" }, { "docid": "2c8d74f87a4161f4dfa9e4c6ff4628ff", "score": "0.46633473", "text": "public function findHorizontalSeam(): array;", "title": "" }, { "docid": "77e1fbc455b0b54ceda93e30ba200082", "score": "0.46631977", "text": "function getLeft() ;", "title": "" }, { "docid": "460fdae5f8478e796e5651d6e1cdf0ba", "score": "0.46255335", "text": "function hexagon($length)\r\n {\r\n\r\n for (\r\n $i = 1, $k = $length,\r\n $l = 2 * $length - 1;\r\n $i < $length;\r\n $i++, $k--, $l++\r\n ) {\r\n for ($j = 0; $j < 3 * $length; $j++)\r\n if ($j >= $k && $j <= $l)\r\n echo \"*\";\r\n\r\n else\r\n echo \"&nbsp;&nbsp;\";\r\n echo \"<br>\";\r\n }\r\n for (\r\n $i = 0, $k = 1, $l = 3 * $length - 2;\r\n $i < $length;\r\n $i++, $k++, $l--\r\n ) {\r\n for ($j = 0; $j < 3 * $length; $j++)\r\n if ($j >= $k && $j <= $l)\r\n echo \"*\";\r\n else\r\n echo \"&nbsp;&nbsp;\";\r\n echo \"<br>\";\r\n }\r\n }", "title": "" }, { "docid": "f20916e9061c6d118ec5fd47891ac4d6", "score": "0.46242002", "text": "function analyze_hierarchy( &$vin, &$pin, &$commit, &$coord, &$parents, &$nr, &$childs ){\n if( in_array($commit,$pin,true) ){\n $coord[$nr] = array_search( $commit,$pin,true ); // take reserved coordinate\n $pin[$coord[$nr]] = \".\"; // free the reserved coordinate\n $childs[$coord[$nr]] = \".\";\n }else{\n // this commit appears to be a head\n if( ! in_array( \".\", $pin, true ) ){ // make empty coord plce\n $pin[] = \".\";\n $vin[] = \".\";\n $childs[] = \".\";\n }\n $coord[$nr] = array_search( \".\", $pin, true ); // take the first unused coordinate\n // do not allocate this place in array as this is already freed place\n }\n //reserve place for parents\n $pc=0;\n foreach( $parents as $p ){ \n if( in_array( $p, $pin, true ) ){ \n // the parent alredy has place\n $childs[array_search( $p, $pin, true )] = $commit; // register child\n $pc++; \n continue; \n } \n if( $pc == 0 ){ \n // try to keep the head straigth\n $pin[$coord[$nr]] = $p; \n $childs[$coord[$nr]] = $commit;\n $pc++; \n continue; \n }\n if( in_array( \".\", $pin, true ) ){ \n // 1. find nearest free place in the left side\n $i = -1;\n for( $i = $coord[$nr]-1; $pin[$i] != \".\" && $i >= 0; $i-- );\n // 2. find neares free place in the right side\n if( $i < 0 ) for( $i = $coord[$nr]; $pin[$i] != \".\"; $i++ );\n //$x = array_search( \".\", $pin, true );\n $pin[$i] = $p;\n $childs[$i] = $commit;\n }else{ // allcate new place into array\n $pin[] = $p;\n $vin[] = \".\";\n $childs[] = $commit;\n }\n }\n //reduce image width if possible\n while( count($pin) > ($coord[$nr]+1) )\n {\n $valpin = array_pop($pin);\n $valvin = array_pop($vin);\n $valchi = array_pop($childs);\n if( $valpin == \".\" && $valvin == \".\" ) continue;\n $pin[] = $valpin;\n $vin[] = $valvin;\n $childs[] = $valchi;\n break;\n }\n}", "title": "" }, { "docid": "06f00f83e43877851a24c8a66df7461b", "score": "0.46211487", "text": "function forum_get_child_counts(array $node) {\n // Calculates by (right_id - left_id - 1) / 2\n return (int)(($node['right_id'] - $node['left_id'] - 1) / 2);\n}", "title": "" }, { "docid": "02b71d3474f70cd7ca7ff701a5952c3f", "score": "0.46015313", "text": "function ST_indexR($ST_h, $ST_v, $ST_w) {\n\t$i = $ST_v[$ST_w];\n\t/* echo(\"<br> ST_indexR: i=$i\"); */\n\tif ($ST_h == 0) $ST_h = new ST_node($i);\n\t/* echo(\"<br> h->index: $ST_h->index, d: $ST_h->d, l: $ST_h->l, m: $ST_h->m, r: $ST_h->r \"); */\n\tif ($i == 0) {\n\t\tif ($ST_h->index == -1) $ST_h->index = $this->ST_N++;\n\t\t$this->ST_val = $ST_h->index;\n\t\treturn $ST_h;\n\t\t}\n\tif ($i < $ST_h->d) $ST_h->l = $this->ST_indexR($ST_h->l, $ST_v, $ST_w);\n\tif ($i == $ST_h->d) $ST_h->m = $this->ST_indexR($ST_h->m, $ST_v, $ST_w+1);\n\tif ($i > $ST_h->d) $ST_h->r = $this->ST_indexR($ST_h->r, $ST_v, $ST_w);\n\treturn $ST_h;\n\t}", "title": "" }, { "docid": "1673acbe570748ea2149da2fb9df993f", "score": "0.4600198", "text": "function forum_get_path(array $node) {\n global $currdb;\n\n $query = $currdb->sql_query('\n SELECT *\n FROM `forum_forums`\n WHERE ( `left_id` <= ' . $node['left_id'] . ' AND `right_id` >= ' . $node['right_id'] . ' ) AND `visible` = 1\n ORDER BY `left_id` ASC\n ;');\n $forums = array();\n while ( $forum = $currdb->sql_fetch_assoc($query) ) $forums[] = $forum;\n\n return $forums;\n}", "title": "" }, { "docid": "051ad449b40b3f361a604b291f98910e", "score": "0.45902032", "text": "private function getWebSmallTreeShape() {\n $shape = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;\" . \"XXXXX\" . '<br />';\n $shape .= \"\" . \"XXXXXXX\" . '<br />';\n return $shape;\n }", "title": "" }, { "docid": "46e8ac62e3483b82f6ecebb887508eae", "score": "0.45696566", "text": "private function getWebMediumTreeShape() {\n $shape = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;\" . \"XXXXXXXXX\" . '<br />';\n $shape .= \"\" .\"XXXXXXXXXXX\" . '<br />';\n return $shape;\n }", "title": "" }, { "docid": "af412ec059ff9144dfa7db3424feeb6e", "score": "0.45488438", "text": "function specialop() {\n\n\n\t}", "title": "" }, { "docid": "1a1cf6096415326adf799708b982982c", "score": "0.45439768", "text": "function\tart()\n{\n system('clear');\n echo \" _____ __ ____ __\\n\";\n echo \" ___ | / /_______ |/ /\\n\";\n echo \" __ |/ /_ __ \\_ / \\n\";\n echo \" _ /| / / /_/ / | \\n\";\n echo \" /_/ |_/ \\____//_/|_| \\n\";\n echo \"\\n\\n\";\n}", "title": "" }, { "docid": "149f0f9997d157a2b7af4981d2bda751", "score": "0.45362157", "text": "function generate() ;", "title": "" }, { "docid": "ccc23a7e2489b87dfeda6462dad6d273", "score": "0.4523018", "text": "function output_graph($total , $current, $file){\n\t $this->funk_pt = ( $this->funk_pt < count($this->chars) - 1) ? $this->funk_pt++ : 0;\n $segment = floor($total / 20);//size of each segment\n $segment_cnt = ceil(10 *($current / $total));\n\t $this->cliout(\"|\");\n\t for($i=0;$i<count($this->graph);$i++){\n if($i < $segment_cnt){\n\t\t\t$this->graph[$i] = \"-\";\n\t\t\t$this->graph[$i + 1] = $this->chars[$funk];\n\t\t}else{\n $this->graph[$i] = \" \";\n\t\t}\n\t\t$this->cliout($this->graph[$i]); \n }\n \t $this->cliout(\"| \" . ($current / $total)*100 . \"% \" . $this->chars[$this->funk_pt] . \" $current/$total $file\\r\");\n\t //$this->cliout(\"\\n\\$current = $current \\$segment= $segment : \\$segment_cnt = $segment_cnt\\r\");\n\t}", "title": "" }, { "docid": "9582bdd63a6fed9bd0cc43ba94f22ce0", "score": "0.45177692", "text": "function display_graphic($piece)\n{\n}", "title": "" }, { "docid": "bc493b983b6832ee78fc8ff9cb1cbd42", "score": "0.45174113", "text": "function create($filename=\"\")\n{\nif ($filename) {\n $this->src_image_name = trim($filename);\n}\n$dirname=explode(\"/\",$this->src_image_name);\nif(!file_exists(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\")){\n\t@mkdir(\"$dirname[0]/$dirname[1]/$dirname[2]/$dirname[3]/\", 0755);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$this->src_image_name = @iconv(\"utf-8\",\"GBK\",$this->src_image_name);\n\t$this->met_image_name = @iconv(\"utf-8\",\"GBK\",$this->met_image_name);\n}\n$src_image_type = $this->get_type($this->src_image_name);\n$src_image = $this->createImage($src_image_type,$this->src_image_name);\nif (!$src_image) return;\n$src_image_w=ImageSX($src_image);\n$src_image_h=ImageSY($src_image);\n\n\nif ($this->met_image_name){\n $this->met_image_name = strtolower(trim($this->met_image_name));\n $met_image_type = $this->get_type($this->met_image_name);\n $met_image = $this->createImage($met_image_type,$this->met_image_name);\n $met_image_w=ImageSX($met_image);\n $met_image_h=ImageSY($met_image);\n $temp_met_image = $this->getPos($src_image_w,$src_image_h,$this->met_image_pos,$met_image);\n $met_image_x = $temp_met_image[\"dest_x\"];\n $met_image_y = $temp_met_image[\"dest_y\"];\n\t if($this->get_type($this->met_image_name)=='png'){imagecopy($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h);}\n\t else{imagecopymerge($src_image,$met_image,$met_image_x,$met_image_y,0,0,$met_image_w,$met_image_h,$this->met_image_transition);}\n}\nif ($this->met_text){\n $temp_met_text = $this->getPos($src_image_w,$src_image_h,$this->met_text_pos);\n $met_text_x = $temp_met_text[\"dest_x\"];\n $met_text_y = $temp_met_text[\"dest_y\"];\n if(preg_match(\"/([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])([a-f0-9][a-f0-9])/i\", $this->met_text_color, $color))\n {\n $red = hexdec($color[1]);\n $green = hexdec($color[2]);\n $blue = hexdec($color[3]);\n $met_text_color = imagecolorallocate($src_image, $red,$green,$blue);\n }else{\n $met_text_color = imagecolorallocate($src_image, 255,255,255);\n }\n imagettftext($src_image, $this->met_text_size, $this->met_text_angle, $met_text_x, $met_text_y, $met_text_color,$this->met_text_font, $this->met_text);\n}\nif(stristr(PHP_OS,\"WIN\")){\n\t$save_files=explode('/',$this->save_file);\n\t$save_files[count($save_files)-1]=@iconv(\"utf-8\",\"GBK\",$save_files[count($save_files)-1]);\n\t$this->save_file=implode('/',$save_files);\n}\nif ($this->save_file)\n{\n switch ($this->get_type($this->save_file)){\n case 'gif':$src_img=ImagePNG($src_image, $this->save_file); break;\n case 'jpeg':$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n case 'png':$src_img=ImagePNG($src_image, $this->save_file); break;\n default:$src_img=ImageJPEG($src_image, $this->save_file, $this->jpeg_quality); break;\n }\n}\nelse\n{\nif ($src_image_type = \"jpg\") $src_image_type=\"jpeg\";\n header(\"Content-type: image/{$src_image_type}\");\n switch ($src_image_type){\n case 'gif':$src_img=ImagePNG($src_image); break;\n case 'jpg':$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n case 'png':$src_img=ImagePNG($src_image);break;\n default:$src_img=ImageJPEG($src_image, \"\", $this->jpeg_quality);break;\n }\n}\nimagedestroy($src_image);\n}", "title": "" }, { "docid": "f3456197152abf0d3f6f50439cdb6563", "score": "0.45154986", "text": "function towerOfHanoi($height, $src, $aux, $dst) {\n if ($height >= 1) {\n // move n-1 disk from src to aux stack\n towerOfHanoi($height-1, $src, $dst, $aux);\n // move disk n from src to dst\n $disk = array_pop($src[1]);\n array_push($dst[1], $disk);\n echo \"Move disk from {$src[0]} to {$dst[0]}\" . PHP_EOL;\n \n // move n-1 disk from aux stack to dst\n towerOfHanoi($height-1, $aux, $src, $dst);\n }\n}", "title": "" }, { "docid": "2f53daf0d5f0fd29028111797715026c", "score": "0.45147684", "text": "function print_tree_line($dir, $str, $space = '')\n{\n\t$link = IS_LFI_BASED ? '[+]' : '<img src=\"'. SCRIPT_NAME .'?genimg=plus'. build_params(array('genimg')) .'\" alt=\" [+]\"/>';\n\treturn $space .'<a href=\"'. SCRIPT_NAME .'?mode=tree&dir='. $dir . build_params(array('mode', 'dir')) .'\" class=\"plus\">'. $link .'</a>\n\t\t<a href=\"'. SCRIPT_NAME .'?mode=browser&d='. $dir . build_params(array('mode', 'dir')) .'\" class=\"linkdir\" target=\"_top\">'. utf8_decode($str) .\"</a><br>\\n\";\n}", "title": "" }, { "docid": "59d8b067934fd7645ae111387f826b56", "score": "0.4504305", "text": "function get_local_depth()\n\t{\n\t\tif ($this->private_relative_path_from_gallery_images_root_folder==\"\")\n\t\t\treturn 0;\n\t\t$res=count_chars($this->private_relative_path_from_gallery_images_root_folder);\n \t\treturn $res[0x2f]+1;//number of '/'+1\n\t}", "title": "" }, { "docid": "2b97292bdbf979d5a71671f927e0bdfe", "score": "0.44997764", "text": "public function operations();", "title": "" }, { "docid": "50eae76e496b3004c17c65e92b246b9f", "score": "0.44995475", "text": "function array_of_dots2(){\n\n\tp(\"triangle with additional line\");\n\n\t$A = new Dot(\"A\");\n\t$B = new Dot(\"B\");\n\t$C = new Dot(\"C\");\n\t$D = new Dot(\"D\");\n\n\t$A->add_children(array($B->n()=>$B,$C->n()=>$C));\n\t$B->add_children(array($A->n()=>$A,$C->n()=>$C));\n\t$C->add_children(array($A->n()=>$A,$B->n()=>$B,$D->n()=>$D));\n\t$D->add_children(array($C->n()=>$C));\n\n\treturn array($A,$B,$C,$D);\n}", "title": "" }, { "docid": "7c600e3a30da338964296e8f251c6379", "score": "0.44974732", "text": "abstract public function getRoot() ;", "title": "" }, { "docid": "7c600e3a30da338964296e8f251c6379", "score": "0.44947234", "text": "abstract public function getRoot() ;", "title": "" }, { "docid": "27133161e14da8f0a73188caad8339f6", "score": "0.44942924", "text": "function rotate($arr,$x_dat,$t_dat,$path,$direction,$halfTree,$frame_delay,$sparkles,$window_degrees,$username,$sequence_duration){\n\t\t// now rotate image that we just made, dat file is $x_dat\n\t\t$x_arr=read_file($x_dat,$path); // target megatree 32 strands, all 32 being used. read data into an array\n\t\t$minStrand =$arr[0]; // lowest strand seen on target\n\t\t$minPixel =$arr[1]; // lowest pixel seen on skeleton\n\t\t$maxStrand =$arr[2]; // highest strand seen on target\n\t\t$maxPixel =$arr[3]; // maximum pixel number found when reading the skeleton target\n\t\t$maxI =$arr[4]; // maximum number of pixels in target\n\t\t$tree_rgb =$arr[5];\n\t\t$tree_xyz =$arr[6];\n\t\t$file =$arr[7];\n\t\t$min_max =$arr[8];\n\t\t$tree_user_string_pixel =$arr[9];\n\t\t$file = $arr[7];\n\t\t//\tdefine the front half of the megatree. strand=1 is center of tree facing street\n\t\t//\tget a window of the strands that shoudl be shown.\n\t\t//\tif window=360 degrees, then we show all\n\t\t//\t180 drgrees we only show strands that are +/- 90 degrees each side of strand 1\n\t\t//\n\t\t$window_array=getWindowArray($minStrand,$maxStrand,$window_degrees);\n\t\tfor($l=1;$l<=$maxStrand;$l++){\n\t\t\t$lxxx = substr($l+1000,1,3);\n\t\t\t$tokens=explode(\".\",$t_dat);\n\t\t\t$base=$tokens[0];\n\t\t\t$dat_file = $path . \"/\" . $base . \"_r_$lxxx\" . \".dat\"; // for spirals we will use a dat filename starting \"S_\" and the tree model\n\t\t\t$dat_file_array[]=$dat_file;\n\t\t\t$fh_dat = fopen($dat_file, 'w') or die(\"can't open file\");\n\t\t\tfwrite($fh_dat,\"# $dat_file\\n\");\n\t\t\t$full_path = $path . \"/\" . $x_dat;\n\t\t\t$fh = fopen($full_path, 'r') or die(\"can't open file $full_path\");\n\t\t\t$i=0;\n\t\t\tfor($s=1;$s<=$maxStramd;$s++)\t\t\t$amperage[$l][$s]=0; // we calcultare amperage for each strand.\n\t\t\twhile(!feof($fh)){\n\t\t\t\t$line = fgets($fh);\n\t\t\t\t$tok=preg_split(\"/ +/\", $line);\n\t\t\t\t$cnt = count($tok);\n\t\t\t\tif($cnt<7) continue;\n\t\t\t\t$device=$tok[0];\t// 0 device name\n\t\t\t\t$strand=$tok[1];\t// 1 strand#\n\t\t\t\t$pixel=$tok[2];// 2 pixel#\t\n\t\t\t\t$p=$pixel;\n\t\t\t\t$s=$strand;\n\t\t\t\t$x=$tok[3]; // 3 X value\n\t\t\t\t$y=$tok[4];\t// 4 Y value\n\t\t\t\t$z=$tok[5];\t// 5 Z value\n\t\t\t\tif(empty($tok[6]))\t\t\t\t$rgb_val=0;\n\t\t\t\telse\t\t\t$rgb_val=$tok[6];\n\t\t\t\tif($direction==\"ccw\")\t\t\t$new_s = $strand+$l; // CCW\n\t\t\t\telse\t\t\t$new_s = $strand-$l; // CW\n\t\t\t\tif($new_s>$maxStrand) $new_s = $new_s - $maxStrand;\n\t\t\t\tif($new_s<$minStrand) $new_s = $new_s + $maxStrand;\n\t\t\t\t$xyz=$tree_xyz[$new_s][$p];\n\t\t\t\tif($sparkles>0){\n\t\t\t\t\tif($sparkles>100) $sparkles=100;\n\t\t\t\t\t$rnd=rand(1,100);\n\t\t\t\t\tif($rnd<$sparkles){\n\t\t\t\t\t\t$r=$g=$b=255;\t\t\n\t\t\t\t\t\t$HSL=RGB_TO_HSV ($r, $g, $b);\n\t\t\t\t\t\t$H=$HSL['H']; \n\t\t\t\t\t\t$S=$HSL['S']; \n\t\t\t\t\t\t$V=$HSL['V']; \n\t\t\t\t\t\t$rgb_val=HSV_TO_RGB ($H, $S, $V);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(in_array($new_s,$window_array)){\n\t\t\t\t\t$tree_rgb[$new_s][$p]=$rgb_val;\n\t\t\t\t\t//\t\tfwrite($fh_dat,sprintf (\"t1 %4d %4d %9.3f %9.3f %9.3f %d # %4d %4d %9.3f %9.3f %9.3f\\n\",$new_s,$p,$xyz[0],$xyz[1],$xyz[2],$rgb_val,$strand,$pixel,$x,$y,$z));\n\t\t\t\t\t//\n\t\t\t\t\t// get the VALUE of the rgb value, this tells how intense the LED is turned on\n\t\t\t\t\t$r = ($rgb_val >> 16) & 0xFF;\n\t\t\t\t\t$g = ($rgb_val >> 8) & 0xFF;\n\t\t\t\t\t$b = $rgb_val & 0xFF;\n\t\t\t\t\t$HSL=RGB_TO_HSV ($r, $g, $b);\n\t\t\t\t\t$H=$HSL['H']; \n\t\t\t\t\t$S=$HSL['S']; // Saturation. 1.0 = Full on, 0=off\n\t\t\t\t\t$V=$HSL['V']; \n\t\t\t\t\tif($rgb_val>0){\n\t\t\t\t\t\t$amperage[$l][$new_s] += $V*0.060; // assume 29ma for pixels tobe full on\n\t\t\t\t\t\t//printf ( \"<pre>S,p=%d,%d rgb=%d,%d,%d HSV=%f,%f,%f amperage=%f</PRE>\\n\", $s,$p,$r,$g,$b,$H,$S,$V,$amperage);\n\t\t\t\t\t\tfwrite($fh_dat,sprintf (\"t1 %4d %4d %9.3f %9.3f %9.3f %d\\n\",$s,$p,$xyz[0],$xyz[1],$xyz[2],$rgb_val));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfclose($fh); // x_dat\n\t\tfclose($fh_dat); // dat_file\n\t\t$base_t_dat=$t_dat;\n\t\t//show_elapsed_time($script_start,\"Finished Rotate image about Z axis\");\n\t\t// make_rotate_gp($path,$base_t_dat,$x_dat,$height,$dat_file_array);\n\t\tmake_gp($batch,$path,$x_dat,$t_dat,$dat_file_array,$min_max,$username,$frame_delay,$amperage,$sequence_duration,$show_frame);\n\t}", "title": "" }, { "docid": "02cdc163262eec47b5a7eec639e9e6e0", "score": "0.44914895", "text": "abstract protected function paths();", "title": "" }, { "docid": "0f94e843dd2ea2f22e95981ecf21b140", "score": "0.44871995", "text": "function DWT() { \n }", "title": "" }, { "docid": "b13c512c4eac60bc3741fc3358c58b95", "score": "0.44855654", "text": "function createNewEdges($edges,$x,$y,$key,$ntri) {\n//print_r($edges);\n foreach ($edges as $ekey => $earr)\n {\n list($vi,$vj,$vk)=array($edges[$ekey][0],$edges[$ekey][1],$key);\n //echo(\"<br><BR><BR>XXXXXX\");\n //echo($vi.\" \".$vj.\" \".$vk.\" \");\n //print_r($x);\n //print_r($y);\n //echo(\"<br>XXXXXX<br><BR>\");\n\n if ($this->side($x[$vi],$y[$vi],$x[$vj],$y[$vj],$x[$vk],$y[$vk])==0)\n {\n array_push($this->v,array($vi,$vj,$vk));\n\n } elseif($this->side($x[$vk],$y[$vj],$x[$vj],$y[$vi],$x[$vi],$y[$vk])==0)\n {\n array_push($this->v,array($vk,$vj,$vi));\n\n } elseif($this->side($x[$vk],$y[$vi],$x[$vi],$y[$vj],$x[$vj],$y[$vk])==0)\n {\n array_push($this->v,array($vk,$vi,$vj));\n\n } elseif($this->side($x[$vj],$y[$vi],$x[$vi],$y[$vk],$x[$vk],$y[$vj])==0)\n {\n array_push($this->v, array($vj,$vi,$vk));\n\n } elseif($this->side($x[$vj],$y[$vk],$x[$vk],$y[$vi],$x[$vi],$y[$vj])==0)\n {\n array_push($this->v, array($vj,$vk,$vi));\n\n } elseif($this->side($x[$vi],$y[$vk],$x[$vk],$y[$vj],$x[$vj],$y[$vi])==0)\n {\n array_push($this->v, array($vi,$vk,$vj));\n\n } elseif($this->side($x[$vk],$y[$vk],$x[$vj],$y[$vj],$x[$vj],$y[$vi])==0)\n {\n array_push($this->v, array($vk,$vj,$vi));\n\n } elseif($this->side($x[$vj],$y[$vj],$x[$vk],$y[$vk],$x[$vi],$y[$vi])==0)\n {\n array_push($this->v, array($vj,$vk,$vi));\n }\n else\n {\n array_push($this->v,array($vi,$vj,$vk));\n }\n $this->complete[$ntri++]=0;\n }\n //return array($v,$complete);\n}", "title": "" }, { "docid": "450851f6fbbf73a5faea5cfbc54aace4", "score": "0.4481542", "text": "function render(){\n\t\t\n\t}", "title": "" }, { "docid": "3ff6163e8563c401dce60287aac63241", "score": "0.44694912", "text": "public function memTravelTrips()\n {\n }", "title": "" }, { "docid": "92e7aa3da9522fa610ad4d1ce89a7d1c", "score": "0.4461686", "text": "function getWidth();", "title": "" }, { "docid": "a162ac23840b360be6607ff8d9d48361", "score": "0.4458434", "text": "function getSkinR(){ return $this->img.\"(\".$this->imgR.\")\"; }", "title": "" }, { "docid": "8db00681317c94b2427aac31df5d7bec", "score": "0.44343355", "text": "public function nodeMid();", "title": "" }, { "docid": "400f4fc20ae032cafd3991688fe5f98e", "score": "0.44337496", "text": "static function m4(){ return NULL; }", "title": "" }, { "docid": "03cdd65a6f3f0434432d8930b57d1014", "score": "0.44296488", "text": "function getPerimeter(){\r\n return (($this->width + $this->height)*2);\r\n }", "title": "" }, { "docid": "d2f9895f7929b5d5394c3fcbb8d851db", "score": "0.44263783", "text": "private function getWebMediumStarShape() {\n $shape = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXX\" . '<br />';\n $shape .= \"\" . \"+XXXXXXXXX+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"XXXXX\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />'; \n return $shape;\n }", "title": "" }, { "docid": "ecd1d8889344fde1ef6710a80e2d8b12", "score": "0.44202402", "text": "function mirror(){\n\n\t\t$bottom = floor(($this->Mirror[3] / 100) * $this->thumby) + $this->Mirror[4];\n\t\t$this->newimage = imagecreatetruecolor($this->thumbx, $this->thumby + $bottom);\n\t\timagefilledrectangle($this->newimage, 0, 0, $this->thumbx, $this->thumby + $bottom, imagecolorallocate($this->newimage, hexdec(substr($this->Backgroundcolor, 1, 2)), hexdec(substr($this->Backgroundcolor, 3, 2)), hexdec(substr($this->Backgroundcolor, 5, 2))));\n\t\timagecopy($this->newimage, $this->thumb, 0, 0, 0, 0, $this->thumbx, $this->thumby);\n\t\timagedestroy($this->thumb);\n\t\t$this->thumb = imagecreatetruecolor($this->thumbx, $this->thumby + $bottom);\n\t\timagecopy($this->thumb, $this->newimage, 0, 0, 0, 0, $this->thumbx, $this->thumby + $bottom);\n\t\timagedestroy($this->newimage);\n\t\t$this->thumbx = imagesx($this->thumb);\n\t\t$this->thumby = imagesy($this->thumb);\n\t\tfor($px = 0; $px < $this->thumbx; $px++){\n\t\t\tfor($py = $this->thumby - ($bottom * 2) + $this->Mirror[4]; $py < ($this->thumby - $bottom); $py++){\n\t\t\t\timagecopy($this->thumb, $this->thumb, $px, $this->thumby - ($py - ($this->thumby - ($bottom * 2))) - 1 + $this->Mirror[4], $px, $py, 1, 1);\n\t\t\t}\n\t\t}\n\t\t$this->newimage = imagecreatetruecolor($this->thumbx, 1);\n\t\timagefilledrectangle($this->newimage, 0, 0, $this->thumbx, 1, imagecolorallocate($this->newimage, hexdec(substr($this->Mirrorcolor, 1, 2)), hexdec(substr($this->Mirrorcolor, 3, 2)), hexdec(substr($this->Mirrorcolor, 5, 2))));\n\t\t$shadingstrength = ($this->Mirror[2] - $this->Mirror[1]) / $bottom;\n\t\tfor($c = $this->thumby - $bottom; $c < $this->thumby; $c++){\n\t\t\t$opacity = $this->Mirror[1] + floor(($bottom - ($this->thumby - $c)) * $shadingstrength);\n\t\t\timagecopymerge($this->thumb, $this->newimage, 0, $c, 0, 0, $this->thumbx, 1, max(min($opacity, 100), 0));\n\t\t}\n\t\timagedestroy($this->newimage);\n\n\t}", "title": "" }, { "docid": "bf46b176f0e887fa38b7e10fb977c445", "score": "0.4404483", "text": "function getOGRole();", "title": "" }, { "docid": "609d885f3a301a9a41570fb9439ee091", "score": "0.43981093", "text": "function renderFullNav() {\r\n\t\treturn $this->renderFirst().'&nbsp;'.$this->renderPrev().'&nbsp;' .\r\n\t\t $this->renderNav().'&nbsp;'.$this->renderNext().'&nbsp;'.$this->renderLast();\t\r\n\t}", "title": "" }, { "docid": "c7cc1c1418374f0c63dbac5065a5397c", "score": "0.43977055", "text": "public function width();", "title": "" }, { "docid": "04b3c5849042904c7d66875c7a9435ea", "score": "0.4395642", "text": "function getSize() ;", "title": "" }, { "docid": "ff9861877a65c8f9c8c2e5ec9610bef9", "score": "0.43845028", "text": "function calcPerimeter($width, $height)\n{\n return 2 * ($width + $height);\n}", "title": "" }, { "docid": "86555a5ffa99017ec874f7c0dadaeeb1", "score": "0.43818313", "text": "public function bgrewriteaof() {}", "title": "" }, { "docid": "f1b90c4f2821d3c23b2159ccc2061dd7", "score": "0.43802327", "text": "function XNODE_pri_getpathbytarget($base,$node,$target,$value,$create,$pri)\n{\n foreach($base.\"/\".$node)\n {\n if (query($target) == $value)\n {\n if($pri != \"0\")\n {\n if(query(\"priority\") == $pri)\n return $base.\"/\".$node.\":\".$InDeX;\n }\n else\n return $base.\"/\".$node.\":\".$InDeX;\n }\n }\n\n if ($create > 0)\n {\n $i = query($base.\"/\".$node.\"#\")+1;\n $path = $base.\"/\".$node.\":\".$i;\n set($path.\"/\".$target, $value);\n return $path;\n }\n\n return \"\";\n\n}", "title": "" }, { "docid": "0f00019159bb594177f1f09e848c2a4d", "score": "0.43769237", "text": "function getRoot(){\r\n return $this->root;\r\n }", "title": "" }, { "docid": "780fddda29862d5bd12eba2aee41fb70", "score": "0.43669003", "text": "private function getWebSmallStarShape() {\n $shape = \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"\" . \"+XXXXX+\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"X\" . '<br />';\n $shape .= \"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\" . \"+\" . '<br />';\n return $shape;\n }", "title": "" }, { "docid": "b44f71c6742fb12307040506a5aa933a", "score": "0.43622598", "text": "abstract public function getWidth();", "title": "" }, { "docid": "153a0e889d9c49c5b6b6910a7de37bc0", "score": "0.43611795", "text": "function triangle($side)\r\n {\r\n for ($i = 1; $i <= $side; $i++) {\r\n for ($j = $i; $j < $side; $j++)\r\n echo \" \";\r\n\r\n for (\r\n $j = 1;\r\n $j <= (2 * $i - 1);\r\n $j++\r\n ) {\r\n if (\r\n $i == $side || $j == 1 ||\r\n $j == (2 * $i - 1)\r\n )\r\n echo \"*\";\r\n\r\n else\r\n echo \"*\";\r\n }\r\n echo \"<br>\";\r\n }\r\n }", "title": "" }, { "docid": "831b3bcd8e685722cdfe16389aa31154", "score": "0.4355678", "text": "function prikaziNavigaciju() {\n //echo $this->renderFirst() . \" \" . $this->renderPrev();\n \n\t\treturn $this->renderFirst() . '&nbsp;' . $this->renderPrev() . '&nbsp;' . $this->renderNav() . '&nbsp;' . $this->renderNext() . '&nbsp;' . $this->renderLast();\n\t}", "title": "" }, { "docid": "7b35cbd980408565a4fa17c071031818", "score": "0.43520027", "text": "function getPath(){\r\n return $this->startpath;\r\n }", "title": "" }, { "docid": "3be76f28c172abb0b1f0abf218a80476", "score": "0.43507004", "text": "function travel($x1,$y1,$x2,$y2,$lvl)\n{\n\t\n\t//$costos = intval(intval($result/(1550000/($lvl*$lvl)))/3) +1;\n\t\n\treturn 0;\n}", "title": "" }, { "docid": "2a42c3c6809e382b68ac3a83a6706b4e", "score": "0.4347132", "text": "function createSun() {\n global $funcVersion; $funcVersion = 1;\n $n = 3;\n $r='';\n $e=2*$n+1; //edge length\n for($i=0;$i<$e*$e;$i++) {\n $h = floor($e/2); // half point of square\n $x = floor($i%$e); // current x coordinate\n $y = floor($i/$e); // current y coordinate\n\n if ($y==$h&&$x==$h) {\n // center of square\n $r.='O';\n }\n else if ($y==$h) {\n // horizontal line\n $r.='-';\n }\n else if ($x==$h) {\n // vertical line\n $r.='|';\n }\n else if (($y-$h)==($x-$h)) {\n // diagonal line from top-left to bottom right\n $r.='\\\\';\n }\n else if (($y-$h)==($h-$x)) {\n // diagonal line from bottom-left to top-right\n $r.='/';\n }\n else {\n // empty space\n $r.=' ';\n }\n if ($x==$e-1) {\n // add new line for the end of the row\n $r.=\"\\n\";\n }\n }\n //echo \"<pre>\"; echo $r; echo \"</pre>\";\n}", "title": "" }, { "docid": "133c9eee93d219314e7477d9f166177d", "score": "0.43374634", "text": "function getIndex() ;", "title": "" }, { "docid": "5c12a75f60f4e37e1f4d2feaba054880", "score": "0.4337079", "text": "abstract function fromexp();", "title": "" }, { "docid": "bbfffd7eaeb139eb24b89681390c410f", "score": "0.4334539", "text": "public function hcenter() {\n\t}", "title": "" }, { "docid": "6d0c7348ac7b73ce829e0181126f87c5", "score": "0.43331525", "text": "public function center() : array;", "title": "" }, { "docid": "db66e9becf9dde08107ad6ffd415856a", "score": "0.43270576", "text": "function expand()\n{\n\n}", "title": "" }, { "docid": "26be05dd4e49dba9b912a3f2e31a9edb", "score": "0.43261492", "text": "function calc_size()\n\t{\n\t}", "title": "" }, { "docid": "aa4979821195e5bfb4129f3fc15e242f", "score": "0.43210137", "text": "function drawSeparationLines($data){\n//Top Line\n $max = maxDataLengths($data);\n echo Line_corner;\n foreach ($max as $value) {\n echo str_repeat(\"-\", $value+3) ;\n }\n echo Line_corner . Line_endline;\n //Top Line end\n}", "title": "" }, { "docid": "e9ff1e4f8b211502cd08209dda8be708", "score": "0.4316665", "text": "function get_dimesions($shapes) {\n foreach($shapes as $key=>$shape) {\n echo \"<strong>Shape $key</strong><br>\";\n\n echo \"Cordinates - x,y<br>\".\n \"bottom_left: \".$shape['bottom_left'][0].\",\".$shape['bottom_left'][1].\" - \".\n \"top_left: \".$shape['top_left'][0].\",\".$shape['top_left'][1].\" - \".\n \"bottom_right: \".$shape['bottom_right'][0].\",\".$shape['bottom_right'][1].\" - \".\n \"top_right: \".$shape['top_right'][0].\",\".$shape['top_right'][1].\"<br>\";\n\n // for simplicity we are considering all shapes square with equal co-ordinates for height and width\n $dimensions['width'] = ($shape['bottom_right'][0] - $shape['bottom_left'][0])+1;\t\n echo \"Width: \".$dimensions['width'].\"<br>\";\n $dimensions['height'] = ($shape['top_right'][1] - $shape['bottom_left'][1])+1;\n echo \"Height: \".$dimensions['height'].\"<br>\";\n\n }\n return $dimensions;\n}", "title": "" }, { "docid": "d43b830102b6998df211930ad1134ad6", "score": "0.43142515", "text": "function getImageSize() \n { \n return array($this->_width,$this->_height); \n }", "title": "" }, { "docid": "65eec96814eb79e005cdded5c9d89ec2", "score": "0.4309381", "text": "private function initSpace(){\n \t\t$space=0;\n \t\tif(strlen($this->border)==0)\t$space=\"\";\n \t\telse $space=$this->border.$this->space( ($this->width) - 1).$this->border;\n \t\t$this->initspace=$space;\n \t}", "title": "" }, { "docid": "af73ec688f447ffc48e55dc47f637110", "score": "0.4308735", "text": "function main($_o){\r\n\r\n $path = (!empty($_o[\"p\"])) ? $_o[\"p\"] : \"\";\r\n $path2 = \"P:/develope/www/dpa/__20120605/\" . $path;\r\n $path1 = \"P:/develope/www/dpa/eswine/\" . $path;\r\n\r\n $l_arr1 = transPath($path1);\r\n $l_arr2 = transPath($path2);\r\n print_r($l_arr1);\r\n print_r($l_arr2);\r\n\r\n //\r\n $l_diff1 = array_diff($l_arr1,$l_arr2);\r\n sort($l_diff1);\r\n $l_diff2 = array_diff($l_arr2,$l_arr1);\r\n sort($l_diff2);\r\n print_r($l_diff1);\r\n print_r($l_diff2);\r\n}", "title": "" }, { "docid": "37979e44ed6bb2a3673a0ff3ec2be995", "score": "0.43062297", "text": "function getTree (array $array, $index = '')\n{\n echo '45144654654';\n}", "title": "" }, { "docid": "c42d4c01df79498d633a202a541b6525", "score": "0.43008876", "text": "function getPath(){\n\t\treturn $this->path;\t\n\t}", "title": "" }, { "docid": "ae12a10562766606f009d5f7f7c047c3", "score": "0.429416", "text": "function swf_endshape()\n{\n}", "title": "" }, { "docid": "0bc08441c2b35eeab411c683efadfbd3", "score": "0.42877096", "text": "function side($x1,$y1,$x2,$y2,$px,$py)\n {\n\n //echo(\"<br> x1 \".$x1.\" y1 \".$y1.\" x2 \".$x2.\" y2 \".$y2.\" px \".$px.\" py \".$py);\n $dx1 = $x2 - $x1;\n $dy1 = $y2 - $y1;\n $dx2 = $px - $x1;\n $dy2 = $py - $y1;\n //echo(\"<br> dx dy dx1 \".$dx1.\" dy1 \".$dy1.\" dx2 \".$dx2.\" dy2 \".$dy2);\n $o = ($dx1*$dy2)-($dy1*$dx2);\n //echo(\"<br> o \".$o);\n if ($o > 0.0){\n //echo(\" xxx 0\");\n return(0);}\n if ($o < 0.0) {\n //echo (\"yyy 1\");\n return(1);}\n //echo(\"zero zero\");\n return(-1);\n }", "title": "" }, { "docid": "8916f5a612401010460008ad1622e9a9", "score": "0.42840293", "text": "function _get_item_segments()\n{\n$segments = \"musical/instrument/\";\nreturn $segments;\n\n}", "title": "" }, { "docid": "838d84b07706133e7018d0218920285a", "score": "0.4283169", "text": "public function findPath(){\r\n\r\n $position = $this->_startPoint;\r\n $tile = $this->_getTile($position);\r\n\r\n while(!$this->_checkEnd($position)){\r\n $direction = $tile->move();\r\n $position = $this->_getNewPosition($position,$direction);\r\n $newTile = $this->_getTile($position);\r\n $newTile->enter($direction);\r\n $tile = $newTile;\r\n }\r\n\r\n return $this->_getResult();\r\n }", "title": "" }, { "docid": "fcba7610f5cbb3e58d7cc2bbb0995073", "score": "0.42815313", "text": "abstract public function pos();", "title": "" }, { "docid": "c3a12a68c8c1069db557d6e4e3837617", "score": "0.42769012", "text": "function divide($a, $b){\n\treturn $a / $b;\n}", "title": "" }, { "docid": "d39da347c8302b8cb23003d766fb8ee4", "score": "0.42768922", "text": "function getOffset() ;", "title": "" }, { "docid": "5a0762e5ec0204e64e12d3fe86f60691", "score": "0.42767322", "text": "function getStretch() {return $this->_stretch;}", "title": "" }, { "docid": "ccc47f1fd631a9bbe03d5c1c644ed353", "score": "0.4275294", "text": "public function getW() {}", "title": "" }, { "docid": "d0c8b8020a18374ac637f6766621b602", "score": "0.42738664", "text": "function duotone (&$image, $rplus, $gplus, $bplus) {\n $imagex = imagesx($image);\n $imagey = imagesy($image);\n\n for ($x = 0; $x <$imagex; ++$x) {\n for ($y = 0; $y <$imagey; ++$y) {\n $rgb = imagecolorat($image, $x, $y);\n $red = ($rgb >> 16) & 0xFF;\n $green = ($rgb >> 8) & 0xFF;\n $blue = $rgb & 0xFF;\n $red = (int)(($red+$green+$blue)/3);\n $green = $red + $gplus;\n $blue = $red + $bplus;\n $red += $rplus;\n\n if ($red > 255) $red = 255;\n if ($green > 255) $green = 255;\n if ($blue > 255) $blue = 255;\n if ($red < 0) $red = 0;\n if ($green < 0) $green = 0;\n if ($blue < 0) $blue = 0;\n\n $newcol = imagecolorallocate ($image, $red,$green,$blue);\n imagesetpixel ($image, $x, $y, $newcol);\n }\n }\n }", "title": "" }, { "docid": "80ff4e03c01aa3bf4ae542a6a16ddfaf", "score": "0.42721543", "text": "public function burst2()\n {\n\n if (!isset($this->grid[$this->curX][$this->curY]) || ($this->grid[$this->curX][$this->curY] == '.')) {\n $this->curDir--;\n if ($this->curDir < 0) {\n $this->curDir = 3;\n }\n } else if ($this->grid[$this->curX][$this->curY] == '#') {\n $this->curDir = abs(($this->curDir + 1) % 4);\n } else if ($this->grid[$this->curX][$this->curY] == 'F') {\n $this->curDir = abs(($this->curDir + 2) % 4);\n } else if ($this->grid[$this->curX][$this->curY] == 'W') {\n // nop\n } else {\n assert (\"Bad state\");\n exit(1);\n }\n\n if (!isset($this->grid[$this->curX][$this->curY]) || ($this->grid[$this->curX][$this->curY] == '.')) {\n // Clean nodes become weakened.\n $this->grid[$this->curX][$this->curY] = 'W';\n } else if ($this->grid[$this->curX][$this->curY] == '#') {\n // Infected nodes become flagged.\n $this->grid[$this->curX][$this->curY] = 'F';\n } else if ($this->grid[$this->curX][$this->curY] == 'F') {\n // Flagged nodes become clean.\n $this->grid[$this->curX][$this->curY] = '.';\n } else if ($this->grid[$this->curX][$this->curY] == 'W') {\n // Weakened nodes become infected.\n $this->grid[$this->curX][$this->curY] = '#';\n $this->infCount++;\n } else {\n assert (\"Bad state\");\n exit(1);\n }\n\n // Move forward\n switch ($this->curDir) {\n case self::NORTH:\n // print \"Move north\\n\";\n $this->curY++;\n break;\n\n case self::EAST:\n // print \"Move east\\n\";\n $this->curX++;\n break;\n\n case self::SOUTH:\n // print \"Move south\\n\";\n $this->curY--;\n break;\n\n case self::WEST:\n // print \"Move west\\n\";\n $this->curX--;\n break;\n\n default:\n error_log(\"Bad Direction: {$this->curDir}\");\n exit(1); \n } \n }", "title": "" }, { "docid": "be661b272f0b2d921f35ec910f530641", "score": "0.42713133", "text": "function rectangle() {\n\n}", "title": "" }, { "docid": "254b6efbb120d27af86708f4fef6d2b7", "score": "0.42670593", "text": "function rectangle($l, $b)\r\n {\r\n\r\n for ($i = 1; $i <= $l; $i++) {\r\n for ($j = 1; $j <= $b; $j++)\r\n if (\r\n $i == 1 || $i == $l ||\r\n $j == 1 || $j == $b\r\n )\r\n echo \"*\";\r\n\r\n else\r\n echo \"*\";\r\n echo \"<br>\";\r\n }\r\n }", "title": "" }, { "docid": "572b45502dc22ce7db0bb01bea3963d1", "score": "0.42613372", "text": "abstract function gemir();", "title": "" }, { "docid": "3b8e3fb5413bf18df63308c70f2cd5ff", "score": "0.4260813", "text": "public function bandera();", "title": "" }, { "docid": "5c877039497311d8793aefc36e47af09", "score": "0.4258293", "text": "function move($str){\n/*\tif L\n\ttemp = y;\n\ty = x;\n\tx = -temp;\n\tif R\n\ttemp = x;\n\t x = y;\n\ty = -temp;\n\tif M\n\tposX += x;\n\tposY += y; \n*/\t}", "title": "" }, { "docid": "553f51782da650a9f845372699354fb9", "score": "0.42550284", "text": "function tower_builder($n)\n{\n $arr = [];\n $str = '';\n $int = $n;\n for ($i = 0; $i < $int; $i++) {\n for ($k = $int - $i; $k > 1; $k--) {\n $str .= ' ';\n }\n for ($j = 0; $j <= $i * 2; $j++) {\n $str .= '*';\n }\n for ($m = $int - $i; $m > 1; $m--) {\n $str .= ' ';\n }\n $arr[] = $str;\n $str = null;\n }\n return $arr;\n}", "title": "" }, { "docid": "a43d5906a841152edf00e150a9e7b5b8", "score": "0.42535543", "text": "function bordert()\t\t{\t$this->salida.=\"\\\\brdrt \";\t}", "title": "" }, { "docid": "a77f001e0c3453b906ef4d67cf084dc9", "score": "0.42511892", "text": "function pos($array)\n{\n}", "title": "" }, { "docid": "419dd794542b9d03153590f46b0135fe", "score": "0.42400947", "text": "function get_dimesions_3d($shapes) {\n foreach($shapes as $key=>$shape) {\n echo \"<strong>Shape $key</strong><br>\";\n\n echo \"Cordinates - x,y,z1 (front),z2 (back)<br>\".\n \"bottom_left: \".$shape['bottom_left'][0].\",\".$shape['bottom_left'][1].\",\".$shape['bottom_left'][2].\",\".$shape['bottom_left'][3].\" - \".\n \"top_left: \".$shape['top_left'][0].\",\".$shape['top_left'][1].\",\".$shape['bottom_left'][2].\",\".$shape['bottom_left'][3].\" - \".\n \"bottom_right: \".$shape['bottom_right'][0].\",\".$shape['bottom_right'][1].\",\".$shape['bottom_left'][2].\",\".$shape['bottom_left'][3].\" - \".\n \"top_right: \".$shape['top_right'][0].\",\".$shape['top_right'][1].\",\".$shape['bottom_left'][2].\",\".$shape['bottom_left'][3].\"<br>\";\n\n // for simplicity we are considering all shapes square with equal co-ordinates for height and width\n $dimensions['width'] = ($shape['bottom_right'][0] - $shape['bottom_left'][0])+1;\t\n echo \"Width: \".$dimensions['width'].\"<br>\";\n $dimensions['height'] = ($shape['top_right'][1] - $shape['bottom_left'][1])+1;\n echo \"Height: \".$dimensions['height'].\"<br>\";\n\n }\n return $dimensions;\n}", "title": "" }, { "docid": "2fb7c6408890c7238f55ea7e4dc32bcd", "score": "0.42331952", "text": "function cardinal_direction($angle, $division = 8) {\n//Parameters:\n//$angle is the angle to be described in degrees (may be positive or negative)\n//$division is number of cardinal points to be used. \n// It may be 2 (N or S), 4 (N, E, S, W), 8 (N, NE, W, etc), 16 (N, NNE, NE, ENE, etc) or\n// 32 (N, NNE by N, NNE, NNE by E, NE by N, etc)\n//Returns:\n//Array with keys\n// 'resolved_angle' is the numerical value of the returned angle\n// 'short_name' is the abbreviation of the text description of the returned angle (N, NE, NNExE, etc)\n// 'full_name' is the full text version of the decription of the returned angle (N, North East by North)\n//Check division is one of the acceptable angles. \n if ($division == !in_array($division, array('2', '4', '8', '16', '32'))) {\n return FALSE;\n }\n\n $short_name = array(\n '0' => 'N',\n 11.25 => 'NxE',\n 22.5 => 'NNE',\n 33.75 => 'NExN',\n 45 => 'NE',\n 56.25 => 'NExE',\n 67.5 => 'ENE',\n 78.75 => 'ExN',\n 90 => 'E',\n 101.25 => 'ExS',\n 112.5 => 'ESE',\n 123.75 => 'SExE',\n 135 => 'SE',\n 146.25 => 'SExS',\n 157.5 => 'SSE',\n 168.75 => 'SxE',\n 180 => 'S',\n 191.25 => 'SxW',\n 202.5 => 'SSW',\n 213.75 => 'SWxS',\n 225 => 'SW',\n 236.25 => 'SWxW',\n 247.5 => 'WSW',\n 258.75 => 'WxS',\n 270 => 'W',\n 281.25 => 'WxN',\n 292.5 => 'WNW',\n 303.75 => 'NWxW',\n 315 => 'NW',\n 326.25 => 'NWxN',\n 337.5 => 'NNW',\n 348.75 => 'NxW'\n );\n\n $full_name = array(\n '0' => 'North',\n 11.25 => 'North by East',\n 22.5 => 'North North East',\n 33.75 => 'North East by North',\n 45 => 'North East',\n 56.25 => 'North East by East',\n 67.5 => 'East North East',\n 78.75 => 'East by North',\n 90 => 'East',\n 101.25 => 'East by South',\n 112.5 => 'East South East',\n 123.75 => 'South East by East',\n 135 => 'South East',\n 146.25 => 'South East by South',\n 157.5 => 'South South East',\n 168.75 => 'South by East',\n 180 => 'South',\n 191.25 => 'South by West',\n 202.5 => 'South South West',\n 213.75 => 'South West by South',\n 225 => 'South West',\n 236.25 => 'South West by West',\n 247.5 => 'West South West',\n 258.75 => 'West by South',\n 270 => 'West',\n 281.25 => 'West by North',\n 292.5 => 'West North West',\n 303.75 => 'North West by West',\n 315 => 'North West',\n 326.25 => 'North West by North',\n 337.5 => 'North North West',\n 348.75 => 'North by West'\n );\n\n//Make sure angle is 0-359 and positive\n $angle = $angle % 360;\n\n if ($angle < 0) {\n $angle = 360 + $angle; //Addition beacause angle is negative\n }\n\n\n//Work out how big each segment is in degrees (e.g NSEW is 90deg segments)\n $segment_size = 360 / $division;\n\n//Resolved angle is the closest 'segment' to the passed $angle\n $resolved_angle = (float) round($angle / $segment_size) * $segment_size;\n if ($resolved_angle == 360) {\n $resolved_angle = 0; //0 will resolve to 360 so set it back to 0\n };\n\n return array('resolved_angle' => $resolved_angle, 'short_name' => $short_name[$resolved_angle], 'full_name' => $full_name[$resolved_angle]);\n }", "title": "" }, { "docid": "5571edcf819b260956fbe88ba3a5c0c8", "score": "0.42330033", "text": "function formSubDir($width=0){\n\t\t\n\t\treturn '';\n\t}", "title": "" }, { "docid": "cf9a71a11185ed8936184747b117af88", "score": "0.42280436", "text": "function anterior($dir){\r\n\t$dir = explode(\"/\",$dir);\r\n\tunset($dir[count($dir)-1]);\r\n\tif($dir[1] == \"\"){\r\n\t\t$dir[0] = \"/\";\r\n\t}\r\n\treturn implode(\"/\",$dir);\r\n}", "title": "" }, { "docid": "3874fb259ec6f29128cf859497c3d2c3", "score": "0.42265952", "text": "function twirlfx(){\n\n\t\t$rotationamount = $this->Twirlfx[1] / 1000;\n\t\t$centerx = floor($this->size[0] / 2);\n\t\t$centery = floor($this->size[1] / 2);\n\t\t$this->newimage = imagecreatetruecolor($this->size[0], $this->size[1]);\n\t\tfor($y = 0; $y < $this->size[1]; $y++){\n\t\t\tfor($x = 0; $x < $this->size[0]; $x++){\n\t\t\t\t$truex = $x - $centerx;\n\t\t\t\t$truey = $y - $centery;\n\t\t\t\t$theta = atan2(($truey), ($truex));\n\t\t\t\t$radius = sqrt($truex * $truex + $truey * $truey);\n\t\t\t\tif($this->Twirlfx[2] == 0){\n\t\t\t\t\t$newx = $centerx + ($radius * cos($theta + $rotationamount * $radius));\n\t\t\t\t\t$newy = $centery + ($radius * sin($theta + $rotationamount * $radius));\n\t\t\t\t} else{\n\t\t\t\t\t$newx = $centerx - ($radius * cos($theta + $rotationamount * $radius));\n\t\t\t\t\t$newy = $centery - ($radius * sin($theta + $rotationamount * $radius));\n\t\t\t\t}\n\t\t\t\t$newpix = $this->bilinear($newx, $newy);\n\t\t\t\timagesetpixel($this->newimage, $x, $y, imagecolorallocatealpha($this->newimage, $newpix['red'], $newpix['green'], $newpix['blue'], $newpix['alpha']));\n\t\t\t}\n\t\t}\n\t\timagecopy($this->im, $this->newimage, 0, 0, 0, 0, $this->size[0], $this->size[1]);\n\t\timagedestroy($this->newimage);\n\n\t}", "title": "" } ]
653e2e74419c60c1c79dda697c8857c6
Get found node satisfying the filter callback. Returns null if no node satisfies the filter callback.
[ { "docid": "51b4955cfa57c16414e5705f807ab39f", "score": "0.5809645", "text": "public function getFoundNode()\n {\n return $this->foundNode;\n }", "title": "" } ]
[ { "docid": "a9a2dbc3d9ac6d7d574f6d29b6b02faa", "score": "0.612269", "text": "public function find(callable $callback, callable $noneFound = null);", "title": "" }, { "docid": "6c7309f9b5e0151655e3233a3c118e23", "score": "0.58826137", "text": "public function popMatching(callable $filter)\n {\n foreach ($this as $element) {\n if ($filter($element)) {\n $this->delete($element);\n\n return $element;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "4aabcaba66bd0fad39e456cbf19f4119", "score": "0.5689651", "text": "public function filter(?callable $callback = null): static;", "title": "" }, { "docid": "8d40012f1e21532ca2185e6919fcff96", "score": "0.56839395", "text": "public function first(callable $callback)\n {\n foreach ($this->data as $index => $value) {\n if ($callback($value, $index)) {\n return $value;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "481c9b3f9526d4ed5653be2f9345e18d", "score": "0.56686044", "text": "public function find(callable $callback, $default = null);", "title": "" }, { "docid": "a706f18cd018f5d5c93137e64b723120", "score": "0.5512386", "text": "public function find(Closure $callback): ?Model {\n foreach ($this->models as $model) {\n if ($callback($model)) return $model;\n }\n return null;\n }", "title": "" }, { "docid": "a706f18cd018f5d5c93137e64b723120", "score": "0.5512386", "text": "public function find(Closure $callback): ?Model {\n foreach ($this->models as $model) {\n if ($callback($model)) return $model;\n }\n return null;\n }", "title": "" }, { "docid": "7f5229acdaeb178cff0ffaa80083eabe", "score": "0.54698163", "text": "function find(callable $pred): \\Closure\n{\n return function (array $xss) use ($pred) {\n if ([] === $xs = $xss[0] ?? []) {\n return null;\n }\n\n if ($pred($xs)) {\n return $xs;\n }\n\n return find($pred)(tail($xss));\n };\n}", "title": "" }, { "docid": "3e2a6d2c10476f1b31734f47d33b5f09", "score": "0.5397333", "text": "public function find($re, $filter = null) {\n $result = null;\n $this->each(function($context) use ($re, $filter, &$result) {\n $r = $context->find($re, $filter);\n if (!$r->isEmpty()) {\n $result = $r;\n return false;\n }\n });\n\n return $result?:Context::getEmptyContext();\n }", "title": "" }, { "docid": "83d9c6e80166016f047ada66840e5f99", "score": "0.5303938", "text": "public function filter($selector): self {\n $callback = $this->getSelectorCallback($selector);\n $result = $this->spawn();\n foreach ($this->_nodes as $index => $node) {\n if ($callback($node, $index)) {\n $result->push($node);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "2c31b6db13cb566073b1a482caf55cc1", "score": "0.52945", "text": "protected function _getMatchedNode($nodePath)\n {\n foreach ($this->_nonMatchedPatterns as $pattern) {\n if (preg_match('#^' . $pattern . '$#', $nodePath)) {\n return null;\n }\n }\n\n return parent::_getMatchedNode($nodePath);\n }", "title": "" }, { "docid": "8b173f50e845933144b5a070728bc04e", "score": "0.52571124", "text": "private function rise(callable $predicate): ?self\n {\n $node = $this;\n\n while ($node && ! $predicate($node)) {\n $node = $node->parent;\n }\n\n return $node;\n }", "title": "" }, { "docid": "4faf222533435444b69c6832439fc933", "score": "0.5236659", "text": "public static function find(callable $callback, array $array)\n {\n foreach ($array as $item) {\n if (call_user_func($callback, $item)) {\n return $item;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "daed652f46bd5dc7d3ea1739c9f9c53e", "score": "0.52026284", "text": "function array_find(array $arr, callable $callback): mixed\n{\n foreach ($arr as $item)\n {\n if ($callback($item))\n {\n return $item;\n }\n }\n return null;\n}", "title": "" }, { "docid": "ca969498b7f8628d0542da2700c04647", "score": "0.51664895", "text": "function filter_db_get_filter( $p_filter_id, $p_user_id = null ) {\n\tglobal $g_cache_filter_db_filters;\n\t$c_filter_id = (int)$p_filter_id;\n\n\tif( !filter_is_accessible( $c_filter_id, $p_user_id ) ) {\n\t\treturn null;\n\t}\n\n\tif( isset( $g_cache_filter_db_filters[$c_filter_id] ) ) {\n\t\tif( $g_cache_filter_db_filters[$c_filter_id] === false ) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $g_cache_filter_db_filters[$c_filter_id];\n\t}\n\n\t$t_filter_row = filter_cache_row( $c_filter_id, /* trigger_errors */ false );\n\tif( $t_filter_row ) {\n\t\t$g_cache_filter_db_filters[$c_filter_id] = $t_filter_row['filter_string'];\n\t} else {\n\t\t$g_cache_filter_db_filters[$c_filter_id] = false;\n\t}\n\n\treturn $g_cache_filter_db_filters[$c_filter_id];\n}", "title": "" }, { "docid": "8a9a75c868596ae16724353925a9172c", "score": "0.5158803", "text": "public function findIndex($valueOrCallback, callable $noneFound = null);", "title": "" }, { "docid": "4a4dbc41267c42c08412cca96e972dae", "score": "0.5149178", "text": "public function filter(callable $callback);", "title": "" }, { "docid": "bca825efccae4c00008b53df97beaca4", "score": "0.510801", "text": "public function findFilterByUserId(int $userId, string $pageName, int $filterId): ?Filter;", "title": "" }, { "docid": "9acbbe0c2683c53ec500e5e75a0bef9e", "score": "0.5103981", "text": "protected function nextNotVisited() {\n $id = $this->nextNotVisitedId();\n if($id !== null) {\n return $this->getGraph()->getNodeById($id);\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "eb837e39e4b9136c5f9c996fda4e4c79", "score": "0.50907356", "text": "public function filter($callback) {}", "title": "" }, { "docid": "4c41e31e7139434c4672be8b99e0d26f", "score": "0.50857514", "text": "public function getNode() {\n //execute query\n $this->executeQuery();\n \n $returnValue = null;\n if(count($this->resultNodes) > 0){\n $returnValue = $this->resultNodes[0];\n }\n \n //this is a termination method clear out properties\n $this->xpathQuery = \"\";\n $this->resultNodes = null;\n \n return $returnValue;\n }", "title": "" }, { "docid": "4e474ee1c2f05be301600d03b4fc0db3", "score": "0.5079335", "text": "function searchable(callable $callback);", "title": "" }, { "docid": "ef2d1fd38467bfcc013024af309bab41", "score": "0.50678587", "text": "function get_node_where($where)\r\n\t{\r\n\t\t$scope_column=$this->scope_column;\r\n\t\t$class = get_class($this);\r\n\t\t$node = new $class();\r\n\t\t$node->where($where);\r\n\t\t$node->where($this->scope_column,$this->get_scope());\r\n\t\t\r\n\t\t$node=$node->find(false,false);\r\n\t\treturn $node;\r\n\t}", "title": "" }, { "docid": "030c35b88d9fd076c9e0fbe760129568", "score": "0.5048689", "text": "public function first(callable $callback = null)\n {\n foreach ($this->all() as $key => $value) {\n\n if (null === $callback || $callback($value, $key, $this)) return $value;\n }\n }", "title": "" }, { "docid": "d94c5c08b4158e79517da7677b39ae34", "score": "0.50237304", "text": "function array_find( callable $callback, array $arr )\n {\n \n $i = 0;\n \n foreach( $arr as $item ) {\n if( $callback( $item, $i ) ) return $item;\n $i++;\n }\n \n return null;\n }", "title": "" }, { "docid": "0bdcbe10e928ac2f2073b57ed6df86a2", "score": "0.50039274", "text": "public function find(callable $finder): ?Entity\n {\n foreach ($this->entities as $entity) {\n if ($finder($entity)) {\n return $entity;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "ed0275b577fa743df25b1a4a2404df18", "score": "0.49996325", "text": "function &getFilter($seq) {\n\t\t$filter = null;\n\t\tif (isset($this->_filters[$seq])) {\n\t\t\t$filter =& $this->_filters[$seq];\n\t\t}\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "aecb7cb9bd925e4653b44223e31ccd9e", "score": "0.49702463", "text": "public function searchBy($key, $value, callable $callback = null): ?Item\n {\n $matchItem = null;\n\n if ($this->{$key} === $value) {\n $matchItem = $this;\n } else {\n $this->items->each(function ($item) use (&$matchItem, $key, $value) {\n if ($foundItem = $item->findBy($key, $value)) {\n $matchItem = $foundItem;\n }\n });\n }\n\n if (is_callable($callback) && $matchItem) {\n call_user_func($callback, $matchItem);\n }\n\n return $matchItem;\n }", "title": "" }, { "docid": "67d6e12ebcd54cb0306c0e3304e22c51", "score": "0.4969825", "text": "public function getFilterCallback() {\n\t\t\treturn $this->cFilterCallback;\n\t\t}", "title": "" }, { "docid": "7cfae0c2fe3d1f463d8900a443e9c25e", "score": "0.4962098", "text": "public static function find(array $arr, callable $fn)\n {\n foreach ($arr as $x) {\n if (call_user_func($fn, $x) === true) {\n return $x;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "e2d4939a62f57ea1d18b6450f8979cff", "score": "0.49478245", "text": "public function first()\n {\n $this->resetStatus();\n $this->_node = $this->nodeFirst($this->_tree);\n return ($this->_node) ? $this->_node->data : null;\n }", "title": "" }, { "docid": "8dcd4e29a68292a4ca2b4a6582644886", "score": "0.4941121", "text": "public function filter(callable $callback = null)\n {\n if ($callback) {\n $filtered = new static(array_filter($this->items, $callback));\n } else {\n $filtered = new static(array_filter($this->items));\n }\n\n $filtered->checks_for_world = $this->checks_for_world;\n\n return $filtered;\n }", "title": "" }, { "docid": "cff075b49897a5464f795f602b346dea", "score": "0.49331513", "text": "private function searchFirst(array $items, callable $callback, $default = null)\n {\n foreach ($items as $item) {\n if ($callback($item)) {\n return $item;\n }\n }\n\n return $default;\n }", "title": "" }, { "docid": "21777fc1dd5960e3942b247364ef3abb", "score": "0.49278668", "text": "public function filter(Closure $callback = null)\n {\n if ($callback === null) {\n return $this->filter;\n }\n\n call_user_func($callback, $this->filter);\n\n return $this;\n }", "title": "" }, { "docid": "93187e8b3d6f9a373bbd70b19a9ee38c", "score": "0.49229935", "text": "public function findFilterDef($filterName) {\n \t$filterDefs = $this->getFilterDefs();\n \tif(!empty($filterDefs[$filterName])) return $filterDefs[$filterName];\n \treturn (null);\n }", "title": "" }, { "docid": "01e45c6f5b466eb5c828c360ec92f553", "score": "0.489764", "text": "public function getNode(): ?Node\n {\n return $this->node;\n }", "title": "" }, { "docid": "f3932b7044cdfd5832eb8bea3a61b617", "score": "0.48916075", "text": "function find( &$value, $name, $type='asis', $filter=array() ) {\n $found = FALSE;// not found\n $value = NULL; // not found\n foreach( $this->data_source as $src_name => $source ) {\n $value = Validator::_find( $source, $name, $filter, $type );\n if( Util::isValue( $value ) ) {\n $found = $src_name;\n break;\n }\n }\n return $found;\n }", "title": "" }, { "docid": "9d951ab5aac9f4c1a21da7390931a327", "score": "0.48765713", "text": "public function firstOrNull($condition = null) {\n $elem = null;\n if(isset($condition)){\n $where = $this->where($condition);\n $where->_iterator->rewind();\n $elem = $where->_iterator->current();\n } else {\n $this->_iterator->rewind();\n $elem = $this->_iterator->current();\n }\n return $elem;\n }", "title": "" }, { "docid": "b7c0ddb23f14a4e88a3122466b976a01", "score": "0.4870635", "text": "public function getFirstChild(\n array $criteria = null,\n array $order = null,\n AuthorizationChecker $authorizationChecker = null,\n $preview = false\n ) {\n $defaultCrit = [\n 'node.parent' => $this->nodeSource->getNode(),\n 'node.status' => ['<=', Node::PUBLISHED],\n 'translation' => $this->nodeSource->getTranslation(),\n 'node.nodeType.newsletterType' => false,\n ];\n\n if (null !== $order) {\n $defaultOrder = $order;\n } else {\n $defaultOrder = [\n 'node.position' => 'ASC',\n ];\n }\n\n if (null !== $criteria) {\n $defaultCrit = array_merge($defaultCrit, $criteria);\n }\n\n if (null === $authorizationChecker) {\n $authorizationChecker = Kernel::getService('securityAuthorizationChecker');\n }\n\n return Kernel::getService('em')\n ->getRepository('RZ\\Roadiz\\Core\\Entities\\NodesSources')\n ->findOneBy(\n $defaultCrit,\n $defaultOrder,\n $authorizationChecker,\n $preview\n );\n }", "title": "" }, { "docid": "afdf9c73d09c87d13535fa478667d692", "score": "0.48644727", "text": "public function filter(callable $callback, $globalSearch = false): self;", "title": "" }, { "docid": "582a382b232e9c06c86c170645833143", "score": "0.4853675", "text": "function getFirstNodeByValue($node, $value)\n\t{\n\t\tif ($node->nodeValue == $value) {\n\t\t\treturn $node;\n\t\t} else if ($node->hasChildNodes()) {\n\t\t\tforeach ($node->childNodes as $child) {\n\t\t\t\t$answer = $this->getFirstNodeByValue($child, $value);\n\n\t\t\t\tif (is_object($answer))\n\t\t\t\t\treturn $answer;\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "7a3f27e42b3e333909c10d58b5af6ca0", "score": "0.48500496", "text": "private function findNode($id, TreeNodeList $nodeList) {\n\t\tforeach ($nodeList as $node) {\n\t\t\tif ($node->getID() == $id) {\n\t\t\t\treturn $node;\n\t\t\t}\n\t\t\telseif($node->hasChildren()) {\n\t\t\t\t$result = $this->findNode($id, $node->getChildren());\n\t\t\t\tif (!is_null($result)) {\n\t\t\t\t\treturn $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n }", "title": "" }, { "docid": "d9b5ffe5be2c36c58409981e51e71636", "score": "0.48447198", "text": "public function filter($callback = NULL) {\n return array_filter($this->array, $callback);\n }", "title": "" }, { "docid": "227750289da3a596817e84eacbc8c77a", "score": "0.4814988", "text": "protected function getCurrentNode(): ?NodeInterface {\n if ($node = $this->routeMatch->getParameter('node')) {\n return $node instanceof NodeInterface ? $node : NULL;\n }\n return NULL;\n }", "title": "" }, { "docid": "15f437ff57ccaeebb3d44b91380012fd", "score": "0.48136905", "text": "function filter_db_get_filter( $p_filter_id, $p_user_id = null ) {\r\n\t\tglobal $g_cache_filter_db_filters;\r\n\t\t$t_filters_table = config_get( 'mantis_filters_table' );\r\n\t\t$c_filter_id = db_prepare_int( $p_filter_id );\r\n\r\n\t\tif ( isset( $g_cache_filter_db_filters[$p_filter_id] ) ) {\r\n\t\t\treturn $g_cache_filter_db_filters[$p_filter_id];\r\n\t\t}\r\n\r\n\t\tif ( null === $p_user_id ) {\r\n\t\t\t$t_user_id = auth_get_current_user_id();\r\n\t\t} else {\r\n\t\t\t$t_user_id = $p_user_id;\r\n\t\t}\r\n\r\n\t\t$query = \"SELECT *\r\n\t\t\t\t FROM $t_filters_table\r\n\t\t\t\t WHERE id='$c_filter_id'\";\r\n\t\t$result = db_query( $query );\r\n\r\n\t\tif ( db_num_rows( $result ) > 0 ) {\r\n\t\t\t$row = db_fetch_array( $result );\r\n\r\n\t\t\tif ( $row['user_id'] != $t_user_id ) {\r\n\t\t\t\tif ( $row['is_public'] != true ) {\r\n\t\t\t\t\treturn null;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t# check that the user has access to non current filters\r\n\t\t\tif ( ( ALL_PROJECTS <= $row['project_id'] ) && ( !is_blank( $row['name'] ) ) && ( !access_has_project_level( config_get( 'stored_query_use_threshold', $row['project_id'], $t_user_id ) ) ) ) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\t$g_cache_filter_db_filters[$p_filter_id] = $row['filter_string'];\r\n\t\t\treturn $row['filter_string'];\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "e1f52362b03c6a8b9dfb15bd581f15e3", "score": "0.47998905", "text": "public function findNode($propertyName)\n {\n if (array_key_exists($propertyName, $this->_childNodes)) {\n return $this->_childNodes[$propertyName];\n }\n\n return null;\n }", "title": "" }, { "docid": "ddfd61325e4864bfd2be49f77c4952bc", "score": "0.47874993", "text": "public static function findUsingCallback($callback)\n {\n return static::getEntityManager()->findUsingCallback(static::class, $callback);\n }", "title": "" }, { "docid": "fdd79a053ac5ed2f0916ac8bdb452451", "score": "0.4775379", "text": "public function find($filter, $path)\n {\n $loader = $this->getLoader($filter);\n\n return $loader->find($path);\n }", "title": "" }, { "docid": "f5f07bffdc0b59ce13d7ed46be2fff37", "score": "0.47335508", "text": "public function filter(callable $callback): Finder\n {\n $clone = clone $this;\n $clone->filters[] = $callback;\n return $clone;\n }", "title": "" }, { "docid": "0d746487cb268bd75147c89308ccc460", "score": "0.47264782", "text": "public function withFilter(Filter $filter)\r\n {\r\n if ($this->param->isNull()) {\r\n return null;\r\n }\r\n\r\n return $this->applyFilter($filter);\r\n }", "title": "" }, { "docid": "657b44442fa0c2d1d02e7927eb987f4c", "score": "0.47160724", "text": "public function closest(string $filter): CssElement\n {\n $xpath = $this->session->getSelectorsHandler() // @phpstan-ignore-line we hacked the second parameter here as optional\n ->getSelector(self::MINK_SELECTOR)\n ->translateToXPath($filter, 'ancestor::');\n\n $closestElement = $this->ensureElement()->find('xpath', $xpath);\n\n return $this->css([\n sprintf(\".closest('%s')\", $filter),\n $closestElement\n ]);\n }", "title": "" }, { "docid": "0781f964c1b2ad9c35c81907d3b19ba2", "score": "0.4701652", "text": "public function filter(Closure $p)\n {\n return $this->collection->filter($p);\n }", "title": "" }, { "docid": "6d3a5c01ab4051d93a412c728cbc1af6", "score": "0.46996066", "text": "public function getFilter(): ?ShiftFilter\n {\n return $this->filter;\n }", "title": "" }, { "docid": "48122359dc1c50f47327b8ff2fe414e9", "score": "0.46688628", "text": "public function filter(callable $callback = null): CollectionInterface;", "title": "" }, { "docid": "9467ea445b4031bc8c2cac4b6432e110", "score": "0.464897", "text": "public function filter(Closure $p)\n {\n $this->init();\n\n return parent::filter($p);\n }", "title": "" }, { "docid": "77af61a5d681226a7c4ce6ae69ab3185", "score": "0.46467942", "text": "private function findNodeByPriceGroup(array $node, string $groupKey, array $mapper): ?array\n {\n foreach ($node as $value) {\n $priceKey = $this->getPriceGroupFromNode($value, $mapper);\n if ($priceKey == $groupKey) {\n return $value;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "7b225557968a88deea9c438d2c849af6", "score": "0.46363705", "text": "function getNode($xpath){\n \t\tif($xpath == NULL or $xpath == '/'){\n \t\t\t$node = $this->simpleXML;\n \t\t}\n \t\telse{\n \t\t\t$nodes = @$this->simpleXML->xpath($xpath);\n \t\t\t\tif($nodes == false){\n \t\t\t\t\t$node = false;\n \t\t\t\t}\n \t\t\t\telse{\n \t\t\t\t\t$node = $nodes[0];\n \t\t\t\t}\n \t\t}\n \t\treturn $node;\n \t}", "title": "" }, { "docid": "f83491cfec7787cc0c17279ba2badda8", "score": "0.4635595", "text": "public function find($re, $filter = null) {\n if ($this->isEmpty()) {\n return self::getEmptyContext();\n }\n\n $result = null;\n\n if ($filter) {\n $this->findAll($re)->each(function($context) use ($filter, &$result) {\n if ($filter($context)) {\n $result = $context;\n return false;\n }\n });\n\n return $result?:self::getEmptyContext();\n }\n\n if (!preg_match($re, $this->toString(), $match)) {\n return self::getEmptyContext();\n }\n\n return new self($match);\n }", "title": "" }, { "docid": "9e2163409153a925f102f03e10945a0b", "score": "0.4633593", "text": "public function findInSavedNodes($value, $field = 'title') {\n $node = NULL;\n if (!empty($value) && !empty($this->nodes)) {\n foreach ($this->nodes as $saved_node) {\n if ($value == $saved_node->{$field}) {\n $node = $saved_node;\n break;\n }\n }\n }\n\n return $node;\n }", "title": "" }, { "docid": "478521286e6f36ad3e728ff11c631414", "score": "0.46291375", "text": "public function filter ($callback, $mythis = NULL) {\n// FIXME : doesn't support \"$mythis\"\n $len = $this->length;\n $n = 0;\n $r = new PHECMA_Array ();\n\n while ($n < $len) {\n $v = $this->value[$n];\n if (! is_null($v)) {\n $x = $callback($v, $n, $this);\n if ($x == true) array_push($r->value, $v);\n }\n ++$n;\n }\n return $r;\n }", "title": "" }, { "docid": "5f7d4d551988b7d3a12998312c6b78bf", "score": "0.46263254", "text": "function filter_get_row( $p_filter_id ) {\n\treturn filter_cache_row( $p_filter_id );\n}", "title": "" }, { "docid": "7095138bd9b59a4530bf4b491b1da81e", "score": "0.46166804", "text": "public function getArgument(): ?Node\n {\n return $this->args[0] ?? null;\n }", "title": "" }, { "docid": "cf27f8fa2439e8751e151f8a6a772e45", "score": "0.46117032", "text": "public function filter(callable $callback = null)\n {\n if ($callback) {\n return new static(Arr::where($this->items, $callback));\n }\n\n return new static(array_filter($this->items));\n }", "title": "" }, { "docid": "e85e77229302f5e3cfef565932d6a9f0", "score": "0.46000677", "text": "public function sqliteFilter(Node $node): ?bool\n {\n switch (true) {\n case $node instanceof Now:\n $this->addWhere(\"datetime('now'\");\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "9d7428d169cea20d7b72af4a31e1b42a", "score": "0.459856", "text": "function &find_node($path) {\n $oid = $path!=NULL?explode('.', $path):[];\n $node = &$this->obj;\n\n while ($cmp = array_shift($oid)) {\n $old = &$node;\n for ($i = YATT_DSTART; $i < count($node); $i++) {\n if (is_array($node[$i]) && (strcmp($node[$i][YATT_NAME], $cmp) == 0)) {\n $node = &$node[$i];\n break;\n }\n }\n if ($old == $node) {\n $this->error('FIND(%s): Could not find node %s', $path, $cmp);\n return FALSE;\n }\n }\n return $node;\n }", "title": "" }, { "docid": "e2453e2314649b77cdfa7a8f28427aac", "score": "0.4590876", "text": "private function findNodeByTaxRate(array $node, float $taxRate, array $mapper): ?array\n {\n foreach ($node as $value) {\n $rate = $this->getTaxRateFromNode($value, $mapper);\n if ($rate == $taxRate) {\n return $value;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "856e54155c5fc149a36e68c1570c6284", "score": "0.4586666", "text": "function getFirstNodeByTagName($node, $name)\n\t{\n\t\tif ($node->nodeName == $name) {\n\t\t\treturn $node;\n\t\t} else if ($node->hasChildNodes()) {\n\t\t\tforeach ($node->childNodes as $child) {\n\t\t\t\t$answer = $this->getFirstNodeByTagName($child, $name);\n\n\t\t\t\tif (is_object($answer))\n\t\t\t\t\treturn $answer;\n\t\t\t}\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "2bc15854851b5af1af52c36ea12b00d2", "score": "0.4572997", "text": "public function filtered(): ?int;", "title": "" }, { "docid": "9291b89e37298c72cf0a7e847058a67d", "score": "0.45727524", "text": "public function first(callable $lambda = null)\n\t{\n\t\t$lambda === null and $lambda = function() { return true; };\n\n\t\t$this->rewind();\n\n\t\treturn $this->find($lambda);\n\t}", "title": "" }, { "docid": "694ec6327c6e2eaa0ad2d6b4f585653d", "score": "0.45647433", "text": "public function first(?callable $callback = null): mixed;", "title": "" }, { "docid": "1379a00a8e8a3338249abe1ec28e4d6f", "score": "0.4563479", "text": "public function first()\n {\n $this->index = count($this->children) ? 0 : (-1);\n\n if ($this->index === -1) {\n return null;\n }\n\n return $this->current();\n }", "title": "" }, { "docid": "d4cfd1004343242eec1696439bfa1d04", "score": "0.45572492", "text": "public function getFilter($filter = '', $default = '', $type = 'cmd', $option = '')\n\t{\n\t\tif ($this->_allow_filter == false)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t$value = $this->app->getUserStateFromRequest($this->getFilterName($filter), 'filter_' . $filter, $default, $type);\n\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "bb80b3d14bef9c14f82dd0bd3d7f1872", "score": "0.45428002", "text": "function getFilter() ;", "title": "" }, { "docid": "8eebde488eea72082df1af097ad8d971", "score": "0.45357293", "text": "private function removeNodeFilter(Twig_Node $node)\n {\n if ($node instanceof Twig_Node_Expression_Filter) {\n return $this->removeNodeFilter($node->getNode('node'));\n }\n\n return $node;\n }", "title": "" }, { "docid": "782d6db6e4f580e90284c9d19df1194f", "score": "0.45296416", "text": "public function findInfected($filter = null)\n {\n $url = $this->toFullURL(\"/v2/infected\");\n\n $request = OAuthRequest::from_consumer_and_token($this->consumer, null, \"GET\", $url);\n $request->set_parameter(\"q\", $filter);\n\n $request->sign_request(new OAuthSignatureMethod_HMAC_SHA1(), $this->consumer, null);\n\n // send request\n $response = $this->client->get($request->to_url());\n if ($response->getStatusCode() !== 200) {\n throw new Exception($this->convertToString($response));\n }\n\n $infected = json_decode($response->getBody()->getContents(), true);\n if ($infected === null) {\n throw new Exception(json_last_error_msg());\n }\n\n return $infected;\n }", "title": "" }, { "docid": "b9818f170deaf7e41da27e9636caf18c", "score": "0.45160276", "text": "public function apply($filter, Closure $callback = null)\n {\n $instance = $this->factory['filter']->make($filter);\n\n $instance->setResource($this)->runCallback($callback);\n\n return $this->filters[$instance->getFilter()] = $instance;\n }", "title": "" }, { "docid": "615d4d34b6cbe0643a725a7384fbdd19", "score": "0.45071965", "text": "function find($collection, callable $function, $default = null)\n{\n foreach ($collection as $key => $value) {\n if ($function($value, $key)) {\n return $value;\n }\n }\n\n return $default;\n}", "title": "" }, { "docid": "f0c3a1f3dd2d1b3592b7c2e41b0d8dff", "score": "0.45022783", "text": "public function get_filter_value() {\r\n\t\t$items = $this->filter_object->get_items(); \r\n\t\treturn $items[0]->value;\r\n\t}", "title": "" }, { "docid": "1f129bef970f005d8b996ad4996e5c63", "score": "0.44963747", "text": "public static function find(?array $objects,callable $callback){\n\t\tif(\\is_array($objects)) {\n\t\t\tforeach ($objects as $o){\n\t\t\t\tif($callback($o)){\n\t\t\t\t\treturn $o;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ccdb9334c71da78e555af33c62b5fbdd", "score": "0.44732368", "text": "public function filter(callable $callback) : self\n {\n return static::fromIterator(iterator_filter($this, $callback));\n }", "title": "" }, { "docid": "1719c3257099b94e4147cf10dd7ae210", "score": "0.4467438", "text": "protected function &_getFilter($_field, $_filterData)\n {\n foreach ($_filterData['filters'] as &$filter) {\n if ($filter['field'] == $_field) {\n return $filter;\n }\n }\n }", "title": "" }, { "docid": "ac01228879f8f899a85e53b99d71c529", "score": "0.44652578", "text": "public function getReferenceId(): ?CustomerTextFilter\n {\n return $this->referenceId;\n }", "title": "" }, { "docid": "71b3b1b0eb63e560d834816d87ae22f6", "score": "0.446511", "text": "function filter_get_row( $p_filter_id ) {\r\n\t\treturn filter_cache_row( $p_filter_id );\r\n\t}", "title": "" }, { "docid": "62dde360915ebb3083bf54efe3331754", "score": "0.4442219", "text": "public function indexOf($filter)\n {\n foreach ($this->children as $i => $child) {\n if ($child === $filter) {\n return $i;\n }\n }\n\n return -1;\n }", "title": "" }, { "docid": "f7a8fcffb37a8bedb547d8513a92f369", "score": "0.44414654", "text": "public function find(string $identifier, callable $source): CacheItemInterface;", "title": "" }, { "docid": "f90b8b605174a3b11b137d8f9f4fa1d4", "score": "0.44307464", "text": "public static function matchValueInObjectArrayClosure(Closure $matchCriteria, array $arrayToSearch): ?object\n {\n for ($i = 0; $i < count($arrayToSearch); $i++) {\n if ($matchCriteria($arrayToSearch[$i])) {\n return $arrayToSearch[$i];\n }\n }\n return null;\n }", "title": "" }, { "docid": "c8d90e14a7c7a8a2f2046cc899d6dea2", "score": "0.44254923", "text": "function filter_db_get_name( $p_filter_id ) {\n\t$c_filter_id = (int)$p_filter_id;\n\n\t$t_filter_row = filter_get_row( $c_filter_id );\n\tif( !$t_filter_row ) {\n\t\treturn null;\n\t}\n\n\tif( $t_filter_row['user_id'] != auth_get_current_user_id() ) {\n\t\tif( $t_filter_row['is_public'] != true ) {\n\t\t\treturn null;\n\t\t}\n\t}\n\n\treturn $t_filter_row['name'];\n}", "title": "" }, { "docid": "724d8e21f98b9dd4e4dd4a5a44525b7d", "score": "0.44214427", "text": "protected function removeNodeFilter(Node $node)\n {\n if ($node instanceof NodeExpressionFilter) {\n return $this->removeNodeFilter($node->getNode('node'));\n }\n\n return $node;\n }", "title": "" }, { "docid": "56f861732df0b45c1d30b401d62b6423", "score": "0.44201988", "text": "function filter($filter_name, $value = '') {\n\t\towa_coreAPI::debug(\"Filtering $filter_name\");\n\t\t\n\t\tif (array_key_exists($filter_name, $this->listenersByFilterType)) {\n\t\t\t// sort the filter list by priority\n\t\t\tksort($this->listenersByFilterType[$filter_name]);\n\t\t\t//get the function arguments\n\t\t\t$args = func_get_args();\n\t\t\t// outer priority loop\n\t\t\tforeach ($this->listenersByFilterType[$filter_name] as $priority) {\n\t\t\t\t// inner filter class/function loop\n\t\t\t\tforeach ($priority as $observer_id) {\n\t\t\t\t\t// pass args to filter\n\t\t\t\t\t\n\t\t\t\t\tif (is_array($this->listeners[$observer_id])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( is_object( $this->listeners[$observer_id][0] ) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$class = get_class( $this->listeners[$observer_id][0] );\n\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// class could be passed as a string\n\t\t\t\t\t\t\t$class = $this->listeners[$observer_id][0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$method = $this->listeners[$observer_id][1];\n\t\t\t\t\t\t$filter_method = $class . '::' . $method;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$filter_method = $this->listeners[$observer_id];\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\towa_coreAPI::debug(sprintf(\"Filter: %s. Value passed: %s\", $filter_method, print_r($value, true)));\n\t\t\t\t\t$value = call_user_func_array($this->listeners[$observer_id], array_slice($args,1));\n\t\t\t\t\towa_coreAPI::debug(sprintf(\"Filter: %s. Value returned: %s\", $filter_method, print_r($value, true)));\n\t\t\t\t\t// set filterred value as value in args for next filter\n\t\t\t\t\t$args[1] = $value;\n\t\t\t\t\t// debug whats going on\n\t\t\t\t\towa_coreAPI::debug(sprintf(\"%s filtered by %s.\", $filter_name, $filter_method));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "6a6ecd3bd01919e0da46dd301055da96", "score": "0.44189626", "text": "public static function searchableNodesPermission()\n {\n return function ($node) {\n if ($node->can('view') and $node->sub_can_post) {\n return TRUE;\n }\n\n return FALSE;\n };\n }", "title": "" }, { "docid": "76218e85e16dd66b94060c4c4ff7b3dc", "score": "0.44142863", "text": "public function findByNode(NodeInterface $node)\n\t{\n\t\treturn $this->find($node->getValue());\n\t}", "title": "" }, { "docid": "ed5360f15be252c9fa5f3e591a19c8a7", "score": "0.44061968", "text": "abstract protected function getWherePart(array $params, array $filter);", "title": "" }, { "docid": "6ffe5cbdb8fa3803e30258cf60dc0092", "score": "0.44054648", "text": "public function getNode($key = null, $nullIfEmpty = true);", "title": "" }, { "docid": "34197ab689bb7a05b3865007ed2f4666", "score": "0.44041803", "text": "public function current()\n {\n if ($this->index == -1) {\n return $this->first();\n }\n\n if (!$this->valid()) {\n throw new DcGeneralRuntimeException('FilterBuilder position is invalid.');\n }\n\n return $this->children[$this->key()];\n }", "title": "" }, { "docid": "b2f4668962ba51511e7d5f82cf981748", "score": "0.4401676", "text": "public abstract function getFilterCondition(&$q, $path, $data_aliases, $filter);", "title": "" }, { "docid": "a7009f051adc03e03c5831fc651db272", "score": "0.43969825", "text": "public function filter(callable $predicate): Stream;", "title": "" }, { "docid": "0b74c2ddf21127c702acdf56353138cf", "score": "0.43872958", "text": "public function whereQuery(Closure $callback);", "title": "" }, { "docid": "0fdc36b8db362faff8382592db3f6bdb", "score": "0.43857396", "text": "public function handlePreFilters() {\n foreach ($this->filterConfig->getPreFilters() as $filter) {\n $out = $filter->handleRequest($this->currentRequest);\n if ($out instanceof AbstractResponse) {\n return $out; // fail fast here, we want nothing else to run.\n }\n }\n return null;\n }", "title": "" }, { "docid": "c4147b594eb1ac8d167a9bd8062e63f5", "score": "0.4371203", "text": "public function getNode()\n {\n if(!($domainId = $this->getData('domainId'))) {\n return null;\n }\n \n return MazelabVpopqmail_Model_DiFactory::getNodeManager()->getNodeOfDomain($domainId);\n }", "title": "" }, { "docid": "576c22731e9762042ff09d5d2c15a772", "score": "0.43705237", "text": "public static function find(array $array, callable $callable)\n {\n $res = static::filter($array, $callable);\n return count($res) ? static::first($res) : null;\n }", "title": "" } ]
6e7cab484e585c800c10e49b1d18a629
Tests the htmlparser base return to check if there was scrambling while reassembling the html together
[ { "docid": "cab4488223b990bcbb240123e6ec6634", "score": "0.0", "text": "public function testParserBaseReturn($valueInput, $outputValue)\n {\n $htmlArray = $this->htmlParser->parse(\n $valueInput\n );\n\n $out = \"\";\n foreach ($htmlArray as $element) {\n $out .= $element->getText();\n }\n\n $this->assertContainsOnlyInstancesOf('HtmlFilter\\HtmlParser\\TextInterface', $htmlArray);\n $this->assertInternalType('array', $htmlArray);\n $this->assertEquals($outputValue,$out);\n }", "title": "" } ]
[ { "docid": "2cddd486ac34073175844c9f46e95a93", "score": "0.62708753", "text": "abstract public function parseHtml();", "title": "" }, { "docid": "0238a9ae656b90b6e39611d02c007a0a", "score": "0.61315024", "text": "function html5_tidy($html) {\n if (class_exists('tidy')) {\n $tidy = new tidy();\n $config = array(\n 'bare' => TRUE,\n 'clean' => TRUE,\n 'indent' => TRUE,\n 'output-xhtml' => TRUE,\n 'wrap' => 200,\n 'hide-comments' => TRUE,\n 'new-blocklevel-tags' => implode(' ', array(\n 'header', 'footer', 'article', 'section', 'aside', 'nav', 'hgroup', 'figure',\n )),\n 'new-inline-tags' => implode(' ', array(\n 'mark', 'time', 'meter', 'progress',\n )),\n );\n $tidy->parseString( $html, $config, 'utf8' );\n $tidy->cleanRepair();\n // $html = str_ireplace( '<wbr />','&shy;', (string)$tidy );\n // wbr to &shy; conversion commented out due to Safari copy/paste bug:\n // -- Safari emits an actual hyphen when copy/pasting markup with &shy;\n unset($tidy);\n return $html;\n } else {\n echo 'no tidy :(';\n }\n return false;\n }", "title": "" }, { "docid": "5442417b35597ad5775f3f59fb4b8c45", "score": "0.6020705", "text": "private function is_html()\n\t{\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "eae63c0e548f3973124ebb10b25a5603", "score": "0.6012426", "text": "abstract protected function getHTMLInternal();", "title": "" }, { "docid": "5ebe680e66f1a3decf3440c53604bc49", "score": "0.5934434", "text": "public function testHtmlMediaFixesBrokenTags() {\n\n $input = '<p></p';\n $expected = '<p></p>';\n\n $scrubed = Scrub::htmlMedia($input);\n\n $this->assertEquals($scrubed, $expected);\n }", "title": "" }, { "docid": "45daba4e85679d50983e71b09fa8b3f2", "score": "0.5886727", "text": "public function test(){\n\t\t// $htm = file_get_html( $url );\n\t\t// echo \"URL===>\".$url.'<br>';\n\t\t// $title = $htm->find('title',0)->plaintext;\n\t\t// echo $title;\n\t\t// echo \"<br>\";\n\t\t// //content\n\t\t// $divs = $htm->find('div');\n\t\t// $content_match = 'body';\n\t\t// $flag = false;\n\t\t// $contentlist = $this->collect_match->get_matchlist_by_type( self::TYPE_CONTENT );\n\t\t// $p = 0.00;\n\t\t// foreach ($divs as $div) {\n\t\t// \tforeach ($contentlist as &$cl) {\n\t\t// \t\t$cl['match'] = strtolower( preg_replace('/.*?[\\.|\\#]/', '', $cl['match']) );\n\t\t\t\t\n\t\t// \t\tsimilar_text($cl['match'], trim( strtolower( $div->class ) ), $tp);\n\t\t// \t\t//echo \"p class========$div->class========$p<br>\";\n\t\t// \t\tif ( $tp>$p ) {\n\t\t// \t\t\t$p = $tp;\n\t\t// \t\t}\n\t\t// \t\tif ( $p >= 100.0 ) {\n\t\t// \t\t\t$flag = true;\n\t\t// \t\t\t$content_match = 'div.'.trim( $div->class );\n\t\t// \t\t\tbreak;\n\t\t// \t\t}\n\n\t\t// \t\tsimilar_text($cl['match'], trim( strtolower( $div->id ) ), $tp);\n\t\t// \t\t//echo \"p id========$div->id========$p<br>\";\n\t\t// \t\tif ( $tp>$p ) {\n\t\t// \t\t\t$p = $tp;\n\t\t// \t\t}\n\t\t// \t\tif ( $p >= 100.0 ) {\n\t\t// \t\t\t$flag = true;\n\t\t// \t\t\t$content_match = 'div.'.trim( $div->id );\n\t\t// \t\t\tbreak;\n\t\t// \t\t}\n\t\t// \t}\n\t\t// \tif ( $flag ) {\n\t\t// \t\techo \"$p ======> \".$content_match.'<br>';\n\t\t// \t\tbreak;\n\t\t// \t}\n\t\t// }\n\t\t// echo $content_match;\n\t\t// echo \"<br>\";\n\t\t// print_r( $contentlist );\n\t\t// // $exec = '$htm->find(\"'.$content_match.'\", 0)->plaintext;';\n\t\t// // echo $exec;\n\t\t// // echo \"<br>\";\n\t\t// // eval(\"\\$str = $exec;\");\n\t\t// // echo $str;\n\t\t// $htm->clear();\n\t\t// echo \"<br>\";\n\t\t$url = \"http://news.qq.com/a/20131216/005480.htm\";\n\t\t$htm = file_get_contents( $url );\n\t\t// $a = $htm->find('img');\n\t\tprint_r( $htm );\n\t}", "title": "" }, { "docid": "0a00a26750f41b7d0f5721057bd1e3c8", "score": "0.5789359", "text": "function test3() {\r\n global $doc, $html;\r\n $doc = parseHtml($html);\r\n return check_test(is_array($doc), true, \"parseHtml could not fully parse html\");\r\n}", "title": "" }, { "docid": "b6c76b5356868631198a447fae59fe2f", "score": "0.57037", "text": "public function test_bug_186()\n\t{\n\t\t$doc = \"<html><body><p></p><p></p></body><p></p></html>\";\n\t\t$this->html->load($doc);\n\t\t$this->assertCount(2, $this->html->find('body p'));\n\t}", "title": "" }, { "docid": "d7bcc6c37b9cf31831e84734f67cf667", "score": "0.56668824", "text": "function checkHTML($source) {\n \t\t$mandatoryTagsPresent = array(false,false); // HTML, BODY\n \t\t$EID = array();\n\t\t$FORMNAME = array();\n \t\t$l = strlen($source);\n \t$buffer = \"\";\n \t$intag = false;\n \t$intags = array();\n \t$closure = \"\";\n \t$log = array();\n \t\tfor ($pos = 0; $pos < $l; $pos++) {\n \t\t\t$car = $source[$pos];\n \t\t\tif ($intag) {\n \t\t\t\tif ($car == \">\" && $closure == \"\") { # end of a tag\n \t\t\t\t\t$intag =false;\n \t\t\t\t\t$buffer = str_replace(\"\\r\",\"\",$buffer);\n \t\t\t\t\t$buffer = str_replace(\"\\n\",\"\",$buffer);\n \t\t\t\t\tif ($buffer[0] == \"/\") { # it's a end tag\n \t\t\t\t\t\t# check integrity\n \t\t\t\t\t\t$closureTag = strtolower(substr($buffer,1));\n \t\t\t\t\t\t$nextClose = array_pop($intags);\n \t\t\t\t\t\tif ($closureTag != $nextClose) {\n \t\t\t\t\t\t\tif ($nextClose == \"\")\n \t\t\t\t\t\t\t\t$log[]= str_replace(\"<\",\"&lt;\",\"/$closureTag came when end of file was expected\");\n \t\t\t\t\t\t\telse\n \t\t\t\t\t\t\t\t$log[]= str_replace(\"<\",\"&lt;\",\"/$closureTag came when /$nextClose was expected\");\n \t\t\t\t\t\t\tbreak; // won't be able to help\n \t\t\t\t\t\t}\n \t\t\t\t\t} else if ($buffer[strlen($buffer)-1] == \"/\") { # self-closing tag\n \t\t\t\t\t\t$buffer = substr($buffer,0,strlen($buffer)-1);\n \t\t\t\t\t\t$tag = explode(\" \",$buffer);\n \t\t\t\t\t\t$tag = strtolower($tag[0]);\n \t\t\t\t\t\tif ($tag == \"img\" && strpos($buffer,\" alt=\") === false) {\n\t\t\t\t\t\t\t$log[]= \"Missing ALT in img tag: \".str_replace(\"<\",\"&lt;\",$buffer);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif ($tag == \"input\") {\n \t\t\t\t\t\t\tif (preg_match(\"/type=(\\\"|')([^\\\"']+)(\\\"|')/i\",$buffer,$regs)) {\n\t\t\t\t\t\t\t\tif (!in_array(strtolower($regs[2]),array(\"password\",\"checkbox\",\"radio\",\"hidden\",\"text\",\"submit\",\"file\",\"button\",\"image\"))) {\n\t\t\t\t\t\t\t\t\t$log[]= \"Invalid INPUT type: \".$regs[2];\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\tif (preg_match(\"/id=(\\\"|')([^\\\"']+)(\\\"|')/i\",$buffer,$regs)) {\n\t\t\t\t\t\t\tif (in_array(strtolower($regs[2]),$EID)) {\n\t\t\t\t\t\t\t\t$log[]= \"Duplicated Element ID: \".$regs[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$EID[] = strtolower($regs[2]);\n\t\t\t\t\t\t}\n \t\t\t\t\t\t$buffer .= \"/\";\n \t\t\t\t\t} else { # opening tag\n \t\t\t\t\t\t$tag = explode(\" \",$buffer);\n \t\t\t\t\t\t$tag = strtolower($tag[0]);\n \t\t\t\t\t\tif ($tag == \"html\") $mandatoryTagsPresent[0] = true;\n \t\t\t\t\t\tif ($tag == \"body\") $mandatoryTagsPresent[1] = true;\n \t\t\t\t\t\tif ($tag[0] != \"?\" && $tag[0] != \"!\") # ignore xml and doctypes\n \t\t\t\t\t\t\t$intags[] = $tag;\n \t\t\t\t\t\tif ($tag == \"script\" && strpos($buffer,\" type=\") === false) {\n\t\t\t\t\t\t\t$log[]= \"Missing type in SCRIPT tag\";\n \t\t\t\t\t\t} else if ($tag == \"script\" && strpos($buffer,\"text/javascript\") === false) {\n \t\t\t\t\t\t\t$log[]= \"type in SCRIPT tag should be text/javascript\";\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif ($tag == \"style\" && strpos($buffer,\" type=\") === false) {\n\t\t\t\t\t\t\t$log[]= \"Missing type in STYLE tag (hint: styles should be external in .css files, or type text/css)\";\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif ($tag == \"br\" || $tag == \"input\" || $tag == \"hr\" || $tag == \"img\" || $tag == \"link\") {\n \t\t\t\t\t\t\t$log[]= \"$tag without auto-close: \".str_replace(\"<\",\"&lt;\",$buffer);\n \t\t\t\t\t\t\tarray_pop($intags);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif ($tag == \"form\") {\n\t \t\t\t\t\t\tif (preg_match(\"/name=(\\\"|')([^\\\"']+)(\\\"|')/i\",$buffer,$regs)) {\n\t\t\t\t\t\t\t\tif (in_array(strtolower($regs[3]),$FORMNAME)) {\n\t\t\t\t\t\t\t\t\t$log[]= \"Duplicated Form named: \".$regs[3];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$FORMNAME[] = strtolower($regs[2]);\n\t\t\t\t\t\t\t}\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tif (preg_match(\"/id=(\\\"|')([^\\\"']+)(\\\"|')/i\",$buffer,$regs)) {\n\t\t\t\t\t\t\t\tif (in_array(strtolower($regs[2]),$EID)) {\n\t\t\t\t\t\t\t\t\t$log[]= \"Duplicated Element ID: \".$regs[2];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$EID[] = strtolower($regs[2]);\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$buffer = \"\";\n \t\t\t\t} else {\n \t\t\t\t\tif ($closure == \"\" && ($car == \"\\\"\" || $car == \"'\"))\n \t\t\t\t\t\t$closure = $car;\n \t\t\t\t\telse if ($closure == $car)\n \t\t\t\t\t\t$closure = \"\";\n \t\t\t\t\telse if ($closure != \"\" && $car == \"<\") {\n \t\t\t\t\t\t$log[]= \"Invalid &lt; inside quotation at the tag: \".str_replace(\"<\",\"&lt;\",$buffer);\n\t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t$buffer .= $car;\n \t\t\t\t}\n \t\t\t} else {\n \t\t\t\tif ($car == \"<\") {\n \t\t\t\t\tif (substr($source,$pos+1,3) == \"!--\") {\n \t\t\t\t\t\t#comment, look ahead (scripts should never have --> as per W3C, so it's safe to look ahead)\n \t\t\t\t\t\t$end = strpos($source,\"-->\",$pos);\n\t\t\t\t\t\tif ($end === false) {\n\t\t\t\t\t\t\t$log[] = \"Unclosed comment\";\n\t\t\t\t\t\t} else\n \t\t\t\t\t\t\t$pos = $end;\n \t\t\t\t\t} else if (strpos(\"!?%qazwsxedcrfvtgbyhnujmikolp1234567890_/\",strtolower($source[$pos+1])) !== false) {\n \t\t\t\t\t\t$buffer = \"\";\n \t\t\t\t\t\t$intag = true;\n \t\t\t\t\t\t$closure = \"\";\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\tif (count($intags)>0) {\n \t\t\t$log[]= \"End of file reached while waiting \".count($intags).\" end tags:\".print_r($intags,true);\n \t\t}\n \t\tif (!$mandatoryTagsPresent[0])\n \t\t\t$log[] = \"Mandatory HTML tag not present\";\n \t\tif (!$mandatoryTagsPresent[1])\n \t\t\t$log[] = \"Mandatory BODY tag not present\";\n \t\treturn $log;\n\n \t}", "title": "" }, { "docid": "876b18425b3f0ec4387aadf823122340", "score": "0.5627735", "text": "function __construct($html){\n\t\tif( stristr($html, '<meta http-equiv=\"Content-Type\" content=\"text/html; charset') || stristr($html, '<meta http-equiv=\"content-type\" content=\"text/html; charset')){\n\t\t\t//correct\n\t\t}else{\n\t\t\t\n\t\t\t//not correct find the charset\n\t\t\tpreg_match_all('{charset=[\"|\\']([^\"]+?)[\"|\\']}', $html,$encMatches);\n\t\t\t$possibleCharSet = $encMatches[1];\n\t\t\t\n\t\t\t$possibleCharSet = isset($possibleCharSet[0]) ? $possibleCharSet[0] : '';\n\t\t \n\t\t\tif(trim($possibleCharSet) == '') $possibleCharSet = 'UTF-8';\n\t\t\t\n\t\t\t$charSetMeta = '<meta http-equiv=\"content-type\" content=\"text/html; charset=' . $possibleCharSet . '\"/>';\n\t\t\t\n\t\t\tif(stristr($html, '<head>')){\n\t\t\t\t$html = str_replace('<head>', '<head>'.$charSetMeta, $html);\n\t\t\t}else{\n\t\t\t\t$html = str_replace('</head>', $charSetMeta . '/<head>', $html);\n\t\t\t}\n\t\t\t \n\t\t \n\t\t\t\n\t\t} \n\t\t\n\t\t// Fix tables tbody\n\t\tpreg_match_all('{(<table.*?>)([\\s]*<.*?>)}s', $html ,$allTablesOpenMatches ) ;\n\t\t\n\t\t$allTablesOpenMatchesTwo = $allTablesOpenMatches[0];\n\t\t$allTablesOpenMatchesOne = $allTablesOpenMatches[1];\n\t\t$allTablesOpenMatchesAfter = $allTablesOpenMatches[2];\n\t\t$i=0;\n\t\tforeach ($allTablesOpenMatchesTwo as $allTablesOpenMatchesTwoSingle){\n\t\t\t\n\t\t\tif(! stristr($allTablesOpenMatchesTwoSingle, '<tbody') && ! stristr($allTablesOpenMatchesTwoSingle, '<thead')){\n\t\t\t\t//fix this\n\t\t\t\t$html = str_replace($allTablesOpenMatchesTwoSingle, $allTablesOpenMatchesOne[$i].'<tbody>'.$allTablesOpenMatchesAfter[$i], $html);\n\t\t\t} \n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\tpreg_match_all('{(<[^<]*?>[\\s]*)(</table.*?>)}s', $html ,$allTablesCloseMatches ) ;\n\t\t$allTablesCloseMatchesBoth = $allTablesCloseMatches[0];\n\t\t$allTablesCloseMatchesPre = $allTablesCloseMatches[1];\n\t\t$allTablesCloseMatchesAfter = $allTablesCloseMatches[2];\n\t\t\n\t\t$i=0;\n\t\tforeach ( $allTablesCloseMatchesBoth as $allTablesCloseMatchesBothSingle ){\n\t\t\t\n\t\t\tif( ! stristr($allTablesCloseMatchesBothSingle, 'tbody') && ! stristr($allTablesCloseMatchesBothSingle, 'tfoot')){\n\t\t\t\t$html = str_replace($allTablesCloseMatchesBothSingle, $allTablesCloseMatchesPre[$i].'</tbody>'.$allTablesCloseMatchesAfter[$i], $html ) ;\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t\n\t\t \n\t\t\n\t\t$this->html = $html;\n\t\t$this->doc = new DOMDocument;\n\t\t\n\t\ttry {\n\t\t\t$internalErrors = libxml_use_internal_errors(true);\n\t\t\t@$this->doc->loadHTML($html);\n\t\t\tlibxml_use_internal_errors($internalErrors);\n\t\t\t \n\t\t} catch (Exception $e) {\n\t\t\tthrow new Exception('Failed to load the Document as a Dom');\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "fc912d135537e1487736e07013f933ea", "score": "0.56217307", "text": "public function testHtmlSuite()\n {\n $this->logMethod(__METHOD__);\n $cases = RenderCaseGenerator::html_Html();\n foreach ($cases as &$case) {\n $case[0] = new HtmlElementRender(new Html(), $case[0]);\n }\n\n $expect = [];\n\n $expect['basic'] = Block::fromString(\n '<p>This is some raw html &amp;</p>'\n );\n\n // Same result with explicit write access\n $expect['write'] = $expect['basic'];\n\n // Test view access\n $expect['view'] = $expect['basic'];\n\n // Test hidden access\n $expect['hide'] = new Block();\n\n $this->runElementCases($cases, $expect);\n }", "title": "" }, { "docid": "7c369ae1b1a06eee89fa2f5f737c2372", "score": "0.5595344", "text": "public function isHtml();", "title": "" }, { "docid": "00982c34ff59bd6028a97952d16614be", "score": "0.5585827", "text": "public function test_bug_181()\n\t{\n\t\t$doc = \"<p>&nbsp;</p>\";\n\t\t$this->html->load($doc);\n\t\t$this->assertEquals($doc, $this->html->save());\n\t}", "title": "" }, { "docid": "052b69cfb2be5bebd305274c4964db1b", "score": "0.557102", "text": "public function testParseStrictSanitizing()\n {\n $parser = new NetscapeBookmarkParser();\n $bkm = $parser->parseFile('tests/input/delicious_sanitize.htm');\n $this->assertEquals(2, sizeof($bkm));\n\n $this->assertEquals(\n 'Text\n<li>#CLE ---> #VALEUR</li>\n</BOUCLE_exploiter>\n</code>',\n $bkm[0]['note']\n );\n $this->assertEquals('1', $bkm[0]['pub']);\n $this->assertEquals('1380651656', $bkm[0]['time']);\n $this->assertEquals('http://spip.pastebin.fr/28921', $bkm[0]['uri']);\n $this->assertEquals(\n 'spip pastebin - outil de debug collaboratif - Bonjour les écureuils !',\n $bkm[0]['title']\n );\n $this->assertEquals('spip3 astuces ', $bkm[0]['tags']);\n\n $this->assertEquals('1', $bkm[1]['pub']);\n $this->assertEquals('1380651611', $bkm[1]['time']);\n $this->assertEquals(\n 'http://www.la-grange.net/2013/09/07/changement',\n $bkm[1]['uri']\n );\n $this->assertEquals('Changer le monde - Carnets Web de La Grange', $bkm[1]['title']);\n $this->assertEquals(\n 'La juxtaposition des mots propriétés et intellectuel (du monde des idées) '\n .'est une aberration dans un contexte de l\\'échange et de la culture.',\n $bkm[1]['note']\n );\n }", "title": "" }, { "docid": "50f32008c97aced57db422f1dd4af2f4", "score": "0.5568074", "text": "public function remove_unnecessary_html_tags()\n {\n $html = self::$faker->randomHtml(2, 3);\n $this->assertInternalType('string', self::$parse->remove_unnecessary_html_tags($html));\n }", "title": "" }, { "docid": "61590a7cfea5cc31d92e3a2ba8f76134", "score": "0.55537266", "text": "static function filterHtml($text) {\n\t\trequire_once 'core/lib/htmlfilter.php';\n\n\t\t$stripTags = array(false,\n\t\t\t'blink','object','meta','html','link',\n\t\t\t'frame','iframe','layer','ilayer',\n\t\t\t'plaintext');\n\n\t\t$removeTags = array(\n\t\t\t'script','style','applet','embed',\n\t\t\t'head','frameset','xml');\n\n\t\t$selfClosingTags = array(\n\t\t\t'img','br','hr','input');\n\n\t\t$closeOpenTags = false;\n\n\t\t$removeAttr = array(\n\t\t\t'/^(?!a)/i' => array(\n\t\t\t\t'/target/i',\n\t\t\t\t),\n\t\t\t'/.*/' => array(\n\t\t\t\t'/^on.*/i',\n\t\t\t\t'/^dynsrc/i',\n\t\t\t\t'/^datasrc/i',\n\t\t\t\t'/^data.*/i',\n\t\t\t\t'/^lowsrc/i',\n\t\t\t\t),\n\t\t\t);\n\n\t\t$badAttr = array(\n\t\t\t'/.*/' => array(\n\t\t\t\t'/target/i' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'/^[\\'\"](?!_blank|_self|_parent|_top).*[\\'\"]$/i',\n\t\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'\"_self\"',\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t'/.*/' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t '/^([\\'\\\"])\\s*\\S+\\s*script\\s*:(.*)([\\'\\\"])/si',\n\t\t\t\t\t '/^([\\'\\\"])\\s*https*\\s+:(.*)([\\'\\\"])/si',\n\t\t\t\t\t '/^([\\'\\\"])\\s*mocha\\s*:*(.*)([\\'\\\"])/si',\n\t\t\t\t\t '/^([\\'\\\"])\\s*about\\s*:(.*)([\\'\\\"])/si'\n\t\t\t\t\t ),\n\t\t\t\t\tarray(\n\t\t\t\t\t '\\\\1invalid:\\\\2\\\\1',\n\t\t\t\t\t '\\\\1invalid:\\\\2\\\\1',\n\t\t\t\t\t '\\\\1invalid:\\\\2\\\\1',\n\t\t\t\t\t '\\\\1invalid:\\\\2\\\\1'\n\t\t\t\t\t )\n\t\t\t\t\t),\n\t\t\t\t '/^style/i' =>array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'/expression/i',\n\t\t\t\t\t\t'/behaviou*r/i',\n\t\t\t\t\t\t'/binding/i',\n\t\t\t\t\t\t'/include-source/i',\n\t\t\t\t\t\t'/url\\s*\\(\\s*([\\'\\\"]*)\\s*https*:.*([\\'\\\"]*)\\s*\\)/si',\n\t\t\t\t\t\t'/url\\s*\\(\\s*([\\'\\\"]*)\\s*\\S+\\s*script:.*([\\'\\\"]*)\\s*\\)/si'\n\t\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'invalid',\n\t\t\t\t\t\t'invalid',\n\t\t\t\t\t\t'invalid',\n\t\t\t\t\t\t'invalid',\n\t\t\t\t\t\t'url(\\\\1http://invalid/\\\\1)',\n\t\t\t\t\t\t'url(\\\\1http://invalid/\\\\1)'\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$addAttr = array();\n\n\t\t$text = sanitize($text, \n\t\t\t$stripTags, $removeTags, $selfClosingTags, $closeOpenTags, \n\t\t\t$removeAttr, $badAttr, $addAttr);\n\t\treturn rtrim($text);\n\t}", "title": "" }, { "docid": "3702e3f9601829a1ae652efb7a4b8089", "score": "0.55037487", "text": "function ScrubHtmlText( $scrubbed ) {\n\n $scrubbed = html_entity_decode($scrubbed,ENT_COMPAT,\"UTF-8\"); // Convert &nbsp; etc.\n // remove css-style tags\n $scrubbed = preg_replace(\"/<style.*?<\\/style>/is\", \"\", $scrubbed);\n // remove all other html\n $scrubbed = preg_replace(\"/<span[^>]*>/is\",\"\",$scrubbed);\n $scrubbed = preg_replace(\"/<\\/span>/is\",\"\",$scrubbed);\n\n $scrubbed = preg_replace(\"/<br >/is\",\"<br>\",$scrubbed);\n $scrubbed = preg_replace(\"/<br\\/>/is\",\"<br>\",$scrubbed);\n $scrubbed = preg_replace(\"/<\\/div>/is\",\"<br>\",$scrubbed);\n $scrubbed = preg_replace(\"/<br>/is\",\"\\r\\n\",$scrubbed);\n $scrubbed = preg_replace(\"/<hr>/is\",\"_________________________\\r\\n\",$scrubbed);\n $scrubbed = strip_tags($scrubbed);\n\t\t\n $scrubbed = preg_replace('/^[\\n]2,|^[\\t\\s]*\\n+/m','',$scrubbed); // Strip out duplicate blank lines left after stripping tags\n\n return $scrubbed;\n }", "title": "" }, { "docid": "783ddcdad4fc047abd82a8433a5448e4", "score": "0.54942435", "text": "function &generateHTML( $tmpPage )\r\n {\r\n // replace all < and > between <ezhtml> and </ezhtml>\r\n // and to the same for <php> </php>\r\n // ok this is a bit slow code, but it works\r\n $startHTMLTag = \"<html>\";\r\n $endHTMLTag = \"</html>\";\r\n \r\n $starteZHTMLTag = \"<ezhtml>\";\r\n $endeZHTMLTag = \"</ezhtml>\";\r\n\r\n $startPHPTag = \"<php>\";\r\n $endPHPTag = \"</php>\";\r\n \r\n $numberBeginHTML = substr_count( $tmpPage, $startHTMLTag );\r\n $numEndHTML = substr_count( $tmpPage, $endHTMLTag );\r\n\r\n if ( $numberBeginHTML != $numEndHTML )\r\n {\r\n print( \"Unmatched ezhtml tags, check that you have end tags for all begin tags\" );\r\n }\r\n\r\n $numberBegineZHTML = substr_count( $tmpPage, $starteZHTMLTag );\r\n $numEndeZHTML = substr_count( $tmpPage, $endeZHTMLTag );\r\n\r\n if ( $numberBegineZHTML != $numEndeZHTML )\r\n {\r\n print( \"Unmatched ezhtml tags, check that you have end tags for all begin tags\" );\r\n }\r\n \r\n $numberBeginPHP = substr_count( $tmpPage, $startPHPTag );\r\n $numEndPHP = substr_count( $tmpPage, $endPHPTag );\r\n \r\n if ( $numberBegin != $numEnd )\r\n {\r\n print( \"Unmatched PHP tags, check that you have end tags for all begin tags\" );\r\n }\r\n\r\n if ( ( $numberBeginPHP > 0 ) || ( $numberBegineZHTML > 0 ) || ( $numberBeginHTML > 0 ) )\r\n {\r\n $resultPage = \"\";\r\n $isInsideHTML = false;\r\n $isInsideeZHTML = false;\r\n $isInsidePHP = false;\r\n for ( $i=0; $i<strlen( $tmpPage ); $i++ )\r\n { \r\n if ( substr( $tmpPage, $i - strlen( $startHTMLTag ), strlen( $startHTMLTag ) ) == $startHTMLTag )\r\n {\r\n $isInsideHTMLTag = true;\r\n }\r\n\r\n if ( substr( $tmpPage, $i, strlen( $endHTMLTag ) ) == $endHTMLTag )\r\n {\r\n $isInsideHTMLTag = false;\r\n }\r\n\r\n if ( substr( $tmpPage, $i - strlen( $starteZHTMLTag ), strlen( $starteZHTMLTag ) ) == $starteZHTMLTag )\r\n {\r\n $isInsideeZHTMLTag = true;\r\n }\r\n\r\n if ( substr( $tmpPage, $i, strlen( $endeZHTMLTag ) ) == $endeZHTMLTag )\r\n {\r\n $isInsideeZHTMLTag = false;\r\n }\r\n \r\n if ( substr( $tmpPage, $i - strlen( $startPHPTag ), strlen( $startPHPTag ) ) == $startPHPTag )\r\n {\r\n $isInsidePHPTag = true;\r\n }\r\n\r\n if ( substr( $tmpPage, $i, strlen( $endPHPTag ) ) == $endPHPTag )\r\n {\r\n $isInsidePHPTag = false;\r\n }\r\n \r\n if ( ( $isInsideHTMLTag == true ) || ( $isInsideeZHTMLTag == true ) || ( $isInsidePHPTag == true ) )\r\n {\r\n switch ( $tmpPage[$i] )\r\n {\r\n case \"<\" :\r\n {\r\n $resultPage .= \"&lt;\";\r\n }\r\n break;\r\n\r\n case \">\" :\r\n {\r\n $resultPage .= \"&gt;\";\r\n }\r\n break;\r\n \r\n default:\r\n {\r\n $resultPage .= $tmpPage[$i];\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $resultPage .= $tmpPage[$i];\r\n }\r\n }\r\n\r\n $tmpPage = $resultPage;\r\n }\r\n return $tmpPage;\r\n }", "title": "" }, { "docid": "5ebc114f8f816b1ad82f4572bd2323a1", "score": "0.548956", "text": "function tidy_html($html)\n {\n $tidy = new tidy();\n $html = $tidy->repairString($html, array(), 'utf8');//yes I always use utf8\n return preg_replace('/<body>(.*?)<\\/body>/is', \"$1\", $html);\n }", "title": "" }, { "docid": "d49571102ece8f763aa8ac901f7f35ae", "score": "0.5461597", "text": "abstract public function html();", "title": "" }, { "docid": "d004b63d72b3f1d11a17fcda2e0f8cfd", "score": "0.5457379", "text": "function _parseHtml($html)\r\n\t\t{\r\n\t\t\t//echo '_parseHtml Entered.<br>';\r\n\t\t\t$html=preg_replace(\"/<!DOCTYPE((.|\\n)*?)>/ims\",\"\",$html);\r\n\t\t\t$html=preg_replace(\"/<script((.|\\n)*?)>((.|\\n)*?)<\\/script>/ims\",\"\",$html);\r\n\t\t\tpreg_match(\"/<head>((.|\\n)*?)<\\/head>/ims\",$html,$matches);\r\n\t\t\t$head=$matches[1];\r\n\t\t\tpreg_match(\"/<title>((.|\\n)*?)<\\/title>/ims\",$head,$matches);\r\n\t\t\t$this->title = $matches[1];\r\n\t\t\t$html=preg_replace(\"/<head>((.|\\n)*?)<\\/head>/ims\",\"\",$html);\r\n\t\t\t$head=preg_replace(\"/<title>((.|\\n)*?)<\\/title>/ims\",\"\",$head);\r\n\t\t\t$head=preg_replace(\"/<\\/?head>/ims\",\"\",$head);\r\n\t\t\t$html=preg_replace(\"/<\\/?body((.|\\n)*?)>/ims\",\"\",$html);\r\n\t\t\t$this->htmlHead=$head;\r\n\t\t\t\r\n\t\t\tpreg_match_all(\"/\\<img.*?src\\=\\\"(.*?)\\\"[^>]*>/i\", $html, $match);\r\n\t\t\t$this -> aa=\"\";\r\n\t\t\tforeach($match[0] as $k=>$v){\r\n\t\t\t\t$base = explode(\",\",$match[1][$k]);\r\n\t\t\t\t$html = str_replace($match[0][$k],\"<img src=3D'filename.files/image\".$k.\".png'>\",$html);\r\n\t\t\t\t$this -> aa .= <<<EOH\r\n\r\n------=_NextPart_01CD6FE5.963BD570\r\nContent-Location: file:///C:/1E889205/filename.files/image$k.png\r\nContent-Transfer-Encoding: base64\r\nContent-Type: image/png\r\n\r\n$base[1]\r\nEOH;\r\n\t\t\t}\r\n\t\t\t$this->htmlBody=$html;\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}", "title": "" }, { "docid": "7d068977524446c1b65cb7bafe88d842", "score": "0.54485995", "text": "public function get_html()\n {\n }", "title": "" }, { "docid": "af3fdcd1ffea74c4d9941844072e2e2d", "score": "0.54347116", "text": "function is_html_response($response){\n\t\tif((substr($response,0,5) == '<html') || (substr($response,0,9) == '<!DOCTYPE')){\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "3bf7dc992e1dab8f536f43a4e9abd8e4", "score": "0.541766", "text": "abstract public function parse(string &$html): string;", "title": "" }, { "docid": "6f1015fc593d59fb1de20997023b55e0", "score": "0.53883886", "text": "public function expectsHtml(){\r\n return strpos($_SERVER['HTTP_ACCEPT'], self::CONTENT_TYPE_TEXT_HTML ) !== FALSE;\r\n }", "title": "" }, { "docid": "7167201d23940d029d919842d5067731", "score": "0.537824", "text": "private function pre_loadHTML()\n\t{\n\t\tif(strlen($this->feed_item->content)<=1)\n\t\t{\n\t\t\t$this->dom = new \\SmartDOMDocument();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->dom->loadHTML($this->feed_item->content);\n\t\t}\n\t\t$this->dom->substituteEntities = false;\n\t}", "title": "" }, { "docid": "ade79c7faad0d4df3eb52e75cdb8a40d", "score": "0.5363546", "text": "public function testDomParser()\n\t{\n\t\t$source = 'some text';\n\t\t$expected = '<body><p>some text</p></body>';\n\t\t$this->assertEquals($expected, Html::trim($source, 100));\n\t}", "title": "" }, { "docid": "4140c1de56b4bc0d0e7ce004bd836bbb", "score": "0.53576314", "text": "public function parse($html);", "title": "" }, { "docid": "971175e22962246dbf962726e8a45460", "score": "0.5347586", "text": "public function test()\n {\n\n $html = 'syntax <strong onclick=\"alert(\\'coucou\\')\">error</small> <myowntag>my text</myowntag><?php echo \"coucou\"; ?><script type=\"text/javascript\">alert(\"coucou\");</script>';\n\n $config = array(\n 'clean' => true,\n 'drop-proprietary-attributes' => true,\n 'output-xhtml' => true,\n 'word-2000' => true,\n 'wrap' => '0',\n 'indent' => true,\n 'doctype' => 'transitional'\n );\n\n // Tidy\n $tidy = new \\tidy;\n $tidy->parseString(\n $html,\n $config,\n 'utf8'\n );\n $tidy->cleanRepair();\n\n// if ($tidy->errorBuffer) {\n// echo \"There are some errors!<br />\";\n// $errors = explode(\"\\n\", $tidy->errorBuffer);\n//\n// foreach ($errors as $error) {\n// echo $error . \"<br />\";\n// }\n// } else {\n// echo 'There are no errors.';\n// }\n // Affichage\n// echo '<xmp>'.$html.'</xmp>';\n// echo '<br /><br /><br />';\n echo '############################################################################################################################';\n echo '<br /><br /><br />';\n $pattern = \"/(?:<[^>]+\\s)(on\\S+)=[\\\"']?((?:.(?![\\\"']?\\s+(?:\\S+)=|[>\\\"']))+.)[\\\"']?/\";\n echo '<xmp>' . preg_replace(\n $pattern,\n '',\n $tidy\n ) . '</xmp>';\n\n\n\n preg_match_all(\n \"/(?:<[^>]+\\s)(on\\S+)=[\\\"']?((?:.(?![\\\"']?\\s+(?:\\S+)=|[>\\\"']))+.)[\\\"']?/\",\n $tidy,\n $match\n );\n\n echo '<xmp><pre style=\"background-color:#fff; color:#000\">';\n print_r($match);\n echo '</pre></xmp>';\n }", "title": "" }, { "docid": "133c48ccaa053b1613823f91fe22f1c6", "score": "0.5346339", "text": "public function safeHtml($html)\n {\n preg_match_all('#<(?!meta|img|br|hr|input\\b)\\b([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);\n $openedtags = $result[1];\n preg_match_all('#</([a-z]+)>#iU', $html, $result);\n $closedtags = $result[1];\n $len_opened = count($openedtags);\n if (count($closedtags) == $len_opened) {\n return $html;\n }\n $openedtags = array_reverse($openedtags);\n for ($i = 0; $i < $len_opened; $i++) {\n if (!in_array($openedtags[$i], $closedtags)) {\n $html .= '</' . $openedtags[$i] . '>';\n } else {\n unset($closedtags[array_search($openedtags[$i], $closedtags)]);\n }\n }\n\n $tagsPermitidas = \"<html><body><b><br><em><i><li><ol><p><s><span><thead><tbody><table><tr><td><u><ul><h1><h2><h3><h4><h5><h6><pre><img>\";\n \n $html = strip_tags($html, $tagsPermitidas);\n\n return $html;\n }", "title": "" }, { "docid": "6885594c8ad0581d12b638c74575b9ae", "score": "0.53438944", "text": "private function prepareForDOM($html, $encoding) {\n $html = iconv($encoding, 'UTF-8//TRANSLIT', $html);\n $html = preg_replace('/<(script|style|noscript)\\b[^>]*>.*?<\\/\\1\\b[^>]*>/is', '', $html);\n $tidy = new \\tidy;\n $config = array(\n 'drop-font-tags' => true,\n 'drop-proprietary-attributes' => true,\n 'hide-comments' => true,\n 'indent' => true,\n 'logical-emphasis' => true,\n 'numeric-entities' => true,\n 'output-xhtml' => true,\n 'wrap' => 0\n );\n $tidy->parseString($html, $config, 'utf8');\n $tidy->cleanRepair();\n $html = $tidy->value;\n $html = preg_replace('#<meta[^>]+>#isu', '', $html);\n $html = preg_replace('#<head\\b[^>]*>#isu', \"<head>\\r\\n<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\", $html);\n return $html;\n }", "title": "" }, { "docid": "199773abd6038f71ac122f1e626630f9", "score": "0.5319095", "text": "public function getIsHtml(): bool {\r\n\t\treturn $this->is_html;\r\n\t}", "title": "" }, { "docid": "dacc95b3d22e4482a7eca7a10cedf4c2", "score": "0.5309642", "text": "static function post_db_parse_html_2($t=\"\"){\n\t\tif ( $t == \"\" ){\n\t\t\treturn $t;\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// Remove <br>s 'cos we know they can't\n\t\t// be user inputted, 'cos they are still\n\t\t// &lt;br&gt; at this point :)\n\t\t//-----------------------------------------\n\n\t\t/*\t\tif ( $this->pp_nl2br != 1 )\n\t\t{\n\t\t$t = str_replace( \"<br>\" , \"\\n\" , $t );\n\t\t$t = str_replace( \"<br />\" , \"\\n\" , $t );\n\t\t}*/\n\n\t\t$t = str_replace( \"&#39;\" , \"'\", $t );\n\t\t$t = str_replace( \"&#33;\" , \"!\", $t );\n\t\t$t = str_replace( \"&#036;\" , \"$\", $t );\n\t\t$t = str_replace( \"&#124;\" , \"|\", $t );\n\t\t$t = str_replace( \"&amp;\" , \"&\", $t );\n\t\t$t = str_replace( \"&gt;\" , \">\", $t );\n\t\t$t = str_replace( \"&lt;\" , \"<\", $t );\n\t\t$t = str_replace( \"&quot;\" , '\"', $t );\n\n\t\t//-----------------------------------------\n\t\t// Take a crack at parsing some of the nasties\n\t\t// NOTE: THIS IS NOT DESIGNED AS A FOOLPROOF METHOD\n\t\t// AND SHOULD NOT BE RELIED UPON!\n\t\t//-----------------------------------------\n\n\t\t$t = preg_replace( \"/javascript/i\" , \"j&#097;v&#097;script\", $t );\n\t\t$t = preg_replace( \"/alert/i\" , \"&#097;lert\" , $t );\n\t\t$t = preg_replace( \"/about:/i\" , \"&#097;bout:\" , $t );\n\t\t$t = preg_replace( \"/onmouseover/i\", \"&#111;nmouseover\" , $t );\n\t\t$t = preg_replace( \"/onmouseout/i\", \"&#111;nmouseout\" , $t );\n\t\t$t = preg_replace( \"/onclick/i\" , \"&#111;nclick\" , $t );\n\t\t$t = preg_replace( \"/onload/i\" , \"&#111;nload\" , $t );\n\t\t$t = preg_replace( \"/onsubmit/i\" , \"&#111;nsubmit\" , $t );\n\t\t//$t = preg_replace( \"/object/i\" , \"&#111;bject\" , $t );\n\t\t$t = preg_replace( \"/frame/i\" , \"fr&#097;me\" , $t );\n\t\t$t = preg_replace( \"/applet/i\" , \"&#097;pplet\" , $t );\n\t\t$t = preg_replace( \"/meta/i\" , \"met&#097;\" , $t );\n\t\t//$t = preg_replace( \"/embed/i\" , \"met&#097;\" , $t );\n\n\t\treturn $t;\n\t}", "title": "" }, { "docid": "6da0ed32d98f46d540c53e9bbbe8a60d", "score": "0.5274318", "text": "public function testThereMayNotBeInlineHtml(): void\n {\n }", "title": "" }, { "docid": "4c86ed794cdad29c6e114ab1f0046303", "score": "0.52290064", "text": "public function isHtmlForHuman()\n {\n return $this->isHtmlForHuman;\n }", "title": "" }, { "docid": "a176805429f19d89c0c4314f00ed4ff8", "score": "0.522873", "text": "public function parseHtmlRaw( $html ) {\n \n }", "title": "" }, { "docid": "85fda2df2300eb05ab6f55fd6d707352", "score": "0.522823", "text": "protected function scanHtmlLikeStyle()\n {\n if (preg_match('/^</', $this->input)) {\n return $this->scanInput('/^(<[\\w\\/].*)/', 'text');\n }\n return null;\n }", "title": "" }, { "docid": "fb2a0345e208fb875917fa9822f9b162", "score": "0.5220065", "text": "public function testUPCEGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_UPCE, 'UPCE', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===18);\n }", "title": "" }, { "docid": "5d8d2f4058a5778bd1b827e76816d3a0", "score": "0.5215118", "text": "abstract protected function runTest(Document $htmlDocument);", "title": "" }, { "docid": "9ada2a6c5ac96a3224f0435b9a1e3d69", "score": "0.5211603", "text": "static function getHtmlList()\n {\n $html_list = array(\n 'a' => '&lt;a&gt;',\n 'abbr' => '&lt;abbr&gt;',\n 'acronym' => '&lt;acronym&gt;',\n 'address' => '&lt;address&gt;',\n 'b' => '&lt;b&gt;',\n 'bdo' => '&lt;bdo&gt;',\n 'big' => '&lt;big&gt;',\n 'blockquote' => '&lt;blockquote&gt;',\n 'br' => '&lt;br&gt;',\n 'caption' => '&lt;caption&gt;',\n 'cite' => '&lt;cite&gt;',\n 'code' => '&lt;code&gt;',\n 'col' => '&lt;col&gt;',\n 'colgroup' => '&lt;colgroup&gt;',\n 'dd' => '&lt;dd&gt;',\n 'del' => '&lt;del&gt;',\n 'dfn' => '&lt;dfn&gt;',\n 'div' => '&lt;div&gt;',\n 'dl' => '&lt;dl&gt;',\n 'dt' => '&lt;dt&gt;',\n 'em' => '&lt;em&gt;',\n 'font' => '&lt;font&gt;',\n 'h1' => '&lt;h1&gt;',\n 'h2' => '&lt;h2&gt;',\n 'h3' => '&lt;h3&gt;',\n 'h4' => '&lt;h4&gt;',\n 'h5' => '&lt;h5&gt;',\n 'h6' => '&lt;h6&gt;',\n 'hr' => '&lt;hr&gt;',\n 'i' => '&lt;i&gt;',\n 'img' => '&lt;img&gt;',\n 'ins' => '&lt;ins&gt;',\n 'kbd' => '&lt;kbd&gt;',\n 'li' => '&lt;li&gt;',\n 'map' => '&lt;map&gt;',\n 'object' => '&lt;object&gt;',\n 'ol' => '&lt;ol&gt;',\n 'p' => '&lt;p&gt;',\n 'pre' => '&lt;pre&gt;',\n 's' => '&lt;s&gt;',\n 'samp' => '&lt;samp&gt;',\n 'small' => '&lt;small&gt;',\n 'span' => '&lt;span&gt;',\n 'strike' => '&lt;strike&gt;',\n 'strong' => '&lt;strong&gt;',\n 'sub' => '&lt;sub&gt;',\n 'sup' => '&lt;sup&gt;',\n 'table' => '&lt;table&gt;',\n 'tbody' => '&lt;tbody&gt;',\n 'td' => '&lt;td&gt;',\n 'tfoot' => '&lt;tfoot&gt;',\n 'th' => '&lt;th&gt;',\n 'thead' => '&lt;thead&gt;',\n 'tr' => '&lt;tr&gt;',\n 'tt' => '&lt;tt&gt;',\n 'u' => '&lt;u&gt;',\n 'ul' => '&lt;ul&gt;',\n 'var' => '&lt;var&gt;'\n );\n asort($html_list);\n reset($html_list);\n return $html_list;\n }", "title": "" }, { "docid": "31c09c4b70bac2d766e0817028eebe9d", "score": "0.52080923", "text": "public function testPMAGetHtmlForCommonForm()\n {\n // @todo Find out a better method to test for HTML\n }", "title": "" }, { "docid": "fca4fd34caafdbbbc260a9d800d564e7", "score": "0.5204042", "text": "public function testPHARMA2TGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'PHARMA2T', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===14);\n }", "title": "" }, { "docid": "247cd8d7ddb5243aa2d16dc84c188fb6", "score": "0.51973045", "text": "function _convertHTMLToBBCode($html)\n {\n\t\n\t\t//Gets rid of extra comment bug\n\t\t$html = str_replace('<!--?prettify lang=html linenums=true?-->', '', $html); \n\t\n //Covert square brackets to html codes \n $html = str_replace(['[', ']', '\\\\'], ['&#91;', '&#93;', '&#92;'], $html);\n \n $pattern = [\n '/[\\r|\\n]/',\n '/<br.*?>/i',\n '/<b.*?>/i',\n '/<\\/b>/i',\n '/<strong.*?>/i',\n '/<\\/strong>/i',\n '/<div(.*?)>/i',\n '/<\\/div>/i',\n '/<pre(.*?)>/i',\n '/<\\/pre>/i',\n '/<font(.*?)>/i',\n '/<\\/font>/i',\n '/<span(.*?)>/i',\n '/<\\/span>/i',\n '/<p(.*?)>/i',\n '/<\\/p>/i',\n '/<ul>/i',\n '/<\\/ul>/i',\n '/<ol>/i',\n '/<\\/ol>/i',\n '/<li>/i',\n '/<\\/li>/i', \n '/<em.*?>/i',\n '/<\\/em>/i',\n '/<u.*?>/i',\n '/<\\/u>/i',\n '/<ins.*?>/i',\n '/<\\/ins>/i',\n '/<strike>/i',\n '/<\\/strike>/i',\n '/<del>/i',\n '/<\\/del>/i',\n '/<a.*?href=\"(.*?)\".*?>(.*?)<\\/a>/i',\n '/<img(.*?)src=\"(.*?)\"(.*?)>/i', \n '/<i.*?>/i',\n '/<\\/i>/i',\n '/<iframe.*>(.*?)<\\/iframe>/i',\n '/<frameset.*>(.*?)<\\/frameset>/i',\n '/<frame.*>/i',\n '/<([a-zA-Z0-9]+)([^<]*)>(.*?)<\\/\\1>/i'\n ];\n \n $replace = [\n \"\",\n '\\n',\n '[b]',\n '[/b]',\n '[b]',\n '[/b]',\n '[div$1]',\n '[/div]',\n '[code$1]',\n '[/code]',\n '[font$1]',\n '[/font]',\n '[span$1]',\n '[/span]',\n '[p$1]',\n '[/p]',\n '[list]',\n '[/list]',\n '[list=1]',\n '[/list]',\n '[*]',\n '[/*]',\n '[i]',\n '[/i]', \n '[u]',\n '[/u]',\n '[u]',\n '[/u]',\n '[s]',\n '[/s]',\n '[s]',\n '[/s]',\n '[url=$1]$2[/url]',\n '[img $1$3]$2[/img]',\n '[i]',\n '[/i]',\n '$1',\n '$1',\n '$1',\n '[$1 $2]$3[/$1]'\n ];\n foreach($pattern as $i=>$p)\n {\n while (preg_match($p, $html)) {\n $html = preg_replace($p, $replace[$i], $html);\n }\n }\n \n //Convert Single Quote to Double Quote for div, code, font, img and other html tags tags\n $html = preg_replace_callback('/\\[code(.*?)\\](.*?)\\[\\/code\\]/i', create_function('$matches', 'return \"[code\" . str_replace(\\'\"\\', \";squote;\", $matches[1]) . \"]\" . $matches[2] . \"[/code]\";'), $html);\n $html = preg_replace_callback('/\\[font(.*?)\\](.*?)\\[\\/font\\]/i', create_function('$matches', 'return \"[font\" . str_replace(\\'\"\\', \";squote;\", $matches[1]) . \"]\" . $matches[2] . \"[/font]\";'), $html);\n $html = preg_replace_callback('/\\[span(.*?)\\](.*?)\\[\\/span\\]/i', create_function('$matches', 'return \"[span\" . str_replace(\\'\"\\', \";squote;\", $matches[1]) . \"]\" . $matches[2] . \"[/span]\";'), $html);\n $html = preg_replace_callback('/\\[div(.*?)\\](.*?)\\[\\/div\\]/i', create_function('$matches', 'return \"[div\" . str_replace(\\'\"\\', \";squote;\", $matches[1]) . \"]\" . $matches[2] . \"[/div]\";'), $html);\n $html = preg_replace_callback('/\\[p(.*?)\\](.*?)\\[\\/p\\]/i', create_function('$matches', 'return \"[p\" . str_replace(\\'\"\\', \";squote;\", $matches[1]) . \"]\" . $matches[2] . \"[/p]\";'), $html);\n $html = preg_replace_callback('/\\[img(.*?)\\](.*?)\\[\\/img\\]/i', create_function('$matches', 'return \"[img\" . str_replace(\\'\"\\', \";squote;\", $matches[1]) . \"]\" . $matches[2] . \"[/img]\";'), $html);\n \n $html = preg_replace_callback('/\\[([a-zA-Z0-9]+)([^\\]]+)\\]/i', create_function('$matches', 'return \"[\" . $matches[1] . str_replace(\\'\"\\', \";squote;\", $matches[2]) . \"]\";'), $html);\n \n return $html;\n }", "title": "" }, { "docid": "a54a2fe44dba9ba1fea326a5a9dadebe", "score": "0.51963073", "text": "public function html($html);", "title": "" }, { "docid": "c92f59e7b93dd8642c21f01e245c53a0", "score": "0.5192017", "text": "function SoapboxCleantags()\n\t{\n//\t\t$this->allowedTags = '<h1><b><i><a><ul><li><pre><hr><blockquote>';\n\t\t$this->allowedTags = '<a><acronym><address><b><br><blockquote><cite><code><div><dd><del><dl><dt><em><h1><h2><h3><h4><h5><h6><hr><i><img><li><ol><p><pre><s><span><strong><sub><table><tr><td><th><u><ul>';\n\t\t/*\n\t\t * Disallow these attributes/prefix within a tag\n\t\t */\n\t\t$this->stripAttrib = 'javascript|onclick|ondblclick|onmousedown|onmouseup|onmouseover|'.\n\t\t 'onmousemove|onmouseout|onkeypress|onkeydown|onkeyup|vbscript|about';\n\n\t\t$this->stripattribpaterns = '/(<[^>]*)('.$this->stripAttrib.')([^>]*>)/is';\n\t}", "title": "" }, { "docid": "1213c69fb494314d5cdb9ecf86f454d0", "score": "0.51910126", "text": "public function testEAN2GetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_EAN2, 'EAN2', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===8);\n }", "title": "" }, { "docid": "0b9df52a8ea1b26f5bdacfc644710539", "score": "0.5179013", "text": "public function test_bug_121()\n\t{\n\t\t$doc = <<<HTML\n<script>\n// alert(\"PHP Simple HTML DOM Parser\");\nalert(\"A PHP based DOM parser\");\n</script>\nHTML;\n\n\t\t$dom = $this->html->load($doc);\n\n\t\t$this->assertEquals($doc, (string)$this->html);\n\t}", "title": "" }, { "docid": "349966f97f9992ca67aac75515fb344d", "score": "0.5175921", "text": "protected function _beforeToHtml()\n {\n $this->process();\n return parent::_beforeToHtml();\n }", "title": "" }, { "docid": "43d6b607f0ba23c551f590f7591cf990", "score": "0.5174122", "text": "function has_html( $str )\n\t{\n\t\t//return (strlen($str) == strlen(preg_replace('/<[^>]*>/', '', $str)));\n\t\treturn ( ! preg_match('/<[^>]*>/', $str) ? FALSE : TRUE );\n\t}", "title": "" }, { "docid": "473cfeddbd1e99198cd07085bb6cba16", "score": "0.515404", "text": "public function test_bug_163()\n\t{\n\t\t$doc = 'Hello<a href=\"\"> World';\n\t\t$expected = 'Hello World';\n\n\t\t$this->html->load($doc);\n\n\t\t$this->assertEquals($expected, $this->html->plaintext);\n\t}", "title": "" }, { "docid": "35a8c9a897fab82dd503f6746137a340", "score": "0.5145204", "text": "public function testEAN8GetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_EAN2, 'EAN13', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===31);\n }", "title": "" }, { "docid": "aab767e50d8bb6cdd2e7bdbdc2dd140c", "score": "0.51426697", "text": "function fetch_html()\n\t{\n\t\n\t\tif (!isset($this->url))\n\t\t{\n\t\t\tthrow new Exception('No URL has been provided.');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif (filter_var($this->url, FILTER_VALIDATE_URL) === FALSE)\n\t\t{\n\t\t\tthrow new Exception('The URL ' . $this->url . ' is invalid.');\n\t\t\treturn FALSE;\n\t\t}\n\t\t\t\t\t\n\t\t/*\n\t\t * Via cURL, retrieve the contents of the URL.\n\t\t */\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_CONNECTTIMEOUT, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_TIMEOUT, 5000);\n\t\tcurl_setopt($ch, CURLOPT_URL, $this->url);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n\t\t$allowed_protocols = CURLPROTO_HTTP | CURLPROTO_HTTPS;\n\t\tcurl_setopt($ch, CURLOPT_PROTOCOLS, $allowed_protocols);\n\t\tcurl_setopt($ch, CURLOPT_REDIR_PROTOCOLS, $allowed_protocols & ~(CURLPROTO_FILE | CURLPROTO_SCP));\n\t\t$this->html = curl_exec($ch);\n\t\t\n\t\t/*\n\t\t * If our query failed, then we can't continue.\n\t\t */\n\t\tif ($this->html === FALSE)\n\t\t{\n\t\t\tthrow new Exception('cURL could not retrieve content for ' . $this->url . ', with the '\n\t\t\t\t.'following error: ' . curl_error($ch));\n\t\t}\n\t\t\n\t\tcurl_close($ch);\n\t\t\n\t\t/*\n\t\t * This HTML is invalid. Clean it up with HTML Tidy.\n\t\t */\n\t\tif (class_exists('tidy', FALSE))\n\t\t{\n\t\t\t\n\t\t\t$tidy = new tidy;\n\t\t\t$tidy->parseString($this->html);\n\t\t\t$tidy->cleanRepair();\n\t\t\t$this->html = $tidy;\n\t\t\t\n\t\t}\n\n\t\telseif (exec('which tidy'))\n\t\t{\n\n\t\t\t$filename = '/tmp/' . $period_id .'.tmp';\n\t\t\tfile_put_contents($filename, $this->html);\n\t\t\texec('tidy --show-errors 0 --show-warnings no -q -m ' . $filename);\n\t\t\t$this->html = file_get_contents($filename);\n\t\t\tunlink($filename);\n\n\t\t}\n\t\t\n\t\treturn TRUE;\n\t\t\n\t}", "title": "" }, { "docid": "a681717049c78e61fc28c2eaf6f93138", "score": "0.51412976", "text": "public function parse()\n {\n if ($this->skip_processing) {\n return true;\n }\n\n if ($this->html) {\n $html_encoding = XmlParser::getEncodingFromMetaTag($this->html);\n\n // Encode everything in UTF-8\n Logger::setMessage(get_called_class().': HTTP Encoding \"'.$this->encoding.'\" ; HTML Encoding \"'.$html_encoding.'\"');\n $this->html = Encoding::convert($this->html, $html_encoding ?: $this->encoding);\n $this->html = Filter::stripHeadTags($this->html);\n\n Logger::setMessage(get_called_class().': Content length: '.strlen($this->html).' bytes');\n $rules = $this->getRules();\n\n if (is_array($rules)) {\n Logger::setMessage(get_called_class().': Parse content with rules');\n $this->parseContentWithRules($rules);\n }\n else {\n Logger::setMessage(get_called_class().': Parse content with candidates');\n $this->parseContentWithCandidates();\n }\n }\n else {\n Logger::setMessage(get_called_class().': No content fetched');\n }\n\n Logger::setMessage(get_called_class().': Content length: '.strlen($this->content).' bytes');\n Logger::setMessage(get_called_class().': Grabber done');\n\n return $this->content !== '';\n }", "title": "" }, { "docid": "c21b182caed69767417236f39fa0f5cc", "score": "0.5138275", "text": "public function test_bug_153()\n\t{\n\t\t$doc = '<p>PHP Simple HTML DOM Parser</p>';\n\n\t\t$this->html->load($doc);\n\t\t$this->html->nodes = null;\n\n\t\t$this->html->clear();\n\t}", "title": "" }, { "docid": "e18e4eeba70ad8d34d83e5f879decd6f", "score": "0.5137191", "text": "public function test_bug_178()\n\t{\n\t\t/**\n\t\t * Note: The testdata must be encoded in order to work for machines with\n\t\t * different codepages!\n\t\t */\n\n\t\t$expected = chr(hexdec('c4')); // \"č\"\n\n\t\t/**\n\t\t * <!DOCTYPE html>\n\t\t * <html lang=\"windows-1250\">\n\t\t * <head>\n\t\t * <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1250\">\n\t\t * </head>\n\t\t * <body>\n\t\t * a><span>K�</span></a>\n\t\t * <b>K�</b>\n\t\t * </body>\n\t\t * </html>\n\t\t */\n\t\t// phpcs:ignore Generic.Files.LineLength\n\t\t$data = base64_decode('PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9IndpbmRvd3MtMTI1MCI+CjxoZWFkPgogICAgPG1ldGEgaHR0cC1lcXVpdj0iQ29udGVudC1UeXBlIiBjb250ZW50PSJ0ZXh0L2h0bWw7IGNoYXJzZXQ9d2luZG93cy0xMjUwIj4KPC9oZWFkPgo8Ym9keT4KICAgIDxhPjxzcGFuPkvoPC9zcGFuPjwvYT4KICAgIDxiPkvoPC9iPgo8L2JvZHk+CjwvaHRtbD4=');\n\n\t\t$this->html = str_get_html($data);\n\t\t$this->html->targetCharset = \"Windows-1251\";\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$this->html->find('a', 0)->innertext[7],\n\t\t\t'outertext() should convert text inside elements'\n\t\t); // note: innertext() calls outertext() internally\n\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$this->html->find('b', 0)->innertext[1],\n\t\t\t'innertext() should convert text inside elements'\n\t\t);\n\t}", "title": "" }, { "docid": "cc23fded1cdb8aec4c86b29710d88f0e", "score": "0.5135995", "text": "public function testKIXGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'KIX', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===29);\n }", "title": "" }, { "docid": "17aa3f8e4f7d30371926783e9e7e7c1b", "score": "0.51344657", "text": "public function test_bug_169()\n\t{\n\t\t$doc = '<div class=\"test_s\" /><div class=\"test_i\" />';\n\n\t\t$this->html->load($doc);\n\n\t\t$this->assertCount(\n\t\t\t1,\n\t\t\t$this->html->find('div[class=test_s]'),\n\t\t\t'Failed parsing attribute values ending on \"s\"'\n\t\t);\n\n\t\t$this->assertCount(\n\t\t\t1,\n\t\t\t$this->html->find('div[class=test_i]'),\n\t\t\t'Failed parsing attribute values ending on \"i\"'\n\t\t);\n\t}", "title": "" }, { "docid": "776c558000168b2eccc79fc92a0465fc", "score": "0.51211905", "text": "function parseDocument() {\n\t\t//$doc_buffer = $this->specialCharacters($this->document);\n\t\t$doc_buffer = $this->document;\n\t\t\n\t\t$doc_buffer = neteja($doc_buffer);\n\t\t\n\t\tif(preg_match(\"/<ul>(.*?)<\\/UL>/mi\", $doc_buffer)) {\n\t\t\t$doc_buffer = str_replace(\"<ul>\", \"\", $doc_buffer);\n\t\t\t$doc_buffer = str_replace(\"</ul>\", \"\", $doc_buffer);\n\t\t\t$doc_buffer = preg_replace(\"/<li>(.*?)<\\/LI>/mi\", \"\\\\f3\\\\'B7\\\\tab\\\\f{$this->font_face} \\\\1\\\\par\", $doc_buffer);\n\t\t}\n\t\t\n\t\t$doc_buffer = preg_replace(\"/<p>(.*?)<\\/p>/mi\", \"\\\\1\\\\par \", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<strong>(.*?)<\\/strong>/mi\", \"\\\\b \\\\1\\\\b0 \", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<em>(.*?)<\\/em>/mi\", \"\\\\i \\\\1\\\\i0 \", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<u>(.*?)<\\/u>/mi\", \"\\\\ul \\\\1\\\\ul0 \", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<strike>(.*?)<\\/strike>/mi\", \"\\\\strike \\\\1\\\\strike0 \", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<sub>(.*?)<\\/sub>/mi\", \"{\\\\sub \\\\1}\", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<sup>(.*?)<\\/sup>/mi\", \"{\\\\super \\\\1}\", $doc_buffer);\n\t\t\n\t\t//$doc_buffer = preg_replace(\"/<h1>(.*?)<\\/H1>/mi\", \"\\\\pard\\\\qc\\\\fs40 \\\\1\\\\par\\\\pard\\\\fs{$this->font_size} \", $doc_buffer);\n\t\t//$doc_buffer = preg_replace(\"/<h2>(.*?)<\\/H2>/mi\", \"\\\\pard\\\\qc\\\\fs32 \\\\1\\\\par\\\\pard\\\\fs{$this->font_size} \", $doc_buffer);\n\t\t\n\t\t$doc_buffer = preg_replace(\"/<h1>(.*?)<\\/H1>/mi\", \"\\\\fs48\\\\b \\\\1\\\\b0\\\\fs{$this->font_size}\\\\par \", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<h2>(.*?)<\\/H2>/mi\", \"\\\\fs36\\\\b \\\\1\\\\b0\\\\fs{$this->font_size}\\\\par \", $doc_buffer);\n\t\t$doc_buffer = preg_replace(\"/<h3>(.*?)<\\/H3>/mi\", \"\\\\fs27\\\\b \\\\1\\\\b0\\\\fs{$this->font_size}\\\\par \", $doc_buffer);\n\t\t\n\t\t\n\t\t$doc_buffer = preg_replace(\"/<hr(.*?)>/i\", \"\\\\brdrb\\\\brdrs\\\\brdrw30\\\\brsp20 \\\\pard\\\\par \", $doc_buffer);\n\t\t$doc_buffer = str_replace(\"<br>\", \"\\\\par \", $doc_buffer);\n\t\t$doc_buffer = str_replace(\"<tab>\", \"\\\\tab \", $doc_buffer);\n\t\t\n\t\n\t\t$doc_buffer=strip_tags($doc_buffer);\n\t\t$doc_buffer = $this->nl2par($doc_buffer);\n\t\t\n\t\treturn $doc_buffer;\n\t}", "title": "" }, { "docid": "74925c306bb73790d890b13848086b3a", "score": "0.51062983", "text": "function test_for_empty_html($html)\n{\n\treturn preg_match('#^(&nbsp;|\\s|</?br\\s*/?>|[\\x{200B}-\\x{200D}])*$#ui', $html);\n}", "title": "" }, { "docid": "4539891fb0db13077ea21a57a3e3370d", "score": "0.51061815", "text": "public function testS25GetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'S25', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===47);\n }", "title": "" }, { "docid": "07e33a7e961853e081db318e1598f4f6", "score": "0.5098206", "text": "public function testIMBGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'IMB', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===66);\n }", "title": "" }, { "docid": "b2b807da0b0c6c67afce39cc926810ad", "score": "0.50971746", "text": "public function testCODABARGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'CODABAR', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===37);\n }", "title": "" }, { "docid": "4b0ffde5427c03b0c29e0641fca4d611", "score": "0.50937873", "text": "function _preparse(){\n $options = PEAR::getStaticProperty('HTML_BBCodeParser','_options');\n $o = $options['open'];\n $c = $options['close'];\n $oe = $options['open_esc'];\n $ce = $options['close_esc'];\n \n $schemes = implode('|', $this->_allowedSchemes);\n \n $pattern = array( \"/(?<![\\\"'=\".$ce.\"\\/])(\".$oe.\"[^\".$ce.\"]*\".$ce.\")?(((\".$schemes.\"):\\/\\/|www)[@-a-z0-9.]+\\.[a-z]{2,4}[^\\s()\\[\\]]*)/i\",\n \"!\".$oe.\"a([^\".$ce.\"]+)href=(([a-z]*):(?://)?)?([^/\\s\".$ce.\"]*)([^\\s\".$ce.\"]*)([^\".$ce.\"]*)\".$ce.\"(.*)\".$oe.\"/a\".$ce.\"!i\");\n\n $pp = preg_replace_callback($pattern[0], array($this, 'smarterPPLinkExpand'), $this->_text);\n $this->_preparsed = preg_replace_callback($pattern[1], array($this, 'smarterPPLink'), $pp);\n \n }", "title": "" }, { "docid": "5670a70138cd1c0fc15f6976f6647954", "score": "0.509132", "text": "public function testPHARMAGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'PHARMA', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===21);\n }", "title": "" }, { "docid": "0f22cf9bf1351935ec943e6152c7759c", "score": "0.50811213", "text": "function isHTML($a_text)\n\t{\n\t\tif (preg_match(\"/<[^>]*?>/\", $a_text))\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE; \n\t\t}\n\t}", "title": "" }, { "docid": "43515499363b7b10909741b1117346a4", "score": "0.5067594", "text": "protected function parse_other_tags(&$rendered)\t{}", "title": "" }, { "docid": "e256ddec3678f9f2c8df0102bea7c5be", "score": "0.50608426", "text": "public function completeHtml () {\n\t\t#coopy/DiffRender.hx:477: lines 477-482\n\t\t$this->text_to_insert->insert(0, \"<!DOCTYPE html>\\x0D\\x0A<html>\\x0D\\x0A<head>\\x0D\\x0A<meta charset='utf-8'>\\x0D\\x0A<style TYPE='text/css'>\\x0D\\x0A\");\n\t\t#coopy/DiffRender.hx:483: characters 9-45\n\t\t$this->text_to_insert->insert(1, $this->sampleCss());\n\t\t#coopy/DiffRender.hx:484: lines 484-488\n\t\t$this->text_to_insert->insert(2, \"</style>\\x0D\\x0A</head>\\x0D\\x0A<body>\\x0D\\x0A<div class='highlighter'>\\x0D\\x0A\");\n\t\t#coopy/DiffRender.hx:489: lines 489-492\n\t\t$_this = $this->text_to_insert;\n\t\t$_this->arr[$_this->length++] = \"</div>\\x0D\\x0A</body>\\x0D\\x0A</html>\\x0D\\x0A\";\n\t}", "title": "" }, { "docid": "fd0b838aac6e565c4eda0faeb84c1025", "score": "0.5059279", "text": "static function post_db_parse_html($t=\"\") {\r\n if ($t == \"\") {\r\n return $t;\r\n }\r\n\r\n //-----------------------------------------\r\n // Remove <br>s 'cos we know they can't\r\n // be user inputted, 'cos they are still\r\n // &lt;br&gt; at this point :)\r\n //-----------------------------------------\r\n\r\n /* \t\tif ( $this->pp_nl2br != 1 )\r\n {\r\n $t = str_replace( \"<br>\" , \"\\n\" , $t );\r\n $t = str_replace( \"<br />\" , \"\\n\" , $t );\r\n } */\r\n\r\n $t = str_replace(\"&#39;\", \"'\", $t);\r\n $t = str_replace(\"&#33;\", \"!\", $t);\r\n $t = str_replace(\"&#036;\", \"$\", $t);\r\n $t = str_replace(\"&#124;\", \"|\", $t);\r\n $t = str_replace(\"&amp;\", \"&\", $t);\r\n $t = str_replace(\"&gt;\", \">\", $t);\r\n $t = str_replace(\"&lt;\", \"<\", $t);\r\n $t = str_replace(\"&quot;\", '\"', $t);\r\n\r\n //-----------------------------------------\r\n // Take a crack at parsing some of the nasties\r\n // NOTE: THIS IS NOT DESIGNED AS A FOOLPROOF METHOD\r\n // AND SHOULD NOT BE RELIED UPON!\r\n //-----------------------------------------\r\n\r\n $t = preg_replace(\"/javascript/i\", \"j&#097;v&#097;script\", $t);\r\n $t = preg_replace(\"/alert/i\", \"&#097;lert\", $t);\r\n $t = preg_replace(\"/about:/i\", \"&#097;bout:\", $t);\r\n $t = preg_replace(\"/onmouseover/i\", \"&#111;nmouseover\", $t);\r\n $t = preg_replace(\"/onmouseout/i\", \"&#111;nmouseout\", $t);\r\n $t = preg_replace(\"/onclick/i\", \"&#111;nclick\", $t);\r\n $t = preg_replace(\"/onload/i\", \"&#111;nload\", $t);\r\n $t = preg_replace(\"/onsubmit/i\", \"&#111;nsubmit\", $t);\r\n $t = preg_replace(\"/object/i\", \"&#111;bject\", $t);\r\n $t = preg_replace(\"/frame/i\", \"fr&#097;me\", $t);\r\n $t = preg_replace(\"/applet/i\", \"&#097;pplet\", $t);\r\n $t = preg_replace(\"/meta/i\", \"met&#097;\", $t);\r\n $t = preg_replace(\"/embed/i\", \"met&#097;\", $t);\r\n\r\n return $t;\r\n }", "title": "" }, { "docid": "e8e1c271f7b478fbdd185f9a03b84bf2", "score": "0.50542927", "text": "private function isHtml(Response $response) {\n $contentType = $response->headers->get('Content-Type');\n return strtolower(strtok($contentType, ';')) == 'text/html';\n }", "title": "" }, { "docid": "49547bd7426fa5f61a5c26508f746d4c", "score": "0.50521815", "text": "public function proceed()\n {\n $next_token = $this->next_token();\n list($token_type, $block_name, $attrs, $start_offset, $token_length) = $next_token;\n $stack_depth = count($this->stack);\n\n // we may have some HTML soup before the next block.\n $leading_html_start = $start_offset > $this->offset ? $this->offset : null;\n\n switch ($token_type) {\n case 'no-more-tokens':\n // if not in a block then flush output.\n if (0 === $stack_depth) {\n $this->add_freeform();\n\n return false;\n }\n\n /*\n * Otherwise we have a problem\n * This is an error\n *\n * we have options\n * - treat it all as freeform text\n * - assume an implicit closer (easiest when not nesting)\n */\n\n // for the easy case we'll assume an implicit closer.\n if (1 === $stack_depth) {\n $this->add_block_from_stack();\n\n return false;\n }\n\n /*\n * for the nested case where it's more difficult we'll\n * have to assume that multiple closers are missing\n * and so we'll collapse the whole stack piecewise\n */\n while (0 < count($this->stack)) {\n $this->add_block_from_stack();\n }\n\n return false;\n\n case 'void-block':\n /*\n * easy case is if we stumbled upon a void block\n * in the top-level of the document\n */\n if (0 === $stack_depth) {\n if (isset($leading_html_start)) {\n $this->output[] = (array) $this->freeform(\n substr(\n $this->document,\n $leading_html_start,\n $start_offset - $leading_html_start\n )\n );\n }\n\n $this->output[] = (array) new WP_Block_Parser_Block($block_name, $attrs, [], '', []);\n $this->offset = $start_offset + $token_length;\n\n return true;\n }\n\n // otherwise we found an inner block.\n $this->add_inner_block(\n new WP_Block_Parser_Block($block_name, $attrs, [], '', []),\n $start_offset,\n $token_length\n );\n $this->offset = $start_offset + $token_length;\n\n return true;\n\n case 'block-opener':\n // track all newly-opened blocks on the stack.\n array_push(\n $this->stack,\n new WP_Block_Parser_Frame(\n new WP_Block_Parser_Block($block_name, $attrs, [], '', []),\n $start_offset,\n $token_length,\n $start_offset + $token_length,\n $leading_html_start\n )\n );\n $this->offset = $start_offset + $token_length;\n\n return true;\n\n case 'block-closer':\n /*\n * if we're missing an opener we're in trouble\n * This is an error\n */\n if (0 === $stack_depth) {\n /*\n * we have options\n * - assume an implicit opener\n * - assume _this_ is the opener\n * - give up and close out the document\n */\n $this->add_freeform();\n\n return false;\n }\n\n // if we're not nesting then this is easy - close the block.\n if (1 === $stack_depth) {\n $this->add_block_from_stack($start_offset);\n $this->offset = $start_offset + $token_length;\n\n return true;\n }\n\n /*\n * otherwise we're nested and we have to close out the current\n * block and add it as a new innerBlock to the parent\n */\n $stack_top = array_pop($this->stack);\n $html = substr($this->document, $stack_top->prev_offset, $start_offset - $stack_top->prev_offset);\n $stack_top->block->innerHTML .= $html;\n $stack_top->block->innerContent[] = $html;\n $stack_top->prev_offset = $start_offset + $token_length;\n\n $this->add_inner_block(\n $stack_top->block,\n $stack_top->token_start,\n $stack_top->token_length,\n $start_offset + $token_length\n );\n $this->offset = $start_offset + $token_length;\n\n return true;\n\n default:\n // This is an error.\n $this->add_freeform();\n\n return false;\n }\n }", "title": "" }, { "docid": "7bfffc74b0c924cb11023ab0394d9fae", "score": "0.50507224", "text": "private function _processHtmlPage($response, $info) {\r\n \r\n $url = $info['url'];\r\n $oHtml=new analyzerHtml($response, $url);\r\n if ($this->_bFollowLinks && $oHtml->canFollowLinks()){\r\n // TODO:\r\n // use external links too and check domain with sticky domain array\r\n $aLinks=$oHtml->getLinks(\"internal\");\r\n if (array_key_exists('internal', $aLinks) && is_array($aLinks['internal']) && count($aLinks['internal'])){\r\n foreach ($aLinks['internal'] as $aLink){\r\n if (!array_key_exists('rel', $aLink) \r\n || (array_key_exists('rel', $aLink) && $aLink['rel']!='nofollow')){\r\n \r\n // echo basename($url) .\" - internal -> \";\r\n // echo ($this->_addUrl2Crawl($aLink['_url']) ? \"\" : \"(skip) \".$aLink['_url'] ). \"\\n\"; \r\n $this->_addUrl2Crawl($aLink['_url']);\r\n }\r\n }\r\n }\r\n }\r\n if ($oHtml->canIndexContent()){\r\n $this->_preparePageForIndex(array('header' => $info, 'body' => $response));\r\n }\r\n\r\n return true;\r\n // return array_keys($aUrls);\r\n }", "title": "" }, { "docid": "5e3bfb32dfbb0f4ca3dfb5b21065ae6f", "score": "0.50473654", "text": "public function renderHtml() {\n return false;\n }", "title": "" }, { "docid": "c1f8331c9275ee6a96a51ccc8cb07b6c", "score": "0.5042583", "text": "public function getIsHtml()\n {\n return $this->is_html;\n }", "title": "" }, { "docid": "2687aefc2f8abcfa7aeae57066d09e1b", "score": "0.5038023", "text": "public function testGenerateHTML()\n {\n session_start();\n $this->initSession();\n\n commandCheck('throw');\n\n $user = unserialize($_SESSION['game']['user']);\n $actual = generateHTML($user);\n\n $this->assertNotEmpty($actual);\n\n destroySession();\n }", "title": "" }, { "docid": "4e3cf2e9a77dbd084a939399ee64b026", "score": "0.50379777", "text": "public function testInvalidDom()\n {\n $sampleDomString = \"123\";\n \n $htmlParser = new HtmlParser(\n array(\n \"//div\"\n ),\n $sampleDomString\n );\n $results = iterator_to_array($htmlParser->getValues());\n $this->assertEquals($results, array(array()));\n }", "title": "" }, { "docid": "35536286f50b888efb3a47d58358ed13", "score": "0.50373286", "text": "public function test_bug_79()\n\t{\n\t\t$doc = <<<HTML\n<table>\n\t<thead><tr><th>PHP Simple HTML DOM Parser</th></tr></thead>\n\t<tbody><tr><td>A PHP based DOM parser</td></tr></tbody>\n</table>\nHTML;\n\n\t\t$this->html->load($doc);\n\n\t\t$this->assertCount(2, $this->html->find('table tr'));\n\t\t$this->assertCount(1, $this->html->find('table thead tr'));\n\t\t$this->assertCount(1, $this->html->find('table tbody tr'));\n\t}", "title": "" }, { "docid": "9663afea2e61c87853d4fd9c3f230315", "score": "0.5034157", "text": "public function acceptsHtml()\n {\n return $this->accepts('text/html');\n }", "title": "" }, { "docid": "9663afea2e61c87853d4fd9c3f230315", "score": "0.5034157", "text": "public function acceptsHtml()\n {\n return $this->accepts('text/html');\n }", "title": "" }, { "docid": "7843813f5b71b83940e9fd259e180db5", "score": "0.5023043", "text": "public function testExtractLinks(): void\n {\n $extractLinksMethod = fn(string $html): array => (new BodyParser($html, 'http://localhost'))->extractLinks();\n\n $expected = [\n 'http://localhost/page.html',\n 'http://localhost/area.htm',\n 'http://localhost/file.mp3',\n 'http://localhost/embed-video.mp4',\n 'http://localhost/frame1.html',\n 'http://localhost/frame2.html',\n 'http://localhost/pic.jpg',\n 'http://localhost/style.css',\n 'http://localhost/script.js',\n 'http://localhost/file2.mp3',\n 'http://localhost/subtitles_en.vtt',\n 'http://localhost/movie.mp4',\n ];\n $html = '\n<!--suppress HtmlUnknownTarget -->\n<a href=\"/page.html#fragment\">Link</a>\n<map name=\"example\"><area alt=\"area\" href=\"area.htm\"></map>\n<audio src=\"/file.mp3\"></audio>\n<embed src=\"embed-video.mp4\">\n<!--suppress HtmlDeprecatedAttribute, HtmlDeprecatedTag, HtmlExtraClosingTag, XmlDeprecatedElement -->\n<frame src=\"frame1.html\"></frame>\n<iframe src=\"frame2.html\"></iframe>\n<img alt=\"pic.jpg\" src=\"pic.jpg\" />\n<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">\n<script type=\"text/javascript\" src=\"script.js\" />\n<audio><source src=\"file2.mp3\" type=\"audio/mpeg\"></audio>\n<video><track src=\"subtitles_en.vtt\"></video>\n<video src=\"//localhost/movie.mp4\"></video>';\n $this->assertEquals($expected, $extractLinksMethod($html));\n\n $html = '<html lang=\"en\"><body>' . $html . '</body></html>';\n $this->assertEquals($expected, $extractLinksMethod($html));\n\n $html = '<b>No links here!</b>';\n $this->assertEquals([], $extractLinksMethod($html));\n\n $html = '<a href=\"page.html\">Link</a>' . PHP_EOL . '<a href=\"http://localhost/page.html\">Link</a>';\n $expected = ['http://localhost/page.html'];\n $this->assertEquals($expected, $extractLinksMethod($html));\n\n //Checks that the result is the same as that saved in the\n // `extractedLinks` property as a cache\n $expected = ['link.html'];\n $BodyParser = new BodyParser($html, 'http://localhost');\n $this->setProperty($BodyParser, 'extractedLinks', $expected);\n $this->assertEquals($expected, $BodyParser->extractLinks());\n\n //No HTML\n $this->assertEquals([], $extractLinksMethod('no html'));\n }", "title": "" }, { "docid": "e7fd6b6f4cac3b51a37f7253f755b271", "score": "0.50198287", "text": "public function testUPCAGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_UPCA, 'UPCA', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===31);\n }", "title": "" }, { "docid": "e5a8f097fc3cd52e49067c5375e75a4a", "score": "0.5014661", "text": "function o_filter($i) {\r\n // text that starts html: gets passed through\r\n\r\n if (substr($i, 0, 5) == \"html:\") return substr($i, 5, strlen($i));\r\n\r\n $i = ereg_replace(\"(<)\", \"&lt;\", $i); \r\n $i = ereg_replace(\"(>)\", \"&gt;\", $i); \r\n\r\n // links to true links\r\n\r\n $i = ereg_replace(\"(\\n)\", \"<p>\\n\\n\", $i);\r\n\r\n return $i;\r\n}", "title": "" }, { "docid": "4f8f59926df7ed6895866249e31e5a7c", "score": "0.5010379", "text": "function _check_blockyness($tag, $attributes, $self_close, $close)\n{\n global $THE_DOCTYPE, $BLOCK_CONSTRAIN, $XML_CONSTRAIN, $TAGS_DEPRECATE_ALLOW, $PARENT_TAG, $TAGS_INLINE, $TAGS_BLOCK, $TAGS_NORMAL, $TAGS_INLINE_DEPRECATED, $TAGS_BLOCK_DEPRECATED, $TAGS_NORMAL_DEPRECATED, $IDS_SO_FAR, $ANCESTOR_BLOCK, $ANCESTOR_INLINE, $EXPECTING_TAG, $OUT, $POS, $LAST_A_TAG, $UNDER_XMLNS;\n\n $errors = array();\n\n $dif = $close ? -1 : 1;\n if ($self_close) {\n $dif = 0;\n }\n if ((isset($TAGS_BLOCK[$tag])) || (isset($TAGS_BLOCK_DEPRECATED[$tag]))) {\n if (($ANCESTOR_INLINE != 0) && ($BLOCK_CONSTRAIN)) {\n $errors[] = array('XHTML_ANCESTOR_BLOCK_INLINE', $tag);\n }\n $ANCESTOR_BLOCK += $dif;\n if (isset($TAGS_BLOCK_DEPRECATED[$tag])) {\n $errors[] = array($TAGS_DEPRECATE_ALLOW ? 'XHTML_DEPRECATED_TAG' : 'XHTML_UNKNOWN_TAG', $tag);\n }\n } elseif ((isset($TAGS_INLINE[$tag])) || (isset($TAGS_INLINE_DEPRECATED[$tag]))) {\n //if (($BLOCK_CONSTRAIN) && ($PARENT_TAG != 'span') && ((isset($TAGS_NORMAL[$PARENT_TAG])) || ((isset($TAGS_NORMAL_DEPRECATED[$PARENT_TAG]))))) $errors[] = array('XHTML_ANCESTOR_INLINE_NORMAL', $tag); This restriction isn't really a proper one, some checkers seem to have it but it is not used anymore (XHTML5+) and pretty silly\n if ($tag != 'label') {\n $ANCESTOR_INLINE += $dif;\n }\n if (isset($TAGS_INLINE_DEPRECATED[$tag])) {\n $errors[] = array($TAGS_DEPRECATE_ALLOW ? 'XHTML_DEPRECATED_TAG' : 'XHTML_UNKNOWN_TAG', $tag);\n }\n } elseif ((isset($TAGS_NORMAL[$tag])) || (isset($TAGS_NORMAL_DEPRECATED[$tag]))) {\n if ($tag == 'title') {\n $ANCESTOR_BLOCK += $dif;\n }\n if (($tag == 'iframe') && (($THE_DOCTYPE == DOCTYPE_XHTML_STRICT) || ($THE_DOCTYPE == DOCTYPE_XHTML_11))) {\n $errors[] = array('XHTML_UNKNOWN_TAG', $tag);\n }\n if (isset($TAGS_NORMAL_DEPRECATED[$tag])) {\n $errors[] = array($TAGS_DEPRECATE_ALLOW ? 'XHTML_DEPRECATED_TAG' : 'XHTML_UNKNOWN_TAG', $tag);\n }\n } elseif (!$close) {\n if (!$UNDER_XMLNS) {\n $errors[] = array('XHTML_UNKNOWN_TAG', $tag);\n }\n }\n\n return ($errors == array()) ? null : $errors;\n}", "title": "" }, { "docid": "9039794495ddb941fadc24655f0295d8", "score": "0.5007836", "text": "public function test_bug_191()\n\t{\n\t\t$expected = <<<EOD\nFirst line\n\nSecond line\n\nThird line\nEOD;\n\t\t$doc = 'First line<p>Second line</p>Third line';\n\t\t$this->html->load($doc);\n\t\t$this->assertEquals($expected, $this->html->root->text());\n\t}", "title": "" }, { "docid": "c8c18d59de8f7c031eaa754e95f5f022", "score": "0.5007487", "text": "function init__webstandards2()\n{\n global $TAGS_BLOCK;\n $TAGS_BLOCK = array(\n 'div' => 1,\n 'h1' => 1,\n 'h2' => 1,\n 'h3' => 1,\n 'h4' => 1,\n 'h5' => 1,\n 'h6' => 1,\n 'p' => 1,\n 'blockquote' => 1,\n 'pre' => 1,\n 'hr' => 1,\n 'fieldset' => 1,\n 'figure' => 1,\n\n // Best classified as block\n 'address' => 1,\n 'iframe' => 1,\n 'noscript' => 1,\n 'table' => 1,\n 'tbody' => 1,\n 'td' => 1,\n 'tfoot' => 1,\n 'th' => 1,\n 'thead' => 1,\n 'tr' => 1,\n 'dd' => 1,\n 'dt' => 1,\n 'dl' => 1,\n 'li' => 1,\n 'ol' => 1,\n 'ul' => 1,\n\n // XHTML5\n 'rbc' => 1,\n 'rtc' => 1,\n 'rb' => 1,\n 'rt' => 1,\n 'rp' => 1,\n );\n $TAGS_BLOCK += array(\n 'video' => 1,\n 'details' => 1,\n 'summary' => 1,\n 'section' => 1,\n 'nav' => 1,\n 'header' => 1,\n 'footer' => 1,\n 'figure' => 1,\n 'canvas' => 1,\n 'audio' => 1,\n 'aside' => 1,\n 'article' => 1,\n );\n\n global $TAGS_INLINE;\n $TAGS_INLINE = array(\n 'span' => 1,\n 'br' => 1,\n 'abbr' => 1,\n 'cite' => 1,\n 'code' => 1,\n 'dfn' => 1,\n 'em' => 1,\n 'strong' => 1,\n 'kbd' => 1,\n 'q' => 1,\n 'samp' => 1,\n 'var' => 1,\n 'sub' => 1,\n 'sup' => 1,\n 'del' => 1,\n\n // XHTML5\n 'ruby' => 1,\n\n // Best classified as inline\n 'a' => 1,\n 'bdo' => 1,\n 'img' => 1,\n 'ins' => 1,\n 'param' => 1,\n 'textarea' => 1,\n 'button' => 1,\n 'input' => 1,\n 'select' => 1,\n 'embed' => 1,\n 'object' => 1,\n 'caption' => 1,\n 'label' => 1,\n );\n\n $TAGS_INLINE += array(\n 'wbr' => 1,\n 'time' => 1,\n 'progress' => 1,\n 'output' => 1,\n 'meter' => 1,\n 'mark' => 1,\n 'keygen' => 1,\n 'datalist' => 1,\n 'command' => 1,\n 'track' => 1,\n );\n\n global $TAGS_NORMAL;\n $TAGS_NORMAL = array(\n 'base' => 1,\n 'body' => 1,\n 'col' => 1,\n 'colgroup' => 1,\n 'head' => 1,\n 'html' => 1,\n 'link' => 1,\n 'map' => 1,\n 'meta' => 1,\n 'optgroup' => 1,\n 'option' => 1,\n 'style' => 1,\n 'title' => 1,\n 'legend' => 1,\n 'figcaption' => 1,\n 'script' => 1,\n 'area' => 1,\n\n // I'd call this 'block', but XHTML-strict other checkers would disagree - probably xhtml-strict doesn't consider 'programmatic' elements to be inline/block\n 'form' => 1,\n );\n\n $TAGS_NORMAL += array(\n 'source' => 1,\n );\n\n global $TAGS_BLOCK_DEPRECATED;\n $TAGS_BLOCK_DEPRECATED = array(\n 'dir' => 1,\n 'menu' => 1,\n );\n\n global $TAGS_INLINE_DEPRECATED;\n $TAGS_INLINE_DEPRECATED = array(\n // Would be removed in XHTML strict and deprecated in transitional\n 'center' => 1,\n 'applet' => 1,\n 'font' => 1,\n 's' => 1,\n 'strike' => 1,\n 'u' => 1,\n );\n\n global $TAGS_NORMAL_DEPRECATED;\n $TAGS_NORMAL_DEPRECATED = array(\n 'basefont' => 1,\n );\n\n if (function_exists('cms_srv')) {\n $browser = strtolower(cms_srv('HTTP_USER_AGENT'));\n $is_ie = (strpos($browser, 'msie') !== false);\n } else {\n $is_ie = false;\n }\n\n $enforce_javascript = '([^\\n]+)';\n $enforce_lang = '[a-zA-Z][a-zA-Z](-[a-zA-Z]+)?';\n $enforce_direction = '(ltr|rtl)';\n $enforce_align = '(left|center|right|justify|char)';\n $enforce_align2 = '(top|middle|bottom|left|right)';\n $enforce_align3 = '(left|center|right|justify)';\n $enforce_align4 = '(top|bottom|left|right)';\n $enforce_valign = '(top|middle|bottom|baseline)';\n $enforce_number = '(-?[0-9]+)';\n $enforce_fractional = '(-?[0-9]*(\\.)[0-9]+?)';\n $enforce_inumber = '[0-9]+';\n $enforce_character = '.';\n $enforce_color = '(black|silver|gray|white|maroon|purple|fuchsia|green|darkgrey|slategrey|lime|olive|yellow|navy|blue|teal|aqua|orange|red|(\\#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])|(\\#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]))'; // orange and red aren't 'official' -- but kind of handy ;). In reality, the colour codes were never properly defined, and these two are obvious names for obviously needed ones-- they'll be supported\n $enforce_length = '((0)|(' . $enforce_number . '(|in|cm|mm|ex|pt|pc|px|em|%|vw))|((' . $enforce_fractional . ')(in|cm|mm|ex|px|em|%|vw)))'; // |ex|pt|in|cm|mm|pc We don't want these in our XHTML... preferably we only want em when it comes to font size!\n $enforce_ilength = '((0)|(' . $enforce_inumber . '(|in|cm|mm|ex|pt|pc|px|em|%|vw))|((' . $enforce_inumber . ')?\\.' . $enforce_inumber . '(in|cm|mm|ex|em|%|vw)))'; // |ex|pt|in|cm|mm|pc We don't want these in our XHTML... preferably we only want em when it comes to font size!\n $enforce_pixels = '[0-9]+';\n $enforce_auto_or_length = '(auto|' . $enforce_length . ')';\n $enforce_auto_or_ilength = '(auto|' . $enforce_ilength . ')';\n $enforce_normal_or_length = '(normal|' . $enforce_length . ')';\n $enforce_border_width = '(thin|medium|thick|' . $enforce_length . ')';\n $enforce_potential_4d_border_width = $enforce_border_width . '( ' . $enforce_border_width . '( ' . $enforce_border_width . '( ' . $enforce_border_width . '|)|)|)';\n $color_types = array(\n '(rgb\\(' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?\\))',\n '(rgba\\(' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?,\\s*[01]?(\\.\\d+)?\\))',\n '(hsl\\(' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?\\))',\n '(hsla\\(' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?,\\s*' . $enforce_inumber . '%?,\\s*[01]?(\\.\\d+)?\\))',\n '(\\#[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f])',\n $enforce_color,\n 'ActiveBorder|ActiveCaption|AppWorkspace|Background|Buttonface|ButtonHighlight|ButtonShadow|ButtonText|CaptionText|GrayText|Highlight|HighlightText|InactiveBorder|InactiveCaption|InactiveCaptionText|InfoBackground|InfoText|Menu|MenuText|Scrollbar|ThreeDDarkShadow|ThreeDFace|ThreeDHighlight|ThreeDLightShadow|ThreeDShadow|Window|WindowFrame|WindowText',\n );\n $enforce_css_color = '(' . implode('|', $color_types) . ')';\n $enforce_transparent_or_color = '(transparent|' . $enforce_css_color . ')';\n $enforce_fraction = '(\\d%|\\d\\d%|100%|0?\\.\\d+|1\\.0|0|1)';\n $_enforce_font_list = \"((?i)cursive|fantasy|monospace|serif|sans-serif|Georgia|Times|Trebuchet|Tahoma|Geneva|Verdana|Arial|Helvetica|Courier|Courier New|Impact|'Georgia'|'Times'|'Trebuchet'|'Tahoma'|'Geneva'|'Verdana'|'Arial'|'Helvetica'|'Courier'|'Courier New'|'Impact'(?-i))\";\n $enforce_font_list = '((([\\w\\-]+)|(\"[\\w\\- ]+\")|(\\'[\\w\\- ]+\\')),\\s*)*' . $_enforce_font_list;\n $enforce_functional_url = '(url\\(\\'.+\\'\\)|url\\(\".+\"\\)|url\\([^\\(\\);]+\\))';\n $enforce_functional_url_or_none = '(' . $enforce_functional_url . '|none)';\n $enforce_border_style = '(none|dotted|dashed|solid|double|groove|ridge|inset|outset|transparent)'; // 'transparent' not supported in IE6\n $enforce_background_repeat = '(repeat|repeat-x|repeat-y|no-repeat)';\n $enforce_attachment = '(scroll|fixed)';\n $_enforce_background_position = '((' . $enforce_length . '|top( ' . $enforce_length . ')?|center|bottom( ' . $enforce_length . ')?)|(' . $enforce_length . '|left( ' . $enforce_length . ')?|center|right( ' . $enforce_length . ')?))';\n $enforce_background_position = '((' . $_enforce_background_position . ')|(' . $_enforce_background_position . ' ' . $_enforce_background_position . '))';\n $enforce_border = '((' . $enforce_border_width . '|' . $enforce_border_style . '|' . $enforce_css_color . ')( |$))+';\n $enforce_potential_4d_length = $enforce_length . '( ' . $enforce_length . '( ' . $enforce_length . '( ' . $enforce_length . '|)|)|)';\n $enforce_potential_4d_length_auto = $enforce_auto_or_length . '( ' . $enforce_auto_or_length . '( ' . $enforce_auto_or_length . '( ' . $enforce_auto_or_length . '|)|)|)';\n $enforce_potential_4d_ilength = $enforce_ilength . '( ' . $enforce_ilength . '( ' . $enforce_ilength . '( ' . $enforce_ilength . '|)|)|)';\n $enforce_potential_4d_ilength_auto = $enforce_auto_or_ilength . '( ' . $enforce_auto_or_ilength . '( ' . $enforce_auto_or_ilength . '( ' . $enforce_auto_or_ilength . '|)|)|)';\n $enforce_font_size = '(larger|smaller|xx-small|x-small|small|medium|large|x-large|xx-large|' . $enforce_length . '(/' . $enforce_length . ')?)';\n $enforce_font_style = '(normal|italic|oblique)';\n $enforce_font_variant = '(normal|small-caps)';\n $enforce_font_weight = '(lighter|normal|bold|bolder|((\\d)+))';\n $enforce_list_style_position = '(inside|outside)';\n $enforce_list_style_type = '(none|disc|circle|square|decimal|lower-roman|upper-roman|lower-alpha|upper-alpha' . ((!$is_ie) ? '|decimal-leading-zero|lower-greek|lower-latin|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha' : '') . ')';\n $enforce_list_style_image = '(none|' . $enforce_functional_url . ')';\n $enforce_id = '[a-zA-Z][\\w\\-\\:\\.]*';\n $enforce_name = '[\\w\\-\\:\\.]+(\\[\\])?';\n if (function_exists('get_forum_type')) {\n require_code('obfuscate');\n $enforce_link = ((get_forum_type() == 'none') ? '(mailto:.*)?' : '') . '(mailto:.*|' . preg_quote(mailto_obfuscated(), '#') . '.*)?[^\\s\\#]*(\\#[^\\s\\#]*)?';\n } else {\n $enforce_link = '.*';\n }\n $enforce_class = '[ \\w\\-]*';\n $_counter_increment = '((\\w+( \\d+)?)+)';\n $enforce_counter_increment = $_counter_increment . '( ' . $_counter_increment . ')*';\n $enforce_transition_timing_function = '(linear|ease|ease-in|ease-out|ease-in-out|cubic-bezier\\(' . $enforce_fraction . ' ' . $enforce_fraction . ' ' . $enforce_fraction . ' ' . $enforce_fraction . '\\))';\n $enforce_time = '\\d[\\d\\.]*s';\n $enforce_box_shadow = '((inset )?' . $enforce_length . '( ' . $enforce_length . '( ' . $enforce_length . '( ' . $enforce_length . ')?)?)? ' . $enforce_css_color . ')';\n $enforce_transition_property = '[\\w,\\-]+';\n $enforce_transform_origin = '(left|center|right|' . $enforce_length . ')';\n $enforce_transform_style = '(flat|preserve-3d)';\n $enforce_transition = $enforce_transition_property . '( ' . $enforce_time . '( ' . $enforce_transition_timing_function . '( ' . $enforce_time . ')?)?)?';\n\n global $CSS_PROPERTIES;\n $CSS_PROPERTIES = array(\n 'background' => '((' . $enforce_transparent_or_color . '|' . $enforce_functional_url_or_none . '|' . $enforce_background_repeat . '|' . $enforce_attachment . '|' . $enforce_background_position . ')( |$))+',\n 'background-attachment' => $enforce_attachment,\n 'background-color' => $enforce_transparent_or_color,\n 'background-image' => /*$enforce_functional_url_or_none*/'.*', // Changed to .* to allow gradients\n 'background-repeat' => $enforce_background_repeat,\n 'background-position' => $enforce_background_position,\n 'border' => $enforce_border,\n 'border-collapse' => '(collapse|separate)',\n 'border-color' => $enforce_transparent_or_color . '( ' . $enforce_transparent_or_color . '( ' . $enforce_transparent_or_color . '( ' . $enforce_transparent_or_color . '|)|)|)',\n 'border-spacing' => $enforce_length . '( ' . $enforce_length . ')?',\n 'border-style' => $enforce_border_style,\n 'border-width' => $enforce_potential_4d_border_width,\n 'border-bottom' => $enforce_border,\n 'border-bottom-color' => $enforce_transparent_or_color,\n 'border-bottom-style' => $enforce_border_style,\n 'border-bottom-width' => $enforce_border_width,\n 'border-left' => $enforce_border,\n 'border-left-color' => $enforce_transparent_or_color,\n 'border-left-style' => $enforce_border_style,\n 'border-left-width' => $enforce_border_width,\n 'border-right' => $enforce_border,\n 'border-right-color' => $enforce_transparent_or_color,\n 'border-right-style' => $enforce_border_style,\n 'border-right-width' => $enforce_border_width,\n 'border-top' => $enforce_border,\n 'border-top-color' => $enforce_transparent_or_color,\n 'border-top-style' => $enforce_border_style,\n 'border-top-width' => $enforce_border_width,\n 'bottom' => $enforce_auto_or_length,\n 'clear' => '(both|left|right|none)',\n 'clip' => 'auto|(rect\\(' . $enforce_potential_4d_length . '\\))',\n 'color' => $enforce_css_color,\n 'cursor' => '(' . $enforce_functional_url . '|(?i)auto|crosshair|default|move|text|wait|help|n-resize|e-resize|s-resize|w-resize|ne-resize|nw-resize|se-resize|sw-resize|pointer|not-allowed|no-drop|vertical-text|all-scroll|col-resize|row-resize|none' . ((!$is_ie) ? '|progress' : '') . '(?-i))', // hand is actually IE specific version of pointer; we'll use Tempcode so as to only show that when really needed\n 'direction' => '(ltr|rtl)',\n 'display' => '(none|inline|block|list-item|table|table-header-group|table-footer-group|inline-block|run-in' . ((!$is_ie) ? '|inline-table|table-row|table-row-group|table-column-group|table-column|table-cell|table-caption' : '') . ')',\n 'float' => '(left|right|none)',\n 'font' => '((caption|icon|menu|message-box|small-caption|status-bar|' . $enforce_font_style . '|' . $enforce_font_variant . '|' . $enforce_font_weight . '|' . $enforce_font_size . '|' . $enforce_normal_or_length . '|' . $enforce_font_list . ')( |$))+',\n 'font-family' => $enforce_font_list,\n 'font-size' => $enforce_font_size,\n 'font-style' => $enforce_font_style,\n 'font-variant' => $enforce_font_variant,\n 'font-weight' => $enforce_font_weight,\n 'height' => $enforce_auto_or_length,\n 'left' => $enforce_auto_or_length,\n 'right' => $enforce_auto_or_length,\n 'letter-spacing' => $enforce_normal_or_length,\n 'line-height' => '(\\d*(\\.\\d+)?|' . $enforce_normal_or_length . ')',\n 'list-style' => '((' . $enforce_list_style_type . '|' . $enforce_list_style_position . '|' . $enforce_list_style_image . ')( |$))+',\n 'list-style-image' => '(' . $enforce_functional_url . '|none)',\n 'list-style-position' => $enforce_list_style_position,\n 'list-style-type' => $enforce_list_style_type,\n 'margin' => $enforce_potential_4d_length_auto,\n 'margin-bottom' => $enforce_auto_or_length,\n 'margin-left' => $enforce_auto_or_length,\n 'margin-right' => $enforce_auto_or_length,\n 'margin-top' => $enforce_auto_or_length,\n 'overflow' => '(visible|hidden|scroll|auto)',\n 'padding' => $enforce_potential_4d_ilength,\n 'padding-bottom' => $enforce_auto_or_ilength,\n 'padding-left' => $enforce_auto_or_ilength,\n 'padding-right' => $enforce_auto_or_ilength,\n 'padding-top' => $enforce_auto_or_ilength,\n 'page-break-after' => '(auto|left|right|always)',\n 'page-break-before' => '(auto|left|right|always)',\n 'position' => '(static|relative|absolute' . ((!$is_ie) ? '|fixed' : '') . ')',\n 'table-layout' => '(auto|fixed)',\n 'text-align' => '(left|right|center|justify)',\n 'text-decoration' => '(underline|line-through|none' . ((!$is_ie) ? '|blink' : '') . ')',\n 'text-indent' => $enforce_length,\n 'text-transform' => '(capitalize|uppercase|lowercase|none)',\n 'top' => $enforce_auto_or_length,\n 'unicode-bidi' => '(bidi-override|normal|embed)',\n 'vertical-align' => '(baseline|sub|super|top|text-top|middle|bottom|text-bottom|' . $enforce_length . ')',\n 'visibility' => '(hidden|visible|collapse)',\n 'white-space' => '(normal|pre|nowrap' . ((!$is_ie) ? '|pre-wrap|pre-line' : '') . ')',\n 'width' => $enforce_auto_or_length,\n 'word-spacing' => $enforce_normal_or_length,\n 'z-index' => '(auto|(\\d+))',\n 'content' => '.+',\n 'quotes' => '.+ .+',\n 'max-width' => '(none|' . $enforce_auto_or_length . ')',\n 'min-width' => $enforce_auto_or_length,\n 'max-height' => '(none|' . $enforce_auto_or_length . ')',\n 'min-height' => $enforce_auto_or_length,\n 'marker-offset' => $enforce_auto_or_length,\n 'caption-side' => 'top|bottom|left|right',\n 'empty-cells' => 'show|hide',\n 'counter-increment' => $enforce_counter_increment,\n 'counter-reset' => $enforce_counter_increment,\n 'outline' => $enforce_border,\n 'outline-color' => $enforce_transparent_or_color,\n 'outline-style' => $enforce_border_style,\n 'outline-width' => $enforce_border_width,\n 'opacity' => $enforce_fraction,\n 'overflow-x' => '(visible|hidden|scroll|auto)',\n 'overflow-y' => '(visible|hidden|scroll|auto)',\n\n // CSS3, widely supported\n 'box-sizing' => '(border-box|content-box|padding-box)', // should be vendor prefixed (for Firefox)\n\n // CSS3, not supported on IE8 but irrelevant as these just add flashiness; should be vendor prefixed\n 'background-size' => '(cover|contain|((' . $enforce_length . ' )?' . $enforce_length . '))',\n 'box-shadow' => '(none|(' . $enforce_box_shadow . '(,\\s*' . $enforce_box_shadow . '(,\\s*' . $enforce_box_shadow . '(,\\s*' . $enforce_box_shadow . ')?)?)?))',\n 'text-shadow' => '(none|(' . $enforce_length . ' ' . $enforce_length . '( ' . $enforce_length . ')?( ' . $enforce_css_color . ')?))',\n 'border-radius' => $enforce_length . '( ' . $enforce_length . '( ' . $enforce_length . '( ' . $enforce_length . ')?)?)?',\n 'border-top-left-radius' => $enforce_length,\n 'border-top-right-radius' => $enforce_length,\n 'border-bottom-left-radius' => $enforce_length,\n 'border-bottom-right-radius' => $enforce_length,\n 'transition-property' => $enforce_transition_property,\n 'transition-duration' => $enforce_time,\n 'transition-timing-function' => $enforce_transition_timing_function,\n 'transition-delay' => $enforce_time,\n 'transition' => $enforce_transition . '(\\s*,\\s*' . $enforce_transition . ')*',\n 'background-origin' => '(border-box|content-box)', // padding-box not widely supported yet; may be dropped from spec\n 'transform' => '(none|\\w+\\([^\\(\\)]+\\))',\n 'transform-origin' => $enforce_transform_origin . '( ' . $enforce_transform_origin . '( ' . $enforce_transform_origin . ')?)?',\n 'transform-style' => $enforce_transform_style,\n 'user-select' => '(none|auto|text|all|contain)',\n 'text-overflow' => '(clip|ellipsis|\\'[^\\']\\')',\n 'touch-action' => '(auto|none|pan-x|pan-y|manipulation|pan-left|pan-right|pan-up|pan-down|pinch-zoom)',\n\n /* Purposely left out these CSS2 features due to very poor browser support (not just IE not having it) */\n /*\n (print module)\n (aural module)\n */\n\n /* These are non standard but we want them */\n 'writing-mode' => '(tb-rl|lr-tb)', // A more complex W3C standard is underway. Only IE supports this one.\n 'word-wrap' => '(normal|break-word)', // Was renamed to overflow-wrap, but that name is not supported widely\n 'overflow-scrolling' => '(touch|auto)',\n 'text-size-adjust' => '(none|auto|\\d%|\\d\\d%|100%)',\n );\n\n global $CSS_NON_IE_PROPERTIES;\n $CSS_NON_IE_PROPERTIES = array(\n // Empty for now, as CSS is evolving fast, and the point where we're at now we don't need to use things IE does not support, or if we would like to, they're not fully standardised yet anyway\n // In other words, we are just supporting CSS2.1 and parts of CSS3 specs in this checker. That is our baseline.\n // There is no real 'CSS3' anyway, just a rapidly evolving series of specs with varying levels of industry and standards acceptance.\n );\n\n $strict_form_accessibility = false; // Form fields may not be empty with this strict rule\n\n global $TAG_ATTRIBUTES;\n $TAG_ATTRIBUTES = array(); // Split up to workaround bug in HHVM\n $TAG_ATTRIBUTES += array(\n 'a.accesskey' => $enforce_character,\n 'a.charset' => '.+',\n 'a.download' => '(download)',\n 'a.coords' => '.+',\n 'a.href' => $enforce_link,\n 'a.hreflang' => $enforce_lang,\n 'a.onblur' => $enforce_javascript,\n 'a.onfocus' => $enforce_javascript,\n 'a.rel' => '.*',\n 'a.rev' => '.+',\n 'a.shape' => '(rect|circle|poly|default)',\n 'a.tabindex' => $enforce_inumber,\n 'a.type' => '.+',\n 'area.accesskey' => $enforce_character,\n 'area.alt' => '.*',\n 'area.coords' => '.+',\n 'area.href' => $enforce_link,\n 'area.nohref' => 'nohref',\n 'area.onblur' => '.+',\n 'area.onfocus' => $enforce_javascript,\n 'area.shape' => '(rect|circle|poly|default)',\n 'area.tabindex' => $enforce_inumber,\n );\n $TAG_ATTRIBUTES += array(\n 'base.href' => $enforce_link,\n 'blockquote.cite' => '.+',\n 'body.onload' => $enforce_javascript,\n 'body.onunload' => $enforce_javascript,\n 'body.onafterprint' => $enforce_javascript,\n 'body.onbeforeprint' => $enforce_javascript,\n 'body.onbeforeunload' => $enforce_javascript,\n 'body.onclose' => $enforce_javascript,\n 'body.onerror' => $enforce_javascript,\n 'body.onhashchange' => $enforce_javascript,\n 'body.onlanguagechange' => $enforce_javascript,\n 'body.onmessage' => $enforce_javascript,\n 'body.onoffline' => $enforce_javascript,\n 'body.ononline' => $enforce_javascript,\n 'body.onpagehide' => $enforce_javascript,\n 'body.onpageshow' => $enforce_javascript,\n 'body.onpopstate' => $enforce_javascript,\n 'body.onrejectionhandled' => $enforce_javascript,\n 'body.onresize' => $enforce_javascript,\n 'body.onstorage' => $enforce_javascript,\n 'body.onunhandledrejection' => $enforce_javascript,\n 'button.accesskey' => $enforce_character,\n 'button.disabled' => 'disabled',\n 'button.name' => $enforce_name,\n 'button.onblur' => $enforce_javascript,\n 'button.onfocus' => $enforce_javascript,\n 'button.tabindex' => $enforce_inumber,\n 'button.type' => '(button|submit|reset)',\n 'button.value' => '.+',\n );\n $TAG_ATTRIBUTES += array(\n 'col.char' => $enforce_character,\n 'col.charoff' => $enforce_length,\n 'col.span' => $enforce_inumber,\n 'colgroup.char' => $enforce_character,\n 'colgroup.charoff' => $enforce_length,\n 'colgroup.span' => $enforce_inumber,\n 'del.cite' => '.+',\n 'del.datetime' => '.+',\n 'div.xml:lang' => $enforce_lang,\n );\n $TAG_ATTRIBUTES += array(\n 'form.accept-charset' => '.+',\n 'form.action' => $enforce_link,\n 'form.enctype' => 'multipart/form-data|application/x-www-form-urlencoded',\n 'form.method' => '(get|post)',\n 'form.onreset' => '.+',\n 'form.onsubmit' => '.+',\n );\n $TAG_ATTRIBUTES += array(\n 'html.xml:lang' => $enforce_lang,\n 'html.version' => '.+',\n 'html.xmlns' => '.+',\n 'img.alt' => '.*', // Have to allow this really, for non-semantic images\n 'img.height' => $enforce_inumber,\n 'img.ismap' => 'ismap',\n 'img.longdesc' => '.+',\n 'img.src' => $enforce_link,\n 'img.sizes' => $enforce_length,\n 'img.srcset' => '(' . $enforce_link . ' \\d+x( |$))*',\n 'img.usemap' => '.+',\n 'img.width' => $enforce_inumber,\n 'img.onabort' => $enforce_javascript,\n 'img.onerror' => $enforce_javascript,\n 'img.onload' => $enforce_javascript,\n 'embed.type' => '.*',\n 'embed.height' => $enforce_inumber,\n 'embed.src' => $enforce_link,\n 'embed.width' => $enforce_inumber,\n 'embed.onerror' => $enforce_javascript,\n 'embed.onload' => $enforce_javascript,\n 'input.accept' => '.+',\n 'input.accesskey' => $enforce_character,\n 'input.alt' => '.*',\n 'input.checked' => 'checked',\n 'input.disabled' => 'disabled',\n 'input.maxlength' => $enforce_inumber,\n 'input.name' => $enforce_name,\n 'input.onblur' => '.+',\n 'input.onchange' => '.+',\n 'input.onfocus' => $enforce_javascript,\n 'input.onselect' => '.+',\n 'input.readonly' => 'readonly',\n 'input.size' => '.+',\n 'input.src' => $enforce_link,\n 'input.tabindex' => $enforce_inumber,\n 'input.type' => '(text|password|checkbox|radio|submit|reset|file|hidden|image|button|color|date|datetime|datetime-local|email|month|number|range|search|tel|time|url|week)',\n 'input.usemap' => '.+',\n 'input.value' => '.' . ($strict_form_accessibility ? '+' : '*'),\n 'input.oninvalid' => $enforce_javascript,\n 'ins.cite' => '.+',\n 'ins.datetime' => '.+',\n );\n $TAG_ATTRIBUTES += array(\n 'label.accesskey' => $enforce_character,\n 'label.for' => $enforce_id,\n 'label.onblur' => '.+',\n 'label.onfocus' => $enforce_javascript,\n 'legend.accesskey' => $enforce_character,\n 'link.charset' => '.+',\n 'link.href' => $enforce_link,\n 'link.hreflang' => $enforce_lang,\n 'link.media' => '.+',\n 'link.rel' => '.+',\n 'link.rev' => '.+',\n 'link.type' => '.+',\n 'link.sizes' => '.+',\n );\n $TAG_ATTRIBUTES += array(\n 'meta.content' => '.*',\n 'meta.http-equiv' => '[a-zA-Z].+',\n 'meta.name' => '[a-zA-Z].+',\n 'meta.scheme' => '.+',\n 'object.archive' => '.+',\n 'object.classid' => '.+',\n 'object.codebase' => $enforce_link,\n 'object.codetype' => '.+',\n 'object.data' => $enforce_link,\n 'object.declare' => 'declare',\n 'object.height' => $enforce_length,\n 'object.name' => $enforce_name,\n 'object.standby' => '.+',\n 'object.tabindex' => $enforce_inumber,\n 'object.type' => '.+',\n 'object.usemap' => '.+',\n 'object.width' => $enforce_length,\n 'object.onerror' => $enforce_javascript,\n 'object.onload' => $enforce_javascript,\n 'optgroup.disabled' => 'disabled',\n 'optgroup.label' => '.+',\n 'option.disabled' => 'disabled',\n 'option.label' => '.+',\n 'option.selected' => 'selected',\n 'option.value' => '.*',\n );\n $TAG_ATTRIBUTES += array(\n 'param.name' => $enforce_name,\n 'param.type' => '.+',\n 'param.value' => '.+',\n 'param.valuetype' => '(data|ref|object)',\n 'q.cite' => '.+',\n 'script.charset' => '.+',\n 'script.defer' => 'defer',\n 'script.event' => '.+',\n 'script.for' => '.+',\n 'script.src' => $enforce_link,\n 'script.type' => 'text/javascript',\n 'script.onerror' => $enforce_javascript,\n 'script.onload' => $enforce_javascript,\n 'select.disabled' => 'disabled',\n 'select.multiple' => 'multiple',\n 'select.name' => $enforce_name,\n 'select.onblur' => '.+',\n 'select.onchange' => '.+',\n 'select.onfocus' => $enforce_javascript,\n 'select.size' => $enforce_inumber,\n 'select.tabindex' => $enforce_inumber,\n 'span.xml:lang' => $enforce_lang,\n 'style.media' => '.+',\n 'style.type' => 'text/css',\n 'style.onerror' => $enforce_javascript,\n 'style.onload' => $enforce_javascript,\n );\n $TAG_ATTRIBUTES += array(\n 'table.frame' => '(void|above|below|hsides|lhs|rhs|vsides|box|border)',\n 'table.rules' => '(none|groups|rows|cols|all)',\n //'table.summary' => '.*', Not in HTML5\n 'tbody.char' => $enforce_character,\n 'tbody.charoff' => $enforce_length,\n 'td.axis' => '.+',\n 'td.char' => $enforce_character,\n 'td.charoff' => $enforce_length,\n 'td.colspan' => $enforce_inumber,\n 'td.headers' => '.+',\n 'td.rowspan' => $enforce_inumber,\n 'td.scope' => '(row|col|rowgroup|colgroup)',\n 'textarea.accesskey' => $enforce_character,\n 'textarea.cols' => $enforce_inumber,\n 'textarea.disabled' => 'disabled',\n 'textarea.name' => $enforce_name,\n 'textarea.onblur' => '.+',\n 'textarea.onchange' => '.+',\n 'textarea.onfocus' => $enforce_javascript,\n 'textarea.onselect' => '.+',\n 'textarea.readonly' => 'readonly',\n 'textarea.rows' => $enforce_inumber,\n 'textarea.tabindex' => $enforce_inumber,\n 'textarea.oninvalid' => $enforce_javascript,\n 'tfoot.char' => $enforce_character,\n 'tfoot.charoff' => $enforce_length,\n 'th.axis' => '.+',\n 'th.char' => $enforce_character,\n 'th.charoff' => $enforce_length,\n 'th.colspan' => $enforce_inumber,\n 'th.headers' => '.+',\n 'th.rowspan' => $enforce_inumber,\n 'th.scope' => '(row|col|rowgroup|colgroup)',\n 'thead.char' => $enforce_character,\n 'thead.charoff' => $enforce_length,\n 'tr.char' => $enforce_character,\n 'tr.charoff' => $enforce_length,\n );\n $TAG_ATTRIBUTES += array(\n 'map.name' => $enforce_name,\n\n // Below brought back in in modules (target, iframe) / fully in HTML5\n 'a.target' => '.+',\n //'area.target' => '.+',\n 'base.target' => '.+',\n 'form.target' => '.+',\n 'iframe.longdesc' => '.+',\n 'iframe.name' => $enforce_name,\n 'iframe.src' => $enforce_link,\n\n // These are needed in IE, so we will have to browser sniff and output if IE being used, but not check them as okay\n //'iframe.scrolling' => '(yes|no|auto)',\n //'iframe.frameborder' => '(1|0)',\n //'iframe.marginheight' => $enforce_pixels,\n //'iframe.marginwidth' => $enforce_pixels,\n );\n $TAG_ATTRIBUTES += array(\n '*.hidden' => '(hidden)',\n '*.class' => $enforce_class,\n '*.dir' => $enforce_direction,\n '*.id' => $enforce_id,\n '*.translate' => '(yes|no)',\n '*.lang' => $enforce_lang,\n '*.onclick' => $enforce_javascript,\n '*.ondblclick' => $enforce_javascript,\n '*.onkeydown' => $enforce_javascript,\n '*.onkeypress' => $enforce_javascript,\n '*.onkeyup' => $enforce_javascript,\n '*.onmousedown' => $enforce_javascript,\n '*.onmousemove' => $enforce_javascript,\n '*.onmouseout' => $enforce_javascript,\n '*.onmouseover' => $enforce_javascript,\n '*.onmouseup' => $enforce_javascript,\n '*.oncontextmenu' => $enforce_javascript,\n '*.oncopy' => $enforce_javascript,\n '*.oncut' => $enforce_javascript,\n '*.ondrag' => $enforce_javascript,\n '*.ondragend' => $enforce_javascript,\n '*.ondragenter' => $enforce_javascript,\n '*.ondragexit' => $enforce_javascript,\n '*.ondragleave' => $enforce_javascript,\n '*.ondragover' => $enforce_javascript,\n '*.ondragstart' => $enforce_javascript,\n '*.ondrop' => $enforce_javascript,\n '*.oninput' => $enforce_javascript,\n '*.onmouseenter' => $enforce_javascript,\n '*.onmouseleave' => $enforce_javascript,\n '*.onpaste' => $enforce_javascript,\n '*.onpause' => $enforce_javascript,\n '*.onscroll' => $enforce_javascript,\n '*.onwheel' => $enforce_javascript,\n '*.style' => '.*',\n '*.title' => '.*',\n 'aria-autocomplete' => '(true|false)',\n 'aria-checked' => '(true|false)',\n 'aria-disabled' => '(true|false)',\n 'aria-expanded' => '(true|false)',\n 'aria-haspopup' => '(true|false)',\n 'aria-hidden' => '(true|false)',\n 'aria-invalid' => '(true|false)',\n 'aria-label' => $enforce_id,\n 'aria-level' => $enforce_number,\n 'aria-multiline' => '(true|false)',\n 'aria-multiselectable' => '(true|false)',\n 'aria-orientation' => '(scrollbar|separator|slider)',\n 'aria-pressed' => '(true|false)',\n 'aria-readonly' => '(true|false)',\n 'aria-required' => '(true|false)',\n 'aria-selected' => '(true|false)',\n 'aria-sort' => '(ascending|descending)',\n 'aria-valuemax' => '.*',\n 'aria-valuemin' => '.*',\n 'aria-valuenow' => '.*',\n 'aria-valuetext' => '.*',\n 'aria-atomic' => '(true|false)',\n 'aria-busy' => '(true|false)',\n 'aria-live' => '(true|false)',\n 'aria-relevant' => '(true|false)',\n 'aria-dropeffect' => '(copy|move|link|execute|popup|none)',\n 'aria-grabbed' => '(true|false)',\n 'aria-activedescendant' => $enforce_id,\n 'aria-controls' => $enforce_id,\n 'aria-describedby' => $enforce_id,\n 'aria-flowto' => $enforce_id,\n 'aria-labelledby' => $enforce_id,\n 'aria-owns' => $enforce_id,\n 'aria-posinset' => '(true|false)',\n 'aria-setsize' => $enforce_number,\n // XHTML5\n 'rt.rbspan' => $enforce_inumber,\n );\n\n global $TAG_ATTRIBUTES_REQUIRED;\n $TAG_ATTRIBUTES_REQUIRED = array(\n 'base' => array('href'), // XHTML-strict\n //'html' => array('xmlns'/*, 'xml:lang' Not in XHTML5*/),\n 'meta' => array('content'),\n 'style' => array(/*'type'*/),\n 'script' => array(/*'type'*/),\n 'bdo' => array('dir'),\n 'basefont' => array('size'),\n //'param' => array('name'), Not needed in XHTML strict\n 'iframe' => array('src', 'title'),\n 'img' => array('src', 'alt'),\n 'label' => array('for'),\n 'map' => array('id'),\n 'area' => array('alt'),\n 'form' => array('action', 'title', 'autocomplete'/*not really required but for stability we should always set it*/),\n 'textarea' => array('cols', 'rows'),\n //'input' => array('value'), // accessibility, checked somewhere else\n 'table' => array(/*'summary' not in html5*/),\n 'optgroup' => array('label'),\n );\n\n // New to HTML5...\n $TAG_ATTRIBUTES += array(\n 'a.media' => '.+',\n 'ol.reversed' => '(reversed)',\n 'fieldset.disabled' => '(disabled)',\n 'fieldset.form' => $enforce_name,\n 'fieldset.name' => $enforce_name,\n 'form.oninput' => '.+',\n 'html.manifest' => '.+',\n 'input.height' => $enforce_inumber,\n 'input.width' => $enforce_inumber,\n 'input.step' => 'any|(-?[0-9]+(\\.[0-9]+)?)',\n 'input.required' => '(required)',\n 'input.placeholder' => '.+', // We will allow use of this because it is progressive enhancement. Don't rely on it for core communications within Composr until we can drop IE8/IE9 support (LEGACY note)\n 'input.pattern' => '.+', // Don't rely on this being supported, we have our own sanitisation API anyway\n 'input.multiple' => '(multiple)',\n 'input.min' => '.+',\n 'input.max' => '.+',\n 'input.list' => $enforce_name,\n 'input.formtarget' => $enforce_name,\n 'input.formnovalidate' => '(formnovalidate)',\n 'input.formmethod' => '(get|post)',\n 'input.formenctype' => '(application/x-www-form-urlencoded|multipart/form-data|text/plain)',\n 'input.formaction' => '.+',\n 'input.form' => $enforce_name,\n 'input.autofocus' => '(autofocus)',\n 'input.autocomplete' => '(on|off)',\n 'button.formtarget' => $enforce_name,\n 'button.formnovalidate' => '(formnovalidate)',\n 'button.formmethod' => '(get|post)',\n 'button.formenctype' => '(application/x-www-form-urlencoded|multipart/form-data|text/plain)',\n 'button.formaction' => '.+',\n 'button.form' => $enforce_name,\n 'label.form' => $enforce_name,\n 'link.sizes' => '.+',\n 'video.audio' => '(muted)',\n 'video.autoplay' => '(autoplay)',\n 'video.controls' => '(controls)',\n 'video.height' => $enforce_length,\n 'video.loop' => '(loop)',\n 'video.poster' => '.*',\n 'video.preload' => '(auto|metadata|none)',\n 'video.src' => $enforce_link,\n 'video.width' => $enforce_length,\n 'video.onabort' => $enforce_javascript,\n 'video.oncanplay' => $enforce_javascript,\n 'video.oncanplaythrough' => $enforce_javascript,\n 'video.ondurationchange' => $enforce_javascript,\n 'video.onemptied' => $enforce_javascript,\n 'video.onended' => $enforce_javascript,\n 'video.onerror' => $enforce_javascript,\n 'video.onload' => $enforce_javascript,\n 'video.onloadeddata' => $enforce_javascript,\n 'video.onloadedmetadata' => $enforce_javascript,\n 'video.onloadstart' => $enforce_javascript,\n 'video.onplay' => $enforce_javascript,\n 'video.onplaying' => $enforce_javascript,\n 'video.onprogress' => $enforce_javascript,\n 'video.onratechange' => $enforce_javascript,\n 'video.onseeked' => $enforce_javascript,\n 'video.onseeking' => $enforce_javascript,\n 'video.onstalled' => $enforce_javascript,\n 'video.onsuspend' => $enforce_javascript,\n 'video.ontimeupdate' => $enforce_javascript,\n 'video.onvolumechange' => $enforce_javascript,\n 'video.onwaiting' => $enforce_javascript,\n 'time.datetime' => '.*',\n 'source.media' => '.*',\n 'source.src' => $enforce_link,\n 'source.type' => '.*',\n 'progress.max' => $enforce_number,\n 'progress.value' => $enforce_number,\n 'output.for' => $enforce_id,\n 'output.form' => $enforce_name,\n 'output.name' => $enforce_name,\n 'meter.form' => $enforce_name,\n 'meter.high' => $enforce_number,\n 'meter.low' => $enforce_number,\n 'meter.max' => $enforce_number,\n 'meter.min' => $enforce_number,\n 'meter.optimum' => $enforce_number,\n 'meter.value' => $enforce_number,\n 'keygen.autofocus' => '(autofocus)',\n 'keygen.challenge' => '(challenge)',\n 'keygen.disabled' => '(disabled)',\n 'keygen.keytype' => '(rsa|other)',\n 'keygen.name' => $enforce_name,\n 'command.checked' => '(checked)',\n 'command.disabled' => '(disabled)',\n 'command.icon' => '.+',\n 'command.label' => $enforce_id,\n 'command.radiogroup' => $enforce_name,\n 'command.type' => '(checkbox|command|radio)',\n 'canvas.height' => $enforce_length,\n 'canvas.width' => $enforce_length,\n 'audio.autoplay' => '(autoplay)',\n 'audio.controls' => '(controls)',\n 'audio.loop' => '(loop)',\n 'audio.preload' => '(auto|metadata|none)',\n 'audio.src' => $enforce_link,\n 'audio.onabort' => $enforce_javascript,\n 'audio.oncanplay' => $enforce_javascript,\n 'audio.oncanplaythrough' => $enforce_javascript,\n 'audio.ondurationchange' => $enforce_javascript,\n 'audio.onemptied' => $enforce_javascript,\n 'audio.onended' => $enforce_javascript,\n 'audio.onerror' => $enforce_javascript,\n 'audio.onload' => $enforce_javascript,\n 'audio.onloadeddata' => $enforce_javascript,\n 'audio.onloadedmetadata' => $enforce_javascript,\n 'audio.onloadstart' => $enforce_javascript,\n 'audio.onplay' => $enforce_javascript,\n 'audio.onplaying' => $enforce_javascript,\n 'audio.onprogress' => $enforce_javascript,\n 'audio.onratechange' => $enforce_javascript,\n 'audio.onseeked' => $enforce_javascript,\n 'audio.onseeking' => $enforce_javascript,\n 'audio.onstalled' => $enforce_javascript,\n 'audio.onsuspend' => $enforce_javascript,\n 'audio.ontimeupdate' => $enforce_javascript,\n 'audio.onvolumechange' => $enforce_javascript,\n 'audio.onwaiting' => $enforce_javascript,\n 'track.src' => $enforce_link,\n 'track.lang' => $enforce_lang,\n 'track.label' => '.*',\n 'track.default' => '(default)',\n 'track.kind' => '(subtitles|captions|descriptions|chapters|metadata)',\n 'track.oncuechange' => $enforce_javascript,\n 'meta.charset' => '.+',\n 'meta.property' => '[a-zA-Z].+',\n 'object.form' => $enforce_name,\n 'script.async' => '(async)',\n 'select.required' => '(required)',\n 'select.autofocus' => '(autofocus)',\n 'select.form' => $enforce_name,\n 'style.scoped' => '(scoped)',\n 'textarea.maxlength' => $enforce_inumber,\n 'textarea.rows' => $enforce_inumber,\n 'textarea.required' => '(required)',\n 'textarea.form' => $enforce_name,\n 'textarea.dirname' => $enforce_name,\n 'textarea.placeholder' => '.+',\n 'textarea.autofocus' => '(autofocus)',\n 'textarea.wrap' => '(hard|soft)',\n 'menu.label' => '.*',\n 'menu.type' => '(context|toolbar|list)',\n 'menu.onshow' => $enforce_javascript,\n 'form.autocomplete' => '(on|off)',\n 'form.novalidate' => '(novalidate)',\n 'details.open' => '(open)',\n 'details.ontoggle' => $enforce_javascript,\n 'iframe.srcdoc' => '.+',\n 'iframe.sandbox' => '(allow-forms|allow-same-origin|allow-scripts|allow-top-navigation)',\n 'iframe.seamless' => '(seamless)',\n '*.draggable' => '(true|false|auto)',\n '*.dropzone' => '(copy|move|link)',\n '*.hidden' => '(hidden)',\n '*.spellcheck' => '(true|false)',\n '*.contenteditable' => '(true|false)',\n '*.contextmenu' => $enforce_id,\n '*.itemscope' => '.*',\n '*.itemtype' => '.*',\n '*.itemprop' => '.*',\n );\n\n if (!defined('CSS_AT_RULE_BLOCK')) {\n define('CSS_AT_RULE_BLOCK', -4);\n define('CSS_AT_RULE', -3);\n define('CSS_NO_MANS_LAND', -2);\n define('CSS_EXPECTING_IDENTIFIER', -1);\n define('CSS_IN_COMMENT', 0);\n define('CSS_IN_CLASS', 1);\n define('CSS_EXPECTING_SEP_OR_IDENTIFIER_OR_CLASS', 2);\n define('CSS_IN_IDENTIFIER', 3);\n define('CSS_IN_PSEUDOCLASS_EXPRESSION', 6);\n\n define('_CSS_NO_MANS_LAND', 0);\n define('_CSS_IN_PROPERTY_KEY', 1);\n define('_CSS_IN_PROPERTY_BETWEEN', 2);\n define('_CSS_IN_PROPERTY_VALUE', 3);\n define('_CSS_IN_COMMENT', 4);\n define('_CSS_EXPECTING_END', 5);\n }\n}", "title": "" }, { "docid": "56c0ab6605f38b812391610be964eab0", "score": "0.50050914", "text": "public function isHtml()\n {\n $extensions = ['html'];\n return in_array($this->extension, $extensions);\n }", "title": "" }, { "docid": "95cf8216c021eedc1355e24899683fb9", "score": "0.50021595", "text": "abstract protected function getHtmlFromToken(Token $token);", "title": "" }, { "docid": "40dd2a96578074223fbd6e2cda2426d1", "score": "0.5000482", "text": "function headerIsHtml() {\n $htmlHeaders = array('text/html');\n return matchHeader($htmlHeaders);\n}", "title": "" }, { "docid": "b51373c0378b0e3f8f933477c03f1c9a", "score": "0.499752", "text": "public function testGuessedFilter()\n {\n $test = $this;\n\n Crawler::create()\n ->setInput(file_get_contents($this->fileB))\n ->filter('#hello', function(NodeInterface $node) use ($test) {\n $test->assertEquals('#hello', $node->getKey());\n });\n\n Crawler::create()\n ->setInput(file_get_contents($this->fileA))\n ->filter('@font-face', function(NodeInterface $node) use ($test) {\n $test->assertEquals('@font-face', $node->getKey());\n });\n\n Crawler::create()\n ->setInput(file_get_contents($this->fileB))\n ->filter('@import', function(NodeInterface $node) use ($test) {\n $test->assertEquals('@import', $node->getKey());\n });\n }", "title": "" }, { "docid": "6f2045407aa4bc944d0446ccea4b3146", "score": "0.49953824", "text": "function MyParser($pageurl)\n {\n //global is used to refer global $htmlvariable\n global $html;\n //file_get_contents function is used to get the contents from the webpage\n $html=file_get_contents($pageurl);\n }", "title": "" }, { "docid": "898d0f886bf850e77f9b6e1038f34500", "score": "0.49953094", "text": "public function parse_html($context) {\n\t\t\tif(substr($context['output'], 0, 14) == '<!DOCTYPE html') {\n\t\t\t\t$html = $context['output'];\n\n\t\t\t\t// Split the HTML output into two variables:\n\t\t\t\t// $html_doctype contains the first four lines of the HTML document\n\t\t\t\t// $html_doc contains the rest of the HTML document\n\t\t\t\t$html_array = explode(\"\\n\", $html, 15);\n\t\t\t\t$html_doc = array_pop($html_array);\n\t\t\t\t$html_doctype = implode(\"\\n\", $html_array);\n\n\t\t\t\t// Parse the doctype to convert XHTML syntax to HTML5\n\t\t\t\t$html_doctype = preg_replace(\"/<!DOCTYPE [^>]+>/\", \"<!DOCTYPE html>\", $html_doctype);\n\t\t\t\t$html_doctype = preg_replace('/ xmlns=\\\"http:\\/\\/www.w3.org\\/1999\\/xhtml\\\"| xml:lang=\"[^\\\"]*\\\"/', '', $html_doctype);\n\t\t\t\t$html_doctype = preg_replace('/<meta http-equiv=\\\"Content-Type\\\" content=\\\"text\\/html; charset=(.*[a-z0-9-])\\\" \\/>/i', '<meta charset=\"\\1\" />', $html_doctype);\n\n\t\t\t\t// Concatenate the fragments into a complete HTML5 document\n\t\t\t\t$html = $html_doctype . \"\\n\" . $html_doc;\n\n\t\t\t\t$context['output'] = $html;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4bf163a8d2d62dc3e0ec0104769a587e", "score": "0.49888438", "text": "public function parse()\n\t{\n\t\t$parents = array();\n\n\t\t// chercher les balises HTML du code\n\t\t$tmp = array();\n\t\t$this->searchCode($tmp);\n\t\t\n\t\t// identifier les balises une à une\n\t\t$pre_in = false;\n\t\t$pre_br = array(\n\t\t\t\t\t'name' => 'br',\n\t\t\t\t\t'close' => false,\n\t\t\t\t\t'param' => array(\n\t\t\t\t\t\t'style' => array(),\n\t\t\t\t\t\t'num'\t=> 0\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t$balises_no_closed = array(\n\t\t\t\t\t\t\t\t\t'br', 'hr', 'img', 'col',\n\t\t\t\t\t\t\t\t\t'input', 'link', 'option',\n\t\t\t\t\t\t\t\t\t'circle', 'ellipse', 'path', 'rect', 'line', 'polygon', 'polyline'\n\t\t\t\t\t\t\t);\n\t\t$todos = array();\n\t\tforeach($tmp as $part)\n\t\t{\n\t\t\t// si c'est un code\n\t\t\tif ($part[0]=='code')\n\t\t\t{\n\t\t\t\t$res = $this->analiseCode($part[1]);\n\t\t\t\t\n\t\t\t\t// si le code est bien un code analisable\n\t\t\t\tif ($res)\n\t\t\t\t{\n\t\t\t\t\t$res['html_pos'] = $part[2];\n\t\t\t\t\tif (!in_array($res['name'], $balises_no_closed))\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($res['close'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (count($parents)<1)\n\t\t\t\t\t\t\t\tthrow new HTML2PDF_exception(3, $res['name'], $this->getHtmlErrorCode($res['html_pos']));\n\t\t\t\t\t\t\telse if ($parents[count($parents)-1]!=$res['name'])\n\t\t\t\t\t\t\t\tthrow new HTML2PDF_exception(4, $parents, $this->getHtmlErrorCode($res['html_pos']));\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tunset($parents[count($parents)-1]);\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\tif ($res['autoclose'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$todos[] = $res;\n\t\t\t\t\t\t\t\t$res['params'] = array();\n\t\t\t\t\t\t\t\t$res['close'] = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$parents[count($parents)] = $res['name'];\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (($res['name']=='pre' || $res['name']=='code') && !$res['autoclose'])\n\t\t\t\t\t\t\t\t$pre_in = !$res['close'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$todos[] = $res;\n\t\t\t\t}\n\t\t\t\t// sinon (code non analisable) => on le transforme en texte\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$part[0]='txt';\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sinon si c'est un texte\n\t\t\tif ($part[0]=='txt')\n\t\t\t{\n\t\t\t\t// enregistrer l'action correspondante\n\t\t\t\tif (!$pre_in)\n\t\t\t\t{\n\t\t\t\t\t// remplacer tous les espaces, tabulations, saufs de ligne multiples par de simples espaces\n\t\t\t\t\t$todos[] = array(\n\t\t\t\t\t\t\t\t\t'name'\t=> 'write',\n\t\t\t\t\t\t\t\t\t'close'\t=> false,\n\t\t\t\t\t\t\t\t\t'param' => array('txt' => $this->prepareTxt($part[1])),\n\t\t\t\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$part[1] = str_replace(\"\\r\", '', $part[1]);\n\t\t\t\t\t$part[1] = explode(\"\\n\", $part[1]);\n\t\t\t\t\t\n\t\t\t\t\tforeach($part[1] as $k => $txt)\n\t\t\t\t\t{\n\t\t\t\t\t\t$txt = str_replace(\"\\t\", ' ', $txt);\n\t\t\t\t\t\t$txt = str_replace(' ', '&nbsp;', $txt);\n\t\t\t\t\t\tif ($k>0) $todos[] = $pre_br;\n\n\t\t\t\t\t\t$todos[] = array(\n\t\t\t\t\t\t\t\t\t\t'name'\t=> 'write',\n\t\t\t\t\t\t\t\t\t\t'close'\t=> false,\n\t\t\t\t\t\t\t\t\t\t'param' => array('txt' => $this->prepareTxt($txt, false)),\n\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}\n\n\t\t// pour chaque action identifiée, il faut nettoyer le début et la fin des textes\n\t\t// en fonction des balises qui l'entourent.\n\t\t$balises_clean = array('page', 'page_header', 'page_footer', 'form',\n\t\t\t\t\t\t\t\t'table', 'thead', 'tfoot', 'tr', 'td', 'th', 'br',\n\t\t\t\t\t\t\t\t'div', 'hr', 'p', 'ul', 'ol', 'li',\n\t\t\t\t\t\t\t\t'h1', 'h2', 'h3', 'h4', 'h5', 'h6',\n\t\t\t\t\t\t\t\t'bookmark', 'fieldset', 'legend',\n\t\t\t\t\t\t\t\t'draw', 'circle', 'ellipse', 'path', 'rect', 'line', 'g', 'polygon', 'polyline');\n\t\t$nb = count($todos);\n\t\tfor($k=0; $k<$nb; $k++)\n\t\t{\n\t\t\t//si c'est un texte\n\t\t\tif ($todos[$k]['name']=='write')\n\t\t\t{\n\t\t\t\t// et qu'une balise spécifique le précède => on nettoye les espaces du début du texte\n\t\t\t\tif ($k>0 && in_array($todos[$k-1]['name'], $balises_clean))\n\t\t\t\t\t$todos[$k]['param']['txt'] = ltrim($todos[$k]['param']['txt']);\n\n\t\t\t\t// et qu'une balise spécifique le suit => on nettoye les espaces de la fin du texte\n\t\t\t\tif ($k<$nb-1 && in_array($todos[$k+1]['name'], $balises_clean))\n\t\t\t\t\t$todos[$k]['param']['txt'] = rtrim($todos[$k]['param']['txt']);\n\t\t\t\t\n\t\t\t\tif (!strlen($todos[$k]['param']['txt']))\n\t\t\t\t\tunset($todos[$k]);\n\t\t\t}\n\t\t}\n\t\tif (count($parents)) throw new HTML2PDF_exception(5, $parents);\n\n\t\t// liste des actions sauvée\n\t\t$this->code = array_values($todos);\n\t}", "title": "" }, { "docid": "9c080282e07e67afccb9c1f3f6e22d8d", "score": "0.49854532", "text": "public static function getHtml($str){\n $bb[] = \"#\\[b\\](.*?)\\[/b\\]#si\";\n $html[] = \"<strong>\\\\1</strong>\";\n $bb[] = \"#\\[i\\](.*?)\\[/i\\]#si\";\n $html[] = \"<i>\\\\1</i>\";\n $bb[] = \"#\\[u\\](.*?)\\[/u\\]#si\";\n $html[] = \"<u>\\\\1</u>\";\n $bb[] = \"#\\[s\\](.*?)\\[/s\\]#si\";\n $html[] = \"<span style='text-decoration: line-through;'>\\\\1</span>\";\n $bb[] = \"#\\[quote\\](.*?)\\[/quote\\]#si\";\n $html[] = \"<div class='codeblock'><div class='epboxc' width='80%' align='left'><b><i>Quote</i></b><br><b>&ldquo;</b><i>\\\\1</i><b>&rdquo;</b></div></div>\";\n $bb[] = \"#\\[youtube\\](.*?)\\[/youtube\\]#si\";\n $html[] = '<center><iframe width=\"300\" height=\"169\" src=\"//www.youtube.com/embed/\\\\1\" frameborder=\"0\" allowfullscreen></iframe></center>';\n $bb[] = \"#\\[hr\\]#si\";\n $html[] = \"<hr>\";\n $bb[] = \"#\\[code\\](.*?)\\[/code\\]#si\";\n $html[] = \"<div class='codeblock'><div class='php' width='' align='left'><pre class='prettyprint'><b><i><font size=0.5>Code</font></i></b><pre class='pre-scrollable'><code>\\\\1</code></pre></div></div>\";\n $str = str_replace('https://youtu.be/','',$str);\n $str = preg_replace ($bb, $html, $str);\n $patern = \"#\\[url=([^\\]]*)\\]([^\\[]*)\\[/url\\]#i\";\n $replace = '<a href=\"\\\\1\" target=\"_blank\" rel=\"nofollow\">\\\\2</a>';\n $str = preg_replace($patern, $replace, $str);\n $patern = \"#\\[url\\]([^\\[]*)\\[/url\\]#i\";\n $replace = '<a href=\"\\\\1\" target=\"_blank\" rel=\"nofollow\">\\\\1</a>';\n $str = preg_replace($patern, $replace, $str);\n $patern = \"#\\[img\\]([^\\[]*)\\[/img\\]#i\";\n $replace = '<img src=\"\\\\1\" alt=\"\" class=\"forum_img\"/>';\n $str = preg_replace($patern, $replace, $str);\n $patern = \"#\\[color=([^\\]]*)\\]([^\\[]*)\\[/color\\]#i\";\n $replace = '<span style=\"color:\\\\1;\">\\\\2</span>';\n $str = preg_replace($patern, $replace, $str);\n return $str;\n }", "title": "" }, { "docid": "fc3682a77889881d7888002257fa7181", "score": "0.49846518", "text": "function parse_html( $raw, $filename = '' ) {\n\n\tglobal $html_parsing_errors;\n\n\tif ( ! $raw ) {\n\t\treturn false;\n\t}\n\n\t// HT to:\n\t// - http://php.net/manual/en/domdocument.loadhtml.php\n\t// - http://php.net/manual/en/function.simplexml-import-dom.php\n\t// - http://stackoverflow.com/questions/3577641/how-do-you-parse-and-process-html-xml-in-php\n\t// - http://stackoverflow.com/questions/6635849/can-simplexml-be-used-to-rifle-through-html\n\t// - http://stackoverflow.com/a/2867601/1982136\n\n\t$document = new DOMDocument();\n\tob_start();\n\t$document->loadHTML( $raw ); $html_parse_line = __LINE__;\n\t$local_html_parsing_errors = ob_get_clean();\n\t$xml = simplexml_import_dom( $document );\n\n\t// Clean up HTML parsing errors\n\n\tif ( $local_html_parsing_errors ) {\n\n\t\t$local_html_parsing_errors = explode( '<br />', $local_html_parsing_errors );\n\t\t$local_html_parsing_errors = array_map( 'trim', $local_html_parsing_errors );\n\t\t$local_html_parsing_errors = array_map( 'strip_tags', $local_html_parsing_errors );\n\t\t$local_html_parsing_errors = array_map( function( $item ) use ( $html_parse_line, $filename) {\n\n\t\t\t$cleansed_line = str_replace(\n\t\t\t\tarray (\n\t\t\t\t\t'Warning: ',\n\t\t\t\t\t'DOMDocument::loadHTML(): ',\n\t\t\t\t\t' in Entity',\n\t\t\t\t\t' in ' . __FILE__ . ' on line ' . $html_parse_line,\n\t\t\t\t),\n\t\t\t\t'',\n\t\t\t\t$item\n\t\t\t);\n\n\t\t\tif ( $cleansed_line && $filename ) {\n\t\t\t\t$cleansed_line .= ' (' . basename( $filename ) . ')';\n\t\t\t}\n\n\t\t\treturn $cleansed_line;\n\n\t\t} , $local_html_parsing_errors );\n\n\t\t$local_html_parsing_errors = array_filter( $local_html_parsing_errors ); // Remove any blank lines\n\t\t$html_parsing_errors = array_merge( $html_parsing_errors, $local_html_parsing_errors );\n\n\t}\n\n\treturn $xml;\n\n}", "title": "" }, { "docid": "a454055d576f6ce70f1141cc33702567", "score": "0.49845433", "text": "public function testHtmlMediaDoesNotStripEmptyIFrames() {\n\n $input = '<iframe></iframe>';\n $expected = '<p><iframe></iframe></p>';\n\n $scrubed = Scrub::htmlMedia($input);\n\n $this->assertEquals($scrubed, $expected);\n }", "title": "" }, { "docid": "4a7ab979f9b5e02705eaefc477c9029e", "score": "0.4982926", "text": "public function testUntouched()\n {\n // anything other that what it is told to.\n\n $untouchedTests = [\n 'a', 'a',\n 'a<p></p>b<p></p>c',\n '',\n '<body!><p><!-- bad html here!--></p></a>',\n '<img src=\"3.jpg.tiff\">',\n //'<img src=\"http://example.com/4.jpeg\" alt=\"\">',\n '<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\" dir=\"ltr\" lang=\"en-US\"><head profile=\"http://gmpg.org/xfn/11\"><meta charset=\"utf-8\" /></head><body></body></html>',\n '<H1>hi</H1>',\n 'blah<BR>blah<br>blah',\n \"<pre>hello\\nline</pre>\",\n \"① <p>并來朝貢</p>\"\n ];\n\n foreach ($untouchedTests as $html) {\n $this->assertEquals($html, PictureTags::replace($html));\n }\n }", "title": "" }, { "docid": "d54fbfb3e31bf067241ac7e8c69ce904", "score": "0.49770504", "text": "function _check_attributes($tag, $attributes, $self_close, $close)\n{\n global $PSPELL_LINK, $THE_LANGUAGE, $XML_CONSTRAIN, $TAGS_DEPRECATE_ALLOW, $THE_DOCTYPE, $HYPERLINK_URLS, $CRAWLED_URLS, $EMBED_URLS, $TAGS_INLINE, $TAGS_BLOCK, $TAGS_NORMAL, $TAGS_INLINE_DEPRECATED, $TAGS_BLOCK_DEPRECATED, $TAGS_NORMAL_DEPRECATED, $TAG_ATTRIBUTES, $IDS_SO_FAR, $ANCESTOR_BLOCK, $ANCESTOR_INLINE, $EXPECTING_TAG, $OUT, $POS, $LAST_A_TAG, $TAG_ATTRIBUTES_REQUIRED;\n\n $errors = array();\n\n $stub = $tag . '.';\n foreach ($attributes as $attribute => $value) {\n $lattribute = strtolower($attribute);\n if ($lattribute != $attribute) {\n if ($XML_CONSTRAIN) {\n $errors[] = array('XHTML_CASE_ATTRIBUTE', $tag, $attribute);\n }\n $attribute = $lattribute;\n }\n\n if (($attribute == 'lang') || ($attribute == 'xml:lang')) {\n $THE_LANGUAGE = $value;\n }\n\n if (($GLOBALS['WEBSTANDARDS_MANUAL']) && (($value == 'TODO') || (strpos($value, 'Lorem ') !== false))) {\n $errors[] = array('XHTML_PLACEHOLDER');\n }\n\n if ((!isset($TAG_ATTRIBUTES[$stub . $attribute])) && (!isset($TAG_ATTRIBUTES['*.' . $attribute])) && (!isset($TAG_ATTRIBUTES_REQUIRED[$stub . $attribute]))) {\n if ((!isset($TAGS_BLOCK[$tag])) && (!isset($TAGS_INLINE[$tag])) && (!isset($TAGS_NORMAL[$tag]))) {\n continue;\n }\n if ((!isset($TAGS_BLOCK_DEPRECATED[$tag])) && (!isset($TAGS_INLINE_DEPRECATED[$tag])) && (!isset($TAGS_NORMAL_DEPRECATED[$tag]))) {\n continue;\n }\n if (strpos($attribute, ':') !== false) {\n continue;\n }\n if (substr($attribute, 0, 5) == 'data-') {\n continue;\n }\n\n //if ($tag == 'embed') continue; // Hack, to allow rich media to work in multiple browsers. Not needed now that <object> tag is quite stable.\n $errors[] = array('XHTML_UNKNOWN_ATTRIBUTE', $tag, $attribute);\n continue;\n } else {\n if (isset($TAG_ATTRIBUTES_REQUIRED[$stub . $attribute])) {\n $errors[] = array($TAGS_DEPRECATE_ALLOW ? 'XHTML_DEPRECATED_ATTRIBUTE' : 'XHTML_UNKNOWN_ATTRIBUTE', $tag, $attribute);\n }\n\n if (($attribute == 'target') && (($THE_DOCTYPE == DOCTYPE_XHTML_STRICT) || ($THE_DOCTYPE == DOCTYPE_XHTML_11))) {\n $errors[] = array('XHTML_UNKNOWN_ATTRIBUTE', $tag, $attribute);\n }\n }\n\n if ((($attribute == 'alt') || ($attribute == 'title') || (($attribute == 'content') && (array_key_exists('http-equiv', $attributes)) && ((strtolower($attributes['http-equiv']) == 'description') || (strtolower($attributes['http-equiv']) == 'keywords'))) || ($attribute == 'summary')) && (function_exists('pspell_new')) && (isset($GLOBALS['SPELLING'])) && ($value != '')) {\n $_value = @html_entity_decode($value, ENT_QUOTES, get_charset());\n $errors = array_merge($errors, check_spelling($_value));\n }\n\n //if (($attribute == 'alt') && ($tag != 'input') && (strlen(strip_tags($value)) > 150)) $errors[] = array('WCAG_ATTRIBUTE_TOO_LONG', $attribute);\n\n if (($attribute == 'href') || ($attribute == 'src') || (($attribute == 'data') && ($tag == 'object'))) {\n $CRAWLED_URLS[] = @html_entity_decode($value, ENT_QUOTES, get_charset());\n if ($tag == 'a') {\n $HYPERLINK_URLS[] = @html_entity_decode($value, ENT_QUOTES, get_charset());\n }\n }\n if ((($attribute == 'src') && ($tag == 'embed')) || (($attribute == 'src') && ($tag == 'script')) || (($attribute == 'src') && ($tag == 'iframe')) || (($attribute == 'src') && ($tag == 'img')) || (($attribute == 'href') && ($tag == 'link') && (isset($attributes['rel'])) && ($attributes['rel'] == 'stylesheet')) || (($attribute == 'data') && ($tag == 'object')) || (($attribute == 'code') && ($tag == 'applet'))) {\n $EMBED_URLS[] = @html_entity_decode($value, ENT_QUOTES, get_charset());\n }\n\n if (($attribute == 'href') && (@strtolower(@$value[0]) == 'j') && (strtolower(substr($value, 0, 11)) == 'javascript:')) {\n $errors[] = array('XHTML_BAD_ATTRIBUTE_VALUE', $attribute, $value, 'no js href');\n }\n\n if (isset($TAG_ATTRIBUTES[$stub . $attribute])) {\n $reg_exp = $TAG_ATTRIBUTES[$stub . $attribute];\n } else {\n $reg_exp = $TAG_ATTRIBUTES['*.' . $attribute];\n }\n\n if (($reg_exp != '(.|\\n)*') && (preg_match('#^' . $reg_exp . '$#s', $value) == 0) && ($value != 'x')) {\n $errors[] = array('XHTML_BAD_ATTRIBUTE_VALUE', $attribute, $value, $reg_exp);\n }\n\n if (($attribute == 'style') && ($GLOBALS['WEBSTANDARDS_CSS'])) { // Validate CSS\n if ((!function_exists('do_template')) && (strpos($value, '{') === false) && (strpos($value, 'float:') === false) && (strpos($value, ': none') === false) && (strpos($value, ': inline') === false) && (strpos($value, ': block') === false)) {\n $errors[] = array('CSS_INLINE_STYLES');\n }\n\n $css_conformance = _webstandards_css_class($value, 0);\n if (is_array($css_conformance)) {\n $errors = array_merge($errors, $css_conformance); // Some kind of error\n }\n }\n\n if ($attribute == 'id') { // Check we don't have duplicate IDs\n if (isset($IDS_SO_FAR[strtolower($value)])) { // strtolower is for IE - in reality, IDs are not meant to be case insensitive\n $errors[] = array('XHTML_DUPLICATED_ID', $value);\n }\n $IDS_SO_FAR[strtolower($value)] = 1;\n }\n }\n\n return ($errors == array()) ? null : $errors;\n}", "title": "" }, { "docid": "63ba361140c797e30cafa738aa039f23", "score": "0.4974177", "text": "public function testHtmlMediaAllowsYouttubeViaHtml5() {\n\n $input = '<iframe title=\"YouTube video player\" width=\"480\" height=\"390\" src=\"https://www.youtube.com/embed/RVtEQxH7PWA\" frameborder=\"0\" allowfullscreen></iframe>';\n $expected = '<p><iframe title=\"YouTube video player\" width=\"480\" height=\"390\" src=\"https://www.youtube.com/embed/RVtEQxH7PWA\" frameborder=\"0\"></iframe></p>';\n\n $scrubed = Scrub::htmlMedia($input);\n\n $this->assertEquals($scrubed, $expected);\n }", "title": "" }, { "docid": "c384517105b349c83bafe3b67f9263d9", "score": "0.49736527", "text": "public function test_bug_97()\n\t{\n\t\t$doc = <<<HTML\n<div><p>PHP Simple HTML DOM Parser</p><p>A PHP based DOM parser</p></div>\nHTML;\n\n\t\t$text = $this->html->load($doc)->find('div', 0)->plaintext;\n\n\t\t$this->assertEquals(\n\t\t\t\"PHP Simple HTML DOM Parser\\n\\nA PHP based DOM parser\",\n\t\t\t$text\n\t\t);\n\t}", "title": "" }, { "docid": "76d18ae7ae190b05c97fc6c55b34fcef", "score": "0.49549422", "text": "public function testhtmlForNodes()\n {\n $html = '<html><head><component><script src=\"url1\"/><script src=\"url2\"/></component></head><body><div><component><ul><li><a href=\"#\">Link 1</a></li><li><a href=\"#\">Link 2</a></li></ul></component></div>';\n\n $dom = new HtmlDomParser();\n $dom->loadHtml($html);\n\n $expectedOutput = '<html>\n<head><component><script src=\"url1\"></script><script src=\"url2\"></script></component></head>\n<body><div><component><ul>\n<li><a href=\"#\">Link 1</a></li>\n<li><a href=\"#\">Link 2</a></li>\n</ul></component></div></body>\n</html>';\n static::assertSame($expectedOutput, $dom->html());\n\n $expectedOutput = '<body><div><component><ul>\n<li><a href=\"#\">Link 1</a></li>\n<li><a href=\"#\">Link 2</a></li>\n</ul></component></div></body>';\n static::assertSame($expectedOutput, $dom->findOne('div')->parentNode()->html());\n\n $expectedOutput = '<html>\n<head><component><script src=\"url1\"></script><script src=\"url2\"></script></component></head>\n<body><div><component><ul>\n<li><a href=\"#\">Link 1</a></li>\n<li><a href=\"#\">Link 2</a></li>\n</ul></component></div></body>\n</html>';\n static::assertSame($expectedOutput, $dom->findOne('div')->parentNode()->parentNode()->html());\n\n $div = $dom->findOne('div');\n $a = $div->findOne('a');\n static::assertSame('Link 1', $a->innertext);\n\n $expectedOutput = '<script src=\"url1\"></script>';\n static::assertSame($expectedOutput, $dom->findOne('script')->html);\n\n $expectedOutput = '<component><script src=\"url1\"></script><script src=\"url2\"></script></component>';\n static::assertSame($expectedOutput, $dom->findOne('script')->parentNode()->html());\n\n $expectedOutput = '<head><component><script src=\"url1\"></script><script src=\"url2\"></script></component></head>';\n static::assertSame($expectedOutput, $dom->findOne('script')->parentNode()->parentNode()->html);\n\n $expectedOutput = '<html>\n<head><component><script src=\"url1\"></script><script src=\"url2\"></script></component></head>\n<body><div><component><ul>\n<li><a href=\"#\">Link 1</a></li>\n<li><a href=\"#\">Link 2</a></li>\n</ul></component></div></body>\n</html>';\n static::assertSame($expectedOutput, $dom->findOne('script')->parentNode()->parentNode()->parentNode()->html);\n }", "title": "" }, { "docid": "cdc3afdf1b0730cdc3a517d908bcb327", "score": "0.495144", "text": "public function testPOSTNETGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'POSTNET', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===43);\n }", "title": "" }, { "docid": "c1973deb279e24cd743f37f866bf26e7", "score": "0.4949385", "text": "public function testPLANETGetBarcodeHTMLRaw()\n {\n $d1 = new barCode();\n $d1->savePath = '/tmp/';\n\n $bcHTMLRaw = $d1->getBarcodeHTML(self::C_BC_DEFAULT, 'PLANET', self::C_BC_1D_WIDTH, self::C_BC_1D_HEIGHT);\n $bcCheckArray = explode('background-color:black', $bcHTMLRaw);\n\n $this->assertTrue(count($bcCheckArray)===43);\n }", "title": "" } ]
93330a9537be3c87f1430c67c2065da2
/ function to add new notum
[ { "docid": "3d327405d543ed221b31de3732b3446d", "score": "0.6612892", "text": "function add_notum($params)\n {\n $this->db->insert('nota',$params);\n return $this->db->insert_id();\n }", "title": "" } ]
[ { "docid": "c13ed336342cfa891a88b9780503dabe", "score": "0.66487896", "text": "function addPOSEntry()\n{\n\n}", "title": "" }, { "docid": "092cfe882123fb2444d1bc1d3710f007", "score": "0.6406699", "text": "private function addNew() {\n\t\t$data = array(\n\t\t\t'name' => $this->name,\n\t\t\t'parent' => $this->parent,\n\t\t\t'type' => $this->type,\n\t\t\t'spawning' => $this->spawning,\n\t\t\t'description' => $this->description\n\t\t\t);\n\t\t$result = $this->table->insertRecord($data);\n\t\tif ($result) {\n\t\t\t$this->uid = $result;\n\t\t\treturn $this->uid;\n\t\t}\n\t\treturn false;//uid remains 0, signaling insert failed\n\t}", "title": "" }, { "docid": "f5d4bb84cc2d65e693fc77dea8922532", "score": "0.6283792", "text": "public function add() {\n\n\t}", "title": "" }, { "docid": "6ff6830d259df32ca1a49bc8935ac782", "score": "0.61930233", "text": "public function add()\n\t{\n\n\t}", "title": "" }, { "docid": "6ff6830d259df32ca1a49bc8935ac782", "score": "0.61930233", "text": "public function add()\n\t{\n\n\t}", "title": "" }, { "docid": "5155aa77740cbabdc890b39a057dc8de", "score": "0.6177588", "text": "public function addItem();", "title": "" }, { "docid": "15f1ba47bdb270f3706044e78eabb73b", "score": "0.6168212", "text": "function add($item);", "title": "" }, { "docid": "9a21a7e4f1224efae5f69af7cae8bf10", "score": "0.60568845", "text": "function add() {\n }", "title": "" }, { "docid": "066246f9b05787fa3eec761f80991a25", "score": "0.60524505", "text": "public function noteAdd(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n } \n $this->Notes->add($user);\n }", "title": "" }, { "docid": "1c176b173f2bd65c37df54f49279dbf8", "score": "0.6035653", "text": "public function add()\n {\n //\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.60132045", "text": "public function add()\n {\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.60132045", "text": "public function add()\n {\n }", "title": "" }, { "docid": "fcfdf34790a3969befc7edefb0999dc1", "score": "0.60132045", "text": "public function add()\n {\n }", "title": "" }, { "docid": "20b1584a031e0aefabaf4f3a6ef40c48", "score": "0.5920167", "text": "function add_item($num, $code) {\n $CI = & get_instance();//get superglobal\n if ($CI->orderitems->exists($num, $code)) {\n //if they already have ordered one of those items\n $order = $CI->orderitems->get($num, $code);\n $order->quantity++;//increase the quantitiy\n \n $CI->orderitems->update($order);\n } else {\n $order = $CI->orderitems->create();\n //otherwise create the item in the orderitems \n $order->order = $num;\n $order->item = $code;\n $order->quantity = 1;//set quantity to 1 because its the first one\n //to be selected of its kind\n \n $CI->orderitems->add($order);\n }\n }", "title": "" }, { "docid": "35e4d949483c7dacdb614d8967b25f71", "score": "0.590004", "text": "public function addNote($note)\n {\n }", "title": "" }, { "docid": "371f60039bfce16180e671a2e0ac199c", "score": "0.58216405", "text": "function taskNewI() {\r\n\t\t\t$this->obj_tasks->addNewItem();\r\n\t\t}", "title": "" }, { "docid": "ac4151e2e7144dff1df0b877b3309f19", "score": "0.58177286", "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": "ecde0b504d30e1435b2bb138e27a0f52", "score": "0.5771605", "text": "public function add($name);", "title": "" }, { "docid": "21347346da0f48fe20b9af382308425d", "score": "0.5768053", "text": "public function add_itens_nota($id_nota) {\n\t\t$controle = $this->notas_model->add_item($id_nota);\n\t\tif ($controle === FALSE) {\n\t\t# Bloco de auditoria\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Tentativa de incluir novo item na nota fiscal ID n° $id_nota\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-danger', 'msg' => 'Erro ao adicionar o item a nota, por favor, verifique se o preenchimento do formulário está correto!'));\n\t\t}\n\t\telse {\n\t\t\t# Bloco de auditoria\n\t\t\t$info_nota = $this->notas_model->dados_notas($id_nota);\n\t\t\t$auditoria = array(\n\t\t\t\t\t'auditoria' => \"Incluiu novo item($controle->modelo) na nota fiscal de n° $info_nota->numero, expedida pela $info_nota->empresa\",\n\t\t\t\t\t'idmilitar' => $this->session->userdata['id_militar'], #Checar quem está acessando e permissões\n\t\t\t\t\t'idmodulo' => $this->session->userdata['sistema']\n\t\t\t);\n\t\t\t$this->clog_model->audita($auditoria, 'inserir');\n\t\t\t# .Bloco de auditoria\n\t\t\t$this->session->set_flashdata('mensagem', array('type' => 'alert-success', 'msg' => 'Item adicionado com sucesso!'));\n\t\t}\n\t\tredirect(\"clog/notas/itens_nota/$id_nota\");\n\t}", "title": "" }, { "docid": "08594f94cc5bb7356e7499fefa70d3a6", "score": "0.57522315", "text": "public function create() //添加\n {\n\t\t//\n }", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.5742506", "text": "public function add($item);", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.5742506", "text": "public function add($item);", "title": "" }, { "docid": "10ad1df161582be8c9102ab877451f01", "score": "0.5742506", "text": "public function add($item);", "title": "" }, { "docid": "22f35e1b90b9feb7e0119c5c538bca64", "score": "0.5697925", "text": "public function add()\n\t{\n\t\t$fake_id = fake_id_get($this->_get_mod());\n\t\t\n\t\t$form = array();\n\t\t\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t\n\t\t$form['submit'] = function($params) use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_input();\n\t\t\t\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data, $id);\n\t\t\t\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\t\t\t\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn $this->_url();\n\t\t};\n\t\t\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\t\t\t\n\t\t\t$this->_display('form');\n\t\t};\n\t\t\n\t\t$this->_form($form);\n\t}", "title": "" }, { "docid": "f321d58a354bd1dc560e9f0fe92bbd23", "score": "0.567963", "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": "446bd7b1f642f3098888753a59217880", "score": "0.56782454", "text": "public function createNewItem();", "title": "" }, { "docid": "6d9fa18c0588ea871849f5e6e48cfa5d", "score": "0.5654435", "text": "public function add()\n\t{\n\t\t$fake_id = $this->_get_id_cur();\n\t\t$form = array();\n\t\t$form['view'] = 'form';\n\t\t$form['validation']['params'] = $this->_get_params();\n\t\t$form['submit'] = function()use ($fake_id)\n\t\t{\n\t\t\t$data = $this->_get_inputs();\n\t\t\t$data['sort_order'] = $this->_model()->get_total() + 1;\n\t\t\t$id = 0;\n\t\t\t$this->_model()->create($data,$id);\n\t\t\t// Cap nhat lai table_id table file\n\t\t\tmodel('file')->update_table_id_of_mod($this->_get_mod(), $fake_id, $id);\n\t\t\tfake_id_del($this->_get_mod());\n\n\t\t\tset_message(lang('notice_add_success'));\n\t\t\t\n\t\t\treturn admin_url($this->_get_mod());\n\t\t};\n\t\t$form['form'] = function() use ($fake_id)\n\t\t{\n\t\t\t$this->_create_view_data($fake_id);\n\n\t\t\t$this->_display('form');\n\t\t};\n\t\t$this->_form($form);\n\t}", "title": "" }, { "docid": "2429fb2dc59545cff5a3d702efdea6f0", "score": "0.5619117", "text": "public function add_information() \r\n {}", "title": "" }, { "docid": "2429fb2dc59545cff5a3d702efdea6f0", "score": "0.5619117", "text": "public function add_information() \r\n {}", "title": "" }, { "docid": "2429fb2dc59545cff5a3d702efdea6f0", "score": "0.5619117", "text": "public function add_information() \r\n {}", "title": "" }, { "docid": "352c084c9411ef92bc4cbde23397492c", "score": "0.5614535", "text": "function dialogue_add_instance($dialogue) {\n global $DB;\n\n $dialogue->timemodified = time();\n\n return $DB->insert_record('dialogue', $dialogue);\n}", "title": "" }, { "docid": "734e6e1c18b0425db5c8046a1b494e97", "score": "0.56082326", "text": "function add_new_node($remote, $local)\n{\n\t$pin=trim(file_get_contents(\"../.mypauth\"));\n\t$ch = curl_init($remote.\"/myp/index.php?process=beanode&pin=\".$pin.\"&remote=\".$local);\n\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\t$newnode=trim($result);\n\t\n\tif($newnode!=\"\")\n\t{\n\t\t$conf=json_decode(file_get_contents(\"../.mypconfig\"));\t \n\t\tforeach($conf as $c)\n\t\t{\n\t\t\t$nodes[]=$c;\n\t\t}\n\t\t$nodes[]=$newnode;\n\t\t\t\t\n\t\tfile_put_contents(\"../.mypconfig\", json_encode($nodes));\n\t\t\n\t\t//requesting other nodes to add this new node\n\t\tforeach($nodes as $node)\n\t\t{\n\t\t\tif(($node!=$local) && ($node!=$newnode)) new_node_add_req($node, $newnode);\n\t\t}\t\t\n\t}\n}", "title": "" }, { "docid": "eb204983c2a5c0748dd4b72f39373fa3", "score": "0.5601611", "text": "public function afterAdd();", "title": "" }, { "docid": "a734407757ec0ecf8b031816a5a83d96", "score": "0.55882066", "text": "public function addnew() {\n $sticky = new Sticky;\n $sticky->sitck_data = '';\n $sticky->user_id = Auth::user()->id;\n $sticky->save();\n $stickid = $sticky->id;\n return View::make('sticky.add')\n ->with('stickid', $stickid);\n }", "title": "" }, { "docid": "ff21b030eaa6e685a37f82f579b31f87", "score": "0.55691826", "text": "public function addNewOption()\n {\n $id =(string) 1 + max( array_keys( $this->options ) );\n $this->options[$id] = array(\n 'id' => $id,\n 'name' => '',\n 'identifier' => '',\n 'priority' => ''\n );\n }", "title": "" }, { "docid": "7240f285656bbabd9a9f49191dec5dce", "score": "0.5564895", "text": "public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}", "title": "" }, { "docid": "a9a8da252ef4922d9d4bf0d1954e6ae2", "score": "0.55542135", "text": "public function addAction(){\n\t\t$this->assign('newstype', $this->newstype);\n\t}", "title": "" }, { "docid": "0293a283b0bb48a1a0ab24559eb64dc4", "score": "0.5554059", "text": "public function addNotification() {\n $insert = array(\n 'notification_to' => $this->input->get('notification_to'),\n 'notification_description' =>$this->input->get('notification_description'),\n 'notification_date' => $this->input->get('notification_date')\n );\n $this->model_db->create('manager_notifications', $insert);\n redirect('notifications', 'refresh'); \n }", "title": "" }, { "docid": "f1245af470517fc2e84ae20ed1031c6a", "score": "0.5542086", "text": "function add()\r\n {\r\n $program = $this->Programs->create();\r\n $this->present($program);\r\n }", "title": "" }, { "docid": "d7e0732601a1108df2bc006e8f8f67a8", "score": "0.55188775", "text": "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "title": "" }, { "docid": "db348f1cc971a11602670a19eba0f219", "score": "0.55113184", "text": "function _add()\n\t{\n\t\t$this->_ci->_data['widgettext'] = 'Add New Label';\n\t\t$this->_ci->_data['helpertext'] = 'To add a new label fill out the field below and click \"save\"';\n\t\t$this->_ci->_data['type'] = 'add';\n\t\t\n\t\t$this->_add_edit_shared_func();\t\n\t}", "title": "" }, { "docid": "900ada6018380f48d866741a4f8e8b78", "score": "0.5505971", "text": "function sendAddNew($usrid,$AddNewSubject,$AddNewInfo){\r\n\tif(getAddNewNotification($usrid)==1){\r\n\t\t//send addnew Info\r\n\t}\r\n}", "title": "" }, { "docid": "3047167c4eb9c320a6af7db5fffcf0b5", "score": "0.5481055", "text": "public function addNew()\n {\n $this->data = [];\n $this->showEditModal = false;\n $this->dispatchBrowserEvent('show-form');\n }", "title": "" }, { "docid": "6e0289c503ce64cb50d5d5b6029de2d4", "score": "0.5478798", "text": "public function add($document) {}", "title": "" }, { "docid": "884f4efd3efed45628a40009a3b5a2da", "score": "0.5466049", "text": "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;\n\t\t}\n\t}", "title": "" }, { "docid": "55969af12f33063f16c737391af53666", "score": "0.54603416", "text": "function appendTerminalStation($new,$old,$linename,$dist,$price=array(0,0,0)){\n\n //check if old terminal exists\n $oldterminal = getStationDB($old,$linename);\n\n\n //check if old terminal is terminal\n if (! getisTerminalUtility($oldterminal)) return \"station to replace is not terminal\";\n\n //check if new station doesn't exists\n if (getStationDB($new,$linename)) return \"station already exists\";\n\n //create new terminal\n $pos = getisTerminalUtility($oldterminal);\n $dist = $oldterminal->getDist() + ($pos * $dist);\n $newterminal = New Station($new,$linename,$dist,$price);\n\n //insert new terminal\n insertStationDB($newterminal);\n\n return false;\n\n}", "title": "" }, { "docid": "72c290d409fb11135381b344cdf2bf96", "score": "0.5457711", "text": "public function addItem($item);", "title": "" }, { "docid": "74fa93fdc14854982a1626afd5dc3f16", "score": "0.5457427", "text": "function tadd($name,$type){\n data_model::add(get_class($this),$name,$type);\n }", "title": "" }, { "docid": "5441f499b00d1d3f1c8d78daa70cd549", "score": "0.5457334", "text": "public function addnewnotification($data){\n\t$catId = (isset($data)) ? $data : 0;\n $lastInserted_id = $this->insertInToTable(MAIL_NOTIFY_TYPES,array(array('notification_name'=>$this->getData['newnotification'], 'notification_staus'=>'1','admin_display'=>'1', 'templatecategory_id'=>$catId)));\n\treturn $lastInserted_id;\n }", "title": "" }, { "docid": "1abf8255fcc3a90c61c88a1283410573", "score": "0.5453597", "text": "public function Add()\n\t{\n\t\t$this->_processInsert();\n\t}", "title": "" }, { "docid": "1abf8255fcc3a90c61c88a1283410573", "score": "0.5453597", "text": "public function Add()\n\t{\n\t\t$this->_processInsert();\n\t}", "title": "" }, { "docid": "c47b48a42649618083c785f2216183d2", "score": "0.54483443", "text": "function add()\n\t{\n\t\t$data[\"title\"] = _e(\"Permission Modify\");\t\n\t\t$CFG = $this->config->item('permission_modify_configure');\n\t\t## for check admin or not\t##\t\n\t\t$data[\"response\"] = addPermissionMsg( $CFG[\"sector\"][\"add\"] );\n\t\t\t\t\t\n\t\t## Other auxilary variable ##\n\t\t$data['var'] = array();\t\t\t\t\n\t\t$data[\"top\"] = $this->template->admin_view(\"top\", $data, true, \"permission_modify\");\t\n\t\t$data[\"content\"] = $this->template->admin_view(\"permission_modify_add\", $data, true, \"permission_modify\");\n\t\t$this->template->build_admin_output($data);\n\t}", "title": "" }, { "docid": "f8ad299a1a4fa4c291da4a8a42f7d16f", "score": "0.54327285", "text": "public function add_information()\r\n {\r\n }", "title": "" }, { "docid": "b13bb393451506e651535e12152fc335", "score": "0.5432645", "text": "public function addNote($note)\n {\n $notes = trim($this->getNodeText('/p:package/p:notes'));\n if ($notes != '*') {\n $new_notes = \"\\n* \" . $note . \"\\n\" . $notes . \"\\n \";\n } else {\n $new_notes = \"\\n* \" . $note . \"\\n \";\n }\n $this->replaceTextNode('/p:package/p:notes', $new_notes);\n\n $release = $this->_fetchCurrentRelease();\n if ($release !== null) {\n $this->replaceTextNodeRelativeTo(\n './p:notes', $release, $new_notes . ' '\n );\n }\n }", "title": "" }, { "docid": "70cd042f5eefdc1639ae86fd47c63439", "score": "0.54324406", "text": "function add() {\n\n\t\t// assign values from $_POST to class variables\n\t\t$this -> personal_id = $this -> input -> post('personal_id', TRUE);\n\n\t\t$this -> movable_number = $this -> input -> post('movable_number', TRUE);\n\n\t\t$this -> series_number = $this -> input -> post('series_number', TRUE);\n\n\t\t$this -> unit = $this -> input -> post('unit', TRUE);\n\n\t\t$this -> comment = $this -> input -> post('comment', TRUE);\n\t\t//tr_date_add\n\n\t\t$this -> give_date = tr_date_add($this -> input -> post('give_date', TRUE));\n\n\t\t$this -> take_date = tr_date_add($this -> input -> post('take_date', TRUE));\n\n\t\t$ok = $this -> db -> insert('movable', $this);\n\n\t\tif ($ok) {\n\n\t\t\t$this -> res = $this -> db -> insert_id();\n\t\t\t//$data['lastid'] = $this->db->insert_id() ;\n\n\t\t}\n\n\t\treturn $this -> res;\n\n\t}", "title": "" }, { "docid": "e3d44909bca658805f7d01416d7224bd", "score": "0.5432379", "text": "function add_notif($usr, $type, $message){\r\n mysql_query(sprintf(\"INSERT INTO notif (type, text, user) VALUES ('%s','%s', '%s')\",mysql_escape_string($type), mysql_escape_string($message), mysql_escape_string($usr)));\r\n }", "title": "" }, { "docid": "5be886f2cbc6ff5ceff6357a71f13b0d", "score": "0.54303354", "text": "public function insert($notificacao);", "title": "" }, { "docid": "c40a03ef7ea4ad6cf7b4d07442a321b3", "score": "0.5424203", "text": "function add_item($name,$bribable,$healthy,$picture_url,$owner,$max_per_player,$replicateable,$description)\n{\n\t$GLOBALS['SITE_DB']->query_insert('w_itemdef',array(\n\t\t'name'=>$name,\n\t\t'bribable'=>$bribable,\n\t\t'healthy'=>$healthy,\n\t\t'picture_url'=>$picture_url,\n\t\t'owner'=>$owner,\n\t\t'replicateable'=>$replicateable,\n\t\t'max_per_player'=>$max_per_player,\n\t\t'description'=>$description,\n\t));\n}", "title": "" }, { "docid": "d43dc0dd120c2d6ba0355c5557b22f97", "score": "0.541908", "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": "23525eb7c0ffa2123e55811daa1bb375", "score": "0.54115814", "text": "public function add(Artikel $produkt){\n\t\t$this->einkaufsWagen[]=$produkt;\n\t}", "title": "" }, { "docid": "1fbe883a7118283c1cf0339253512de0", "score": "0.5408608", "text": "public function add($entity);", "title": "" }, { "docid": "5a8db35e3fef6cfe0a7c00aa59bff009", "score": "0.5363244", "text": "function add($name, $time);", "title": "" }, { "docid": "28023b4e3c4895beb7cb0790e2f93f37", "score": "0.53629607", "text": "function add_new_presentation_type($presentationType, $err_message = \"\")\n{\n\t$db = adodb_connect( &$err_message );\n\t\n\t$sql = \"INSERT INTO \" . $GLOBALS[\"DB_PREFIX\"] . \"PresentationType \";\n\t$sql .= \"SET PresentationTypeName=\".db_quote($db,$presentationType -> PresentationTypeName);\n\t$sql .= \", SlotLength=\".$presentationType -> SlotLength;\n\t$result = $db -> Execute($sql);\n\t\n\tif (!$result)\n\t{\n\t\t$err_message .= \"Failed to insert new presentation type into database.\";\n\t}\n\treturn $db -> Insert_ID();\n}", "title": "" }, { "docid": "1c0a092f94c0f154ed5a42fff213da20", "score": "0.5357547", "text": "public function api_add()\n\t{ \n\n\t\t$this->_checkVars(array('type', 'id_object','reason'));\n \n\n\t\t//$this->logged = $this->Member->findByBig( $this->Auth->user('big') );//don't understand why it's not already filled\n\t\t$memBig = $this->logged['Member']['big'];\n $type = $this->api['type'];\n\t\t$reason = $this->api['reason'];\n $idObj= $this->api['id_object'];\n\t\t \n \t\n // Check if reason matches predefined ones\n\t\tif (array_key_exists($reason, Defines::$flag_types))\n\t\t{\n\t\t\t$text = Defines::$flag_types[$reason];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_apiEr(__('Reason errato'));\n\t\t}\n\n\t\t// Check if type of signalation is valid\n\t\tif (!array_key_exists($type, Defines::$signalations))\n\t\t{//TODO in bootstrap aggiungere anche Comment in signalations\n\t\t\t\n $this->_apiEr(__('Tipo di segnalazione errata'));\n\t\t}\n \n //Search member_big of bad member\n $BadMemBig=$this->Signalation->findBadMemBig($type,$idObj);\n if ($BadMemBig==null OR $BadMemBig=='')\n {\n $this->_apiEr(__('Identificatore autore mancante'));\n }\n \n \n\t\t// Can be this signalation added?\n\t\t$canSignal = $this->Signalation->canSignal($memBig, $BadMemBig, $type, $idObj);\n\t\tif (!$canSignal)\n\t\t{\n\t\t$this->_apiEr(__('Segnalazione non possibile. Una segnalazione con questi parametri Ŕ giÓ attiva o effettuata recentemente.'));\n\t\t}\n \n \n\t\t// If signalation is made of type CHAT , add member to ignore list.\n\t\tif ($type == 1)\n\t\t{\n\t\t\t// Check if member exists? Not needed, the method has a try catch block so there won't be any dirty messages errored out\n\t\t\t$isOnList = $this->MemberSetting->isOnIgnoreListDual($memBig, $BadMemBig);\n\t\t\tif (!$isOnList)\n\t\t\t{\n\t\t\t\t$res = $this->MemberSetting->addToIgnoreList($memBig, $BadMemBig);\n\t\t\t\tif ($res === FALSE)\n\t\t\t\t{\n\t\t\t\t\t$this->_apiEr(__('Errore. Utente non aggiunto alla black list.'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If this is a chat, send last M chat messages with up to N characters\n // TODO migliorare prendendo N messaggi precedenti e N successivi a quello incriminato\n\t\t\t$ress = $this->ChatMessage->getMessagesForSignalation($memBig, $BadMemBig);\n\t\t}\n\t\telseif ($type == 2)\n\t\t{\n\t\t\t// Signalation of type photo - add link to the photo and link to delete the photo\n\t\t\tif (empty($idObj))\n\t\t\t{\n\t\t\t\techo json_encode('We are sorry. The report cannot be processed. The reason is: Missing photo identificator.');\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$photo = $this->Photo->getSignaledPhoto($idObj);\n\t\t\tif (empty($photo['Gallery']['event_big']))\n\t\t\t{\n\t\t\t\t$img = $this->FileUrl->place_photo($photo['Gallery']['place_big'], $photo['Photo']['gallery_big'], $photo['Photo']['big'], $photo['Photo']['original_ext']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$img = $this->FileUrl->event_photo($photo['Gallery']['event_big'], $photo['Photo']['gallery_big'], $photo['Photo']['big'], $photo['Photo']['original_ext']);\n\t\t\t}\n\n\t\t}\n elseif ($type == 3)\n { // Signalation of type comment\n \n if (empty($idObj))\n {\n echo json_encode('We are sorry. The report cannot be processed. The reason is: Missing comment identificator.');\n return;\n }\n \n //TODO quali dati riportiamo e cosa facciamo nel caso di commenti impropri ?\n \n }\n \n /*$this->log(\"membig \".$memBig);\n $this->log(\"badmembig \".$BadMemBig);\n $this->log(\"type \".$type);\n $this->log(\"text \".$text);//$this->log(\"type \".$type);\n $this->log(\"idObj \".$idObj);*/\n \n\t\t$result = $this->Signalation->addSignalation($memBig, $BadMemBig, $type, $text, $idObj);\n\n\t\t// Send email report to admins\n\t\t$member = $this->Signalation->Member->getMemberByBig($memBig);\n\t\t$flagged = $this->Signalation->Member->getMemberByBig($BadMemBig);\n\t\t$memberName = !empty($member) ? $member['Member']['name'] .\n\t\t\t(!empty($member['Member']['middle_name']) ? ' ' . $member['Member']['middle_name'] . ' ' : ' ') . $member['Member']['surname'] : 'Deleted member';\n\t\t$flaggedName = !empty($flagged) ? $flagged['Member']['name'] .\n\t\t\t(!empty($flagged['Member']['middle_name']) ? ' ' . $flagged['Member']['middle_name'] . ' ' : ' ') . $flagged['Member']['surname'] : 'Deleted member';\n\t\t$params = array(\n\t\t\t'reason' => $text,\n\t\t\t'type' => $type,\n\t\t\t'member_name' => $memberName,\n\t\t\t'member_big' => $memBig,\n\t\t\t'flagged_name' => $flaggedName,\n\t\t\t'flagged_big' => $BadMemBig,\n\t\t);\n\t\tif ($type == 1)\n\t\t{//SIGNAL_CHAT\n\t\t\t$params['messages'] = $ress;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$params['img'] = $img;\n\t\t\t$params['photoBig'] = $idObj;\n\t\t}\n\t\tApp::uses('Emailer', 'Lib');\n\t\tEmailer::sendEmail('chat_signalation', null, $params, __('New signalation'), FLAG_MAIL_TO);\n\n\n\t\tif ($result !== false)\n\t\t{\n\t\t\t$this->_apiOk();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_apiEr(__('Errore. Segnalazione non inserita.'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "a55127fbadc05f7f311ef708b37ed99f", "score": "0.5352637", "text": "function _add_to_project()\n {\n if (!$this->has_arg('pid'))\n $this->_error('No project id specified');\n if (!$this->has_arg('ty'))\n $this->_error('No item type specified');\n if (!$this->has_arg('iid'))\n $this->_error('No item id specified');\n\n\n if (array_key_exists($this->arg('ty'), $this->types))\n {\n $t = $this->types[$this->arg('ty')];\n\n $chk = $this->db->pq(\"SELECT projectid FROM $t[0] WHERE projectid=:1 AND $t[1]=:2\", array($this->arg('pid'), $this->arg('iid')));\n\n if ($this->has_arg('rem') && sizeof($chk))\n {\n $this->db->pq(\"DELETE FROM $t[0] WHERE projectid=:1 AND $t[1]=:2\", array($this->arg('pid'), $this->arg('iid')));\n }\n\n if (!sizeof($chk))\n {\n $this->db->pq(\"INSERT INTO $t[0] (projectid,$t[1]) VALUES (:1, :2)\", array($this->arg('pid'), $this->arg('iid')));\n }\n\n $this->_output(1);\n }\n }", "title": "" }, { "docid": "52327e3524c72a89887d5a64b1cd34aa", "score": "0.5347266", "text": "public function createNew() {\n\t}", "title": "" }, { "docid": "4c6a650aef126c405529f8999e8c946f", "score": "0.5337369", "text": "function add_item($num, $code) {\n \n\t\t// if the order exists...\n\t\tif($this->exists($num))\n\t\t{\n\t\t\t// if the item exists in this order, increment the quantity!\n\t\t\tif($this->orderitems->exists($num, $code))\n\t\t\t{\n\t\t\t\t$orderItem = $this->orderitems->get($num, $code);\n\t\t\t\t$qty = $orderItem->quantity;\n\t\t\t\t\n\t\t\t\t$qty++;\n\t\t\t\t$orderItem->quantity = $qty;\n\t\t\t\t\n\t\t\t\t$this->orderitems->update($orderItem);\n\t\t\t}\n\t\t\telse // otherwise, insert a record\n\t\t\t{\n\t\t\t\t$orderItem = $this->orderitems->create();\n\t\t\t\t$orderItem->order = $num;\n\t\t\t\t$orderItem->item = $code;\n\t\t\t\t$orderItem->quantity = 1;\n\t\t\t\t\n\t\t\t\t$this->orderitems->add($orderItem);\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "bd48366080eea436635e00074aab9108", "score": "0.5332536", "text": "function add() {\r\n\t\t$this->display ( 'add' );\r\n\t}", "title": "" }, { "docid": "a78bc6a970c2711e75c0ab39273e3d47", "score": "0.53297734", "text": "function tn_add_message( $type, $message ) {\n\t$m = TN_Messages::get_instance();\n\t$m->add_message( array( $type => $message ) );\n}", "title": "" }, { "docid": "1838a3a044be12cede5208be7174a6b6", "score": "0.5323832", "text": "public function add() {\n\n $sql = \"INSERT INTO persona(id,nombre,apellido_paterno,apellido_materno,estado_salud,telefono,ubicacion)\n VALUES(null,'{$this->nombre}','{$this->apellido_paterno}','{$this->apellido_materno}',\n '{$this->estado_salud}','{$this->telefono}','{$this->ubicacion}')\";\n $this->con->consultaSimple($sql);\n }", "title": "" }, { "docid": "eb43ea2524d714284f605940ad8cce9e", "score": "0.5322682", "text": "public function add() {\n // $this->copyFrom('POST');\n $newData = [];\n $this->copyFrom('POST', function($data) {\n foreach ($data as $key => $value) {\n $newData[$key] = Controller::sanitizeDatas($value);\n }\n return $newData;\n });\n $this->debut = date('Y-m-d', strtotime($this->debut));\n $this->fin = date('Y-m-d', strtotime($this->fin));\n $this->limitA = date('Y-m-d', strtotime($this->limitA));\n $this->limitB = date('Y-m-d', strtotime($this->limitB));\n $this->deadLine = date('Y-m-d', strtotime($this->deadLine));\n $this->save();\n }", "title": "" }, { "docid": "bcf9c5836ae55f64d9c39ec8bbc9a083", "score": "0.53212106", "text": "public function add($item, $quantity = 1);", "title": "" }, { "docid": "ac298710a9b7ee547e83244bc6b644ef", "score": "0.53183895", "text": "function addTrackedItem($userToken, $description, $notificationMethod, $url, $recurrence) {\n global $items;\n\n $newItem = array('userToken' => $userToken, 'description' => $description,\n 'notificationMethod' => $notificationMethod, 'url' => $url, 'recurrence' => $recurrence, 'alert' => false);\n $items->insert($newItem);\n\n $addedItem = $items->find(array('description' => $description));\n\n// echo \"\\nItem Added: \\n\";\n echo json_encode(iterator_to_array($addedItem));\n}", "title": "" }, { "docid": "356981a1c222951c87220814c9b47469", "score": "0.53144705", "text": "function addView()\n {\n $code = $this->product_code;\n $dbc = $this->dbc;\n\n\n $views = $this->views;\n\n //then increment the views\n $new_view = $views+1;\n\n //then save it.\n $query = \"UPDATE `products` SET `views` = '$new_view' WHERE `product_code` = '$code' \";\n $result = mysqli_query($dbc, $query)\n or die(\"Could not update view\");\n }", "title": "" }, { "docid": "2e8f5c54424c2bcf23421ec3fc2c242e", "score": "0.531046", "text": "function add()\r\n {\r\n \t$insertado=$this->validar();\t\r\n\tif(!$insertado)\r\n\t{\r\n\t $sql=\"insert into dp_datotecnico\"\r\n\t\t\t.\" (datpro_id,estdes_codigo,dattec_finicio,dattec_ffinal,\"\r\n\t\t\t.\"dattec_duracion,dattec_beneficiario,dattec_monto,mon_codigo)\"\r\n\t\t\t.\" values (\"\r\n\t\t\t.\"$this->datpro_id,$this->estdes_codigo,'$this->dattec_finicio','$this->dattec_ffinal',\"\r\n\t\t\t.\"'$this->dattec_duracion','$this->dattec_beneficiario','$this->dattec_monto','$this->mon_codigo')\";\r\n\t $rs = &$this->con->Execute($sql);\r\n\t if($rs)\r\n\t {\r\n\t //recuperar el id del dp_datotecnicoes insertado, dattec_codigo\r\n\t $nid=$this->validar();\r\n\t $oaux=new c_datoProyecto($this->con);\r\n\t $oaux->actFechaAudit($this->datpro_id);\r\n\t }\r\n\t else\r\n\t $nid=0;\r\n\t}\r\n\telse\r\n\t $nid=0; \r\n\t \r\n\treturn($nid);\r\n }", "title": "" }, { "docid": "1d0d5d07a0c8fd55e31ceb6fdc4d9a9f", "score": "0.53068566", "text": "public function add(){\r\n\t\t//$this->auth->set_access('add');\r\n\t\t//$this->auth->validate();\r\n\r\n\t\t//call save method\r\n\t\t$this->save();\r\n\t}", "title": "" }, { "docid": "026fce6ee879310dedaed60fe0e7da95", "score": "0.5303505", "text": "public function addTask()\n\t{\n\t\t$this->editTask();\n\t}", "title": "" }, { "docid": "3c9960235f118f39a83a25448474d9fc", "score": "0.52997833", "text": "public function add($item) {\n $this->items[$item->id()] = $item;\n }", "title": "" }, { "docid": "4bd732d9ba776b1c1483980357ac7b4b", "score": "0.5291169", "text": "public function add_info($info)\n { \n }", "title": "" }, { "docid": "0455fe061ae940897b2fc64700fc8edb", "score": "0.5282709", "text": "function add_field() {\n\t\t\t$nonce = $_POST['security'];\n\t\t\tif (! wp_verify_nonce($nonce, 'aqpb-settings-page-nonce') ) die('-1');\n\t\t\t\n\t\t\t$count = isset($_POST['count']) ? absint($_POST['count']) : false;\n\t\t\t$this->block_id = isset($_POST['block_id']) ? $_POST['block_id'] : 'aq-block-9999';\n\t\t\t\n\t\t\t//default key/value for the tab\n\t\t\t$field = array(\n\t\t\t\t'type'\t\t=> 'phone',\n\t\t\t\t'title'\t\t=> 'New Field',\n\t\t\t\t'content'\t=> ''\n\t\t\t);\n\t\t\t\n\t\t\tif($count) {\n\t\t\t\t$this->create_item($field, $count);\n\t\t\t} else {\n\t\t\t\tdie(-1);\n\t\t\t}\n\t\t\t\n\t\t\tdie();\n\t\t}", "title": "" }, { "docid": "6d2b9324c0adf9708fd6ea16e879d33f", "score": "0.5275584", "text": "public function add_item($p)\n {\n $this->item = $p;\n }", "title": "" }, { "docid": "97513795790f588578b9abe8a74ce80c", "score": "0.52723116", "text": "public static function add($num) {\n\t\t// If we don't have a basket, might as well add one now\n\t\tif(self::current() === false) {\n\t\t\treturn self::create($num);\n\t\t}\n\t\t\n\t\tif(!self::contains($num)) {\n\t\t\tself::$_basket->productArray[] = $num . '';\n\t\t}\n\t\t\n\t\treturn self::update();\n\t}", "title": "" }, { "docid": "f67dcb5c059a22ecc548d8d7d971a03c", "score": "0.52664614", "text": "public function add() {\n $SQL = \"INSERT INTO \" . $this->tb . \" (ID) VALUES (\" . ($this->rowNumber + 1) . \")\";\n mysqli_query($this->db_handle,$SQL);\n $this->rowNumber = mysqli_num_rows($this->tb_handle);\n $this->assign();\n }", "title": "" }, { "docid": "ba841a3c6531b22c221c21a00f8988f6", "score": "0.5266178", "text": "public function hook_after_add($id)\n {\n //Your code here\n\n $data=DB::table('agunan')->where('id',$id)->first();\n $presentase_margin=$data->nilai_margin;\n $nilai_pasar=$data->nilai_pasar;\n\n $nilai['ltv']=($data->baki_debet/$nilai_pasar)*100;\n\n //grade\n\n if($nilai['ltv']>=70){\n $poin_1=2;\n }else{\n $poin_1=1;\n }\n\n $nilai['grade']=$poin_1;\n // $nilai['kode_uniq']=CRUDBooster::generate_uuid();\n\n DB::table('agunan')->where('id',$id)->update($nilai);\n\n\n\n\n\n\n }", "title": "" }, { "docid": "107a8f7844cc15dbdc3d2288bbc84cb1", "score": "0.52657145", "text": "function add_question(array $user){\n $json = file_get_contents(FILE_QUESTION);\n $user['id']= uniqid();\n // 2 convertir contenu en tableau\n $arrayuser = json_decode($json, true);\n // 3 ajouter new user\n $arrayuser[] = $user;\n // convertir le tableau en json\n $json =json_encode($arrayuser);\n file_put_contents(FILE_QUESTION, $json); \n}", "title": "" }, { "docid": "a6eb396c9dfbb7b064b6e269695bfb90", "score": "0.526351", "text": "function add_mug($serial){\r\n\t\tglobal $mysqli;\r\n\t\tglobal $GLOBAL_user_id;\r\n\t\tglobal $GLOBAL_user_mug_count;\r\n\r\n\t\tif($serial != \"\"){\r\n if($GLOBAL_user_mug_count == 0){\r\n $default = 1;\r\n }else{\r\n $default = 0;\r\n }\r\n\r\n\t\t\t$mysqli->query(\"INSERT INTO `mugs`VALUES (NULL , '\" . $GLOBAL_user_id . \"', '\" . $serial . \"', '\" . $serial . \"', '#d7cab5', '\" . $default . \"')\");\r\n\t\t\t\r\n\t\t\t$content = \"USERID:\" . $GLOBAL_user_id . \";SSID:;PASSWORD:;NEW_DEGREE:0;LAST_DEGREE:0;\";\r\n\t\t\t$file = \"mug config/\" . $serial . \".txt\";\r\n\t\t\t$handle = fopen($file,\"w\");\r\n\t\t\tfwrite($handle,$content);\r\n\t\t\tfclose($handle);\r\n\t\t\tchmod($file, 0777);\r\n\t\t\t\r\n\t\t\techo \"<div class='approved'>New mug has been added to your account!</div>\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0f90a97469623fa6a647aa7963bd2caa", "score": "0.5260462", "text": "public function add()\r\n {\r\n $this->start();\r\n $this->write_to_db();\r\n }", "title": "" }, { "docid": "15eea983d0d0c7a46908745e83db0d4c", "score": "0.525942", "text": "function add_noticia($id_usuario,$titulo,$noticia,$estado,$idioma) {\n\t\t$timestamp=time();\n\t\t$fecha=date(\"Y-m-d H:i:s\",$timestamp);\n\t\t\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$ssql = \"INSERT INTO noticias\n\t\t(id_colaborador, titulo, noticia, fecha_insercion, fecha_modificacion, estado, idioma) \n\t\tVALUES ('$id_usuario', '$titulo', '$noticia', '$fecha', '$fecha', '$estado', '$idioma')\";\n\t\t\t\n\t\t\t//lo inserto en la base de datos\n\t\t\tif (mysql_query($ssql,$connection)){\n\t\t\t\t//recibo el último id\n\t\t\t\t$ultimo_id = mysql_insert_id($connection);\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn $ultimo_id;\n\t\t\t}else{\n\t\t\t\tmysql_close($connection);\n\t\t\t\treturn false;\n\t\t\t} \t\t\n\t}", "title": "" }, { "docid": "93825dec01a3a6299b9a56d5f3eea32a", "score": "0.52564096", "text": "function OnBeforeAdd(){\n }", "title": "" }, { "docid": "6733278ed20505e8f30ce7e8bb703ca0", "score": "0.5251281", "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": "4623a720dfef22dde9e3d1c4b48b2d70", "score": "0.5249975", "text": "public function insert_entry()\n {\n }", "title": "" }, { "docid": "2364708f1df613f43b8b2001eee98329", "score": "0.5249881", "text": "public function addBox(Box $box);", "title": "" }, { "docid": "e5eb50a573fd4261be8705477f01a970", "score": "0.52399665", "text": "public function add(...$items);", "title": "" }, { "docid": "c14586066951b014a51eb0cf412fba56", "score": "0.52375567", "text": "public function notify_add($message, $type = \"info\"){\n\n\t\t$_SESSION[\"notify\"][\"messages\"][] = array(\"message\" => $message, \"type\" => $type, \"already_displayed\" => \"false\");\n\t}", "title": "" }, { "docid": "93b9758d9afab3cd3274d79ff1ac06db", "score": "0.52356106", "text": "public function AddItem() {\n\tdie('This method not written yet!'); // is it needed now?\n }", "title": "" }, { "docid": "3bd9789e5bd0151180cc0ac2d155d375", "score": "0.52314454", "text": "function addNew()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n else\n {\n $this->load->model('user_model');\n $data['roles'] = $this->user_model->getUserRoles();\n \n $this->global['pageTitle'] = 'Garuda Informatics : Add New User';\n\n $this->loadViews($this->view.\"addNew\", $this->global, $data, NULL);\n }\n }", "title": "" }, { "docid": "aba0db52e06c018c7b7a572af9995098", "score": "0.5231195", "text": "public function add()\n {\n // Get input messages\n $input = $this->api->get_input();\n\n // Validate\n if(! $this->__skip_validation)\n {\n $this->validation->run($input, $this->__add_validation);\n }\n\n // All fields cannot be empty\n if (empty($input))\n {\n $this->api->generate_output_json(-115);\n }\n \n $input = $this->trigger('before_add', $input);\n\n // insert the record into the table\n $id = $this->{$this->__model_name}->insert($input);\n\n // Add id to the input and send it to the after_add event\n $input->id = $id;\n $this->trigger('after_add', $input);\n\n // Return success\n $this->api->generate_output_json(1, ['data'=>$id]);\n }", "title": "" }, { "docid": "57037dcedf60732f22e5de243ea370df", "score": "0.52303225", "text": "public function add()\n {\n $post = new Post;\n $post->setAttribute('name', 'Another Post');\n $post->setAttribute('user_id', '1');\n $post->save();\n }", "title": "" }, { "docid": "6fce9ede4fa9eb88af63cff33263a55d", "score": "0.52200544", "text": "function label_add_instance($label) {\n/// (defined by the form in mod.html) this function \n/// will create a new instance and return the id number \n/// of the new instance.\n $textlib = textlib_get_instance();\n\n $label->name = addslashes(strip_tags(format_string(stripslashes($label->content),true)));\n if ($textlib->strlen($label->name) > LABEL_MAX_NAME_LENGTH) {\n $label->name = $textlib->substr($label->name, 0, LABEL_MAX_NAME_LENGTH).\"...\";\n }\n $label->timemodified = time();\n\n return insert_record(\"label\", $label);\n}", "title": "" }, { "docid": "0f9f410fb7d4c96ad505e82c62006c00", "score": "0.52179384", "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": "" } ]
847d3033ebfeff86775a9e4028a7acbc
Set global settings for all services
[ { "docid": "9156bdedb1d885c251cfbcc9edaed2fa", "score": "0.0", "text": "public function setSettings(array $settings): void\n {\n foreach ($this->defaultSettings as $defaultSettingKey => $defaultSettingValue) {\n $this->settings[$defaultSettingKey] = (int) ($settings[$defaultSettingKey] ?? $defaultSettingValue);\n }\n }", "title": "" } ]
[ { "docid": "dd580a3573d8d480fb801d03c40e923f", "score": "0.7232691", "text": "protected function defineSettings(){ \n $this->settings(array());\n }", "title": "" }, { "docid": "63e8efd2ecbdbf61a2cd2855440bf803", "score": "0.6749415", "text": "private static function setup() {\n if(!isset(self::$settings)) {\n require 'regain/global_settings.php';\n self::$settings = $settings;\n }\n }", "title": "" }, { "docid": "53c0f0f2de49cf26eae0237ba9071492", "score": "0.6685421", "text": "private static function _svcSetting()\n {\n define('UDPSENDERPATH', '/usr/local/sbin/udp-sender');\n define('MULTICASTINTERFACE', 'eth0');\n define('UDPSENDER_MAXWAIT', null);\n }", "title": "" }, { "docid": "877c91446724a42b33ccd10dd5b904fe", "score": "0.66455096", "text": "private function initCoreSetting()\n {\n $this->viewPath = config('mockup.MOCKUP_VIEWS_PATH');\n $this->templateName = config('mockup.TEMPLATE_NAME');\n\n \\App::singleton('user_current_language', function () {\n return 1;\n });\n }", "title": "" }, { "docid": "e35da6a457070d360e7be442dbcddc5c", "score": "0.6626734", "text": "public function init_settings()\n {\n /** @noinspection PhpUndefinedClassInspection */\n parent::init_settings();\n\n $sharedOptions = get_option(SharedPersistor::OPTION_NAME, []) ?: [];\n $this->settings = array_merge($this->settings, $sharedOptions);\n }", "title": "" }, { "docid": "429bb2486a941fb04038a0cc5e6a0d8c", "score": "0.65727234", "text": "protected function initSettings() {\n\t\t\t// $TYPO3_CONF_VARS['SVCONF']['icon']['setup']['skin'] = 'crystal_project';\n\t\t\t// $TYPO3_CONF_VARS['SVCONF']['icon']['setup']['flavour'] = '24x24';\n\t\t$this->settings['skin'] = $this->getServiceOption('skin', 'default');\n\t\t$this->settings['flavour'] = $this->getServiceOption('flavour', '16x16');\n\n\t\tif (TYPO3_MODE === 'FE') {\n\t\t\t$this->settings = array_merge($this->settings, $GLOBALS['TSFE']->tmpl->setup['service.'][$this->prefixId . '.']);\n\t\t}\n\n\t\t$extRelPath = substr(t3lib_extMgm::extPath($this->extKey), strlen(PATH_site));\n\t\t$this->settings['iconPath'] = $extRelPath . 'Resources/Public/' . $this->settings['skin'] . '/' . $this->settings['flavour'] . '/';\n\t}", "title": "" }, { "docid": "6ecb22ed1621194fc35ece875d0e78ea", "score": "0.6548695", "text": "function setToolSettings() {\n /*reserved for future use*/\n }", "title": "" }, { "docid": "610adc657bff72987ea172e3356cc0ae", "score": "0.6451267", "text": "protected static function initServices()\n {\n parent::initServices();\n\n static::$instance->initInstanceServices();\n static::$instance->initBrandDependentServices();\n static::$instance->setMultistore(false);\n }", "title": "" }, { "docid": "b4b19b7762672be1631d9db1641d5f37", "score": "0.6400398", "text": "private function site_settings() {\n\n\t\t$controller = new Mlp_Redirect_Site_Settings( $this->option );\n\t\t$controller->setup();\n\t}", "title": "" }, { "docid": "fc7c0949c6bce6cc473e0b1e7e4f3eb2", "score": "0.63734764", "text": "public function register_settings() {\r\n\t}", "title": "" }, { "docid": "5ce04aa65adb7cce48a7f91796d35359", "score": "0.6371003", "text": "private function setSettings() {\n $this ->setAccessToken( $this ->token );\n $this ->setAccountId( self::ACCOUNT_ID );\n }", "title": "" }, { "docid": "a2d6a70fb3f3dcdf96977c48593f93fd", "score": "0.6369444", "text": "abstract protected function define_my_settings();", "title": "" }, { "docid": "ec8bba9fb8f95634380d12c01e849461", "score": "0.6349267", "text": "private function initServices()\n {\n $this->compropagoConfig = array(\n 'publickey' => $this->config->get('compropago_public_key'),\n 'privatekey' => $this->config->get('compropago_secret_key'),\n 'live' => $this->config->get('compropago_mode')\n );\n\n $this->compropagoClient = new Client(\n $this->compropagoConfig['publickey'],\n $this->compropagoConfig['privatekey'],\n $this->compropagoConfig['live']\n );\n }", "title": "" }, { "docid": "294a5380caf9b8e03ac4d7096d6b1379", "score": "0.63000494", "text": "protected function setGlobalVariables() {\r\n\t\t$this->entityName = $this->entityName();\r\n\t\t$this->entityNamePlural = $this->entityNamePlural();\r\n\t}", "title": "" }, { "docid": "e8e489f2b4b9e687e2d7b91ea4b9dc23", "score": "0.6285346", "text": "public function setConfiguration() {\n\n // Make sure all new services are available.\n drupal_flush_all_caches();\n $this->updateConfig();\n // Make sure configuration changes are available.\n drupal_flush_all_caches();\n $this->updateAuthors();\n $this->output()->writeln('Your configuration is complete.');\n }", "title": "" }, { "docid": "10dc099372ace846f9cbd4a5b78982b4", "score": "0.6281874", "text": "private function config()\n {\n $this->_library->setEnvironment();\n $this->_library->setCharset();\n $this->_library->setLog();\n }", "title": "" }, { "docid": "0ea78253898a1cb61a915b35cf4de381", "score": "0.6274692", "text": "public function register_settings()\n {\n }", "title": "" }, { "docid": "0ea78253898a1cb61a915b35cf4de381", "score": "0.6274692", "text": "public function register_settings()\n {\n }", "title": "" }, { "docid": "0ea78253898a1cb61a915b35cf4de381", "score": "0.62741005", "text": "public function register_settings()\n {\n }", "title": "" }, { "docid": "ae0b64261c8a17696456f6cca511382a", "score": "0.6264716", "text": "protected function setMainInstances(){\n\n //dependencia de configuracion principal\n $this->config=$this->container['config'];\n //variables globales de aplicacion\n $this->globals=$this->config->app();\n\n }", "title": "" }, { "docid": "10711b1f8122694121bf0c38dbeb4976", "score": "0.6254595", "text": "public function configure()\n {\n $Services = self::getSubObjectIDs(\n 'Service',\n array(\n 'name' => array(\n 'FOG_CLIENT_CHECKIN_TIME',\n 'FOG_CLIENT_MAXSIZE',\n 'FOG_GRACE_TIMEOUT',\n 'FOG_TASK_FORCE_REBOOT'\n )\n ),\n 'value',\n false,\n 'AND',\n 'name',\n false,\n ''\n );\n printf(\n \"#!ok\\n\"\n . \"#sleep=%d\\n\"\n . \"#maxsize=%d\\n\"\n . \"#promptTime=%d\\n\"\n . \"#force=%s\",\n array_shift($Services) + mt_rand(1, 91),\n array_shift($Services),\n array_shift($Services),\n array_shift($Services)\n );\n exit;\n }", "title": "" }, { "docid": "800eeb2b27e5cfa3b27acb56390a533c", "score": "0.62376755", "text": "private function initializeServices()\n {\n $this->emailManager = $this->getService('mycp.service.email_manager');\n $this->translatorService = $this->getService('translator');\n $this->securityService = $this->getService('Secure');\n $this->router = $this->getService('router');\n }", "title": "" }, { "docid": "2ae97de5d8eb3dd16eed4c9334d76be7", "score": "0.622148", "text": "private function setConfigs(): void\n {\n $configsClassRoot = new \\HeliumConfig\\Configs;\n\n $this->configs = $configsClassRoot::all;\n }", "title": "" }, { "docid": "2189c26500b36758e0cdff55c02f5c84", "score": "0.6193144", "text": "public static function init() {\n static::registerSettings();\n }", "title": "" }, { "docid": "0d1f784d095cc28982fe6c882a865db6", "score": "0.6184951", "text": "public function setSettings() {\n //get a new instance of the call\n $getSettingsCall = new GetSettingsCall();\n\n //generate the body\n $body = ['takeawayID' => $this->takeaway->getId(),\n 'domain' => $this->request->host(),\n 'subDomain' => '',\n ];\n\n //make the request\n $response = $getSettingsCall->makeRequest(\n '/api/Takeaway/GetSettings', $getSettingsCall->createRequestMessage($body)\n );\n\n //handle the response\n $getSettingsCall->handleResult($response);\n }", "title": "" }, { "docid": "70ec3e9be9f04cf1e3a77113d5d05a58", "score": "0.6184565", "text": "function init(){\n parent::init();\n $this->cache=&$this->api->smlite_cache;\n $this->settings=array_merge(\n $this->getDefaultSettings(),\n $this->api->getConfig('template',array())\n );\n }", "title": "" }, { "docid": "fbc40961389d0d3bcfeb5ca060ada07d", "score": "0.6145766", "text": "function ossn_services_init() {\n\t\tossn_register_com_panel('OssnServices', 'settings');\n\t\tossn_register_page('api', 'ossn_services_handler');\n\t\tif(ossn_isAdminLoggedin()) {\n\t\t\t\tossn_register_action('services/admin/settings', OssnServices . 'actions/settings.php');\n\t\t}\n}", "title": "" }, { "docid": "274ab3bb4faa0f360d35b23d0dee67ab", "score": "0.6118799", "text": "public function settings()\n {\n }", "title": "" }, { "docid": "d9a0cfe1f659f1f45c80fc6b3ed4c25b", "score": "0.6108122", "text": "protected static function init() {\n self::$_serviceBusEndpointSetting = self::settingWithFunc(\n Resources::SERVICE_BUS_ENDPOINT_NAME,\n Validate::getIsValidUri()\n );\n\n self::$_wrapNameSetting = self::setting(\n Resources::SHARED_SECRET_ISSUER_NAME\n );\n\n self::$_wrapPasswordSetting = self::setting(\n Resources::SHARED_SECRET_VALUE_NAME\n );\n\n self::$_sasKeyNameSetting = self::setting(\n Resources::SHARED_SHARED_ACCESS_KEY_NAME\n );\n\n self::$_sasKeySetting = self::setting(\n Resources::SHARED_SHARED_ACCESS_KEY\n );\n\n self::$_wrapEndpointUriSetting = self::settingWithFunc(\n Resources::STS_ENDPOINT_NAME,\n Validate::getIsValidUri()\n );\n\n self::$validSettingKeys[] = Resources::SERVICE_BUS_ENDPOINT_NAME;\n self::$validSettingKeys[] = Resources::SHARED_SECRET_ISSUER_NAME;\n self::$validSettingKeys[] = Resources::SHARED_SECRET_VALUE_NAME;\n self::$validSettingKeys[] = Resources::SHARED_SHARED_ACCESS_KEY_NAME;\n self::$validSettingKeys[] = Resources::SHARED_SHARED_ACCESS_KEY;\n self::$validSettingKeys[] = Resources::STS_ENDPOINT_NAME;\n }", "title": "" }, { "docid": "3e9717b391ad56dbd5910a8863adcb92", "score": "0.61046576", "text": "private function user_settings() {\n\n\t\t$controller = new Mlp_Redirect_User_Settings();\n\t\t$controller->setup();\n\t}", "title": "" }, { "docid": "2290f1f4e8aa949ea981f408112bd18f", "score": "0.60878867", "text": "public function setSettings($settings){\r\n\t\t$this->initSettings = $settings;\r\n\t}", "title": "" }, { "docid": "1c13fe44386b7d665195387392ed68c6", "score": "0.6051715", "text": "public function settings() {\n }", "title": "" }, { "docid": "2c62dde07a92fc29fc15d4568c4e101f", "score": "0.6047933", "text": "public static function setServiceSettings(string $service, array $settings) : void\n {\n foreach (self::$defaultSettings as $defaultSettingKey => $defaultSettingValue) {\n self::$servicesSettings[$service][$defaultSettingKey] =\n (int) ($settings[$defaultSettingKey] ?? self::$globalSettings[$defaultSettingKey] ?? $defaultSettingValue);\n }\n }", "title": "" }, { "docid": "76cd5ee3ba7128cfc111ab1a11ad12f9", "score": "0.6047323", "text": "public function setVariables()\n \t{\t\n \t\tif (isset($this->params->plugin)) {\n \t\t\t$this->setPlPath(App::pluginPath(Inflector::humanize($this->params->plugin)));\n \t\t}\n \t\t$this->setController($this->params->controller);\n \t\t$this->setAction($this->params->action);\n \t\t$this->setConstant(Configure::read('App'));\n \t\t\n \t}", "title": "" }, { "docid": "880db901038bed3985655a34c88a321b", "score": "0.60446763", "text": "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "title": "" }, { "docid": "880db901038bed3985655a34c88a321b", "score": "0.60446763", "text": "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "title": "" }, { "docid": "880db901038bed3985655a34c88a321b", "score": "0.60446763", "text": "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "title": "" }, { "docid": "880db901038bed3985655a34c88a321b", "score": "0.60446763", "text": "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\t}", "title": "" }, { "docid": "8f56b08a4d95baae8ff3ff1457691e40", "score": "0.6042769", "text": "public function setSettings() {\n $args = array(\n array(\n 'option_group' => 'pm_plugin_settings',\n 'option_name' => 'pm_plugin',\n 'callback' => array($this->callbacks_mgr, 'checkboxSanitize'),\n )\n );\n $this->settings->setSettings($args);\n }", "title": "" }, { "docid": "661a0f8049a0186a0ca2da6207dd9892", "score": "0.6036399", "text": "public function setup_settings() {\n\t\t$this->init_sections();\n\t\t$this->init_fields();\n\t\t$this->settings_fields();\n\t}", "title": "" }, { "docid": "17875a919dfc1ccd2c1b3bb6ebbe0445", "score": "0.6036319", "text": "function wshop_settings_init(){\n register_setting('wshop_settings', 'wshop_api_key');\n register_setting('wshop_settings', 'wshop_domain', 'remove_protocol');\n // register_setting('wshop_settings', 'wshop_app_id');\n register_setting('wshop_settings', 'wshop_rewrite_slug');\n register_setting('wshop_settings', 'wshop_collections_slug');\n }", "title": "" }, { "docid": "6bbf475d3d4baa2c0dc0e9ca2025cc26", "score": "0.6035096", "text": "protected function generate_settings() {\n\n\t\t$this->settings = [];\n\n\t}", "title": "" }, { "docid": "149dc4fd1945077d117d161b47cc1853", "score": "0.6033706", "text": "public function init() {\n\t\tregister_setting( $this->key, $this->key );\n\n\t}", "title": "" }, { "docid": "bca3de68da01a375aa97f09e757b3ef0", "score": "0.60328656", "text": "protected function define_my_settings() {\n // No particular settings for this activity.\n }", "title": "" }, { "docid": "fc2befa95d7afc0920c740370e3bcc3a", "score": "0.6020799", "text": "protected function load_settings() {\n\t\t$this->settings = WP_United_Settings::Create();\n\t\t$this->init_style_keys();\n\t}", "title": "" }, { "docid": "5b530eab21d1c9ba5fce94afde6ce032", "score": "0.6009114", "text": "function bindGlobals() {\n\t\t$vars = $this->getPublicVars();\n\t\tforeach ($vars as $v) {\n\t\t\t$k = str_replace( 'config_', 'mosConfig_', $v );\n\t\t\tif (isset( $GLOBALS[$k] ))\n\t\t\t\t$this->$v = $GLOBALS[$k];\n\t\t}\n\n\t\t/*\n\t\t*\tMaintain the value of $mosConfig_live_site even if\n\t\t*\tuser signs in with https://\n\t\t*/\n\t\trequire('../configuration.php');\n\t\tif( $mosConfig_live_site != $this->config_live_site )\n\t\t\t$this->config_live_site = $mosConfig_live_site;\n\t}", "title": "" }, { "docid": "187fbc34289c6cb92984a4e42be3db25", "score": "0.6008151", "text": "function initialize() {\r\n add_filter(\"slp_widget_default_options\", array($this, \"options\"));\r\n add_filter(\"slp_widget_get_settings\" , array($this, \"getSettings\"));\r\n\r\n $this->settings_array = apply_filters(\"slp_widget_default_options\", array());\r\n foreach ($this->settings_array as $setting => $setto) {\r\n $this->$setting = $setto;\r\n }\r\n }", "title": "" }, { "docid": "e8c6626b0e14d4a283e1898b60374e9b", "score": "0.5998074", "text": "public function initialize_settings() {\n\n\t\t$default_settings = array();\n\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\n\t\tupdate_option('eaboot_options', $default_settings);\n\t}", "title": "" }, { "docid": "8ea48dd8239aabe93fefd6b2df3a152c", "score": "0.5994819", "text": "protected static function initializeGlobalVariables() {}", "title": "" }, { "docid": "50bde0a350a206a7c08980bee8a7aff2", "score": "0.59832966", "text": "protected function loadSettings() {\n $this->loadModel('SettingsModel');\n $this->settings = $this->SettingsModel->find($_SERVER['SERVER_NAME']);\n $this->set('settings', $this->settings);\n }", "title": "" }, { "docid": "dad1c2cb782d4c43a7c9308cc2f31d7f", "score": "0.59775543", "text": "public function setConfig()\n {\n }", "title": "" }, { "docid": "05aef6aac4280bf1e3dbf5d3748f2b6e", "score": "0.5970345", "text": "function register_settings() {\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'endpoint'); // Sanitize\n\t\n\tregister_setting(\n\t\t'StandardsReader_settings_group', // Option group\n\t\t'check_interval'); // Sanitize\n\t\n\tregister_setting('StandardsReader_settings_group', 'mapPage');\n\tregister_setting('StandardsReader_settings_group', 'mapListing');\n\t\t \n}", "title": "" }, { "docid": "87728466effae70a5dc7b566728e3da6", "score": "0.59695214", "text": "private function setupServices(): void\n {\n $service_factory = new Services\\ServiceFactory($this);\n foreach($this->config()->services->toArray() as $key => $service) {\n $this[$key] = $this->share( function($c) use($key, $service, $service_factory) {\n $parameters = parse_url($service); // first parameter scheme, the rest optional ones.\n try {\n return $service_factory->create($key, array_shift($parameters), $parameters); \n }\n catch(AdapterNonExistentException $e) {\n $this->logger()->warning(\"The service %s - %s does not exist.\", $key, $service);\n }\n });\n }\n }", "title": "" }, { "docid": "9943b662bba4d9e8d72d18d52b9238e5", "score": "0.59688437", "text": "public function defineSettings(){\n return array();\n }", "title": "" }, { "docid": "38f6594529aae0d9c7fdee20f38daa53", "score": "0.59497535", "text": "public function setRegistry()\n {\n $reg = controllers\\Registry::getInstance();\n foreach ($this->config as $key => $value)\n {\n $reg->setResource($key, $value, true);\n }\n\n\n }", "title": "" }, { "docid": "ccede2a0133f9f58aa8eb838cd1dc74f", "score": "0.5948121", "text": "public static function configure()\n\t\t{\n\t\t\tself::stripAllScripts();\n\t\t\t\\config\\Configuration::init();\n\t\t\t\\date_default_timezone_set(\\config\\Configuration::$vars['locale']['default_timezone']);\n\t\t\t\\User::init();\n\t\t\t\\config\\Security::init();\n\t\t\tself::setLanguage();\n\t\t\tself::setApp();\n\t\t\tself::setModule();\n\n\t\t}", "title": "" }, { "docid": "ad2f697efe71f803df7db9b3158f44e7", "score": "0.5947208", "text": "public function register_settings(){\n // Default API KEY Google Maps\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_api_key', array($this,'maps_api_validation') );\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_enable_geocode', array('type'=>'boolean') );\n register_setting( 'cf7-google-map-settings-group', 'cf7_googleMap_enable_places', array('type'=>'boolean') );\n }", "title": "" }, { "docid": "17a50b8af84b8218a787b2e1072d5a00", "score": "0.59363616", "text": "function tsuiseki_tracking_admin_init() {\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_key');\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_css_class');\n register_setting('tsuiseki-tracking-settings', 'tsuiseki_tracking_excluded_uris');\n}", "title": "" }, { "docid": "e6523bb02f2aed02b87adc0fde7c7acd", "score": "0.592483", "text": "public static function setEnvironnement()\n\t{\n\t\tUz_Autoloader::init(array(static::$framework_namespace=>$framework_path, static::$application_namespace=>static::$application_path),static::$framework_namespace,array());\n\t\t//On construit la session\n\t\tUz_Service_HTTP_Session::build();\n\t\t//On recupere la requete dans cet objet\n\t\tUz_Service_HTTP_Request::build();\n\t\tUz_Controller_Dispatcher::init(static::$application_namespace);\n\t\tUz_Mapper_Generic::init(static::configureDb());\n\t\t\n\t}", "title": "" }, { "docid": "4487cc08ca265475a78ed80c442d942f", "score": "0.5921436", "text": "public function config()\n {\n $this->app();\n $this->cms();\n $this->theme();\n $this->mail();\n }", "title": "" }, { "docid": "bae3088a6b3e3eefde42235a1590416e", "score": "0.59089816", "text": "public function admin_init() {\n\n\t\t// set the settings\n\n\t\t$this->setting_api->set_sections( $this->get_settings_sections());\n\t\t$this->setting_api->set_fields( $this->get_settings_fields() );\n\n\t\t// initialize settings\n\t\t$this->setting_api->admin_init();\n\t}", "title": "" }, { "docid": "7e9b2013a5a60f7b603b439b5d8f9770", "score": "0.59010744", "text": "private function setOptionsApp()\n {\n foreach ($this->options as $option => $value) {\n $option = HelperString::camelCase($option);\n if ($this->isApp)\n $this->data[self::$app][$option] = $value;\n else\n $this->data[$option] = $value;\n }\n }", "title": "" }, { "docid": "d1eaac9df54739301edecddd7b775592", "score": "0.58955663", "text": "function Settings_API($load_settings=true)\n\t{\n\t\t$this->ConfigFile = SENDSTUDIO_INCLUDES_DIRECTORY . '/config.php';\n\t\t$this->WhiteLabelCache = IEM_InterspireStash::getInstance();\n\n\t\tif ($load_settings) {\n\t\t\t$db = $this->GetDb();\n\t\t\t$this->LoadSettings();\n\t\t}\n\t}", "title": "" }, { "docid": "27659361dc8cc7ea1872d8c9df937ef3", "score": "0.5878151", "text": "protected function initConfiguration(){\n $settings = array(\n 'user' => 'bitshok',\n 'widget_id' => '355763562850942976',\n 'tweets_limit' => 3,\n 'follow_btn' => 'on'\n );\n Configuration::updateValue($this->name.'_settings', serialize($settings));\n }", "title": "" }, { "docid": "018ede4fdf5f09c56a91abb82435a69d", "score": "0.5870808", "text": "protected function setupBuiltInServices() {\n // generic services\n ServiceProviderInstaller::setup(new CacheServiceProvider());\n ServiceProviderInstaller::setup(new ConfigServiceProvider());\n ServiceProviderInstaller::setup(new DatabaseServiceProvider());\n ServiceProviderInstaller::setup(new FilesystemServiceProvider());\n ServiceProviderInstaller::setup(new LoggerServiceProvider());\n ServiceProviderInstaller::setup(new MiddlewareQueueServiceProvider());\n ServiceProviderInstaller::setup(new ModulesServiceProvider());\n ServiceProviderInstaller::setup(new RouterServiceProvider());\n ServiceProviderInstaller::setup(new SessionServiceProvider());\n ServiceProviderInstaller::setup(new TranslatorServiceProvider());\n ServiceProviderInstaller::setup(new UrlServiceProvider());\n ServiceProviderInstaller::setup(new VersionUriServiceProvider());\n ServiceProviderInstaller::setup(new VoltServiceProvider());\n // listener services\n $this->di->setShared('dispatcher.listener', new DispatcherListener());\n $this->di->setShared('router.listener', new RouterListener());\n $this->di->setShared('view.listener', new ViewListener());\n $this->di->setShared('db.listener', new DatabaseListener());\n // defaults\n $this->di->setShared('application', new MvcApplication());\n $this->di->setShared('dispatcher', DispatcherFactory::factory(/* module */''));\n $this->di->setShared('view', Factory::html());\n }", "title": "" }, { "docid": "8ef34f21a2b436f67edbd19395e2e10c", "score": "0.58620167", "text": "private function load_settings() {\n\t\t\n\t}", "title": "" }, { "docid": "124cc2f7847116590af1f8a1c7d84c88", "score": "0.58555126", "text": "public function set_constants() {\n\n $this->plugin_path = JCK_WSP_PATH;\n $this->plugin_url = JCK_WSP_URL;\n\n }", "title": "" }, { "docid": "51936e9cc2f0e7667079fcc55d738662", "score": "0.5848848", "text": "private function defaultInit()\n {\n // 载入设置\n $settings = require _ROOT . '/app/settings.php';\n //\n // 启动设置\n $container = new \\Slim\\Container($settings);\n $settings['logger']();\n $this->_beginTime = microtime(true);\n $this->config = $container->get('config');\n $this->redis = $container->get('redis');\n }", "title": "" }, { "docid": "aa15413a73787b29dea849a4e627451f", "score": "0.5844782", "text": "public static function setEnv()\n {\n // We are on bluemix\n if (self::onBluemix()) {\n // Copy Env values\n self::copyEnv();\n\n // Set services credentials\n self::setServiceCredentials();\n }\n }", "title": "" }, { "docid": "b4dda62d1f83e0604d964299e1b639f7", "score": "0.58441985", "text": "function wp_set_all_user_settings($user_settings)\n {\n }", "title": "" }, { "docid": "18ccc91f9a30132290723e46982f75bf", "score": "0.5832336", "text": "public function set_up() {\n\n\t\t$this::base_set_up();\n\t\tdo_action( 'rest_api_init' );\n\t\t$this->server = rest_get_server();\n\n\t}", "title": "" }, { "docid": "2b3f8bbd6319365cb383acb92e20a6c1", "score": "0.5830807", "text": "private function setSoapOptions()\n {\n $this->soapOptions['uri'] = $this->urlBase;\n $this->soapOptions['location'] = $this->urlWebService;\n $this->soapOptions['soap_version'] = $this->version;\n $this->soapOptions['exceptions'] = true;\n $this->soapOptions['trace'] = true;\n $this->soapOptions['style'] = $this->soapStyle;\n $this->soapOptions['use'] = $this->soapUse;\n }", "title": "" }, { "docid": "4c3896bf822f6d4ba6d40cfdfcefb1a2", "score": "0.5800853", "text": "public static function setGlobalSettings(array $settings): void\n {\n foreach (self::$defaultSettings as $defaultSettingKey => $defaultSettingValue) {\n self::$globalSettings[$defaultSettingKey] = (int) ($settings[$defaultSettingKey] ?? $defaultSettingValue);\n }\n }", "title": "" }, { "docid": "0b82fecb91d6f66d661b60a48c9b1e32", "score": "0.5796902", "text": "function setCommonInfo()\n\t{\n\t\t$this->configobj = new configclass();\t\t\n\t\t\n\t}", "title": "" }, { "docid": "76da1b404adc2996b103ca7649285f5e", "score": "0.5794142", "text": "private function _setConfig()\n {\n $this->_oClient->server = 'Microsoft';\n $this->_oClient->redirect_uri = Uri::get('connect','main','login','google');\n\n $this->_oClient->client_id = Config::getInstance()->values['module.api']['microsoft.client_id'];\n $this->_oClient->client_secret = Config::getInstance()->values['module.api']['microsoft.client_secret_key'];\n }", "title": "" }, { "docid": "5b7f2dc78aa0683784b4339f2f5a7bc5", "score": "0.57933354", "text": "private function installSettings()\n {\n config(['app.debug' => true]);\n Artisan::call('config:clear');\n Artisan::call('cache:clear');\n }", "title": "" }, { "docid": "1b30601eaecb9c25180490b723909104", "score": "0.5775884", "text": "protected function loadSettings() {}", "title": "" }, { "docid": "1b30601eaecb9c25180490b723909104", "score": "0.5775884", "text": "protected function loadSettings() {}", "title": "" }, { "docid": "ef3345536085671e7b04e7d889036742", "score": "0.57755804", "text": "protected function _registerServices()\n\t{\n \n /**\n * Register services that are common for all the modules . Register services that are module-specific in the respective modules\n */\n \n\t\t$di = new \\Phalcon\\DI\\FactoryDefault();\n \n $config = new \\Phalcon\\Config(array(\n\n 'application' => array(\n\n 'development' => array(\n 'staticBaseUri' => __DIR_CT__,\n 'baseUri' => __DIR_BASE__\n ),\n 'production' => array(\n 'staticBaseUri' => __DIR_CT__,\n 'baseUri' => __DIR_BASE__\n )\n ),\n ));\n \n \n \n require __REQUIRE_PATH__.\"services.php\";\n \n $this->setDI($di); \n \n\t}", "title": "" }, { "docid": "35c47bda82d9768f9c112c0bf5acc27f", "score": "0.57755584", "text": "public function setOptionsFromApi()\n {\n // Set options from the INFO method first. If settings are set in the config\n // file, use them as 'overrides', but only if they are available (ie. are\n // returned in the INFO method)\n $this->populateViewSettings();\n $this->populateSearchCriteria();\n }", "title": "" }, { "docid": "1b30601eaecb9c25180490b723909104", "score": "0.5775507", "text": "protected function loadSettings() {}", "title": "" }, { "docid": "e8ae07fa76e2b75e65aa17c84580cd6d", "score": "0.5775391", "text": "public function init()\n\t{\n\t\tini_set( \"soap.wsdl_cache_enabled\", \"0\" );\n\t}", "title": "" }, { "docid": "623b4419011d2196821ee52b00e9ec0e", "score": "0.577049", "text": "private function registerConfigServices(): void\n {\n $configServices = $this->config->di_container['services'] ?? [];\n\n foreach ($configServices as $id => $name) {\n $this->set($id, $name);\n };\n }", "title": "" }, { "docid": "1f0799fda5ed7fe3c5f033b704cf4a49", "score": "0.57627743", "text": "private function processUserSettings()\n\t{\n\t\t$settings = \\Registry::get('pr-plugin-phrails-calendar')->global;\n\t\tforeach($settings as $key => $value){\n\t\t\t$hkey = $this->getKey($key);\n\t\t\tif($key == 'company'){\n\t\t\t\t$hkey = 'PRODID';\n\t\t\t\t$value = sprintf($this->get('_PRODID'), $value);\n\t\t\t}\n\t\t\t$this->set($hkey, $value);\n\t\t}\n\t}", "title": "" }, { "docid": "c9228bd2d0b279c4a0e449b8b28a1f2e", "score": "0.5741124", "text": "public function __construct()\n\t{\n\t\t$this->setting = array_merge($this->setting, config('setting_epay', 'sms'));\n\t}", "title": "" }, { "docid": "9968febcff7fcd697e7517b8101e1dad", "score": "0.5740543", "text": "public function init(){\n\t\t$this->service = new App_UserService();\n\t\t$this->mailservice = new App_MailService();\n\t}", "title": "" }, { "docid": "9682b4acb79327385690c71ae8e2fc77", "score": "0.5738108", "text": "public function setup()\n {\n \t// rtConfig::set('your-key', $your_value);\n }", "title": "" }, { "docid": "24f7f2ded4b4b35bb53403a4ae0dd193", "score": "0.57363445", "text": "public function setSettings() {\n $this->setName(lang('Add New Task'));\n $this->setDescription(lang('Add new task to specific project.'));\n $this->setTemplateName('incoming_mail_add_task_action');\n $this->setCanUse(true);\n $this->setModuleName(TASKS_MODULE);\n $this->setPreSelected(true);\n }", "title": "" }, { "docid": "5111fec5e9c4240b96a35858c983e359", "score": "0.57292914", "text": "private static function _dbSettings()\n {\n define('DATABASE_TYPE', 'mysql'); // mysql or oracle\n define('DATABASE_HOST', 'db');\n define('DATABASE_NAME', 'fog');\n define('DATABASE_USERNAME', 'root');\n define('DATABASE_PASSWORD', 'password');\n }", "title": "" }, { "docid": "4ef837c32f82d4c24dbf581708acd22d", "score": "0.5727111", "text": "function _admin_settings() {\r\n $params = array( 'endpoint' => $this );\r\n $this->load_template( 'settings.php', $params );\r\n }", "title": "" }, { "docid": "6bc13d0810dde14b8fede76480ee66fc", "score": "0.5722831", "text": "public function set($settings)\n\t{\n\t\t$this->_settings = array_merge($this->_default_settings, $settings);\n\t}", "title": "" }, { "docid": "744470a1e96823d27f289c2bff09929a", "score": "0.57179445", "text": "function splashgate_admin_init(){\n\t\t\tregister_setting(\tSPLASHGATE_SETTINGS_GROUP, 'splashgate_options' ); // 'options' will be an array holding everything\n\t\t}", "title": "" }, { "docid": "d319f84731fa0af05585b0e08252f11c", "score": "0.5717781", "text": "function register_initial_settings()\n {\n }", "title": "" }, { "docid": "1001f9daa60f2e1752185e945fc15330", "score": "0.57156557", "text": "public function setGlobalParams($params = [])\n {\n self::globalParams($params);\n }", "title": "" }, { "docid": "fb8563574546a07a0fb1148b8cf4214e", "score": "0.5710756", "text": "public function init_settings()\n\t{\n\t\tregister_setting('jststm_testimonials_group', 'jststm_testimonials', function($input)\n\t\t{\n\t\t\tforeach($input as $i => $data)\n\t\t\t{\n\t\t\t\t$input[$i]['message'] = sanitize_text_field($data['message']);\n\t\t\t\t$input[$i]['author'] = sanitize_text_field($data['author']);\n\t\t\t}\n\n\t\t\treturn $input;\n\t\t});\n\t}", "title": "" }, { "docid": "b9bb1634a5a73fcd402a7b76a3907e1d", "score": "0.57075757", "text": "function __construct()\n {\n self::getConfig();\n self::setGlobals();\n }", "title": "" }, { "docid": "23bd7522f08718ca13599e1bc0b5ef3b", "score": "0.5702047", "text": "private function __construct() {\n \n \n $objCore = Engine_Core_Core::getInstance();\n $this->_appSetting = $objCore->getAppSetting();\n \n\n }", "title": "" }, { "docid": "cfdede631e2cfa5d8b2e876fee23ebff", "score": "0.56933665", "text": "function register_settings () {\n\t\tregister_setting( 'ajax-for-all_options' , 'ajax-for-all' );\n\t}", "title": "" }, { "docid": "f94ca2289266a5f5c07bfc13f3bff296", "score": "0.5690863", "text": "private function _setDefaults()\n {\n $this->setDefault('mysql_server', \t'localhost');\n $this->setDefault('mysql_username', 'root');\n $this->setDefault('mysql_dbname', \t'piwam');\n }", "title": "" }, { "docid": "4671e2f9798ae8faee16814efb940497", "score": "0.5688004", "text": "private function init()\n {\n foreach ($_SERVER as $key => $value) {\n $this->{$this->toCamel($key)} = $value;\n }\n }", "title": "" }, { "docid": "9d7cd95799e89b8fc6f82bebaf671d43", "score": "0.56853604", "text": "protected function setEnvironmentOptions():void\n {\n //Checks env status and sets cache and debug attributes for instance of Twig Environment\n if($this->env == self::PRODUCTION_ENV)\n {\n $twigEnvironmentOptions = [\n 'cache' => $GLOBALS['cacheDirectory'],\n 'debug' => false,\n 'charset' => $GLOBALS['charset']\n ];\n }\n\n else\n {\n $twigEnvironmentOptions = [\n 'cache' => false,\n 'debug' => true,\n 'charset' => $GLOBALS['charset']\n ];\n }\n\n $this->environmentOptions = $twigEnvironmentOptions;\n }", "title": "" } ]
c77afaca48ecdb77f6130690fcec2301
Removes block from the storage.
[ { "docid": "b2c765db2ae28684e1bd165e25e13c76", "score": "0.6313316", "text": "public function remove($name)\n {\n unset($this->blocks[$name]);\n }", "title": "" } ]
[ { "docid": "901e44713501265be92fbfaf56acd062", "score": "0.69706786", "text": "public function delete()\n {\n //Now lets delete the block and close the shared memory segment\n \n if (!shmop_delete($this->shm_id)) {\n echo \"Couldn't mark shared memory block for deletion.\";\n }\n }", "title": "" }, { "docid": "08c3be776f7935151e402b019552e44a", "score": "0.6928331", "text": "public function removeBlock($blockId);", "title": "" }, { "docid": "394d011404140f0e57f32598a2c9fb1e", "score": "0.68517524", "text": "public function removeBlock($link_id, $block_id);", "title": "" }, { "docid": "70c1f2855f6e6cb75c151b2d332459ed", "score": "0.66505915", "text": "public function destroy(Block $block)\n {\n //\n }", "title": "" }, { "docid": "2ae6b9e60bccc0a8d5264715c23aa6d0", "score": "0.6240637", "text": "public function deleteBlockById(int $id);", "title": "" }, { "docid": "c724afbc205c4c8a1676192a2c0c8f59", "score": "0.6221823", "text": "public function removeBlock($spec)\n\t{\n\t\tif ($spec instanceof Block)\n\t\t\t$spec = $spec->getKey();\n\n\t\tif (is_string($spec)) {\n\t\t\tif ($this->blocks[$spec]) {\n\t\t\t\tunset($this->blocks[$spec]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8cbe618da72d4c709380045bc7de4f26", "score": "0.61962616", "text": "public function destroy(Block $block)\n {\n $this->authorize('delete', Block::class);\n\n $page = Page::find($block->page_id);\n Text::where('table_rel', 'blocks')->where('table_id', $block->id)->delete();\n $images = Image::where('table_rel', 'blocks')->where('table_id', $block->id)->get();\n foreach($images as $image){\n $this->removeImage($image);\n }\n\n Icon::where('table_rel', 'blocks')->where('table_id', $block->id)->delete();\n $elements = Element::where('block_id', $block->id)->get();\n foreach($elements as $element){\n Text::where('table_rel', 'elements')->where('table_id', $element->id)->delete();\n $images = Image::where('table_rel', 'elements')->where('table_id', $element->id)->get();\n foreach($images as $image){\n $this->removeImage($image);\n }\n Icon::where('table_rel', 'elements')->where('table_id', $element->id)->delete();\n $element->delete();\n }\n $block->delete();\n\n return redirect()->route('admin.page.edit', $page->slug)->with('success', 'Блок удален!');\n }", "title": "" }, { "docid": "cd4f3310d2283037cf186fd219929ad2", "score": "0.6049407", "text": "public function deleteBlockByIdentifier(string $identifier);", "title": "" }, { "docid": "f1357ea9bb8630aa33594f5035e30b53", "score": "0.5935137", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // if the stash file is not referenced any more, delete it\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "493060cb88b9700b90b0bdc650fc0c62", "score": "0.5920126", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // If the stash file is not referenced any more, delete it.\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "09500e4c37c4cb971f96b7db481be104", "score": "0.58682346", "text": "public function removeBlock($blockID, $page, $region)\n {\n $template = $this->config->template->{$this->device}->name;\n $theme = $this->config->template->{$this->device}->theme;\n\n $result = $this->loadModel('block')->removeBlock($template, $theme, $page, $region, $blockID);\n $this->send($result);\n }", "title": "" }, { "docid": "c0cbbc69a4f7703e5be9c8c24dc3269a", "score": "0.5748107", "text": "public function delete() {\n global $CFG, $DB;\n\n require_once($CFG->libdir.'/blocklib.php');\n\n $bm = new block_manager();\n\n // We leave module cleanup to the manage modules tab... blocks need some help though.\n if (!empty($pageitem->blockinstance)) {\n\n $blockid = $pageitem->blockinstance;\n\n require_sesskey();\n\n $block = $bm->page->blocks->find_instance($blockid);\n\n if (!$block->user_can_edit() || !$bm->page->user_can_edit_blocks() || !$block->user_can_addto($bm->page)) {\n throw new moodle_exception('nopermissions', '', $bm->page->url->out(), get_string('deleteablock'));\n }\n\n blocks_delete_instance($block->instance);\n\n }\n\n $DB->delete_records('format_page_items', array('id' => $pageitem->id));\n \n page_update_pageitem_sortorder($pageitem->pageid, $pageitem->position, $pageitem->sortorder);\n }", "title": "" }, { "docid": "b8d1bc5d043418ff485bc2fc07c313a0", "score": "0.57341063", "text": "public function deleteAssignBlock()\n {\n $token_header = @$this->input->request_headers()['token'];\n $user_id = @$this->input->request_headers()['user_id'];\n\n if (check_token($token_header, $user_id)) {\n if (!isset($_POST['block']) || $_POST['block'] == \"\") {\n $json = array('status' => 'error', 'txt' => 'Block cannot be empty');\n } else {\n $json = $this->model->deleteAssignBlock($_POST);\n }\n } else {\n $json = array('status' => 'error', 'txt' => 'Invalid Token');\n http_response_code(401);\n }\n\n print_r(json_encode($json));\n }", "title": "" }, { "docid": "20ec0f991dbaaf0140fb06b4b3dc7680", "score": "0.57238466", "text": "public function clear(){\n $this->storage->clear();\n }", "title": "" }, { "docid": "7c27ba0af2cafc13a18b56eb92183386", "score": "0.57124454", "text": "public function destroy($id,DeleteBlockRequest $request)\n {\n \n $static_block=Staticblock::findOrFail($id);\n \n Staticblock::destroy($id);\n\n if(file_exists($static_block->feature_image)){\n unlink($static_block->feature_image);\n\n }\n\n if(file_exists($static_block->bgimage)){\n unlink($static_block->bgimage);\n\n }\n\n $rem_static_block=Staticblock::where('page','=',$static_block->page)->first();\n \n if ( $rem_static_block === null ) {\n\n return redirect()->action('Backend\\StaticblockController@index')->withFlashSuccess('Staticblocks deleted successfully'); \n }\n\n return redirect()->back()->withFlashSuccess('Staticblock deleted successfully.'); \n }", "title": "" }, { "docid": "9f4b48b192ca2bc7c8d7444590d3eb31", "score": "0.56552994", "text": "public function clear() {\n\t\t$sql = 'DELETE FROM `*PREFIX*filecache` WHERE `storage` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($this->getNumericStorageId()));\n\n\t\t$sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?';\n\t\t\\OC_DB::executeAudited($sql, array($this->storageId));\n\t}", "title": "" }, { "docid": "e18521814fcdb4b8eaeb05ebf66b96e7", "score": "0.5635723", "text": "public static function purgeBlock\n\t(\n\t\t$blockID\t\t// <int> The ID of the content block to delete.\n\t,\t$contentID\t\t// <int> The ID of the content entry.\n\t)\t\t\t\t\t// RETURNS <bool> TRUE on success, FALSE on failure.\n\t\n\t// ModuleVideo::purgeBlock($blockID, $contentID);\n\t{\n\t\tDatabase::startTransaction();\n\t\t\n\t\tif($pass = Database::query(\"DELETE FROM content_block_video WHERE id=? LIMIT 1\", array($blockID)))\n\t\t{\n\t\t\t$pass = ContentForm::deleteSegment($contentID, self::$type, $blockID);\n\t\t}\n\t\t\n\t\treturn Database::endTransaction($pass);\n\t}", "title": "" }, { "docid": "ba57ef5b5809e7e9dff4ab48e18b343a", "score": "0.5605238", "text": "public function delete()\n\t{\n\t\t$this->fs->remove($this->file);\n\t}", "title": "" }, { "docid": "be26c331661ed7bd1c99ae2cdec486d7", "score": "0.5594328", "text": "function rateBlockRemove($address)\n\t{\n\t\t$this->db->delete($this->RtTbl,array('wiki_rate_ip' => $address),__LINE__,__FILE__);\n\t}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.5593024", "text": "public function remove();", "title": "" }, { "docid": "56af6f1a226eb76f512b3fbb49148b86", "score": "0.55667037", "text": "public function clear()\n {\n $this->blocks = array();\n }", "title": "" }, { "docid": "da9127802b1fb3033dc7f15481e75355", "score": "0.55645317", "text": "public function destroy($id)\n {\n \n $isUserAdded = User::where('block_id','=',$id)->first();\n if($isUserAdded){\n return redirect('/admin/blocks')->withError('Can not delete this Block. Because some user belongs to this block.');\n }\n $block = Block::find($id);\n $block->delete();\n return redirect('/admin/blocks')->withSuccess('Block has been deleted successfully.');\n \n }", "title": "" }, { "docid": "e1d7fc3b377acec92df5f470f9640a67", "score": "0.5546265", "text": "public function destroy(Block $block)\n {\n $block->delete();\n\n return response()->json([\n 'block' => $block\n ]);\n }", "title": "" }, { "docid": "5c4d1ecf0a97bc78df90ec662a97c268", "score": "0.5469236", "text": "public function rollback() {\n \\Bitrix\\Main\\Loader::includeModule('iblock');\n $id = $this->getData()['ID'];\n IblockTable::Delete($id);\n IblockGroupTable::Delete([\n 'IBLOCK_ID'=>$id,\n ]);\n IblockSiteTable::Delete([\n 'IBLOCK_ID'=>$id,\n ]);\n IblockFieldTable::Delete([\n 'IBLOCK_ID'=>$id,\n ]);\n }", "title": "" }, { "docid": "f301110a47127b8212c6c71e78c7c312", "score": "0.54557043", "text": "function block_delete2($id) {\n\tglobal $db, $document;\n\n\tif(check_tokens($_GET['dtoken'],$_SESSION['dtoken'])){\n\t$query = $db->make_query(\"blocks\",\"DELETE\");\n\t$query->add_condition(\"block_id\",\"=\",$id);\n\t$query->set_limit(1);\n\t$query->execute();\n\n\t$document->append_template(\"simple_template\",array('title'=>\"Block deleted\",'text'=>\"The block has been deleted\"));\n\t}\n\telse{\n\t\tfatal_user_error(\"Something went wrong\",\"You were redirected here incorrectly\");\n\t}\n}", "title": "" }, { "docid": "2f5ddf194cad1d408d416d31cae16f05", "score": "0.54269534", "text": "public function delete()\n {\n Storage:: delete();\n }", "title": "" }, { "docid": "ceab6acdbc23ed7a9a41503580c0a747", "score": "0.5414222", "text": "public function delete()\n {\n $this->value = null;\n $this->hit = false;\n $this->loaded = false;\n $this->exec('del', [$this->key]);\n }", "title": "" }, { "docid": "19b2a562afcef7db10ce9b75c7e6a8dc", "score": "0.5393578", "text": "public function deleteFromDisk(): void\n {\n Storage::cloud()->delete($this->path());\n }", "title": "" }, { "docid": "b00a06d054bbb15bcff8c5938f1418f4", "score": "0.5380466", "text": "public function clear()\n\t{\n\t\tif(!$this->getStorage() instanceof Flushable) {\n\t\t\tthrow new \\Clio\\Component\\Exception\\RuntimeException('Storage dose not support flush.');\n\t\t}\n\n\t\t$this->getStorage()->flush();\n\t}", "title": "" }, { "docid": "66bc96429a174c2b23e66029ffc6c026", "score": "0.5356911", "text": "public function remove(): void\n {\n $this->content = '';\n }", "title": "" }, { "docid": "0354eb11a59ab56fb4c68c1ca1a34f9e", "score": "0.5334339", "text": "public function removeUpload(){\n if($file = $this->getAbsolutePath()){\n unlink($file);\n }\n \n }", "title": "" }, { "docid": "bf41ebc2218d9447c4f09b77189f0bb0", "score": "0.5326617", "text": "public function block_delete($pageitem) {\n global $CFG, $DB;\n\n include_once($CFG->libdir.'/blocklib.php');\n\n // We leave module cleanup to the manage modules tab... blocks need some help though.\n if ($blockinstance = $DB->get_record('block_instances', array('id' => $pageitem->blockinstance))) {\n\n // See if this is the last reference to the blockinstance.\n $count = $DB->count_records('format_page_items', array('blockinstance' => $pageitem->blockinstance));\n\n if ($count == 1) {\n if ($block = blocks_get_record($blockinstance->id)) {\n if ($block->name != 'navigation' || $block->name != 'settings') {\n /*\n * At this point, the format has done all of its own checking,\n * hand it off to block API\n */\n blocks_delete_instance($blockinstance);\n }\n }\n }\n }\n\n $DB->delete_records('format_page_items', array('id' => $pageitem->id));\n }", "title": "" }, { "docid": "680170dae622eedce573be6ddf82f8db", "score": "0.53199846", "text": "public function removeStorage($imgName,$storageName);", "title": "" }, { "docid": "11738d982f46b29807825dc6c1df193f", "score": "0.53170085", "text": "public function afterDelete()\n {\n if ($this->cachedDeletedId) {\n foreach (NavItemPageBlockItem::find()->where(['block_id' => $this->cachedDeletedId])->all() as $item) {\n $item->delete();\n }\n }\n parent::afterDelete();\n }", "title": "" }, { "docid": "16eab9add26ffe1490b5308a56e9c13f", "score": "0.53136927", "text": "public function fileDeleted()\n {\n $this->media = null;\n }", "title": "" }, { "docid": "a49f7c1d98f2cb9e632e67c703e98f68", "score": "0.53134394", "text": "public function clear ()\n {\n if (!$this->isAvailable()) {\n throw new StorageUnavailableException();\n }\n\n $this->cfg['db']->query(\"DELETE FROM `\" . $this->cfg['table'] . \"` WHERE `client_id` = '\" . $this->sessionId . \"'\");\n }", "title": "" }, { "docid": "5070aea2a62cc2d1308d997feeb3b888", "score": "0.53106177", "text": "public function delete($height){\n if ($height < 2) {\n $height = 2;\n }\n\n $sql=OriginSql::getInstance();\n $r = $sql->select('block','*',0,array(\"height>\".$height),'height DESC',0);\n if (count($r) == 0) {\n return true;\n }\n\n\n\n $Transaction = Transactioninc::getInstance();\n \n $sql->lock_tables();\n $sql->beginTransaction();\n foreach ($r as $x) {\n $res = $Transaction->delete_transactions_to_mempool_from_block($x['id']);\n if ($res === false) {\n $this->log('block.inc->delete A transaction could not be reversed. Delete block failed. false',0,true);\n $sql->rollback();\n $sql->unlock_tables();\n return false;\n }\n\n $res=$sql->delete('block',array(\"id='\".$x['id'].\"'\"));\n if ($res != 1) {\n $this->log('block.inc->delete Delete block failed false',0,true);\n $sql->rollback();\n $sql->unlock_tables();\n return false;\n }\n }\n\n $sql->commit();\n $sql->unlock_tables();\n $this->log('block.inc->delete del blocks'.$height.' true',0,true);\n return true;\n }", "title": "" }, { "docid": "b489ae56f2ced6358601251cb2551e2a", "score": "0.53024155", "text": "static function unblock($fileOrID) {\n\t\tunset(self::$blocked[$fileOrID]);\n\t}", "title": "" }, { "docid": "55c7ad8b7e02a553f39088a5489d1655", "score": "0.530073", "text": "function page_block_delete($pageitem) {\n global $CFG, $COURSE;\n\n require_once($CFG->libdir.'/blocklib.php');\n\n // we leave module cleanup to the manage modules tab... blocks need some help though.\n if (!empty($pageitem->blockinstance)) {\n if ($blockinstance = get_record('block_instance', 'id', $pageitem->blockinstance)) {\n // see if this is the last reference to the blockinstance\n $count = count_records('format_page_items', 'blockinstance', $pageitem->blockinstance);\n if ($count == 1) {\n if ($block = blocks_get_record($blockinstance->blockid)) {\n if ($block->name != 'course_menu') {\n // At this point, the format has done all of its own checking,\n // hand it off to block API\n blocks_delete_instance($blockinstance);\n }\n }\n }\n }\n }\n\n delete_records('format_page_items', 'id', $pageitem->id);\n\n execute_sql(\"UPDATE {$CFG->prefix}format_page_items\n SET sortorder = sortorder - 1\n WHERE pageid = $pageitem->pageid\n AND position = '$pageitem->position'\n AND sortorder > $pageitem->sortorder\", false);\n}", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.5279051", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "5b63690c0890c4e4dc4f235e20d6f81c", "score": "0.5278895", "text": "public function wipe() {\n // We are not truncating the entity table so hooks are fired.\n $query = new \\EntityFieldQuery();\n $results = $query\n ->entityCondition('entity_type', 'cache_fragment')\n ->execute();\n if (empty($results['cache_fragment'])) {\n return;\n }\n $this->delete(array_keys($results['cache_fragment']));\n }", "title": "" }, { "docid": "10dcb37895144846913467284c167bf6", "score": "0.5276808", "text": "public function delete()\n {\n // Implemented in DAVRootPoolFile\n if ($poolNode = $this->getDAVRootPoolObject()) {\n $poolNode->delete();\n }\n }", "title": "" }, { "docid": "e13db6a896adc7984807021e7ab8cf68", "score": "0.52634424", "text": "public function destroy($id)\n\t{\n\t\tBlock::destroy($id);\n\n\t\treturn Redirect::route('admin.blocks');\n\t}", "title": "" }, { "docid": "02f58c79d9ffce7b35b939b4e89b1629", "score": "0.5260841", "text": "private function removeLock($storageFile) {\n @unlink ( $storageFile . '.lock' );\n }", "title": "" }, { "docid": "02838be8eff9cce307e78451f2ad301c", "score": "0.52571976", "text": "function unblock($fileOrID) {\n\t\tif(isset($this->blocked[$fileOrID])) unset($this->blocked[$fileOrID]);\n\t}", "title": "" }, { "docid": "7df5fee5131de67335fec7abcf50295f", "score": "0.52563655", "text": "public function delete_block($block_id)\n\t{\n\t\t// An exception will be thrown if page identifier is invalid\n\t\t// Delete the page from the database\n\t\t$sql = 'DELETE FROM ' . $this->blocks_table . '\n\t\t\tWHERE block_id = ' . (int) $block_id;\n\t\t$this->db->sql_query($sql);\n\n\t\t// Return true/false if a block was deleted\n\t\treturn (bool) $this->db->sql_affectedrows();\n\t}", "title": "" }, { "docid": "0a1834b617d6aed7768934b9ede0b64b", "score": "0.5189164", "text": "protected function deleteBlock($id) {\n $orig_success_message = 'The block ' . $this->blocks[$id]->label() . ' has been removed from the Footer region.';\n\n $this->drupalGet('admin/structure/block/manage/' . $this->blocks[$id]->id(), ['query' => ['destination' => 'admin']]);\n $this->clickLink('Remove block');\n $this->submitForm([], 'Remove');\n $this->assertSession()->pageTextContains($orig_success_message);\n }", "title": "" }, { "docid": "d8bc7ea25100ba4f4777f21d69a9d528", "score": "0.51753837", "text": "protected function removeOldPhoto() {\r\n if ($this->photo_id) {\r\n $item = Engine_Api::_()->storage()->get($this->photo_id);\r\n\r\n $table = Engine_Api::_()->getItemTable('storage_file');\r\n $select = $table->select()\r\n ->where('parent_type = ?', $this->getType())\r\n ->where('parent_id = ?', $this->getIdentity());\r\n\r\n foreach ($table->fetchAll($select) as $file) {\r\n try {\r\n $file->delete();\r\n } catch (Exception $e) {\r\n if (!($e instanceof Engine_Exception)) {\r\n $log = Zend_Registry::get('Zend_Log');\r\n $log->log($e->__toString(), Zend_Log::WARN);\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "31e5cc4a0b6af59482a96519deaba446", "score": "0.5145894", "text": "public function delete()\r\n {\r\n $directory = rtrim(config('infinite.upload_path'), \"/\");\r\n\r\n Storage::delete($directory . '/' . $this->file_name . '.' . $this->extension);\r\n }", "title": "" }, { "docid": "414802d9c43d34c4cc9fb20ef5c28632", "score": "0.5143757", "text": "public function removeUpload()\n {\n if ( isset($this->temp) && file_exists( $this->temp ) ) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "73c704a80ae4a82903ee86a2b821245a", "score": "0.51395303", "text": "public function delete()\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "2065ecfaf878d9ef05728388e2cc7fbb", "score": "0.51307", "text": "public function deleteBlock() \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n{\t$this->autorender = false;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t$this->layout = null;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t$this->render('ajax');\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n $thisFile=$this->request->data('thisFile');\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t$Index=$this->request->data('Index');\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n \t$DirInfo=$this->Get_FolderID($thisFile);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n \t$editPerm=$this->Get_Permissions('edit', $this->Auth->user('id'), $thisFile);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\tif ($editPerm=='1')\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t{\t$parentJob = $this->Workspace->find('first', array('conditions' => array('Workspace.id' => $DirInfo['ID']), 'recursive'=>1));\t\t\t\t\t\t\t\t\t//\n\t\t$children = $this->Workspace->find('threaded', array('conditions' => array('Workspace.lft BETWEEN ? AND ?' => array($parentJob['Workspace']['lft'], $parentJob['Workspace']['rght'])), 'fields'=>array('name', 'lft', 'rght', 'parent_id', 'id'), 'recursive'=>1));\t\t\t\n\t\tforeach ($children as $thisIndex=>$thisfolder)\t{\t$this->blockDeleter($thisfolder, 0, $Index, $thisFile);\t}\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n}", "title": "" }, { "docid": "6be449c966561e32c76341978a92ee01", "score": "0.51270884", "text": "public function delete()\n\t{\n\t\t$this->_oldData = null;\n\t\t\n\t\treturn $this->_storage->delete($this->_level, $this->_subLevel, $this->key);\n\t}", "title": "" }, { "docid": "aeb429e28b909bc312d6196825e60689", "score": "0.5126395", "text": "public function removed() {\n\t}", "title": "" }, { "docid": "459fef2c107f6298be2f4e357338b51c", "score": "0.51231563", "text": "public function clear()\n {\n $this->resolvedIdentity = null;\n $this->getStorage()->clear();\n }", "title": "" }, { "docid": "0e347a8a8dafe8f4037b4fc0bb6910de", "score": "0.5100709", "text": "public function destroy($id)\n {\n $block = Blocks::findOrFail($id);\n\n $block->status = '3';\n\n if ($block->save()){\n return response()->json([\n 'message' => 'Block has been deleted']);\n } \n }", "title": "" }, { "docid": "7bf9d19294d9bbced0784c3ad45871a0", "score": "0.50979906", "text": "function deleteFromBlockvariablelist($block, $variables) {\n \n if (!is_array($variables))\n $variables = array($variables => true);\n \n reset($this->blockvariables[$block]);\n while (list($k, $varname) = each($this->blockvariables[$block])) \n if (isset($variables[$varname])) \n unset($this->blockvariables[$block][$k]);\n \n }", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5097525", "text": "public function removeRecord();", "title": "" }, { "docid": "088987cc33a39637678ad3d52c3c4527", "score": "0.5087955", "text": "public function offsetUnset($offset) { $this->storage->offsetUnset($offset); }", "title": "" }, { "docid": "d5c119a00d978725ddb6983077b3f4d4", "score": "0.5085943", "text": "public function remove()\n\t{\n\t\tif($this->id)\n\t\t{\n\t\t\tglobal $db;\n\n\t\t\t// attempt to delete it and return the result\n\t\t\treturn $db->query(\"DELETE FROM \" . TABLE_PREFIX . \"sideboxes WHERE id='\" . (int) $this->id . \"'\");\n\t\t}\n\t}", "title": "" }, { "docid": "6e3748c61c08face50f471b6a6567e8c", "score": "0.50855863", "text": "function remove(){\n\t\tglobal $db;\n\t\t$db->Execute(\"delete from \" . TABLE_INVENTORY . \" where id = \" . $this->id);\n\t\tif($this->image_with_path != '') {\n\t\t\t$result = $db->Execute(\"select * from \" . TABLE_INVENTORY . \" where image_with_path = '\" . $this->image_with_path .\"'\");\n\t \t\tif ( $result->RecordCount() == 0) { // delete image\n\t\t\t\t$file_path = DIR_FS_MY_FILES . $_SESSION['company'] . '/inventory/images/';\n\t\t\t\tif (file_exists($file_path . $this->image_with_path)) unlink ($file_path . $this->image_with_path);\n\t \t\t}\n\t\t}\n\t \t$db->Execute(\"delete from \" . TABLE_INVENTORY_SPECIAL_PRICES . \" where inventory_id = '\" . $this->id . \"'\");\n\t \t$db->Execute(\"delete from \" . TABLE_INVENTORY_PURCHASE . \" where sku = '\" . $this->sku . \"'\");\n\t\tgen_add_audit_log(INV_LOG_INVENTORY . TEXT_DELETE, $this->sku);\n\t}", "title": "" }, { "docid": "00adb56dbc4076ad0625dde46983811c", "score": "0.5085507", "text": "public function removeUpload()\n\t{\n\t\tif ($file = $this->getAbsolutePath()) {\n\t\t\tunlink($file);\n\t\t}\n\t}", "title": "" }, { "docid": "3d15cc94d13dac0661ebc4a906058727", "score": "0.50855035", "text": "public function closeCurrentBlock()\n {\n $this->checkLoadedTpl();\n $this->currentBlock = \"\";\n }", "title": "" }, { "docid": "8e948907780e0ece2141b3d2f3a819dd", "score": "0.5079433", "text": "public function deleteById($blockId)\n {\n return $this->delete($this->getById($blockId));\n }", "title": "" }, { "docid": "3f431f19ede67592f289f60453a03764", "score": "0.5068071", "text": "public static function clearQueue()\n {\n $resource = Mage::getSingleton('core/resource');\n $adapter = $resource->getConnection('core_write');\n $table = $resource->getTableName('pulchqueue/labour');\n\n $adapter->delete($table);\n }", "title": "" }, { "docid": "0b2dd1e36bd3fd02e3482b2c18f9093f", "score": "0.50654614", "text": "public function clearIdentity()\n {\n $this->getStorage()->clear();\n }", "title": "" }, { "docid": "0b2dd1e36bd3fd02e3482b2c18f9093f", "score": "0.50654614", "text": "public function clearIdentity()\n {\n $this->getStorage()->clear();\n }", "title": "" }, { "docid": "baf0260e4713dcc46393995f4c33bd3c", "score": "0.5062357", "text": "public function clear()\n {\n $this->store::del($this->cacheKey);\n }", "title": "" }, { "docid": "9cb8d2f75aa6bd6e6a2425918c9492bc", "score": "0.5061504", "text": "protected function delete(){\n\t\tif($this->cacheStorage->delete($this->hashKey)){\n\t\t\treturn $this->removeFromList();\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "af9a265c3646cf8d65236bc116a408cf", "score": "0.50407606", "text": "abstract public function deleteFromStore();", "title": "" }, { "docid": "7eb07f6c8c0c06c37c8cd48e473bb485", "score": "0.5029846", "text": "public function test_unregister_block_type() {\n\t\t$name = 'core/paragraph';\n\t\t$settings = array(\n\t\t\t'icon' => 'editor-paragraph',\n\t\t);\n\n\t\t$this->registry->register( $name, $settings );\n\t\t$block_type = $this->registry->unregister( $name );\n\t\t$this->assertSame( $name, $block_type->name );\n\t\t$this->assertSame( $settings['icon'], $block_type->icon );\n\t\t$this->assertFalse( $this->registry->is_registered( $name ) );\n\t}", "title": "" }, { "docid": "a08754877b76ec63671bb09b5ba89683", "score": "0.50287986", "text": "public function erase();", "title": "" }, { "docid": "3be277bff967b007db701338601bba53", "score": "0.5025861", "text": "public function deleteUnused() {\n\n $file = Engine_Api::_()->getItem('storage_file', $this->file_id);\n if ($file) {\n $table = Engine_Api::_()->getDbtable('albumsongs', 'sesmusic');\n $count = $table->select()\n ->from($table->info('name'), 'count(*) as count')\n ->where('file_id = ?', $file->getIdentity())\n ->query()\n ->fetchColumn(0);\n if ($count <= 1) {\n try {\n $file->remove();\n } catch (Exception $e) {\n \n }\n }\n }\n $this->delete();\n }", "title": "" }, { "docid": "f81f29cf616264caf10d0ed44f978fe2", "score": "0.50171834", "text": "public function destroy($id)\n {\n Block::destroy($id);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "c6b75c0f1a9f60c0758b3930d913efdc", "score": "0.50057596", "text": "public function removeBlock($id) // {{{\n {\n // do not getBlocks to retrieve block, to not trigger min block enforcer\n\n if (!isset($this->_blocks[$id])) {\n return false;\n }\n\n $removed = array();\n foreach ($this->_blocks[$id] as $name => $element) {\n $this->removeElement($element->getName());\n $removed[$name] = $element;\n }\n unset($this->_blocks[$id]);\n\n $this->_dirtyIndex = true;\n\n return $removed;\n }", "title": "" }, { "docid": "90ed2fbe159714429baa05a4796e3ed0", "score": "0.49869895", "text": "public function destroy() { return $this->rm_storage_dir(); }", "title": "" }, { "docid": "b4ab51c94ef63937d630de41df208388", "score": "0.4984933", "text": "public function unBlock(Request $request){\n\t\t$uid = $request->uid;\n\n\t\tJWTAuth::user()->block()->detacht($uid);\n\t\treturn response()->json([\n\t\t\t'status' => true,\n\t\t\t'message' => 'User profile successfully updated',\n\t\t], 200);\n\n\t}", "title": "" }, { "docid": "7a43137f4efdd7a170964b9d17a98c52", "score": "0.4984898", "text": "function disconnect()\n {\n $this->_storage->disconnect();\n }", "title": "" }, { "docid": "be30aac916727553cebb382249160a34", "score": "0.49837622", "text": "public function delCBlock()\n\t{\n\t\t/* Check ID */\n\t\t$cbid = intval( $this->request['cbid'] );\n\t\t\n\t\tif ( !$cbid || $this->request['cbid'] != $cbid )\n\t\t{\n \t\t\t$this->registry->output->showError( 'incorrect_use', 106142, null, null, 404 );\n\t\t}\n\n\t\t/* Get the content block details */\n\t\t$cblock\t= $this->DB->buildAndFetch( array( \n\t\t\t\t\t\t\t\t\t'select' => \"bc.*\",\n\t\t\t\t\t\t\t\t\t'from' => array('blog_cblocks' => 'bc'),\n\t\t\t\t\t\t\t\t\t'add_join' => array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select' => 'bdc.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from' => array( 'blog_default_cblocks' => 'bdc' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where' => \"bc.cblock_ref_id=bdc.cbdef_id and bc.cblock_type='default' and bdc.cbdef_locked=0\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select' => 'bcc.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'from' => array( 'blog_custom_cblocks' => 'bcc' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'where' => \"bc.cblock_ref_id=bcc.cbcus_id and bc.cblock_type='custom'\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'left'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t'where'\t => \"bc.cblock_id={$cbid} AND (bdc.cbdef_id IS NOT NULL OR bcc.cbcus_id IS NOT NULL)\"\n\t\t\t\t\t\t )\t);\n\n\t\tif( ! $cblock['cblock_type'] == 'custom' )\n\t\t{\n \t\t\t$this->registry->output->showError( 'incorrect_use', 106143 );\n\t\t}\n\n\t\t/* Check permissions */\n\t\tif( ! $this->memberData['g_is_supmod'] and ! $this->memberData['_blogmod']['moderate_can_editcblocks'] )\n\t\t{\n\t\t\tif( $cblock['member_id'] != $this->memberData['member_id'] )\n\t\t\t{\n \t$this->registry->output->showError( 'no_blog_mod_permission', 106141, null, null, 403 );\n \t}\n\t\t}\n\n\t\t//-----------------------------------------\n\t\t// We are good to go, just delete it starting with attachments\n\t\t//-----------------------------------------\n\t\t$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('core') . '/sources/classes/attach/class_attach.php', 'class_attach' );\n\t\t$class_attach = new $classToLoad( $this->registry );\n\t\t$class_attach->type = 'blogcblock';\n\t\t$class_attach->init();\n\n\t\t$class_attach->bulkRemoveAttachment( array( $cblock['cbcus_id'] ) );\n\t\t$this->DB->delete( 'blog_custom_cblocks', \"cbcus_id={$cblock['cbcus_id']}\" );\n\t\t$this->DB->delete( 'blog_cblocks' , \"cblock_id={$cblock['cblock_id']}\" );\n\t\t\n\t\t/* Update cache */\n\t\t$classToLoad = IPSLib::loadLibrary( IPSLib::getAppDir('blog') . '/sources/classes/contentblocks/blocks.php', 'contentBlocks', 'blog' );\n\t\t$cblock_lib\t= new $classToLoad( $this->registry );\n\t\t$cblock_lib->recacheAllBlocks( $this->blog['blog_id'] );\n\t\t\n\t\t/* Moderator Log */\n\t\t$this->addModLog( sprintf( $this->lang->words['modlog_del_cb'], $this->blog['blog_id'], $this->blog['blog_name'], $cblock['cbcus_name'] ) );\n\t\t\n\t\t/* Redirect */\n\t\t$blog_url = str_replace( \"&amp;\", \"&\", $this->registry->blogFunctions->getBlogUrl( $this->blog['blog_id'], $this->blog['blog_seo_name'] ) );\n\t\t$this->registry->output->silentRedirect( $blog_url );\n\t}", "title": "" }, { "docid": "7190c9ed0883a78bcf54c98903b56fab", "score": "0.4979091", "text": "public function remove()\n {\n $master = $this->master;\n\n $stacks = array();\n\n if (! is_null($master)) {\n $location = $master['location'];\n\n try {\n if ($this->filesystem->has($location)) {\n $this->filesystem->delete($location);\n }\n } catch (FileNotFoundException $e) {\n // File not found on S3.\n }\n\n // Fire a result to callback.\n $onRemove = $this->config['onRemove'];\n\n if ($onRemove instanceof Closure) {\n $onRemove($master);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "a2754488896ea090fe5191a49d9d85b9", "score": "0.49753436", "text": "public function deleteFile()\n { \n StorageService::deleteFile($this);\n }", "title": "" }, { "docid": "0bf7ac5c825cc539c29f80a254ee202e", "score": "0.4974113", "text": "public function mediaDeleted()\n {\n $this->media = null;\n }", "title": "" }, { "docid": "f01337e3d0cbe7d57e18ba99f73199f1", "score": "0.49588904", "text": "function delete() {\n foreach ($this->content as $link) {\n $content = $this->loadContentObj($link);\n if (!is_object($content)) {\n continue;\n }\n $content->parent = \"\";\n superprint($content->title);\n superprint($content->parent);\n $content->save();\n }\n\n //delete link in parent\n if (is_file($this->parent)) {\n $parent = file_load_object($this->parent);\n $parent->removeContent($this->id);\n $parent->setDefaultID();\n $parent->save();\n //superprint($parent);\n }\n\n // delete section object\n $obj = $this->getFileName();\n if (is_file($obj)) {\n copy($obj, BACKUP_FOLDER . \"/\" . $this->id . \".obj\");\n unlink($obj);\n }\n }", "title": "" }, { "docid": "6c7f18df0cc0a4cc5487c97eb937554c", "score": "0.49569476", "text": "public function remove()\n {\n $this->parentNode->removeChild($this);\n }", "title": "" }, { "docid": "35bd40c12379df99ff64f85e1cfc332d", "score": "0.49544805", "text": "public function block()\n {\n AdminController::loginverification();\n\n $user = User::withTrashed()->where('id', request('subject'))->first();\n\n if($user->trashed()){\n\n $user->restore();\n }\n else{\n $user->delete();\n }\n\n }", "title": "" }, { "docid": "0b5f63621cdf973ce9eca9379889a092", "score": "0.49540183", "text": "public function instance_delete() {\n global $CFG, $COURSE;\n require_once(\"{$CFG->dirroot}/blocks/supervised/lib.php\");\n cleanup($COURSE->id);\n }", "title": "" }, { "docid": "5b0f7962d0d896b773d0a784a6d8ecf4", "score": "0.49528885", "text": "protected function deleteExpiredFromTable(string $table, int $block_seconds)\n\t{\n\t\t$this->app->db->writeQuery(\"DELETE FROM {$table} WHERE `timestamp` < UNIX_TIMESTAMP() - {$block_seconds} AND scope = :scope\", ['scope' => $this->scope]);\n\t}", "title": "" }, { "docid": "9553f25d3b462824f1a5120fd457f8ec", "score": "0.4949772", "text": "public function remove()\n {\n return $this->detach();\n }", "title": "" }, { "docid": "aac2ac65ac07aa73b7a4af1f4205d42c", "score": "0.49396878", "text": "function block_delete($id) {\n\tglobal $db, $document;\n\n\t$token=make_token();\n\t$_SESSION['dtoken']=$token;\n\t$document->append_template(\"window\",array('title'=>\"Delete block?\",'content'=>\"Are you sure you want to delete this block?<br/><br/>\" .\n\t\t'<a href=\"$siteurl/admin.php/blocks/delete2/' . $id .'?dtoken='.$token. '\">Yes</a> | <a href=\"$siteurl/index.php\">No</a>'));\n\n\tblock_list();\n}", "title": "" }, { "docid": "2b7f36662e593c09aa150a7160323ccb", "score": "0.49370942", "text": "public function remove($data);", "title": "" }, { "docid": "53eee40f2e33c1c3b53b819bb59d254d", "score": "0.4932721", "text": "public function delete()\n {\n Storage::delete($this->path);\n return parent::delete();\n }", "title": "" }, { "docid": "dd6ec1fe0a6c541318738f63efce2bcf", "score": "0.49317938", "text": "public function erase()\n {\n $this->content = '';\n }", "title": "" }, { "docid": "ec763a9420d1223b2a89ce3c0558b81d", "score": "0.4927202", "text": "public function removeMount() {\n\t\treturn $this->manager->removeShare($this->mountPoint);\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "89b3aa115bc60c740dad0ac5fbadecf5", "score": "0.0", "text": "public function edit(CarFuel $carFuel)\n {\n //\n }", "title": "" } ]
[ { "docid": "d7ce48ce019e0bea04d049b9105b5e4d", "score": "0.7734901", "text": "public function edit(Resource $resource)\n {\n return view('dashboard.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "84ff2076d8b6fd70c23777380e8adaff", "score": "0.71830827", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "69c216f7c250a093fe39e8866f35d42b", "score": "0.7131727", "text": "public function editAction()\n\t{\n\t\t$id = $this->getRequest()->getParam('id');\n\t\t// Check to see if they specified id in the url and its a valid id\n\t\tif($id == null || !intval($id)) {\n\t\t\t// Redirect because to view a project, they have to specify one in the url\n\t\t\t$this->_redirect($this->view->baseUrl('/resources/'));\n\t\t\texit();\n\t\t}\n\n\t\t$resource = Application_Model_Document_Resource::find($id);\n\n\t\t// Define the form\n\t\t$form = new Application_Form_Resource(\n\t\t\t\tarray(\n\t\t\t\t\t\t'action' => $this->view->baseUrl('/resources/edit/id/'.$id),\n\t\t\t\t\t\t'submitLabel' => 'Update'\n\t\t));\n\n\t\t//Check to see if the user has submited the form or just requesting it\n\t\tif ($this->_request->getPost()) { // Form is submited, now we populate proper database object to reflect changes\n\t\t\t// Check if form is valid\n\t\t\tif ($form->isValid($this->_request->getPost())) {\n\t\t\t\t// Assign all the form values to our updateProject to save\n\t\t\t\t$resource->name->first = $form->getValue('first_name');\n\t\t\t\t$resource->name->middle = $form->getValue('middle_name');\n\t\t\t\t$resource->name->last = $form->getValue('last_name');\n\t\t\t\t$resource->phone->capgemini = $form->getValue('phone_number');\n\t\t\t\t$resource->email->capgemini = $form->getValue('email');\n\n\t\t\t\t$resource->address = new Shanty_Mongo_Document();\n\t\t\t\t$resource->address->line1 = $form->getValue('address1');\n\t\t\t\t$resource->address->line2 = $form->getValue('address2');\n\t\t\t\t$resource->address->city = $form->getValue('city');\n\t\t\t\t$resource->address->state = $form->getValue('state');\n\t\t\t\t$resource->address->country = $form->getValue('country');\n\n\t\t\t\t$resource->office_base = Application_Model_Document_OfficeBase::find($form->getValue('office_base'));\n\n\t\t\t\t$resource->resource_type= Application_Model_Document_ResourceType::find($form->getValue('resource_type'));\n\t\t\t\t$resource->title = Application_Model_Document_ResourceTitle::find($form->getValue('title'));\n\t\t\t\t$resource->save();\n\t\t\t\t// Redirect to the resource profile\n\t\t\t\t//$this->_redirect($this->view->baseUrl('/resources/view/id/'.$id));\n\t\t\t\t$this->_redirect('/resources/view/id/'.$id);\n\t\t\t\texit();\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$form->populate($formData);\n\t\t\t}\n\t\t}\n\n\t\t$formData = array(\n\t\t\t\t'first_name' => $resource->name->first,\n\t\t\t\t'middle_name' => $resource->name->middle,\n\t\t\t\t'last_name' => $resource->name->last,\n\t\t\t\t'phone_number' => $resource->phone_number,\n\t\t\t\t'email' => $resource->email->capgemini,\n\t\t\t\t'resource_type' => $resource->resource_type->_id,\n\t\t\t\t'title' => $resource->title->_id,\n\t\t\t\t'address1' => $resource->address->line1,\n\t\t\t\t'address2' => $resource->address->line2,\n\t\t\t\t'city' => $resource->address->city,\n\t\t\t\t'state' => $resource->address->state,\n\t\t\t\t'country' => $resource->address->country,\n\t\t\t\t'office_base' => $resource->office_base->_id\n\t\t);\n\t\t$form->populate($formData);\n\t\t$this->view->form = $form;\n\t}", "title": "" }, { "docid": "522c839636c7afd00a2fe6a013af3288", "score": "0.7100264", "text": "public function editAction()\r\n {\r\n $id = (int) $this->params()->fromRoute('id', 0);\r\n if (!$id) {\r\n return $this->redirect()->toRoute('resources', array(\r\n 'action' => 'add'\r\n ));\r\n }\r\n $resources = $this->getResourcesTable()->getResources($id);\r\n\r\n $form = new ResourcesForm();\r\n $form->bind($resources);\r\n\r\n $request = $this->getRequest();\r\n if ($request->isPost()) {\r\n $form->setInputFilter($resources->getInputFilter());\r\n $form->setData($request->getPost());\r\n\r\n if ($form->isValid()) {\r\n $confirm = $this->getResourcesTable()->saveResources($form->getData());\r\n\r\n $redirect = false;\r\n if (!empty($confirm['status'])) {\r\n switch ($confirm['status']) {\r\n case '1':\r\n $redirect = true;\r\n $this->flashMessenger()->addMessage(array('success' => $this->message->success));\r\n break;\r\n default:\r\n $this->flashMessenger()->addMessage(array('error' => $this->message->error));\r\n break;\r\n }\r\n }\r\n\r\n if ($redirect) {\r\n // Redirect to list of resourcess\r\n return $this->redirect()->toRoute('resources');\r\n }\r\n }\r\n }\r\n $this->vm->setVariables(array(\r\n 'flashMessages' => $this->flashMessenger()->getMessages(),\r\n 'id' => $id,\r\n 'form' => $form,\r\n ));\r\n\r\n return $this->vm;\r\n }", "title": "" }, { "docid": "da99e35334c7018154ed595f09e0337d", "score": "0.7089427", "text": "public function edit()\n {\n $this->form_data = ['route' => [self::$prefixRoute.'update', $this->company->id], 'method' => 'PUT', 'files' => true];\n\n return $this->getFormView();\n }", "title": "" }, { "docid": "787234d6f7dee1b56f411f3e6e54bcfb", "score": "0.7033331", "text": "public function editForm() {\n\t\t$data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$this->parent->urlPathParts[2]));\n\t\n\t\t$this->getView(\"editform\", $data);\n\t}", "title": "" }, { "docid": "e465503e79b8b4032e36d093e233408b", "score": "0.70309556", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('HarmonyVisualizerMainBundle: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('HarmonyVisualizerMainBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a096f3cd2e5784ea3a48675da26784cc", "score": "0.70097554", "text": "public function edit()\n {\n $parameters = func_get_args();\n $id = end($parameters);\n\n $this->getPermissionClass()->canEditOrFail();\n $entry = $this->getEntry($id);\n\n $urlBuilder = $this->getUrlBuilderClass($parameters);\n\n /** @var HorizontalFormBuilder $form */\n $form = app('bootform.horizontal');\n $form->setColumnSizes($this->getColumnSizes());\n $form->bind($entry);\n\n /** @var FormOpen $formStart */\n $formStart = $form->open();\n $formStart->action($urlBuilder->getUrlUpdate($entry->getKey()));\n $formStart->put();\n\n $formFields = $this->getForm($form, $entry);\n\n /** @var FormBuilder $formClose */\n $formClose = $form->close();\n $title = $this->getUrlEditText();\n SEO::setTitle($title);\n\n return view($this->getViewEdit(), compact('title', 'formStart', 'formClose', 'formFields'));\n }", "title": "" }, { "docid": "55e536ea6ad0a0b81445c206780c630d", "score": "0.69938177", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->administration_route->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['administration_route' => $this->administration_route]);\n\t}", "title": "" }, { "docid": "b663c6d8125fb6314c3a0e4886cb4291", "score": "0.6975116", "text": "public function edit($id)\n {\n if (Input::get('ajax')) {\n return $this->_resourcePersistence->get($id);\n }\n\n return view('admin.' . $this->resource . '.edit')\n ->with('resource', $this->resource)\n ->with('id', $id);\n }", "title": "" }, { "docid": "a0cf5deb0843bc2a9372021f983bd7df", "score": "0.69728345", "text": "public function edit(Form $form)\n\t{\n\t\t$form->load('customer');\n\t\treturn view('forms.edit', compact('form'));\n\t}", "title": "" }, { "docid": "73dff086054dea68e61138da96c78b9d", "score": "0.69669014", "text": "public function edit(Form $form)\n {\n //\n return view('edit', compact('form'));\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6945275", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "d8d18a53a00c5863abebafd6f478f9af", "score": "0.6936903", "text": "public function edit($id)\n {\n // $data = array_merge([\n // // 'tabs' => TabManager::get($this->getModel()->getTable()),\n // $this->getResourceName() => $this->getEntity($id),\n // ], $this->getFormData('edit', $id));\n\n $data = $this->getFormData('edit', $id);\n return view(\"{$this->viewPath}.edit\", $data);\n }", "title": "" }, { "docid": "af7e0ad74f788224046bea8997ba82fd", "score": "0.691101", "text": "function edit(Form $form);", "title": "" }, { "docid": "ddb6541ea87bc5a805d84b200c4d3330", "score": "0.6900641", "text": "private function editForm()\n {\n $m = $this->getViewModel();\n\n $blog = $m->blog;\n\n $m->isApprover = true; // isApprover()\n\n $stylelist = BlogView::getStyleList();\n\n $id = $blog->id;\n \n \n if ($m->revid === 0) {\n $m->revid = intval($blog->revision);\n }\n\n $m->revision = BlogRevision::findFirst('blog_id='.$id.' and revision='.$m->revid);\n \n // submit choices\n $m->rev_list = [\n 'Save' => 'Save',\n 'Revision' => 'Save as new revision',\n ];\n\n $m->title = '#' . $id;\n $m->stylelist = $stylelist;\n $m->catset = BlogView::getCategorySet($id);\n $m->events = BlogView::getEvents($id);\n $m->metatags = BlogView::getMetaTags($id);\n $m->content = $m->url = $this->url;\n\n return $this->render('blog', 'edit');\n }", "title": "" }, { "docid": "d71dc82427564ebcbc73816305ddda53", "score": "0.68749857", "text": "public function edit()\n {\n preg_match('/form\\/(.+?)\\//', \\request()->getPathInfo(), $result);\n $form = Form::find($result[1]);\n $questions = Question::all()->where(\"form_id\", $form->id);\n return view('forms.edit', ['form'=>$form, 'questions'=>$questions]);\n }", "title": "" }, { "docid": "96961bd907d99d27e65861299053bb83", "score": "0.6873502", "text": "public function edit($id)\n {\n $id = Crypt::decrypt($id);\n $form = Preenrolment::find($id);\n\n return view('form.edit', compact('form'));\n }", "title": "" }, { "docid": "111fd948639561f549e94ea39624e591", "score": "0.686892", "text": "function edit()\n\t{\n\t\t$data['title'] = 'Offer.com || Restaurant Edit Form';\n\t\t$data['user_id']\t= $this->tank_auth->get_user_id();\n\t\t$data['username']\t= $this->tank_auth->get_username();\n\t\t\n\t\t// view page data\n\t\t$data['extrastyle'] = 'inc/_vuestyle';\n\t\t$data['extrascript'] = 'inc/_vuescript';\n\t\t$data['vuecomponent'] = 'components/restaurant/edit';\n\n\t\t$data['content'] = 'admin/restaurant/edit';\n\t\t$this->load->view('layouts/master', $data);\n\t}", "title": "" }, { "docid": "2cba2dba9adbc964e4cb8e1c1f507bf7", "score": "0.6857282", "text": "public function edit()\n\t{\n $this->auth->restrict('Capacity_Building.Content.Create');\n\n\t\t$id = $this->uri->segment(5);\n\n\t\tif(empty($id)) {\n // New record\n\t\t\tTemplate::set('formView', $this->showEditor());\n\t\t} else {\n // Existing record\n Template::set('formView', $this->showEditor($id));\n }\n\n\t\tTemplate::set('toolbar_title', lang('capacity_building_edit') .' Capacity Building');\n\t\tTemplate::render();\n\t}", "title": "" }, { "docid": "325f44881b3255ac6dd832a42a816449", "score": "0.6856997", "text": "public function edit($id)\n\t{\n\t\t//Para ver el formulario\n\t}", "title": "" }, { "docid": "a70140d47a90876608810916289f5eaa", "score": "0.68449825", "text": "public function edit(){\n $employee = Employee::find($_GET['id']);\n view('employees/edit', compact('employee'));\n }", "title": "" }, { "docid": "2ac287f33a0b22cd658add9d932bfb54", "score": "0.68442357", "text": "public function edit(Product $product)\n {\n // not gonna use it since it need to show edit form\n }", "title": "" }, { "docid": "0debc65108a59def3fde6af05e845c8c", "score": "0.6840725", "text": "public function edit($id)\n {\n // get the employee\n $employees = Employee::find($id);\n $titles = Title::pluck('name', 'id');\n\n\n // show the edit form and pass the resource\n return view('employees.edit', compact('employees','titles'))\n ->with('returnUrl', $this->getReturnUrl());\n }", "title": "" }, { "docid": "62e42345b14e64136dff3140e21a14fa", "score": "0.6817548", "text": "public function edit($id)\n {\n $categories = Category::all('id', 'name');\n return view('resource.form',\n [\n 'resource' => Resources::where('id', $id)->first(),\n 'categories' => $categories\n ]);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "541d1f2618e436d250647dd398cc2808", "score": "0.67858773", "text": "public function edit($id)\n {\n // return view('layouts.backend.rm.edit');\n }", "title": "" }, { "docid": "a6c265fe7d46510a444ee3ca44d074cb", "score": "0.6784809", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n $formTitle = 'Edit employee';\n return View('employees.form', compact('employee', 'formTitle'));\n }", "title": "" }, { "docid": "0eb0be7ab668a0fb1d38349f0f9700b4", "score": "0.67784214", "text": "public function edit($id) {\r\n\t\t$data['professor'] = Professor::findOrFail ( $id );\r\n\t\t$data['page_title'] = 'Editar professor';\r\n\t\treturn view ( 'paginas.cadastro.professor.create-edit' )->with($data); \r\n\t}", "title": "" }, { "docid": "02d61c145821a4db89ebb2edb8182595", "score": "0.67633945", "text": "public function edit($resource, $id)\n {\n $model = ConfigHelper::getModel($resource);\n $isColor = $model->isColor || false;\n $lists = $model->all();\n $data = $model->find($id);\n return view('config::config.index', compact('resource', 'lists', 'data', 'isColor'));\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "14e65bd23934edb208798714d1293877", "score": "0.6752648", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = Ticket::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "38affe6ba77ce934dc4daf49e3046892", "score": "0.67456263", "text": "public function edit($entityId)\n {\n $resource = $this->resource->with('fields')->where('slug', $this->slug)->first();\n $model = $this->getModel($resource);\n $entity = $model::find($entityId);\n $hasWysiwyg = false;\n\n foreach($resource->fields as $field)\n {\n if($field['type'] == 'wysiwyg') $hasWysiwyg = true;\n\n if($field->type == 'relational')\n {\n $model = $field->data('model');\n $options[$field->slug] = $model::all()->lists($field->data('title'), $field->data('key'));\n }\n }\n\n return view('laramanager::resource.edit', compact('resource', 'hasWysiwyg', 'entity', 'options'));\n }", "title": "" }, { "docid": "5ad58678a9066ea479d1b7c0fa455bba", "score": "0.673845", "text": "public function edit()\n {\n return view('parking::edit');\n }", "title": "" }, { "docid": "98a958a2e5d3e8b986777a8e2b310e63", "score": "0.67342156", "text": "public function editAction()\n {\n $id = $this->getRequest()->getParam('id',null);\n $this->view->formResponse = '';\n $this->view->assign('title', 'Edit Address');\n $mapper = new Application_Model_AddressbookMapper();\n $form = $mapper->getEditEntryForm($this->getRequest()->getPost(),$id);\n // Did the form get submitted?\n if ($form === true) {\n $this->view->formResponse = 'Address Updated!';\n $this->_forward('index');\n }\n $this->view->form = $form;\n }", "title": "" }, { "docid": "271f2dc8be841343df336c673a3822d9", "score": "0.6727125", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SigFichasocialBundle:Persona')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se pudo encontrar la entidad Persona.');\n }\n\n $editForm = $this->createEditForm($entity);\n// $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SigFichasocialBundle:Persona:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n// 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.67227334", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "3db1f9e1d14b74d354375731730e7d9f", "score": "0.6711498", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\t \n\t \n\t\treturn view('admin.employee.edit', compact('employee'));\n\t}", "title": "" }, { "docid": "200c93ae2e89a33f61e6a8e125e532c6", "score": "0.67104954", "text": "public function edit()\n {\n return view('userfi::edit');\n }", "title": "" }, { "docid": "1985c1d26ba692cc0ae1082412ed00f6", "score": "0.6703955", "text": "public function edit($id)\n {\n $this->isEditing = true;\n $this->user = User::find($id);\n return $this->cView(\"form\");\n }", "title": "" }, { "docid": "25a6a14192997386614057ef4361e13a", "score": "0.6697028", "text": "public function edit(Question $question)\n {\n \tif ($this->authorize('update', $question)) {\n\t\t return view('questions.edit', compact('question'));\n\t }\n }", "title": "" }, { "docid": "7f1157c2e01c887c017258c8594e0eb2", "score": "0.66793597", "text": "public function edit ($id) {\n $data = Opf::findOrFail($id);\n\n return view('administrator.opf.edit', compact('data'));\n }", "title": "" }, { "docid": "64638440e568f9ca6de0639b2af35fe2", "score": "0.6676964", "text": "public function edit($id)\n\t{\n\t\t$settingInformation = SettingInformation::find($id);\n \n return view('settingInformation.form')->with('settingInformation', $settingInformation);\n\t}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "348ffa202eb8b306feb83bea05fd6cb2", "score": "0.66630423", "text": "public function edit($id)\n\t{\n\t\treturn $this->respondTo(\n\t\t\tarray('html'=> function()\n\t\t\t\t \t\t\t{\n\t\t\t\t \t\t\t $this->layout->nest('content', $this->view, array('route' => $this->resource, 'options' => $this->options));\n\t\t\t\t \t\t\t},\n\t\t\t\t 'js' => function()\n\t\t\t\t \t\t {\n\t\t\t\t \t\t \t $form = View::make($this->form, array('route' => $this->resource, 'options' => $this->options))->render();\n\t\t\t\t \t\t \t return View::make('admin.shared.modal', array('body' => $form))->render();\n\t\t\t\t \t\t }\n\t\t\t\t )\n\t\t\t);\n\t}", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "ac13bda5ea80a720996d3ec33ec2cd6e", "score": "0.66462505", "text": "public function edit($id)\n {\n $professor = Professor::find($id);\n return view('professor.formulario', compact('professor'));\n }", "title": "" }, { "docid": "56e8e9b08c0406905beb3036122cd7af", "score": "0.6642529", "text": "public function edit()\n {\n return view('home::edit');\n }", "title": "" }, { "docid": "b602a98dc36a4b6f42a161024a5f0dfa", "score": "0.66383743", "text": "public function edit()\n {\n return view('account::edit');\n }", "title": "" }, { "docid": "d0628008c21c857e6203f02c16d81776", "score": "0.6632226", "text": "public function edit(Request $request, $id)\n {\n $form = Form::find($id);\n \n return view('Admin.Form.edit',compact('form'));\n }", "title": "" }, { "docid": "ef5915c02eeea16e51e99a01379267fe", "score": "0.6629325", "text": "public function editAction()\n\t{\n\t\t$param = $this->data->getParams();\n\t\t$param = $this->valid->numCheck($param['id']);\n\t\t$this->event->setData($param);\n\t\t$this->event->userRole($this->userRole);\n\t\t$arrayToDetails = $this->event->detailsEvent();\n\t\t$this->view->addToReplace($arrayToDetails);\n\t\t$this->view->addToReplace($this->langArr);\n\t\t$this->view->setTemplateFile('details')->templateRender();\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "7ea6d483a420134aa1b6a3947a002693", "score": "0.66259205", "text": "public function edit($id)\n {\n //\n return \"Se muestra formulario para editar Fabricante con id: $id\";\n }", "title": "" }, { "docid": "d8a01a21dfccea9d724a478283a065e0", "score": "0.6622511", "text": "public function editForm(){\n\n return $this->newForm();\n }", "title": "" }, { "docid": "93d69beeb626332ef3ec9ff66c8a0e6f", "score": "0.6616668", "text": "public function edit()\n {\n return view('project/edit');\n }", "title": "" }, { "docid": "70adb5a3151ff0ad7f56b3e02f53ecfb", "score": "0.6613304", "text": "public function edit($id)\n {\n return view('module::edit');\n }", "title": "" }, { "docid": "99e23749f00156a5b49244d4edd09993", "score": "0.66091233", "text": "public function edit(Person $person)\n {\n return $this->form_ele('Edit', $person);\n }", "title": "" }, { "docid": "6feec614262027cb92d91e0b34bc1b6e", "score": "0.6608389", "text": "public function edit($id)\n {\n abort_unless($this->property('editable'), 404);\n $model = $this->property('model');\n $item = $model::where('id', $id);\n // customize query by query scope\n $this->queryScope($item);\n $item = $item->firstOrFail();\n // authorization\n $this->authorize('update'.static::property('permissionsKey'), $item);\n $this->initCrud('edit', $item);\n // convert item to response object.\n $item = $this->itemResponse($item);\n\n return view(\n 'sanjab::crud.form',\n [\n 'widgets' => $this->widgets,\n 'properties' => $this->properties(),\n 'item' => $item,\n ]\n );\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "7bbd86e4602ee9db03f7cc35a32da3d8", "score": "0.6600377", "text": "public function edit()\n {\n $property = Property::find(1);\n\n return view('property.edit')\n ->with('property', $property);\n }", "title": "" }, { "docid": "da4ddf957e485a3b006cdf1e4bcbe98c", "score": "0.65984637", "text": "public function edit($id)\n { \n $item = $this->model->findOrFail($id);\n $products = $this->product::all();\n $companies = $this->company::all();\n return view($this->path_view.'.form',compact('item','products','companies'));\n }", "title": "" }, { "docid": "a9d3eb00cc0697100005ac0145dc0796", "score": "0.65982985", "text": "public function edit($id)\n {\n\n \t$decode = Hashids::decode($id)[0];\n $role = Role::find($decode);\n $permission = Permission::all();\n $formAction = action('RoleController@update', $id);\n return view(\"roles/form\", compact('role', 'formAction','permission'));\n\n }", "title": "" }, { "docid": "ed9a6010eb59e900fbfaa0474bf6d261", "score": "0.6596132", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entity = $em->getRepository('BackendBundle:Requerimiento')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No existe el requerimiento solicitado.');\n }\n\n $editForm = $this->createForm(new RequerimientoType(), $entity);\n\n return $this->render('BackendBundle:Requerimiento:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }", "title": "" }, { "docid": "b7036cf9285e9d8affd3f7710b3215e1", "score": "0.65944123", "text": "public function edit($id)\n {\n return view($this->entity.'.frm', [\n 'id' => $id, # id registro\n 'entity' => $this->entity, # Entidade\n 'title' => 'Alterar perfil', # título página\n 'method' => 'put', # método frm principal\n 'route_list' => route('role.datajson',[$id]), # endereço requisição ajax principal\n ]);\n }", "title": "" }, { "docid": "83316aa545e5b62d61cc26508009018d", "score": "0.65920705", "text": "public function edit($id)\n {\n $job = $this->job_model->findOrFail($id);\n $companies = $this->company_model->all();\n $data = [\n 'title' => \"Job Form\",\n 'job' => $job,\n 'companies' => $companies,\n 'method' => \"PUT\",\n ];\n return view('job.job_form', $data);\n }", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "b2eaacc677a317a7edc60ecfa33f9345", "score": "0.6585427", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MyAppUserBundle:CarteEdinar')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find CarteEdinar entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MyAppUserBundle:CarteEdinar:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "f191333894e0ca371f3ae777ad938dd1", "score": "0.65830725", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_atleta\n\t\t$fbf_atleta = FbfAtleta::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_atleta\n\t\t$this->layout->content = View::make('fbf_atleta.edit')\n->with('fbf_atleta', $fbf_atleta);\n\t}", "title": "" }, { "docid": "39bf69fa126c43f7e7a9b30980f6a80f", "score": "0.6581154", "text": "public function editAction()\n {\n // Get incident id from url.\n \t$id = $this->_request->getParam('id');\n \t\n\t\tif ($this->getRequest()->isPost()) {\n\t $form = $this->getForm();\n\t \n \t// If validation failed, redisplay form. Also the isValid() method is needed to repopulate $form with posted values.\n\t if (!$form->isValid($_POST)) {\n\t $this->view->form = $form;\n\t return $this->render('edit');\n\t }\n\t \n\t // Get the model.\n\t $mapper = new Application_Model_UserMapper();\n\t $model = $mapper->find($id);\n\t \n\t // Put values from form in the model.\n\t $values = $form->getValues();\n\t $model->setValuesFromArray($values);\n\t \t\n\t // Save the model.\n\t $mapper->save($model);\n\t \n\t // Flash and redirect\n\t $this->_helper->flashMessenger()->addMessage('Details Saved');\n $this->_helper->redirector->gotoUrlAndExit('user/view/id/' . $id);\n\t \n\t\t}\n\t\t\n\t\t// Fetch data for form\n\t\t$mapper = new Application_Model_UserMapper();\n\t\t$model = $mapper->find($id);\n\t\t$model_array = Application_Model_UserMapper::createArrayFromModel($model);\n\t\t\n\t\t// Create, populate and remove password from, form\n\t\t$this->view->form = $this->getForm();\n\t\tunset($model_array['password']);\n\t\t$this->view->form->populate($model_array);\n\t\t\n\t\t// Signal to javascript component about which map to display\n $this->view->jsInitParameters = \"'edit'\";\n }", "title": "" }, { "docid": "c107060b4dbba94b41a5c4077a7c279f", "score": "0.6580328", "text": "public function edit() {\n\n \t\tif (!$this->user || !$_POST)\n \t\tRouter::redirect('/venues/index');\n\n \t$venue_id = $_POST['venue_id'];\n\n\t\t# Transfer POST data to Venue object\n\t\t$venue = new Venue();\n\t\t$venue->findInDb ($venue_id);\n\n # Setup view\n\t\t$this->template->content = View::instance('v_venues_edit');\n\t\t$this->template->title = \"Edit Venue\";\n\t\t$this->template->client_files_body = \"<script src='/js/hide-category-navigation.js' type='text/javascript'></script>\";\n\n\t\t$this->template->content->venue = $venue;\n\n \techo $this->template;\n }", "title": "" }, { "docid": "7c4a03ced51aa8433c83f3f04c571b16", "score": "0.6579726", "text": "public function editAction() {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "777cf215463e622ffb776eb0f22dcc71", "score": "0.6578481", "text": "public function actionEdit()\n {\n if(!in_array('edit',$this->crudActions))\n throw new CHttpException('404 Not Found');\n\n if (isset($_POST['ajax']))\n $this->validateAjax($this->getModel(),strtolower($this->modelName).'-form');\n\n if (isset($_POST[$this->modelName]))\n {\n $model = $this->getModel();\n $model->attributes = $_POST[$this->modelName];\n if ($model->save())\n {\n $key = $this->modelName.($model->isNewRecord ? '-created' : '-updated');\n Yii::app()->user->setFlash($key,true);\n $this->redirect($this->returnUrl);\n }\n }\n $this->render($this->formView);\n }", "title": "" }, { "docid": "daf481e79a69ad0bc7a9ba48b4d825bc", "score": "0.6572825", "text": "public function edit($id)\n {\n $paraferme = Paraferme::find($id);\n\n $elements = $this->editForm(model: $paraferme, json: 'formParaferme.json');\n\n return view('admin.editCreateForm', [\n 'elements' => $elements,\n 'id' => $id,\n 'routeAnnule' => route('paraferme.index'),\n ]);\n\n }", "title": "" }, { "docid": "6a9e1e18ba5587525f99a19b50b90a0e", "score": "0.65684664", "text": "public function edit($id)\n\t{\n\n\t\t$form = DB::collection('form')->where('data.objectId',$id);\n\t\t$form = $form->pluck('data');\n\n\t\treturn view('forms.edit',compact('form'));\n\n\t}", "title": "" }, { "docid": "bd3e6096136eae4b4640e64c781e5215", "score": "0.65683043", "text": "public function edit($id)\n {\n return view('projectmanagement::edit');\n }", "title": "" }, { "docid": "7b12a5aa4591ae1d2710a1496c517b58", "score": "0.6567222", "text": "public function edit($id)\n {\n $offre = \\App\\Offre::find($id);\n return view('edit-professor',compact('offre','id'));\n }", "title": "" }, { "docid": "c7e85eff7c1947945cf5348933eb83fd", "score": "0.6566555", "text": "public function edit($id)\n\t{\n $formateur = Formateur::find($id);\n\n return View::make('admin/formateurs/edit')\n ->with('formateur', $formateur);\n\t}", "title": "" }, { "docid": "4c1baaf4b5d21ff53cd15c1fdbd7a93f", "score": "0.6560379", "text": "public function editAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$viewId = $this->_request->getParam('viewid'); \n\t\t$this->view->objView = $model->getView($viewId);\n\t }", "title": "" }, { "docid": "ea156ffc25feb0e2e685c6a8f7557c15", "score": "0.65479046", "text": "public function edit($id)\n {\n $model = AdminSystemPermission::with([\"permissionGroup\"])->find($id);\n\n if($model)\n {\n $record = $model;\n $formMode = \"edit\";\n $formSubmitUrl = \"/\".request()->path();\n\n return view('academic::admin_system_permission.create', compact('formMode', 'formSubmitUrl', 'record'));\n }\n else\n {\n abort(404, \"Requested record does not exist.\");\n }\n }", "title": "" }, { "docid": "829ba9227d293e46ba684b3f0cd579db", "score": "0.65453607", "text": "public function edit($id)\n\t\t\t{\n\t\t\t\tif(Auth::User()->hasSysRole('Admin') || Auth::User()->hasSysRole('Resource Provider'))\n\t\t\t\t{\n\t\t\t\t\t$venue = Venue::find($id);\n\t\t\t\t\t// show the edit form and pass the venue\n\t\t\t\t\treturn View::make('venue.edit')\n\t\t\t\t\t->with('venue', $venue);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn Redirect::to('/dashboard')->with('message', 'You do not have access to this page!');\n\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "2c16bdeb3085fda5a688682fae7140dc", "score": "0.6544247", "text": "public function edit($id)\n\t{\n\t\treturn $this->show($id);\n\t}", "title": "" }, { "docid": "0b8bea11641b000a8cc94135b0aa739a", "score": "0.6542523", "text": "public function edit($id)\n {\n return view('slo::edit');\n }", "title": "" }, { "docid": "1945103cf79b00401e4a1d1b2f762101", "score": "0.65411687", "text": "public function editAction( $id ) {\n\t\t$em = $this->getDoctrine()->getManager();\n\n\t\t$entity = $em->getRepository( 'PersonasBundle:Persona' )->find( $id );\n\n\t\tif ( ! $entity ) {\n\t\t\tthrow $this->createNotFoundException( 'Unable to find Persona entity.' );\n\t\t}\n\n\t\t$editForm = $this->createEditForm( $entity );\n\n\n\t\treturn $this->render( 'PersonasBundle:Persona:edit.html.twig',\n\t\t\tarray(\n\t\t\t\t'entity' => $entity,\n\t\t\t\t'form' => $editForm->createView(),\n\t\t\t) );\n\t}", "title": "" }, { "docid": "0bd14cbe814fbc55e43aec513633b5bc", "score": "0.65401965", "text": "public function edit($id)\n\t{\n\t\t$agente = Agente::find($id);\n if (is_null($id))\n {\n App::abort(404);\n }\n\n return View::make('agente.form')\n \t->with('agente', $agente);\n\t}", "title": "" }, { "docid": "cd0e818bdd7ade4dd0c44de0dd0c1d8e", "score": "0.65400016", "text": "public function action_edit()\n\t{\n\t\t$id = $this->request->param('id');\n\n\t\tif ($id === null)\n\t\t{\n\t\t\t$this->redirect(Route::url('user', array('action' => 'new')));\n\t\t} // if\n\n\t\tif ($id != $this->auth->get_user()->id && ! in_array('admin', $this->user_roles))\n\t\t{\n\t\t\tthrow new HTTP_Exception_403('You are not allowed to view the page \":page\"', array(':page' => __('User')));\n\t\t} // if\n\n\t\t$model = ORM::factory('user')->where('id', '=', $id)->find();\n\t\t$is_admin = in_array('admin', $this->user_roles);\n\n\t\t$this->content = View::factory('user/form', array(\n\t\t\t'title' => __('Update user \":username\"', array(':username' => $model->username)),\n\t\t\t'user_model' => $model,\n\t\t\t'properties' => $model->get_properties(),\n\t\t\t'is_admin' => $is_admin,\n\t\t\t'copy_n_paste' => $this->config->get('password_prevent_copynpaste', true),\n\t\t\t'ajax_url' => Route::url('user', array('action' => 'save', 'id' => $id))\n\t\t));\n\n\t\tif ($is_admin)\n\t\t{\n\t\t\t$this->content->roles = ORM::factory('role')->find_all();\n\t\t} // if\n\t}", "title": "" }, { "docid": "2161eaa538e430e31556a81d74eca198", "score": "0.65394217", "text": "public function edit($id)\n {\n $Option = Option::find($id);\n return view('backend.options.form', [\n 'item' => $Option,\n\n 'nameAction' => $Option->name,\n 'idEntity' => $Option->id,\n 'controllerPathList' => '/home/options/',\n 'controllerAction' => 'edit',\n 'controllerEntity' => new Option(),\n ]);\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": "4ee65564ca132744616bf10c0755fe98", "score": "0.65375626", "text": "public function edit($id)\n {\n return view('employees::edit');\n }", "title": "" }, { "docid": "53fd61f8c77c49fa57d89bd9839407c2", "score": "0.65345657", "text": "public function edit($id)\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "ecd32fc705283cc0e1ddec209c43aec8", "score": "0.6532995", "text": "public function displayResourceForm($resource)\n {\n $childServices = new Setting('child_services');\n\n ob_start();\n include(VIEW_PATH . '/child-resources-edit.phtml');\n $resource_content = ob_get_contents();\n ob_end_clean();\n\n print $resource_content;\n }", "title": "" }, { "docid": "07ed8b37e3defd0062904a7718865626", "score": "0.65308374", "text": "public function edit(Employee $employee)\n {\n //\n return view('employee.form', [\n 'action' => '/employees/' . $employee->id,\n 'method' => 'PUT',\n 'firstName' => $employee->firstName,\n 'lastName' => $employee->lastName,\n 'lastName' => $employee->lastName,\n 'email' => $employee->email,\n 'phone' => $employee->phone,\n 'companyName' => $employee->company->name,\n ]);\n }", "title": "" }, { "docid": "0ce9853ad8530923530976f2391d2510", "score": "0.65294826", "text": "public function edit($id)\n {\n return view('common::edit');\n }", "title": "" }, { "docid": "e48aa4e6edf769dcff5f1f1cdaddcf9f", "score": "0.65233994", "text": "public function showEdit($id)\n {\n //\n }", "title": "" }, { "docid": "41a790dfedf55c0319d312ab7845572c", "score": "0.6520173", "text": "public function edit($id)\n\t{\n\t\t$entity = CustomerHire::find($id);\n\t\treturn view('partner.customer-hire.edit', ['entity' => $entity]);\n\t}", "title": "" }, { "docid": "8dbb90d7fff91cd25d058baa2b103486", "score": "0.6517904", "text": "public function edit($id)\n {\n $soforModel = SoforModel::with('company')->findOrFail($id);\n return view('Sofor.edit', compact('soforModel'));\n }", "title": "" }, { "docid": "be7e6c271a5b5cd1f1e4af5e5ba8ba3d", "score": "0.65162235", "text": "public function edit($id)\n\t{\n\t\t$employee = Employee::find($id);\n\n\t\treturn View::make('admin.employees.edit', compact('employee'));\n\t}", "title": "" }, { "docid": "9ba959cf41c08e6925661954de22eacc", "score": "0.65150225", "text": "public function edit(Entity $entity)\n {\n return view('entities.edit', compact('entity'));\n }", "title": "" } ]
0e980d65bfb1da0f04bcca9eefd3bfcb
returns an array of added default cURL options
[ { "docid": "2c9cb96cc8531a5dd69a3345bc143c7c", "score": "0.7677507", "text": "public static function getDefaultCurlOptions()\n {\n return self::$_defaultCurlOptions;\n }", "title": "" } ]
[ { "docid": "360aed8066b3ed953f82577f8b798b72", "score": "0.8191525", "text": "protected function getDefaultCurlOptions()\n {\n return [\n CURLOPT_POST => true,\n CURLOPT_USERAGENT => $this->_config['UserAgent'],\n CURLOPT_VERBOSE => true,\n CURLOPT_HEADERFUNCTION => [$this, 'headerCallback'],\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_SSL_VERIFYPEER => true,\n CURLOPT_SSL_VERIFYHOST => 2,\n ];\n }", "title": "" }, { "docid": "a35cb0b8ae074e7ff53de3538f66cb06", "score": "0.813462", "text": "protected function defaultCurlOptions()\n {\n return [\n CURLOPT_USERAGENT => Yii::app()->name . ' OAuth ' . $this->version . ' Client',\n CURLOPT_CONNECTTIMEOUT => 30,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_SSL_VERIFYPEER => false,\n ];\n }", "title": "" }, { "docid": "7384475309699b568233ae0d54e9b2c8", "score": "0.80435246", "text": "function getDefaultOptions(){\n\t\t\n\t\treturn array(\n\t\t\t'CURLOPT_RETURNTRANSFER' => true,\t\t// TRUE to return the transfer as a string of the return value of curl_exec() instead of outputting it out directly.\n\t\t\t'CURLOPT_HEADER' => false,\t\t\t\t// TRUE to include the header in the output.\n\t\t\t'CURLOPT_FOLLOWLOCATION' => true,\t\t// TRUE to follow any \"Location: \" header that the server sends as part of the HTTP header (note this is recursive, PHP will follow as many \"Location: \" headers that it is sent, unless CURLOPT_MAXREDIRS is set).\n\t\t\t'CURLOPT_ENCODING' => \"\",\t\t\t\t// The contents of the \"Accept-Encoding: \" header. This enables decoding of the response. Supported encodings are \"identity\", \"deflate\", and \"gzip\". If an empty string, \"\", is set, a header containing all supported encoding types is sent.\n\t\t\t'CURLOPT_AUTOREFERER' => true,\t\t\t// TRUE to automatically set the Referer: field in requests where it follows a Location: redirect.\n\t\t\t'CURLOPT_SSL_VERIFYPEER' => false,\t\t// FALSE to stop cURL from verifying the peer's certificate. Alternate certificates to verify against can be specified with the CURLOPT_CAINFO option or a certificate directory can be specified with the CURLOPT_CAPATH option.\n\t\t\t'CURLOPT_TIMEOUT' => 300\t\t\t\t// The maximum number of seconds to allow cURL functions to execute.\n\t\t\t// 'CURLOPT_HTTPHEADER' => array(\"Content-Type: text/xml\",\"Accept-Encoding: gzip\")\n\t\t);\n\t}", "title": "" }, { "docid": "d0a467d86985e61e5a27368d448f58ed", "score": "0.7391054", "text": "public function provideCurlConfig()\n {\n return array(\n // Conversion of option name to constant value\n array(\n array(\n 'CURLOPT_PORT' => 10,\n 'CURLOPT_TIMEOUT' => 99\n ),\n array(\n CURLOPT_PORT => 10,\n CURLOPT_TIMEOUT => 99\n )\n ),\n // Keeps non constant options\n array(\n array( 'debug' => true ),\n array( 'debug' => true )\n ),\n // Conversion of constant names to constant values\n array(\n array( 'debug' => 'CURLPROXY_HTTP' ),\n array( 'debug' => CURLPROXY_HTTP )\n )\n );\n }", "title": "" }, { "docid": "d52d5ff7da83817eca5be0bef60dccfb", "score": "0.71980715", "text": "public static function getCurlOptions()\n {\n return self::$curlOptions;\n }", "title": "" }, { "docid": "5b38da98553be861ad069c902ff51ca9", "score": "0.7185448", "text": "private function _loadDefaults()\n\t{\n\t\t$this->setOptions(array(\n\t\t\tCURLOPT_RETURNTRANSFER\t\t=> true,\n\t\t\tCURLOPT_REFERER\t\t\t\t=> 'http://www.google.com/',\n\t\t\tCURLOPT_VERBOSE\t\t\t\t=> false,\n\t\t\tCURLOPT_SSL_VERIFYPEER\t\t=> false,\n\t\t\tCURLOPT_SSL_VERIFYHOST\t\t=> false,\n\t\t\tCURLOPT_HEADER\t\t\t\t=> self::DEFAULT_FETCHHEADER,\n\t\t\tCURLOPT_NOBODY\t\t\t\t=> !self::DEFAULT_FETCHCONTENT,\n\t\t\tCURLOPT_FOLLOWLOCATION\t\t=> self::DEFAULT_FOLLOWLOCATION,\n\t\t\tCURLOPT_MAXREDIRS\t\t\t=> self::DEFAULT_MAXREDIRS,\n\t\t\tCURLOPT_USERAGENT\t\t\t=> self::DEFAULT_USERAGENT,\n\t\t\tCURLOPT_CONNECTTIMEOUT\t\t=> 0\n\n\t\t));\n\t\tif ($this->_debug !== false) {\n\t\t\t$this->setOption(CURLOPT_PROGRESSFUNCTION, array($this, '_progress'));\n\t\t\t$this->setOption(CURLOPT_NOPROGRESS, false);\n\t\t\t$this->setOption(CURLOPT_BUFFERSIZE,64000);\n\t\t}\n\t}", "title": "" }, { "docid": "f5959b1eee8bef34c3db21c9aa8cdc86", "score": "0.70539856", "text": "public static function clearDefaultCurlOptions()\n {\n $options = self::$_defaultCurlOptions;\n self::$_defaultCurlOptions = array();\n return $options;\n }", "title": "" }, { "docid": "aea9cd766c33b80b33e926aae9a3aeef", "score": "0.7011692", "text": "public function getCurlOptions() {\n return $this->_curlOptions;\n }", "title": "" }, { "docid": "273894c65aac595293df968cd8efe607", "score": "0.69864315", "text": "public function getOptions()\n {\n $options = [];\n if (sizeof($this->headers) > 0) {\n $options = [\n CURLOPT_HTTPHEADER => $this->getHeaders()\n ];\n }\n\n return $options + $this->options + $this->getDefaultOptions();\n }", "title": "" }, { "docid": "6e525f0eb15288106a66f0da48f63b3a", "score": "0.67295915", "text": "public function _setComfortableOptions(): self {\r\n\t\t$this->setopt_array ( array (\r\n\t\t\t\tCURLOPT_AUTOREFERER => true,\r\n\t\t\t\tCURLOPT_BINARYTRANSFER => true,\r\n\t\t\t\tCURLOPT_FOLLOWLOCATION => true,\r\n\t\t\t\tCURLOPT_HTTPGET => true,\r\n\t\t\t\tCURLOPT_SSL_VERIFYPEER => false,\r\n\t\t\t\tCURLOPT_CONNECTTIMEOUT => 4,\r\n\t\t\t\tCURLOPT_TIMEOUT => 8,\r\n\t\t\t\tCURLOPT_COOKIEFILE => \"\", // <<makes curl save/load cookies across requests..\r\n\t\t\t\tCURLOPT_ENCODING => \"\", // << makes curl post all supported encodings, gzip/deflate/etc, makes transfers faster\r\n\t\t\t\tCURLOPT_USERAGENT => 'hhb_curl_php; curl/' . $this->version () ['version'] . ' (' . $this->version () ['host'] . '); php/' . PHP_VERSION \r\n\t\t) ); //\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "28e184356ae2f3f4445b86413ad72c91", "score": "0.67255944", "text": "public function get_default_options()\n {\n return [];\n }", "title": "" }, { "docid": "a7ceafb2baa717a7547d240ac6dd8647", "score": "0.6704332", "text": "protected function getDefaultOptions() {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "c3209db17a0c56d4a437e3d71570fc50", "score": "0.6693124", "text": "private function set_request_options()\n\t{\n\t\tcurl_setopt($this->request, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($this->request, CURLOPT_USERAGENT, 'SolidShopsApiPhp/CurlRequest');\n\t\tcurl_setopt($this->request, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($this->request, CURLOPT_CONNECTTIMEOUT, $this->curl_connect_timeout);\n\t\tcurl_setopt($this->request, CURLOPT_TIMEOUT, $this->curl_timeout);\n\n\n\t\t// Set any custom CURL options\n\t\tforeach ($this->arr_options as $option => $value) {\n\t\t\tcurl_setopt($this->request, constant('CURLOPT_' . str_replace('CURLOPT_', '', strtoupper($option))), $value);\n\t\t}\n\n\t\t// Cookie stuff\n\t\tif (count($this->arr_cookies) > 0) {\n\t\t\t$str_cookie = http_build_query($this->arr_cookies);\n\t\t\tcurl_setopt($this->request, CURLOPT_COOKIE, $str_cookie);\n\t\t}\n\t}", "title": "" }, { "docid": "2e997c14e3000a368a71f3c97deef376", "score": "0.6666879", "text": "private function buildOptions(array $request) {\n $url = $request['url'];\n $options = $this->_options;\n $headers = $this->_headers;\n //the below will overide the corresponding default or individual options\n $options[CURLOPT_RETURNTRANSFER] = true;\n $options[CURLOPT_NOSIGNAL] = 1;\n if(version_compare($this->_curl_version, '7.16.2') >= 0) {\n $options[CURLOPT_CONNECTTIMEOUT_MS] = $this->_timeout;\n $options[CURLOPT_TIMEOUT_MS] = $this->_timeout;\n unset($options[CURLOPT_CONNECTTIMEOUT]);\n unset($options[CURLOPT_TIMEOUT]);\n } else {\n $options[CURLOPT_CONNECTTIMEOUT] = round($this->_timeout / 1000);\n $options[CURLOPT_TIMEOUT] = round($this->_timeout / 1000);\n unset($options[CURLOPT_CONNECTTIMEOUT_MS]);\n unset($options[CURLOPT_TIMEOUT_MS]);\n }\n if($url) {\n $options[CURLOPT_URL] = $url;\n }\n if($headers) {\n $options[CURLOPT_HTTPHEADER] = $headers;\n }\n return $options;\n }", "title": "" }, { "docid": "8d0f6aada7fb34ffc116bfff610ec83f", "score": "0.66645217", "text": "function bbp_get_default_options()\n{\n}", "title": "" }, { "docid": "66c77ca51ce0277a6ef731dbc1613887", "score": "0.66618013", "text": "protected function setCurlOpts()\n\t{\n\t\tcurl_setopt($this->curlHandle, CURLOPT_TIMEOUT, 10);\n\t\tcurl_setopt($this->curlHandle, CURLOPT_URL, $this->url);\n\t\tcurl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYHOST, false);\n\t\tcurl_setopt($this->curlHandle, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($this->curlHandle, CURLOPT_FOLLOWLOCATION, true);\n\t\tcurl_setopt($this->curlHandle, CURLOPT_RETURNTRANSFER, true);\n\n\t\t$credentials = ClientCred::getCred();\n\n\t\t$headers = [\n\t\t 'Authorization: ' . $credentials\n\t\t];\n\n\t\tcurl_setopt($this->curlHandle, CURLOPT_HTTPHEADER, $headers);\n\t}", "title": "" }, { "docid": "fef18adfa011fb392883ef4ef0b60ba0", "score": "0.66558427", "text": "public function getDefaultOptions(): array\n {\n }", "title": "" }, { "docid": "3b446b43864f8c3fccff677c0b891b72", "score": "0.6653069", "text": "private function getDefaultRequestOptions(): array\n {\n return [\n 'headers' => [\n 'X-Yandex-API-Key' => $this->apiKey,\n ],\n ];\n }", "title": "" }, { "docid": "ed51ec45d65bd0df11ca97fcf82528a9", "score": "0.6624232", "text": "public function getDefaultOptions()\n {\n return array();\n }", "title": "" }, { "docid": "9598c18bb752862fced984b412623451", "score": "0.6609323", "text": "public function get_default_options() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.65468174", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.65468174", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.65468174", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.65468174", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.65468174", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.65468174", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "0cb5360bfb75bcba73161e3f5a96e45c", "score": "0.65468174", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.6496849", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "1b8d9352a2322e037f73d82c446fa398", "score": "0.6496849", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "21d5b6741e16a2c24c4047da3dd93c28", "score": "0.6487927", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "09b345728a1f9f953c0a4494d25cd0e8", "score": "0.64786536", "text": "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.6473707", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.6473707", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.6473707", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.6473707", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.6473707", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.6473707", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9364eb1794ee02bd4ca2f0b11e97cf42", "score": "0.6473707", "text": "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "1a334cb57889f6e27dabc992a164d6a7", "score": "0.6450453", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "1a334cb57889f6e27dabc992a164d6a7", "score": "0.6450453", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "dccd5aa49d5e1a44227c0502e6c335bf", "score": "0.6448701", "text": "public function setCurlOptions()\n {\n if($this->_adapter->getEnv()) {\n $this->_curlClient->setOption(CURLOPT_SSL_VERIFYPEER, false);\n $this->_curlClient->setOption(CURLOPT_SSL_VERIFYHOST, false);\n } else {\n $this->_curlClient->setOption(CURLOPT_SSL_VERIFYPEER, true);\n }\n\n }", "title": "" }, { "docid": "c9215cd623f1bcea803ff1f1ab18dda4", "score": "0.6445598", "text": "protected function getOptions() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "24637daf68690d8a67e1896506c6db6a", "score": "0.6441927", "text": "protected function getOptions()\n {\n return array(\n );\n }", "title": "" }, { "docid": "24637daf68690d8a67e1896506c6db6a", "score": "0.6441927", "text": "protected function getOptions()\n {\n return array(\n );\n }", "title": "" }, { "docid": "a67ec026973e70f263eb948ca4b066f2", "score": "0.6440736", "text": "public function get_default_options(): array {\n\t\t$options = [\n\t\t\t'dsn' => $this->get_dsn(),\n\t\t\t'prefixes' => [ ABSPATH ],\n\t\t\t'environment' => $this->get_environment(),\n\t\t\t'send_default_pii' => defined( 'WP_SENTRY_SEND_DEFAULT_PII' ) && WP_SENTRY_SEND_DEFAULT_PII,\n\t\t];\n\n\t\tif ( defined( 'WP_SENTRY_VERSION' ) ) {\n\t\t\t$options['release'] = WP_SENTRY_VERSION;\n\t\t}\n\n\t\tif ( defined( 'WP_SENTRY_ERROR_TYPES' ) ) {\n\t\t\t$options['error_types'] = WP_SENTRY_ERROR_TYPES;\n\t\t}\n\n\t\t$options['in_app_exclude'] = [\n\t\t\tWP_SENTRY_WPADMIN, // <base>/wp-admin\n\t\t\tWP_SENTRY_WPINC, // <base>/wp-includes\n\t\t];\n\n\t\tif ( $this->is_wp_proxy_enabled() && $this->wp_proxy_enabled_for_us() ) {\n\t\t\t$options['http_proxy'] = $this->is_wp_proxy_using_authentication()\n\t\t\t\t? sprintf( \"%s@%s:%s\", $this->wp_proxy_authentication(), $this->wp_proxy_host(), $this->wp_proxy_port() )\n\t\t\t\t: sprintf( \"%s:%s\", $this->wp_proxy_host(), $this->wp_proxy_port() );\n\t\t}\n\n\t\treturn $options;\n\t}", "title": "" }, { "docid": "457ec5f692942c026d015521fd5862e6", "score": "0.6418839", "text": "public static function default_options() {\n\n\t\t$options = array(\n\t\t\t'api'\t\t => array(),\n\t\t\t'optins' \t => array(),\n\t\t\t'is_expired' => false,\n\t\t\t'is_disabled' => false,\n\t\t\t'is_invalid' => false,\n\t\t\t'welcome' => array(\n\t\t\t\t'status' => 'none', //none, welcomed\n\t\t\t\t'review' => 'ask', //ask, asked, dismissed\n\t\t\t\t'version' => '1141', //base to check against\n\t\t\t)\n\t\t);\n\t\treturn apply_filters( 'optin_monster_api_default_options', $options );\n\n\t}", "title": "" }, { "docid": "e201c0c3bad4a0d39f06ed1f6384d33b", "score": "0.64170766", "text": "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "title": "" }, { "docid": "8addb18601ba406e205e61fe1176f6a3", "score": "0.641502", "text": "protected function curlBasicOptions()\n {\n // automatically set the Referer: field in requests where it\n // follows a Location: redirect.\n curl_setopt($this->curl, CURLOPT_AUTOREFERER, true);\n\n // follow any \"Location: \" header that the server sends as\n // part of the HTTP header (note this is recursive, PHP will follow\n // as many \"Location: \" headers that it is sent, unless\n // CURLOPT_MAXREDIRS is set).\n curl_setopt($this->curl, CURLOPT_FOLLOWLOCATION, true);\n\n // do not include headers in the content ...\n curl_setopt($this->curl, CURLOPT_HEADER, false);\n\n // ... instead, save headers using a callback\n curl_setopt(\n $this->curl,\n CURLOPT_HEADERFUNCTION,\n [$this, 'saveHeaders']\n );\n\n // return the transfer as a string instead of printing it\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, true);\n\n // cookie jar: read from and save to this file\n $cookie_jar = $this->options->cookie_jar;\n if ($cookie_jar) {\n curl_setopt($this->curl, CURLOPT_COOKIEJAR, $cookie_jar);\n curl_setopt($this->curl, CURLOPT_COOKIEFILE, $cookie_jar);\n }\n\n // property-name => curlopt-constant\n $this->curlSetopt(\n [\n 'max_redirects' => CURLOPT_MAXREDIRS,\n 'timeout' => CURLOPT_TIMEOUT,\n ]\n );\n }", "title": "" }, { "docid": "991afb5b6fe1b350ee573a28abeb51e8", "score": "0.6413217", "text": "private function getUrlsOption(): array\n {\n return $this->options['urls'] ?? [];\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.6410541", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.6410541", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "e4333c292e6a2bc4d11cdc623dc9bb8a", "score": "0.6410541", "text": "protected function getOptions()\n {\n return [\n ];\n }", "title": "" }, { "docid": "85f06f7f651e9f565f4482cb3057e9b6", "score": "0.63853455", "text": "public function getDefaultOptions() {\n\t\t$opts = parent::getDefaultOptions();\n\t\t$opts->add( 'target', $this->target );\n\t\t$opts->add( 'showlinkedto', $this->linkedTo );\n\t\t$opts->add( 'days', $this->days );\n\n\t\treturn $opts;\n\t}", "title": "" }, { "docid": "00b102ff3efd249a447ad8bac75ccd23", "score": "0.63811135", "text": "function get_default_options() {\r\n return array('title' => '{title}', 'excerpt' => '{excerpt}', 'delay'=>0,\r\n 'title_bad' => '{title}', 'excerpt_bad' => '{excerpt}', 'delay_bad'=>2, 'ip_bad'=>array(),\r\n 'title_good' => '{title}', 'excerpt_good' => '{excerpt}', 'delay_good'=>0, 'ip_good'=>array());\r\n }", "title": "" }, { "docid": "ca9b6599cbbd0aa3a29b4b918062e359", "score": "0.6371226", "text": "protected function getOptions()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "ca9b6599cbbd0aa3a29b4b918062e359", "score": "0.6371226", "text": "protected function getOptions()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "ca9b6599cbbd0aa3a29b4b918062e359", "score": "0.6371226", "text": "protected function getOptions()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "35824dee46b606d1ff104d87e04cb935", "score": "0.63655496", "text": "protected function getOptions()\n {\n return array();\n }", "title": "" }, { "docid": "35824dee46b606d1ff104d87e04cb935", "score": "0.63655496", "text": "protected function getOptions()\n {\n return array();\n }", "title": "" }, { "docid": "35824dee46b606d1ff104d87e04cb935", "score": "0.63655496", "text": "protected function getOptions()\n {\n return array();\n }", "title": "" }, { "docid": "35824dee46b606d1ff104d87e04cb935", "score": "0.63655496", "text": "protected function getOptions()\n {\n return array();\n }", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.6351506", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.6351506", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.6351506", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.6351506", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.6351506", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.6351506", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "845c881db7d185f077973fedbfc82300", "score": "0.6351506", "text": "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "2086dc878ea99dbce27c7e7cd6f3ecb0", "score": "0.6349511", "text": "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "c1e4a970ec67f3286e9970115f4c10d9", "score": "0.6343036", "text": "protected function getOptions() {\n return array();\n }", "title": "" }, { "docid": "c1e4a970ec67f3286e9970115f4c10d9", "score": "0.6343036", "text": "protected function getOptions() {\n return array();\n }", "title": "" }, { "docid": "170e0ba0a15213fc2e27a25022e7c378", "score": "0.63381183", "text": "public function options() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "18e904c0eaa128592409504901b5af6f", "score": "0.63307124", "text": "protected function getOptions()\n {\n return [ ];\n }", "title": "" }, { "docid": "412726426c54fb0b299ac7f87765f108", "score": "0.6328493", "text": "public function default_options() {\n\t\t$options = array(\n\t\t\t'methods' => 'POST',\n\t\t\t'permission_callback' => '__return_empty_string',\n\t\t);\n\n\t\treturn apply_filters( 'helpful/api/options', $options );\n\t}", "title": "" }, { "docid": "91f41accc9b9dbd20783dfe972e4bdd3", "score": "0.6319095", "text": "protected function getOptions() : array\n {\n $baseuri = method_exists($this, 'getBaseUri') ? $this->getBaseUri : '';\n $timeout = property_exists($this, 'timeout') ? $this->timeout : 10;\n $options = [\n 'base_uri' => $baseuri,\n 'timeout' => $timeout,\n ];\n\n return $options;\n }", "title": "" }, { "docid": "9eb085f6d0127b279505397c448d5950", "score": "0.62956226", "text": "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "title": "" }, { "docid": "6b3b6499ba9530f8e789e124597853e5", "score": "0.62820464", "text": "public function getDefaultOptions(): array\n {\n return $this->defaultOptions;\n }", "title": "" }, { "docid": "6bc91d5c69265a8ca9c1e6d2efa2ecc6", "score": "0.62795174", "text": "protected function getOptions() {\n return [];\n }", "title": "" }, { "docid": "4f0657d7121a7ce25ed17945679550c1", "score": "0.62751216", "text": "private function get_default_options () {\n\t\t$args['name'] = '';\n\t\t$args['content_image'] = '';\n\t\t$args['default_image'] = '';\n\t\t$args['logo'] = '';\n\t\t$args['logo-height'] = 0;\n\t\t$args['logo-width'] = 0;\n\t\t$args['speakable_action'] = '';\n\t\t$args['speakable_type'] = '';\n\t\t$args['speakable_headline'] = '';\n\t\t$args['speakable_summary'] = '';\n\n\t\treturn (array) $args;\n\t}", "title": "" }, { "docid": "dfde1c5d5b4d539afc5b29bf3c1b5ac5", "score": "0.6270336", "text": "public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }", "title": "" }, { "docid": "dfde1c5d5b4d539afc5b29bf3c1b5ac5", "score": "0.6270336", "text": "public function getOptions()\n {\n return array_merge(parent::getOptions(), []);\n }", "title": "" }, { "docid": "96bac81a232eba11e5afadae505cc247", "score": "0.6259907", "text": "public function get_default_options()\n\t{\n\t\treturn array(\n\t\t\t'title'\t=> '',\n\t\t\t'contact_entry' => '',\n\t\t\t'contact_entry_filter' => 'no',\n\t\t);\n\t}", "title": "" }, { "docid": "ec8085f9381d37b38de6ba9a8619135f", "score": "0.6256596", "text": "private function getCurlOptions($curl)\n {\n $url = $this->getUrl();\n $data = $this->getData();\n $apiKey = $this->getApiKey();\n $requestMethod = $this->getRequestMethod();\n\n $options = [\n CURLOPT_URL => $url,\n CURLOPT_USERPWD => \"user:{$apiKey}\",\n CURLOPT_HTTPHEADER => [ 'Content-Type: application/json' ],\n CURLOPT_CUSTOMREQUEST => $requestMethod,\n CURLOPT_TIMEOUT => self::OPT_TIMEOUT,\n CURLOPT_RETURNTRANSFER => self::OPT_RETURNTRANSFER,\n CURLOPT_SSL_VERIFYPEER => self::OPT_SSL_VERIFYPEER,\n ];\n\n if ($data) {\n $options = $this->resolveRequestData($options, $requestMethod, $data);\n }\n\n curl_setopt_array($curl, $options);\n\n return $curl;\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "75820e5bce3ec245decef6fb78d407fe", "score": "0.6253788", "text": "protected function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "6ac89210aec0afdece1c943f7199c9bd", "score": "0.62434167", "text": "public function getOptions()\n {\n return [];\n }", "title": "" }, { "docid": "8f7962bc7899022e0119d97902963c48", "score": "0.6236166", "text": "public function getOptions(): array\n {\n return [];\n }", "title": "" } ]
0dc25fca47edb559af4d23452e2c26d2
Register a javascript string.
[ { "docid": "7ed927075bb635d6c8cde23a674fd7e6", "score": "0.0", "text": "public function registerScript($id, $script, $position = self::POS_READY)\n\t{\n\t\t$this->hasScripts = true;\n\t\t$this->scripts[$position][$id] = $script;\n\t\t//TODO: check if jquery is loaded when adding script to POS_READY\n\t\t//if ($position === self::POS_READY)\n\t\t//\t$this->registerCoreScript('jquery');\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "8cc6cbe39a9bac2df756ff80578b739b", "score": "0.69357115", "text": "public function addJsString($javascript){\n array_push($this->_jsStrings,$javascript);\n }", "title": "" }, { "docid": "aa5089fd8defc5ae9a3d6dea864c2d9e", "score": "0.65708905", "text": "abstract public function register_script();", "title": "" }, { "docid": "a32301135becf64d68de9b66a876be41", "score": "0.6381883", "text": "public function registerScript(/*string*/ $scriptSrc);", "title": "" }, { "docid": "bc91a39e3fbbf212cdbc192a8a7ee4fc", "score": "0.6311469", "text": "public static function js($string) {\n if(static::noNeedToEscape($string)) return $string;\n return preg_replace_callback('/[^a-z0-9,\\._]/iSu', 'static::escapeJSChar', $string);\n }", "title": "" }, { "docid": "664cc2a27e8ae3ca4609b7b88c6840db", "score": "0.6272826", "text": "function queue_js_string($string, $options = array())\n{\n get_view()->headScript()->appendScript($string, null, $options);\n}", "title": "" }, { "docid": "bf143a2a52b0d4d0220593e40d22dc53", "score": "0.62067187", "text": "public function registerClientScript()\n\t{\n\t\t$options = $this->getClientOptions();\n\t\t$options = empty($options) ? '' : Json::htmlEncode($options);\n\t\t$view = $this->getView();\n\t\tValiantAsset::register($view);\n\t\t$id = $this->options['id'];\n\t\t$view->registerJs(\"jQuery('#$id').valiantPhone($options);\");\n\t}", "title": "" }, { "docid": "2054065dc8ac8a299fbc98355e360ff5", "score": "0.6156701", "text": "protected function registerClientScript()\n\t{\n\t\t// Prepare script package.\n\t\t$this->package = array_merge(array(\n\t\t\t\t'baseUrl' => $this->getAssetsUrl(),\n\t\t\t\t'js' => array(\n\t\t\t\t\tYII_DEBUG ? 'jquery.textmistake.js' : 'jquery.textmistake.min.js',\n\t\t\t\t),\n\t\t\t\t'depends' => array(\n\t\t\t\t\t'jquery',\n\t\t\t\t),\n\t\t\t), $this->package);\n\n\t\t$clientScript = Yii::app()->getClientScript();\n\t\t$options = CJavaScript::encode($this->options);\n\n\t\t$clientScript\n\t\t\t->addPackage(self::PACKAGE_ID, $this->package)\n\t\t\t->registerPackage(self::PACKAGE_ID)\n\t\t\t->registerScript(\n\t\t\t\t$this->id,\n 'jQuery(document).textmistake('.$options.');',\n\t\t\t\tCClientScript::POS_READY\n\t\t\t);\n\t}", "title": "" }, { "docid": "eab7e297f8bbae574b86658d52ba63c8", "score": "0.60482925", "text": "protected abstract function addString($string);", "title": "" }, { "docid": "19781a5b696c42b7198aa65a961456fd", "score": "0.6021943", "text": "public function registerClientScript()\n {\n $js = '';\n $view = $this->getView();\n $this->initClientOptions();\n //$this->hashPluginOptions($view);\n $id = $this->options['id'];\n $encOptions = empty($this->clientOptions) ? '{}' : Json::encode($this->clientOptions);\n\n $events = '';\n foreach ($this->events as $event => $handler) {\n $events .= \".bind('{$event}', {$handler})\";\n }\n\n $js .= '$(\"#' . $id . '\")' . \".typeahead(null, {$encOptions}){$events};\\n\";\n TypeaheadAsset::register($view);\n $view->registerJs($js);\n }", "title": "" }, { "docid": "02347c0ffa9b4fdc28ca5245a25c58e7", "score": "0.60123026", "text": "protected function registerClientScript()\n {\n $view = $this->getView();\n $options = Json::encode($this->jsOptions);\n Asset::register($view);\n $view->registerJs('jQuery.address(' . $options . ');');\n }", "title": "" }, { "docid": "f02397b3c3b44e7db8fc0aba5c3a5f76", "score": "0.5995232", "text": "public function addJs(string $js) {\n $jsdo = $this->getData('jsdo');\n\n if(is_null($jsdo)) {\n $jsdo = array();\n }\n\n $jsdo[] = $js;\n $this->setData('jsdo', $jsdo);\n return;\n }", "title": "" }, { "docid": "401dce0d9986e556d5348d6a721061f7", "score": "0.5892146", "text": "public function escapeJs($string)\n {\n if ($string === '' || ctype_digit($string)) {\n return $string;\n }\n\n return preg_replace_callback(\n '/[^a-z0-9,\\._]/iSu',\n function ($matches) {\n $chr = $matches[0];\n if (strlen($chr) != 1) {\n $chr = mb_convert_encoding($chr, 'UTF-16BE', 'UTF-8');\n $chr = ($chr === false) ? '' : $chr;\n }\n return sprintf('\\\\u%04s', strtoupper(bin2hex($chr)));\n },\n $string\n );\n }", "title": "" }, { "docid": "7cce886aba473360478641b8adb70ee7", "score": "0.5879535", "text": "public function add_js($js)\n {\n $this->_js[$js] = $js;\n }", "title": "" }, { "docid": "615306dc261b596d4a0878c07a5652ed", "score": "0.58787364", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n KCFinderWidgetAsset::register($view);\n $this->clientOptions['kcfUrl'] = Yii::$app->assetManager->getPublishedUrl((new KCFinderAsset)->sourcePath);\n\n if ($this->iframe) {\n $this->clientOptions['iframeModalId'] = $this->getIFrameModalId();\n }\n\n $clientOptions = Json::encode($this->clientOptions);\n $view->registerJs(\"jQuery('#{$this->buttonOptions['id']}').KCFinderInputWidget($clientOptions)\");\n }", "title": "" }, { "docid": "5e4c810c76b80c4501178461baff046f", "score": "0.58639854", "text": "public function registerClientScript($id)\n\t{\n\t\t$js=\"\n\t\t\t$(function() {\n\t\t \tconsole.log('Hello world');\n\t\t\t});\n\t\t\";\n\t\t$assets=$this->getAssets();\n\t\t$cs=Yii::app()->getClientScript();\n\t\t// $cs->registerScriptFile(\"https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=drawing\",CClientScript::POS_HEAD);\n\t\t// $cs->registerScriptFile($assets.\"/googleMap.js\",CClientScript::POS_HEAD);\n\t\t$cs->registerScript('ext.GInput#'.$id,$js,CClientScript::POS_END);\n\t}", "title": "" }, { "docid": "5e4c810c76b80c4501178461baff046f", "score": "0.58639854", "text": "public function registerClientScript($id)\n\t{\n\t\t$js=\"\n\t\t\t$(function() {\n\t\t \tconsole.log('Hello world');\n\t\t\t});\n\t\t\";\n\t\t$assets=$this->getAssets();\n\t\t$cs=Yii::app()->getClientScript();\n\t\t// $cs->registerScriptFile(\"https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&libraries=drawing\",CClientScript::POS_HEAD);\n\t\t// $cs->registerScriptFile($assets.\"/googleMap.js\",CClientScript::POS_HEAD);\n\t\t$cs->registerScript('ext.GInput#'.$id,$js,CClientScript::POS_END);\n\t}", "title": "" }, { "docid": "c98a1fffb848b0932a7a7e7bc5fb2396", "score": "0.58259183", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n $this->initClientOptions();\n $asset = UploadifyAsset::register($view);\n if (empty($this->clientOptions['swf'])) {\n $this->clientOptions['swf'] = $asset->baseUrl . '/uploadify.swf';\n }\n $id = $this->options['id'];\n $js = \"jQuery('#{$id}').uploadify(\" . Json::encode($this->clientOptions) . \");\";\n $view->registerJs($js);\n }", "title": "" }, { "docid": "8af5dca83180a3e4bbcbaada92e4e7cf", "score": "0.56973344", "text": "protected function registerClientScript()\n {\n $id = $this->options['id'];\n $view = $this->getView();\n ChartJsAsset::register($view);\n\n $config = Json::encode(\n [\n 'type' => $this->type,\n 'data' => $this->data ?: new JsExpression('{}'),\n 'options' => $this->clientOptions ?: new JsExpression('{}'),\n 'plugins' => $this->plugins\n ]\n );\n\n $js = \";var chartJS_{$id} = new Chart($('#{$id}'),{$config});\";\n $view->registerJs($js);\n }", "title": "" }, { "docid": "62e3f59820202c61173068a2afcadb26", "score": "0.5696043", "text": "public function addJavaScriptCode($name = '', $code = '')\n {\n $this->javascriptCodeArray[$name] = $code;\n }", "title": "" }, { "docid": "e49899013c3e971d23583eefa4f967e7", "score": "0.5677104", "text": "protected function registerClientScript()\n {\n $js = [];\n $view = $this->getView();\n\n MarkitupAsset::register($this->getView());\n\n $this->options = array_merge($this->_defaultOptions, $this->options);\n\n $id = $this->options['id'];\n\n $js[] = \"jQuery('#{$id}').markItUp(mySettings());\";\n\n $view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "71e4f4d11389bbaec313ae35dc60103a", "score": "0.56329846", "text": "public function registerScript($id, $code, $params) {\n $jsnames = implode(',', array_keys($params));\n $jsparams = array();\n foreach ($params as $param)\n $jsparams[] = CJavaScript::encode($param);\n\n $jsparams = implode(',', $jsparams);\n\n Yii::app()->clientScript->registerScript($id, \"(function ({$jsnames}) {{$code}})({$jsparams});\", CClientScript::POS_READY);\n\n }", "title": "" }, { "docid": "5c398bb455211d021e4acd87847bba97", "score": "0.561498", "text": "public function addJS($strFile) {\n\t\t\t$strFile = fixPath($strFile); \n\t\t\tif (!in_array($strFile, $this->arJS)) array_push($this->arJS, $strFile); \n\t\t}", "title": "" }, { "docid": "b794430168fd5ed1ac0628d23ca92cd9", "score": "0.56073517", "text": "function javascriptEncode($string) {\n\t\tstatic $strings = \"\\\\,\\\",',%,&,<,>,{,},@,\\n,\\r\";\n\t\t\n\t\tif(!is_array($strings)) {\n\t\t\t$tr = array();\n\t\t\tforeach(explode(',', $strings) as $chr) {\n\t\t\t\t$tr[$chr] = sprintf('\\x%02X', ord($chr));\n\t\t\t}\n\t\t\t$strings = $tr;\n\t\t}\n\t\t\n\t\treturn strtr($string, $strings);\n\t}", "title": "" }, { "docid": "055cd9014ea609bc2085b875661fe4ad", "score": "0.56043005", "text": "public function register(): void {\n\t\tif ( $this->type === 'script' ) {\n\t\t\t$this->register_script();\n\t\t}\n\n\t\tif ( $this->type === 'style' ) {\n\t\t\t$this->register_style();\n\t\t}\n\t}", "title": "" }, { "docid": "4b1e6f012b0d59e77f152fbc7919074b", "score": "0.5595052", "text": "protected function registerClientScript()\n {\n $view = $this->getView();\n\n DatePickerAsset::register($view);\n JuiAsset::register($view);\n\n $id = $this->options['id'];\n $options = Json::encode($this->clientOptions);\n $view->registerJs(\"jQuery('#$id').progressiveDatePicker('{$this->options['formattedValue']}', $options);\");\n }", "title": "" }, { "docid": "c647ed3da1c1621b0b2f0666651a3943", "score": "0.5583779", "text": "protected function registerClientScript()\n {\n $id = $this->options['id'];\n $view = $this->getView();\n $option = !empty($this->pluginOptions['option']) ? Json::encode($this->pluginOptions['option']) : '{}';\n\n if ($this->theme) {\n $js = \"var {$this->clientId} = echarts.init(document.getElementById('{$id}'), \" . $this->quote($this->theme) . \");\";\n } else {\n $js = \"var {$this->clientId} = echarts.init(document.getElementById('{$id}'));\";\n }\n $js .= \"{$this->clientId}.setOption({$option});\";\n if (isset($this->pluginOptions['group'])) {\n $js .= \"{$this->clientId}.group = \" . $this->quote($this->pluginOptions['group']) . \";\";\n }\n if ($this->responsive) {\n $js .= \"$(window).resize(function () {{$this->clientId}.resize()});\";\n }\n foreach ($this->pluginEvents as $name => $handlers) {\n $handlers = (array) $handlers;\n foreach ($handlers as $handler) {\n $js .= \"{$this->clientId}.on(\" . $this->quote($name) . \", $handler);\";\n }\n }\n\n EChartsAsset::register($view);\n $view->registerJs($js);\n }", "title": "" }, { "docid": "9307aabc9320ad011ae6584431808d21", "score": "0.55759007", "text": "public function addJS ($js) {\r\n\t\t\t$this->js .= \"<script src='js/$js.js' ></script>\";\r\n\t\t}", "title": "" }, { "docid": "77a1284a760b232e0fdbcd98e769f4f0", "score": "0.55734116", "text": "function phorum_mod_bbcode_google_javascript_register($data)\n{\n $data[] = array(\n \"module\" => \"bbcode_google\",\n \"source\" => \"file(mods/bbcode_google/bbcode_google.js)\"\n );\n return $data;\n}", "title": "" }, { "docid": "19fab4bc2d6ac5158e2201bc2a5a79e5", "score": "0.55553085", "text": "public function addJS($javascript)\r\n\t\t{\r\n\t\t\t$this->js = $this->js . '<script type=\"text/javascript\" src=\"'. $GLOBALS['PAGE']['root_dir'] . $javascript . '\"></script>';\r\n\t\t}", "title": "" }, { "docid": "7e374dfd0d86d1796b8029bf15d5888b", "score": "0.5551896", "text": "public function minifyJavaScriptCallsRegisteredHookWithInputString() {}", "title": "" }, { "docid": "2da16b26b8549169bff481385eac0908", "score": "0.5551141", "text": "private function _insertJSapicode() {\n\t\t$urlParam = (!empty($this->conf['googleapikey'])) ? $urlParam = '?key='.$this->conf['googleapikey'] : '';\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->extKey.'googleapikey'] = '<script type=\"text/javascript\" src=\"http://www.google.com/jsapi'.$urlParam.'\"></script>';\n\t}", "title": "" }, { "docid": "9d88a07a4681a51bc0c207249cb10ba8", "score": "0.5538647", "text": "public function addNewJsHead($type, $string, $dirName = 'framework') {\n\t\tif($type == 'file'):\n\t\t\tif($direction == 'framework') {\n\t\t\t\t$baseurl = '/media/nawala/js/' . $string;\n\t\t\t} else {\n\t\t\t\t$baseurl = '/templates/' . $dirName . '/assets/js/' . $string;\n\t\t\t}\n\t\t\treturn $this->doc->addScript($url);\n\t\telse:\n\t\t\treturn $this->doc->addScriptDeclaration($string);\n\t\tendif;\n\t}", "title": "" }, { "docid": "1358d9a90e4cf349d02ab11a7cb78ae5", "score": "0.5532367", "text": "static public function addJavaScript($new_js) {\n\t\tif (is_array($new_js)) {\n self::$js = array_merge(self::$js, $new_js);\n } else {\n self::$js[] = (string)trim($new_js);\n }\n\t}", "title": "" }, { "docid": "00117d304107a3285a0a520146ce7073", "score": "0.5525009", "text": "private function registerClientScript()\n {\n ArrayInputAsset::register($this->view);\n }", "title": "" }, { "docid": "04a5c85e853b3b51377b9c23ddcd0927", "score": "0.5523009", "text": "protected function registerClientScript()\n {\n $view = $this->getView();\n WebUIPopoverAsset::register($view);\n\n $id = $this->options['id'];\n if (!empty($this->pluginOptions)) {\n foreach($this->pluginOptions as $option => $value){\n if (in_array($option, ['onShow', 'onHide'])) {\n $this->pluginOptions[$option] = new JsExpression($value);\n }\n }\n }\n $options = Json::encode($this->pluginOptions);\n $js = \"$('#$id').webuiPopover($options);\";\n $view->registerJs($js);\n }", "title": "" }, { "docid": "f920b7401178ea71ea3855e8d2e29714", "score": "0.550785", "text": "public function addScript($javascript)\n\t{\n\t\t$this->script[] = $javascript;\n\t}", "title": "" }, { "docid": "c83d77f5e6f5d1dfd686acb3c4e43c69", "score": "0.5504749", "text": "private function registerGtag()\r\n {\r\n // Only load the JS if this integration is enabled.\r\n if (!(bool) $this->config->get('event_tracking::settings.integrations.gtag', true)) {\r\n return;\r\n }\r\n\r\n $al = AssetList::getInstance();\r\n\r\n $al->register(\r\n 'javascript',\r\n 'event_tracking/gtag',\r\n 'js/gtag.js',\r\n [],\r\n 'event_tracking'\r\n );\r\n\r\n $assetGroup = ResponseAssetGroup::get();\r\n $assetGroup->requireAsset('javascript', 'event_tracking/gtag');\r\n }", "title": "" }, { "docid": "ce4fb89de05f30938fb123658135e9f3", "score": "0.54965246", "text": "public function registerScript($source, $isHead=true)\n {\n $this->styleScripts[] = [\n 'isHead'=>$isHead,\n 'body'=>Html::script($source)\n ];\n }", "title": "" }, { "docid": "13de4f94316f8d66e136568d0e4a8651", "score": "0.54923385", "text": "public function setJavaScript($javaScript) {}", "title": "" }, { "docid": "86428f30f2786287a381d9971f40203a", "score": "0.5490033", "text": "protected function addJavaScript() {\n\t\t$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['contagged']);\n\t\t$javaScriptPathAndFilename = $extensionConfiguration['javaScriptPathAndFilename'];\n\t\tif (is_string($javaScriptPathAndFilename) && $javaScriptPathAndFilename !== '') {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData['contagged'] .= '<script src=\"' . $javaScriptPathAndFilename . '\" type=\"text/javascript\"></script>';\n\t\t}\n\t}", "title": "" }, { "docid": "47e6c99d8bad1ad316bb67267ebe95a8", "score": "0.54865456", "text": "public function setString($string);", "title": "" }, { "docid": "7e32ce450044203b0de577a35e893a42", "score": "0.54834694", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n PNotifyAsset::register($view);\n }", "title": "" }, { "docid": "8465dffe51b51734c214297fcbf2d66c", "score": "0.5477635", "text": "public function registerClientScript() {\n\t\t$cs = Yii::app()->getClientScript();\n\t\t$cs->registerCoreScript('jquery');\n\t\t$asset_url = Yii::app()->assetManager->publish(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'tiny_mce', false, -1, true);\n\t\t$cs->registerScriptFile(\"$asset_url/jquery.tinymce.js\", CClientScript::POS_END);\n\t\t$id = $this->htmlOptions['id'];\n\t\t$this->options = CMap::mergeArray($this->defaultOptions, $this->options);\n\t\t$this->options['script_url'] = \"$asset_url/tiny_mce.js\";\n\t\t$options = $this->options !== array() ? CJavaScript::encode($this->options) : '';\n\t\t$js =\"jQuery(\\\"#{$id}\\\").tinymce({$options});\";\n\t\t$cs->registerScript('KahWee.KRichTextEditor#' . $id, $js);\n\t}", "title": "" }, { "docid": "b7bcaf3d633483bc259c7e1e4d0b05b2", "score": "0.54749393", "text": "public function registerClientScript()\n\t{\n\t\t$view = $this->getView();\n\t\tSlideoutAsset::register($view);\n\n\t\t$options = empty($this->pluginOptions) ? \"{}\" : Json::encode($this->pluginOptions);\n\t\t$js = 'var '. $this->instanceName.' = new Slideout(' . $options . ')';\n\t\t$view->registerJs($js, $view::POS_END);\n\t}", "title": "" }, { "docid": "2a7494b0bbd3a8feb0c137a207550aa1", "score": "0.5471645", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n\n if ($this->plus) {\n FileUploadPlusAsset::register($view);\n } else {\n FileUploadAsset::register($view);\n }\n\n $options = Json::encode($this->clientOptions);\n $id = $this->options['id'];\n\n $js[] = \";jQuery('#$id').fileupload($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n $view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "17ef3788d46804407e0e105ada7c2a87", "score": "0.5471557", "text": "protected function loadJavaScriptLanguageStrings() {}", "title": "" }, { "docid": "0d3dd8fe313473cbc37b3f886644967e", "score": "0.5441724", "text": "protected function registerPlugin()\n {\n $id = $this->options['id'];\n\n /** @var \\yii\\web\\AssetBundle $assetClass */\n $bundle = CoreAsset::register($this->view);\n $bundle->js[] = 'js/i18n/elfinder.' . $this->clientOptions['lang'] . '.js';\n\n $cleanOptions = Json::encode($this->clientOptions);\n $js[] = \"var elf = $('#$id').elfinder($cleanOptions).elfinder('instance');\";\n\n $this->view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "220c09001cbc95286c26e3006adbe761", "score": "0.5423358", "text": "public function addJavascript($file) {\n $this->scripts[$file] = $file;\n }", "title": "" }, { "docid": "994fa3787baf0b621f599c8e11232465", "score": "0.539931", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n \n $jsObject = $this->optionsJs ?\n $this->optionsJs :\n ( empty( $this->options ) ? '{}' : json_encode( $this->options ));\n \n $view->registerJs( \"window.addEventListener(\\\"load\\\",function(){window.cookieconsent.initialise({$jsObject})});\", $view::POS_HEAD, 'cookieconsent-starter' );\n \n CookieConsentAsset::register( $view );\n }", "title": "" }, { "docid": "87bf914e414102904b78be53800176e6", "score": "0.5375942", "text": "public static function js(string $code): void {\n if (stripos(self::$js, $code) === false) {\n self::$js .= $code;\n }\n }", "title": "" }, { "docid": "497cc21027a8ec00a5420d85e05e6f81", "score": "0.5365892", "text": "private function registerClientScripts()\n {\n $view = $this->getView();\n\n TranslitAsset::register($view);\n\n $replace = Json::htmlEncode(TranslitHelper::$replace);\n $view->registerJs(\"translit.replace = $replace;\", $view::POS_READY, 'translit');\n }", "title": "" }, { "docid": "dc2384993e6fd0a369bffeff1c0c6886", "score": "0.53656", "text": "public function addJS($source) {\n\t\t\n\t\t\t$this->_js[] = '<script type=\"text/javascript\" src=\"' . $source . '\"></script>';\n\t\t\t\n\t\t}", "title": "" }, { "docid": "fa5f02f2626219836a58cbd180399543", "score": "0.53650725", "text": "public function registerClientScript()\n\t{\n\t\t/* publish assets dir */\n\t\t$assetsUrl = $this->getAssetsUrl('wheels.widgets.assets.timepicker');\n\n\t\t/* @var $cs \\CClientScript */\n\t\t$cs = \\Yii::app()->getClientScript();\n\n\t\t$cs->registerCssFile($assetsUrl . '/css/bootstrap-timepicker.min.css')\n\t\t\t->registerScriptFile($assetsUrl . '/js/bootstrap-timepicker.min.js');\n\n\t\t$this->registerPlugin('timepicker');\n\t}", "title": "" }, { "docid": "f9b214cb210e8560caa08521480363af", "score": "0.536341", "text": "public function registerClientScript()\n {\n $options = $this->getClientOptions();\n $this->hashMask = 'inputmask_' . hash('crc32', serialize($options));\n $js = '';\n $id = $this->options['id'];\n $view = $this->getView();\n $view->registerJs(\"var {$this->hashMask} = {$options};\", $view::POS_HEAD);\n $js .= \"jQuery(\\\"#{$id}\\\").inputmask({$this->hashMask});\";\n InputMaskAsset::register($view);\n $view->registerJs($js);\n }", "title": "" }, { "docid": "d5ff858b6dcb907e4249f43ee4ee3ba0", "score": "0.5356868", "text": "protected function registerScript()\n\t{\n\t $baseUrl = Yii::app()->getHomeUrl();\n\t $js_arr = array('triggmine-scripts.js');\n\t foreach($js_arr as $filename)\n\t {\n\t Yii::app()->getClientScript()->registerScriptFile('/js/vendor/'.$filename, CClientScript::POS_END);\n\t }\n\t}", "title": "" }, { "docid": "b6603e2ced25121b4ccac1e8fdfe7f7d", "score": "0.5342745", "text": "protected function addCustomJS()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "ca55e68550fb77f00d7ddac9597aa7ef", "score": "0.53368527", "text": "function add_myscript(){\n}", "title": "" }, { "docid": "db72a254863468b046ccf085a3043a23", "score": "0.5330443", "text": "public function setPlaceholderJavascript($value) { $this->_placeholderJavascript = $value; }", "title": "" }, { "docid": "666e283f4513c4cb710861c75875557b", "score": "0.5308044", "text": "public function jsEscape($string = '')\n {\n return addcslashes($string, \"\\\"\");\n }", "title": "" }, { "docid": "84784455d8ae572fdfaf317bf5b554ab", "score": "0.52905804", "text": "public function registerScript($id, $url, $dependencies = null)\n {\n $this->scripts[$id] = array(\n 'key' => $id\n ,'url' => $url\n ,'dependencies' => $dependencies\n );\n }", "title": "" }, { "docid": "16d5f75151b61d7fe0a70a495d4cbc00", "score": "0.5288176", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n\n CroppieAsset::register($view);\n\n if (isset($this->clientOptions['enableExif']) && $this->clientOptions['enableExif'] === true) {\n ExifJsAsset::register($view);\n }\n\n $options = !empty($this->clientOptions)\n ? Json::encode($this->clientOptions)\n : '';\n\n $id = $this->getId();\n\n $js[] = \";jQuery('#$id').croppie($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n\n $view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "9b3e5acd63dafd3074562562be8cd3f2", "score": "0.5274213", "text": "public function register_script() {\n\t\ttribe_asset(\n\t\t\tTribe__Main::instance(),\n\t\t\t'tribe-common-logging-controls',\n\t\t\t'admin-log-controls.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'admin_enqueue_scripts',\n\t\t\tarray(\n\t\t\t\t'conditionals' => array( Tribe__Admin__Help_Page::instance(), 'is_current_page' ),\n\t\t\t\t'localize' => (object) array(\n\t\t\t\t\t'name' => 'tribe_logger_data',\n\t\t\t\t\t'data' => array(\n\t\t\t\t\t\t'check' => wp_create_nonce( 'logging-controls' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "23ae6087d14b23fa6f60c3899c188397", "score": "0.5262993", "text": "function addString($string_to_add){\n\t\tsettype($string_to_add,\"string\");\n\t\tif(strlen($string_to_add)>0){\n\t\t\t$this->_Items[] = new StringBufferItem($string_to_add);\n\t\t}\n\t}", "title": "" }, { "docid": "ad85d1e6ad8a829940b7c59c3ff02766", "score": "0.525431", "text": "public function registerPlugin()\n {\n global $elementIdIncrementForJs;\n $config = array_merge( $this->defaultClientOptions,$this->clientOptions);\n $config['uploadUrl'] = $this->uploadUrl;\n $config['el'] = '#'.$this->getElName() . ++$elementIdIncrementForJs;;\n if (($value = Html::getAttributeValue($this->model, $this->attribute)) != null) {\n $config['imageList'] = (array) $value;\n }\n\n $js = Json::encode($config);\n $this->getView()->registerJs('new ' . self::JS_CLASS_NAME . \"($js)\", View::POS_END);\n }", "title": "" }, { "docid": "81b8430266bd8ecfce3c58c99fae2625", "score": "0.5242291", "text": "public function add_script($data){\n\t\tif(filter_var($data, FILTER_VALIDATE_URL)){\n\t\t\t$this->add_content_var(new elem(\"script\",\"\",array(\"src\"=>$data,\"type\"=>\"text/javascript\")));\n\t\t}\n\t\telse{\n\t\t\t$this->add_content_var(new elem(\"script\",$data,array(\"type\"=>\"text/javascript\")));\n\t\t}\n\t}", "title": "" }, { "docid": "9a722ad5ccdf587f59be85ddc11f6bdc", "score": "0.5239494", "text": "function jsreplace($str)\n{\n\t$ret= str_replace(array(\"\\\\\",\"'\",\"\\r\",\"\\n\"),array(\"\\\\\\\\\",\"\\\\'\",\"\\\\r\",\"\\\\n\"),$str);\n\treturn my_str_ireplace(\"</script>\",\"</scr'+'ipt>\",$ret);\n}", "title": "" }, { "docid": "b449ef25f00b840ab6ea054623e1563e", "score": "0.52306783", "text": "public function testPackJavascript()\n {\n $this->assertStringContainsString('eval(function(p,a,c,k,e,d)', $this->getExtension()->t_packer('alert(\\'checking this\\');'));\n }", "title": "" }, { "docid": "c719643eb507bb6f61967c41a324ecae", "score": "0.5228864", "text": "private function registerConfigForJS($config)\n {\n $jsConfig = [\n 'modelId' => $config['model']->id,\n 'attribute' => $config['attributes']['attribute'],\n 'tempAttribute' => $config['attributes']['tempAttribute'],\n 'attributeId' => Html::getInputId($config['model'], $config['attributes']['attribute']),\n 'attributeName' => mb_strtolower($config['model']->getAttributeLabel($config['attributes']['attribute'])),\n 'tempAttributeId' => Html::getInputId($config['model'], $config['attributes']['tempAttribute']),\n 'uploadType' => $config['uploadType'],\n 'uploadUrl' => UploadHelper::uploadUrl($config['uploadPath'], true),\n 'translations' => $config['translations'],\n 'deleteUrl' => trim($config['urlOptions']['deleteUrl']),\n 'uploadPath' => $config['uploadPath'],\n 'modelNamespace' => $config['responseJson']['upload-event']['namespace']\n ];\n\n $this->view->registerJs(' var fileUploadConfig' . $config['attributes']['attribute'] . ' = ' . json_encode($jsConfig) . '',\n View::POS_HEAD);\n }", "title": "" }, { "docid": "53000747a727a166c8570b880952668b", "score": "0.5227516", "text": "public function register() {\n\t\t$this->register_script();\n\t\t$this->register_style();\n\t\t$this->register_type();\n\t}", "title": "" }, { "docid": "7dd0953ec082d1785a988d8e30214def", "score": "0.5226152", "text": "public function registerScript(string $path): self\n {\n return $this->addAsset($path);\n }", "title": "" }, { "docid": "f2b44889c1bd8e7669dc33cd24ac0626", "score": "0.5224152", "text": "protected function registerClientScript() {\n $cs = Yii::app()->getClientScript();\n\n // Build jQuery Raty options\n // $options = CMap::mergeArray($this->_defaultOptions, $this->options);\n if (!isset($this->options['target'])) {\n $this->options['target'] = '#' . $this->targetHtmlOptions['id'];\n }\n\n if (!empty($this->data)) {\n $this->options['hints'] = $this->data;\n $this->options['number'] = count($this->data);\n $this->options['targetType'] = 'hint';\n }\n\n // Global default options\n if (!$cs->isScriptRegistered(__CLASS__ . '#defaults', CClientScript::POS_HEAD)) {\n $js_default = '';\n $defaultOptions = $this->_defaultOptions;\n unset($defaultOptions['target']);\n unset($defaultOptions['score']);\n foreach ($defaultOptions as $id_option => $val_option) {\n $js_default .= \"$.fn.raty.defaults.\" . $id_option . \"=\" . CJavaScript::encode($val_option) . \"; \\n\";\n }\n $cs->registerScript(__CLASS__ . '#defaults', $js_default, CClientScript::POS_HEAD);\n }\n\n // Javascript needed for this raty widget\n $cs->registerCoreScript('jquery');\n $cs->registerScriptFile(\"{$this->assetsUrl}/js/jquery.raty\" . (YII_DEBUG ? '' : '.min') . \".js\");\n $cs->registerScript(__CLASS__ . '#' . $this->id, \"jQuery('#{$this->htmlOptions['id']}').raty(\" . CJavaScript::encode($this->options) . \"); jQuery('{$this->options['target']}').hide();\", CClientScript::POS_READY);\n }", "title": "" }, { "docid": "e69e713bc699ddcdb55352968590f362", "score": "0.5224147", "text": "protected function initJavascriptCode() {}", "title": "" }, { "docid": "73e986392c99ea06b43b1b8b65c6a4bf", "score": "0.5215281", "text": "public function addJavascript($script) {\n\t\tLibraries::enqueueJavascript($script);\n\t}", "title": "" }, { "docid": "b74fc878cefc64b80753818172046b9d", "score": "0.52068037", "text": "function atto_media_strings_for_js() {\n global $PAGE;\n\n $PAGE->requires->strings_for_js(array('add',\n 'addcaptionstrack',\n 'addchapterstrack',\n 'adddescriptionstrack',\n 'addmetadatatrack',\n 'addsource',\n 'addsubtitlestrack',\n 'addtrack',\n 'advancedsettings',\n 'audio',\n 'audiosourcelabel',\n 'autoplay',\n 'browserepositories',\n 'browserepositories',\n 'captions',\n 'captionssourcelabel',\n 'chapters',\n 'chapterssourcelabel',\n 'controls',\n 'createmedia',\n 'default',\n 'descriptions',\n 'descriptionssourcelabel',\n 'displayoptions',\n 'entername',\n 'entertitle',\n 'entersource',\n 'enterurl',\n 'height',\n 'kind',\n 'label',\n 'languagesavailable',\n 'languagesinstalled',\n 'link',\n 'loop',\n 'metadata',\n 'metadatasourcelabel',\n 'mute',\n 'poster',\n 'remove',\n 'size',\n 'srclang',\n 'subtitles',\n 'subtitlessourcelabel',\n 'track',\n 'tracks',\n 'video',\n 'videoheight',\n 'videosourcelabel',\n 'videowidth',\n 'width'),\n 'atto_media');\n}", "title": "" }, { "docid": "33b9c27a76ac13969c1b4e16a3cf76cd", "score": "0.5192632", "text": "protected function registerClientScript()\n {\n $js = [];\n $view = $this->getView();\n\n TinyMceAsset::register($view);\n\n $id = $this->options['id'];\n\n Yii::debug($this->language, 'DBG');\n if ($this->language == null) {\n $this->language = yii::$app->language;\n }\n if ($this->language == \"en\") $this->language = \"en_GB\";\n $this->clientOptions['language'] = $this->language;\n Yii::debug($this->language, 'DBG');\n\n $this->clientOptions['document_base_url'] = yii::$app->urlManager->hostInfo . '/';\n\n $this->clientOptions['content_css'] =\n yii::$app->assetManager->getPublishedUrl(yii::$app->assetManager->getBundle('yii\\bootstrap\\BootstrapAsset')->sourcePath) . \"/css/bootstrap.css,\" .\n $this->extraCss;\n $this->clientOptions['selector'] = \"#$id\";\n\n $langFile = \"langs/{$this->language}.js\";\n $langAssetBundle = TinyMceLangAsset::register($view);\n $langAssetBundle->js[] = $langFile;\n $this->clientOptions['language_url'] = $langAssetBundle->baseUrl . \"/{$langFile}\";\n $options = Json::encode($this->clientOptions);\n\n $js[] = \"tinymce.init($options);\";\n $js[] = \"$('#{$id}').parents('form').on('beforeValidate beforeSubmit submit', function() {\n tinymce.triggerSave();\n $('[name={$id}]').attr('name',$('#{$id}').attr('name'));\n return true;\n });\";\n $view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "cef43f518e3fc8daebc2823ba1211ac9", "score": "0.5179385", "text": "protected function renderJavascript(){\n \n return sprintf(\n '<script type=\"text/javascript\" src=\"%s\"></script>',\n $this->getField('url')\n );\n \n }", "title": "" }, { "docid": "5be9bb9a6b7b6ce24226d83124656e84", "score": "0.51785225", "text": "function add()\n{\n\t$args = func_get_args();\n\t$string = array_shift($args);\n\tSystem::InterfaceHandler()->content(vsprintf($string, $args));\n}", "title": "" }, { "docid": "9b7ad5ff2631df6ef2a82a5054ebd2bb", "score": "0.51778716", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n\n CroppieAsset::register($view);\n\n if (isset($this->clientOptions['enableExif']) && $this->clientOptions['enableExif'] === true) {\n ExifJsAsset::register($view);\n }\n\n $options = !empty($this->clientOptions)\n ? Json::encode($this->clientOptions)\n : '';\n\n $id = $this->getId();\n\n $js[] = \";jQuery('#$id').croppie($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n\n $view->registerJs(implode(\"\\n\", $js), View::POS_READY, 'test-croppie-js');\n }", "title": "" }, { "docid": "ce8f2f006c9e721bf0d989a81937bce8", "score": "0.51742566", "text": "public function insert_js_code() {\n echo \"\\n<script>\\n\" . $this->getJsCodeToEcho($this->pluginCommon->optGid(), array(\n 'log' => $this->pluginCommon->optUseLogging(),\n 'localserver' => $this->isIgnoredServer(),\n )) . '</script>' . \"\\n\";\n }", "title": "" }, { "docid": "46ac6059f5f4c71f09e34bd080864e27", "score": "0.51657724", "text": "protected function renderJavascript($js){\n\t\t$this->renderText(\"<script type='text/javascript'>$js</script>\");\n\t}", "title": "" }, { "docid": "fd38385a75cdf604258a38a49362bf4f", "score": "0.5163167", "text": "protected function registerClientScript()\n\t{\n\t\t$cs=Yii::app()->clientScript;\n\t\t$cs->registerScriptFile(Yii::app()->request->baseUrl.'/js/ImageSelector.js', CClientScript::POS_HEAD);\n\t}", "title": "" }, { "docid": "a8d993f5e8ad0fb584aae6f34558f518", "score": "0.5153145", "text": "public function register_strings() {\r\n\t\t$db = Maps_Marker_Pro::get_instance('MMP\\DB');\r\n\t\t$l10n = Maps_Marker_Pro::get_instance('MMP\\L10n');\r\n\r\n\t\tif (!isset($_POST['nonce']) || wp_verify_nonce($_POST['nonce'], 'mmp-tools-register-strings') === false) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('Security check failed', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\tif (!$l10n->ml) {\r\n\t\t\twp_send_json(array(\r\n\t\t\t\t'success' => false,\r\n\t\t\t\t'message' => esc_html__('No supported multilingual plugin found', 'mmp')\r\n\t\t\t));\r\n\t\t}\r\n\t\t$maps = $db->get_all_maps();\r\n\t\tforeach ($maps as $map) {\r\n\t\t\t$l10n->register(\"Map (ID {$map->id}) name\", $map->name);\r\n\t\t}\r\n\t\t$markers = $db->get_all_markers();\r\n\t\tforeach ($markers as $marker) {\r\n\t\t\t$l10n->register(\"Marker (ID {$marker->id}) name\", $marker->name);\r\n\t\t\t$l10n->register(\"Marker (ID {$marker->id}) address\", $marker->address);\r\n\t\t\t$l10n->register(\"Marker (ID {$marker->id}) popup\", $marker->popup);\r\n\t\t}\r\n\t\twp_send_json(array(\r\n\t\t\t'success' => true,\r\n\t\t\t'message' => esc_html__('Strings for all maps and markers successfully registered for translation', 'mmp')\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "f3152be2b86b00148916e99864917de6", "score": "0.5144949", "text": "protected function addJavascriptToBackend() {\n\t\t$this->backendReference->addJavascriptFile(t3lib_extMgm::extRelPath($this->extkey) . 'mod_role/newspaper_role.js');\n\t}", "title": "" }, { "docid": "4ac4ea4c8a9dd16457e40d409e1d4704", "score": "0.51421714", "text": "public function AddJS($javascript){\n\t\t$headHTML = \"\";\n\t\tif(!is_array($javascript)){\n\t\t\t$javascript = [$javascript];\n\t\t}\n\t\tforeach($javascript as $js){\n\t\t\t$strExt = strtolower(substr($js,-3)) != \".js\" ? \".js\" : \"\";\n\t\t\t$js = $js.$strExt;\n\t\t\t$routeInApplication = APP_PATH.$js;\n\t\t\tif(is_file($routeInApplication)){\n\t\t\t\t$headHTML .= '<script type=\"text/javascript\" src=\"'.URL_APP.$routeInApplication.'\" ></script>';\n\t\t\t}else{\n\t\t\t\tthrow new \\Exception(\"The JS file \".$js.\" is not found in the application\");\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $headHTML;\n\t}", "title": "" }, { "docid": "47f259ea86d926774840ceb2ed8a88b3", "score": "0.51373124", "text": "public function injectJavascriptInView(): void;", "title": "" }, { "docid": "7dd126500267501603d06bcee1c2d00d", "score": "0.5134802", "text": "function jxjslanginject()\n{\n\t$app = &JFactory::getApplication();\n\t$doc = &JFactory::getDocument();\n\n\tif ($doc->getType() == 'html') {\n\t\t$lang = $app->get('jx.jslang', array());\n\t\tif (!empty($lang)) {\n\t\t\t$txt = '{';\n\t\t\tforeach ($lang as $k => $v)\n\t\t\t{\n\t\t\t\t$txt .= $k.':\"'.$v.'\",';\n\t\t\t}\n\t\t\tif (strlen($txt) > 1) {\n\t\t\t\t$txt = substr($txt, 0, strlen($txt) - 1);\n\t\t\t}\n\t\t\t$txt .= '}';\n\t\t\t$doc->addScriptDeclaration('\tJXLang='.$txt.';');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "849e8e4c0ffb3904774eeeeeac5a876e", "score": "0.51134264", "text": "protected function registerScripts($id, $embeddedScript)\n\t{\n\t\t$basePath = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR;\n\t\t$baseUrl = Yii::app()->getAssetManager()->publish($basePath, false, 1, YII_DEBUG);\n\t\t$scriptFile = 'http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false';\n\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerCoreScript('jquery');\n\t\t$cs->registerScriptFile($scriptFile);\n\n\t\techo '<script>' . $embeddedScript . '</script>';\n\t}", "title": "" }, { "docid": "a568455088ea6dbd2e1d826653455b04", "score": "0.51031387", "text": "public static function js();", "title": "" }, { "docid": "5cafb99150173b3b298db9c14720eed9", "score": "0.51029646", "text": "public function js();", "title": "" }, { "docid": "818a49c206f9ada89a69d92f30bc54d3", "score": "0.5102352", "text": "public function registerClientScript()\n\t{\n\t\t$view = $this->getView ();\n\t\tSimpleDualListboxAsset::register ( $view );\n\t\t$options = Json::encode ( empty ( $this->clientOptions ) ? [ ] : $this->clientOptions );\n\t\t$data = Json::encode ( $this->items_nosel );\n\t\t$view->registerJs ( \"$('#$this->id').listboxdual($options, $data);\" );\n\t}", "title": "" }, { "docid": "71dc01d4aaccd6b3e09aafafbc446782", "score": "0.5097215", "text": "private function registerGoogleAnalytics()\r\n {\r\n // Only load the JS if this integration is enabled.\r\n if (!(bool) $this->config->get('event_tracking::settings.integrations.google_analytics', false)) {\r\n return;\r\n }\r\n\r\n $al = AssetList::getInstance();\r\n\r\n $al->register(\r\n 'javascript',\r\n 'event_tracking/google_analytics',\r\n 'js/google-analytics.js',\r\n [],\r\n 'event_tracking'\r\n );\r\n\r\n $assetGroup = ResponseAssetGroup::get();\r\n $assetGroup->requireAsset('javascript', 'event_tracking/google_analytics');\r\n }", "title": "" }, { "docid": "c77e6b708c163d2f924d0ca78fc53b81", "score": "0.5095982", "text": "protected function addOnSubmitJavaScriptCode() {}", "title": "" }, { "docid": "0859287b340693cc7993f18aa67bca49", "score": "0.50871766", "text": "public function registerInlineJs(string $code): self\n {\n return $this->registerRequireJsModule('TYPO3/CMS/Backend/FormEngine', $code);\n }", "title": "" }, { "docid": "5db7d3f9603d7cfe5f692faf278c8d5a", "score": "0.50819796", "text": "function pushScript ($script) {\n\t\t$this->_roof[\"cuerpo\"][] = \"<script type=\\\"text/javascript\\\" src=\\\"\".$script.\"\\\"></script>\";\n\t}", "title": "" }, { "docid": "b6e86cba48aa40e575f5b9630ecdfe1e", "score": "0.50787485", "text": "public function addScript($js) {\r\n $this->body[] = self::getScript($js);\r\n }", "title": "" }, { "docid": "042995ef1d8e7cd5e26115645e7eac5d", "score": "0.50780356", "text": "protected function registerPlugin($name)\n {\n $view = $this->getView();\n $id = $this->options['id'];\n if ($this->clientOptions !== false) {\n $options = empty($this->clientOptions) ? '' : Json::htmlEncode($this->clientOptions);\n $js = \"jQuery('#$id').$name($options);\";\n $view->registerJs($js);\n }\n $this->registerClientEvents();\n }", "title": "" }, { "docid": "7666f337654a97ba0294af7bf55e9586", "score": "0.5075855", "text": "private function addScripts() {\n global $CFG; \n $script = \"<script type=\\\"text/javascript\\\">\n jQuery(document).ready(function() {\n codeActivity.initEdit(); \n codeActivity.ajaxURL = '\" . $CFG->wwwroot . \"/mod/codeactivity/ajax.php';\n codeActivity.lang = {\n empty_name: '\" . addslashes(get_string('js_empty_name', 'codeactivity')) . \"',\n empty_test_code: '\" . addslashes(get_string('js_empty_test_code', 'codeactivity')).\"',\n error_add: '\" . addslashes(get_string('js_error_add', 'codeactivity')).\"',\n error_delete: '\" . addslashes(get_string('js_error_delete', 'codeactivity')).\"',\n error_forbidden: '\" . addslashes(get_string('js_error_forbidden', 'codeactivity')).\"'\n }\n });\n </script>\";\n \n $this->_form->addElement('html', $script);\n }", "title": "" }, { "docid": "2e378e69aa14b84aea71bcad2053dca5", "score": "0.50754124", "text": "protected function registerClientScript()\n {\n $this->registerPlugin('sideNav', '.sidenav-toggle');\n }", "title": "" }, { "docid": "f6f03443e781f5eab6372ee2c6e16d07", "score": "0.50714433", "text": "public static function enqueue_user_js( $js_paths_str, $load_in_footer = false ) {\n\n\t\tif ( !empty( $js_paths_str ) )\n\t\t{\n\n\t\t\t$js_paths_arr\t = array_map( 'trim', array_filter( explode( PHP_EOL, $js_paths_str ) ) );\n\n\t\t\tforeach ( $js_paths_arr as $js_entry )\n\t\t\t{\n\t\t\t\t$entry_arr\t = explode( ',', str_replace( ' ', '', $js_entry ) );\n\t\t\t\t$handle\t\t = self::get_asset_handle( $entry_arr );\n\t\t\t\t$version\t\t = self::get_asset_version( $entry_arr );\n\t\t\t\t$dependency_arr\t = array_slice( $entry_arr, 3 );\n\t\t\t\t$url_path\t = self::get_abs_or_rel_asset_path( $entry_arr[ 0 ], 'js' );\n\n\t\t\t\twp_register_script( $handle, esc_attr( $url_path ), $dependency_arr, $version, $load_in_footer );\n\t\t\t\twp_enqueue_script( $handle );\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "66b813e304f0a25a67cfa5ff33603751", "score": "0.506998", "text": "public function add_js($name, $data = array())\n\t{\n\t\t$this->add_asset('js', $name, $data);\n\t}", "title": "" }, { "docid": "8b121a2b0677bb5bf45d67fe3c822d88", "score": "0.5067235", "text": "protected function registerCustomJS() {\r\n $this->jsCustoms = array();\r\n }", "title": "" } ]
870f21e97f489a90f760db962471c18f
Determine whether the user can create layoutsections.
[ { "docid": "683a1197e449efb15adfc24e78c95cb3", "score": "0.71131325", "text": "public function create_layoutsection(User $user)\n {\n return $user->role === 'admin';\n }", "title": "" } ]
[ { "docid": "c7e58c0b7c5ba128cb465fce0f999532", "score": "0.6530083", "text": "public function isEnabled() {\n return $this->isLayout;\n }", "title": "" }, { "docid": "e3efc2d76d78548c6d83490f3e038e6a", "score": "0.6135169", "text": "public function hasLayout()\n {\n return $this->layoutNameNode !== null;\n }", "title": "" }, { "docid": "529da6a6a0c963661cd6dd8798d09cf2", "score": "0.60801816", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Dadolun_ThemeLayoutBlock::theme_layout_block');\n }", "title": "" }, { "docid": "a2d3d26c6aebbc87b2c44827a61aa784", "score": "0.607554", "text": "function hasCreatePermission() {\n\t\treturn( $this->hasUserPermission( $this->mCreateContentPerm ) );\n\t}", "title": "" }, { "docid": "451f2ae0d9375cc40e775b94b1e01ffa", "score": "0.6048165", "text": "public function isSection()\n {\n return true;\n }", "title": "" }, { "docid": "07f9e35e3f3d5093921f41da6cf31752", "score": "0.6044081", "text": "public function isAdminSection()\n {\n return ($this->status == 2);\n }", "title": "" }, { "docid": "90c86a8bae90680d6dc7e363f301c08c", "score": "0.6041545", "text": "public function canCreatePrivateSpace()\n {\n $user = $this->loadUser(Yii::app()->user->id);\n\n if (Yii::app()->user->isAdmin()) {\n return true;\n } elseif ($user->group !== null && $user->group->can_create_private_spaces == 1) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "c22e270056d2668232fd1e3fca0d65f1", "score": "0.6006837", "text": "function has_admin_permission_layout($permission_name, $type = ''){\n\n\tif($type == '' ) {\n\t\t$type = 'admin';\n\t}\t\n\tif(!has_admin_permission($permission_name)) {\n\t\tif ($type == 'admin') {\n\t\t loadLayout('common/admin_permission_denied', null , $type);\n\t\t}\n\t\tif ($type == 'popup') {\n\t\t loadLayout('common/admin_permission_denied', null , $type); \n\t\t}\n\t\t\n\t\t return false;\n }\t\n return true;\n\n}", "title": "" }, { "docid": "767a27ce14c37f0fbdf58192f0b7943c", "score": "0.59734815", "text": "public function canCreatePublicSpace()\n {\n $user = $this->loadUser(Yii::app()->user->id);\n\n if (Yii::app()->user->isAdmin()) {\n return true;\n } elseif ($user->group !== null && $user->group->can_create_public_spaces == 1) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "061180fd347c33e4d0668525a342e373", "score": "0.5908383", "text": "function md_ide_creator_permissions(){\n\t$enable = false;\n\tif ( is_user_logged_in() ) {\n\t\t$general = get_option('md_receipt_settings');\n\t\tif (!empty($general)) {\n\t\t\tif (!is_array($general)) {\n\t\t\t\t$general = unserialize($general);\n\t\t\t}\n\t\t\t$admin_enable = $general['creator_permissions'];\n\t\t\tif (current_user_can('manage_options') || $admin_enable == 3) {\n\t\t\t\t$enable = true;\n\t\t\t} \n\t\t\telseif ($admin_enable == 2) {\n\t\t\t\t//Only owners of the right levels can create projects, so we check to see if there's a level match\n\t\t\t\t$levelsowned = ID_Member::get_user_levels();\n\t\t\t\t$levelspermitted = idmember_get_cperms(1);\n\t\t\t\tif (!empty($levelsowned)) {\n\t\t\t\t\tforeach ($levelsowned as $cur){\n\t\t\t\t\t\tif (in_array($cur, $levelspermitted)){\n\t\t\t\t\t\t\t$enable = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $enable;\n}", "title": "" }, { "docid": "281701dd6a52e53f88350c6b7336f047", "score": "0.5887603", "text": "public function isSection() {\n\t\t$this->prepareCurrentAndSection();\n\t\treturn in_array($this->ID, self::$currentSectionIDs);\n\t}", "title": "" }, { "docid": "e8c42771f25516d17f39110a6dc3b7dd", "score": "0.5884252", "text": "public function canAddAndGetSections()\n {\n $this->object->addComment('value 0');\n $this->object->addDirective('name', 'value0');\n $this->object->addSection('name', array('name'=>'value0'));\n $this->object->addComment('value 1');\n $this->object->addSection('name', array('name'=>'value1'));\n $content = $this->object->getSection('name')->getDirective('name');\n $this->assertEquals('value0', $content->getContent());\n $content = $this->object->getSection('name', 1)->getDirective('name');\n $this->assertEquals('value1', $content->getContent());\n $content = $this->object->getSections('name')->getDirectives('name');\n $this->assertEquals('value0', $content[0]->getContent());\n $this->assertEquals('value1', $content[1]->getContent());\n try {\n $content = $this->object->getSection('name', 2);\n } catch (InvalidArgumentException $e) {\n $this->assertContains('2', $e->getMessage());\n }\n $this->assertTrue(isset($e));\n }", "title": "" }, { "docid": "84c7a5e2230738073f8499ff06ffa699", "score": "0.5880365", "text": "function has_puzzle_creation_access() {\n if (is_logged_in()) {\n if (is_admin()) {\n // admins have access to create puzzle functionality\n return true; \n } else if (isset($_SESSION['user_id'])) {\n if (is_author($_SESSION['user_id'])) {\n // authors have access to create puzzle functionality\n return true;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "179cb134892846d69ee7f2e5644e6a79", "score": "0.5863302", "text": "public function canCreate() {\n\t\treturn in_array(Session::getRole(),self::$_authors);\n\t}", "title": "" }, { "docid": "58b60de607fc9f0def13fccedb19296e", "score": "0.58409965", "text": "public function canCreate() {\n\t\treturn $this->_perms->checkModuleItem ( $this->_tbl_module, 'view', $this->task_log_task );\n\t}", "title": "" }, { "docid": "82f8705ab3f06102f81cd084fb8f76f4", "score": "0.581389", "text": "public static function beUserHasRightToSeeMultiColumnContainer()\n {\n // FIXME Too many returns, refactor this mess.\n\n $hasAccess = true;\n $TSconfig = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getPagesTSconfig($GLOBALS['SOBE']->id);\n\n // check remove items\n if (!empty($TSconfig['TCEFORM.']['tt_content.']['CType.']['removeItems'])) {\n $hasAccess = GeneralUtility::inList($TSconfig['TCEFORM.']['tt_content.']['CType.']['removeItems'], 'multicolumn') ? false : true;\n if (!$hasAccess) {\n return false;\n }\n }\n\n // is admin?\n if (!empty($GLOBALS['BE_USER']->user['admin'])) {\n return $hasAccess;\n }\n\n // is explicitADmode allow ?\n if ($GLOBALS['TYPO3_CONF_VARS']['BE']['explicitADmode'] === 'explicitAllow') {\n $hasAccess = GeneralUtility::inList($GLOBALS['BE_USER']->groupData['explicit_allowdeny'], 'tt_content:CType:multicolumn:ALLOW') ? true : false;\n } else {\n $hasAccess = GeneralUtility::inList($GLOBALS['BE_USER']->groupData['explicit_allowdeny'], 'tt_content:CType:multicolumn:DENY') ? false : true;\n }\n\n return $hasAccess;\n }", "title": "" }, { "docid": "7113b17901953898ea04286d6f8e577f", "score": "0.57446116", "text": "public function canCreateSpace()\n {\n return ($this->canCreatePrivateSpace() || $this->canCreatePublicSpace());\n }", "title": "" }, { "docid": "5d87fb31f6680a47f553574860fcfa68", "score": "0.5719426", "text": "public function has_sections()\n {\n return count($this->get_sections()) > 0;\n }", "title": "" }, { "docid": "9a149a848b80caf13628c53daa9723b8", "score": "0.5691822", "text": "public function hasAccessCreate() : bool\n {\n return (user() and user()->hasAccess(strtolower($this->moduleName), PERM_CREATE));\n }", "title": "" }, { "docid": "75872ce8d6c2b94a26a19f9594154b11", "score": "0.56765926", "text": "public function canCreate() {\n\t\treturn $this->stat('can_create') != false || Director::isDev();\n\t}", "title": "" }, { "docid": "3743d4d82e3617c95173ddef5901a308", "score": "0.56193936", "text": "function bp_is_course_create() {\n\tif ( bp_is_course_component() && bp_is_current_action( 'create' ) )\n\t\treturn true;\n\n\treturn false;\n}", "title": "" }, { "docid": "2a048e9f41d0c13dc19593786be0fa53", "score": "0.56137955", "text": "public function isLayoutDisabled()\n {\n return (bool)$this->_disableLayout;\n }", "title": "" }, { "docid": "4d51a10fb0d3c02038aa81c0f5980458", "score": "0.5572166", "text": "public function checkPermissions() {\n\t\treturn $this->modx->hasPermission('new_document');\n\t}", "title": "" }, { "docid": "2caee8c98f9fa6b3d18f4c85acdc51be", "score": "0.557092", "text": "public function authorize()\n {\n if ($this->user && $this->user->hasPermission('manage_collections') ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f0acfef282cdad374ac6c5990ba63d4f", "score": "0.5557645", "text": "protected function has_sections() {\n\t\t_deprecated_function( __METHOD__, '11.9' );\n\t\treturn true;\n\t}", "title": "" }, { "docid": "3a6dbf92b0d72a16c1121ebeb90b85a1", "score": "0.5496558", "text": "function verifyCreatePermission() {\n\t\tglobal $gBitSystem;\n\t\tif( !$this->isValid() && $this->hasCreatePermission() ) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$gBitSystem->fatalPermission( $this->mCreateContentPerm );\n\t\t}\n\t}", "title": "" }, { "docid": "07b2256c37bcb3815559e777bf297b93", "score": "0.54559106", "text": "public function checkPermissions() {\n return $this->modx->hasPermission('policy_template_edit');\n }", "title": "" }, { "docid": "465354f3f0901290b3e201d1b2b45dbb", "score": "0.545502", "text": "public function isAdmin()\n {\n if ($this->is_parent || $this->organisers()->count() == 0) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "296fdd6e2f3549bde674bfb730117373", "score": "0.5446345", "text": "function hasListViewPermission() {\n\t\treturn( $this->hasUpdatePermission() || empty( $this->mListViewContentPerm ) || $this->hasUserPermission( $this->mListViewContentPerm ));\n\t}", "title": "" }, { "docid": "ae0f03fdac5b2d474172853b77de7db1", "score": "0.5445405", "text": "public function canManagePages()\n {\n return $this->canManageActiveSubdomain();\n }", "title": "" }, { "docid": "dc4e25d386cd3ca9aaad3206b3a5d5ff", "score": "0.5431558", "text": "public function uses_sections() {\n return true;\n }", "title": "" }, { "docid": "dc4e25d386cd3ca9aaad3206b3a5d5ff", "score": "0.5431558", "text": "public function uses_sections() {\n return true;\n }", "title": "" }, { "docid": "be2efd5a9cee18d0169ce0d902a8e91f", "score": "0.5424906", "text": "public function authorize()\n {\n return $this->user()->can('create-role');\n }", "title": "" }, { "docid": "fc4018dd94e34fa66732f1283d77279e", "score": "0.5421654", "text": "function user_allowed_editing() {\n if (has_capability('format/page:editpages', get_context_instance(CONTEXT_COURSE, $this->id))) {\n return true;\n }\n return parent::user_allowed_editing();\n }", "title": "" }, { "docid": "3a1718a1e4e58ea37ed525308c14f3ed", "score": "0.5419881", "text": "public function authorize()\n {\n return $this->user()->can('backend_add_casestagedetails');\n }", "title": "" }, { "docid": "4203e54d032ed6e41a87bcdac63e70e6", "score": "0.5386367", "text": "public function isAdmin()\n {\n if ($this->group == 2) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "192ae2b53ed7bb91ec7a351745fed9f1", "score": "0.5383693", "text": "public function authorize()\n {\n $user = auth()->user();\n return isset($user) ? $user->can('create', Course::class) : false;\n }", "title": "" }, { "docid": "9c46e0dbc1dcccd04a8845e574acfc8a", "score": "0.538138", "text": "private function canCreate(): bool\n {\n return true;\n }", "title": "" }, { "docid": "44fbbd308522971bf07721eb28d16bf2", "score": "0.53775454", "text": "private function should_load() {\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e90e222669db083ab76e600caa416c26", "score": "0.5370653", "text": "function CanAddRecord()\n {\n global $_FN;\n if (FN_IsAdmin())\n return true;\n\n $config = $this->config;\n //dprint_r($config);\n//include (\"sections/\" . $_FN['mod'] . \"/config.php\");\n if ($_FN['user'] != \"\" && $config['groupadmin'] != \"\" && FN_UserInGroup($_FN['user'], $config['groupadmin']))\n return true;\n if ($_FN['user'] != \"\" && $config['groupinsert'] != \"\" && FN_UserInGroup($_FN['user'], $config['groupinsert']))\n return true;\n if ($_FN['user'] != \"\" && $config['groupinsert'] == \"\")\n return true;\n return false;\n }", "title": "" }, { "docid": "f7de469d433b1e3cadcf14c9a6ead837", "score": "0.5368727", "text": "public function delete_layoutsection(User $user, LayoutSection $layoutsection)\n {\n return $user->role === 'admin';\n }", "title": "" }, { "docid": "702456ec840ae2679a2b5cce2a44ddba", "score": "0.53682107", "text": "static function canCreate() {\n\n return (Session::haveRight(self::$rightname, CREATE));\n }", "title": "" }, { "docid": "311c3d2c4035147c6ed0581069243a30", "score": "0.536441", "text": "public function allowsCreate(): bool\n {\n return $this->allow['create'];\n }", "title": "" }, { "docid": "73413a183c9658bcf2a275e7c854ad37", "score": "0.53614867", "text": "public function isApplyERPlayout() {\n if (in_array($this->getCurrentModuleKey(), $this->_unapply_ERPlayout)) {\n return false;\n }\n return $this->isERPmodule();\n }", "title": "" }, { "docid": "59c7911ec17b057058475a5787de42db", "score": "0.53537226", "text": "public function authorize()\n {\n return $this->user()->can('peminjaman-create');\n }", "title": "" }, { "docid": "3af15195dbb4a59ac2ee48a970590092", "score": "0.53389", "text": "public function checkPermissions()\n {\n return $this->modx->context->checkPolicy('contentblocks_categories_import');\n }", "title": "" }, { "docid": "41ed86e050774c5b5521d328e3fe7fd1", "score": "0.5338542", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Formax_News::category_create') ||\n $this->_authorization->isAllowed('Formax_News::category_update');\n }", "title": "" }, { "docid": "32696a81ba8ddd52f8acb7295e95a130", "score": "0.53284305", "text": "public function isConstraints()\n {\n //TODO: implement this method\n\n return false;\n }", "title": "" }, { "docid": "6a5aea71a0e143237f99724711099b9a", "score": "0.53164023", "text": "public function authorize()\n {\n if (! parent::authorize()) {\n return false;\n }\n\n return $this->user()->can('edit-startup', $this->attributes->get('server'));\n }", "title": "" }, { "docid": "cf49512a20f5949d91bd731427184435", "score": "0.53163874", "text": "function canAdd()\n\t{\n\t\t$params = $this->getParams();\n\t\tif (!is_object($this->_access) || !array_key_exists('add', $this->_access)) {\n\t\t\t$groups = JFactory::getUser()->authorisedLevels();\n\t\t\t$this->_access->add = in_array($this->getParams()->get('allow_add'), $groups);\n\t\t}\n\t\treturn $this->_access->add;\n\t}", "title": "" }, { "docid": "ad85760f066c273730f944b1d4e32379", "score": "0.5301625", "text": "public function canView() {\n\t\tglobal $User;\n\n\t\t$allowedGroups = $this->getUserGroupIds();\n\n\t\t// all groups?\n\t\tif(in_array(-1, $allowedGroups)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// now loop through groupids and check against\n\t\t// secondary groupids and primary groupid\n\t\tforeach($allowedGroups as $groupid) {\n\t\t\tif($groupid == $User->info['usergroupid'] OR (is_array($User->info['secgroupids']) AND in_array($groupid, $User->info['secgroupids']))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "89a0377950c049ef5e073afc2f1daf10", "score": "0.5300508", "text": "protected function _isAllowed()\n {\n if ($this->_authorization->isAllowed('PHPCuong_Faq::category_create') || $this->_authorization->isAllowed('PHPCuong_Faq::category_edit')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "a93fa8ac7a95b677d9982b58163eaec5", "score": "0.52955264", "text": "public function canCreateResumes()\r\n {\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n if( !$viewer || !$viewer->getIdentity() ) {\r\n return false;\r\n }\r\n\r\n // Must be able to create resumes\r\n if( !Engine_Api::_()->authorization()->isAllowed('resume', $viewer, 'create') ) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "41683f212bef4f8bd0f51450e08cbd92", "score": "0.5294062", "text": "function canView()\n\t{\n\t\tif (!is_object($this->_access) || !array_key_exists('view', $this->_access)) {\n\t\t\t$groups = JFactory::getUser()->authorisedLevels();\n\t\t\t$this->_access->view = in_array($this->getTable()->access, $groups);\n\t\t}\n\t\treturn $this->_access->view;\n\t}", "title": "" }, { "docid": "2e1067e953a05bb2d3d51872c03e5be7", "score": "0.5294061", "text": "public function canView()\n\t{\n\t\t// Assert the object is loaded.\n\t\t$this->assertIsLoaded();\n\n\t\t// Check if an access level is set.\n\t\tif (isset($this->access))\n\t\t{\n\t\t\t// Get the user's authorised view levels.\n\t\t\t$levels = $this->user->getAuthorisedViewLevels();\n\n\t\t\t// Check if the user has access.\n\t\t\treturn in_array($this->access, $levels);\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "fed11caaffb1187debccd028b5ddc4d2", "score": "0.5270136", "text": "public function authorize()\n {\n return $this->user()->can('employees.create');\n }", "title": "" }, { "docid": "67ffd4b72e75780f6c5845ef17db8609", "score": "0.52655494", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Magento_Config::config_design');\n }", "title": "" }, { "docid": "736cf24a6a955074ef4b62195718ad6a", "score": "0.5265112", "text": "public function create(User $user)\n {\n return $user->hasRole('editor') || $user->hasRole('admin') ||\n $user->canDo('UPDATE_ARTICLES');\n }", "title": "" }, { "docid": "7da6fd26f0c47ae9c851a9db50ce9ad3", "score": "0.526313", "text": "public function checkAccessCreate() : bool\n {\n if ($this->hasAccessCreate()) {\n return true;\n } else {\n if (! Request::ajax()) {\n $this->alertError(trans('app.access_denied'));\n }\n\n return false;\n }\n }", "title": "" }, { "docid": "769aea906e288b90404bed6755d022ab", "score": "0.52480376", "text": "public function authorize()\n {\n return (Auth::user()->hasPermissionTo('crud clients')) ? true : false;\n }", "title": "" }, { "docid": "f1b71bca228451fc900c4edc4a2e8940", "score": "0.5244458", "text": "public function canManagePermissions()\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "115cf7f4440adcb7461055839b77596c", "score": "0.5241763", "text": "public function canCreate()\n {\n return $this->can($this->create);\n }", "title": "" }, { "docid": "adcb1aaf487cf547f618d7b98bb47911", "score": "0.5233817", "text": "public function authorize()\n {\n if (request()->has('discipline')) {\n return auth()->user()->can('update', request()->discipline);\n }\n return auth()->user()->can('create', \\App\\Discipline::class);\n }", "title": "" }, { "docid": "3e38c3d4f253631f0d34c4a5c10a1f6e", "score": "0.5233482", "text": "function hasViewPermission() {\n\t\treturn( $this->hasUpdatePermission() || empty( $this->mViewContentPerm ) || $this->hasUserPermission( $this->mViewContentPerm ));\n\t}", "title": "" }, { "docid": "6e95049de41bc0b21ee8d1d45580dfef", "score": "0.52330846", "text": "public function authorize()\n {\n $access = Auth::user()->isAbleTo('update-posts') || Auth::user()->isAbleTo('create-posts');\n\n return $access;\n }", "title": "" }, { "docid": "a9d29e17c87e8ec6632009c294430ba8", "score": "0.52257985", "text": "public function canCreate(): bool\n {\n return true;\n }", "title": "" }, { "docid": "4aa52536feb2dceed50d9968ee991f35", "score": "0.52252793", "text": "public function isAccessible()\n {\n $root = $this->getRootParagraph();\n\n if ( ! empty( $root->allAccess ) )\n {\n return true;\n }\n\n $user = $this->getAuthenticatedUser();\n\n if ( empty( $user ) )\n {\n return ! empty( $root->accessUsers ) && in_array( '', $root->accessUsers )\n || ! empty( $root->accessGroups ) && in_array( '', $root->accessGroups );\n }\n\n return ! empty( $root->accessUsers ) && in_array( $user->id, $root->accessUsers )\n || ! empty( $root->accessGroups ) && in_array( $user->groupId, $root->accessGroups )\n || $this->getServiceLocator()\n ->get( 'Grid\\User\\Model\\Permissions\\Model' )\n ->isAllowed( $root, 'view' );\n }", "title": "" }, { "docid": "143805b09f18bc15f3922f32bc86a83e", "score": "0.52234584", "text": "public function canCreate(Model_User $user)\n\t{\n\t\t/**\n\t\t * If you are not a student.\n\t\t */\n\t\tif (!$user->isStudent())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * If you don't have a group.\n\t\t */\n\t\t$group = $user->getGroup();\n\t\tif (empty($group))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t/**\n\t\t * Are you the creator ID?\n\t\t */\n\t\treturn ($group->getCreator()->getId() == $user->getId());\n\t}", "title": "" }, { "docid": "a2c90abb9eb6b1e090d09a4b097f4e05", "score": "0.52225", "text": "function verifyListViewPermission() {\n\t\tglobal $gBitSystem;\n\t\tif( $this->hasListViewPermission() ) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\t$gBitSystem->fatalPermission( $this->mListViewContentPerm );\n\t\t}\n\t}", "title": "" }, { "docid": "8ad031649b79d0fae5c4055870bbb575", "score": "0.52202266", "text": "public function create(User $user)\n {\n return $user->can('create organisations');\n }", "title": "" }, { "docid": "6ed444b1b6bd9c700c112f31070739ed", "score": "0.5216611", "text": "public function isEnabledFrontendCreate()\n {\n if (!$this->isEnabledFrontend()) {\n return false;\n }\n\n return (bool) $this->scopeConfig->getValue(static::XML_PATH_ENABLED_FRONTEND_CREATE);\n }", "title": "" }, { "docid": "9c7d3154816b1cca54a9a814dd58670f", "score": "0.52158755", "text": "public function accessAdmin() {\n return $this->group === 1;\n }", "title": "" }, { "docid": "9864a2910bcb5ac1bb00f01d27b3f5ea", "score": "0.5213025", "text": "public function authorize()\n {\n return $this->user()->isTutor() || $this->user()->isManager();\n }", "title": "" }, { "docid": "a384225da7f0f783ad541e5c11c6d72b", "score": "0.5205108", "text": "public function authorize()\n {\n return \\Auth::user()->hasRole('admin') or \\Auth::user()->hasPermission('manage-subscriber-group-detail');\n }", "title": "" }, { "docid": "49a21fa12801629585703a703c214398", "score": "0.5196022", "text": "function getExistsec()\n\t{\n\t\tif (FLEXI_SECTION) {\n\t\t\t$query = 'SELECT COUNT( id )'\n\t\t\t. ' FROM #__sections'\n\t\t\t. ' WHERE id = ' . FLEXI_SECTION\n\t\t\t;\n\t\t\t$this->_db->setQuery( $query );\n\t\t\t$count = $this->_db->loadResult();\n\t\t\t\t\n\t\t\tif ($count > 0) {\n\t\t\t\treturn true;\n\t\t\t} else if (FLEXI_J16GE) {\n\t\t\t\tdie(\"Category table corrupted, SYSTEM root category not found\");\n\t\t\t} else {\n\t\t\t\t// Save the created section as flexi_section for the component\n\t\t\t\t$cparams = JComponentHelper::getParams('com_flexicontent');\n\t\t\t\t$cparams->set('flexi_section', '');\n\t\t\t\t$cparams_str = $cparams->toString();\n\t\t\t\t\n\t\t\t\t$flexi = JComponentHelper::getComponent('com_flexicontent');\n\t\t\t\t$query = 'UPDATE '. (FLEXI_J16GE ? '#__extensions' : '#__components')\n\t\t\t\t\t\t. ' SET params = ' . $this->_db->Quote($cparams_str)\n\t\t\t\t\t\t. ' WHERE '. (FLEXI_J16GE ? 'extension_id' : 'id') .'='. $flexi->id\n\t\t\t\t\t\t;\n\t\t\t\t$this->_db->setQuery($query);\n\t\t\t\t$this->_db->query();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "422db28a78fbbca4d5e8840d5c24cfd0", "score": "0.5189392", "text": "public function authorize()\n {\n if ($this->path() == 'jissyu12/create') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a981d993bb17cac28179f71252f3c701", "score": "0.5185143", "text": "public function authorize()\n {\n\n $id = $this->route('user');\n $user = User::findOrFail($id);\n if (Auth::User() && (Auth::User()->can('add_courses')) || compareObjects($user, Auth::User())) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "e82825e8fc86ec4a767e68bae3971f49", "score": "0.5181041", "text": "public function isAuthorized() {\n\t\tif ($this->Auth->user('group') == 'admin') {\n\t\t\treturn true;\n\t\t}\n\t\tif (empty($this->params['admin'])) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "8143b86c2e3f45e5a2c718035f70ec97", "score": "0.5178715", "text": "private function shouldDisplay()\n {\n $key = $this->owner->getUniqueKey();\n\n if (array_key_exists($key, $this->shouldDisplay)) {\n return $this->shouldDisplay[$key];\n }\n\n // Make sure this is a page\n if (!$this->owner->showBetterNavigator()) {\n $this->shouldDisplay[$key] = false;\n\n return false;\n }\n\n // Only show navigator to appropriate users\n $isDev = Director::isDev();\n $canViewDraft = (Permission::check('VIEW_DRAFT_CONTENT') || Permission::check('CMS_ACCESS_CMSMain'));\n\n $result = ($isDev || $canViewDraft);\n $this->shouldDisplay[$key] = $result;\n\n return $result;\n }", "title": "" }, { "docid": "90b3acc2f0d5c24fd2ae76798a95b63b", "score": "0.51751345", "text": "public static function is_prebuilt_layout($id) {\n\t$protected = get_post_meta($id, '_themify_builder_prebuilt_layout', true);\n\treturn isset($protected) && 'yes' === $protected;\n }", "title": "" }, { "docid": "ff29b0382f76af2f7edf68bd97a5b9e3", "score": "0.51733756", "text": "public function create(User $user) {\n return $user->can('create-permission-group');\n }", "title": "" }, { "docid": "e494eeccd6c966dd23082707a3e69b6c", "score": "0.51730275", "text": "public function create($create_in_batch = false)\n {\n if (! parent::create())\n {\n return false;\n }\n \n $parent_id = $this->get_parent_rights_location()->get_id();\n \n if (! CourseManagementRights::getInstance()->create_location_in_courses_subtree(\n CourseManagementRights::TYPE_COURSE_TYPE, \n $this->get_id(), \n $parent_id, \n 0, \n $create_in_batch, \n 0))\n {\n return false;\n }\n \n return true;\n }", "title": "" }, { "docid": "f26a2bebb97484655991cbc08448af0d", "score": "0.51729107", "text": "public function authorize()\n {\n return Auth::user()->can('lecture-store');\n }", "title": "" }, { "docid": "9867008024f23842f8d586eaf06e9fb2", "score": "0.51711386", "text": "public function authorize()\n {\n return $this->has('type') && in_array($this->type, ['student', 'instructor']);\n }", "title": "" }, { "docid": "abc6f0624ff6a4e418c0af3c8c6f20e0", "score": "0.5169196", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Singh_Uigrid::grid');\n }", "title": "" }, { "docid": "2fdf0bd5c611ebaee04546003508f264", "score": "0.5164739", "text": "public function create(User $user)\n {\n return $user->is_root || $user->can('roles.create');\n }", "title": "" }, { "docid": "7b1fd5609d0592ae28340716d114d6ca", "score": "0.5159174", "text": "public function template(User $user){\n\t\tif($user->hasPermission('config.template')){\n\t\t\treturn true;\n\t\t}\n \t// The user with Owner permission can create new configs\n return ($user->owner());\n\t}", "title": "" }, { "docid": "f3ee14f8b5713557a884b72091e6419d", "score": "0.515635", "text": "public function Access_CreateCourseDescription(): bool\n {\n if ($this->getUserRole()->getCreate() == 1) {\n $this->CreateCourseDescription = true;\n }return $this->CreateCourseDescription;\n }", "title": "" }, { "docid": "ae2cd3beacade544ae69883258ddea52", "score": "0.5154018", "text": "public function user_has_access() {\n\t\treturn current_user_can( 'pvm_edit_projects' );\n\t}", "title": "" }, { "docid": "53fdff96840f1fb90a9f46ed91992b02", "score": "0.51537853", "text": "public function checkPermission()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\t\t\n\t\t//return for admin\n\t\tif($this->User->isAdmin) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Set root IDs\n\t\tif (!is_array($this->User->jedoTestimonials) || count($this->User->jedoTestimonials) < 1) {\n\t\t\t$root = array(0);\n\t\t} else {\n\t\t\t$root = $this->User->jedoTestimonials;\n\t\t}\t\t\n\t\t\n\t\t// Check permissions to add archives\n\t\tif (!$this->User->hasAccess('create', 'jedoTestimonials')) {\n\t\t\t$GLOBALS['TL_DCA']['tl_testimonials']['config']['closed'] = true;\n\t\t} \n\t}", "title": "" }, { "docid": "07dc481512b5b29b1782aca626a7d6c3", "score": "0.51488256", "text": "public function canCreateSubdomains()\n {\n return !$this->settings->MODULES['REW_LITE']\n && $this->settings['MODULES']['REW_AGENT_CMS']\n && ($this->auth->isSuperAdmin()\n || $this->auth->adminPermission(AuthInterface::PERM_AGENTS_MANAGE));\n }", "title": "" }, { "docid": "6b5394637578c61669246b9c8d7b6170", "score": "0.5148139", "text": "function is_admin_panel() {\n\t\treturn defined('ADMIN_THEME');\n\t}", "title": "" }, { "docid": "fa58397134e6a430dfb2b3467f8222ed", "score": "0.5147012", "text": "public function canDisplayEditablePart()\n {\n if (!$this->hasData('can_display_editable_part')) {\n $this->setData('can_display_editable_part', $this->getGridModel()->hasEditableColumns());\n }\n return $this->_getData('can_display_editable_part');\n }", "title": "" }, { "docid": "ca5c6ec42f2814aee1664d2cd8ed5040", "score": "0.5141855", "text": "public function isAdminPage() {\n return ($this->getAccessLevel() > SECURITY_USER);\n }", "title": "" }, { "docid": "fb16d5c66e8c00dfd3940aea3553becf", "score": "0.51393527", "text": "public function authorize()\n {\n // $design = Design::find($this->route('id'));\n\n // return $design && $this->user()->can('update', $design);\n return true;\n }", "title": "" }, { "docid": "88edb112427654d9326e87c083c047ed", "score": "0.51367414", "text": "private static function initializeContentForUser(){\n\t\tif(isset(self::$member_bean) && isset(self::$role_bean)){\n\t\t\t$contents = self::getContentsForUser();\n\t\t\t$allowed = false;\n\t\t\tif(sizeof($contents)){\n\t\t\t\tforeach($contents as $content){\n\t\t\t\t\tContentManager::assignToSmarty(\"allowed_for_\".$content['modulename'].'_'.$content['contentname'], true);\n\t\t\t\t\tif($content['modulename'] == self::getModule() && $content['contentname'] == self::getContent()){\n\t\t\t\t\t\t$allowed = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($allowed === false){\n\t\t\t\tself::$function = \"viewNotAllowed\";\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\tif(self::$module == self::$um_default['module'] && self::$content == self::$um_default['content']){\n\t\t\treturn true;\n\t\t}\n\t\tself::$module = self::$um_default['module'];\n\t\tself::$content = self::$um_default['content'];\n\t\tself::$function = self::$um_default['function'];\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f180402f6485bc804646f27218cbeec4", "score": "0.5136111", "text": "private function superseedsPermissions(){\n\t\treturn Symphony::Author()->isDeveloper() || (Symphony::Author()->isManager() && Symphony::Configuration()->get('manager', 'group_lock') !== 'yes');\n\t}", "title": "" }, { "docid": "9dc2e5e47c9184fb2f5fda437f797952", "score": "0.51348925", "text": "public function canAddChildren() {\n\t\treturn $this->canEdit() && $this->stat('allowed_children') != 'none';\n\t}", "title": "" }, { "docid": "97893ffed600d04e2ee4b5a9740b02e5", "score": "0.51340747", "text": "public function ajax_user_can() {\r\n\t\treturn current_user_can('manage_options');\r\n\t}", "title": "" }, { "docid": "80bc086bad25d62be6d7bc1aac42ac3b", "score": "0.51278853", "text": "public static function isReadOnly()\r\n {\r\n //Gets the groups the user belongs to.\r\n $user = JFactory::getUser();\r\n $groups = $user->getAuthorisedGroups();\r\n\r\n //Gets the groups allowed to read and write the component items.\r\n //Those groups have to be set in the component's configuration. However the super user\r\n //group is considered as read and write by default.\r\n $component = JComponentHelper::getComponent('com_snipf');\r\n $readWriteGoups = $component->getParams()->get('readwrite_groups');\r\n\r\n if($user->get('isRoot') || ($readWriteGoups !== null && !empty(array_intersect($readWriteGoups, $groups)))) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" } ]
370e5d29644505fe08a9ff2725a9f867
/////////////////////////////////////////// Edits the profile of the requested member ///////////////////////////////////////////
[ { "docid": "d849a0fbeddaf1272cfc63cb294c7067", "score": "0.0", "text": "function editprofile(){\n\nglobal $user, $conn, $dbtables, $logged_in, $globals, $l, $AEF_SESS, $theme;\nglobal $member, $tree, $error, $user_group;\n\n\t//Load the Language File\n\tif(!load_lang('editprofile')){\n\t\n\t\treturn false;\n\t\t\n\t}\n\t\n\t//The name of the file\n\t$theme['init_theme'] = 'editprofile';\n\t\n\t//The name of the Page\n\t$theme['init_theme_name'] = 'Edit Profile Theme';\n\t\n\t//Array of functions to initialize\n\t$theme['init_theme_func'] = array('editprofile_theme');\n\t\n\t\n\t/////////////////////////////////////////\n\t//This section is only for users\n\tif(empty($user['can_edit_other_profile'])){\n\t\n\t\t//Show a major error and return\n\t\treporterror($l['cant_edit_profile_title'], $l['cant_edit_profile']);\n\t\t\t\n\t\treturn false;\n\t\n\t}\n\t/////////////////////////////////////////\n\t\n\t\n\tif(!empty($_GET['uid']) && trim($_GET['uid']) && is_numeric(trim($_GET['uid']))){\n\t\n\t\t$uid = (int) inputsec(htmlizer(trim($_GET['uid'])));\n\t\t\n\t}else{\n\t\n\t\t//Show a major error and return\n\t\treporterror($l['no_user_specified_title'], $l['no_user_specified']);\n\t\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n\t//Select the users profile\t\n\t$qresult = makequery(\"SELECT u.id, u.username, u.email, u.r_time, u.lastlogin, u.posts,\n\t\t\tu.realname, u.users_text, u.gender, u.birth_date, u.customtitle, u.location, u.www, \n\t\t\tu.timezone, u.gmail, u.icq, u.aim, u.yim, u.msn, u.sig, u.avatar, u.avatar_type, \n\t\t\tu.avatar_width, u.avatar_height, u.ppic, u.ppic_type, u.ppic_width, u.ppic_height, \n\t\t\tu.hideemail, u.u_member_group, ug.*\n\t\t\tFROM \".$dbtables['users'].\" u\n\t\t\tLEFT JOIN \".$dbtables['user_groups'].\" ug ON (ug.member_group = u.u_member_group)\n\t\t\tWHERE u.id = '$uid'\");\n\t\t\t\n\tif(mysql_num_rows($qresult) < 1){\n\t\n\t\t//Show a major error and return\n\t\treporterror($l['no_user_found_title'], $l['no_user_found']);\n\t\t\n\t\treturn false;\n\t\t\n\t}\n\t\n\t$member = mysql_fetch_assoc($qresult);\n\t\n\t//Well lets see for the time being bunk it\n\t/*//No one can edit their own profile from here\n\tif($member['id'] == $user['id']){\n\t\n\t\t//Show a major error and return\n\t\treporterror('Cannot Edit', 'Sorry, we were unable to process your request because a user cannot edit their profile from here. If you want to edit your profile please go to your <a href=\"'.$globals['index_url'].'act=usercp&ucpact=profile\">User CP</a>. If you have followed a valid link please contact us at <a href=\"mailto:'.$globals['board_email'].'\">'.$globals['board_email'].'</a>.');\n\t\t\n\t\treturn false;\n\t\n\t}*/\n\t\t\n\t//Am i an Admin and not is some one other than ROOT ADMIN is trying to ban me\n\tif($member['member_group'] == 1 && $user['id'] != 1){\n\t\n\t\t//Show a major error and return\n\t\treporterror($l['cant_edit_other_admin_title'], $l['cant_edit_other_admin']);\n\t\t\n\t\treturn false;\n\t\n\t}\n\t\n\t\n\t/////////////////////////////\n\t// Define the necessary VARS\n\t/////////////////////////////\n\t\n\t//A error handler ARRAY\n\t$error = array();\t\n\t\n\t$username = '';\n\t\n\t$email = '';\n\t\n\t$u_member_group = 0;\n\t\n\t$realname = '';\n\t\n\t$title = '';//Custom Title\t\n\t\n\t$location = '';//Location\t\n\t\n\t$gender = 0;//Gender\t\n\t\n\t$privatetext = '';//Private Text\n\t\t\n\t$icq = '';//ICQ\n\t\n\t$yim = '';//YIM\t\n\t\n\t$msn = '';//MSN\t\n\t\n\t$aim = '';//AIM\t\n\t\n\t$www = '';//WWW\n\t\n\t$sig = '';//Sig\n\t\n\t$tree = array();//Board tree for users location\n\t$tree[] = array('l' => $globals['index_url'],\n\t\t\t\t\t'txt' => $l['index']);\n\t$tree[] = array('l' => $globals['index_url'].'act=editprofile&uid='.$uid,\n\t\t\t\t\t'txt' => $member['username'],\n\t\t\t\t\t'prefix' => $l['editing_profile']);\n\t\t\t\t\t\n\t\n\t/////////////////////////////\n\t// What are you doing dude?\n\t/////////////////////////////\n\t\n\t$globals['last_activity'] = 'edpro';\n\t\n\t//He is viewing the profile\n\t$globals['activity_id'] = $member['id'];\n\t\n\t$globals['activity_text'] = $member['username'];\n\t\n\t\n\t/////////////////////////////////////////\n\t//Which member groups are allowed to view\n\t/////////////////////////////////////////\n\t\n\t//Get the user groups\n\tif(!membergroups()){\n\t\n\t\treturn false;\n\t\n\t}\n\t\t\n\t\n\tif(isset($_POST['editprofile'])){\n\t\n\t\t//The username\n\t\tif(!(isset($_POST['username'])) || strlen(trim($_POST['username'])) < 1){\n\t\t\n\t\t\t$error[] = $l['no_username'];\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$username = inputsec(htmlizer(trim($_POST['username'])));\n\t\t\t\n\t\t\t$len = aefstrlen($username);\n\t\t\t\n\t\t\t//Max Length\n\t\t\tif($len > $globals['max_uname']){\n\t\t\t\n\t\t\t\t$error[] = $l['max_name_length_crossed'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Min Length\n\t\t\tif($len < $globals['min_uname']){\n\t\t\t\n\t\t\t\t$error[] = $l['min_name_length_crossed'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif(preg_match(\"/\\s/i\", $username)){\n\t\t\t\n\t\t\t\t$error[] = $l['space_in_name'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//If the username is different\n\t\t\tif($username != $member['username']){\n\t\t\t\n\t\t\t\t//Check in the Database\n\t\t\t\tif(usernameindb($username)){\n\t\t\t\t\n\t\t\t\t\t$error[] = lang_vars($l['name_in_use'], array($username));\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$reserved = explode(\"\\n\", $globals['reserved_names']);\n\t\t\t\n\t\t\tfor($i = 0; $i < count($reserved); $i++){\n\t\t\n\t\t\t\tif(!empty($reserved[$i])){\n\t\t\t\t\t\n\t\t\t\t\t$reserved[$i] = trim($reserved[$i]);\n\t\t\t\t\t\n\t\t\t\t\t$pattern = '/'.(($globals['reserved_match_whole'])?'\\b':'').preg_quote($reserved[$i], '/').(($globals['reserved_match_whole'])?'\\b':'').'/'.(($globals['reserved_match_insensitive'])?'i':'');\n\t\t\t\t\t\n\t\t\t\t\tif(preg_match($pattern, $username)){\n\t\t\t\t\t\n\t\t\t\t\t\t$error[] = lang_vars($l['reserved_names'], array($reserved[$i]));\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}\n\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\t\n\t\t\t\n\t\t//on error call the form\n\t\tif(!empty($error)){\n\t\t\t$theme['call_theme_func'] = 'editprofile_theme';\n\t\t\treturn false;\t\t\n\t\t}\n\t\t\n\t\t//The email\n\t\tif(!(isset($_POST['email'])) || strlen(trim($_POST['email'])) < 1){\n\t\t\n\t\t\t$error[] = $l['no_email'];\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$email = inputsec(htmlizer(trim($_POST['email'])));\n\t\t\t\n\t\t\t//////////////////////////////////\n\t\t\t// Email must undergo following\n\t\t\t// restriction checks\n\t\t\t// 1 - Max Length(for DB)\n\t\t\t// 2 - Email In Data Base\n\t\t\t// 3 - Email Expression\n\t\t\t//////////////////////////////////\t\n\t\t\t\n\t\t\t//Max Length\n\t\t\tif(aefstrlen($email) > 100){\n\t\t\t\n\t\t\t\t$error[] = $l['email_too_big'];\n\t\t\t\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t//Also confirm its validity\n\t\t\tif(!emailvalidation($email)){\n\t\n\t\t\t\t$error[] = $l['invalid_email'];\n\t\t\t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t//If email is different\n\t\t\tif($email != $member['email']){\n\t\t\t\t\n\t\t\t\t//Check is it there in the Data Base\n\t\t\t\tif(emailindb($email)){\n\t\n\t\t\t\t\t$error[] = $l['email_in_use'];\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//on error call the form\n\t\tif(!empty($error)){\n\t\t\t$theme['call_theme_func'] = 'editprofile_theme';\n\t\t\treturn false;\t\t\n\t\t}\n\t\t\n\t\t//The usergroup\n\t\tif(!(isset($_POST['u_member_group'])) || strlen(trim($_POST['u_member_group'])) < 1){\n\t\t\n\t\t\t$error[] = $l['no_user_group'];\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$u_member_group = (int) inputsec(htmlizer(trim($_POST['u_member_group'])));\n\t\t\t\n\t\t\tif(!in_array($u_member_group, array_keys($user_group))){\n\t\t\t\n\t\t\t\t$error[] = $l['invalid_user_group'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//Root admins user group cannot be changed\n\t\t\tif($member['id'] == 1 && $u_member_group != 1){\n\t\t\t\n\t\t\t\t$error[] = $l['root_admin_user_group'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t//For a admin only root admin can change user group - Actually not required\n\t\t\tif($member['member_group'] == 1 && $u_member_group != 1 && $user['id'] != 1){\n\t\t\t\n\t\t\t\t$error[] = $l['root_admin_ug_other_admin'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t//Only root admin can change user group to ADMIN\n\t\t\tif($member['member_group'] != 1 && $u_member_group == 1 && $user['id'] != 1){\n\t\t\t\n\t\t\t\t$error[] = $l['root_admin_make_admin'];\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//on error call the form\n\t\tif(!empty($error)){\n\t\t\t$theme['call_theme_func'] = 'editprofile_theme';\n\t\t\treturn false;\t\t\n\t\t}\n\t\t\n\t\t//Check the Real Name\n\t\tif(isset($_POST['realname']) && (trim($_POST['realname']) != \"\")){\n\t\t\n\t\t\t$realname = inputsec(htmlizer(trim($_POST['realname'])));\n\t\t\t\n\t\t\t//Check the MaxLength\n\t\t\tif(aefstrlen($realname) > $globals['realnamelen']){\n\t\t\t\t\n\t\t\t\t$error[] = $l['big_realname'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the Title if any\n\t\tif(isset($_POST['title']) && (trim($_POST['title']) != \"\")){\n\t\t\n\t\t\t$title = inputsec(htmlizer(trim($_POST['title'])));\n\t\t\t\n\t\t\t//Check maxlength in $globals (Cannot be more than 100)\n\t\t\tif(aefstrlen($title) > $globals['customtitlelen']){\n\t\t\t\t\n\t\t\t\t$error[] = $l['big_custom_title'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the Location if any\n\t\tif(isset($_POST['location']) && (trim($_POST['location']) != \"\")){\n\t\t\n\t\t\t$location = inputsec(htmlizer(trim($_POST['location'])));\n\t\t\t\n\t\t\t//Check maxlength in $globals - (Cannot be more than 255)\n\t\t\tif(aefstrlen($location) > $globals['locationlen']){\n\t\t\t\t\n\t\t\t\t$error[] = $l['big_location'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the Gender if POSTED\n\t\tif(isset($_POST['gender']) && (trim($_POST['gender']) != \"\")){\n\t\t\n\t\t\t$gender = (int) inputsec(htmlizer(trim($_POST['gender'])));\n\t\t\t\n\t\t\t//Check is valid or no\n\t\t\tif(!in_array($gender, array(0, 1, 2))){\n\t\t\t\t\n\t\t\t\t$error[] = $l['invalid_gender'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\t//Check the Private Text if any\n\t\tif(isset($_POST['privatetext']) && (trim($_POST['privatetext']) != \"\")){\n\t\t\n\t\t\t$privatetext = inputsec(htmlizer(trim($_POST['privatetext'])));\n\t\t\t\n\t\t\t//You can add maxlength later in $globals\n\t\t\tif(aefstrlen($privatetext) > $globals['userstextlen']){\n\t\t\t\t\n\t\t\t\t$error[] = $l['big_private_text'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the ICQ\n\t\tif(isset($_POST['icq']) && (trim($_POST['icq']) != \"\")){\n\t\t\n\t\t\t$icq = inputsec(htmlizer(trim($_POST['icq'])));\n\t\t\t\n\t\t\t//You can add maxlength later in $globals\n\t\t\tif(aefstrlen($icq) > 255){\n\t\t\t\t\n\t\t\t\t$error[] = $l['invalid_icq'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the YIM\n\t\tif(isset($_POST['yim']) && (trim($_POST['yim']) != \"\")){\n\t\t\n\t\t\t$yim = inputsec(htmlizer(trim($_POST['yim'])));\n\t\t\t\n\t\t\t//You can add maxlength later in $globals\n\t\t\tif(aefstrlen($yim) > 255){\n\t\t\t\t\n\t\t\t\t$error[] = $l['invalid_yim'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the MSN\n\t\tif(isset($_POST['msn']) && (trim($_POST['msn']) != \"\")){\n\t\t\n\t\t\t$msn = inputsec(htmlizer(trim($_POST['msn'])));\n\t\t\t\n\t\t\t//You can add maxlength later in $globals\n\t\t\tif(aefstrlen($msn) > 255){\n\t\t\t\t\n\t\t\t\t$error[] = $l['invalid_msn'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the AIM\n\t\tif(isset($_POST['aim']) && (trim($_POST['aim']) != \"\")){\n\t\t\n\t\t\t$aim = inputsec(htmlizer(trim($_POST['aim'])));\n\t\t\t\n\t\t\t//You can add maxlength later in $globals\n\t\t\tif(aefstrlen($aim) > 255){\n\t\t\t\t\n\t\t\t\t$error[] = $l['invalid_aim'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//Check the WWW\n\t\tif(isset($_POST['www']) && (trim($_POST['www']) != \"\")){\n\t\t\n\t\t\t$www = inputsec(htmlizer(trim($_POST['www'])));\n\t\t\t\n\t\t\t//You can add maxlength later in $globals\n\t\t\tif(aefstrlen($www) > $globals['wwwlen']){\n\t\t\t\t\n\t\t\t\t$error[] = $l['big_www'];\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t//Check the Sig\n\t\tif(isset($_POST['sig']) && (trim($_POST['sig']) != \"\")){\n\t\t\n\t\t\t//Dont trim for smileys\n\t\t\t$sig = inputsec(htmlizer($_POST['sig']));\n\t\t\t\n\t\t\t//Check the MaxLength\n\t\t\tif(aefstrlen($sig) > $globals['usersiglen']){\n\t\t\t\t\t\n\t\t\t\t$error[] = $l['big_signature'];\n\t\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\t\t\n\t\t\n\t\t//on error call the form\n\t\tif(!empty($error)){\n\t\t\t$theme['call_theme_func'] = 'editprofile_theme';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/////////////////////////////////\n\t\t// Finally make the UPDATE QUERY\n\t\t/////////////////////////////////\n\t\t\t\t\n\t\t$qresult = makequery(\"UPDATE \".$dbtables['users'].\" \n\t\t\t\tSET username = '$username',\n\t\t\t\temail = '$email',\n\t\t\t\tu_member_group = '$u_member_group',\n\t\t\t\trealname = '$realname',\n\t\t\t\tcustomtitle = '$title',\n\t\t\t\tlocation = '$location',\n\t\t\t\tgender = '$gender',\n\t\t\t\tusers_text = '$privatetext',\n\t\t\t\ticq = '$icq',\n\t\t\t\tyim = '$yim',\n\t\t\t\tmsn = '$msn',\n\t\t\t\taim = '$aim',\n\t\t\t\twww = '$www',\n\t\t\t\tsig = '$sig'\n\t\t\t\tWHERE id = '\".$member['id'].\"'\", false);\n\t\t\t\t\n\t\t//Redirect\n\t\tredirect('mid='.$uid);\n\t\n\t}else{\n\t\n\t\t$theme['call_theme_func'] = 'editprofile_theme';\n\t\n\t}\n\t\n\n}", "title": "" } ]
[ { "docid": "bab551299e8626a505041c91171c13af", "score": "0.788546", "text": "public function updateProfile(){\n\t\t\n\t}", "title": "" }, { "docid": "1fcde3c6b9030d84882881a57ff9fc42", "score": "0.74167746", "text": "function EditProfile()\n\t\t{\n\t\t\t$this->obTemplate->clear_cache('electedrepresentative/ihtml/edit_elected_representatives_profile.html');\n\t\t\t$this->obTemplate->assign('oMember', $this->oMember);\n\t\t\t$this->obTemplate->assign('vMsg', $this->vMsg);\n\t\t\t\n\t\t\t$this->obTemplate->assign('Content',$this->obTemplate->fetch('electedrepresentative/ihtml/edit_elected_representatives_profile.html'));\t\t\t\n\t\t\t$this->parse();\n\t\t}", "title": "" }, { "docid": "be9a4ca74ccaf96a32732eeb3b92fd68", "score": "0.7290809", "text": "public function onMemberProfileUpdate()\n {\n // Save custom fields and contact data\n $this->saveCustomFieldData();\n $this->saveContactData();\n $this->saveUserLogins();\n // If configured, override user email with main contact\n if (isset($this->configuration['mainContactMap'])) {\n $this->syncMainContactEmail();\n }\n // If configured, merge a specified custom field into the display_name\n if (isset($this->configuration['misc']['syncDisplayNameField'])) {\n $this->syncDisplayName();\n }\n\n // At last, make sure to flush user cache, as we may do database edits\n clean_user_cache($this->editedUserId);\n }", "title": "" }, { "docid": "45d6b2518d9fad16830afd797f85693d", "score": "0.72081465", "text": "public function api_edit() {\n\t\t\n\t\t// update existing member\n\t\t$member = $this->_save ( $this->logged ['Member'] ['big'] );\n\t\t\n\t\tif (! $member) {\n\t\t\t$this->_apiEr ( __ ( 'There was an error while saving your profile data' ), true );\n\t\t}\n\t\t\n\t\t$response = array (\n\t\t\t\t'user_msg' => __('Profile update succesfull') \n\t\t);\n\t\t\n\t\ttry {\n\t\t\t$this->_api_photo_upload ( $member ['big'] );\n\t\t} catch ( UploadException $e ) {\n\t\t\t$response ['user_msg'] .= $e->getMessage ();\n\t\t}\n\t\t\n\t\t$this->_apiOk ( $response );\n\t}", "title": "" }, { "docid": "cc227b3062a5f6fa369978e56631763f", "score": "0.71508276", "text": "function editprofile() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6e0d4292e27536016a919feadd233a15", "score": "0.71045643", "text": "public function updatedProfile()\n {\n $this->picture = auth()->user()->picture;\n $this->full_name = auth()->user()->full_name;\n $this->picture = auth()->user()->picture;\n $this->email = auth()->user()->email;\n }", "title": "" }, { "docid": "98a1dd9b72a7b4855678891d7b33c4ba", "score": "0.70111936", "text": "protected function profileUpdateAction() {\n\t\t$oView = new accountView($this);\n\t\t$oView->showProfilePage();\n\t}", "title": "" }, { "docid": "2e3874b92efea84544de43435ae42219", "score": "0.7007604", "text": "public function myProfile_post()\n {\n if (!$this->protect()) {\n return;\n }\n $info = $this->_prepareProfileFormData($this->post());\n $currentUserId = $this->getCurrentUser()->userID;\n if ($this->User_model->update($currentUserId, $info)) {\n $newInfo = $this->User_model->findRowById($currentUserId);\n $newInfo->token = $this->getAuthToken();\n\n //find billing plan\n $newInfo->planId = $this->User_model->getPlanById($currentUserId);\n\n $this->set_response([\n 'status' => 'OK',\n 'message' => 'Your profile has been updated successfully',\n 'user' => $newInfo\n ], 200);\n } else {\n $this->set_response([\n 'status' => 'ERROR',\n 'message' => 'Failed to save the profile information'\n ], 500);\n }\n }", "title": "" }, { "docid": "603be1dd43b438e772fbb482912d1d71", "score": "0.7004934", "text": "public function editProfile(){\n\t\t\t$obj=ProfileRepository::find($this->id);\n\t\t\t$obj->user_id=$this->user_id;\n\t\t\t$obj->firstname=$this->firstname;\n\t\t\t$obj->lastname=$this->lastname;\n\t\t\t$obj->age=$this->age;\n\t\t\t$obj->gender=$this->gender;\n\t\t\t$obj->work=$this->work;\n\t\t\t$obj->interest=$this->interest;\n\t\t\t$obj->tel=$this->tel;\n\t\t\t$obj->email=$this->email;\n\t\t\t$obj->facebook=$this->facebook;\n\t\t\t$obj->lineid=$this->lineid;\t\n\t\t\t$obj->save();\n\t\t}", "title": "" }, { "docid": "b38360e8f52e76b9f15abef94c60d14e", "score": "0.6970941", "text": "protected function _updateUserProfile()\n\t{\n\t\t$_profile = $this->getUserData();\n\n\t\tif ( !empty( $_profile ) )\n\t\t{\n\t\t\t//\tFor us...\n\t\t\t$_profile->setProviderId( $this->_providerId );\n\t\t\t$this->setConfig( 'provider_user_id', $_id = $_profile->getUserId() );\n\n\t\t\t//\tFor posterity\n\t\t\t/** @noinspection PhpUndefinedMethodInspection */\n\t\t\tOasys::getStore()->setProviderUserId( $_id );\n\n\t\t\t//\tA tag\n\t\t\tLog::debug( 'User profile updated [' . $this->_providerId . ':' . $_id . ']' );\n\t\t}\n\t}", "title": "" }, { "docid": "2d4207d7603b63b195ef69a8ca66b679", "score": "0.6839864", "text": "public function updated(profile $profile)\n {\n //\n }", "title": "" }, { "docid": "6a65ade52fca6e47d983593ab45f009f", "score": "0.6833569", "text": "public function updateProfileData()\n {\n $form = $this->f3->clean($this->f3->get(\"POST\"));\n $userId = SessionWrapper::getUserId();\n\n $userModel = new UserModel();\n $user = $userModel->getUserFromId($userId);\n\n // check if the username does exist in the database before setting it\n if (!$userModel->doesUsernameExist($username = $form[\"username\"])) {\n\n // set the new username in the Entity and update in the database\n $user->setUsername($username);\n $user->tryConstruct();\n $userModel->updateUser($user);\n } else {\n $this->error(\"Dieser Benutzername ist bereits vergeben\");\n }\n\n $this->f3->reroute(\"/profile\");\n }", "title": "" }, { "docid": "f2e364ccd9e44c68a790d345972104ac", "score": "0.67624366", "text": "public function update_profile()\n {\n if ($this->request->isAJAX()) {\n if (service('request')->getPost('key') == 'profile_information') {\n $data = [\n 'fullname' => service('request')->getPost('fullname'),\n 'occupation' => service('request')->getPost('occupation'),\n 'gender' => service('request')->getPost('prefix') == \"mr\" ? \"male\" : \"female\",\n 'birthdate' => service('request')->getPost('birthdate'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ];\n\n $this->userModel->update(session('id_user'), $data);\n } elseif (service('request')->getPost('key') == \"update_email_and_password\") {\n $data = [\n 'email' => service('request')->getPost('email'),\n 'updated_at' => \\Carbon\\Carbon::now(),\n ];\n\n if (service('request')->getPost('password') != '')\n $data['password'] = password_hash(service('request')->getPost('password'), PASSWORD_DEFAULT);\n\n $this->authorizedUserModel->update(session('id_user'), $data);\n }\n\n $data = $this->authorizedUserModel->where('email', service('request')->getPost('email') ?? session('email'))->first();\n $this->setUserMethod($data);\n } else {\n throw \\CodeIgniter\\Exceptions\\PageNotFoundException::forPageNotFound();\n }\n }", "title": "" }, { "docid": "9e0d195516694547c44e074a2ec71607", "score": "0.6758179", "text": "public function updateProfile() {\n $this->profile = $this->object->getOne('Profile');\n // Check to make sure profile record exists. If it doesn't create a new one instead of updating.\n // This is merely a safety check to avoid errors if the database record is accidentally deleted.\n if($this->profile === null) {\n return $this->createProfile();\n }\n $this->profile->fromArray($this->getProperties());\n return $this->profile;\n }", "title": "" }, { "docid": "d7c1dad6808a24319aa27f3f1772934e", "score": "0.67346543", "text": "public function editProfile(){\n\t}", "title": "" }, { "docid": "c0e4bf70764561bffb2872ef5762a9d7", "score": "0.66847545", "text": "function updateRecordProfile()\n\t{\n\t\t$data['lastName'] \t= $this->lastName;\n\t\t$data['firstName'] \t= $this->firstName;\n\t\t$data['middleName'] = $this->middleName;\n\t\t$data['theme']\t\t= $this->theme;\n\t\t\n\t $this->db->where('userID', $this->userID);\n\t\t$this->db->update('users', $data); \n\t\t\n\t\t// update session current user vars\n\t\t$this->getRecord();\n\t\t\t\n\t\t$cur_user = array();\n\t\t$cur_user['current_userID']\t\t= $this->userID;\n\t\t$cur_user['current_userName']\t= $this->userName;\n\t\t$cur_user['current_userPswd']\t= $this->userPswd;\n\t\t$cur_user['current_lastName']\t= $this->lastName;\n\t\t$cur_user['current_firstName']\t= $this->firstName;\n\t\t$cur_user['current_middleName']\t= $this->middleName;\n\t\t$cur_user['current_dateEntered']= $this->dateEntered;\n\t\t$cur_user['current_groupID']\t= $this->groupID;\n\t\t$cur_user['current_isAdmin']\t= $this->isAdmin;\n\t\t\n\t\t$this->session->set_userdata($cur_user);\n\t\t\n\t\tif ($this->db->_error_message())\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "title": "" }, { "docid": "6408d2eca0bf1b4b7d68c0176bed0491", "score": "0.66752887", "text": "public function editProfile()\n {\n $user = $this->di->get('user');\n\n $form = new EditForm($this->di, $this->di->userHandler, $user);\n\n $form->check();\n\n $formHTML = $form->getHTML(['use_fieldset' => false]);\n\n $this->di->get('pageRender')->quick('user/editprofile', \"Uppdatera {$user->name()}\", ['form' => $formHTML]);\n }", "title": "" }, { "docid": "05b3233c7597ce96dcac5b4c3a7353a7", "score": "0.6649629", "text": "public function update()\n {\n /**\n * Update profile\n */\n $data = $this->userProfileTransformer->requestAdapter();\n $data=array_filter($data,'strlen'); // filter blank or null array\n if(sizeof($data)){ try{$result=$this->auth()->user()->userprofiles()->update($data);}catch(\\Exception $e){\n return $this->error($e->getMessage(),$e->getCode());\n }\n }else{\n return $this->error('no adequate field passed',422);\n }\n if($result)\n {\n return $this->success();\n }\n else\n {\n return $this->error('Unknown error',520);\n }\n }", "title": "" }, { "docid": "d1d675ceabf34f9137f631202d8a7417", "score": "0.6646557", "text": "public function updateProfile()\n {\n $currentUser = (new AdminUser())->getLoggedIn();\n\n $inputs = (new Request('POST'))->getInputs();\n\n if ($currentUser instanceof AdminUser) {\n $output = (new AdminUserMapper())->updateById($currentUser->getId(), $inputs);\n\n (new Response())->echoContent($output->toJSON());\n }\n }", "title": "" }, { "docid": "729b381f0d85e292bbc6defef29e3f1b", "score": "0.66341686", "text": "public function p_change_profile() {\n print_r( $_POST );\n $_POST['token'] = sha1(\n\t\t\t TOKEN_SALT.\n\t\t\t $_POST['email'].\n\t\t\t Utils::generate_random_string()\n\t\t\t );\n $_POST['modified'] = Time::now();\n DB::instance(DB_NAME)->update(\"users\", $data, \"WHERE id = '\".$this->user->user_id.\"'\");\n print_r( $_POST );\n // echo \"stored row in db\";\n }", "title": "" }, { "docid": "cdd0c9e024712bf04ead23eb95bdb108", "score": "0.6632219", "text": "public function update()\n { \n $manager = new ProfileManager(Auth::id());\n return $manager->update();\n }", "title": "" }, { "docid": "ce893bb8dc3df375a82c09815fc79aed", "score": "0.6561112", "text": "public function updateProfile()\r\n {\r\n $person = $this->model('Person');\r\n if (isset($_POST['action']) && $_POST['action'] == 'Update') {\r\n $person->first_name = $_POST['firstName'];\r\n $person->last_name = $_POST['lastName'];\r\n $person->description = $_POST['description'];\r\n\r\n $handler = ConnectionDatabase();\r\n $sqlUpdateProfile = \"UPDATE person SET first_name = :first_name, last_name = :last_name, description = :description WHERE person_id = :person_id\";\r\n\r\n $query = $handler->prepare($sqlUpdateProfile);\r\n $query->bindValue(':person_id', $_SESSION['person_id']);\r\n $query->bindValue(':first_name', $person->first_name);\r\n $query->bindValue(':last_name', $person->last_name);\r\n $query->bindValue(':description', $person->description);\r\n $query->execute();\r\n $number_of_rows = $query->rowCount();\r\n\r\n if ($number_of_rows === 1) {\r\n header('location: /MVC/account/myProfile');\r\n }\r\n }\r\n header('location: /MVC/account/myProfile');\r\n }", "title": "" }, { "docid": "93cb57b34c46c67d9eb7743cf63a3f6c", "score": "0.65429956", "text": "function update_profile($id=0){\n if($this->user['id'] == $id){\n $this->update();\n }else \n $this->redirect ('/admin/index');\n }", "title": "" }, { "docid": "5343f534da5fd08c7df00f1162b7ea0d", "score": "0.6530648", "text": "public function testUpdateMember()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "62df35a8d11684fea81c539ce0200876", "score": "0.6498818", "text": "private function updateProfile()\n {\n $session = $this->session->all_userdata();\n $userId = $session['id'];\n $dayOfBirth = $this->input->post('dayOfBirth');\n $city = $this->input->post('city');\n $country = $this->input->post('country');\n $phoneNumber = $this->input->post('phoneNumber');\n $mobileNumber = $this->input->post('mobileNumber');\n\n if ($this->M_registration->updateProfile($userId, $dayOfBirth, $city, $country, $phoneNumber, $mobileNumber)) {\n $this->M_registration->updateStep($session['id'], 2);\n $this->client->displayMessage('success', site_url('/registration'));\n } else {\n $this->client->displayMessage('error', 'Whoops, something went wrong. You have submitted an invalid date of birth.');\n };\n }", "title": "" }, { "docid": "27f639f4eb4df6d58d7116ff24872fdc", "score": "0.64313084", "text": "function changeMemberDetails($firstname, $lastname, $mail, $phone) {\n if (!isset($_SESSION)) {\n session_start();\n }\n $idMember = $_SESSION['idMember'];\n $conn = getDB();\n $stmt = $conn->prepare(\"UPDATE Member SET firstname = :name, lastname = :lastname, mail = :mail, phone = :phone WHERE idMember = :idMember\");\n $stmt->bindParam(':firstname', $fistname);\n $stmt->bindParam(':lastname', $lastname);\n $stmt->bindParam(':mail', $mail);\n $stmt->bindParam(':phone', $phone);\n $stmt->bindParam(':idMember', $idMember);\n $result = $stmt->execute();\n closeDB($conn);\n if ($result) {\n header('location:../my-profile.php?message=successDetails');\n } else {\n header('location:../my-profile.php?message=error');\n }\n}", "title": "" }, { "docid": "f5690d9350eb21107bb018a13fb6806f", "score": "0.6427509", "text": "public function setProfile($profileName);", "title": "" }, { "docid": "2ddb1b2e41a05a4393557e4e58f3fbd1", "score": "0.6424417", "text": "public function editCompleteProfile()\n {\n // Create query to update all the user fields\n $query = 'UPDATE ' . $this->table . '\n SET userName = :userName, fullName = :fullName, email = :email, password = :password, about = :about, forgetPasswordQA = :forgetPasswordQA\n WHERE uid = :uid';\n\n // Prepare statement\n $stmt = $this->conn->prepare($query);\n\n // Clean data\n $this->uid = htmlspecialchars(strip_tags($this->uid));\n $this->userName = htmlspecialchars(strip_tags($this->userName));\n $this->fullName = htmlspecialchars(strip_tags($this->fullName));\n $this->email = htmlspecialchars(strip_tags($this->email));\n $this->password = htmlspecialchars(strip_tags($this->password));\n $this->about = htmlspecialchars(strip_tags($this->about));\n $this->forgetPasswordQA = htmlspecialchars(strip_tags($this->forgetPasswordQA));\n // Bind data\n $stmt->bindParam(':uid', $this->uid);\n $stmt->bindParam(':userName', $this->userName);\n $stmt->bindParam(':fullName', $this->fullName);\n $stmt->bindParam(':email', $this->email);\n $stmt->bindParam(':password', $this->password);\n $stmt->bindParam(':about', $this->about);\n $stmt->bindParam(':forgetPasswordQA', $this->forgetPasswordQA);\n\n // Execute query\n if ($stmt->execute()) {\n return true;\n }\n\n // Print error if something goes wrong\n printf(\"Error: %s.\\n\", $stmt->error);\n\n return false;\n }", "title": "" }, { "docid": "a76e22451bc796c5e98df616a0af64ce", "score": "0.64014536", "text": "public function update() \n\t{\n\t\tif ($this->id == null) // insert new user\n\t\t{\n\t\t\t$query = 'insert into `members` set ';\n\t\t\tforeach ($this->info as $key=>$value) {\n\t\t\t\tif ($key == 'id') continue;\n\t\t\t\t$query.= $key.' = '.db::sanitize($value).', ';\n\t\t\t}\n\t\t\t$query = substr($query, 0, -2); // trim trailing commma\n\n\t\t\tdb::query($query);\n\n\t\t\t$this->id = db::insertId();\n\n\n\t\t\t// register the registration\n\t\t\tBoardStats::up('registrations', 1);\n\n\t\t} \n\t\telse // update the user\n\t\t{\n\t\t\t$query = 'update `members` set ';\n\t\t\tforeach ($this->altered as $key=>$value) {\n\t\t\t\t$query.= $key.' = '.db::sanitize($value).', ';\n\t\t\t}\n\t\t\t$query = substr($query, 0, -2);\n\t\t\t$query .= \" where id = \".$this->id;\n\n\t\t\tdb::query($query);\n\t\t}\n\n\t\t// clear altered rows\n\t\t$this->altered = array();\n\t}", "title": "" }, { "docid": "601cbec8cfce337b638a95371981d41a", "score": "0.63930327", "text": "public function set_public_profile ($IdMember,$Public = false) \n {\n $rr = $this->singleLookup(\n \"\nSELECT *\nFROM memberspublicprofiles \nWHERE IdMember = \".$IdMember\n );\n if (!$rr && $Public == true) {\n $s = $this->dao->query(\"\nINSERT INTO\n memberspublicprofiles\n (\n IdMember,\n created,\n Type\n )\nVALUES\n (\n '$IdMember',\n NOW(),\n 'normal'\n )\n \");\n $this->logWrite(\"Set public profile\", \"Update Preference\");\n } elseif ($rr && $Public == false) {\n $s = $this->dao->query(\"\nDELETE FROM\n memberspublicprofiles\nWHERE\n id = \". $rr->id\n );\n $this->logWrite(\"Remove public profile\", \"Update Preference\");\n }\n }", "title": "" }, { "docid": "3633fb0cf7e2a5196ced2d101e9024d3", "score": "0.63829255", "text": "function dcrf_user_profile_func(){\n if (!isset($_GET['advisor_profile'])) {\n\n if (isset($_POST['update_dash_profile_info'])) {\n\n $current_user_data = dcrf_get_current_user_data();\n $crrnt_user_id = $current_user_data->ID;\n\n $first_name = (isset($_POST['first_name'])) ? $_POST['first_name'] : '';\n $last_name = (isset($_POST['last_name'])) ? $_POST['last_name'] : '';\n $phone_number = (isset($_POST['phone_number'])) ? $_POST['phone_number'] : '';\n $office_address = (isset($_POST['office_address'])) ? $_POST['office_address'] : '';\n $investment_dealer_name = (isset($_POST['investment_dealer_name'])) ? $_POST['investment_dealer_name'] : '';\n $country = (isset($_POST['country'])) ? $_POST['country'] : '';\n $state = (isset($_POST['state'])) ? $_POST['state'] : '';\n $city = (isset($_POST['city'])) ? $_POST['city'] : '';\n $postal_code = (isset($_POST['postal_code'])) ? $_POST['postal_code'] : '';\n $governing_regulatory_body = (isset($_POST['governing_regulatory_body'])) ? $_POST['governing_regulatory_body'] : '';\n if (dcrf_get_current_user_data('roles') == 'ab_advisor' || dcrf_get_current_user_data('roles') == 'administrator') :\n $looking_to_accomplish = (isset($_POST['looking_to_accomplish'])) ? $_POST['looking_to_accomplish'] : '';\n endif;\n $update_prof_qry = wp_update_user( array( \n 'ID' => $crrnt_user_id,\n 'first_name' => $first_name,\n 'last_name' => $last_name,\n //'user_email' => $_POST['edit_user_email'],\n ) );\n // Update User meta\n update_user_meta($crrnt_user_id, 'first_name', $first_name);\n update_user_meta($crrnt_user_id, 'last_name', $last_name);\n update_user_meta($crrnt_user_id, 'phone_number', $phone_number);\n update_user_meta($crrnt_user_id, 'office_address', $office_address);\n update_user_meta($crrnt_user_id, 'investment_dealer_name', $investment_dealer_name);\n update_user_meta($crrnt_user_id, 'country', $country);\n update_user_meta($crrnt_user_id, 'state', $state);\n update_user_meta($crrnt_user_id, 'city', $city);\n update_user_meta($crrnt_user_id, 'postal_code', $postal_code);\n update_user_meta($crrnt_user_id, 'governing_regulatory_body', $governing_regulatory_body);\n if (dcrf_get_current_user_data('roles') == 'ab_advisor' || dcrf_get_current_user_data('roles') == 'administrator') :\n update_user_meta($crrnt_user_id, 'looking_to_accomplish', $looking_to_accomplish);\n endif;\n if ( is_wp_error( $update_prof_qry ) ) { \n dcrf_add_wp_errors('udpi_error_in_update','<div class=\"alert alert-danger\" role=\"alert\">Error In Update</div>');\n }else{\n dcrf_add_wp_errors('udpi_sucess_update','<div class=\"alert alert-success col-md-8\" role=\"alert\">Profile Sucessfully Updated</div>');\n }\n }\n\n /**\n * User Profile Bio Update\n */\n\n if (isset($_POST['update_dash_profile_bio'])) {\n\n $current_user_data = dcrf_get_current_user_data();\n $crrnt_user_id = $current_user_data->ID;\n\n $profile_bio_text = (isset($_POST['profile_bio_text'])) ? $_POST['profile_bio_text'] : '';\n \n $update_prof_qry = wp_update_user( array( \n 'ID' => $crrnt_user_id,\n 'description' => $profile_bio_text\n ) );\n }\n\n /**\n * Profile Pic Update\n */\n // Check that the nonce is valid, and the user can edit this post.\n $current_user_data = dcrf_get_current_user_data();\n $crrnt_user_id = $current_user_data->ID;\n\n if ( \n isset( $_POST['profile_picture_nonce'], $crrnt_user_id ) \n && wp_verify_nonce( $_POST['profile_picture_nonce'], 'profile_picture' )\n ) {\n // The nonce was valid and the user has the capabilities, it is safe to continue.\n // These files need to be included as dependencies when on the front end.\n require_once( ABSPATH . 'wp-admin/includes/image.php' );\n require_once( ABSPATH . 'wp-admin/includes/file.php' );\n require_once( ABSPATH . 'wp-admin/includes/media.php' );\n \n // Let WordPress handle the upload.\n // Remember, 'my_image_upload' is the name of our file input in our form above.\n $attachment_id = media_handle_upload( 'profile_picture', $crrnt_user_id );\n $attach_url = wp_get_attachment_url($attachment_id);\n\n $attchment_data = array(\n 'id' => $attachment_id,\n 'url' => $attach_url,\n );\n update_user_meta( $crrnt_user_id, 'profile_picture', $attchment_data );\n\n if ( is_wp_error( $attachment_id ) ) {\n //echo 'Error in attchment';\n } else {\n //echo 'Image Uploaded';\n }\n } else {\n //echo 'Check Nonce Data';\n }\n ?>\n <div class=\"row error col-md-6\">\n <?php echo dcrf_get_error_messages('udpi_error_in_update'); ?>\n <?php echo dcrf_get_error_messages('udpi_sucess_update'); ?>\n </div>\n <div class=\"row\">\n <!-- Left Content -->\n <div class=\"col-md-8\">\n <div class=\"dcrf_user_profile_info\">\n <!-- Tabs -->\n <!-- <ul class=\"nav nav-tabs\" role=\"tablist\">\n <li class=\"nav-item\"><a data-toggle=\"tab\" class=\"nav-link active\" href=\"#user-profile-content\" role=\"tab\" data-toggle=\"tab\">Personal Info</a></li>\n </ul> -->\n <!-- Tabs Content -->\n\n <div class=\"tab-content\">\n <div role=\"tabpanel\" class=\"tab-pane fade in active show\" id=\"user-profile-content\">\n <form class=\"form-control\" method=\"POST\" action=\"\">\n <h4 class=\"title\">Personal Info</h4>\n <div class=\"row\">\n <div class=\"column col-md-6 pt-2 pb-2\">\n <label>First Name *</label>\n <span class=\"first-name\">\n <input class=\"form-control\" type=\"text\" name=\"first_name\" value=\"<?php echo dcrf_current_user_meta('first_name'); ?>\" required>\n </span>\n </div>\n <div class=\"column col-md-6 pt-2 pb-2\">\n <label>Last Name</label>\n <span class=\"last-name\">\n <input class=\"form-control\" type=\"text\" name=\"last_name\" value=\"<?php echo dcrf_current_user_meta('last_name'); ?>\">\n </span>\n </div>\n </div>\n\n <!-- Row 2 -->\n <div class=\"row\">\n <div class=\"column col-md-6 pt-2 pb-2\">\n <label>Email Address *</label>\n <span class=\"your-email\">\n <input class=\"form-control\" type=\"email\" value=\"<?php echo dcrf_get_current_user_data()->user_email; ?>\" disabled>\n </span>\n </div>\n <div class=\"column col-md-6 pt-2 pb-2\">\n <label>Phone Number</label>\n <span class=\"last-name\">\n <input class=\"form-control\" type=\"number\" name=\"phone_number\" value=\"<?php echo dcrf_current_user_meta('phone_number'); ?>\">\n </span>\n </div>\n </div>\n\n\n <!-- Row 3 -->\n <div class=\"row\">\n <div class=\"col-md-12 pt-2 pb-2\">\n <label>Office Address</label>\n <textarea class=\"form-control\" name=\"office_address\" rows=\"1\" cols=\"50\"><?php echo dcrf_current_user_meta('office_address'); ?></textarea>\n </div>\n </div>\n\n <!-- Row 4 -->\n <div class=\"row\">\n <div class=\"column col-md-6 pt-2 pb-2\">\n <label>Investment Dealer Name:</label>\n <span class=\"your-subject\">\n <input class=\"form-control\" type=\"text\" name=\"investment_dealer_name\" value=\"<?php echo dcrf_current_user_meta('investment_dealer_name'); ?>\">\n </span>\n </div>\n <div class=\"column col-md-6 pt-2 pb-2\">\n <label>Country:</label>\n <span class=\"country\">\n <input class=\"form-control\" type=\"text\" name=\"country\" value=\"<?php echo dcrf_current_user_meta('country'); ?>\">\n </span>\n </div>\n </div>\n\n <!-- Row 5 -->\n <div class=\"row\">\n <div class=\"col-md-4 pt-2 pb-2\">\n <label>Province:</label>\n <span class=\"your-subject\">\n <input class=\"form-control\" type=\"text\" name=\"state\" value=\"<?php echo dcrf_current_user_meta('state'); ?>\">\n </span>\n </div>\n <div class=\"col-md-4 pt-2 pb-2\">\n <label>City:</label>\n <span class=\"city\">\n <input class=\"form-control\" type=\"text\" name=\"city\" value=\"<?php echo dcrf_current_user_meta('city'); ?>\">\n </span>\n </div>\n <div class=\"col-md-4 pt-2 pb-2\">\n <label>Postal Code:</label>\n <span class=\"city\">\n <input class=\"form-control\" type=\"text\" name=\"postal_code\" value=\"<?php echo dcrf_current_user_meta('postal_code'); ?>\">\n </span>\n </div>\n </div>\n\n <!-- Row 6 -->\n <div class=\"row\">\n <div class=\"col-md-6 pt-2 pb-2\">\n <label>Governing Regulatory Body:</label>\n <span class=\"country\">\n <?php $grbody = dcrf_current_user_meta('governing_regulatory_body'); ?>\n <select class=\"form-control\" name=\"governing_regulatory_body\">\n <option value=\"mfda_advisor\" <?php echo ($grbody == 'mfda_advisor') ? 'selected' : ''; ?>>MFDA Advisor</option>\n <option value=\"iiroc_advisor\" <?php echo ($grbody == 'iiroc_advisor') ? 'selected' : ''; ?>>IIROC Advisor</option>\n <?php if (dcrf_get_current_user_data('roles') == 'ab_firm') : ?>\n <option value=\"mfda_and_iiroc\" <?php echo ($grbody == 'mfda_and_iiroc') ? 'selected' : ''; ?>>MFDA & IIROC Dealer</option>\n <?php endif; ?>\n </select>\n </span>\n </div>\n </div>\n\n <?php if (dcrf_get_current_user_data('roles') == 'ab_advisor' || dcrf_get_current_user_data('roles') == 'administrator') : ?>\n <div class=\"row\">\n <div class=\"col-md-12 pt-2 pb-2\">\n <label>As an advisor I am looking to accomplish the following objective: </label>\n </div>\n <div class=\"col-md-12 pt-2 pb-2\">\n <?php $looking_acmplish = dcrf_current_user_meta('looking_to_accomplish'); ?>\n\n <label class=\"custom-control custom-checkbox\">\n <input class=\"custom-control-input\" type=\"checkbox\" name=\"looking_to_accomplish[]\" <?php echo ( is_array($looking_acmplish) && in_array('sell_my_book_of_business',$looking_acmplish) ) ? 'checked' : ''; ?> value=\"sell_my_book_of_business\">\n <span class=\"custom-control-indicator\"></span>\n <span class=\"custom-control-description\">Sell my book of business</span>\n </label>\n <label class=\"custom-control custom-checkbox\">\n <input class=\"custom-control-input\" type=\"checkbox\" name=\"looking_to_accomplish[]\" <?php echo ( is_array($looking_acmplish) && in_array('purchase_a_book_of_business',$looking_acmplish) ) ? 'checked' : ''; ?> value=\"purchase_a_book_of_business\">\n <span class=\"custom-control-indicator\"></span>\n <span class=\"custom-control-description\">Purchase a book of business</span>\n </label>\n <label class=\"custom-control custom-checkbox\">\n <input class=\"custom-control-input\" type=\"checkbox\" name=\"looking_to_accomplish[]\" <?php echo ( is_array($looking_acmplish) && in_array('change_firm',$looking_acmplish) ) ? 'checked' : ''; ?> value=\"change_firm\">\n <span class=\"custom-control-indicator\"></span>\n <span class=\"custom-control-description\">Change firm</span>\n </label>\n <label class=\"custom-control custom-checkbox\">\n <input class=\"custom-control-input\" type=\"checkbox\" name=\"looking_to_accomplish[]\" <?php echo ( is_array($looking_acmplish) && in_array('certification_of_my_book_of_business',$looking_acmplish) ) ? 'checked' : ''; ?> value=\"certification_of_my_book_of_business\">\n <span class=\"custom-control-indicator\"></span>\n <span class=\"custom-control-description\">An evaluation and certification of my book of business</span>\n </label>\n </div>\n </div>\n <?php endif; ?>\n\n <div class=\"row\">\n <div class=\"col-md-12 mt-4 mb-2\">\n <input class=\"btn btn-primary\" type=\"submit\" name=\"update_dash_profile_info\" value=\"Update\" class=\"button\">\n </div>\n </div>\n\n </form>\n </div>\n <div role=\"tabpanel\" class=\"tab-pane fade\" id=\"profile\">\n Profile\n </div>\n </div>\n </div>\n </div>\n <!-- Right Content -->\n <div class=\"col-md-4\">\n <!-- Profile Pic -->\n <div class=\"dcrf_user_profile_pic\">\n <h5 class=\"pic_title\">My Profile</h5>\n <div class=\"text-center\">\n <?php\n $prof_pic = dcrf_current_user_meta('profile_picture');\n $thumbnail = '';\n if (is_array($prof_pic)) {\n $id = $prof_pic['id'];\n if ($id) {\n $thumbnail = wp_get_attachment_image_url($id,'medium');\n }\n ?><img src=\"<?php echo $thumbnail; ?>\" class=\"mx-auto img-fluid img-circle d-block\" alt=\"avatar\"><?php\n }else{\n ?><img src=\"//placehold.it/150\" class=\"mx-auto img-fluid img-circle d-block\" alt=\"avatar\"><?php\n }\n ?>\n <h6 class=\"mt-2\">Upload a different photo</h6>\n <label class=\"custom-file\">\n <form id=\"featured_upload\" method=\"post\" action=\"#\" enctype=\"multipart/form-data\">\n <input type=\"file\" class=\"file\" name=\"profile_picture\" id=\"profile_picture\" multiple=\"false\" />\n <?php wp_nonce_field( 'profile_picture', 'profile_picture_nonce' ); ?>\n\n <div class=\"input-group col-xs-12\">\n <input type=\"text\" class=\"form-control input-lg\" disabled=\"\" placeholder=\"Upload Image\">\n <span class=\"input-group-btn\">\n <button class=\"browse btn btn-primary input-lg\" type=\"button\"><i class=\"glyphicon glyphicon-search\"></i> Browse</button>\n </span>\n </div>\n <input id=\"submit_my_image_upload\" class=\"btn btn-primary m-3\" name=\"submit_my_image_upload\" type=\"submit\" value=\"Upload\" />\n </form>\n <!-- <span class=\"custom-file-control\">Choose file</span> -->\n </label>\n\n </div>\n </div>\n\n <!-- Profile Bio -->\n <div class=\"dcrf_user_profile_bio\">\n <h5 class=\"pic_title\">About Me</h5>\n <div class=\"bio-text\">\n <p class=\"dcrf_user_bio_text\"><?php echo dcrf_get_current_user_data()->description; ?></p>\n <form action=\"\" method=\"POST\" class=\"prof-bio-form d-none\">\n <textarea class=\"form-control mb-2\" name=\"profile_bio_text\" rows=\"4\" cols=\"50\"><?php echo dcrf_get_current_user_data()->description; ?></textarea>\n <input type=\"submit\" value=\"Update\" name=\"update_dash_profile_bio\" class=\"btn btn-primary mb-2\">\n </form>\n </div>\n <div class=\"bio_edit_btn\"> \n <a href=\"javascript:void(0);\" class=\"edit-bio-btn\"><i class=\"fa fa-pencil-square-o\" aria-hidden=\"true\"></i></i> Edit </a>\n </div>\n </div>\n </div>\n </div>\n\n <?php\n }else{\n\n // Firm Advisor Profile Start\n if (isset($_POST['update_dash_profile_firm_profile'])) {\n\n $current_user_data = dcrf_get_current_user_data();\n $crrnt_user_id = $current_user_data->ID;\n\n $advisor_must_register_with = (isset($_POST['advisor_must_register_with'])) ? $_POST['advisor_must_register_with'] : '';\n $advisor_must_located = (isset($_POST['advisor_must_located'])) ? $_POST['advisor_must_located'] : '';\n $looking_to_advisor_interested = (isset($_POST['looking_to_advisor_interested'])) ? $_POST['looking_to_advisor_interested'] : '';\n $we_pay_transfer_fees = (isset($_POST['we_pay_transfer_fees'])) ? $_POST['we_pay_transfer_fees'] : '';\n $we_will_repapairing_client = (isset($_POST['we_will_repapairing_client'])) ? $_POST['we_will_repapairing_client'] : '';\n \n // Update User meta\n update_user_meta($crrnt_user_id, 'advisor_must_register_with', $advisor_must_register_with);\n update_user_meta($crrnt_user_id, 'advisor_must_located', $advisor_must_located);\n update_user_meta($crrnt_user_id, 'looking_to_advisor_interested', $looking_to_advisor_interested);\n update_user_meta($crrnt_user_id, 'we_pay_transfer_fees', $we_pay_transfer_fees);\n update_user_meta($crrnt_user_id, 'we_will_repapairing_client', $we_will_repapairing_client);\n \n dcrf_add_wp_errors('udpi_sucess_update','<div class=\"alert alert-success col-md-8 text-center\" role=\"alert\">Profile Sucessfully Updated</div>');\n }\n\n ?>\n <div class=\"row error col-md-12\">\n <?php echo dcrf_get_error_messages('udpi_error_in_update'); ?>\n <?php echo dcrf_get_error_messages('udpi_sucess_update'); ?>\n </div>\n <div class=\"row\">\n <!-- Left Content -->\n <div class=\"col-md-8\">\n <div class=\"dcrf_user_profile_portfolio\">\n <form class=\"form-control\" method=\"POST\" action=\"\">\n\n <h5 class=\"title\">Advisor Profile</h5>\n <div class=\"row pb-2\">\n <div class=\"col-md-6\">\n <label>Advisor must be registered with</label>\n <span class=\"country\">\n <?php $must_register_with = dcrf_current_user_meta('advisor_must_register_with'); ?>\n <select name=\"advisor_must_register_with\" class=\"form-control\">\n <option value=\"mfda\" <?php echo ($must_register_with == 'mfda')?'selected':''; ?>>MFDA</option>\n <option value=\"iiroc\" <?php echo ($must_register_with == 'iiroc')?'selected':''; ?>>IIROC</option>\n </select>\n </span>\n </div>\n <div class=\"col-md-6\">\n <label>Advisor must be located in</label>\n <span class=\"your-subject\">\n <input type=\"text\" class=\"form-control\" name=\"advisor_must_located\" value=\"<?php echo dcrf_current_user_meta('advisor_must_located'); ?>\">\n </span>\n </div>\n </div>\n \n <!-- Row 7 -->\n <div class=\"row\">\n <div class=\"col-md-12 pt-2 pb-2\">\n <label>We are looking for advisors interested in changing firms</label>\n </div>\n <div class=\"col-md-12 pt-2 pb-2\">\n <?php $advisor_interested = dcrf_current_user_meta('looking_to_advisor_interested'); ?>\n <div class=\"btn-group\" data-toggle=\"buttons\">\n <label class=\"btn btn-primary <?php echo ($advisor_interested =='yes') ?'active':'';?>\">\n <input type=\"radio\" name=\"looking_to_advisor_interested\" autocomplete=\"off\" <?php echo ($advisor_interested =='yes') ?'checked':'';?> value=\"yes\"> Yes\n </label>\n <label class=\"btn btn-primary <?php echo ($advisor_interested =='no') ?'active':'';?>\">\n <input type=\"radio\" name=\"looking_to_advisor_interested\" <?php echo ($advisor_interested =='no') ?'checked':'';?> autocomplete=\"off\" value=\"no\"> No\n </label>\n </div>\n </div>\n </div>\n\n <!-- Row 8 -->\n <div class=\"row\">\n <div class=\"col-md-12 pt-2 pb-2\">\n <h5 class=\"reg_form_title\">We will provide the following services</h5>\n </div>\n <div class=\"col-md-12 pt-2 pb-2\">\n <label>We are willing to pay transfer fees</label>\n </div>\n <div class=\"col-md-12 pt-2 pb-2\">\n <?php $transfer_fees = dcrf_current_user_meta('we_pay_transfer_fees'); ?>\n <div class=\"btn-group\" data-toggle=\"buttons\">\n <label class=\"btn btn-primary <?php echo ($transfer_fees =='yes') ?'active':'';?>\">\n <input type=\"radio\" name=\"we_pay_transfer_fees\" autocomplete=\"off\" <?php echo ($transfer_fees =='yes') ?'checked':'';?> value=\"yes\"> Yes\n </label>\n <label class=\"btn btn-primary <?php echo ($transfer_fees =='no') ?'active':'';?>\">\n <input type=\"radio\" name=\"we_pay_transfer_fees\" autocomplete=\"off\" <?php echo ($transfer_fees =='no') ?'checked':'';?> value=\"no\"> No\n </label>\n </div>\n </div>\n <div class=\"col-md-12 pt-2 pb-2\">\n <label>We will help with the repapering of client documents</label>\n </div>\n <div class=\"col-md-12 pt-2 pb-2\">\n <?php $repapairing_client = dcrf_current_user_meta('we_will_repapairing_client'); ?>\n <div class=\"btn-group\" data-toggle=\"buttons\">\n <label class=\"btn btn-primary <?php echo ($repapairing_client =='yes') ?'active':'';?>\">\n <input type=\"radio\" name=\"we_will_repapairing_client\" autocomplete=\"off\" <?php echo ($repapairing_client =='yes') ?'checked':'';?> value=\"yes\"> Yes\n </label>\n <label class=\"btn btn-primary <?php echo ($repapairing_client =='no') ?'active':'';?>\">\n <input type=\"radio\" name=\"we_will_repapairing_client\" autocomplete=\"off\" <?php echo ($repapairing_client =='no') ?'checked':'';?> value=\"no\"> No\n </label>\n </div>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"col-md-12 mt-4 mb-2\">\n <input class=\"btn btn-primary\" type=\"submit\" name=\"update_dash_profile_firm_profile\" value=\"Update\" class=\"button\">\n </div>\n </div>\n </form>\n </div>\n </div>\n </div>\n <?php\n }\n\n }", "title": "" }, { "docid": "b785122337afee1a25c3167a86b1c65c", "score": "0.6378954", "text": "public function update()\n {\n // check if the profile was created\n // if not, redirect the user back and show what happened\n if (!$profile = $this->userRepo->updateProfile(Auth::user()->id, Input::all())) {\n return $this->redirectBack(['error' => $this->userRepo->getErrors()]);\n }\n\n event(new UserChangedProfile($profile));\n\n // if came here means profile was created\n // redirect him to your brand new profile and show a nice message =)\n return $this->redirectRoute('profile.show', [Auth::user()->username])\n ->with('message', 'Perfil Atualizado com sucesso!');\n }", "title": "" }, { "docid": "bcca632da9cf76883e33932f6fea1c46", "score": "0.6375933", "text": "public function updateprofile()\n\t{\n\t/*$this->load->model('Member');\n $this->Member->updateAcoount();\n \t$this->session->set_userdata('Success', 'Update Done!');*/\n\t$this->Admin_user->updateAcoount();\n\t$this->session->set_userdata('successmy', 'Update profile Success!');\n \t//$this->view('pages/myaccount');\n\tredirect('admin/my_profile', 'location');\n \n\t}", "title": "" }, { "docid": "dde4b77225aab3d63e3a6431647d15a9", "score": "0.63696635", "text": "public function UpdateProfile($uid, $level, $about_me, $site) {\n $tablepre = $this->tablepre;\n $db = $this->db;\n $updatefields = \"\";\n if ($level & 2) {\n $updatefields = \"bio='$about_me'\";\n }\n if (($level &2) && ($level & 4)) {\n $updatefields .= \" , \";\n }\n if ($level & 4) {\n $updatefields .= \"site='$site'\";\n }\n if ($level) {\n $query = \"UPDATE {$tablepre}memberfields\n SET $updatefields\n WHERE uid='$uid'\";\n $db->query($query);\n }\n }", "title": "" }, { "docid": "d16d5be7d808dbdc8e1b61b7d7af1e1d", "score": "0.63661444", "text": "public static function updateProfileInformation()\n {\n return 'update-profile-information';\n }", "title": "" }, { "docid": "ce6815e075bfaaaeb94f7cb1d7916f07", "score": "0.63656694", "text": "public function actionProfile()\n {\n $id = Yii::$app->user->getId();\n $user = $this->findModel($id);\n $user->scenario = 'profile';\n\n if ($user->load(Yii::$app->request->post()) && $user->save()) {\n Yii::$app->session->setFlash('success', Yii::t('common/app', 'Update Success.'));\n }\n\n return $this->render('profile', [\n 'user' => $user,\n ]);\n }", "title": "" }, { "docid": "bd94b5a5359c55def4da35221c1f2577", "score": "0.6364958", "text": "function edit_profile()\n\t{\n\t\t// Load the form helper\n\t\tee()->load->helper('form');\n\n\t\t// UGH- we need these 3 to get the data js or it throws a Legacy\\Facade error\n\t\tee()->router->set_class('cp');\n\t\tee()->load->library('cp');\n\t\tee()->load->library('javascript');\n\n\t\t/** ----------------------------------------\n\t\t/** Build the custom profile fields\n\t\t/** ----------------------------------------*/\n\n\t\t$tmpl = $this->_load_element('custom_profile_fields');\n\n\t\t/** ----------------------------------------\n\t\t/** Fetch the field definitions\n\t\t/** ----------------------------------------*/\n\n\t\t$r = '';\n\n\t\t$sql = \"SELECT * FROM exp_member_fields \";\n\n\t\tif (ee()->session->userdata['group_id'] != 1)\n\t\t{\n\t\t\t$sql .= \" WHERE m_field_public = 'y' \";\n\t\t}\n\n\t\t$sql .= \" ORDER BY m_field_order\";\n\n\t\t$query = ee()->db->query($sql);\n\n//\t\t$result_row = $result->row_array()\n\n\t\t$this->member = ee('Model')->get('Member', ee()->session->userdata('member_id'))->first();\n\n\t\t$result_row = $this->member->getValues();\n\n\t\tif ($query->num_rows() > 0)\n\t\t{\n\t\t\tforeach ($this->member->getDisplay()->getFields() as $field)\n\t\t\t{\n\t\t\t\tif (ee()->session->userdata['group_id'] != 1 && $field->get('field_public') != 'y')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$temp = $tmpl;\n\n\t\t\t\t/** ----------------------------------------\n\t\t\t\t/** Assign the data to the field\n\t\t\t\t/** ----------------------------------------*/\n\n\t\t\t\t$temp = str_replace('{field_id}', $field->getId(), $temp);\n\n\t\t\t\t$required = $field->isRequired() ? \"<span class='alert'>*</span>&nbsp;\" : '';\n\n\t\t\t\t$temp = str_replace('{lang:profile_field}', $required.$field->getLabel(), $temp);\n\t\t\t\t$temp = str_replace('{lang:profile_field_description}', $field->get('field_description'), $temp);\n\t\t\t\t$temp = str_replace('{form:custom_profile_field}', $field->getForm(), $temp);\n\n\t\t\t\t/** ----------------------------------------\n\t\t\t\t/** Render textarea fields\n\t\t\t\t/** ----------------------------------------*/\n\n\t\t\t\tif ($field->getTypeName() == 'textarea')\n\t\t\t\t{\n\t\t\t\t\t$temp = str_replace('<td ', \"<td valign='top' \", $temp);\n\t\t\t\t}\n\n\t\t\t\t$r .= $temp;\n\t\t\t}\n\t\t}\n\n\t\t/** ----------------------------------------\n\t\t/** Build the output data\n\t\t/** ----------------------------------------*/\n\n\t\treturn $this->_var_swap(\n\t\t\t$this->_load_element('edit_profile_form'),\n\t\t\tarray(\n\t\t\t\t'form_declaration'\t\t=> ee()->functions->form_declaration(\n\t\t\t\t\tarray('action' => $this->_member_path('update_profile'))\n\t\t\t\t),\n\t\t\t\t'path:update_profile'\t=> $this->_member_path('update_profile'),\n\t\t\t\t'custom_profile_fields'\t=> $r\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "747af0cdfb44ab3e8080ab29719d3256", "score": "0.6348337", "text": "public function editProfile($accountID,$editData){\n //\n }", "title": "" }, { "docid": "06fbd9782d921bf2d17c35f3f8757112", "score": "0.6337175", "text": "public function action_profile()\n\t{\n\t\tglobal $context;\n\n\t\t$memID = currentMemberID();\n\n\t\t// Fetch any providers this user has activated\n\t\t$context['connected_providers'] = connectedProviders($memID);\n\n\t\t// Providers available\n\t\t$context['enabled_providers'] = extauth_enabled_providers();\n\t}", "title": "" }, { "docid": "4f0d5328807a3428e4638701603de29c", "score": "0.63108605", "text": "public function modifyProfileAction()\n {\t\n setlocale(LC_TIME, \"fr_FR\");\n if($this->_helper->EpCustom->checksession())\n {\n $profileplus_obj = new Ep_Contrib_ProfilePlus();\n $profileContrib_obj = new Ep_Contrib_ProfileContributor();\n if($this->_helper->FlashMessenger->getMessages()) {\n $this->_view->actionmessages=$this->_helper->FlashMessenger->getMessages();\n }\n $contrib_identifier=$this->contrib_identifier;\n if($profileplus_obj->checkProfileExist($contrib_identifier)!='NO')\n {\n $profile_identifier_info=$profileplus_obj->checkProfileExist($contrib_identifier);\n $profile_identifier=$profile_identifier_info[0]['user_id'];\n $profileinfo=$profileplus_obj->getProfileInfo($profile_identifier);\n $profile_contribinfo=$profileContrib_obj->getProfileInfo($profile_identifier);\n $this->_view->email=$profileinfo[0]['email'];\n $this->_view->password=$profileinfo[0]['password'];\n $this->_view->subscribe=$profileinfo[0]['subscribe'];\n $this->_view->alert_subscribe=$profileinfo[0]['alert_subscribe'];\n\n\n $this->_view->civ=$profileinfo[0]['initial'];\n $this->_view->fname=$profileinfo[0]['first_name'];\n $this->_view->lname=$profileinfo[0]['last_name'];\n $this->_view->address=$profileinfo[0]['address'];\n $this->_view->city=$profileinfo[0]['city'];\n $this->_view->phonenumber=$profileinfo[0]['phone_number'];\n if($profileinfo[0]['country']==101)\n {\n $postcode=explode(\"|\",$profileinfo[0]['zipcode']);\n $this->_view->zipcode1=$postcode[0];\n $this->_view->zipcode2=$postcode[1];\n }\n else\n $this->_view->zipcode=$profileinfo[0]['zipcode'];\n\n $this->_view->country=$profileinfo[0]['country'];\n $this->_view->dob=$profile_contribinfo[0]['dob'];\n $this->_view->profile_mother_language=$profile_contribinfo[0]['language'];\n //$this->_view->language_more=explode(\",\",$profile_contribinfo[0]['language_more']);\n $this->_view->language_more=unserialize($profile_contribinfo[0]['language_more']);\n $this->_view->category_more=unserialize($profile_contribinfo[0]['category_more']);\n\n $this->_view->nationality=$profile_contribinfo[0]['nationality'];\n $this->_view->category=explode(\",\",$profile_contribinfo[0]['favourite_category']);\n $this->_view->self_details=strip_tags($profile_contribinfo[0]['self_details']);\n $this->_view->payment_type=$profile_contribinfo[0]['payment_type'];\n /**cv path**/\n $cv_path=APP_PATH_ROOT.$this->_config->path->contrib_cv_path.$this->contrib_identifier.'/'.$profile_contribinfo[0]['cv_file'];\n if(!is_dir($cv_path) && file_exists($cv_path))\n $this->_view->cv_exists='yes';\n /**iNOVICE inFO ***/\n $this->_view->pay_info_type=$profile_contribinfo[0]['pay_info_type'];\n\n $this->_view->entreprise=$profile_contribinfo[0]['entreprise'];\n $this->_view->siren_number=$profile_contribinfo[0]['siren_number'];\n $this->_view->denomination_sociale=$profile_contribinfo[0]['denomination_sociale'];\n $this->_view->tva_number=$profile_contribinfo[0]['tva_number'];\n /* added by naseer on 31-07-2015 */\n $this->_view->options_flag=$profile_contribinfo[0][\"options_flag\"] ;\n $this->_view->passport_no=$profile_contribinfo[0][\"passport_no\"] ;\n $this->_view->id_card=$profile_contribinfo[0][\"id_card\"] ;\n\n $this->_view->com_name=$profile_contribinfo[0][\"com_name\"] ;\n $this->_view->com_country=$profile_contribinfo[0][\"com_country\"] ;\n $this->_view->com_address=$profile_contribinfo[0][\"com_address\"] ;\n $this->_view->com_phone=$profile_contribinfo[0][\"com_phone\"] ;\n $this->_view->com_city=$profile_contribinfo[0][\"com_city\"] ;\n $this->_view->com_zipcode=$profile_contribinfo[0][\"com_zipcode\"] ;\n $this->_view->com_siren=$profile_contribinfo[0][\"com_siren\"] ;\n $this->_view->com_tva_number=$profile_contribinfo[0][\"com_tva_number\"] ;\n /* end of added by naseer on 31-07-2015 */\n\n $this->_view->SSN=$profile_contribinfo[0]['SSN'];\n $this->_view->company_number=$profile_contribinfo[0]['company_number'];\n $this->_view->vat_check=$profile_contribinfo[0]['vat_check'];\n $this->_view->VAT_number=$profile_contribinfo[0]['VAT_number'];\n /**Paypal and RIB info**/\n $this->_view->paypal_id=$profile_contribinfo[0][\"paypal_id\"] ;\n $RIB_ID=array_filter(explode(\"|\",$profile_contribinfo[0][\"rib_id\"]));\n if(count($RIB_ID)==2)\n {\n $this->_view->rib_id_6=$RIB_ID[0];\n $this->_view->rib_id_7=$RIB_ID[1];\n }\n\n $this->_view->bank_account_name=$profile_contribinfo[0]['bank_account_name'];//bank account name\n }\n else\n {\n $user_obj = new Ep_User_User();\n $user_details=$user_obj->getContributorDetail($contrib_identifier);\n\n $this->_view->email=$user_details[0]['email'];\n $this->_view->password=$user_details[0]['password'];\n $this->_view->subscribe=$user_details[0]['subscribe'];\n $this->_view->alert_subscribe=$user_details[0]['alert_subscribe'];\n\n $this->_view->country=101;\n $this->_view->nationality=101;\n }\n\n /*added by naseer on 04-11-2015 */\n $software_array=$this->_arrayDb->loadArrayv2(\"EP_SOFTWARE_LIST\", $this->_lang);\n //explodig all the software list and saing in multidimentaional array for later use//\n foreach($software_array as $k => $v){\n $software_array[$k] = explode(\"-\",$v);\n }\n $this->_view->ep_software_array=$software_array;\n //exploding and saving the values since i was imploded at the time of insertion//\n $software_list_temp = explode(\"###$$$###\",$profile_contribinfo[0]['software_list']);\n for($i=0;$i<count($software_list_temp);$i++){\n $software_list[$i] = explode('|',$software_list_temp[$i]);\n }\n $this->_view->software_list = $software_list;\n $this->_view->software_list_count = count($software_list);//saving the count for later use in phtml file//\n\n /*end of added by naseer on 04-11-2015 */\n /*added by naseer on 26.11.2015*/\n $this->_view->writer_preference=$profile_contribinfo[0][\"writer_preference\"] ;\n $this->_view->translator=$profile_contribinfo[0][\"translator\"] ;\n $this->_view->twitter_id=$profile_contribinfo[0][\"twitter_id\"] ;\n $this->_view->facebook_id=$profile_contribinfo[0][\"facebook_id\"] ;\n $this->_view->website=$profile_contribinfo[0][\"website\"] ;\n\n /* end of added by naseer on 31-07-2015 */\n $profession_array=$this->_arrayDb->loadArrayv2(\"CONTRIB_PROFESSION\", $this->_lang);\n //natsort($profession_array);\n $categories_array=$this->_arrayDb->loadArrayv2(\"EP_ARTICLE_CATEGORY\", $this->_lang);\n natsort($categories_array);\n $language_array=$this->_arrayDb->loadArrayv2(\"EP_LANGUAGES\", $this->_lang);\n natsort($language_array);\n $nationality_array=$this->_arrayDb->loadArrayv2(\"Nationality\", $this->_lang);\n natsort($nationality_array);\n $pays_array=$this->_arrayDb->loadArrayv2(\"countryList\", $this->_lang);\n natsort($pays_array);\n $this->_view->ep_professions_list=$profession_array;\n $this->_view->ep_language_list=$language_array;\n $this->_view->ep_categories_list=$categories_array;\n $this->_view->ep_nationality_list=$nationality_array;\n $this->_view->ep_pays_list=$pays_array;\n\n /**profile IMage*/\n $this->_view->profile_image=$this->getPicPath($this->contrib_identifier,'profile');\n\n\n /**getting User expeience details**/\n $experience_obj=new Ep_Contrib_Experience();\n $jobDetails=$experience_obj->getExperienceDetails($contrib_identifier,'job');\n if($jobDetails!=\"NO\")\n $this->_view->jobDetails=$jobDetails;\n $educationDetails=$experience_obj->getExperienceDetails($contrib_identifier,'education');\n if($educationDetails!=\"NO\")\n $this->_view->educationDetails=$educationDetails;\n\n $this->_view->meta_title=\"contributor profile\";\n $this->render(\"Contrib_modify_profile\");\n }\n }", "title": "" }, { "docid": "c3da7425d82983acf765b6a4858cfebf", "score": "0.6310251", "text": "protected function doProfileUpdateAction() {\n\t\t$oSession = $this->getRequest()->getSession();\n\t\ttry {\n\t\t\tsystemLog::message('Updating user profile');\n\t\t\t$this->addInputToModel($this->getInputManager()->doFilter(), $this->getModel());\n\t\t\t$this->getModel()->update();\n\t\t\tsystemLog::message('User profile updated successfully');\n\t\t} catch ( Exception $e ) {\n\t\t\tsystemLog::erro($e->getMessage());\n\t\t\t$this->getModel()->setUpdated(false);\n\t\t\t$this->getModel()->setMessage($e->getMessage());\n\t\t}\n\n\t\tif ( $this->getRequest()->isAjaxRequest() ) {\n\t\t\t$oView = new accountView($this);\n\t\t\t$oView->showProfileUpdateResponse();\n\t\t\treturn;\n\t\t} else {\n\t\t\t$oSession->setStatusMessage(\n\t\t\t\t$this->getModel()->getMessage(),\n\t\t\t\t$this->getModel()->isUpdated() == 0 ? mvcSession::MESSAGE_INFO : ($this->getModel()->isUpdated() ? mvcSession::MESSAGE_OK : mvcSession::MESSAGE_ERROR)\n\t\t\t);\n\t\t\t$this->redirect($this->buildUriPath(self::ACTION_PROFILE));\n\t\t}\n\t}", "title": "" }, { "docid": "6e2be0c760075783ef3c39be6ae37130", "score": "0.6299258", "text": "public function editprofile()\r\r\n\t{\r\r\n\t\t$value['profile']\t= $this->admin_model->get_user_profile($this->session->userdata('user_name'));\r\r\n\r\r\n\t\t$data['title']\t\t= lang_key('edit_profile');\r\r\n\t\t$data['content'] \t= load_admin_view('profile/editprofile_view',$value,TRUE);\r\r\n\t\tload_admin_view('template/template_view',$data);\r\r\n\t}", "title": "" }, { "docid": "eb2c62b2ab62f77695416366348a6a9c", "score": "0.6288201", "text": "function hsboard_save_extra_profile_fields( $user_id ) {\n\n if ( !current_user_can( 'edit_user', $user_id ) ) {\n return false;\n }\n\n update_usermeta( $user_id, 'fb_profile', $_POST['fb_profile'] );\n update_usermeta( $user_id, 'twitter_profile', $_POST['twitter_profile'] );\n update_usermeta( $user_id, 'gp_profile', $_POST['gp_profile'] );\n}", "title": "" }, { "docid": "dea622431fa8e83baac241b1250cd2cd", "score": "0.62858003", "text": "public function actionUpdateProfile()\n {\n $alumni_session = Yii::$app->session;\n $id = $alumni_session->get('id');\n $alumni = $this->findModel($id);\n $alumni->scenario= 'update-profile';\n\n if ($alumni->load(Yii::$app->request->post()) && $alumni->save()) {\n return $this->redirect(['alumni-projects/create']);\n }\n\n return $this->render('update-profile', [\n 'model' => $alumni,\n ]);\n }", "title": "" }, { "docid": "17edd37a4066da072b2a7286cf9edb1b", "score": "0.6260656", "text": "public function edit(profile $profile)\n {\n //\n }", "title": "" }, { "docid": "584b4aac55700c09c4d4738d34c2c177", "score": "0.62392986", "text": "public function profile_update($data)\n {\n $event_params = $data;\n $event_params['id'] = $this->getIdentity()->id;\n $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffProfileUpdate', 'params'=>$event_params));\n \n $admin = $this->getIdentity();\n\n $admin->email = $this->di['array_get']($data, 'email', $admin->email);\n $admin->name = $this->di['array_get']($data, 'name', $admin->name);\n $admin->signature = $this->di['array_get']($data, 'signature', $admin->signature);\n $admin->updated_at = date('Y-m-d H:i:s');\n $this->di['db']->store($admin);\n\n $event_params = array();\n $event_params['id'] = $this->getIdentity()->id;\n $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffProfileUpdate', 'params'=>$event_params));\n \n $this->di['logger']->info('Updated profile');\n return true;\n }", "title": "" }, { "docid": "11e7bd7f48fe7c1b88bc9b804c0f6a28", "score": "0.6237864", "text": "public function api_profile() {\n\t\t$this->_checkVars ( array (), array (\n\t\t\t\t'big' \n\t\t) );\n\t\t\n\t\tif (! isset ( $this->api ['big'] )) {\n\t\t\t$this->api ['big'] = $this->logged ['Member'] ['big'];\n\t\t}\n\t\t\n\t\t$params = array (\n\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t'Member.big' => $this->api ['big'] \n\t\t\t\t),\n\t\t\t\t'recursive' => - 1 \n\t\t);\n\t\t\n\t\t$data = $this->Member->find ( 'first', $params );\n\t\t\n\t\tunset ( $data ['Member'] ['password'] );\n\t\tunset ( $data ['Member'] ['salt'] );\n\t\tunset ( $data ['Member'] ['created'] );\n\t\tunset ( $data ['Member'] ['updated'] );\n\t\tunset ( $data ['Member'] ['last_mobile_activity'] );\n\t\tunset ( $data ['Member'] ['last_web_activity'] );\n\t\tunset ( $data ['Member'] ['status'] );\n\t\tunset ( $data ['Member'] ['type'] );\n\t\t\n\t\tif ($data ['Member'] ['photo_updated'] > 0) {\n\t\t\t$data ['Member'] ['profile_picture'] = $this->FileUrl->profile_picture ( $data ['Member'] ['big'], $data ['Member'] ['photo_updated'] );\n\t\t} else {\n\t\t\t$sexpic = 2;\n\t\t\tif ($data ['Member'] ['sex'] == 'f') {\n\t\t\t\t$sexpic = 3;\n\t\t\t}\n\t\t\t\n\t\t\t$data ['Member'] ['profile_picture'] = $this->FileUrl->profile_picture ( $sexpic );\n\t\t}\n\t\t$this->_apiOk ( $data );\n\t}", "title": "" }, { "docid": "b3c7b17572bb5b2fb66313028ed4f35a", "score": "0.6235169", "text": "public function testUpdateValidMember() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"member\");\n\n\t\t// create a new Member and insert to into mySQL\n\t\t$profile = new Member(null, $this->VALID_ACCESS_LEVEL, $this->VALID_EMAIL, $this->VALID_EMAIL_ACTIVATION, $this->VALID_HASH, $this->VALID_SALT);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// edit the Member and update it in mySQL\n\t\t$profile->setEmail($this->VALID_EMAIL);\n\t\t$profile->update($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$pdoMember = Member::getMemberByMemberId($this->getPDO(), $profile->getMemberId());\n\t\t$this->assertSame($numRows + 1, $this->getConnection()->getRowCount(\"member\"));\n\t\t$this->assertSame($pdoMember->getAccessLevel(), $this->VALID_ACCESS_LEVEL);\n\t\t$this->assertSame($pdoMember->getEmail(), $this->VALID_EMAIL);\n\t\t$this->assertSame($pdoMember->getEmailActivation(), $this->VALID_EMAIL_ACTIVATION);\n\t\t$this->assertSame($pdoMember->getPasswordHash(), $this->VALID_HASH);\n\t\t$this->assertSame($pdoMember->getSalt(), $this->VALID_SALT);\n\t}", "title": "" }, { "docid": "6e405e8ff9e330f86106ccbacafb3fad", "score": "0.6212743", "text": "function editProfile()\r\n {\r\n $id = $this->rdAuth->id;\r\n\r\n\r\n if (empty($this->params['data']))\r\n {\r\n $this->User->setId($id);\r\n $this->params['data'] = $this->User->read();\r\n $this->set('viewPage', 'false');\r\n $this->render();\r\n } else {\r\n if (empty($this->params['data']['User']['password'])) {\r\n unset($this->params['data']['User']['password']);\r\n }\r\n\r\n $this->Output->filter($this->params['data']);//always filter\r\n\r\n // Prevent User role changes (also stops privilege escalation)\r\n if (!empty($this->params['data']['User']['role'])) {\r\n $saveRole = $this->params['data']['User']['role'];\r\n unset ($this->params['data']['User']['role']);\r\n }\r\n\r\n if ( $this->User->save($this->params['data']))\r\n {\r\n //Render to view page to display saved data\r\n //TODO: Display list of users after import\r\n $user = $this->User->read();\r\n $this->params['data'] = $user;\r\n $this->set('viewPage', 'false');\r\n\r\n if (!empty($user['User']['email'])) {\r\n $message = \"Your Profile Has Been Updated Successfully.\" . \"<br > <br />\";\r\n $message .= \"<a href='..' style='font-size:140%'>Go to your iPeer Home page.</a><br /><br />\";\r\n } else {\r\n $message = \"We saved your data, but you still need to enter an email address!\";\r\n }\r\n\r\n $this->params['data']['User']['role'] = isset($saveRole) ? $saveRole : '';\r\n\r\n $this->set('data', $this->params['data']);\r\n $this->set('message', $message);\r\n\r\n //Setup Custom parameter\r\n $this->rdAuth->setFromData($user['User']);\r\n } else {\r\n $this->params['data']['User']['role'] = isset($saveRole) ? $saveRole : '';\r\n $this->Output->br2nl($this->params['data']);\r\n $this->set('data', $this->params['data']);\r\n $this->set('viewPage', 'false');\r\n $this->set('message', $this->User->errorMessage);\r\n $this->render();\r\n }\r\n }\r\n }", "title": "" }, { "docid": "935255e3765a925ad80da373a3ff2eb2", "score": "0.6210287", "text": "function updateTeamProfile()\n {\n update_option(WPST_OPTION_TEAM_NAME, $this->getTeamName()) ;\n update_option(WPST_OPTION_TEAM_CLUB_OR_POOL_NAME, $this->getClubOrPoolName()) ;\n update_option(WPST_OPTION_TEAM_STREET_1, $this->getStreet1()) ;\n update_option(WPST_OPTION_TEAM_STREET_2, $this->getStreet2()) ;\n update_option(WPST_OPTION_TEAM_STREET_3, $this->getStreet3()) ;\n update_option(WPST_OPTION_TEAM_CITY, $this->getCity()) ;\n update_option(WPST_OPTION_TEAM_STATE_OR_PROVINCE, $this->getStateOrProvince()) ;\n update_option(WPST_OPTION_TEAM_POSTAL_CODE, $this->getPostalCode()) ;\n update_option(WPST_OPTION_TEAM_COUNTRY, $this->getCountry()) ;\n update_option(WPST_OPTION_TEAM_PRIMARY_PHONE, $this->getPrimaryPhone()) ;\n update_option(WPST_OPTION_TEAM_SECONDARY_PHONE, $this->getSecondaryPhone()) ;\n update_option(WPST_OPTION_TEAM_EMAIL_ADDRESS, $this->getEmailAddress()) ;\n update_option(WPST_OPTION_TEAM_WEB_SITE, $this->getWebSite()) ;\n update_option(WPST_OPTION_TEAM_POOL_LENGTH, $this->getPoolLength()) ;\n update_option(WPST_OPTION_TEAM_POOL_MEASUREMENT_UNITS, $this->getPoolMeasurementUnits()) ;\n update_option(WPST_OPTION_TEAM_POOL_LANES, $this->getPoolLanes()) ;\n update_option(WPST_OPTION_TEAM_COACH_USER_ID, $this->getCoachUserId()) ;\n }", "title": "" }, { "docid": "0423139e1dd945d2b788bfa39e4c7aa9", "score": "0.6208159", "text": "public function updateMember( $memberData, $memberId );", "title": "" }, { "docid": "f3903e5fdf77b6a3f4677640ba54900b", "score": "0.61907285", "text": "private function updateUser($memberToSave) {\n \n $sql = \"UPDATE users set first = :FirstName, last = :LastName\n WHERE memberNumber = :ADANumber\";\n\n $statement = $this->getDbConn()->prepare($sql);\n $params = array(\n ':FirstName' => $memberToSave->FirstName, \n ':LastName' => $memberToSave->LastName,\n ':ADANumber' => (int)$memberToSave->CustNo);\n\n $this->executeStatement($statement, $params);\n }", "title": "" }, { "docid": "37036ed838e805f0d88e585ec9cddc82", "score": "0.6177878", "text": "public function testUpdateInvalidProfile() {\n\n\t\t// Create a Profile and try to update it without actually inserting it.\n\t\t$profile = new Profile(\n\t\t\tnull,\n\t\t\t\t$this->VALID_ACTIVATION,\n\t\t\t\t$this->VALID_ATHANDLE,\n\t\t\t\t$this->VALID_CLOUDINARYID,\n\t\t\t\t$this->VALID_EMAIL,\n\t\t\t\t$this->VALID_HASH,\n\t\t\t\t$this->VALID_SALT,\n\t\t\t\t$this->VALID_LOCATIONX,\n\t\t\t\t$this->VALID_LOCATIONY);\n\t\t$profile->update($this->getPDO());\n\t}", "title": "" }, { "docid": "260e01d92d0eaa6c42bff736fe599b7b", "score": "0.6177611", "text": "public function save()\n {\n $profile = $this->_user->profile;\n $profile->name = $this->name;\n $profile->sex = $this->sex;\n $profile->birthday = (Str::likeEmpty($this->birthday) ? null : Date::convertToDatetime($this->birthday, Date::FORMAT_SQL_DATE));\n $profile->city = $this->city;\n $profile->hobby = $this->hobby;\n $profile->phone = $this->phone;\n $profile->url = $this->url;\n $profile->custom_data = $this->custom_data;\n $profile->about = $this->about;\n\n $profile->save();\n }", "title": "" }, { "docid": "5de62590e4082855b0b4d781afd20a40", "score": "0.61762965", "text": "function profile()\r\n {\r\n $id = $this->session->userdata('user_id');\r\n \r\n $this->save($id, true);\r\n\r\n }", "title": "" }, { "docid": "092b1da92f5c7e97e3d7092620302428", "score": "0.61736846", "text": "function edit_profile(){\n\t\t$usr_id = $_SESSION['user_id'];\n\t\t$where = array('usr_id' => $usr_id );\n\t\t$table_name = 'user';\n\t\t$this->load->model('buyer/My_profile_model');\n\t\t$data['user_details'] = $this->My_profile_model->view_profile($where);\n\t\t$data['signup_name'] = $_SESSION['fname'];\n\t\t$data['signup_link'] = base_url().'buyer/my_profile/view_profile';\n\t\t$data['login_link'] = base_url().'home/logout'; \n\t\t$data['login_name'] = 'Logout';\n\t\t$this->data = $data;\n\t\t$this->middle = 'buyer/update_profile';\n\t\t$this->layout();\n\t}", "title": "" }, { "docid": "1bec5a6b2c394546f0b73f2d8b590ec7", "score": "0.6166473", "text": "function updateProfile($userId = false, $profile = false)\n {\n if($userId !== false && $profile !== false)\n {\n $userId = intval($userId);\n $profile= $this->dbh->sql_safe($profile);\n $sql = 'REPLACE INTO user_profiles(p_u_id, p_profile) VALUES(' . $userId . ', ' . $profile . ')';\n $this->dbh->execute($sql);\n }\n }", "title": "" }, { "docid": "962c156d403efd530b10f3b26e4f039c", "score": "0.61448944", "text": "function pmprocc_profile_update($user_id, $old_user_data)\n{\n\t$new_user_data = get_userdata($user_id);\n\tif($new_user_data->user_email != $old_user_data->user_email)\n\t{\t\t\t\n\t\t//get all lists\n\t\t$options = get_option(\"pmprocc_options\");\n\t\t$api = new ConstantContact($options['api_key']);\n\t\t\n\t\t//$lists = $api->getLists($options['access_token']);\n\t\t\n\t\t$response = $api->getContactByEmail($options['access_token'], $old_user_data->user_email);\n\t\t$contact = $response->results[0];\n\t\t\t\t\n\t\tif(!empty($contact))\n\t\t{ \n\t\t\t$contact->first_name = $new_user_data->first_name;\n\t\t\t$contact->last_name = $new_user_data->last_name;\n\t\t\t$contact->email_addresses[0]->email_address = $new_user_data->user_email;\n\t\t\t$api->updateContact($options['access_token'], $contact, true);\n\t\t}\t\t\n\t}\n}", "title": "" }, { "docid": "955f9b7bd5ecf05e93ba575936f70352", "score": "0.61397845", "text": "public function profile()\n {\n $user = $this->Users->get($this->CurUser->id);\n\n if ($this->request->is(['patch', 'post', 'put'])) {\n $user = $this->Core->patchEntity($user, $this->request->data);\n if ($this->Users->save($user)) {\n $this->Flash->success(__('The user has been saved'), ['plugin' => 'Admin']);\n return $this->redirect(['action' => 'profile']);\n } else {\n $this->Flash->error(__('The user could not be saved'), ['plugin' => 'Admin']);\n }\n }\n \n $this->set(compact('user'));\n }", "title": "" }, { "docid": "baab3cb38a43ca7997bec734eb41fa8c", "score": "0.6137318", "text": "public function edit(Member $member)\n {\n //\n }", "title": "" }, { "docid": "baab3cb38a43ca7997bec734eb41fa8c", "score": "0.6137318", "text": "public function edit(Member $member)\n {\n //\n }", "title": "" }, { "docid": "d40981ee2098ba1d96fe466e92c48d22", "score": "0.613293", "text": "public function edituserProfile() {\n\t\t$result['health_prob'] = $this->User_Model->get_healthProblemforSessionUser();\n\t\t$result['user_profile'] = $this->User_Model->userProfileDetail();\n\t\tif($result){\n\t\t\techo json_encode($result);\n\t\t}else{\n\t\t\treturn false;\n\t\t} \n\t}", "title": "" }, { "docid": "0fd34271a55dc3b6f5aa7dbce989e2a7", "score": "0.6126942", "text": "function update_person()\r\n\t{\r\n\t\t$this->load->model('membership_model');\t\r\n\t\t$this->membership_model->update_person();\r\n\t\t//AUDIT TRAIL\r\n\t\t\t$page = 'User Registration';\r\n\t\t\t$action = 'Modify User Information';\r\n\t\t\t$previous = '';\r\n\t\t\t$created = '';\r\n\t\t\t$modified = 'Register User: '.$this->input->post('first_name').\" \".$this->input->post('last_name');\r\n\t\t\t$data['audit_trail'] = $this->membership_model->audit_trail($page,$action,$previous,$created,$modified);\r\n\t\t// END AUDIT TRAIL\r\n\t\tredirect('login/display/ipos_registration');\r\n\t}", "title": "" }, { "docid": "d98a5f6e53e78d8a689bf294fe5780fb", "score": "0.61241627", "text": "function updateMenteeProfile() {\n\t\t\n\t\techo \"Update Mentee Profile in PHP \\n\";\n\t\tglobal $_USER;\t\n\t\t$user = $_USER['uid'];\n\t\techo $user;\n\t\t$fname = mysql_real_escape_string($_POST['fname']);//$data->fname);\n\t\techo $fname;\n\t\t$lname = mysql_real_escape_string($_POST['lname']);\n\t\t$phone = mysql_real_escape_string($_POST['phone']);\n\t\t$email = mysql_real_escape_string($_POST['email']);\n\t\t$pref_communication = mysql_real_escape_string($_POST['pref_communication']);\n\t\t$gender = mysql_real_escape_string($_POST['gender']);\n\t\t$depth_focus = mysql_real_escape_string($_POST['dfocus']);\n\t\t$depth_focus_other = mysql_real_escape_string($_POST['dfocusother']); \n\t\t$live_before_tech = mysql_real_escape_string($_POST['live_before_tech']);\n\t\t$live_on_campus = $_POST['live_on_campus']; //is number 0 or 1 posting?\n\t\t$first_gen_college_student = $_POST['first_gen_college_student'];\n\t\t$transfer_from_outside = $_POST['transfer_from_outside'];\n\t\t$institution_name = mysql_real_escape_string($_POST['institution_name']);\n\t\t$transfer_from_within = $_POST['transfer_from_within'];\n\t\t$prev_major = mysql_real_escape_string($_POST['prev_major']);\n\t\t$international_student = $_POST['international_student'];\n\t\t$home_country = mysql_real_escape_string($_POST['home_country']);\n\t\t$expec_graduation = mysql_real_escape_string($_POST['expec_graduation']);\n\t\t$other_major = mysql_real_escape_string($_POST['other_major']);\n\t\n\n\t\n\n\t\t$undergrad_research = $_POST['undergrad_research'];\n\t\tif ($_POST['undergrad_research']) {\n\t\t\t$undergrad_research = 1;\n\t\t\t$undergrad_research_desc = $_POST['undergrad_research_desc'];\n\t\t} else {\n\t\t\t$undergrad_research = 0;\n\t\t\t$undergrad_research_desc = null;\n\t\t}\n\n\n\t\t$bme_org1 = null;\n\t\t$bme_org2 = null;\n\t\t$bme_org3 = null;\n\t\t$bme_org4 = null;\n\t\t$bme_org5 = null;\n\t\t$bme_org6 = null;\n\t\t$bme_org7 = null;\n\t\t$bmeOrgs = $_POST['bme_organization'];\n\t\tfor ($i=1; $i <= count($bmeOrgs); $i++) {\n\t\t\t${\"bme_org\" . $i} = $bmeOrgs[$i-1]; //Json of all the organizations $_POST['bme_organization']\n\t\t}\n\t\tif ($_POST['bme_org_other']) {\n\t\t\t$bme_org_other = mysql_real_escape_string($_POST['bme_org_other']);\n\t\t} else {\n\t\t\t$bme_org_other = null;\n\t\t}\n\n\n\t\t$tutor_teacher_program1 = null;\n\t\t$tutor_teacher_program2 = null;\n\t\t$tutor_teacher_program3 = null;\n\t\t$tutor_teacher_program4 = null;\n\t\t$tutor_teacher_program5 = null;\n\t\t$tutor_teacher_program6 = null;\n\t\t$ttProg = $_POST['tutor_teacher_program'];\n\t\tfor ($i=1; $i <= count($ttProg); $i++) {\n\t\t\t${\"tutor_teacher_program\" . $i} = $ttProg[$i-1]; \n\t\t}\n\t\tif ($_POST['tutor_teacher_program_other']) {\n\t\t\t$tutor_teacher_program_other = mysql_real_escape_string($_POST['tutor_teacher_program_other']);\n\t\t} else {\n\t\t\t$tutor_teacher_program_other = null;\n\t\t}\n\n\t\t$bme_academ_exp1 = null;\n\t\t$bme_academ_exp2 = null;\n\t\t$bme_academ_exp3 = null;\n\t\t$bme_academ_exp4 = null;\n\t\t$bmeExp = $_POST['bme_academ_exp'];\n\t\tfor ($i=1; $i <= count($bmeExp); $i++) {\n\t\t\t${\"bme_academ_exp\" . $i} = $bmeExp[$i-1]; \n\t\t}\n\t\tif ($_POST['bme_academ_exp_other']) {\n\t\t\t$bme_academ_exp_other = mysql_real_escape_string($_POST['bme_academ_exp_other']);\n\t\t} else {\n\t\t\t$bme_academ_exp_other = null;\n\t\t}\n\n\t\t$international_experience1 = null;\n\t\t$international_experience2 = null;\n\t\t$international_experience3 = null;\n\t\t$international_experience4 = null;\n\t\t$international_experience5 = null;\n\t\t$internatExp = $_POST['international_experience'];\n\t\tfor ($i=1; $i <= count($internatExp); $i++) {\n\t\t\t${\"international_experience\" . $i} = $internatExp[$i-1]; \n\t\t}\n\t\tif ($_POST['international_experience_other']) {\n\t\t\t$international_experience_other = mysql_real_escape_string($_POST['international_experience_other']);\n\t\t} else {\n\t\t\t$international_experience_other = null;\n\t\t}\n\n\t\t$career_dev_program1 = null;\n\t\t$career_dev_program2 = null;\n\t\t$career_dev_program3 = null;\n\t\t$carDevProg = $_POST['career_dev_program']; \n\t\tfor ($i=1; $i <= count($carDevProg); $i++) {\n\t\t\t${\"career_dev_program\" . $i} = $carDevProg[$i-1]; \n\t\t}\n\t\tif ($_POST['career_dev_program_other']) {\n\t\t\t$career_dev_program_other = mysql_real_escape_string($_POST['career_dev_program_other']);\n\t\t} else {\n\t\t\t$career_dev_program_other = null;\n\t\t}\n\n\t\t$post_grad_plan = mysql_real_escape_string($_POST['post_grad_plan']);\n\t\tif ($_POST['post_grad_plan_desc']) {\n\t\t\t$post_grad_plan_desc = mysql_real_escape_string($_POST['post_grad_plan_desc']);\n\t\t} else {\n\t\t\t$post_grad_plan_desc = null;\n\t\t}\n\n\t\t$personal_hobby = mysql_real_escape_string($_POST['personal_hobby']);\n\n\t\t$userQuery = sprintf(\"UPDATE USER SET last_name='%s', first_name='%s', phone_num='%s', email='%s', pref_communication='%s'\n\t\t\t\t\t\t\t WHERE username='%s'\", $lname, $fname, $phone, $email, $pref_communication, $user);\n\t\t$uResult = getDBRegInserted($userQuery);\n\n\n\t\t$menteeQuery = sprintf(\"UPDATE Mentee SET depth_focus='%s', depth_focus_other='%s',\n\t\t\tfirst_gen_college_student='%u', transfer_from_outside='%u', institution_name='%s',\n\t\t\ttransfer_from_within='%u', prev_major='%s', international_student='%u', expec_graduation='%s', other_major='%s', \n\t\t\tundergrad_research='%u', undergrad_research_desc='%s', post_grad_plan='%s', post_grad_plan_desc='%s', personal_hobby='%s'\n\t\t\tWHERE username='%s'\", \n\t\t\t$depth_focus, $depth_focus_other,\n\t\t\t$first_gen_college_student, $transfer_from_outside, $institution_name, \n\t\t\t$transfer_from_within, $prev_major, $international_student, $expec_graduation, $other_major,\n\t\t\t$undergrad_research, $undergrad_research_desc, $post_grad_plan, $post_grad_plan_desc, $personal_hobby, $user);\n\t\t$mResult = getDBRegInserted($menteeQuery);\n\n\t\t$bTrack = $_POST['breadth_track'];\n\t\t//delete first\n\t\t$bTrackDelQuery = sprintf(\"DELETE FROM Mentee_Breadth_Track WHERE username='%s'\",$user);\n\t\t$bTrackDelResult = getDBRegInserted($bTrackDelQuery);\n\t\tforeach ($bTrack as $key => $value) {\n\t\t\t$breadth_track = $value['name'];\n\t\t\t$breadth_track_desc = $value['desc'];\n\t\t\t$bTrackQuery = sprintf(\"INSERT INTO Mentee_Breadth_Track(username, breadth_track, breadth_track_desc) VALUES ('%s', '%s', '%s')\",\n\t\t\t$user, $breadth_track, $breadth_track_desc);\n\t\t\t$bTrackResult = getDBRegInserted($bTrackQuery);\n\t\t}\n\n\t\tif ($_POST['bme_organization']) {\n\t\t\t$bmeOrgCheckQuery = sprintf(\"SELECT count(*) FROM Mentee_BME_Organization WHERE username='%s'\",$user);\n\t\t\t$bmeOrgCheckResult = getDBResultRecord($bmeOrgCheckQuery);\n\t\t\t$bmeOrgQuery = sprintf(\"\");\n\t\t\tif($bmeOrgCheckResult['count(*)'] >= 1) {\n\t\t\t\t$bmeOrgQuery = sprintf(\"UPDATE Mentee_BME_Organization SET bme_org1='%s', bme_org2='%s', bme_org3='%s',\n\t\t\t\t\tbme_org4='%s', bme_org5='%s', bme_org6='%s', bme_org7='%s', bme_org_other='%s' WHERE username='%s'\",\n\t\t\t\t\t$bme_org1, $bme_org2, $bme_org3, $bme_org4, $bme_org5, $bme_org6, $bme_org7, $bme_org_other, $user);\n\t\t\t} else {\n\t\t\t\t$bmeOrgQuery = sprintf(\"INSERT INTO Mentee_BME_Organization(username, bme_org1, bme_org2, bme_org3,\n\t\t\t\t\tbme_org4, bme_org5, bme_org6, bme_org7, bme_org_other) VALUES ('%s', '%s', '%s' , '%s', '%s', '%s', '%s', '%s', '%s')\",\n\t\t\t\t\t$user, $bme_org1, $bme_org2, $bme_org3, $bme_org4, $bme_org5, $bme_org6, $bme_org7, $bme_org_other);\n\t\t\t}\t\t\t\n\t\t\t$bmeOrgResult = getDBRegInserted($bmeOrgQuery);\n\t\t}\n\n\n\t\tif ($_POST['tutor_teacher_program']) {\n\t\t\t$ttProgCheckQuery = sprintf(\"SELECT count(*) FROM Mentee_Tutor_Teacher_Program WHERE username='%s'\",$user);\n\t\t\t$ttProgCheckResult = getDBResultRecord($ttProgCheckQuery);\n\t\t\t$ttProgQuery = sprintf(\"\");\n\t\t\tif($ttProgCheckResult['count(*)'] >= 1) {\n\t\t\t\t$ttProgQuery = sprintf(\"UPDATE Mentee_Tutor_Teacher_Program SET tutor_teacher_program1='%s', tutor_teacher_program2='%s', \n\t\t\t\t\ttutor_teacher_program3='%s', tutor_teacher_program4='%s', tutor_teacher_program5='%s', tutor_teacher_program6='%s', tutor_teacher_program_other='%s' WHERE username='%s'\", \n\t\t\t\t\t$tutor_teacher_program1, $tutor_teacher_program2, $tutor_teacher_program3, $tutor_teacher_program4, $tutor_teacher_program5, $tutor_teacher_program6, $tutor_teacher_program_other, $user);\n\t\t\t} else {\n\t\t\t\t$ttProgQuery = sprintf(\"INSERT INTO Mentee_Tutor_Teacher_Program(username, tutor_teacher_program1, tutor_teacher_program2, \n\t\t\t\t\t\ttutor_teacher_program3, tutor_teacher_program4, tutor_teacher_program5, tutor_teacher_program6, tutor_teacher_program_other)\n\t\t\t\t\t VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')\", $user, $tutor_teacher_program1, $tutor_teacher_program2, \n\t\t\t\t\t $tutor_teacher_program3, $tutor_teacher_program4, $tutor_teacher_program5, $tutor_teacher_program6, $tutor_teacher_program_other);\n\t\t\t}\t\n\t\t\t$ttProgResult = getDBRegInserted($ttProgQuery);\n\t\t}\n\n\t\tif ($_POST['bme_academ_exp']) {\n\t\t\t$bmeCheckQuery = sprintf(\"SELECT count(*) FROM Mentee_BME_Academic_Experience WHERE username='%s'\",$user);\n\t\t\t$bmeCheckResult = getDBResultRecord($bmeCheckQuery);\n\t\t\t$bmeQuery = sprintf(\"\");\n\t\t\tif($bmeCheckResult['count(*)'] >= 1) {\n\t\t\t\t$bmeQuery = sprintf(\"UPDATE Mentee_BME_Academic_Experience SET bme_academ_exp1='%s', bme_academ_exp2='%s',\n\t\t\t\t\tbme_academ_exp3='%s', bme_academ_exp4='%s', bme_academ_exp_other='%s' WHERE username='%s'\",\n\t\t\t\t\t$bme_academ_exp1, $bme_academ_exp2, $bme_academ_exp3, $bme_academ_exp4, $bme_academ_exp_other, $user);\n\t\t\t} else {\n\t\t\t\t$bmeQuery = sprintf(\"INSERT INTO Mentee_BME_Academic_Experience(username, bme_academ_exp1, bme_academ_exp2,\n\t\t\t\t\tbme_academ_exp3, bme_academ_exp4, bme_academ_exp_other) VALUES ('%s', '%s', '%s', '%s', '%s', '%s')\",\n\t\t\t\t\t$user, $bme_academ_exp1, $bme_academ_exp2, $bme_academ_exp3, $bme_academ_exp4, $bme_academ_exp_other);\n\t\t\t}\n\t\t\t$bmeResult = getDBRegInserted($bmeQuery);\n\t\t}\n\n\t\tif ($_POST['international_experience']) {\n\t\t\t$interCheckQuery = sprintf(\"SELECT count(*) FROM Mentee_International_Experience WHERE username='%s'\",$user);\n\t\t\t$interCheckResult = getDBResultRecord($interCheckQuery);\n\t\t\t$interQuery = sprintf(\"\");\n\t\t\tif($interCheckResult['count(*)'] >= 1) {\n\t\t\t\t$interQuery = sprintf(\"UPDATE Mentee_International_Experience SET international_experience1='%s', international_experience2='%s', \n\t\t\t\t\tinternational_experience3='%s', international_experience4='%s', international_experience5='%s', international_experience_other='%s' WHERE username='%s'\", \n\t\t\t\t\t$international_experience1, $international_experience2,\n\t\t\t\t\t$international_experience3, $international_experience4, $international_experience5, $international_experience_other, $user);\n\t\t\t} else {\n\t\t\t\t$interQuery = sprintf(\"INSERT INTO Mentee_International_Experience(username, international_experience1, international_experience2, \n\t\t\t\t\t\tinternational_experience3, international_experience4, international_experience5, international_experience_other)\n\t\t\t\t\tVALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s')\", $user, $international_experience1, $international_experience2,\n\t\t\t\t\t$international_experience3, $international_experience4, $international_experience5, $international_experience_other);\n\t\t\t}\n\t\t\t$interResults = getDBRegInserted($interQuery);\n\t\t}\n\n\t\tif ($_POST['career_dev_program']) {\n\t\t\t$careerCheckQuery = sprintf(\"SELECT count(*) FROM Mentee_Career_Dev_Program WHERE username='%s'\",$user);\n\t\t\t$careerCheckResult = getDBResultRecord($careerCheckQuery);\n\t\t\t$careerQuery = sprintf(\"\");\n\t\t\tif($careerCheckResult['count(*)'] >= 1) {\n\t\t\t\t$careerQuery = sprintf(\"UPDATE Mentee_Career_Dev_Program SET career_dev_program1='%s',\n\t\t\t\t\tcareer_dev_program2='%s', career_dev_program3='%s', career_dev_program_other='%s' WHERE username='%s'\",\n\t\t\t\t\t $career_dev_program1, $career_dev_program2, $career_dev_program3, $career_dev_program_other, $user);\n\t\t\t} else {\n\t\t\t\t$careerQuery = sprintf(\"INSERT INTO Mentee_Career_Dev_Program(username, career_dev_program1,\n\t\t\t\t\tcareer_dev_program2, career_dev_program3, career_dev_program_other) VALUES ('%s', '%s', '%s','%s', '%s')\",\n\t\t\t\t\t$user, $career_dev_program1, $career_dev_program2, $career_dev_program3, $career_dev_program_other);\n\t\t\t}\n\t\t\t$careerResults = getDBRegInserted($careerQuery);\n\t\t}\n\n\n\t\t\n\n\t\t// //header(\"Content-type: application/json\");\n\t\t// // print_r($json);\n\t\t// echo json_encode($uresult+$mresult);\n\t\t\n\t}", "title": "" }, { "docid": "bfaeb7d577f865632f4daa80736e3b28", "score": "0.6123584", "text": "public function edit(Profile $profile)\r\n {\r\n //\r\n }", "title": "" }, { "docid": "8c87abd188512eef4c61aa3d88c5e40f", "score": "0.6121471", "text": "public function update($ministryMember);", "title": "" }, { "docid": "37add37b6f13efe545ef298ed3c1961f", "score": "0.6119135", "text": "public function testProfileUpdate()\n {\n }", "title": "" }, { "docid": "fef1947c3a251430fc8dc811329871fa", "score": "0.6114179", "text": "public function fillProfile()\r\n {\r\n if (isset($_POST['action']) && $_POST['action'] == 'Update') {\r\n if (LoginCore::isLoggedIn()) {\r\n\r\n $handler = ConnectionDatabase();\r\n\r\n $sqlGetPersonInfo = \"SELECT first_name, last_name, status, description FROM person WHERE person_id = :person_id\";\r\n\r\n $query = $handler->prepare($sqlGetPersonInfo);\r\n $query->bindValue(':person_id', $_SESSION['person_id']);\r\n $query->execute();\r\n $number_of_rows = $query->rowCount();\r\n\r\n $personData = $query->fetchAll(PDO::FETCH_ASSOC);\r\n\r\n if ($number_of_rows === 1) {\r\n\r\n foreach ($personData as $data) {\r\n $this->view('myAccount/updateProfile', ['$personData' => $data]);\r\n }\r\n } else {\r\n echo \"You have more than 1 user with the same username/email\";\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "ead0c36e34722fcecd387830e288cb27", "score": "0.61091447", "text": "function updateProfile($options, $format = 'xml') {\r\n\t\treturn $this->apiCall('account/update_profile', 'post', $format, array());\r\n\t}", "title": "" }, { "docid": "f05f23eb5e6db8f7ff87be646361f31f", "score": "0.61058205", "text": "function actionRPS_GF_update_profile($entry, $form)\n{\n global $wpdb;\n\n // make sure that the user is logged in\n // we shouldn't get here because the form should check for logged in\n // users...\n if (!is_user_logged_in()) {\n wp_redirect(home_url());\n exit();\n }\n $_user_id = get_current_user_id();\n $_user = new stdClass();\n $_user->ID = (int) $_user_id;\n $_userdata = get_userdata($_user_id);\n $_user->user_login = esc_sql($_userdata->user_login);\n\n $gf_fields = rps_GF_get_profile_fields();\n\n $_user->first_name = sanitize_text_field($entry[$gf_fields['first_name']['gf_index']]);\n $_user->last_name = sanitize_text_field($entry[$gf_fields['last_name']['gf_index']]);\n $_user->nickname = sanitize_text_field($entry[$gf_fields['nickname']['gf_index']]);\n $_user->display_name = sanitize_text_field($entry[$gf_fields['display_name']['gf_index']]);\n\n if (empty($entry[$gf_fields['website']['gf_index']]) || $entry[$gf_fields['website']['gf_index']] == \"http://\") {\n $_user->user_url = '';\n } else {\n $_user->user_url = esc_url_raw($entry[$gf_fields['website']['gf_index']]);\n $_user->user_url = preg_match('/^(https?):/is', $_user->user_url) ? $_user->user_url : 'http://' .\n $_user->user_url;\n }\n\n if (empty($entry[$gf_fields['facebook']['gf_index']]) || $entry[$gf_fields['facebook']['gf_index']] == \"http://\") {\n $_user->facebook = '';\n } else {\n $_user->facebook = esc_url_raw($entry[$gf_fields['facebook']['gf_index']]);\n $_user->facebook = preg_match('/^(https?):/is', $_user->facebook) ? $_user->facebook : 'http://' .\n $_user->facebook;\n }\n if (empty($entry[$gf_fields['flickr']['gf_index']]) || $entry[$gf_fields['flickr']['gf_index']] == \"http://\") {\n $_user->flickr = '';\n } else {\n $_user->flickr = esc_url_raw($entry[$gf_fields['flickr']['gf_index']]);\n $_user->flickr = preg_match('/^(https?):/is', $_user->flickr) ? $_user->flickr : 'http://' . $_user->flickr;\n }\n wp_update_user($_user);\n}", "title": "" }, { "docid": "97bf739bd1e32749f99a4e646d8ee951", "score": "0.6105385", "text": "public function update_profile(){\n $address = mysqli_real_escape_string($this->conn,$this->address);\n $query=\"update `\".$this->tablename.\"` set `fullname`='\".$this->fullname.\"'\n\t\t,email='\".$this->email.\"'\n ,`phone`='\".$this->phone.\"'\n ,`address`='\".$address.\"'\n ,`city`='\".$this->city.\"'\n ,`state`='\".$this->state.\"'\n ,`zip`='\".$this->zip.\"'\n ,`country`='\".$this->country.\"',`password`='\".$this->password.\"'\n where `id`='\".$this->id.\"' \";\n $result=mysqli_query($this->conn,$query);\n return $result;\n }", "title": "" }, { "docid": "1f49adb0e72adc43900a2384c95db45e", "score": "0.6095091", "text": "public function update(Request $request, profile $profile)\n {\n //\n }", "title": "" }, { "docid": "93ebac340b9330991549253e2a63c3f2", "score": "0.60913444", "text": "public function update_data( $post_id, \\WP_Post $post ) {\n\n\t\t$user_membership = wc_memberships_get_user_membership( $post );\n\n\t\tif ( ! $user_membership ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$profile_fields = Framework\\SV_WC_Helper::get_posted_value( '_profile_fields', [] );\n\n\t\tforeach ( Profile_Fields_Handler::get_profile_field_definitions( [ 'membership_plan_ids' => $user_membership->get_plan_id() ] ) as $profile_field_definition ) {\n\n\t\t\t$profile_field_slug = $profile_field_definition->get_slug( 'edit' );\n\n\t\t\tif ( isset( $profile_fields[ $profile_field_slug ] ) ) {\n\n\t\t\t\tif ( $profile_field_definition->is_type( Profile_Fields_Handler::TYPE_CHECKBOX ) ) {\n\t\t\t\t\t$value = wc_string_to_bool( $profile_fields[ $profile_field_slug ] );\n\t\t\t\t} else {\n\t\t\t\t\t$value = $profile_fields[ $profile_field_slug ];\n\t\t\t\t}\n\n\t\t\t\ttry {\n\n\t\t\t\t\t$profile_field = $user_membership->get_profile_field( $profile_field_slug ) ?: new Profile_Field();\n\n\t\t\t\t\t$profile_field->set_user_id( $user_membership->get_user_id() );\n\t\t\t\t\t$profile_field->set_slug( $profile_field_slug );\n\t\t\t\t\t$profile_field->set_value( $value );\n\t\t\t\t\t$profile_field->save();\n\n\t\t\t\t} catch ( \\Exception $e ) {\n\n\t\t\t\t\twc_memberships()->get_admin_instance()->get_message_handler()->add_error( $e->getMessage() );\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\t$user_membership->delete_profile_field( $profile_field_slug );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a5d8314bf032e81d8bde02459a0ef7d3", "score": "0.60900855", "text": "public function testProfileEdit()\n {\n $user = $this->makeAuthWebUser();\n\n $this->visit('users/'.$user->id.'/edit')\n ->type('Jean-Paul', 'first_name')\n ->type('Beaubier', 'last_name')\n ->press('Save')\n ->seePageIs('/');\n\n $updatedUser = User::find($user->id);\n\n $this->assertEquals('Jean-Paul', $updatedUser->first_name);\n $this->assertEquals('Beaubier', $updatedUser->last_name);\n }", "title": "" }, { "docid": "2afed3715766320e306e0c22bb98421d", "score": "0.60894036", "text": "function updateProfileName($conn, $uid, $firstName, $lastName){\n\t$sql = 'UPDATE profiles SET firstName = ?, lastName = ? WHERE userid = ?;';\n\t$stmt = $conn->prepare($sql);\n\n\t$stmt->bind_param('ssi', $firstName, $lastName, $uid);\n\t$stmt->execute();\n\t$stmt->close();\n}", "title": "" }, { "docid": "68e8aff546c606ed1b19fc4e880ca5d7", "score": "0.6079952", "text": "public function update_user_profile($username, $first_name, $last_name, $email, $organization, $address,\n $country, $telephone, $mobile, $im, $url)\n {\n // TODO: Implement update_user_profile() method.\n }", "title": "" }, { "docid": "e346fe34a912b609684f281e236c84bc", "score": "0.60793346", "text": "public function overwritesFor($member);", "title": "" }, { "docid": "1d2d60945bc4e0c72b0a2e33347e289d", "score": "0.60707283", "text": "function memberUpdate($member)\r\n {\r\n return false;\r\n }", "title": "" }, { "docid": "015dada8a6791ba31d8ba15f46281ae5", "score": "0.6062876", "text": "function brady_save_extra_user_profile_fields( $user_id ) {\n if ( !current_user_can( 'edit_user', $user_id ) ) { return false; }\n update_user_meta( $user_id, 'facility_name', $_POST['facility_name'] );\n}", "title": "" }, { "docid": "854adaa0b23dde8b191e990699d2d660", "score": "0.6057799", "text": "public function edit(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "854adaa0b23dde8b191e990699d2d660", "score": "0.6057799", "text": "public function edit(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "854adaa0b23dde8b191e990699d2d660", "score": "0.6057799", "text": "public function edit(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "854adaa0b23dde8b191e990699d2d660", "score": "0.6057799", "text": "public function edit(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "854adaa0b23dde8b191e990699d2d660", "score": "0.6057799", "text": "public function edit(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "854adaa0b23dde8b191e990699d2d660", "score": "0.6057799", "text": "public function edit(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "854adaa0b23dde8b191e990699d2d660", "score": "0.6057799", "text": "public function edit(Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "fef9248fe56b311f5ba7ff39ea276919", "score": "0.6051612", "text": "public function updateUserInfo()\n {\n }", "title": "" }, { "docid": "bfe3d07118b8b1d71b1b3269844ab312", "score": "0.60451674", "text": "public function updateProfile($name, $paypalAccount, $age, $country, $city, $singer, $producer , $profile_id)\n\t {\t\n\t\t$data = array(\"$name\", \"$singer\", \"$producer\", \"$paypalAccount\", \"$age\", \"$country\", \"$city\", \"$profile_id\");\n\t\t$connection = new pdoconn();\n\t\t$STH = $connection->DBH->prepare(\"update profiles set name = ? , singer = ? , music_producer = ? , paypalAccount = ? , age = ?, country = ? , city = ? where profile_id = ?\");\n\t\tif ($STH->execute($data))\n\t\t{\n\n\t\t$this->name = $name;\n\t\t$this->paypalAccount = $paypalAccount; \n\t\t$this->age = $age;\n\t\t$this->country = $country;\n\t\t$this->city = $city;\n\t\t$this->singer = $singer;\n\t\t$this->producer = $producer;\n\t\t//$this->profileId = $profile_id;\n\t\treturn $this->profileId;\n\t\t}\t\t \n\t }", "title": "" }, { "docid": "b14a03217c089b2005ca3d29c3f0ef92", "score": "0.6044607", "text": "public function update(Requests\\StoreProfile $request)\n {\n unset($request['_token']);\n unset($request['name']);\n unset($request['email']);\n $profile = Profile::where('owned_by', Auth::user()->id)\n ->update($request->all());\n }", "title": "" }, { "docid": "07784f33d56980c83d15b7cf58dc52b1", "score": "0.6039888", "text": "public function profile(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|min:3'\n ]);\n\n auth()->user()->update($request->only(['name']));\n\n return back()->withInput()->with('status', 'Your profile has been updated.');\n }", "title": "" }, { "docid": "57659378378c9923c262d71c4b447373", "score": "0.60343325", "text": "public function profile_update(){\n\t\tif(isset(apache_request_headers()['Authorization'])) {\n\t\t//$data = $_POST;\n $data = json_decode(file_get_contents('php://input'), true);\n\t\t$auth = apache_request_headers()['Authorization']; \n $usr_id = $this->App_model->getUser_from_Token($auth);\n\t\t if(isset($data['preferences']) && !empty($data['preferences'])){\n\t\t\t$result = $this->preferences($data,$usr_id);\n\t\t\t if($result == \"success\") {\n\t\t\t\t\t $final_message = $this->simple_return(\"success\",\"\",\"\");\n\t\t\t\t } else {\n\t\t\t\t\t $final_message = $this->simple_return(\"error\",\"Invalid data\",\"Invalid data\");\n\t\t\t\t }\n\t\t\t\t return $final_message; \n\t\t }else{\n\t\t\t$result = $this->App_model->profile_update($data,$usr_id);\n if($result == \"success\") {\n $final_message = $this->simple_return(\"success\",\"\",\"\");\n } else {\n $final_message = $this->simple_return(\"error\",\"Invalid data\",\"Invalid data\");\n }\n return $final_message; \n\t\t }\n } else { $this->simple_return(\"error\",\"Un Authorized Access\",\"Un Authorized Access\"); }\n\t}", "title": "" }, { "docid": "526424e9d4991196e1439c89374e6602", "score": "0.60342526", "text": "function update_info()\n\t{\n\t\textract($GLOBALS['CLASSES']);\n\t\t\n\t\tforeach($_SESSION['userdata'] as $k=>&$v) $v = $this->$k;\n\t\t\n\t\t$cache = $_SESSION['userdata'];\n\t\t$cache['other'] = serialize($cache['other']);\n\t\t\n\t\tcall_user_func_array( array(&$SQL, 'qw'), array_merge(\n\t\t\n\t\t\tarray('UPDATE `users` SET `'.implode('`=?,`', array_keys($cache)).'`=? WHERE `id` = ?' ),\n\t\t\t\n\t\t\tarray_values($cache),\n\t\t\t\n\t\t\tarray($this->id)\n\t\t\n\t\t) );\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "90b5d8cf340653a8ff0fb2aca86cebf3", "score": "0.60301906", "text": "function woo_supportpress_process_edit_profile_form() {\n\t\n\tglobal $posted, $wpdb;\n\n\trequire_once(ABSPATH . 'wp-admin/includes/user.php');\n\t\n\tcheck_admin_referer('update_profile_' . get_current_user_id());\n\t\n\t$current_user = wp_get_current_user();\n\t\n\tif (!empty($_POST['nickname'])) :\n\t\t$_POST['display_name'] = sanitize_user($_POST['nickname']);\n\telse :\n\t\t$_POST['display_name'] = sanitize_user($current_user->user_login);\n\tendif;\n\t\n\t$errors = edit_user(get_current_user_id());\n\t\n\tif ( is_wp_error( $errors ) ) return $errors;\n\t\n\tdo_action('personal_options_update', get_current_user_id());\n\t\n // Custom profile fields\n update_user_meta(get_current_user_id(), 'twitter', $_POST['twitter']);\n \n\tif (isset($_POST['new_ticket_notification']) && $_POST['new_ticket_notification']) update_user_meta(get_current_user_id(), 'new_ticket_notification', 'yes'); else update_user_meta(get_current_user_id(), 'new_ticket_notification', 'no');\n\t\n\tif (isset($_POST['new_message_notification']) && $_POST['new_message_notification']) update_user_meta(get_current_user_id(), 'new_message_notification', 'yes'); else update_user_meta(get_current_user_id(), 'new_message_notification', 'no');\n\t\n\tif (isset($_POST['watched_item_notification']) && $_POST['watched_item_notification']) update_user_meta(get_current_user_id(), 'watched_item_notification', 'yes'); else update_user_meta(get_current_user_id(), 'watched_item_notification', 'no');\n\n\t/* Successful, return */\n\treturn;\n}", "title": "" }, { "docid": "d0b76e5e5de69b491b290499bf77bb02", "score": "0.6018469", "text": "function update_member_profile_data($data){\n \n$update_sql_member = \"UPDATE member_tbl\n SET member_title = '\".$data['member_title'].\"',\n member_pnr = '\".$data['member_pnr'].\"',\n member_first_name = '\".$data['member_first_name'].\"',\n member_last_name = '\".$data['member_last_name'].\"',\n member_user_name = '\".$data['member_user_name'].\"',\n member_email = '\".$data['member_email'].\"',\n member_cell_phone = '\".$data['member_cell_phone'].\"',\n member_home_phone = '\".$data['member_home_phone'].\"',\n member_address = '\".$data['member_address'].\"'\n WHERE member_id= '\".$data['member_id'].\"'\";\n mysql_query($update_sql_member);\nreturn TRUE; \n \n }", "title": "" }, { "docid": "171bdb824755e70f47b29b3661325042", "score": "0.6016979", "text": "public function can_update_my_profile()\n {\n $this->actingAs($this->user);\n $data=[\n 'firstName' => $this->faker->firstName,\n 'lastName' => $this->faker->lastName,\n 'username' => $this->faker->unique()->username,\n 'email' => $this->faker->unique()->safeEmail,\n ];\n $response = $this->postJson(route('myProfile.update'), $data);\n $response->assertStatus(200);\n $this->assertDatabaseHas('users',$data);\n $this->get(route('myProfile.index'))\n ->assertSee($data['firstName'])\n ->assertSee($data['lastName']);\n }", "title": "" }, { "docid": "4a17d06c194fc7b3d7c0c6a197f0801e", "score": "0.60136575", "text": "public function update(Request $request, Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "4a17d06c194fc7b3d7c0c6a197f0801e", "score": "0.60136575", "text": "public function update(Request $request, Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "4a17d06c194fc7b3d7c0c6a197f0801e", "score": "0.60136575", "text": "public function update(Request $request, Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "4a17d06c194fc7b3d7c0c6a197f0801e", "score": "0.60136575", "text": "public function update(Request $request, Profile $profile)\n {\n //\n }", "title": "" }, { "docid": "3243dd859ba29735a98254be9ca277e7", "score": "0.6005163", "text": "function save_update_profile($user_id, $old_user_data) {\r\n global $wpi_settings;\r\n\r\n if (empty($user_id) || $user_id == 0) {\r\n return false;\r\n }\r\n\r\n $custom_user_information = apply_filters('wpi_user_information', $wpi_settings['user_meta']['custom']);\r\n $user_information = array_merge($wpi_settings['user_meta']['required'], $custom_user_information);\r\n\r\n // On Adding/Editing Invoice user data exists in ['wpi_invoice']['user_data']\r\n $data = !empty($_POST['wpi_invoice']['user_data']) ? $_POST['wpi_invoice']['user_data'] : $_POST;\r\n\r\n if (!is_array($data)) {\r\n return false;\r\n }\r\n\r\n foreach ($user_information as $field_id => $field_name) {\r\n if (isset($data[$field_id])) {\r\n update_user_meta($user_id, $field_id, $data[$field_id]);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3f0d97ca533143cb0528dc411137706d", "score": "0.6000527", "text": "public function actionEdit()\n {\n $this->active = 'edit';\n $model = $this->loadUser();\n $profile=$model->profile;\n\n // ajax validator\n if(isset($_POST['ajax']) && $_POST['ajax']==='profile-form')\n {\n echo UActiveForm::validate(array($model,$profile));\n Yii::app()->end();\n }\n\n if(isset($_POST['User']))\n {\n $model->attributes=$_POST['User'];\n $profile->attributes=$_POST['Profile'];\n if($model->validate()&&$profile->validate()) {\n $model->save();\n $profile->save();\n Yii::app()->user->updateSession();\n Yii::app()->user->setFlash('profileMessage',UserModule::t(\"Changes is saved.\"));\n $this->redirect(array('/user/profile'));\n } else $profile->validate();\n }\n\n $this->render('edit',array(\n 'model'=>$model,\n 'profile'=>$profile,\n ));\n }", "title": "" } ]
2cf0317244cdbd2c65a605ab4ab08474
Function to check asset availability
[ { "docid": "580e3a70b44937481b4828c7fe407678", "score": "0.6288607", "text": "public function isAvailableAsset($asset_ids, $timeDetails)\n {\n return Reservation::whereIn('asset_id', $asset_ids)\n ->validateTime((object) $timeDetails)\n ->alreadyApproved()\n ->doesntExist();\n }", "title": "" } ]
[ { "docid": "8d3a6f827f92958b2e50f3eb9081a3d0", "score": "0.76883703", "text": "function checkRegisteredAsset() {}", "title": "" }, { "docid": "7d222bf44e06a8f0b92dd888301d4f71", "score": "0.73576105", "text": "public function check_availability();", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.657421", "text": "public function isAvailable();", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.657421", "text": "public function isAvailable();", "title": "" }, { "docid": "14e6b1e8dc81159386197f60455026b6", "score": "0.657421", "text": "public function isAvailable();", "title": "" }, { "docid": "c0b8f51b61f78adbe585bb0866568e25", "score": "0.6566424", "text": "public abstract function isAvailable();", "title": "" }, { "docid": "5bf3c5423faaf9eb5fda840803d4b603", "score": "0.6543217", "text": "abstract public function isAvailable();", "title": "" }, { "docid": "abc37fa034f14cfc543961f24c2ad23b", "score": "0.6535548", "text": "abstract function isAvailable();", "title": "" }, { "docid": "6e976d57d392b39847a16ff18e9dcf5c", "score": "0.6513714", "text": "function _is_loadable($asset)\n\t{\n\t\t// Check no asset with the same name is already loaded\t\t\n\t\tif(in_array($asset,$this->assets_to_load))\n\t\t{\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\t// If not lets see if we have an asset with that name in our list\n\t\tforeach($this->assets as $name => $values)\n\t\t{\n\t\t\tif($asset == $name)\n\t\t\t{\n\t\t\t\t//TODO: Is the asset file findable?\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Can't find asset\n\t\tlog_message('error','BackendPro->Bep_Assets->_is_loadable : Cannot find any asset with given name : ' . $asset);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0c03948dccbd509173a16754d9402494", "score": "0.64011496", "text": "public function checkResource();", "title": "" }, { "docid": "213f791beb545cef7538627099d563c0", "score": "0.63566285", "text": "function checkIfAssetExists($assetID){\n\t$serverurl=$this->appContext->getMasterURL().\"/applications/\".$this->appContext->getProject().\"/assets/\".$assetID;\n\t\n\t$assetArray = $this->cmDataManager->getDataForContext($serverurl, $this->appContext->getAPIKey(),\"\");\n\tif($assetArray == false){\n\t\treturn false;\n\t}\n\t\n\t$assetArray = json_decode($assetArray);\n\t$assetdata=$assetArray->data;\n\tif($assetdata == null){\n\t\t$this->logHelper->log(INFO,\"Asset does not exist\");\n\t\treturn false;\n\t}\n\treturn true;\n}", "title": "" }, { "docid": "9b7ab1edadad00d5f323fd230dc1c285", "score": "0.6349146", "text": "private static function checkAvailability($url)\r\n {\r\n\r\n $headers = @get_headers($url, 1);\r\n if(!$headers) throw new Videopian_Exception(Videopian_Exception::INFO_FILE_UNAVAILABLE);\r\n \r\n for($i = 0; $i < 20; $i++)\r\n {\r\n if(array_key_exists($i, $headers)) $http_status = $headers[$i];\r\n else break;\r\n }\r\n $http_status_code = intval(substr($http_status, 9, 3));\r\n if ($http_status_code > 300)\r\n {\r\n throw new Videopian_Exception(Videopian_Exception::INFO_FILE_UNAVAILABLE . \" ($http_status)\");\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "755ad71b9c540b5d53a32c0b26f8d865", "score": "0.63100684", "text": "public function isAvailabile()\n {\n return $this->availability === 'Available' ?? false;\n }", "title": "" }, { "docid": "544114ce0a6bb79b0740fa25a211bdb9", "score": "0.6243922", "text": "abstract public function isAvailable(): bool;", "title": "" }, { "docid": "ea728538d373cef28be5a3c977c65d1f", "score": "0.6161147", "text": "public static function isAvailable()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7c874e0f9a6cd35172077940d1450a32", "score": "0.6153623", "text": "public static function isAvailable()\n {\n return true;\n }", "title": "" }, { "docid": "1639596e6b31b5b13172ae9b71b8df47", "score": "0.61114323", "text": "public static function is_available() {\n return true;\n }", "title": "" }, { "docid": "e4295ae41ac50e6c0437654f35023a79", "score": "0.60307384", "text": "public function isAvailable()\n {\n return true;\n }", "title": "" }, { "docid": "783a87fe9d12c4690fb3d78e0084cee9", "score": "0.60118604", "text": "public function isAvailable()\n {\n \treturn $this->status === Product::AVAILABLE_PRODUCT;\n }", "title": "" }, { "docid": "510884c36d2b404dc266b17a92fc11b5", "score": "0.60066235", "text": "public function isAvailable(): bool\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "59a7e5930ca2545ceda57ea34af907cb", "score": "0.59677744", "text": "function is_available() {\n global $CFG;\n\n //we need the curriculum directory\n if (!file_exists($CFG->dirroot.'/curriculum/config.php')) {\n return false;\n }\n\n //we also need the curr_admin block\n if (!record_exists('block', 'name', 'curr_admin')) {\n return false;\n }\n\n //everything needed is present\n return true;\n }", "title": "" }, { "docid": "1e37f0ad02166cb8ebe84746701128c6", "score": "0.5932598", "text": "public function hasImage()\n {\n return file_exists($this->getPath(\"_org\"));\n }", "title": "" }, { "docid": "e0b5712c92cc1aa5668a27bab12c57c8", "score": "0.5921919", "text": "public static function getAvailable(){}", "title": "" }, { "docid": "fe3dce7b0902913584e42e36be559899", "score": "0.59171563", "text": "public static function isAssetsInstalled()\n\t{\n\t\treturn array_key_exists('assets', ee('Addon')->installed());\n\t}", "title": "" }, { "docid": "91143d82327b2045718d2bf9f3b3aaef", "score": "0.5902835", "text": "public function hasAssets ()\n {\n $this->lazyLoad();\n\n return $this->has_assets;\n }", "title": "" }, { "docid": "19ce15c88917bacae53de43a4928c2c6", "score": "0.58741826", "text": "public function isAvailable()\n {\n return $this->availability;\n }", "title": "" }, { "docid": "7b75f6af367447300af63b9bf90ba188", "score": "0.58132386", "text": "protected function isAvailable()\n {\n exec(\"$this->binary --version\", $out, $result);\n return $result === 0;\n }", "title": "" }, { "docid": "4ecd654e8a372f54bc2bff69486b549c", "score": "0.58130294", "text": "function available();", "title": "" }, { "docid": "3e7388295b92dc6da23bd8299bb592cd", "score": "0.58055866", "text": "public function Is_Service_Available() {\n\t\t# If the xml file containing the exchange \n\t\t# rates does not exist create it\n\t\tif (!$this->Local_Rates_Exist()) { //True if the rates xml file does not exist\n\t\t\tif (!$this->Create_Local_Rates_File()) { //Attempt to create a new local xml file to store currency rates\n\t\t\t\treturn false;\n\t\t\t} //End of if statement\n\t\t} //End of if statement\n\n\t\t# Attempt to set the local variable to store rate data from the rates xml file. If this fails return false\n\t\t$Dom = new DOMDocument(); //Creates a new DOM document\n\t\tif ($Dom->load(LOCAL_EXCHANGE_RATES_XML_URI)) {\n\t\t\t$this->Currency_Rates_XML = $Dom->saveXML();\n\t\t} else {\n\t\t\treturn false;\n\t\t} //End of if else\n\n\t\t# If the xml file containing the currency info does not exist or is unavailable return false\n\t\tif ($this->Currency_Info_Exist()) { //True if the currency info xml file is available\n\t\t\treturn true;\n\t\t} //End of if statement\n\t\treturn false;\n }", "title": "" }, { "docid": "38da39c55f5bc86feff9f231f1ce39bf", "score": "0.5789675", "text": "public function isReady();", "title": "" }, { "docid": "66522592d18eb361ab580f3ced8477ab", "score": "0.5787654", "text": "public function isAvailable($currency);", "title": "" }, { "docid": "4c89ce6022af6d2f35389f217fd5ef0c", "score": "0.57806754", "text": "public function checkCache() {\n\n $check = false;\n if ($this->get('compressed.' . $this->hash . '.assets') && self::$reset == false) {\n foreach ($this->get('compressed.' . $this->hash . '.assets') as $type => $data) {\n $file = array_shift($data);\n if (isset($file['path']) && @file_exists($file['path'])) {\n $check = true;\n }\n\n // Bail out if one of the cached file is missing\n else {\n $check = false;\n break;\n }\n }\n }\n\n return $check;\n }", "title": "" }, { "docid": "bd2ba997e1ba4ae7ed0653b2db3f9374", "score": "0.5778073", "text": "public function getIsAvailable()\n {\n return $this->availability == 1;\n }", "title": "" }, { "docid": "8ab28e50e70b24ecc920162e6cf54f17", "score": "0.577596", "text": "function is_available() {\n //this plugin is for testing only\n return false;\n }", "title": "" }, { "docid": "1059ba981c704f4a39cb916ef2fdfd8f", "score": "0.5757996", "text": "function available ()\n\t{\n\t\treturn $this->checkIdentifier () === true && is_writable (AE_APP_CACHE) === true ;\n\t}", "title": "" }, { "docid": "2be11dca3def03e670cdf6ebeb97d136", "score": "0.57487047", "text": "function local_image_exists( $url ) {\n\t\treturn file_exists( $this->local_filename( $url ) );\n\t}", "title": "" }, { "docid": "f2e7b6060095cb4eef5b51e04b8f84f5", "score": "0.57339144", "text": "public static function assetsAreCurrent()\n {\n $publishedPath = public_path('vendor/anvil/mix-manifest.json');\n\n if (! File::exists($publishedPath)) {\n throw new \\RuntimeException('The Anvil assets are not published. Please run: php artisan anvil:publish');\n }\n\n return File::get($publishedPath) === File::get(__DIR__.'/../public/mix-manifest.json');\n }", "title": "" }, { "docid": "60e7df86653b0aa63a9c6d9585060cd8", "score": "0.5731144", "text": "function getAvailability() {\r\r\n\t\treturn $this->availability;\r\r\n\t}", "title": "" }, { "docid": "3c059524f1f1d27c48a5a4c610beee64", "score": "0.57135785", "text": "public function getUsageCanDownload();", "title": "" }, { "docid": "0b31d336153d5c430e1305834893a73f", "score": "0.5699463", "text": "public function getAvailable();", "title": "" }, { "docid": "0b31d336153d5c430e1305834893a73f", "score": "0.5699463", "text": "public function getAvailable();", "title": "" }, { "docid": "9b781e40e79a79c625179bc1d9120897", "score": "0.56815886", "text": "protected function isAvailable()\n {\n try {\n return SearchEngine::getInstance()->isAvailable(true);\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "f3cc0c0ab0515e8fdcfb33d24ea215d6", "score": "0.5677959", "text": "public function isAvailable() {\n\t\treturn $this->available;\n\t}", "title": "" }, { "docid": "e895c1fb24a9797dd0fc20993317ea7a", "score": "0.56648415", "text": "private function isMsiAvailable(): bool\n {\n return $this->context->getModuleManager()->isEnabled('Magento_InventoryApi');\n }", "title": "" }, { "docid": "a381c2566f411d3fbd6bff0065df3495", "score": "0.5658116", "text": "private function checkAvailability($data = array()) {\n $fkVendorId = $data['fkVendorId'];\n $tableName = $data['tableName'];\n $options = array(\n 'table' => 'tempory_service_hold',\n 'where' => array('fkVendorId' => $fkVendorId, 'status' => 0, 'tableName' => $tableName),\n 'select' => 'status'\n );\n $result = $this->main_content_model->customGet($options);\n if (!empty($result)) {\n $this->session->set_flashdata('messages', \"<strong><span style=color:red>Your updatation not yet approved by superadmin.</span></strong>\");\n redirect(site_url(\"partners/vendorCustomView/$fkVendorId/$tableName\"));\n } else\n return true;\n }", "title": "" }, { "docid": "e22efe52ed73da57d5c8c0497b3c6f2b", "score": "0.5654191", "text": "public static function assetsAreCurrent()\n {\n $publishedPath = public_path('vendor/compass/mix-manifest.json');\n\n if (! File::exists($publishedPath)) {\n throw new RuntimeException('The Compass assets are not published. Please run: php artisan compass:publish');\n }\n\n return File::get($publishedPath) === File::get(__DIR__.'/../public/mix-manifest.json');\n }", "title": "" }, { "docid": "73c84eb79aeee2c800ce1b570cd2fea9", "score": "0.5649689", "text": "public function isSmart(): bool\r\n {\r\n $req = $this->transactionAPI->fetchById($this->assetId);\r\n if (array_key_exists('script', $req) and $req['script']) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "6f8ccfb30338468b41869c16030639b6", "score": "0.5644361", "text": "function isAvailable(){\n\t\t\n\t\treturn in_array($this->timexp_last_status, array(0,2,4)) &&\n\t\t\t\t\t\t\t($this->timexp_timesheet === NULL || \n\t\t\t\t\t\t\tin_array($this->timexp_last_status, array(2,4)) );\n\t\n\t}", "title": "" }, { "docid": "8f46a12af613d7e7ef748fe319ec3892", "score": "0.5634209", "text": "public function isAvailableOnDemand()\n {\n return $this->isAvailableOnDemand;\n }", "title": "" }, { "docid": "0f54f06bd6e89efb2e90b8ce585dea6d", "score": "0.56237614", "text": "public function has(AssetInterface $asset): bool\n {\n }", "title": "" }, { "docid": "5ee1d6a81d81d3ab9d0e7bd8b8daf80c", "score": "0.559467", "text": "public function isInStock()\n {\n if ($this->isAvailableOnDemand()) {\n return true;\n }\n }", "title": "" }, { "docid": "34a057881b01fae41ce3fab70b224c4c", "score": "0.55889076", "text": "public function isReadyToUse()\n {\n return $this->getMask() !== null &&\n $this->getCardId() !== null &&\n $this->getBrand() !== null;\n }", "title": "" }, { "docid": "f4693a48d18468e5a7a465dddca30d3c", "score": "0.55821073", "text": "public static function is_needed(): bool;", "title": "" }, { "docid": "5c9fce6e28dd51828d98f62fd19eb22d", "score": "0.5579748", "text": "function remoteFileExists($url){\n\t\tif(@getimagesize($url)){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e2e46f5f8c29896e30a09902c7bf9b83", "score": "0.5574473", "text": "public function isInUse();", "title": "" }, { "docid": "e2e46f5f8c29896e30a09902c7bf9b83", "score": "0.5574473", "text": "public function isInUse();", "title": "" }, { "docid": "daab370e6154a084f6652a844eac7d83", "score": "0.55584645", "text": "public function getAvailability()\n\t{\n\t\treturn $this->availability;\n\t}", "title": "" }, { "docid": "d8e07f5dd02d5c2d1f2ccddfd0310101", "score": "0.5556426", "text": "public function isDealAvailable()\n {\n $tz=$this->getTimeZone();\n date_default_timezone_set($tz[$this->timezone]);\n \n if(mktime()<strtotime($this->end_date))\n {\n if($this->getBoughtCount()==$this->max_available)\n {\n return(false); \n }\n else\n {\n return(true); \n }\n }\n else\n {\n return(false);\n } \n\n }", "title": "" }, { "docid": "a202070ff889b71b668b4f5d4b400ab2", "score": "0.55532444", "text": "public function get_availability()\n {\n // Call presenter/api/clinear/pillar/availability.php and invoke the view() function, then revert to views/api/response.php, send HTTP code 200 (OK)\n return Response::forge(Presenter::forge('api/clinear/pillar/availability', 'view', NULL, 'api/response'), 200, array('Content-Type','application/json'));\n }", "title": "" }, { "docid": "e74ec1a0b4e9fbd76fccf9d24282320b", "score": "0.55502653", "text": "public static function isAvailable() : bool\n {\n return extension_loaded('apcu');\n }", "title": "" }, { "docid": "6cfad2651e24080d80b9a32bae29b904", "score": "0.5544853", "text": "private static function isResourceAvailable(string $controller,string $action):bool{\n $controller = CONTROLLER_NAMESPACE.$controller;\n if(!class_exists($controller, TRUE)){\n return false;\n }\n if(!method_exists($controller, $action)){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "5d39c8e2fcd0c8eadd2e9fd7d3f7a419", "score": "0.5542551", "text": "function imageExists()\n {\n if (isset($this->unsplash) and $this->unsplash) {\n $tmpFilename = $this->unsplash;\n $file_headers = @get_headers($tmpFilename);\n $exists = ($file_headers[0] == 'HTTP/1.1 404 Not Found' ? false : true);\n } else {\n $type = string_strtolower($this->type);\n $tmpFilename = $this->IMAGE_DIR.\"/\".$this->prefix.\"photo_\".$this->id.\".\".$type;\n $exists = (file_exists($tmpFilename) && is_readable($tmpFilename));\n }\n\n return $exists;\n }", "title": "" }, { "docid": "9178876df2f6ff24f15d560875256beb", "score": "0.5535326", "text": "public function is_available($not, \\core_availability\\info $info, $grabthelot, $userid) {\n $allow = (int)$this->allow;\n $progress = $this->get_progress($info->get_course(), $userid); \n\n $allow = ($progress >= $allow) ? true : false;\n if ($not) {\n $allow = !$allow;\n }\n\n return $allow;\n}", "title": "" }, { "docid": "55e25d83d37c5af45f274072d3b0ebfe", "score": "0.5533023", "text": "public function hasAssetVideo(){\n if (!isset($this->video->video_url) || strlen($this->video->video_url) == 0){\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "c832312e1e6737708d64f603f0671151", "score": "0.5531135", "text": "public function performCheck() {\n $this->isMet = extension_loaded('gd');\n }", "title": "" }, { "docid": "9f7264943eb5746f5b75fb1c96d4c1ab", "score": "0.55279744", "text": "public function checkBookAvailability()\n {\n $book = array(\n 'idbooks' => $this->input->post('idbooks')\n );\n \n echo $this->booksInformation->checkBookAvailabilty($book);\n }", "title": "" }, { "docid": "fab26e3e504c25cbb7f8210bb9e498e5", "score": "0.55162436", "text": "public function isAvailable()\n\t{\n\t\t$pickupContact = $this->getRetailLocation()->getParam('pickup_contact');\n\t\t$packageSizes = $this->getRetailLocation()->getParam('package_sizes');\n\n\n\t\t$pickupContact = array_merge(\n\t\t\tarray(\n\t\t\t\t'address_line' => null,\n\t\t\t\t'postal_code' => null,\n\t\t\t\t'country_code' => null,\n\t\t\t\t'name' => null,\n\t\t\t\t'phone_number' => null\n\t\t\t),\n\t\t\t(array) $pickupContact\n\t\t);\n\n\t\t$return = true;\n\n\t\tif (!($pickupContact['address_line'])\n\t\t\t|| !$pickupContact['postal_code']\n\t\t\t|| !$pickupContact['country_code']\n\t\t\t|| !$pickupContact['name']\n\t\t\t|| !$pickupContact['phone_number']\n\t\t) {\n\t\t\tMage::getModel('tiramizoo/debug')->log('Tiramizoo is not available. Pickup contact is not exists.');\n\t\t\t$return = false;\n\t\t}\n\n\t\tif (!Mage::getModel('tiramizoo/cart')->checkCart($packageSizes)) {\n\t\t\tMage::getModel('tiramizoo/debug')->log('Tiramizoo is not available. Items in cart are not valid');\n\t\t\t$return = false;\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "b4c78229e5f0e542e5cc5b41ec1de4dc", "score": "0.55096817", "text": "public function checkIfManifestAvail($throw = true){\n if(!$this->checkIf('checksumsAvail',$throw))\n return false;\n $manifestFile = $this->updateDir.DIRECTORY_SEPARATOR.'manifest.json';\n if(!file_exists($manifestFile)){\n if($throw) {\n throw new CException(Yii::t('admin', 'Manifest file at {file} is missing.', array('{file}' => $manifestFile)), self::ERR_MANIFEST);\n } else {\n return false;\n }\n }\n\n if(md5_file($manifestFile) != $this->checksums['manifest.json']) {\n if($throw) {\n throw new CException(Yii::t('admin','Manifest file at {file} is corrupt.', array('{file}' => $manifestFile)),self::ERR_MANIFEST);\n } else {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "a7115871199b727ac1bd5770143c9a18", "score": "0.55088997", "text": "private function checkApplicationUpdatesAvailable() {\n\t # Configuration array\n\t $ini = $this->getApplicationUpdateSettings();\n\t\n\t # Checking if file was modified for less than $ini['time_between_check'] ago\n\t $stats = @stat($ini['local_path']);\n\t if(is_array($stats) === true && isset($stats['mtime']) === true &&\n\t ($stats['mtime'] > (time() - $ini['time_between_check']))) {\n\t # Opening file and checking for latest version\n\t return (version_compare(CURRENT_VERSION, file_get_contents($ini['local_path'])) == -1);\n\t }\n\t else {\n\t # Getting last version from Google Code\n\t $latest = @file_get_contents($ini['distant_path']);\n\t if($latest !== null) {\n\t # Saving latest version in file\n\t file_put_contents($ini['local_path'], $latest);\n\t\n\t # Checking for latest version\n\t return (version_compare(CURRENT_VERSION, $latest) == -1);\n\t }\n\t # Can't connect to Github\n\t //else {\n\t # In case user does not have access to githubusercontent.com !!!\n\t # Here it's up to you, you can write nothing in the file to display an alert\n\t # leave it to check google every time this function is called\n\t # or write again the file to advance it's modification date for the next HTTP call.\n\t //}\n\t }\n\t}", "title": "" }, { "docid": "3f24d50a30b1822bd24e5736f44ffa39", "score": "0.5499881", "text": "public function isAvailable()\n\t{\n\t\tif (empty($this->componentName))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t\\JLoader::import('joomla.filesystem.folder');\n\n\t\tif (!\\JFolder::exists(JPATH_ROOT . '/components/' . $this->componentName))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t\\JLoader::import('cms.application.component.helper');\n\n\t\tif (!\\JComponentHelper::getComponent('com_akeebasubs', true)->enabled)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fb052221688a4ac3655f6aa1afe69036", "score": "0.54988515", "text": "public function check_availability() {\n \n // Verify if app_id and app_secret exists\n if ( ($this->app_id != '') AND ( $this->app_secret != '') ) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n }", "title": "" }, { "docid": "d751bfd11f9b856df15d1a001d48c6e2", "score": "0.5486248", "text": "public function hasCustomImage() {\n return \\File::exists($this->image_path);\n }", "title": "" }, { "docid": "fd030f3c761e2b75aed49b3f13cc1f5e", "score": "0.5485393", "text": "public function getIsAvailable()\n {\n return $this->is_available;\n }", "title": "" }, { "docid": "6482a1cb2dfc47f589a87c5578765bda", "score": "0.54797626", "text": "static public function there_is_banner(){\r\n try{\r\n $statement = Conexion::connect()->query(\"SELECT * FROM banner\");\r\n $statement->execute(array());\r\n $items = $statement->rowCount();\r\n if($items>0){\r\n return true;\r\n }\r\n return false;\r\n\r\n }catch(PDOException $e){\r\n return[];\r\n }\r\n }", "title": "" }, { "docid": "8978a2ecd3779827bd8df33072e80b24", "score": "0.54696935", "text": "public function isAvailable()\n {\n return $this->_searchHandler->isAvailable();\n }", "title": "" }, { "docid": "41b604be808eb4426cf4410e07ea3489", "score": "0.54638374", "text": "function\t\t\tcheckResource($identifier);", "title": "" }, { "docid": "233d95c934969ce799f74c8d7144ff35", "score": "0.54637635", "text": "public function check_availability() {\n \n // Verify if client_id and client_secret is not empty\n if ( ($this->client_id != '') AND ( $this->client_secret != '') ) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n }", "title": "" }, { "docid": "a2a796fa1cdd771916abd5e30a410510", "score": "0.5463618", "text": "public function getAvailability()\n {\n return $this->availability;\n }", "title": "" }, { "docid": "0fe5b3dca8d7ddc18218c6ad7361b34e", "score": "0.54584706", "text": "public function actionIsModelReady() {\n //@TODO Temporary solution to warn user if photoscan hasn't started\n $error = false;\n $pid = shell_exec('pidof photoscan');\n if(empty($pid)) {\n $error = true;\n }elseif(file_exists(Yii::app()->getBasePath() . '/../uploads/' .\n Yii::app()->user->getId() . '-modCopter' . '/output')) {\n //@TODO Temporary solution in case processing doesn't start\n shell_exec('xdotool mousemove 485 60 click 1');\n shell_exec('xdotool mousemove 485 85 click 1');\n }\n\n $result = array(\n 'ready'=> false,\n 'error' => $error\n );\n if(file_exists(Yii::app()->getBasePath() . '/../uploads/' .\n Yii::app()->user->getId() . '-modCopter' . '/output.zip')) {\n $result['ready'] = true;\n }\n\n $this->renderJSON($result);\n }", "title": "" }, { "docid": "a9e50b3a1e3e86f4025db337afe192f8", "score": "0.54562724", "text": "function has_found_artifact($pdo, $player)\n{\n try {\n // make sure they haven't found this artifact before\n $last_found_at = artifacts_found_select_time($pdo, $player->user_id);\n return $last_found_at > \\pr2\\multi\\Artifact::$updated_time || $player->group <= 0;\n } catch (Exception $e) {\n $error = $e->getMessage();\n echo \"Error: $error\";\n return false;\n }\n}", "title": "" }, { "docid": "0787ea30fdd98494f2aad9f711311dbb", "score": "0.5445433", "text": "public function product_check();", "title": "" }, { "docid": "b42bc0946d9e1d35b4aef4ebb4d2aadc", "score": "0.5441995", "text": "public function isAvailable()\n {\n if (!in_array(Isotope::getConfig()->currency, array('EUR'))) {\n return false;\n }\n \n if(!FE_USER_LOGGED_IN) {\n return false;\n }\n else {\n $user = \\FrontendUser::getInstance();\n if(!isset($user->iso_sepa_active) || $user->iso_sepa_active != \"1\") {\n return false;\n }\n }\n\n return parent::isAvailable();\n }", "title": "" }, { "docid": "c7182ec55805627ebbf73a169d872101", "score": "0.5437201", "text": "function image_exist( $img ) \r\n\t\t{\r\n\t\t\tif( @file_get_contents( $img,0,NULL,0,1) ){ return 1; } else{ return 0; }\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "f59e406f1b7298c8cecc43e4e1aefa16", "score": "0.5428852", "text": "function apb_shortcode_check_available( $apb_setting = '' ) {\r\n\tif ( empty( $apb_setting ) ) {\r\n\t\t$apb_setting = array(\r\n\t\t\t'departure' => 1,\r\n\t\t\t'night' => 1,\r\n\t\t\t'room_type' => 1,\r\n\t\t\t'mullti_room' => 1,\r\n\t\t\t'style' => 1,\r\n\t\t\t'tmp_file' => '',\r\n\t\t);\r\n\t}\r\n\tif ( empty( $apb_setting['tmp_file'] ) ) {\r\n\t\tinclude AWE_function::template_exsits( 'shortcode/apb_check_available/apb-shortcode-check-availability' );\r\n\t} else {\r\n\t\tinclude AWE_function::template_exsits( 'shortcode/apb_check_available/' . $apb_setting['tmp_file'] );\r\n\t}\r\n}", "title": "" }, { "docid": "ce6e2c9f2ecf54ebdd5553a0eabd57e5", "score": "0.54239523", "text": "public static function canUse();", "title": "" }, { "docid": "39210e4d210d670c79c7fa3a7c77813b", "score": "0.54022866", "text": "function isDownloadable($url) {\n $file_headers = @get_headers($url);\n if(!$file_headers || $file_headers[0] == 'HTTP/1.1 404 Not Found') {\n $exists = false;\n }\n else {\n $exists = true;\n }\n return $exists;\n}", "title": "" }, { "docid": "f19847b39632208d099f152eaf38f4e1", "score": "0.5401097", "text": "public function isAvailable()\n {\n return $this->getConfigData('active');\n }", "title": "" }, { "docid": "7dfacddc6110874b8b55e551ec8f724a", "score": "0.5395266", "text": "public function checkIsAvailable()\n {\n if ($this->checkData === null) {\n $this->sendRequest();\n }\n\n $this->isAvailable = $this->checkData['is_available'];\n return $this->isAvailable;\n }", "title": "" }, { "docid": "f1f92c020f599319b71d4b304996f371", "score": "0.5394994", "text": "function dataplus_check_availability() {\n global $context, $dataplus, $OUTPUT, $USER;\n\n if (has_capability('mod/dataplus:databaseedit', $context, $USER->id)) {\n return;\n }\n\n if (!empty($dataplus->timeavailablefrom) && ($dataplus->timeavailablefrom > time())) {\n $timeavailablefrom = date('l, j F Y, g:i A', $dataplus->timeavailablefrom);\n dataplus_print_stop_message(get_string('availableyet', 'dataplus', $timeavailablefrom));\n }\n\n if (!empty($dataplus->timeavailableto) && ($dataplus->timeavailableto < time())) {\n $timeavailableto = date('l, j F Y', $dataplus->timeavailableto);\n dataplus_print_stop_message(get_string('availablepast', 'dataplus', $timeavailableto));\n }\n\n}", "title": "" }, { "docid": "c1850e69b17929de66d70333b050fda4", "score": "0.53670895", "text": "public function getAvailability() {\n return $this->availability;\n }", "title": "" }, { "docid": "9491526170d391017ee149d846b906f9", "score": "0.5367081", "text": "public function getAvailability() {\n return $this->availability;\n }", "title": "" }, { "docid": "50360d1076fd62b39a443abdbef46c3d", "score": "0.5366402", "text": "private function _checkResource()\n {\n if( is_resource( $this->img_source ) !== true )\n {\n throw new Exception( \"Please load an image file (JPG, JPEG, PNG, GIF) for processing.\" );\n }\n return true;\n }", "title": "" }, { "docid": "6d1e68f611b701fcef9d6f6c53224489", "score": "0.5363234", "text": "function checkAvailable($conn,$date,$period) {\n $sql = \"SELECT BookedByName FROM slt_grouptherapy\n WHERE BookingDate=$date AND BookingPeriod=$period\";\n $result = mysqli_query($conn,$sql);\n if (mysqli_num_rows($result) > 0) {\n $row = mysqli_fetch_assoc($result);\n return $row[\"BookedByName\"];\n } // if\n else {\n return null;\n }\n }", "title": "" }, { "docid": "8141135299aa2e6aef09d36e6983f0e1", "score": "0.5360577", "text": "public function isAvailable(){\n\n if(!$this->helper->isEnabled())\n return false;\n /**\n * 3 condition\n */\n if($this->getLoggedInCustomerId() && $this->checkConditionByStatuses() && $this->checkConditionByAddress())\n return true;\n\n return false;\n }", "title": "" }, { "docid": "f8e1ee80085ac2ddff6806499192ef43", "score": "0.53565985", "text": "public function isHealthy(): bool;", "title": "" }, { "docid": "7a39c4b46206c46edc9af87571de9753", "score": "0.5353131", "text": "public function is_available() {\n\t\tif ( 'yes' != $this->enabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->merchant_code ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->public_key ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->private_key ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! function_exists('curl_init') ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! function_exists('openssl_get_privatekey') ) {\n\t\t\treturn false;\n\t\t}\n\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ecc8055bfd97412ce56692a83d4df610", "score": "0.5350974", "text": "public function test_banner_exists_true()\n {\n //Create data\n $params_build_banner_place_master['display_count'] = 0;\n $params_build_banner_place_master = $this\n ->banner_place_master_builder\n ->build_banner_place_master_params($params_build_banner_place_master);\n\n $banner_place_master = $this\n ->banner_place_master_model\n ->create\n (\n $params_build_banner_place_master,\n ['return' => TRUE]\n );\n\n $params['place_id'] = $banner_place_master->id;\n $params['closed_at'] = business_date('Y-m-d H:i:s', time()+2);\n $params = $this->builder->build_banner_params($params);\n\n $banner = $this->banner_model->create($params, ['return' => TRUE]);\n\n $res = $this->banner_model->banner_exists($banner->id);\n\n //Check data\n $this->assertTrue($res);\n\n }", "title": "" }, { "docid": "1921d4a52c6afb4ba133e341f6f27e12", "score": "0.53469956", "text": "protected function checkRequirements()\n {\n $statusRepository = $this->container->get('open_orchestra_model.repository.status');\n $this->abortIf((null === $statusRepository->findOnebyAutoUnpublishTo()), \"Require offline status\");\n }", "title": "" }, { "docid": "4886b6d917ac44926a23891e2d4a0fb6", "score": "0.5335792", "text": "public function isLoaded()\n {\n return is_resource($this->key);\n }", "title": "" }, { "docid": "d74da5f2bc3bc6744637808c6460301a", "score": "0.5333431", "text": "public function testCheckAssetId()\n {\n $this->assertTrue($this->server->checkAssetId('87523'));\n }", "title": "" } ]
676da82a8b9990af392fc774ec84472f
Get a new response object.
[ { "docid": "db842f424a9778b00bb439f4cd0fd8a3", "score": "0.0", "text": "private static function _getResponseObject()\r\n {\r\n return new Rootd_Iso_Geocode_Provider_Response();\r\n }", "title": "" } ]
[ { "docid": "70a9414ea2151bc1a0f1108d2a9979ae", "score": "0.84600925", "text": "public function newResponse()\n {\n return new Response();\n }", "title": "" }, { "docid": "a3eea7d21f7a8b1283a4d59d06359aae", "score": "0.8411604", "text": "public function getNewResponse()\n {\n return new Response();\n }", "title": "" }, { "docid": "e93e73ef5ee7f36b7d8acc0df14b0d87", "score": "0.828551", "text": "protected function newResponse() {\n return new Response;\n\t}", "title": "" }, { "docid": "5caf8c9ed6ccbc070bb8049b95b7472e", "score": "0.782918", "text": "public function newResponse(): Response\n {\n return $this->di()->newResponse();\n }", "title": "" }, { "docid": "75156f0279e9c945458d5e4db79da42f", "score": "0.772798", "text": "public function newResponse()\n {\n return new \\Jaxon\\Response\\Response();\n }", "title": "" }, { "docid": "80868dc83cd2ea07e85588e1f4e9a6f9", "score": "0.7524246", "text": "static function response(){\n $reponse = new Response();\n return $reponse;\n }", "title": "" }, { "docid": "b90a2f1321347ce2c54d9d8ec8288bd6", "score": "0.71372706", "text": "function response($newResponse=null) {\n static $response;\n if (!isset($response) || isset($newResponse))\n $response = $newResponse ?: new Response();\n return $response;\n}", "title": "" }, { "docid": "e98ea1c358c7f28d3d1eee70dc35ff89", "score": "0.704722", "text": "function createResponse()\r\n\t{\r\n\t\t$response = new Art_Model_JSONRPC_Response;\r\n\t\t$response->setId($this->getId());\r\n\t\t\r\n\t\tif( !$this->isValid() )\r\n\t\t{\r\n\t\t\t$response->setError($this->_error_code);\r\n\t\t}\r\n\r\n\t\treturn $response;\r\n\t}", "title": "" }, { "docid": "81721198b75d83ea61fc18e7c0748d2b", "score": "0.70421636", "text": "public function getResponse() {\n\t\tif($this->response)\n\t\t\treturn $this->response;\n\t\telse\n\t\t\treturn new \\Asgard\\Http\\Response($this->code);\n\t}", "title": "" }, { "docid": "f0e8e9ad50c2663555eb294c66cfd5ff", "score": "0.7020935", "text": "public function getResponse()\n {\n return new \\OAuth2\\Response();\n }", "title": "" }, { "docid": "3ee31a2e8a09b10c5d02377d6a1e38fd", "score": "0.69999385", "text": "public function getResponse(): Response;", "title": "" }, { "docid": "1d03010cee674034492d084fbe802850", "score": "0.69367933", "text": "public function getResponse() : Response {\n\t\t\treturn $this->response;\n\t\t}", "title": "" }, { "docid": "43dc2098641b1baca5695c96edde5e67", "score": "0.6878806", "text": "public static function createInstance()\n {\n return new WebClientResponse();\n }", "title": "" }, { "docid": "ce108d4f369b5d263b90385138e6ef64", "score": "0.6856643", "text": "public static function make(){\n return new ApiResponse();\n }", "title": "" }, { "docid": "bcf71be7d93f45a5f66783b290bcb8af", "score": "0.6841445", "text": "public function getResponse()\n {\n $response = null;\n\n switch ($this->getAcceptHeader()) {\n case 'application/json':\n $response = new ResponseJson();\n break;\n case 'application/xml':\n $response = new ResponseXml();\n break;\n default:\n $response = new ResponseJson();\n break;\n }\n\n return $response;\n }", "title": "" }, { "docid": "c89073cc17562784fdb9a5a43ba9f92c", "score": "0.68314314", "text": "public function getResponse(): Response {\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "02c156e742fe5d5925b501f59311ed77", "score": "0.68216914", "text": "function get_response() {\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "d00ebb9635b5823be26b86dd6f906786", "score": "0.68146265", "text": "public function getResponse(): Response\n {\n return $this->response;\n }", "title": "" }, { "docid": "d2843eefc5096b4697cb07848b434766", "score": "0.6773401", "text": "public function getResponseObject()\n {\n return $this->response;\n }", "title": "" }, { "docid": "89726317c29ff9621ae9c1d17d32006b", "score": "0.6771277", "text": "public function createResponse($response)\n {\n $clone = clone $this;\n $clone->res = $response;\n return $clone;\n }", "title": "" }, { "docid": "dcf9819b80ce8d5b8f854e6f0d8c60f0", "score": "0.67337734", "text": "public function response()\n {\n return Net\\Response::getInstance();\n }", "title": "" }, { "docid": "3a5e37b02582c91050e319b6e40d1cd9", "score": "0.6641671", "text": "private function buildResponse()\n {\n $response = new Response();\n $headers = $this->getMock('Symfony\\Component\\HttpFoundation\\HeaderBag');\n $response->headers = $headers;\n\n return $response;\n }", "title": "" }, { "docid": "708f89fdea2bd117948f2d1dcd518110", "score": "0.66297746", "text": "private function createResponse(){\n $request = $this->serviceContainer['request'];\n $rawResponse = $this->serviceContainer['databasehelper']->getResponse($request->requestMethod, $request->requestBody,$request->requestParam);\n\n $this->response = $this->serviceContainer['response']->getResponse($rawResponse, $this->serviceContainer['request']->requestMethod);\n\n }", "title": "" }, { "docid": "5311b1a1e333ae6d467b8c85dde8161e", "score": "0.66138595", "text": "protected function createResponse(): Response\n {\n if (headers_sent()) {\n $this->cleanup();\n\n return new DummyResponse();\n }\n\n $yiiResponse = Yii::$app ? Yii::$app->get('response') : null;\n\n $this->cleanup();\n\n if ($yiiResponse instanceof \\Yii2tech\\Illuminate\\Yii\\Web\\Response) {\n return $yiiResponse->getIlluminateResponse(true);\n }\n\n return new DummyResponse();\n }", "title": "" }, { "docid": "14c9221aa954ba08ff335c8a804e80db", "score": "0.6606678", "text": "public function getResponse(): ResponseInterface;", "title": "" }, { "docid": "05a01dd5e95c84a1c96f58d84dfd74ef", "score": "0.6594839", "text": "public function response(): ResponseInterface;", "title": "" }, { "docid": "17714eb572a57eb397f9d806957d3437", "score": "0.6583564", "text": "public function getResponseParser()\n {\n return new ResponseParser();\n }", "title": "" }, { "docid": "5e81ff0dafc7ac65e175d64f2126aa8c", "score": "0.65282243", "text": "public function get()\r\n {\r\n return new Response(\r\n \\Graphite\\Component\\Neutrino\\Response\\GetResponse::class, \r\n $this->context, \r\n $this->execute()\r\n );\r\n }", "title": "" }, { "docid": "c94e1ba06ccfb9a8ac487e78ff04dad3", "score": "0.65219724", "text": "function get() {\n $response = new Response($request);\n $response->code = Response::OK;\n $response->body = \"This resource is not usable with a GET request.\\n\";\n }", "title": "" }, { "docid": "ae48bac3aae956efa339463a5c8933dc", "score": "0.6516353", "text": "static function init()\n {\n if(isset(HttpResp::$self))\n return HttpResp::$self;\n\n return new HttpResp();\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.64916503", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.64916503", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.64916503", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.64916503", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.64916503", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.64916503", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "3a2381e45783c79b68822b520c61a25d", "score": "0.64916503", "text": "public function getResponseObject()\n {\n return $this->responseObject;\n }", "title": "" }, { "docid": "222894ac784ff111e92148ff0de04025", "score": "0.64846057", "text": "protected function constructResponse() {\n\t\tglobal $response;\n\n\t\t$response->returnJSON = 1;\n\t\t\n\t\tif ($this->hasErrors) {\n\t\t\t$response->status = 'error';\n\t\t\tif ( isset($this->config['onError']) ) {\n\t\t\t\t$response->action = $this->config['onError'];\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$response->status = 'success';\n\t\t\tif ( isset($this->config['onSuccess']) ) {\n\t\t\t\t$response->action = $this->config['onSuccess'];\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9b1d061450ff5545ecf7dfbd8888000a", "score": "0.6479527", "text": "public function & getResponse() {\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "a7b6443525776b4fca46a8f3d12e3a78", "score": "0.6469643", "text": "public function getResponse()\n {\n if ($this->response === null) {\n $this->response = $this->prepareResponse();\n }\n return $this->response;\n }", "title": "" }, { "docid": "8765ec83552644e033f5a788fb863fa1", "score": "0.6457055", "text": "public function getResponse() {}", "title": "" }, { "docid": "1bb2b61094588cb653d763613f52eace", "score": "0.64558303", "text": "protected function createResponse($data)\n {\n return $this->response = new Response($this, $data);\n }", "title": "" }, { "docid": "7104da03023deed8e5947cc421e858d3", "score": "0.6437757", "text": "function __construct() {\n $this->response = new Response();\n }", "title": "" }, { "docid": "43d2ef5da36ef23653a2340def72e2e5", "score": "0.6432867", "text": "public function response() {\n $this->jsonApiGenerator->reset();\n $this->jsonApiGenerator->setEntities($this->getEntities());\n $this->jsonApiGenerator->setLinks($this->getLinks());\n $this->jsonApiGenerator->setMetadata($this->getMetadata());\n $this->jsonApiGenerator->setIncludes($this->getIncludes());\n\n // Build a return the response.\n $response = new ResourceResponse(\n $this->jsonApiGenerator->generate(FALSE),\n 200,\n $this->getHeaders()\n );\n\n // Add the response cacheability.\n $response->addCacheableDependency(\n $this->jsonApiGenerator\n );\n $response->addCacheableDependency((new CacheableMetadata())\n ->addCacheContexts($this->getCacheContexts())\n ->addCacheTags($this->getCacheTags()));\n\n return $response;\n }", "title": "" }, { "docid": "19afd5b6da92e3fe268730a583bf6b1d", "score": "0.6432494", "text": "public function getResponse () {}", "title": "" }, { "docid": "c1c86cb596691a40a10027b581e58bb5", "score": "0.64240223", "text": "abstract public function getResponse();", "title": "" }, { "docid": "5eb2ff2f1f0cf6ba7dc644546890651d", "score": "0.6415467", "text": "public function get_response();", "title": "" }, { "docid": "5f8c357e0a4b340da7350ddd9dc5ec22", "score": "0.6411958", "text": "public function getResponseObject() {\n return $this->responseObject;\n }", "title": "" }, { "docid": "4559c8410eafa0c4d3718226d303d12c", "score": "0.6404133", "text": "public function as_object()\n {\n if( $response = json_decode( $this->response_data ) )\n {\n return $response;\n }\n\n return new \\stdClass;\n }", "title": "" }, { "docid": "86f538f3919325cf36d54411fa3b5e2e", "score": "0.6389658", "text": "protected function createResponse($response)\n {\n return new Response($response);\n }", "title": "" }, { "docid": "4dc3121521259e1bd2c9561d33b5a30c", "score": "0.6377749", "text": "protected function prepareResponse()\n {\n return new Response(null, Response::STATUS_OK, 'text/html;charset=UTF8');\n }", "title": "" }, { "docid": "7690d69e6c9d5075a334394cab160b2a", "score": "0.6376337", "text": "function response(\n $status = 200,\n array $headers = [],\n $body = null,\n $version = '1.1',\n $reason = null\n ) {\n return new Response($status, $headers, $body, $version, $reason);\n }", "title": "" }, { "docid": "31aa7edd80de3bc3306f6745e3d851a4", "score": "0.63745713", "text": "public function outgoingResponse();", "title": "" }, { "docid": "a3415e6a82ad77dcf8031718ee505aca", "score": "0.63708407", "text": "public function createResponse($data)\n {\n return $this->response = new GetJournalResponse($this, $data);\n }", "title": "" }, { "docid": "4b3a91d6c7d9caea7139e686889ca13c", "score": "0.6350786", "text": "public static function getResponse() : ResponseInterface {\n return self::$router->respond();\n }", "title": "" }, { "docid": "ab3960c5b3b1c27cf09d4dab3052278c", "score": "0.6350041", "text": "static function getInstance(){\n if(!isset(self::$instance)){\n self::$instance = new Response();\n }\n return self::$instance;\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" }, { "docid": "c8a5981797010f83e7bc586a7fbe7f0b", "score": "0.6340842", "text": "public function getResponse()\n {\n return $this->get('Response');\n }", "title": "" } ]
791e4b2ded14a9c8e388fcd34ff7b833
Method to set the value of field requirements
[ { "docid": "372b0e1d41e69118cf18ae5abe376292", "score": "0.5252341", "text": "public function setRequirements($requirements)\n {\n $this->requirements = $requirements;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "dc983b1e8435f578b480becce8b3d60c", "score": "0.6769934", "text": "function setRequired ($newRequired) {\n $this->required = $newRequired;\n }", "title": "" }, { "docid": "ac057ad33ac04c5a1ea7e2446ea155d1", "score": "0.66824424", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'reference_id',\n ];\n\n $this->requiredFields = Common::createArrayObject($requiredFields);\n }", "title": "" }, { "docid": "de4a7594e39f77a35a23696c4eac5333", "score": "0.6593348", "text": "public function setRequired() {\n $this->required = true;\n }", "title": "" }, { "docid": "dcf7bb84fbe5b2a79bdf9f1b4af7522b", "score": "0.6572522", "text": "protected function setRequiredFields()\n {\n $requiredFields = [\n 'transaction_id',\n 'card_type',\n 'redeem_type',\n 'amount',\n 'currency',\n 'card_holder',\n 'card_number',\n 'expiration_month',\n 'expiration_year'\n ];\n\n $this->requiredFields = \\Genesis\\Utils\\Common::createArrayObject($requiredFields);\n\n $requiredFieldValues = array_merge(\n [\n 'card_type' => CardTypes::getCardTypes(),\n 'redeem_type' => RedeemTypes::getRedeemTypes(),\n 'currency' => Currency::getList()\n ],\n $this->getCCFieldValueFormatValidators()\n );\n\n $this->requiredFieldValues = \\Genesis\\Utils\\Common::createArrayObject($requiredFieldValues);\n }", "title": "" }, { "docid": "c79fd2d8c5e9b50af5b0ed9f712dfd80", "score": "0.628994", "text": "public function setRequired($required)\n {\n $this->required = $required;\n }", "title": "" }, { "docid": "30ced3cf84d5d8f1e054d64f3ec60b85", "score": "0.6232796", "text": "public function set() {\n\t\t// determine the param signature we are in and set vars accordingly\n\t\t$args = func_get_args();\n\t\t$comparison_operator = '=';\n\t\t$field_name = $args[0];\n\t\t$field_value = func_num_args()==3?func_get_arg(2):func_get_arg(1);\n\t\tif (func_num_args()==3) { // ($field_name, $comparison_operator, $field_value)\n\t\t\t$field_value = func_get_arg(2);\n\t\t\t$comparison_operator = func_get_arg(1);\n\t\t} else { // ($field_name, $field_value)\n\t\t\t$field_value = func_get_arg(1);\n\t\t}\n\t\t// look to see if setting id\n\t\tif ($field_name==$this->model_id_name) {\n\t\t\t$this->id = $field_value;\n\t\t} else if (key_exists($field_name,$this->attribute_definitions)) {\n\t\t\t$this->field_values[$field_name] = $field_value;\n\t\t\t$this->field_value_comparitors[$field_name] = $comparison_operator;\n\t\t}\n\t}", "title": "" }, { "docid": "930e0bb360b96845ebf803d1577734f6", "score": "0.6176364", "text": "public function setRequiredFields(array $requiredFields) {\n $this->requiredFields = $requiredFields;\n }", "title": "" }, { "docid": "0b5230c5eff77fef9c8853cc640ea136", "score": "0.61665857", "text": "function setRequiredFields(){\n // If the subscription_type is \"bookmark\", format and frequency are not required\n if( $this->Fields->SubscriptionType == \"bookmark\" ){\n $this->Fields->FrequencyId->required = false;\n \n $this->Fields->Format->required = false;\n \n $this->Fields->StartDate->display = false;\n if( $this->action != \"search\" ){\n $this->Fields->LastRun->display = false;\n $this->Fields->Format->display = false;\n $this->Fields->FrequencyId->display = false;\n }\n \n $this->description = \"Reports saved here will appear in the \\\"My Areas\\\" area of <a href=\\\"\".SITE_ROOT.\"wizard/my_profile/step/3\\\">your profile</a> for accessing later.\";\n // $this->returnpage = \"wizard/my_profile/step/3\";\n }else{\n $this->Fields->FrequencyId->required = true;\n $this->Fields->FrequencyId->display = true;\n $this->Fields->Format->required = true;\n $this->Fields->Format->display = true;\n \n // $this->returnpage = \"wizard/my_profile/step/2\";\n }\n }", "title": "" }, { "docid": "1ea0e14ae71de3fd61b80501effd4c65", "score": "0.6132861", "text": "public function required($new_value = null)\n {\n }", "title": "" }, { "docid": "2690dade373a4728d7fb5102ded1fbde", "score": "0.6069357", "text": "function set_required($required) {\r\n\t\t$this->required = $required;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "2ae0486856079c19c1ef2c0f18e14ff7", "score": "0.6049522", "text": "public function setField($var) {}", "title": "" }, { "docid": "c7a6a955897c3ae6ce21813eba598d69", "score": "0.6021581", "text": "private function setReq(...$required) : void\n {\n // Set required array\n foreach($required as $value) {\n $this->required[$value] = null;\n }\n\n // Remove empty entries\n $this->post = array_filter($_POST);\n }", "title": "" }, { "docid": "aa9c4b7c9d83c51580290d733b5a7007", "score": "0.6012548", "text": "public function setRequirements($requirements)\n\t{\n\t $this->requirements = $this->cleanHTML($requirements);\n\t}", "title": "" }, { "docid": "4002e56316b6b6fcca03367912b0654b", "score": "0.59986645", "text": "public function setFields($var) {}", "title": "" }, { "docid": "4002e56316b6b6fcca03367912b0654b", "score": "0.59986645", "text": "public function setFields($var) {}", "title": "" }, { "docid": "b449bc02140162747f8a557febfbbc7a", "score": "0.5990009", "text": "public function required()\n {\n $this->required = true;\n }", "title": "" }, { "docid": "3ad9f294a3ebc6dbaefa55fa1e55e819", "score": "0.59812313", "text": "public function set(string $claim, $value): Validator\n {\n }", "title": "" }, { "docid": "a7b76f84bb9d414bf0966edca92699b6", "score": "0.5931455", "text": "public function setRequiredFields(array $required_fields) { \n foreach($required_fields as $required_field) {\n if(isset($this->child_elements[$required_field])) {\n $this->child_elements[$required_field]->setRequired();\n }\n }\n }", "title": "" }, { "docid": "65533a0ccf780e5af74079647336645c", "score": "0.59288687", "text": "abstract public function set($field, $value);", "title": "" }, { "docid": "545b886a0c4e28464ec18ef6ebe70553", "score": "0.5907012", "text": "abstract protected function setRequiredParts();", "title": "" }, { "docid": "e993766dd70494042fd4b9aa7da4bf75", "score": "0.58882034", "text": "public function setRequired($required)\n {\n //$this->addAttribute(\"onblur\",\"fapiCheckRequired('\".$this->getId().\"')\");\n $this->addJsValidation\n (array(\n \"func\"=>\"fapiCheckRequired\",\n \"message\"=>Field::prepareMessage($this->getLabel().\" is required.\")\n )\n );\n $this->required = $required;\n return $this;\n }", "title": "" }, { "docid": "305ea3165f4d38063a2d39da00726bd4", "score": "0.5887572", "text": "public function setRequired()\n\t{\n\t\t$this->setAttribute(\"required\", \"required\");\n\t\t$this->addValidator(new NotEmpty(array(NotEmpty::STRING, NotEmpty::INT, NotEmpty::FLOAT)));\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7ac869234c0cdf16c7d8fb11f2ff9377", "score": "0.58837295", "text": "function setRequired($a_bRequired)\n {\n $this->_bRequired = (bool) $a_bRequired;\n $this->setSearchParameter('required', $this->_bRequired);\n }", "title": "" }, { "docid": "5487dd469ac5fb879dfb8f5dea27add9", "score": "0.5870813", "text": "public function setExperienceRequirements($value)\n {\n $this->experienceRequirements = $value;\n }", "title": "" }, { "docid": "e3fb4eb8137ac1fc7de2118cd6b93785", "score": "0.5843724", "text": "public function setRequiredFields($fields) {\n $this->requiredFields = $fields;\n }", "title": "" }, { "docid": "e7553bb2525810bad17ba5ca9958bbed", "score": "0.58172774", "text": "public function setEducationRequirements($value)\n {\n $this->educationRequirements = $value;\n }", "title": "" }, { "docid": "51858963dc71915760452d70d7db6a20", "score": "0.5780523", "text": "public function set_required($value)\n\t{\n\t\t$this->params['required'] = (bool) $value;\n\t}", "title": "" }, { "docid": "441ec3e91112f231828ef5b670746675", "score": "0.57695746", "text": "public function setRequired(bool $required): void\n {\n $this->required = $required;\n }", "title": "" }, { "docid": "ef76fc20ac6f56e4033cc1cc8a116b74", "score": "0.5740466", "text": "protected function setRequiredError() { \n $this->setErrorMessage(\"{$this->label} is a required field.\");\n }", "title": "" }, { "docid": "0b6f406b9d4b9f31772ecdb1515fc5d6", "score": "0.57214993", "text": "public function setField($field, $value);", "title": "" }, { "docid": "b1bc08f968096d6d50d4dd0b694b1ccf", "score": "0.5703745", "text": "public function SetNotRequired()\n {\n $this->pageField->SetNotRequired();\n }", "title": "" }, { "docid": "c73344307e247c369d9d9896c1e4cbee", "score": "0.56770897", "text": "public function test_null_values_do_not_pass_requirements()\n {\n $required_parameter = \"value\";\n $array = [ 'value' => null ];\n $requirements = [ $required_parameter ];\n\n Verification\\require_set($array, $requirements);\n }", "title": "" }, { "docid": "aa0868a266fc4d187b89fd2b967e9efd", "score": "0.5633303", "text": "public function setField($field, $input, $value): static;", "title": "" }, { "docid": "3cb42aab968a941a3c352295261b6ca8", "score": "0.5613456", "text": "protected function _updateSpecificFields(){\r\n\t}", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.55798984", "text": "public function setField($field);", "title": "" }, { "docid": "7c5f098b1c15380e5224215c4098394c", "score": "0.55798984", "text": "public function setField($field);", "title": "" }, { "docid": "e088c9605b9d6af21155bc431717b332", "score": "0.5579121", "text": "public function setRestrictions();", "title": "" }, { "docid": "5c2c5df1dbcdd162fae4cb70c57e5c92", "score": "0.5574551", "text": "public function test_it_fails_when_a_requirement_is_not_present()\n {\n $required_parameter = \"value\";\n $array = [ 'object' => 'mock' ];\n $requirements = [ $required_parameter ];\n\n Verification\\require_set($array, $requirements);\n }", "title": "" }, { "docid": "549aa82a27085a1b1364c66a9b808f37", "score": "0.5557485", "text": "public function setRequired(?bool $value): void {\n $this->getBackingStore()->set('required', $value);\n }", "title": "" }, { "docid": "b0d96d2d4dffda901fcdc498e6b08ac2", "score": "0.55507225", "text": "public function setFieldWithValue($field, $value);", "title": "" }, { "docid": "ce75036ddde7aab4537238d58c04b2da", "score": "0.55464184", "text": "function required($fieldname, $value = true)\n\t{\n\t\t$this->setValidationOption($fieldname, 'required', $value);\n\t}", "title": "" }, { "docid": "f20baa3409f8aeb2cabf04e3907b9e44", "score": "0.54992986", "text": "public function setDataFromRequest(\\App\\Request $request): void\n\t{\n\t\tforeach ($this->getModule()->getFormFields() as $fieldName => $fieldInfo) {\n\t\t\tif ($request->has($fieldName)) {\n\t\t\t\t$value = $request->getByType($fieldName, $fieldInfo['purifyType']);\n\t\t\t\t$fieldModel = $this->getFieldInstanceByName($fieldName)->getUITypeModel();\n\t\t\t\t$fieldModel->validate($value, true);\n\t\t\t\t$this->set($fieldName, $fieldModel->getDBValue($value));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c807dea67ee2c532f4b410cd559de9ab", "score": "0.54972744", "text": "private function checkSetChargeValues() {\n\t\tif ($this->isInt($this->requestVehicle)) {\n\t\t\tif ($this->isInt($this->requestCategory)) {\n\t\t\t\tif ($this->isDate($this->requestDate)) {\n\t\t\t\t\tif (is_numeric($this->requestKilometers)) {\n\t\t\t\t\t\tif (is_numeric($this->requestAmount)) {\n\t\t\t\t\t\t\tif ($this->requestCategory == 1) {\n\t\t\t\t\t\t\t\tif (!is_numeric($this->requestQuantity)) $this->setError(175);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse $this->setError(174);\n\t\t\t\t\t}\n\t\t\t\t\telse $this->setError(173);\n\t\t\t\t}\n\t\t\t\telse $this->setError(172);\n\t\t\t}\n\t\t\telse $this->setError(171);\n\t\t}\n\t\telse $this->setError(170);\n\t}", "title": "" }, { "docid": "115541cca7889ae16d55935304b0021a", "score": "0.5476541", "text": "public function setTermsField($fieldname) {}", "title": "" }, { "docid": "ecdc8eac48fa61b9e00b27932c487521", "score": "0.54681784", "text": "public function optional()\n {\n $this->required = false;\n }", "title": "" }, { "docid": "fd38dd21127b242f3d532dc788cbd2d6", "score": "0.5459682", "text": "public function applyRequirements(): void\n {\n }", "title": "" }, { "docid": "aa89fa032a7d9b061d5a1bfddebcbc68", "score": "0.54401106", "text": "public function setRequired($field, $raisin = \"\"){\n\t\t\t$this->setValidation($field, $raisin);\n\t\t}", "title": "" }, { "docid": "9a3388f587d162380838bb86abd2d29c", "score": "0.5427174", "text": "function setJobCreditsRequired($required)\n {\n $this->__job_credits_required = $required ;\n }", "title": "" }, { "docid": "3e6f197b1198cba4cccaaf27e693e414", "score": "0.5423823", "text": "function set_fieldname($name)\n {\n $this->_fieldname = $name;\n }", "title": "" }, { "docid": "c13a962bfaf674e13f35ec3da16ba64b", "score": "0.53958106", "text": "public function setRequirements(array $requirements)\n {\n $this->requirements = array();\n return $this->addRequirements($requirements);\n }", "title": "" }, { "docid": "d84f8a5ac92df4fb55b8198b5d542da9", "score": "0.5390368", "text": "public function set_required($value = true)\r\n\t{\n\t\tif (!$value) {\n\t\t\treturn $this->remove_attr('required');\n\t\t}\n\r\n\t\treturn $this->set_attr('required', 'required');\r\n\t}", "title": "" }, { "docid": "edaa2043999f70174666e869f0f41700", "score": "0.5373069", "text": "function set($fieldName, $value)\n\t\t{\n\t\t\tif (array_key_exists($arguments[0], $this->ruleAttrs))\n\t\t\t\t$this->assignAttrs[$arguments[0]] = $arguments[1];\n\t\t\telse\n\t\t\t\tthrow new Exception($arguments[0] . ' is not defined attribute.', 1);\t\n\t\t}", "title": "" }, { "docid": "2a88303cec2dd3e9c37dec58446f6e76", "score": "0.53645295", "text": "public function fieldAllowedValues($field);", "title": "" }, { "docid": "6217fd643841e8f5738a5da6fe2c1a47", "score": "0.5337795", "text": "public function setMinLength($value) {\n\t\t$value = JsonFormBuilder::forceNumber($value);\n\t\tif($this->_maxLength!==NULL && $this->_maxLength<$value){\n\t\t\tJsonFormBuilder::throwError('[Element: '.$this->_id.'] Cannot set minimum length to \"'.$value.'\" when maximum length is \"'.$this->_maxLength.'\"');\n\t\t}else{\n\t\t\t//if($this->_required===false){\n\t\t\t\t//JsonFormBuilder::throwError('[Element: '.$this->_id.'] Cannot set minimum length to \"'.$value.'\" when field is not required.');\n\t\t\t//}else{\n\t\t\t\t$this->_minLength = JsonFormBuilder::forceNumber($value);\n\t\t\t//}\n\t\t}\n\t}", "title": "" }, { "docid": "39ecb3a126a83396321c9a34279db8b0", "score": "0.5337054", "text": "public function setMinRequired($minRequired)\n\t{\n\t\t$this->_minRequired = (int)$minRequired;\n\t}", "title": "" }, { "docid": "1b9f551af9d92a291b8ea0f3df17065f", "score": "0.5321542", "text": "function setFieldValue($name, $value) {\n $real_name = $this->realFieldName($name);\n \n $set = $value;\n switch($real_name) {\n case 'id':\n $set = intval($value);\n break;\n case 'company_id':\n $set = intval($value);\n break;\n case 'project_id':\n $set = intval($value);\n break;\n case 'currency_id':\n $set = intval($value);\n break;\n case 'language_id':\n $set = intval($value);\n break;\n case 'number':\n $set = strval($value);\n break;\n case 'company_address':\n $set = strval($value);\n break;\n case 'comment':\n $set = strval($value);\n break;\n case 'note':\n $set = strval($value);\n break;\n case 'status':\n $set = intval($value);\n break;\n case 'issued_on':\n $set = dateval($value);\n break;\n case 'issued_by_id':\n $set = intval($value);\n break;\n case 'issued_by_name':\n $set = strval($value);\n break;\n case 'issued_by_email':\n $set = strval($value);\n break;\n case 'issued_to_id':\n $set = intval($value);\n break;\n case 'due_on':\n $set = dateval($value);\n break;\n case 'closed_on':\n $set = datetimeval($value);\n break;\n case 'closed_by_id':\n $set = intval($value);\n break;\n case 'closed_by_name':\n $set = strval($value);\n break;\n case 'closed_by_email':\n $set = strval($value);\n break;\n case 'created_on':\n $set = datetimeval($value);\n break;\n case 'created_by_id':\n $set = intval($value);\n break;\n case 'created_by_name':\n $set = strval($value);\n break;\n case 'created_by_email':\n $set = strval($value);\n break;\n } // switch\n return parent::setFieldValue($real_name, $set);\n }", "title": "" }, { "docid": "ec5461c63093a60b92c85cbe76097ac6", "score": "0.5321409", "text": "public function setSpecifiedCompletionRequirements(?PlannerTaskCompletionRequirements $value): void {\n $this->getBackingStore()->set('specifiedCompletionRequirements', $value);\n }", "title": "" }, { "docid": "cd1b9530adf0cbe167d2e56eeb998913", "score": "0.53175086", "text": "public function test_empty_string_values_do_not_pass_requirements()\n {\n $required_parameter = \"value\";\n $array = [ 'value' => \"\" ];\n $requirements = [ $required_parameter ];\n\n Verification\\require_set($array, $requirements);\n }", "title": "" }, { "docid": "a841a00311f95d9ef985da8f9fc7b35c", "score": "0.5316702", "text": "public function setRequired($required = true) {\n\t\tif ($required) return $this->setAttribute('required', 'required');\n\t\telse return $this->removeAttribute('required');\n\t}", "title": "" }, { "docid": "351e84b903fcab28aab360da0d1eed66", "score": "0.52999103", "text": "public function setRequiredMulti(){\n\t\t\t$args = func_get_args();\n\t\t\t$argc = func_num_args();\n\t\t\tif(empty($argc))\n\t\t\t\treturn false;\n\t\t\t\n\t\t\tforeach($args as $arg){\n\t\t\t\tif(is_string($arg))\n\t\t\t\t\t$this->setValidation($arg);\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "f48edd153018bf6eb942d08f760ba11f", "score": "0.5296206", "text": "public function setRequiredFields(array $required_fields): INabuDataListReader;", "title": "" }, { "docid": "f6d434795e15f13522789701b6d670b8", "score": "0.52874583", "text": "function setUserOptionalFields($num)\n {\n $this->__user_optional_fields = $num ;\n }", "title": "" }, { "docid": "f1a1899e01e84a404d42150d7e843448", "score": "0.5287384", "text": "public function setRequired($required)\n {\n if ($required) {\n $this->setAttribute('required', 'required');\n } else {\n $this->removeAttribute('required');\n }\n return parent::setRequired($required);\n }", "title": "" }, { "docid": "b2860366d1c2d27c51121e69d9d0fa13", "score": "0.52829695", "text": "public function makeMandatory(): void;", "title": "" }, { "docid": "bf22097d479cf6b911e564f2d92277b9", "score": "0.527217", "text": "public function setRequired($required)\n {\n $this->set('required', $required);\n return $this;\n }", "title": "" }, { "docid": "bd3895aa6bcd9fd22f5bb8051161c933", "score": "0.52700496", "text": "public function validateField();", "title": "" }, { "docid": "8dcef303e9c201e936839c15b9efeb06", "score": "0.52461225", "text": "abstract public function set();", "title": "" }, { "docid": "a293dfd384556ed7a1bb8bafc63e6ff5", "score": "0.5223017", "text": "public function setAreCasesRequired($value) \n {\n $this->_fields['AreCasesRequired']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "f45937266daa125d80e773dee2de70f7", "score": "0.52039844", "text": "private function set_data()\n {\n foreach ($this->fields as $name => &$field)\n if (array_key_exists($name, $this->data))\n $field->set_value($this->data[$name]);\n }", "title": "" }, { "docid": "a6330ad7cd97cac80745c21af8cb97ee", "score": "0.5201018", "text": "function setValidationOptions($fieldname, $value)\n\t{\n\t\t$this->setFieldParam($fieldname, \"validation\", $value);\n\t}", "title": "" }, { "docid": "c60b29ce8c88362d11385ea69cae0cc0", "score": "0.5186986", "text": "protected function FillFieldsValuesFromRequest() {\n\t\tforeach($this->m_fieldsMetadata as $lFieldName => $lFieldInfo){\n\t\t\t$lFieldValue = $this->GetValueFromRequest($lFieldName, $this->m_formMethod);\n\t\t\t// var_dump('REQ', $lFieldName, $lFieldValue['value'],\n\t\t\t// $_REQUEST[$lFieldName]);\n\t\t\t// echo \"\\n <br/>\";\n\t\t\t$this->m_fieldsValues[$lFieldName] = $lFieldValue['value'];\n\t\t}\n\t}", "title": "" }, { "docid": "5b45a17f10c8016d5e6f240caf168499", "score": "0.51775014", "text": "function is_set($field) {\n\t\treturn $this->version->is_set($field) || parent::is_set($field);\n\n\t}", "title": "" }, { "docid": "5d1447da3c6866dfa55a5ef872b169d5", "score": "0.51743764", "text": "public function setRequired($required)\n {\n $this->required = $required;\n\n return $this;\n }", "title": "" }, { "docid": "2c501d5b30e42b92e65e062dfb600e72", "score": "0.5171799", "text": "public function ftagementor_maybe_set_required_attribute( $args ) {\r\n\t\t\tif ( ! isset( $args['required'] ) ) {\r\n\t\t\t\treturn $args;\r\n\t\t\t}\r\n\r\n\t\t\t// Comply with HTML specs.\r\n\t\t\tif ( true === $args['required'] ) {\r\n\t\t\t\t$args['required'] = 'required';\r\n\t\t\t}\r\n\r\n\t\t\treturn $args;\r\n\t\t}", "title": "" }, { "docid": "a5e034d521946a9488ab996c5a90f281", "score": "0.5170898", "text": "public function setRequired($required = null)\n {\n if (null === $required) {\n $this->required = null;\n return $this;\n }\n if ($required instanceof FHIRBoolean) {\n $this->required = $required;\n return $this;\n }\n $this->required = new FHIRBoolean($required);\n return $this;\n }", "title": "" }, { "docid": "1aa3a87cf0b8e2aa3f899cb8740c19b2", "score": "0.515765", "text": "function setValidationOption($fieldname, $innername, $value)\n\t{\n\t\t$this->setFieldInnerParam($fieldname, \"validation\", $innername, $value);\n\t}", "title": "" }, { "docid": "85c9d0d1fb42bbb4e38a717341e22b8f", "score": "0.51395375", "text": "public final function setRequired($required = true) {\n\t\t$this->_options['required'] = $required;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "77c9e8b08130ce88ec8288fcd10b239e", "score": "0.5139126", "text": "public function __set($sField, $mValue)\n\t{\n\t}", "title": "" }, { "docid": "0f750cdedbc95c169cd2bba708b8fe31", "score": "0.51380724", "text": "private function _set_fields()\n\t{\n\t\t$this->form_data = new StdClass;\n\t\t$this->form_data->exam_id = 0;\n $this->form_data->exam_id_hidden = 0;\n $this->form_data->ue_start_date = date('d/m/Y');\n $this->form_data->ue_start_time = '12:00 AM';\n $this->form_data->ue_end_date = date('d/m/Y', strtotime('1 month', time()));\n $this->form_data->ue_end_time = '12:00 AM';\n $this->form_data->user_group_id = '';\n $this->form_data->user_team_id = '';\n $this->form_data->user_result_show = 1;\n\t}", "title": "" }, { "docid": "03c85e52958872fe43a665fa6fbf44b6", "score": "0.51313025", "text": "public function setRequired(bool $required): FormElement\n {\n $this->required = $required;\n return $this;\n }", "title": "" }, { "docid": "487c410cc3075da4ee162450ed44953f", "score": "0.5124897", "text": "public function updateModel()\r\n {\r\n if (!$this->isValid() || !$this->isLocalValueSet()) {\r\n return ;\r\n }\r\n \r\n $form = $this->getForm();\r\n if($form !== null && (!$form->isValid() || !$form->isSubmitted())){\r\n return ;\r\n }\r\n \r\n $binding = $this->getValueBinding('binding');\r\n if ($binding != null) {\r\n try {\r\n \r\n $this->getLogger()->info('Set binded value to: ' . \r\n Adept_ClassKit_Util::toString($this->getLocalValue()));\r\n \r\n $binding->setValue($this->getExpressionContext(), $this->getLocalValue());\r\n $this->setValue(null);\r\n \r\n $this->getLogger()->fine('Binded value setted correctly ');\r\n return;\r\n } catch (Adept_Validator_Exception $e) {\r\n // Validation failed in setter\r\n \r\n $this->setValid(false);\r\n \r\n \r\n $this->getLogger()->exception($e);\r\n } \r\n }\r\n }", "title": "" }, { "docid": "dc9be8337017b99feac338754f91c6da", "score": "0.5117058", "text": "function fill_field( $field, $value, $overwrite = false )\r\n {\r\n \r\n if( ( ! isset( $_SESSION[\"oe_form\"][$this->api_call][\"data\"] ) ) or $overwrite == true )\r\n {$this->data[$field] = $value ; }\r\n }", "title": "" }, { "docid": "4fc55891a2ced47ccbc2e52b34d9875b", "score": "0.51112276", "text": "abstract protected function setValue($value);", "title": "" }, { "docid": "e038cd77baf0d39cf9881216b3630124", "score": "0.5111055", "text": "abstract public function setValue($value);", "title": "" }, { "docid": "18282ea18b334057b3b9988064b1277a", "score": "0.5106399", "text": "public function setValue($field_value) { \n $this->value = $field_value;\n \n $this->setAttribute('value', $field_value);\n }", "title": "" }, { "docid": "aa44b49d8aa27002ecaf889ea835ba96", "score": "0.5105759", "text": "public function offsetSet($key, $value)\n {\t \n $this->getField()->getSchema()->validate($value);\n parent::offsetSet($key, $value);\n }", "title": "" }, { "docid": "959894aececec96bbf3d99727c1bb56c", "score": "0.5105305", "text": "public function validate(): void\n {\n if (null === $this->isValid) {\n if (null === $this->userValue && null !== $this->defaultValue) {\n // There is a preset value, and its not being changed\n $this->isValid = true;\n } elseif (null !== $this->validator && false !== $this->validator) {\n if ('' === $this->userValue && false === $this->required) {\n $this->isValid = true;\n return;\n } elseif ('' === $this->userValue && true === $this->required) {\n $this->isValid = false;\n return;\n }\n $validator = $this->validator;\n $result = $validator::quickValidate($this->userValue, $this->filters, $this->constraints, $this->error);\n if ($result != null) {\n $this->userValue = $result;\n $this->isValid = true;\n } else {\n $this->userValue = null;\n $this->isValid = false;\n }\n } else {\n // This field does not get validated\n $this->isValid = true;\n }\n }\n // Check if the input is different from the default value\n if ($this->isValid && null !== $this->userValue) {\n $this->isChanged = ($this->defaultValue != $this->userValue);\n }\n }", "title": "" }, { "docid": "6d73fadbaf5937648a68fd74c3150776", "score": "0.50992364", "text": "public function setField(Fieldset $fieldset);", "title": "" }, { "docid": "b72a20df66d78cf17c2286a836535ce8", "score": "0.50945127", "text": "function setFieldParam($fieldname, $name, $value)\n\t{\n\t\tif (is_array($fieldname))\n\t\t\tforeach ($fieldname as $fieldn)\n\t\t\t{\n\t\t\t\tif (isset($this->table->fields[$fieldn]))\n\t\t\t\t\t$this->table->fields[$fieldn]->$name = $value;\n\t\t\t\telse\n\t\t\t\t\ttrigger_error(\"No field exists with the name: $fieldn\");\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\tif (isset($this->table->fields[$fieldname]))\n\t\t\t{\n\t\t\t\t$this->table->fields[$fieldname]->$name = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t\ttrigger_error(\"No field exists with the name: $fieldname\");\n\t\t}\n\t}", "title": "" }, { "docid": "6b49d925c23ffee91d63bf5d7acdff88", "score": "0.50750107", "text": "abstract function setValue($value);", "title": "" }, { "docid": "64e808e354cb349000a580751a28c0b9", "score": "0.50632024", "text": "public function testUpdateQuickAdjustmentCustomFields()\n {\n }", "title": "" }, { "docid": "e3d9a75a9d74e5015e2a994dc69fe020", "score": "0.505285", "text": "public function setup()\n {\n\n $this->setValidators([\n 'type' => new sfValidatorChoice([\n 'choices' => self::SCOPES,\n 'required' => true,\n ]),\n ]);\n\n $this->optional_forms = [\n self::SCOPE_CONTACTS => new ContactsGridScopeFilterForm($this->account->getLicense(), $this->account),\n self::SCOPE_CAMPAIGN_REPORT => new CampaignReportRecipientsScope($this->account),\n self::SCOPE_CAMPAIGN_RECIPIENTS => new CampaignRecipientsScope($this->account),\n ];\n\n $this->validatorSchema->setOption('allow_extra_fields', true);\n $this->validatorSchema->setOption('filter_extra_fields', false);\n\n $this->validatorSchema->setPostValidator(new sfValidatorCallback([\n 'callback' => function (sfValidatorCallback $validator, array $values) {\n\n $type = array_pull($values, 'type');\n switch ($type) {\n case self::SCOPE_CONTACTS:\n case self::SCOPE_CAMPAIGN_REPORT:\n case self::SCOPE_CAMPAIGN_RECIPIENTS:\n $scope_values = $this->optional_forms[$type]->getValidatorSchema()->clean($values); // will throw if invalid\n $values = array_merge($values, $scope_values);\n break;\n\n default:\n throw new CustomMessageValidatorError(\n $validator,\n 'WTF? This should never happen! \"type\" validator should not pass invalid values here',\n 'invalid'\n );\n }\n\n return array_merge($values, ['type' => $type]);\n }\n ]));\n }", "title": "" }, { "docid": "af0d349d9430e1f40138c412be8553b3", "score": "0.505275", "text": "public function testUpdateAllowedValues() {\n // All three options appear.\n $entity = EntityTest::create();\n $form = \\Drupal::service('entity.form_builder')->getForm($entity);\n $this->assertArrayHasKey(1, $form[$this->fieldName]['widget'], 'Option 1 exists');\n $this->assertArrayHasKey(2, $form[$this->fieldName]['widget'], 'Option 2 exists');\n $this->assertArrayHasKey(3, $form[$this->fieldName]['widget'], 'Option 3 exists');\n\n // Use one of the values in an actual entity, and check that this value\n // cannot be removed from the list.\n $entity = EntityTest::create();\n $entity->{$this->fieldName}->value = 1;\n $entity->save();\n $this->fieldStorage->setSetting('allowed_values', [2 => 'Two']);\n try {\n $this->fieldStorage->save();\n $this->fail('Cannot update a list field storage to not include keys with existing data.');\n }\n catch (FieldStorageDefinitionUpdateForbiddenException $e) {\n // Expected exception; just continue testing.\n }\n // Empty the value, so that we can actually remove the option.\n unset($entity->{$this->fieldName});\n $entity->save();\n\n // Removed options do not appear.\n $this->fieldStorage->setSetting('allowed_values', [2 => 'Two']);\n $this->fieldStorage->save();\n $entity = EntityTest::create();\n $form = \\Drupal::service('entity.form_builder')->getForm($entity);\n $this->assertArrayNotHasKey(1, $form[$this->fieldName]['widget'], 'Option 1 does not exist');\n $this->assertArrayHasKey(2, $form[$this->fieldName]['widget'], 'Option 2 exists');\n $this->assertArrayNotHasKey(3, $form[$this->fieldName]['widget'], 'Option 3 does not exist');\n\n // Completely new options appear.\n $this->fieldStorage->setSetting('allowed_values', [10 => 'Update', 20 => 'Twenty']);\n $this->fieldStorage->save();\n // The entity holds an outdated field object with the old allowed values\n // setting, so we need to reinitialize the entity object.\n $entity = EntityTest::create();\n $form = \\Drupal::service('entity.form_builder')->getForm($entity);\n $this->assertArrayNotHasKey(1, $form[$this->fieldName]['widget'], 'Option 1 does not exist');\n $this->assertArrayNotHasKey(2, $form[$this->fieldName]['widget'], 'Option 2 does not exist');\n $this->assertArrayNotHasKey(3, $form[$this->fieldName]['widget'], 'Option 3 does not exist');\n $this->assertArrayHasKey(10, $form[$this->fieldName]['widget'], 'Option 10 exists');\n $this->assertArrayHasKey(20, $form[$this->fieldName]['widget'], 'Option 20 exists');\n\n // Options are reset when a new field with the same name is created.\n $this->fieldStorage->delete();\n FieldStorageConfig::create($this->fieldStorageDefinition)->save();\n FieldConfig::create([\n 'field_name' => $this->fieldName,\n 'entity_type' => 'entity_test',\n 'bundle' => 'entity_test',\n 'required' => TRUE,\n ])->save();\n \\Drupal::service('entity_display.repository')\n ->getFormDisplay('entity_test', 'entity_test')\n ->setComponent($this->fieldName, [\n 'type' => 'options_buttons',\n ])\n ->save();\n $entity = EntityTest::create();\n $form = \\Drupal::service('entity.form_builder')->getForm($entity);\n $this->assertArrayHasKey(1, $form[$this->fieldName]['widget'], 'Option 1 exists');\n $this->assertArrayHasKey(2, $form[$this->fieldName]['widget'], 'Option 2 exists');\n $this->assertArrayHasKey(3, $form[$this->fieldName]['widget'], 'Option 3 exists');\n\n // Test the generateSampleValue() method.\n $entity = EntityTest::create();\n $entity->{$this->fieldName}->generateSampleItems();\n $this->entityValidateAndSave($entity);\n }", "title": "" }, { "docid": "7bc080eccfd6cc551139f134246815c0", "score": "0.5045954", "text": "public function setIsExpirationRequired($val)\n {\n $this->_propDict[\"isExpirationRequired\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "7cca6b52296b0d8ae41d4d9df6c27c9d", "score": "0.50329465", "text": "public function buildRestrictionElement(): void;", "title": "" }, { "docid": "1d89e4a0c6568bc1803b9c5b013e015d", "score": "0.502904", "text": "function setField($field){\n if (trim($field)== 'RGN') $field = 'CMCRGN';\n \n return $field;\n}", "title": "" }, { "docid": "11ccd2b8c0a713277526e8483893245a", "score": "0.5024935", "text": "public function required($callback = true): Field\n {\n $this->required = $callback;\n\n return parent::required($callback);\n }", "title": "" }, { "docid": "819de0adf0d4c99aef82edaeb99bdf64", "score": "0.5021369", "text": "function setDataField($dataField){\n\t\t$this->dataField=$dataField;\n\t}", "title": "" }, { "docid": "008c86219553d840e0bea4e91a565b5a", "score": "0.50209063", "text": "public function setRequired($required)\n {\n $this->required = (bool)$required;\n\n return $this;\n }", "title": "" }, { "docid": "58e14d009ea87b69cc184998f4f5a17d", "score": "0.50175625", "text": "public function setFields(array $fields);", "title": "" } ]
7b14ac460d13281e1d9ad46f9d52f511
getBlockLabel get block title
[ { "docid": "ca84e78d9ee63808db3e8d858ce1b52a", "score": "0.65801543", "text": "public function getBlockLabel($blockId)\n {\n try {\n $block = $this->_blockRepository->getById($blockId);\n return $block->getTitle();\n } catch (\\Exception $e) {\n return null;\n }\n }", "title": "" } ]
[ { "docid": "7adf05b9c51a5df5af31fb8352a5e413", "score": "0.8185942", "text": "public function getBlockTitle();", "title": "" }, { "docid": "2d9c7e86d454f78f2280fb353869c481", "score": "0.6846643", "text": "public function getTitle()\n {\n return Mage::helper('bluesnap')->getBuynowTitle();\n }", "title": "" }, { "docid": "84cd1c1ce5fcd1a78b5d52215538a873", "score": "0.68336153", "text": "public function getTitleLabel()\n {\n return $this->titleLabel;\n }", "title": "" }, { "docid": "85bbea4cc604332f79a6dede3ddc97c9", "score": "0.66897523", "text": "public function getBlockName();", "title": "" }, { "docid": "baaba47fce06e9e6454556f941e9099b", "score": "0.6575807", "text": "public function getTabTitle()\n {\n return __('Banner Information');\n }", "title": "" }, { "docid": "7caf4cec3ba28f90eaaed8367a69f753", "score": "0.65591425", "text": "public function getName()\n {\n return $this->getBlockPrefix();\n }", "title": "" }, { "docid": "7caf4cec3ba28f90eaaed8367a69f753", "score": "0.65591425", "text": "public function getName()\n {\n return $this->getBlockPrefix();\n }", "title": "" }, { "docid": "7caf4cec3ba28f90eaaed8367a69f753", "score": "0.65591425", "text": "public function getName()\n {\n return $this->getBlockPrefix();\n }", "title": "" }, { "docid": "7caf4cec3ba28f90eaaed8367a69f753", "score": "0.65591425", "text": "public function getName()\n {\n return $this->getBlockPrefix();\n }", "title": "" }, { "docid": "870dcf72bb0c70aff46251b666d702a6", "score": "0.6540591", "text": "public function label()\r\n {\r\n \t\t$name = $this->getName();\r\n \tif ( $name )\r\n \t{\r\n \t\treturn $name;\r\n \t}\r\n \telse\r\n \t{\r\n \t\treturn \"---\";\r\n \t}\r\n }", "title": "" }, { "docid": "2bba1afd85bf3f81088b9a12aa93b283", "score": "0.6534744", "text": "public function getTabLabel()\n {\n return __('Banner Information');\n }", "title": "" }, { "docid": "d46e8df4a3996dbe26574ca6a916c767", "score": "0.65252846", "text": "public function getNavLabel()\n {\n return $this->title;\n }", "title": "" }, { "docid": "de32f3edcfaeaa2d317408495f123b9b", "score": "0.6513147", "text": "public function getTitle(){\n\t\treturn $this->_getHelper('heidelpay')->__($this->getConfigData('title'));\n\t}", "title": "" }, { "docid": "a7fb74f926af7769fb31e56b20eb98c0", "score": "0.6506272", "text": "public function title() {\n return $this->info['name'];\n }", "title": "" }, { "docid": "147e659cb6c128aa4e382b8eca249552", "score": "0.6499503", "text": "public function getTitle()\n {\n if(\\Yii::$app->language == 'ru'){\n return $this->title_ru;\n }\n if(\\Yii::$app->language == 'uz'){\n return $this->title;\n }\n if(\\Yii::$app->language == 'en'){\n return $this->title_en;\n }\n \n }", "title": "" }, { "docid": "31a1dfcc57ea586a2f4978e03c3bbc3c", "score": "0.6487866", "text": "protected function _getAssetTitle()\n\t{\n\t\treturn $this->name;\n\t}", "title": "" }, { "docid": "1cf896586ec06c52f8d30e02aa8aa49e", "score": "0.64868194", "text": "public function getTabTitle()\n {\n return __('Banners');\n }", "title": "" }, { "docid": "143fa54993177bb6bf3df6f90bee96df", "score": "0.6478389", "text": "public function getTabTitle()\n {\n return __('Title');\n }", "title": "" }, { "docid": "1bd6fae54feed2541242518478ef7f64", "score": "0.64668125", "text": "public function getTabLabel()\n {\n return $this->getTabTitle();\n }", "title": "" }, { "docid": "f65f88883c8d6f373a9d66f609b5f94e", "score": "0.64613646", "text": "public function title()\n\t{\n\t\treturn $this->_obj->get('name');\n\t}", "title": "" }, { "docid": "fae94f278f7382c102cbf72574a0c5c8", "score": "0.6451272", "text": "public function getTabLabel()\n {\n return __('Content');\n }", "title": "" }, { "docid": "e3121b05a60b24d1a27db0ca7221bfd2", "score": "0.6448996", "text": "public function getTitle() {\n\t\treturn $this->originalAsset->getTitle();\n\t}", "title": "" }, { "docid": "d34e2a41d1bb80c99d80f767d2cb51f9", "score": "0.64441675", "text": "public function getTabTitle()\n {\n return __('Content');\n }", "title": "" }, { "docid": "764b04d842e6ae4b5dc5403c10d18f6d", "score": "0.6442557", "text": "public function getTabLabel()\n {\n return __('Template');\n }", "title": "" }, { "docid": "18f07fadfd068c0c114449470c117e5b", "score": "0.643719", "text": "function block_name() {\r\n\t\treturn str_replace('liquidtag', '', strtolower(get_class($this)));\r\n\t\t\r\n\t}", "title": "" }, { "docid": "c85cdab3bb948a6dbd8192112fb4809e", "score": "0.6430942", "text": "public function getTitle()\n\t{\n\t\tif (Blocks::hasPackage(BlocksPackage::PublishPro))\n\t\t{\n\t\t\t$section = blx()->sections->getSectionById($this->getSettings()->section);\n\n\t\t\tif ($section)\n\t\t\t{\n\t\t\t\treturn Blocks::t('Post a new {section} entry', array('section' => $section->name));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Blocks::t('Post a new blog entry');\n\t\t}\n\t}", "title": "" }, { "docid": "bf1ce8b8a5b42f09c17a87260b9f5536", "score": "0.641934", "text": "public function getTitle()\n {\n return Mage::helper('ddg')->__(\"Engagement Cloud Data Analysis\");\n }", "title": "" }, { "docid": "e6726e59a81af422133da4f04de18980", "score": "0.6391634", "text": "public function getTabLabel(){\n\t\treturn Mage::helper('core')->__('Contentor Localization');\n\t}", "title": "" }, { "docid": "2c84c523becc0e4a23a45becf085ca1e", "score": "0.6391081", "text": "public function getTitle()\n {\n return $this->name;\n }", "title": "" }, { "docid": "8c6c586ececa20f42d740520b7a3132f", "score": "0.63870174", "text": "public function getFrontendLabel();", "title": "" }, { "docid": "d2f64d576a134fe5a2671ae92d2f8931", "score": "0.6378537", "text": "public function getTabTitle()\n {\n return Mage::helper('temando')->__('General Information');\n }", "title": "" }, { "docid": "631ceddd4ca89b3610923c72613c093f", "score": "0.63632", "text": "public function get_title()\n {\n return __('How It Works', 'careerfy-frame');\n }", "title": "" }, { "docid": "f5a840a43736acd45e78922fb04cbdd1", "score": "0.6362928", "text": "public function getTitle() {\n return $this->name;\n }", "title": "" }, { "docid": "ed3c69a845354c7d68da7c417c60b791", "score": "0.6360145", "text": "public function getTabLabel()\n {\n return __('Banners');\n }", "title": "" }, { "docid": "5f602bad1c9dbd7ae6db83eff587890a", "score": "0.63529545", "text": "public function getTitle()\n {\n return $this->getKanbanBoardTitle();\n }", "title": "" }, { "docid": "b6fecd9149ba9910ece551b5ca10e872", "score": "0.6350944", "text": "public function getTabLabel()\n {\n return Mage::helper('temando')->__('General Information');\n }", "title": "" }, { "docid": "71801a266259a16c0eeffa482283f0bd", "score": "0.6349164", "text": "public function getTabTitle()\r\n {\r\n return __('Gift Code Information');\r\n }", "title": "" }, { "docid": "5a9347a731c7671ff3325fa28a597183", "score": "0.63398117", "text": "protected function _getAssetTitle()\n\t{\n\t\treturn $this->_title;\n\t}", "title": "" }, { "docid": "7f7f0ad12fe37d797441692b3977fbfa", "score": "0.6332815", "text": "public function title()\n\t{\n\t\treturn $this->getValue('title');\n\t}", "title": "" }, { "docid": "c698bbd689c84897395ac33c363fd30b", "score": "0.6330455", "text": "public function getTitle(){\n\t\treturn $this->_processComponent->titles[$this->_index];\n\t}", "title": "" }, { "docid": "0d5a19056bfbb904c035c92417316d60", "score": "0.63272804", "text": "protected abstract function get_label();", "title": "" }, { "docid": "652cf657952fb5a690c8b6020e731674", "score": "0.63248956", "text": "protected function getLabel() {\n\t\t\n\t\t$html = '';\n\t\t$value = trim($this->element['title']);\n\n\t\t$html .= '<div style=\"clear: both;\"></div>';\n\t\t$html .= '<div style=\"margin: 20px 0 20px 20px; font-weight: bold; padding: 5px; color: #444444; border-bottom: 1px solid #444444;\">';\n\t\tif ($value) {\n\t\t\t$html .= JText::_($value);\n\t\t}\n\t\t$html .= '</div>';\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "6d8189fe4ddf8f7acc13c5018d8e641c", "score": "0.6321126", "text": "public function getName() {\n return 'lcn_template_block';\n }", "title": "" }, { "docid": "3cc52fda61a3e4c00b53f3fd25ec5d83", "score": "0.63189507", "text": "public function getTabLabel()\n {\n return Mage::helper('testimonials')->__('Testimonial Information');\n }", "title": "" }, { "docid": "9af04efda84bdf22cf08daf03552c19d", "score": "0.6313086", "text": "public function gettitle()\r\n\t{\r\n\t\t\r\n\t\treturn $this->title; #return name\r\n\t\r\n\t}", "title": "" }, { "docid": "053d566a9b3a7476bf7a8856a56d0742", "score": "0.6279976", "text": "public function getTitle()\n {\n return $this->data['title'];\n }", "title": "" }, { "docid": "15134fe04699cd38f5ed7bc39c8bb0db", "score": "0.6276151", "text": "public function getName()\n {\n return $this->title;\n }", "title": "" }, { "docid": "77bcb040404f7b5e2a354ea2cd99cbf2", "score": "0.62693673", "text": "function getLabel()\n {\n if ($this->labelTemplate == '') {\n \n $label = $this->labelManager->getLabel();\n \n } \n else\n {\n $label = parent::getLabel();\n }\n \n return $label;\n }", "title": "" }, { "docid": "23edd09d806681e41262b12464042c60", "score": "0.62644446", "text": "public function title()\n\t{\t\t\n\t\treturn $this->data()['title'];\n\t}", "title": "" }, { "docid": "95fe866e39ff8a1bea9c460e42f6e9fe", "score": "0.6258012", "text": "public function get_title() {}", "title": "" }, { "docid": "95fe866e39ff8a1bea9c460e42f6e9fe", "score": "0.6258012", "text": "public function get_title() {}", "title": "" }, { "docid": "1c3972e82bd14d3ae027d1be302f7057", "score": "0.62570703", "text": "public function getCustomTitle()\n {\n return $this->title;\n }", "title": "" }, { "docid": "30e10a2b5c13cd1c51a04550a70bc98f", "score": "0.62494886", "text": "function getTitle() { \n\t\treturn $this->title; \n\t}", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "689375a9deb4298f6f761f62ec49774e", "score": "0.62445927", "text": "public function getTabTitle()\n {\n return $this->getTabLabel();\n }", "title": "" }, { "docid": "24381f14b14fba5e3da8fadac7447bb0", "score": "0.6242536", "text": "function register_block_core_query_title() {\n\tregister_block_type_from_metadata(\n\t\t__DIR__ . '/query-title',\n\t\tarray(\n\t\t\t'render_callback' => 'render_block_core_query_title',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "f4b4f2687e2845cd7c5ebbd2132ce703", "score": "0.6242426", "text": "public function getTabTitle()\n {\n return Mage::helper('helpmate')->__('Notes');\n }", "title": "" }, { "docid": "b5d454a84e8b5ae2d764f85dd15bf840", "score": "0.6242215", "text": "function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "b5d454a84e8b5ae2d764f85dd15bf840", "score": "0.6242215", "text": "function getTitle() {\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "42f3522159a497f745cdc8425d3e0bc0", "score": "0.62415206", "text": "public function getTitle()\n {\n return $this->formattedData['title'];\n }", "title": "" }, { "docid": "01527d516d7585d0f3ea46dc2decce15", "score": "0.62258023", "text": "public function getShortTitle();", "title": "" }, { "docid": "51c2a940593f763f74b4af5bedff20d4", "score": "0.6224694", "text": "public function get_label()\n {\n }", "title": "" }, { "docid": "51c2a940593f763f74b4af5bedff20d4", "score": "0.6224694", "text": "public function get_label()\n {\n }", "title": "" }, { "docid": "881ee72f8f7ee77402be8778a02e9b4f", "score": "0.62228656", "text": "public function getGroupTitle();", "title": "" }, { "docid": "c7fee80d4dce64b0c2fe1002966304a6", "score": "0.62203926", "text": "public function getTitle(){\r\n\t\treturn $this->title;\r\n\t}", "title": "" }, { "docid": "c7fee80d4dce64b0c2fe1002966304a6", "score": "0.62203926", "text": "public function getTitle(){\r\n\t\treturn $this->title;\r\n\t}", "title": "" }, { "docid": "922997e7114c8d8a6b7a0613ff38d549", "score": "0.6214633", "text": "public function title() \n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "83be9593fdb179ebafbd55cf9813781b", "score": "0.62145126", "text": "function getDisplayName() {\n\t\treturn Locale::translate('plugins.block.selectPress.displayName');\n\t}", "title": "" }, { "docid": "33c576bcbff028889f92a3cfd83eaa25", "score": "0.6214468", "text": "public function getName()\n {\n return 'site_block';\n }", "title": "" }, { "docid": "395549b34c96fcb611cb8f46d03496e4", "score": "0.62133557", "text": "public function title()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "89804b0d762c5ab929cdc4e213f94a74", "score": "0.6208404", "text": "function getSectionTitle() {\r\n\t\treturn $this->getData('sectionTitle');\r\n\t}", "title": "" }, { "docid": "c56e5cc3d093d986c95dce20870d387d", "score": "0.620621", "text": "public function getTabLabel()\n {\n return Mage::helper('helpmate')->__('Notes');\n }", "title": "" }, { "docid": "a29523e0649a965a87546c847805b686", "score": "0.6206089", "text": "protected function get_label()\n {\n }", "title": "" }, { "docid": "1851ef362e59a0b17be1bc978a5a8f64", "score": "0.6204784", "text": "public function getTabTitle()\n {\n return Mage::helper('cmspro')->__('Design');\n }", "title": "" }, { "docid": "aa7b0650fefad74d908318ea93ff97ad", "score": "0.6199066", "text": "public function getTabTitle()\n {\n return Mage::helper('testimonials')->__('Testimonial Information');\n }", "title": "" }, { "docid": "2048367f24a64d9b253f51ba2e4ad300", "score": "0.6189424", "text": "protected function _setBlockTitle($blockTitle)\n\t{\n\t $this->_blockTitle = $blockTitle;\n\t}", "title": "" }, { "docid": "1d6f99112d278e8e6c7c01e14f03e6da", "score": "0.6187056", "text": "public function getTabLabel()\r\n {\r\n return __('Gift Code Information');\r\n }", "title": "" }, { "docid": "5f340b175f77d43bba6a11691c050466", "score": "0.6186523", "text": "function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "5f340b175f77d43bba6a11691c050466", "score": "0.6186523", "text": "function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "5f340b175f77d43bba6a11691c050466", "score": "0.6186523", "text": "function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "394418e2fa5f24b1cc606f03e63f08f3", "score": "0.61849344", "text": "public function getTitle() {\r\n\t\treturn $this->title;\r\n\t}", "title": "" }, { "docid": "b562d380845d9b20631dcf3fe06ddbb0", "score": "0.6182585", "text": "public function getTitle(): string\n {\n return 'Layout breakpoint title';\n//\t\treturn Loc::getMessage('LANDING_HOOK_VIEW_NAME');\n }", "title": "" }, { "docid": "70e8ed705cf3df4d769edfb1c534a722", "score": "0.61824673", "text": "public function getTitle()\n {\n return 'Category';\n // return $this->getData('title');\n }", "title": "" }, { "docid": "a8b0e3f27577e25acf704e907daf2a26", "score": "0.6178827", "text": "public function getTitle(){\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "a8b0e3f27577e25acf704e907daf2a26", "score": "0.6178827", "text": "public function getTitle(){\n\t\treturn $this->title;\n\t}", "title": "" }, { "docid": "b16bf918669a6670c326e70b00ebea50", "score": "0.6176078", "text": "public function getTitle() {\r\n return $this->title.\" - \".$this->title2;\r\n }", "title": "" }, { "docid": "d1442e387f7ed3838ebf02da065dd613", "score": "0.61746097", "text": "public function Title()\n\t{\n\t\treturn $this->Course()->Title;\n\t\t\n\t}", "title": "" }, { "docid": "77de9b9374dd061d3c6568c62fa9abbc", "score": "0.6174298", "text": "public static function getModulesTitle();", "title": "" }, { "docid": "cd63c7872a1791bcd89998571e9305d5", "score": "0.61740917", "text": "public function get_title()\n {\n }", "title": "" }, { "docid": "cd63c7872a1791bcd89998571e9305d5", "score": "0.61740917", "text": "public function get_title()\n {\n }", "title": "" }, { "docid": "cd63c7872a1791bcd89998571e9305d5", "score": "0.61740917", "text": "public function get_title()\n {\n }", "title": "" }, { "docid": "7ab386e92abb39710c749e6a5f431133", "score": "0.6173292", "text": "public function getTitle() {\r\n\t\r\n\t\treturn $this->title;\r\n\t}", "title": "" }, { "docid": "3b35d21a65e4a1ea5237c26afc6e68b7", "score": "0.6172135", "text": "public function label()\n\t{\n\t\treturn $this->label;\n\t}", "title": "" } ]
e064dd2b331306bcc2c647b6f6ffa3d6
function processes view invoices command
[ { "docid": "f62824fe1a14a8cf13fe46ff5420dbbc", "score": "0.703391", "text": "private function viewInvoices($args){\n\t\t\n\t\t$invoices_per_page=20;\t\t\n\t\tglobal $usermapfile;\n\t\t\n\t\tif(count($args)<4){$this->sendHelp();return null;}\n\t\t\t\n\t\t$preset_status=array(\"pending\",\"paid\",\"partpaid\",\"confirmed\",\"timeout\",\"*\");\n\t\t$status=$args[count($args)-1];\n\t\t\n\t\t$found_index=array_search($status,$preset_status);\n\t\tif($found_index===FALSE){\n\t\t\t$this->send($this->getCurrentChannel(), $this->initiator,\n \"Status code is bad. Use one (\".implode(\",\",$preset_status).\")\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$desc_array=array_slice($args,2,-1);\n $desc=implode(\" \",$desc_array); \n \n\t\t$json_usermap=file_get_contents($usermapfile);\n $usermap=json_decode($json_usermap,true);\n \n $username=$this->getUsernameFromUserId($this->initiator);\n \n $btc_akey=$usermap[$username];\n if(strlen($btc_akey)==0){\n\t\t\tCryptoLogger::log_msg(\"Username: $username is not mapped to cryptopay.me token\");\n\t\t\t$this->send($this->getCurrentChannel(), $this->initiator,\n \"Your username is not mapped to cryptopay.me token!\");\n\t\t\treturn null;\n\t\t}\n\t\t\t\n\t\t$req_page=1;\n\t\t$selected_invoices=array();\n\t\tdo{\t\n $ch=curl_init(\"https://cryptopay.me/api/v1/invoices?api_key=$btc_akey&page=$req_page&per_page=$invoices_per_page\"); \n \n curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);\n \n $invoices_json_responce=curl_exec($ch);\n $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n curl_close($ch);\n\t\tCryptoLogger::log_msg(\"Get invoices user: $username and $btc_akey: status code: $status_code\");\n \n\t\tif($status_code!=\"200\" && $status_code!=\"201\"){\n\t\t\t$this->send($this->getCurrentChannel(), $this->initiator,\n \"Oops. Bad responce from cryptopay.me server - $status_code!\");\n return null;\n\t\t}\n\t\t\n $invoices_responce=json_decode($invoices_json_responce,true);\n \n $current_page=(int)$invoices_responce[\"page\"];\n $total_pages=(int)$invoices_responce[\"total_pages\"];\n \n $invoices=$invoices_responce[\"invoices\"];\n \n for($i=0;$i<count($invoices);$i++){\n\t\t\tif($desc!=$invoices[$i][\"description\"]&&$desc!=\"*\") continue;\n\t\t\tif($status!=$invoices[$i][\"status\"]&&$status!=\"*\") continue;\n\t\t\t\n\t\t\t$selected_invoices[]=$invoices[$i];\n\t\t}\n \n if($current_page<$total_pages) $req_page++;\n else break;\n \n\t\t}while(1);\n\t\t\n\t\t$out_msg=\"\";\n\t\tfor($i=0;$i<count($selected_invoices);$i++){\t\t\t\n\t\t\t$out_msg=$out_msg.\n\t\t\t\t\t$selected_invoices[$i][\"btc_address\"].\" | <\".\n\t\t\t\t\t$selected_invoices[$i][\"description\"].\"> | *\".\n\t\t\t\t\t$selected_invoices[$i][\"status\"].\"*\\n\";\n\t\t}\n\t\t$out_msg=trim($out_msg);\n\t\tif(strlen($out_msg)>0) $out_msg=\"\\n\".$out_msg;\n\t\telse $out_msg=\"No invoices found, sorry :(\";\n\t\t$this->send($this->getCurrentChannel(), $this->initiator,$out_msg);\n\t}", "title": "" } ]
[ { "docid": "2f88ce0d5a1761fc9eba530ecffb7d00", "score": "0.73955023", "text": "public function invoices() {\n\t\tif ($this->session->user_name != null) {\n\t\t\t\n\t\t\t$this->load->model ( 'Loginmodel' );\n\t\t\t$user_type_id = $this->session->userdata ( 'user_type_id' );\n\t\t\t$data ['menu_name'] = $this->Loginmodel->get_main_menu_list ( $user_type_id, 'Invoices' );\n\t\t\t$this->session->set_userdata ( 'first_level_menu', $data );\n\t\t\t\n\t\t\t$this->load->model ( 'Projectsmodel' );\n\t\t\t$results = $this->Projectsmodel->get_invoice_list ($this->session->userdata ( 'user_type_id' ),$this->session->userdata ( 'client_id' ));\n\t\t\t$data ['results'] = $results;\n\t\t\t$data ['user_type'] = $user_type_id;\n\t\t\t\n\t\t\t$this->load->view ( 'menu' );\n\t\t\t$this->load->view ( 'border' );\n\t\t\t$this->load->view ( 'invoices', $data );\n\t\t}\n\t}", "title": "" }, { "docid": "4e4f78da93ea4e635a77df8bce87d8c3", "score": "0.7283322", "text": "public function actionInvoices() {\n $helper = new Helper();\n $rolePermitions = $helper->getRolePermission();\n if (Yii::$app->user->id != '1' && (!isset($rolePermitions['invoices']) || !in_array('list', $rolePermitions['invoices']))) {\n return $this->redirect(['/site/unauthorized-access']);\n }\n $helper = new Helper();\n $rolePermitions = $helper->getRolePermission();\n if (Yii::$app->user->id != '1' && (!isset($rolePermitions['orders']) || !in_array('list', $rolePermitions['orders']))) {\n return $this->redirect(['/site/unauthorized-access']);\n }\n\n $searchModel = new OrdersSearch();\n $dataProvider = $searchModel->invoiceSearch(Yii::$app->request->queryParams);\n\n return $this->render('invoices', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "ad67bbdc9e4fe513618f921f5632ed1f", "score": "0.7073199", "text": "public function invoicesAction()\n {\n $this->_initOrder();\n $this->getResponse()->setBody(\n $this->getLayout()->createBlock('adminhtml/sales_order_view_tab_invoices')->toHtml()\n );\n }", "title": "" }, { "docid": "913fbe034e1df17208b7ea57392f7a93", "score": "0.6847918", "text": "public function invoice(){\n\t\t$this->verify();\n\t\t$data['title']=\"Invoice\";\n\t\t$this->load->view('parts/head',$data);\n\t\t$this->load->view('invoice/invoice',$data);\n\t\t$this->load->view('parts/bottom',$data);\n\t}", "title": "" }, { "docid": "7ff539b01f4851a39fa77d3f4351a50d", "score": "0.6760364", "text": "public function purchaseInvoiceDetail()\n {\n $this->view->render(\"apps/accounting/purchase-invoice/purchase-invoice-detail\");\n }", "title": "" }, { "docid": "4758a6ac48e7b933a966ed674204fb26", "score": "0.6710232", "text": "public function Invoices()\r\n\t{\r\n\t\tswitch($_GET['section'] ? $_GET['section'] : $this->URLData[2])\r\n\t\t{\r\n\t\t\tcase \"list\" :\r\n\t\t\t\t$this->DB->Arguments(USER_ACCOUNT);\r\n\t\t\t\t$this->DB->Query(\"SELECT Id, Document, Status, StartDate, [Value], CoinQuantity FROM dbo.CTM_Invoices WHERE Account = '%s' ORDER BY Id DESC\", $all_invoices_q);\r\n\t\t\t\t\r\n\t\t\t\t$invoices_opened = array();\r\n\t\t\t\t$invoices_finalized = array();\r\n\t\t\t\t$invoices_canceled = array();\r\n\t\t\t\t\r\n\t\t\t\tif($this->DB->CountRows($all_invoices_q) > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\twhile($all_invoices = $this->DB->FetchObject($all_invoices_q))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tswitch($all_invoices->Status)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcase 0 : \r\n\t\t\t\t\t\t\t\t$var_name = \"invoices_opened\"; \r\n\t\t\t\t\t\t\t\t$status = \"<span style='color: #C00;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Pending'].\"</span>\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 1 : \r\n\t\t\t\t\t\t\t\t$var_name = \"invoices_opened\"; \r\n\t\t\t\t\t\t\t\t$status = \"<span style='color: blue;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['InProgress'].\"</span>\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 2 : \r\n\t\t\t\t\t\t\t\t$var_name = \"invoices_finalized\"; \r\n\t\t\t\t\t\t\t\t$status = \"<span style='color: green;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Paid'].\"</span>\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 3: \r\n\t\t\t\t\t\t\t\t$var_name = \"invoices_finalized\"; \r\n\t\t\t\t\t\t\t\t$status = \"<span style='color: red;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Rejected'].\"</span>\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase 4 : \r\n\t\t\t\t\t\t\t\t$var_name = \"invoices_canceled\"; \r\n\t\t\t\t\t\t\t\t$status = \"<span style='color: #CCC;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Canceled'].\"</span>\";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t${$var_name}[$all_invoices->Id] = array\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\"document\" => $all_invoices->Document,\r\n\t\t\t\t\t\t\t\"quantity\" => number_format($all_invoices->CoinQuantity, 0, false, \".\").\" \".COIN_NAME_1,\r\n\t\t\t\t\t\t\t\"value\" => CTM_Text::MoneyFormat(MONEY_SYMBOL, $all_invoices->Value),\r\n\t\t\t\t\t\t\t\"date\" => date(\"d/m/Y - h:i a\", $all_invoices->StartDate),\r\n\t\t\t\t\t\t\t\"status\" => $status\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$GLOBALS['userpanel']['invoices']['auto_load_invoice'] = $_GET['showinvoice'] ? $_GET['showinvoice'] : $this->URLData[3];\r\n\t\t\t\t$GLOBALS['userpanel']['invoices']['list_invoices'] = array\r\n\t\t\t\t(\r\n\t\t\t\t\t\"opened\" => $invoices_opened,\r\n\t\t\t\t\t\"finalized\" => $invoices_finalized,\r\n\t\t\t\t\t\"canceled\" => $invoices_canceled\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\tunset($invoices_opened);\r\n\t\t\t\tunset($invoices_finalized);\r\n\t\t\t\tunset($invoices_canceled);\r\n\t\t\t\t\r\n\t\t\t\treturn $this->LoadPage(\"option_invoices_list\", true);\r\n\t\t\tbreak;\r\n\t\t\tcase \"show\" :\r\n\t\t\t\t$invoice_id = intval($_GET['id'] ? $_GET['id'] : $this->URLData[3]);\r\n\t\t\t\t$section = $_GET['do'] ? $_GET['do'] : $this->URLData[4];\r\n\t\t\t\t\r\n\t\t\t\t$this->DB->Arguments($invoice_id, USER_ACCOUNT);\r\n\t\t\t\t$this->DB->Query(\"SELECT * FROM dbo.CTM_Invoices WHERE Id = %d AND Account = '%s'\", $get_invoice);\r\n\t\t\t\t\r\n\t\t\t\tif($this->DB->CountRows($get_invoice) < 1)\r\n\t\t\t\t\treturn exit(showMessage(sprintf($this->lang->words['UserPanel']['Invoices']['ErrorMessage'], CoreVariables::ErrorsCode()->PaymentNotFound), 2));\r\n\r\n\t\t\t\t$invoice = $this->DB->FetchObject($get_invoice);\r\n\r\n\t\t\t\tif($section)\r\n\t\t\t\t{\r\n\t\t\t\t\tswitch($section)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase \"payment\" :\r\n\t\t\t\t\t\t\t$this->DB->Arguments($invoice_id, USER_ACCOUNT);\r\n\t\t\t\t\t\t\t$this->DB->Query(\"SELECT * FROM dbo.CTM_Payments WHERE InvoiceId = %d AND Account = '%s'\", $get_payment);\r\n\r\n\t\t\t\t\t\t\tif($this->DB->CountRows($get_payment) < 1)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tif($invoice->Status != 0 && $invoice->Status != 3)\r\n\t\t\t\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Invoices']['ShowInvoice']['Messages']['InvoiceInProgress'], 0));\r\n\r\n\t\t\t\t\t\t\t\t$method = strlen($_GET['method']) > 0 ? $_GET['method'] : $this->URLData[5];\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(strlen($method) < 1 || !array_key_exists($method, $this->settings['PAYMENTMETHOD']['FORM']))\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$GLOBALS['userpanel']['payments']['confirm_payment']['invoice_id'] = $invoice_id;\r\n\r\n\t\t\t\t\t\t\t\t\tif($_GET['write'] == true)\r\n\t\t\t\t\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['SelectMethod'], 2));\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\treturn $this->LoadPage(\"option_payments_confirm\", true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$error = $this->LoadClass(\"Error\", \"class_sources\");\r\n\t\t\t\t\t\t\t\t\t$method = intval($method);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\tif($_GET['write'] == true)\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tif(empty($_POST['Date']))\r\n\t\t\t\t\t\t\t\t\t\t\t$error->addError($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['DateVoid'], 0);\r\n\t\t\t\t\t\t\t\t\t\tif(empty($_POST['Hour']))\r\n\t\t\t\t\t\t\t\t\t\t\t$error->addError($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['HourVoid'], 0);\r\n\t\t\t\t\t\t\t\t\t\tif(empty($_POST['Value']))\r\n\t\t\t\t\t\t\t\t\t\t\t$error->addError($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['ValueVoid'], 0);\r\n\t\t\t\t\t\t\t\t\t\tif(empty($_POST['Local']))\r\n\t\t\t\t\t\t\t\t\t\t\t$error->addError($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['LocalVoid'], 0);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tforeach($this->settings['PAYMENTMETHOD']['FORM'][$method][1] as $key => $value)\r\n\t\t\t\t\t\t\t\t\t\t\tif(empty($_POST[$key]))\r\n\t\t\t\t\t\t\t\t\t\t\t\t$error->addError(htmlEncode($value), 0);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\tif($error->count[0] > 0)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t$_error = \"<strong>\".$this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['VoidMessage'].\"<strong><br />\";\r\n\t\t\t\t\t\t\t\t\t\t\texit(showMessage($_error.\"<br />\".$error->showError(0), 1));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tif($_POST['u_sendFile'] == 1)\r\n\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\tif($_POST['u_ready'] == 1)\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$name = str_pad($this->DB->GetCurrentId(\"CTM_Payments\") + 1, 10, 0, STR_PAD_LEFT);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$size = $this->settings['WEBDATA']['UPLOADS']['FILESIZE']['PAYMENT_ANNEX'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$dir = CTM_ROOT_PATH.$this->settings['WEBDATA']['UPLOADS']['DIRECTORY']['PAYMENT_ANNEX'];\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tUploadify::set(\"Filedata\", $size, array(\"gif\", \"jpg\", \"jpeg\", \"png\"), $name, $dir, $session);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\texit(\"<script>startUpload('{$name}', '{$session}');</script>\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$data = unserialize(base64_decode($_POST['u_fileUploaded']));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t$annex = $data['parsed_file_name'];\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif(!$data)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['AnnexError'], 2));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telseif($data['error_no'] == 2)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->lang->setArguments(\"UserPanel,Payments,ConfirmPayment,Messages,ErrorFormat\", \"<b>JPEG</b>, <b>GIF</b>, <b>PNG</b>\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['ErrorFormat'], 2));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telseif($data['error_no'] == 3)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->lang->setArguments(\"UserPanel,Payments,ConfirmPayment,Messages,ErrorSize\", \"<b>\".$data['max_file_size'].\"</b>\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['ErrorSize'], 2));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\telseif($data['error_no'] != 0)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['AnnexError'], 2));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$payment_data = array();\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\tforeach($this->settings['PAYMENTMETHOD']['FORM'][$method][1] as $key => $value)\r\n\t\t\t\t\t\t\t\t\t\t\t\t$payment_data[$key] = utf8_encode($_POST[$key]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$columns_insert = array\r\n\t\t\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Account\" => USER_ACCOUNT,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"InvoiceId\" => $invoice_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Status\" => 0,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"ConfirmDate\" => time(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Method\" => $method,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Date\" => $_POST['Date'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Hour\" => $_POST['Hour'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Value\" => $_POST['Value'],\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Local\" => utf8_encode($_POST['Local']),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"ConfirmData\" => serialize($payment_data),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Message\" => htmlEncode(nl2br(strip_tags($_POST['Message']))),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"Annex\" => $annex\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->ForceDataType(\"InvoiceId\", \"integer\");\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->ForceDataType(\"Status\", \"integer\");\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->ForceDataType(\"ConfirmDate\", \"integer\");\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->ForceDataType(\"Method\", \"integer\");\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->ForceDataType(\"Message\", empty($_POST['Message']) ? \"null\" : \"string\");\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->ForceDataType(\"Annex\", empty($annex) ? \"null\" : \"string\");\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->Insert(\"CTM_Payments\", $columns_insert);\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->Arguments($invoice_id);\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->ForceDataType(\"Status\", \"integer\");\r\n\t\t\t\t\t\t\t\t\t\t\t$this->DB->Update(\"CTM_Invoices\", array(\"Status\" => 1, \"PaymentMethod\" => \"bank\"), \"Id = %d\");\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\treturn exit(showMessage($this->lang->words['UserPanel']['Payments']['ConfirmPayment']['Messages']['Success'], 3));\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$inputs = array();\r\n\t\t\t\t\t\t\t\t\tforeach($this->settings['PAYMENTMETHOD']['FORM'][$method][1] as $key => $value)\r\n\t\t\t\t\t\t\t\t\t\t$inputs[$key] = htmlEncode($value);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t$GLOBALS['userpanel']['payments']['confirm_payment'] = array\r\n\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\"invoice_id\" => $invoice_id,\r\n\t\t\t\t\t\t\t\t\t\t\"method_name\" => htmlEncode($this->settings['PAYMENTMETHOD']['FORM'][$method][0]),\r\n\t\t\t\t\t\t\t\t\t\t\"method_id\" => $method,\r\n\t\t\t\t\t\t\t\t\t\t\"method_fields\" => $inputs\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\treturn $this->LoadPage(\"option_payments_confirm_form\", true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$payment = $this->DB->FetchObject($get_payment);\r\n\r\n\t\t\t\t\t\t\t\tswitch($payment->Status)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tcase 0 : \r\n\t\t\t\t\t\t\t\t\t\t$status = \"<span style='color: blue;'>\".$this->lang->words['UserPanel']['Payments']['Status']['Opened'].\"</span>\";\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase 1 : \r\n\t\t\t\t\t\t\t\t\t\t$status = \"<span style='color: green;'>\".$this->lang->words['UserPanel']['Payments']['Status']['Confirmed'].\"</span>\";\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t\tcase 2 : \r\n\t\t\t\t\t\t\t\t\t\t$status = \"<span style='color: red;'>\".$this->lang->words['UserPanel']['Payments']['Status']['Rejected'].\"</span>\";\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(!$payment_data = unserialize($payment->ConfirmData))\r\n\t\t\t\t\t\t\t\t\t$payment_data = array();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t$GLOBALS['userpanel']['payments']['show_payment'] = array\r\n\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\"id\" => $payment_id,\r\n\t\t\t\t\t\t\t\t\t\"method\" => htmlEncode($this->settings['PAYMENTMETHOD']['FORM'][$payment->Method][0]),\r\n\t\t\t\t\t\t\t\t\t\"confirm_date\" => date(\"d/m/Y - h:i a\", $payment->ConfirmDate),\r\n\t\t\t\t\t\t\t\t\t\"status\" => $status,\r\n\t\t\t\t\t\t\t\t\t\"quantity\" => number_format($payment->Quantity, 0, false, \".\").\" \".COIN_NAME_1,\r\n\t\t\t\t\t\t\t\t\t\"date\" => $payment->Date,\r\n\t\t\t\t\t\t\t\t\t\"hour\" => $payment->Hour,\r\n\t\t\t\t\t\t\t\t\t\"value\" => $payment->Value,\r\n\t\t\t\t\t\t\t\t\t\"local\" => utf8_decode($payment->Local),\r\n\t\t\t\t\t\t\t\t\t\"message\" => htmlDecode($payment->Message),\r\n\t\t\t\t\t\t\t\t\t\"payment_data\" => $payment_data\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tif(strlen($payment->Annex) > 1)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t$GLOBALS['userpanel']['payments']['show_payment']['annex'] = array\r\n\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\"link\" => $this->settings['WEBDATA']['UPLOADS']['DIRECTORY']['PAYMENT_ANNEX'].$payment->Annex,\r\n\t\t\t\t\t\t\t\t\t\t\"name\" => $payment->Annex\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\treturn $this->LoadPage(\"option_payments_show\", true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tswitch($invoice->Status)\r\n\t\t\t\t{\r\n\t\t\t\t\tcase 0 : \r\n\t\t\t\t\t\t$status = \"<span style='color: #C00;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Pending'].\"</span>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 1 : \r\n\t\t\t\t\t\t$status = \"<span style='color: blue;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['InProgress'].\"</span>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 2 : \r\n\t\t\t\t\t\t$status = \"<span style='color: green;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Paid'].\"</span>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 3: \r\n\t\t\t\t\t\t$status = \"<span style='color: red;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Rejected'].\"</span>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 4 : \r\n\t\t\t\t\t\t$status = \"<span style='color: #CCC;'>\".$this->lang->words['UserPanel']['Invoices']['Status']['Canceled'].\"</span>\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$GLOBALS['userpanel']['invoices']['show_invoice'] = array\r\n\t\t\t\t(\r\n\t\t\t\t\t\"id\" => $invoice_id,\r\n\t\t\t\t\t\"document\" => $invoice->Document,\r\n\t\t\t\t\t\"start_date\" => date(\"d/m/Y - h:i a\", $invoice->StartDate),\r\n\t\t\t\t\t\"quantity\" => number_format($invoice->CoinQuantity, 0, false, \".\"),\r\n\t\t\t\t\t\"value\" => CTM_Text::MoneyFormat(MONEY_SYMBOL, $invoice->Value),\r\n\t\t\t\t\t\"status\" => $status,\r\n\t\t\t\t\t\"canceled\" => $invoice->Status == 4\r\n\t\t\t\t);\r\n\r\n\t\t\t\tif($invoice->Status > 0 && $invoice->PaymentMethod != \"none\")\r\n\t\t\t\t{\r\n\t\t\t\t\tif(!$payment_data = unserialize($invoice->PaymentData))\r\n\t\t\t\t\t\t$payment_data = array();\r\n\r\n\t\t\t\t\tswitch($invoice->PaymentMethod)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcase \"bank\" :\r\n\t\t\t\t\t\t\t$method_name = $this->lang->words['UserPanel']['Invoices']['Methods']['Bank'];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$GLOBALS['userpanel']['invoices']['show_invoice']['payment_method'] = array\r\n\t\t\t\t\t(\r\n\t\t\t\t\t\t\"method\" => $method_name,\r\n\t\t\t\t\t\t\"data\" => $payment_data,\r\n\t\t\t\t\t\t\"key\" => $invoice->PaymentMethod\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$this->lang->setArguments(\"UserPanel,Invoices,ShowInvoice,Title\", $invoice_id);\r\n\t\t\t\treturn $this->LoadPage(\"option_invoices_show\", true);\r\n\t\t\tbreak;\r\n\t\t\tcase \"open\" :\r\n\t\t\t\tif($this->settings['USERPANEL']['FINANCIAL']['INVOICES']['LIMIT_OPENED'] > 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->DB->Arguments(USER_ACCOUNT);\r\n\t\t\t\t\t$this->DB->Query(\"SELECT 1 FROM dbo.CTM_Invoices WHERE Account = '%s' AND Status < 2\", $count_invoices);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif($this->DB->CountRows($count_invoices) >= $this->settings['USERPANEL']['FINANCIAL']['INVOICES']['LIMIT_OPENED'])\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$limit = $this->settings['USERPANEL']['FINANCIAL']['INVOICES']['LIMIT_OPENED'];\r\n\t\t\t\t\t\texit(showMessage(sprintf($this->lang->words['UserPanel']['Invoices']['OpenInvoice']['Messages']['LimitReached'], $limit), 2));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif($_GET['write'] == true)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(empty($_POST['Quantity']))\r\n\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Invoices']['OpenInvoice']['Messages']['QuantityVoid'], 1));\r\n\r\n\t\t\t\t\tif(!is_numeric($_POST['Quantity']))\r\n\t\t\t\t\t\texit(showMessage($this->lang->words['UserPanel']['Invoices']['OpenInvoice']['Messages']['QuantitySyntax'], 2));\r\n\r\n\t\t\t\t\t$_POST['Quantity'] = ltrim($_POST['Quantity'], 0);\r\n\t\t\t\t\t$money_value = COIN_PRICE * $_POST['Quantity'];\r\n\r\n\t\t\t\t\tif(strstr($money_value, \".\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlist($note, $coin) = explode(\".\", $money_value);\r\n\r\n\t\t\t\t\t\tif(strlen($coin) > 2)\r\n\t\t\t\t\t\t\t$coin = substr($coin, 0, 2);\r\n\r\n\t\t\t\t\t\twhile(($coin % 5) != 0 && $coin > 0)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif($coin < 5 && $coin > 0)\r\n\t\t\t\t\t\t\t\t$coin = 5;\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t$coin++;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tif(strlen($coin) == 1)\r\n\t\t\t\t\t\t\t$coin = \"0\".$coin;\r\n\r\n\t\t\t\t\t\t$final_money = $note.\".\".$coin;\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$final_money = $money_value.\".00\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif($_GET['confirm'] == true)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$insert_columns = array\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\"Account\" => USER_ACCOUNT,\r\n\t\t\t\t\t\t\t\"StartDate\" => time(),\r\n\t\t\t\t\t\t\t\"EndDate\" => 0,\r\n\t\t\t\t\t\t\t\"Value\" => $final_money,\r\n\t\t\t\t\t\t\t\"CoinQuantity\" => $_POST['Quantity'],\r\n\t\t\t\t\t\t\t\"Status\" => 0\r\n\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t$this->DB->Insert(\"CTM_Invoices\", $insert_columns);\r\n\t\t\t\t\t\t$last_id = $this->DB->GetLastedId();\r\n\r\n\t\t\t\t\t\t$this->DB->Update(\"CTM_Invoices\", array(\"Document\" => INVOICE_PREFIX.$last_id), \"Id = \".$last_id);\r\n\t\t\t\t\t\texit(\"<script>runOpenInvoice({$last_id});</script>\");\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\texit(\"<script>showConfirmMessage('\".CTM_Text::MoneyFormat(MONEY_SYMBOL, $final_money).\"');</script>\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t$GLOBALS['default_value'] = str_replace(MONEY_SYMBOL.\" \", NULL, CTM_Text::MoneyFormat(MONEY_SYMBOL, COIN_PRICE));\r\n\t\t\t\treturn $this->LoadPage(\"option_invoices_open\", true);\r\n\t\t\tbreak;\r\n\t\t\tdefault :\r\n\t\t\t\tif($_GET['showinvoice'])\r\n\t\t\t\t\t$GLOBALS['userpanel']['invoices']['auto_load_invoice'] = $_GET['showinvoice'];\r\n\t\t\t\telseif(strstr($this->URLData[2], \"showinvoice-\"))\r\n\t\t\t\t\t$GLOBALS['userpanel']['invoices']['auto_load_invoice'] = str_replace(\"showinvoice-\", NULL, $this->URLData[2]);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "884887a4c61740a5e3cbaa8516a83b38", "score": "0.6704439", "text": "public function show(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "884887a4c61740a5e3cbaa8516a83b38", "score": "0.6704439", "text": "public function show(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "884887a4c61740a5e3cbaa8516a83b38", "score": "0.6704439", "text": "public function show(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "884887a4c61740a5e3cbaa8516a83b38", "score": "0.6704439", "text": "public function show(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "884887a4c61740a5e3cbaa8516a83b38", "score": "0.6704439", "text": "public function show(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "884887a4c61740a5e3cbaa8516a83b38", "score": "0.6704439", "text": "public function show(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "518af935db12ce8271aa2f9b3a676d9c", "score": "0.6686947", "text": "public function fetch_list_created_invoice(){\n\t\t$data['invoices']=$this->invoice_model->fetch_invoice_list();\n\t\t$this->load->view('invoice/invoiceList', $data);\n\t}", "title": "" }, { "docid": "658416c6c2a226ba43c5cf842e9d7816", "score": "0.6664087", "text": "public function index()\n\t{\n\t\t$data = array();\n\t\t\t\t\n\t\t$from_date = $this->input->get('from_date');\n\t\t$to_date = $this->input->get('to_date');\n\t\t$client_id = $this->input->get('client_id');\n\t\t$status = $this->input->get('status');\n\t\t\n\t\t$data['title'] \t\t\t= $this->title;\n\t\t$data['activemenu'] \t= $this->activemenu;\n\t\t$data['invoices']\t\t= $this->tax_invoice_model->get_invoices($status);\n\t\t$data['clients'] \t\t= $this->common_model->get_select_option('ci_clients', 'client_id', 'client_name', (isset($client_id) && !empty($client_id)) ? $client_id : '' );\n\t\t\n\t\t$data['status']\t\t\t= $status;\t\t\n\t\t$data['from_date'] = $from_date;\n\t\t$data['to_date'] = $to_date;\n\t\t$data['client_id'] = $client_id;\t\t\n\t\t\n\t\t$data['pagecontent'] \t= 'tax_invoices/invoices';\n\t\t$this->load->view('common/holder', $data);\n\t}", "title": "" }, { "docid": "4bdf39bc09a8e2e350f7f8206873839b", "score": "0.6639003", "text": "public function view_invoice($invoice_id = null)\n {\n if(isset($this->params['pass'][0]))\n {\n $this->data = $this->Client->ClientsContract->Invoice->getInvoiceReview($invoice_id);\n $this->page_title = 'Edit Invoice: '.$this->data['Invoice']['id'].'-'.$this->data['Client']['Client']['name'].' - '.$this->data['Employee']['Employee']['firstname'].' '.$this->data['Employee']['Employee']['lastname'];\n\n } else {\n\n $this->setup_index();\n $this->Session->setFlash(__('Invalid Invoice.', true));\n $this -> render('index');\n }\n\n }", "title": "" }, { "docid": "c8bdd65fa4f24e4c73b97bcefca22bc4", "score": "0.6609513", "text": "public function index()\n {\n abort_unless(\\Gate::allows('invoice_access'), 403); \n\n $invoices = Invoice::all();\n\n return view('admin.invoices.index', compact('invoices'));\n }", "title": "" }, { "docid": "acbb92d2856e2403693db3c17c28a572", "score": "0.6587172", "text": "public function index()\n {\n $inv = Invoice::all();\n return view('admin.invoice.view',compact('inv'));\n }", "title": "" }, { "docid": "3322e708b0caf254986b7d0664e98cfb", "score": "0.65837985", "text": "public function invoiceAction(){\n \t\n \t/**\n \t * check license key\n \t */\n \tMage::helper('marketplace')->checkMarketplaceKey();\n \t \t\n \t$this->chekcingForMarketplaceSellerOrNot();\n \t\n $orderId = $this->getRequest()->getParam('id');\n /**\n * Getting order product ids\n */\n $orderPrdouctIds = Mage::helper('marketplace/vieworder')->getOrderProductIds(Mage::getSingleton('customer/session')->getId(),$orderId);\n /**\n * Getting cancel order items\n */\n $cancelOrderItemProductIds = Mage::helper('marketplace/vieworder')->cancelOrderItemProductIds(Mage::getSingleton('customer/session')->getId(),$orderId);\n \n $orderStatusFlag = Mage::getStoreConfig('marketplace/admin_approval_seller_registration/order_manage');\n \n if(count($orderPrdouctIds) >=1 && $orderStatusFlag == 1){ \t\n \t$order = Mage::getModel('sales/order')->load($orderId); \t\n \t$itemsarray = $itemsArr = array(); \n \t/**\n \t * prepare invoice items\n \t */ \t\n \tforeach($order->getAllItems() as $item) {\n \t\t$qty = 0;\n \t\t/**\n \t\t * Prepare invoice qtys\n \t\t */\n \t\t$itemProductId = $item->getProductId();\n \t\t$itemId = $item->getItemId();\n \t\tif(in_array($itemProductId,$orderPrdouctIds) && !in_array($itemProductId,$cancelOrderItemProductIds)){\n \t\t$itemsArr[] = $itemId;\n \t\t/**\n \t\t * Qty ordered for that item\n \t\t */\n \t\t$qty = $item->getQtyOrdered() - $item->getQtyInvoiced();\n \t\t}\n \t\t$itemsarray[$itemId] = $qty;\n \t} \t\n \t\n \ttry {\n \t\t/**\n \t\t * Create invoice\n \t\t */\n \tif($order->canInvoice()) {\n \t\tMage::getModel('sales/order_invoice_api')\n \t\t->create($order->getIncrementId(), $itemsarray ,'' ,1,1); \t\t\n \t\tMage::getModel('marketplace/order')->updateSellerOrderItemsBasedOnSellerItems($itemsArr,$orderId,1); \t \t\t\n \t\t\n \tMage::getSingleton('core/session')->addSuccess($this->__('The invoice has been created.'));\n \t} \n $this->_redirect('marketplace/order/vieworder/orderid/'.$orderId);\n } catch (Exception $e) {\n Mage::getSingleton('core/session')->addError($this->__($e->getMessage()));\n $this->_redirect('marketplace/order/vieworder/orderid/'.$orderId);\n } \t\n }else{\n \tMage::getSingleton('core/session')->addError($this->__('You do not have permission to access this page'));\n \t$this->_redirect('marketplace/order/manage');\n \treturn false;\n } \n }", "title": "" }, { "docid": "984b1d8ee73f026389e08d76854217a2", "score": "0.65536517", "text": "public function viewAction()\r\n {\r\n $em = $this->entityManager;\r\n $processForm = $this->processForm;\r\n $processForm->setAttributes(array(\r\n \"action\" => $this->url()\r\n ->fromRoute(\"invoice/default\", array(\r\n \"action\" => \"is-submit\"\r\n ))\r\n ));\r\n $invoiceSession = new Container(\"invoice_session\");\r\n\r\n// $paramId = $this->params()->fromRoute(\"id\", NULL);\r\n $invoiceuid = $this->params()->fromRoute(\"id\", NULL);\r\n// var_dump(\"LOLO\");\r\n $invoice = NULL;\r\n if ($invoiceuid != NULL) {\r\n $invoice = $em->getRepository(\"Transactions\\Entity\\Invoice\")->findOneBy(array(\r\n \"invoiceUid\"=>$invoiceuid\r\n )); \r\n } else {\r\n $id = $invoiceSession->invoiceId;\r\n $invoice = $em->find(\"Transactions\\Entity\\Invoice\", $id);\r\n }\r\n if ($invoice == NULL) {\r\n $this->redirect()->toRoute(\"invoice\");\r\n }\r\n \r\n \r\n $invoiceSession->invoiceId = $invoice->getId();\r\n $broker = $em->find(\"Users\\Entity\\InsuranceBrokerRegistered\", $this->brokerId);\r\n $view = new ViewModel(array(\r\n \"invoice\" => $invoice,\r\n \"broker\" => $broker,\r\n \"processForm\" => $processForm\r\n ));\r\n return $view;\r\n }", "title": "" }, { "docid": "5af7062a363042977f27f35b53f14435", "score": "0.65471005", "text": "public function invoice(){\n $bill=bill::orderBy('booking_id','DESC')->where('cancellation','LIKE','')->paginate(10);\n return view('admin.invoice',compact('bill'))->with('title','Invoice and Bills');\n }", "title": "" }, { "docid": "92e05bb93cc51992c38c0fcae45432b8", "score": "0.65292025", "text": "public function index() {\n\n $user = Auth::user()->id;\n\n // Grab all the user invoices\n $invoices = $this->invoice->where('user_id', $user)->get();\n\n $tax_rates = TaxRate::where('user_id', $user)->get();\n $items = $this->invoice->item;\n\n //Include deleted invoices\n if (Input::get('withTrashed')) {\n \n } else if (Input::get('onlyTrashed')) {\n\n $invoices = $this->invoice->onlyTrashed()->where('user_id', $user)->get();\n }\n\n return View::make('invoices.index', compact('invoices', 'tax_rates'));\n }", "title": "" }, { "docid": "2c3293e90f5cfd8268f3c7c35193dca4", "score": "0.6523682", "text": "public function actionView($id)\n {\n $model = new Invoice();\n $searchModel = new SearchInvoice();\n\n $getProcessedInvoice = $searchModel->getProcessedInvoice($id); \n $getProcessedServices = $searchModel->getProcessedServices($id); \n $getProcessedParts = $searchModel->getProcessedParts($id);\n\n $paymentInformation = $searchModel->getInvoicePaymentInformation($id);\n $invoice_detail = InvoiceDetail::getInvoiceDetailByID($id);\n $redeem_price = Payment::getPaymentWithRedeemPoint($id);\n\n // var_dump($id);//edr, check the invoice/view\n // var_dump( $getProcessedInvoice);\n //die();\n return $this->render('view',[\n 'model' => $this->findModel($id),\n 'redeem_price' => $redeem_price,\n 'customerInfo' => $getProcessedInvoice,\n 'services' => $getProcessedServices,\n 'parts' => $getProcessedParts,\n 'paymentInformation' => $paymentInformation,\n 'invoice_detail' => $invoice_detail,\n ]);\n }", "title": "" }, { "docid": "daa10a8471668d49a7af686473c1a063", "score": "0.64472914", "text": "function invoicing(){\n\t\t\t$this->data[\"vista\"]\t=\t\"modules/sales/invoicing\";\n\t\t\t$this->load->view(\"templates/template_main\", $this->data);\n\t\t}", "title": "" }, { "docid": "8df906e30385fd5111ff2ddfdd979b15", "score": "0.64449966", "text": "public function unpaidInvoices(){\n//\n// $userQuery =\n//\n// $userQuery = \"User_Id eq '\".Auth::user()->externalId.\"'\";\n//\n// $invoices = $cont->getRequest('Invoices?$filter=Status eq webapi.Models.InvoiceStatus\\'Sent\\' or Status eq webapi.Models.InvoiceStatus\\'Overdue\\' and '.$userQuery);\n// if($invoices instanceof View){\n// return $invoices;\n// }\n// $invoices = $invoices->value;\n\n return view('dashboard.unpaid');\n }", "title": "" }, { "docid": "d2c04bb86edde47f9d22d7eeebecf25b", "score": "0.64289814", "text": "public function index()\n {\n $user_id = auth()->user()->id;\n $invoices = Invoice::where('user_id', $user_id)\n ->where('trashed', false)->paginate(15);\n\n return view('invoices.all')\n ->with('invoices', $invoices)\n ->with('name','Your invoices');\n }", "title": "" }, { "docid": "f8f370bf7afe57c3f3b1fd011ce20e25", "score": "0.6428059", "text": "public function getInvoice()\n {\n $invoice = Invoice::orderBy('id', 'desc')->get();\n// print_r(count($invoice));\n return view('admin.order', compact('invoice'));\n }", "title": "" }, { "docid": "3e5035c180a1e9edfea078e0a26862da", "score": "0.6427245", "text": "public function actionInvoice($id){\n\t\t// want to download the pdf invoice and display to customer\n\t\t\n\t\t$url = RecurlyClient::__recurlyBaseUrl() . RecurlyClient::PATH_INVOICES . \"$id.pdf\";\n\t\t\n\t\t$path = Yii::getPathOfAlias('app.runtime.invoices');\n\t\t\n\t\tif(!is_dir($path))\n\t\t\tmkdir (Yii::getPathOfAlias('app.runtime').'/invoices');\n\t\t\n\t\t// could use the same file so that it is always overwriten\n\t\t$path = Yii::getPathOfAlias('app.runtime.invoices').\"/tmp.pdf\";\n\t\t\n\t\t$fp = fopen($path, 'w');\n\n\t\t$ch = curl_init($url);\n\t\tcurl_setopt($ch, CURLOPT_FILE, $fp);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, FALSE);\n curl_setopt($ch, CURLOPT_MAXREDIRS, 1);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/pdf; charset=utf-8',\n 'Accept: application/pdf',\n \"User-Agent: Recurly PHP Client v\" . RecurlyClient::API_CLIENT_VERSION\n )); \n\n curl_setopt($ch, CURLOPT_USERPWD, RecurlyClient::$username . ':' . RecurlyClient::$password);\n\t\tcurl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');\n\t\t\n\t\t$data = curl_exec($ch);\n\n\t\tcurl_close($ch);\n\t\tfclose($fp);\n\t\t\n\t\tYii::app()->request->sendFile(\"$id.pdf\", file_get_contents($path), 'application/pdf', true);\n\t}", "title": "" }, { "docid": "b667a387c5f68f9be86425e6e036ff22", "score": "0.64131814", "text": "public function directinvoicelist() { \n $data['page'] = 'Purchase Order';\n\t\t$data['page_title'] = 'Direct Invoice';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/purchase/directinvoice/directinvoicelist', $data); \n\t}", "title": "" }, { "docid": "bcc0d838bd848b0205e2ba526bfff10e", "score": "0.6399049", "text": "public function p_invoice($unique_id)\n\t{\n\t\t// var\n\t\t$var['chat']\t\t\t= $this->Puser->load_chat();\n\t\t$var['title_web']\t\t= $this->web_title();\n\t\t$var['page_web']\t\t= 'Tagihan';\n\t\t$var['date_now']\t\t= date('H:i:s', now());\n\n\t\t$res = $this->Photel->load_inv($unique_id);\n\n\t\tforeach($res as $row)\n\t\t{\n\t\t\t$idhotel = $row->id_vh;\n\t\t}\n\n\t\t$var['car_data']\t\t= $this->Photel->load_id($idcar);\n\t\t$var['inv_data']\t\t= $this->Photel->load_inv($unique_id);\n\t\t$this->load->view('public/template/head', $var);\n\t\t$this->load->view('public/template/menu_head', $var);\n\t\t$this->load->view('public/template/content', $var);\n\t\t$this->load->view('public/part/single/invoice', $var);\n\t\t$this->load->view('public/template/end_content');\n\t\t$this->load->view('public/template/footer', $var);\n\t}", "title": "" }, { "docid": "423f13a6e7ad868ccac1b1f171208248", "score": "0.63936394", "text": "function previewinvoice($invoice_id = 0)\n\t{\n\t\t$data \t\t\t\t\t\t= array();\n\t\t$data['title'] \t\t\t\t= $this->title;\n\t\t$data['invoice_details']\t= $this->tax_invoice_model->previewinvoice($invoice_id);\n\t\t$this->load->view('tax_invoices/previewinvoice', $data);\n\t}", "title": "" }, { "docid": "bb4781326de1cc45999770974dba3305", "score": "0.63771385", "text": "public function index()\n\t{\n\t\t$user_id = Auth::user()->id;\n\t\t$invoices = Invoice::with('invoiceitem')->where('user_id', '=', $user_id)->get();\n\t\t/* Get full invoice query\n\t\t$invoices = DB::table('invoices')\n\t\t\t->leftJoin('advertisers', 'invoices.advertiser_id','=','advertisers.id')\n\t\t\t->get();\n\t\t*/\n\n\t\treturn View::make('invoices.index')->with('invoices', $invoices);\n\n\t}", "title": "" }, { "docid": "685667e93fd63608a82699591c8ed1d1", "score": "0.636976", "text": "public function printInvoiceAction() {\n if (!$this->_helper->requireUser()->isValid()) {\n return;\n }\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->backer_id = $backer_id = Engine_Api::_()->sitecrowdfunding()->getEncodeToDecode($this->_getParam('backer_id', null));\n if (empty($backer_id)) {\n $this->view->sitecrowdfunding_print_invoice_no_permission = true;\n return;\n }\n $this->view->backer = $backer = Engine_Api::_()->getItem('sitecrowdfunding_backer', $backer_id);\n $this->view->project_id = $project_id = $backer->project_id;\n\n $parentOrganization = Engine_Api::_()->getDbtable('pages', 'sitecrowdfunding')->getParentPages($project_id);\n $this->view->sitepage = $sitepage = Engine_Api::_()->getItem('sitepage_page',$parentOrganization['page_id']);\n $file = Engine_Api::_()->getItemTable('storage_file')->getFile($sitepage->donate_receipt_logo, 'thumb.cover');\n $this->view->donate_receipt_logo = $donate_receipt_logo = $file ? $file->map() :null;\n\n if ($this->view->project_id != $backer->project_id) {\n return $this->_forward('notfound', 'error', 'core');\n }\n\n $this->view->project = $project = Engine_Api::_()->getItem('sitecrowdfunding_project', $backer->project_id);\n $this->view->reward = 0;\n $this->view->shipping_included = 0;\n if ($backer->reward_id) {\n $this->view->reward = $reward = Engine_Api::_()->getItem('sitecrowdfunding_reward', $backer->reward_id);\n if ($reward->shipping_method == 2 || $reward->shipping_method == 3) {\n $this->view->shipping_included = 1;\n }\n\n }\n $this->view->site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', '');\n $this->_helper->layout->setLayout('default-simple');\n if (!empty($backer->user_id)) {\n $user_table = Engine_Api::_()->getDbtable('users', 'user');\n $select = $user_table->select()->from($user_table->info('name'), array(\"email\", \"displayname\"))->where('user_id =?', $backer->user_id);\n $this->view->user_detail = $user_table->fetchRow($select);\n }\n\n // FETCH SITE LOGO OR TITLE\n $db = Zend_Db_Table_Abstract::getDefaultAdapter();\n\n $select = new Zend_Db_Select($db);\n $select->from('engine4_core_pages')->where('name = ?', 'header')->limit(1);\n\n $info = $select->query()->fetch();\n if (!empty($info)) {\n $page_id = $info['page_id'];\n\n $select = new Zend_Db_Select($db);\n $select->from('engine4_core_content', array(\"params\"))\n ->where('page_id = ?', $page_id)\n ->where(\"name LIKE '%core.menu-logo%'\")\n ->limit(1);\n $info = $select->query()->fetch();\n $params = json_decode($info['params']);\n\n if (!empty($params->logo)) {\n $this->view->logo = $params->logo;\n }\n\n }\n }", "title": "" }, { "docid": "7c4ebc06bebaf0db4c135e959ae90900", "score": "0.63650155", "text": "public function purchase_info_id() {\n $CI = & get_instance();\n $this->auth->check_admin_auth();\n $CI->load->library('lpurchase');\n $CI->load->model('Purchases');\n $invoice_no = $this->input->post('invoice_no',TRUE);\n $content = $this->lpurchase->purchase_list_invoice_no($invoice_no);\n $this->template->full_admin_html_view($content);\n }", "title": "" }, { "docid": "4a0a14861ba51b886c25514667d36a4a", "score": "0.6350235", "text": "public function index()\n {\n $invoices = Invoice::with('period')->with('customer')->get(); \n return view('invoice-module.invoice.invoice', compact('invoices'));\n }", "title": "" }, { "docid": "9ac3b37a535946b591b15cf471d0d8a2", "score": "0.6349436", "text": "public function pdfinvoicesAction(){\n $orderIds = $this->getRequest()->getPost('order_ids');\n $flag = false;\n if (!empty($orderIds)) {\n foreach ($orderIds as $orderId) {\n $invoices = Mage::getResourceModel('sales/order_invoice_collection')\n ->setOrderFilter($orderId)\n ->load();\n if ($invoices->getSize() > 0) {\n $flag = true;\n if (!isset($pdf)){\n $pdf = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);\n } else {\n $pages = Mage::getModel('sales/order_pdf_invoice')->getPdf($invoices);\n $pdf->pages = array_merge ($pdf->pages, $pages->pages);\n }\n }\n }\n if ($flag) {\n return $this->_prepareDownloadResponse(\n 'invoice'.Mage::getSingleton('core/date')->date('Y-m-d_H-i-s').'.pdf', $pdf->render(),\n 'application/pdf'\n );\n } else {\n $this->_getSession()->addError($this->__('There are no printable documents related to selected orders.'));\n $this->_redirect('*/*/');\n }\n }\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "29353d1124fdd9ab6904f936937d093e", "score": "0.63391316", "text": "public function index()\n {\n\n $arrObjInvoices=Invoice::all();\n return view('admin.invoice.list', ['arrObjInvoices'=>$arrObjInvoices]);\n }", "title": "" }, { "docid": "518cd0a16b352147acc76a3d5e65b1d3", "score": "0.63329273", "text": "public function index()\n {\n $invoices = Invoice::onlyTrashed()->get();\n return view('admin.invoices.invoices_archived', compact('invoices'));\n }", "title": "" }, { "docid": "81530faa2dc9ea7d7ff751200777af64", "score": "0.62997603", "text": "public function index()\n {\n if (! Gate::allows('invoice_item_access')) {\n return abort(401);\n }\n\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('invoice_item_delete')) {\n return abort(401);\n }\n $invoice_items = InvoiceItem::onlyTrashed()->get();\n } else {\n $invoice_items = InvoiceItem::all();\n }\n\n return view('admin.invoice_items.index', compact('invoice_items'));\n }", "title": "" }, { "docid": "762d4de94277f2d545bf51596eaa97f1", "score": "0.62958866", "text": "public function index()\n {\n //\n $invoices = $this->invoiceService->all();\n $statuses = $this->invoiceService->invoiceStatusList();\n return view('invoices.index', compact('invoices', 'statuses'));\n }", "title": "" }, { "docid": "21ab5e0c006d7254dd5862924ae97392", "score": "0.6295709", "text": "public function index()\n {\n $invoices = Invoice::all();\n return view('invoices/invoices', compact('invoices'));\n }", "title": "" }, { "docid": "460adbc8390ce29efd277ed4222b8e48", "score": "0.629525", "text": "public function view_invoices($sir_id)\n {\n $data[\"_invoices\"] = Tbl_manual_invoice::sir()->customer_invoice()->where(\"tbl_sir.sir_id\",$sir_id)->orderBy(\"tbl_customer_invoice.inv_id\",\"DESC\")->where(\"inv_shop_id\",$this->user_info->shop_id)->get();\n $data[\"sir_id\"] = $sir_id;\n return view(\"member.customer_invoice.customer_invoice_list\",$data);\n }", "title": "" }, { "docid": "b2e31c0383787bbf43d8ddcc14fa678a", "score": "0.6292754", "text": "public function index()\n {\n $this->authorize('view-any', Invoice::class);\n return view('invoice.index')->with([\n 'invoices' => Invoice::all()->reverse(),\n ]);\n }", "title": "" }, { "docid": "acafb64d31b5e218757a2be9a946181b", "score": "0.62915874", "text": "public function index()\n {\n $this->setStatus();\n $clients = Client::get();\n $requestStatus = -1;\n $requestClient = -1;\n $invoices = Invoice::where('type', 1)->orderBy('created_at', 'desc');\n if (request()->rdio == null) {\n $requestRadio = 0;\n } else {\n $requestRadio = request()->rdio;\n if (request()->rdio == 2) {\n if (request()->invoice_id != null) {\n $invoices->where('id', request()->invoice_id);\n }\n } else {\n if (request()->status != null) {\n $invoices->where('status', request()->status);\n $requestStatus = request()->status ;\n }\n if (request()->client_id != null) {\n $invoices->where('client_id', request()->client_id);\n $requestClient = request()->client_id ;\n }\n }\n }\n\n $invoices = $invoices->get();\n return view('invoices.index', compact('invoices', 'requestRadio','requestStatus','clients','requestClient'));\n }", "title": "" }, { "docid": "4ac2640d5c892d49350c823b73b20ca0", "score": "0.6278195", "text": "public function show(Invoices $invoice)\n {\n $invoice = Invoices::find($invoice->id);\n $payments = Payment::where('invoice_id','=',$invoice->id)->get();\n $invoiceItems = Invoice_lines::where('invoice_id','=', $invoice->id)->get();\n $productList = [];\n\n $productIds = [];\n foreach($invoiceItems as $item){\n $productList[] = [\n 'product_name' => $item->product_name,\n 'quantity' => $item->quantity,\n 'price' => $item->price,\n 'uom' => $item->uom,\n 'sub_total' => $item->sub_total,\n ];\n }\n // dd($productList);\n\n // foreach($productIds as $id){\n // $product = Product::find($id);\n // $product->variants = $invoiceItems->where('product_id','=', $id);\n // $productList[] = $product;\n // }\n\n return view('invoice.show', compact('invoice','payments','productList'));\n }", "title": "" }, { "docid": "26797d7353f9c0832cbede4642a9447f", "score": "0.62701803", "text": "public function invoiceView() {\n\n // dd('test');\n\n $title = \"TESTING\";\n\n $data = ['title' => $title ];\n\n $pdf = PDF::loadView('admin.companies.invoice', $data);\n return $pdf->download('invoice.pdf');\n\n // return view('admin.companies.invoice', $data);\n \n }", "title": "" }, { "docid": "0d13148b7978d55d8b581a2d4f15ceb0", "score": "0.62491137", "text": "public function index()\n {\n $adminCoinInvoices = AdminCoin::where(['admin_id'=>auth()->id(),'adminInvoice_id'=>NULL])\n ->orderBy('created_at','DESC')\n ->select('id','order_id','amount')\n ->paginate(10);\n\n $totalAdminCoinAmount = number_format((float)$adminCoinInvoices->sum('amount'),2, '.', '');\n\n $requestedInvoices = Invoice::where(['invoicer_id'=>auth()->id(), 'invoicer'=> 'admin', 'status'=>'requested'])\n ->orderBy('created_at','DESC')\n ->select('id','amount','created_at')\n ->paginate(10);\n\n $totalRequestedAmount = number_format((float)$requestedInvoices->sum('amount'),2, '.', '');\n\n $paidInvoices = Invoice::where(['invoicer_id'=>auth()->id(), 'invoicer'=> 'admin', 'status'=>'paid'])\n ->orderBy('created_at','DESC')\n ->select('id','amount','updated_at')\n ->paginate(10);\n\n $totalPaidAmount = number_format((float)$paidInvoices->sum('amount'),2, '.', '');\n\n return view('admin.order.invoices.myinvoices.index', compact('adminCoinInvoices','requestedInvoices','paidInvoices',\n 'totalAdminCoinAmount','totalRequestedAmount','totalPaidAmount')); \n }", "title": "" }, { "docid": "59b0705e2a25486732db21ce891e9784", "score": "0.62422884", "text": "function faktura_invoices(){\n $this->data['mainTab'] = 'faktura';\n $this->data['activeTab'] = 'faktura_invoices';\n $org_id = $this->session->userdata('member_org');\n $mem_id = $this->session->userdata('mem_id');\n \n $data_previlize = $this->check_member_type_previlize();\n if($this->session->userdata('mem_type')==\"Admin\" || $data_previlize['access_faktura']) {\n $this->data['org_all_custom_invoice'] = $this->info_model->get_all_custom_invoice($this->session->userdata('member_org'));\n //print_r($this->data['org_all_custom_invoice'] ); exit;\n $this->data['dynamicView'] = 'pages/organization/faktura/custom_faktura_list';\n }\n else{\n $this->data['dynamicView'] = 'pages/organization/faktura/faktura_no_access';\n }\n $data_mem_type['mem_type'] = $this->session->userdata('mem_type');\n //$this->load->vars($error_data); \n //$this->load->vars($data_create_faktura);\t \n $this->load->vars($data_previlize);\t \n $this->load->vars($data_mem_type);\t\n $this->_commonPageLayout('frontend_viewer'); \n}", "title": "" }, { "docid": "e3b4e5e18229b8a991549e8100359576", "score": "0.62419826", "text": "public function show($invoice_id)\n {\n // print invoice\n $invoices = DB::table('invoices')\n ->join('users', 'invoices.user_id', '=', 'users.id')\n ->join('user_descriptions', 'invoices.user_id', '=', 'user_descriptions.user_id')\n ->where('invoice_id', $invoice_id)\n ->first();\n\n $order_items = DB::table('order_items')\n ->join('products', 'order_items.barcode', '=', 'products.barcode')\n ->where('transaction_no', $invoice_id)\n ->get();\n\n $discount = DB::table('order_items')\n ->where('transaction_no', $invoice_id)\n ->sum('discount');\n\n $sub_total = DB::table('order_items')\n ->where('transaction_no', $invoice_id)\n ->sum(DB::raw('price * quantity'));\n\n $sub_total_discount = $sub_total - $discount;\n\n $taxes = $sub_total_discount / 5.4;\n\n $taxes = round($taxes, 2);\n\n $get_total = $sub_total_discount + $taxes;\n\n return view('print_invoice', [\n 'invoices' => $invoices,\n 'order_items' => $order_items,\n 'sub_total_discount' => $sub_total_discount,\n 'taxes' => $taxes,\n 'get_total' => $get_total,\n\n ]);\n }", "title": "" }, { "docid": "bc1975ef3cecda63955d94e5996bb8bd", "score": "0.62314373", "text": "public function invoice($orcamento_id)\n {\n $orcamento = DB::table('bxby_orcamento')->join('bxby_pendereco', 'bxby_orcamento.cod_endereco', '=', 'bxby_pendereco.seq_endereco')\n ->where('bxby_orcamento.sequencia', $orcamento_id)->get();\n\n $produtos_orcamento = DB::table('bxby_orcamento_produto')->where('codigo_orcamento', $orcamento_id)->get();\n return view('usuario.invoices.invoice', ['orcamento' => $orcamento, 'produtos' => $produtos_orcamento]);\n }", "title": "" }, { "docid": "99d5effab40f13db2b5e085dae6bedc4", "score": "0.62189704", "text": "function edit($invoice_id=0)\n\t{\n\t\t$data = array();\n\t\t\n\t\tif(empty($invoice_id)):\n\t\t\t$invoice_id = $this->input->get('invoice_id');\t\t\n\t\tendif;\t\t\t\t\t\t\n\t\t$from_date = $this->input->get('from_date');\n\t\t$to_date = $this->input->get('to_date');\n\t\t$client_id = $this->input->get('client_id');\n\t\t$status = $this->input->get('status');\n\t\t\n\t\t$data['title'] \t\t\t= $this->title;\n\t\t$data['activemenu'] \t= $this->activemenu;\n\t\t$data['invoice_details']= $this->tax_invoice_model->get_invoice_data($invoice_id);\n\t\t$data['invoice_items']\t= $this->tax_invoice_model->get_invoice_items($invoice_id);\n\t\t$data['invoice_payments']= $this->tax_invoice_model->get_invoice_payments($invoice_id);\n\t\t\n\t\t/* if($from_date == 'all' || $from_date == 'UNPAID' || $from_date == 'PAID' || $from_date == 'CANCELLED'){\n\t\t\t$from_date = '';\n\t\t} */\n\t\t\n\t\t//for bring to listing to display back the record users keyed in before\n\t\t$data['from_date'] = $from_date;\n\t\t$data['to_date'] = $to_date;\n\t\t$data['client_id'] = $client_id;\n\t\t$data['status'] = $status;\n\t\t\n\t\t$data['clients'] \t\t= $this->common_model->get_select_option('ci_clients', 'client_id', 'client_name', $data['invoice_details']->client_id);\n\t\t$data['taxrates'] \t\t= $this->common_model->get_select_option('ci_tax_rates', 'tax_rate_id', 'tax_rate_name', 1);\n\t\t$data['pagecontent'] \t= 'tax_invoices/editinvoice';\n\t\t$this->load->view('common/holder', $data);\n\t}", "title": "" }, { "docid": "fbbbc85501fd492c260b51ae8f88a2ff", "score": "0.6210564", "text": "public function index()\n {\n $invoices = Invoice_Records::all();\n\n $title = 'All Invoices Records';\n\n $subtitle = \"view and update invoices records\";\n\n return view('invoices.index', compact('invoices', 'title','subtitle'));\n }", "title": "" }, { "docid": "77421eff4662e3e447891149ec14725e", "score": "0.62004703", "text": "public function execute ()\n {\n $param = $this->request->getParams(\"param\");\n $orderId=$param['param'];\n $orderdetails = $this->order->loadByIncrementId ( $orderId );\n\n foreach ($orderdetails->getAllItems() as $item)\n {\n $qty = $item->getQtyOrdered();\n $item = $item->getItemId();\n\n }\n\n $order = $this->_orderRepository->get( $orderId );\n\n if ($order->canInvoice ()) {\n $itemsArray = [$item => $qty]; //here 80 is order item id and 2 is it's quantity to be invoice\n $shippingAmount = $orderdetails->getShippingAmount () ;\n $subTotal = $orderdetails->getSubTotal ();\n $baseSubtotal = $orderdetails->getGrandTotal ();\n $grandTotal = $orderdetails->getGrandTotal ();\n $baseGrandTotal = $orderdetails->getBaseGrandTotal ();\n $invoice = $this->_invoiceService->prepareInvoice ( $order, $itemsArray );\n $invoice->setShippingAmount ( $shippingAmount );\n $invoice->setSubtotal ( $subTotal );\n $invoice->setBaseSubtotal ( $baseSubtotal );\n $invoice->setGrandTotal ( $grandTotal );\n $invoice->setBaseGrandTotal ( $baseGrandTotal );\n $invoice->register ();\n $transactionSave = $this->_transaction->addObject (\n $invoice\n )->addObject (\n $invoice->getOrder ()\n );\n\n $transactionSave->save ();\n\n if (!$invoice->getEmailSent ()) {\n try {\n $this->_invoiceSender->send ( $invoice );\n } catch (\\Exception $e) {\n $this->messageManager->addErrorMessage ( 'email not send !' );\n }\n\n }\n\n //send notification code\n $order->addStatusHistoryComment (\n __ ( 'Notified customer about invoice #%1.', $invoice->getId () )\n )\n ->setIsCustomerNotified ( true )\n ->save ();\n\n }\n $redirect = $this->resultRedirectFactory->create ();\n $redirect->setPath ( 'seller/order/lists' );\n return $redirect;\n }", "title": "" }, { "docid": "c7567109b5d3083612b21f69d082aace", "score": "0.61993253", "text": "function ciniki_sapos_invoicePDF(&$ciniki) {\n // \n // Find all the required and optional arguments\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), \n 'invoice_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Invoice'), \n 'type'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'invoice', 'name'=>'Output Type'),\n 'subject'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'no', 'name'=>'Subject'),\n 'textmsg'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'no', 'name'=>'Text Message'),\n 'email'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'no', 'name'=>'Email PDF'),\n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'private', 'checkAccess');\n $rc = ciniki_sapos_checkAccess($ciniki, $args['tnid'], 'ciniki.sapos.invoicePDF'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n\n //\n // Load tenant details\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'tenantDetails');\n $rc = ciniki_tenants_tenantDetails($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['details']) && is_array($rc['details']) ) { \n $tenant_details = $rc['details'];\n } else {\n $tenant_details = array();\n }\n\n //\n // Load the invoice settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbDetailsQueryDash');\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_sapos_settings', 'tnid', $args['tnid'], 'ciniki.sapos', 'settings', '');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['settings']) ) {\n $sapos_settings = $rc['settings'];\n } else {\n $sapos_settings = array();\n }\n \n //\n // check for invoice-default-template\n //\n if( isset($args['type']) && $args['type'] == 'picklist' ) {\n $invoice_template = 'picklist';\n } else {\n if( !isset($sapos_settings['invoice-default-template']) \n || $sapos_settings['invoice-default-template'] == '' ) {\n $invoice_template = 'default';\n } else {\n $invoice_template = $sapos_settings['invoice-default-template'];\n }\n }\n \n $rc = ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'templates', $invoice_template);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $fn = $rc['function_call'];\n\n if( isset($args['email']) && $args['email'] == 'yes' ) {\n $rc = $fn($ciniki, $args['tnid'], $args['invoice_id'],\n $tenant_details, $sapos_settings, 'email');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n //\n // Email the pdf to the customer\n //\n $filename = $rc['filename'];\n $invoice = $rc['invoice'];\n $pdf = $rc['pdf'];\n\n //\n // if customer is set\n //\n if( !isset($invoice['customer']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.82', 'msg'=>'No customer attached to the invoice, we are unable to send the email.'));\n }\n if( !isset($invoice['customer']['emails'][0]['email']['address']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.83', 'msg'=>\"The customer doesn't have an email address, we are unable to send the email.\"));\n }\n\n if( isset($args['subject']) && isset($args['textmsg']) ) {\n $subject = $args['subject'];\n $textmsg = $args['textmsg'];\n } else {\n $subject = 'Invoice #' . $invoice['invoice_number'];\n if( isset($sapos_settings['invoice-email-message']) && $sapos_settings['invoice-email-message'] != '' ) {\n $textmsg = $sapos_settings['invoice-email-message'];\n } else {\n $textmsg = 'Please find your invoice attached.';\n }\n if( $invoice['invoice_type'] == '20' ) {\n $subject = 'Order #' . $invoice['invoice_number'];\n $textmsg = 'Your order receipt is attached.';\n if( isset($sapos_settings['cart-email-message']) && $sapos_settings['cart-email-message'] != '' ) {\n $textmsg = $sapos_settings['cart-email-message'];\n }\n } elseif( $invoice['invoice_type'] == '30' ) {\n $subject = 'Receipt #' . $invoice['invoice_number'];\n $textmsg = 'Your receipt is attached.';\n if( isset($sapos_settings['pos-email-message']) && $sapos_settings['pos-email-message'] != '' ) {\n $textmsg = $sapos_settings['pos-email-message'];\n }\n } elseif( $invoice['invoice_type'] == '40' ) {\n $subject = 'Order #' . $invoice['invoice_number'];\n $textmsg = 'Thank you for your order. Your order details are attached.';\n if( isset($sapos_settings['order-email-message']) && $sapos_settings['order-email-message'] != '' ) {\n $textmsg = $sapos_settings['order-email-message'];\n }\n } elseif( $invoice['invoice_type'] == '90' ) {\n $subject = 'Quote #' . $invoice['invoice_number'];\n $textmsg = 'Here is the quote you requested.';\n if( isset($sapos_settings['quote-email-message']) && $sapos_settings['quote-email-message'] != '' ) {\n $textmsg = $sapos_settings['quote-email-message'];\n }\n }\n }\n\n //\n // Start transaction\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit');\n $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.mail');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Add to the mail module\n //\n if( isset($sapos_settings['invoice-email-all-addresses']) && $sapos_settings['invoice-email-all-addresses'] == 'yes' ) {\n foreach($invoice['customer']['emails'] as $e) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'addMessage');\n $rc = ciniki_mail_hooks_addMessage($ciniki, $args['tnid'], array(\n 'object'=>'ciniki.sapos.invoice',\n 'object_id'=>$args['invoice_id'],\n 'customer_id'=>$invoice['customer_id'],\n 'customer_email'=>$e['email']['address'],\n 'customer_name'=>(isset($invoice['customer']['display_name'])?$invoice['customer']['display_name']:''),\n 'subject'=>$subject,\n 'html_content'=>$textmsg,\n 'text_content'=>$textmsg,\n 'attachments'=>array(array('content'=>$pdf->Output('invoice', 'S'), 'filename'=>$filename)),\n ));\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.mail');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.84', 'msg'=>'Unable to create mail message.', 'err'=>$rc['err']));\n }\n $ciniki['emailqueue'][] = array('mail_id'=>$rc['id'], 'tnid'=>$args['tnid']);\n }\n } else {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'mail', 'hooks', 'addMessage');\n $rc = ciniki_mail_hooks_addMessage($ciniki, $args['tnid'], array(\n 'object'=>'ciniki.sapos.invoice',\n 'object_id'=>$args['invoice_id'],\n 'customer_id'=>$invoice['customer_id'],\n 'customer_email'=>$invoice['customer']['emails'][0]['email']['address'],\n 'customer_name'=>(isset($invoice['customer']['display_name'])?$invoice['customer']['display_name']:''),\n 'subject'=>$subject,\n 'html_content'=>$textmsg,\n 'text_content'=>$textmsg,\n 'attachments'=>array(array('content'=>$pdf->Output('invoice', 'S'), 'filename'=>$filename)),\n ));\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.mail');\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.234', 'msg'=>'Unable to create mail message.', 'err'=>$rc['err']));\n }\n $ciniki['emailqueue'][] = array('mail_id'=>$rc['id'], 'tnid'=>$args['tnid']);\n }\n\n //\n // Commit the transaction\n //\n $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.mail');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.mail');\n return $rc;\n }\n\n// $ciniki['emailqueue'][] = array('to'=>$invoice['customer']['emails'][0]['email']['address'],\n// 'to_name'=>(isset($invoice['customer']['display_name'])?$invoice['customer']['display_name']:''),\n// 'tnid'=>$args['tnid'],\n// 'subject'=>$subject,\n// 'textmsg'=>$textmsg,\n// 'attachments'=>array(array('string'=>$pdf->Output('invoice', 'S'), 'filename'=>$filename)),\n// );\n return array('stat'=>'ok');\n }\n\n return $fn($ciniki, $args['tnid'], $args['invoice_id'],\n $tenant_details, $sapos_settings);\n}", "title": "" }, { "docid": "267133aa766d46c841a68e7991a55d1a", "score": "0.61944515", "text": "public function index()\n {\n // User Descriptions\n $users = DB::table('users')\n ->join('user_descriptions', 'users.id', '=', 'user_descriptions.user_id')\n ->join('user_photos', 'users.id', '=', 'user_photos.user_id')\n // ->select('users.*', 'user_descriptions.*', 'user_photos.*')\n ->Where('id', 'LIKE', '%' . Auth::user()->id . '%')\n ->first();\n\n // ienumerable\n $invoices = DB::table('invoices')->get();\n\n $tableInvoices = Invoice::all();\n\n if ($tableInvoices->isEmpty()) {\n $invoices = DB::table('invoices')->paginate();\n } else {\n // ienumerable\n $invoices = DB::table('invoices');\n\n // search validation\n $search = Invoice::where('invoice_id', 'like', '%' . request()->search . '%')\n ->OrWhere('status', 'like', '%' . request()->search . '%')\n ->first();\n\n\n if ($search === null) {\n return redirect('invoices')->with('danger', 'Invalid Search');\n } else {\n $invoices = $invoices->where('invoice_id', 'like', '%' . request()->search . '%')\n ->OrWhere('status', 'like', '%' . request()->search . '%')\n ->latest()\n ->paginate(10);\n }\n }\n return view('invoices', ['users' => $users, 'invoices' => $invoices]);\n }", "title": "" }, { "docid": "64f4e85222f0be5d573f8ba6cd6974d1", "score": "0.6192384", "text": "public function edit(){\n \n $id = \"\";\n if ($this->request->isParameterNotEmpty(\"actionid\")) {\n $id = $this->request->getParameter ( \"actionid\" );\n }\n\t\n if ($id == \"\"){\n $id = $this->request->getParameter ( \"id\" );\n }\n \n // lang\n $lang = $this->getLanguage();\n \n // get\n $modelInvoice = new PsInvoiceHistory();\n $info = $modelInvoice->get($id);\n \n // get names\n $modelUnit = new CoreUnit();\n $unitName = $modelUnit->getUnitName($info[\"id_unit\"]);\n \n $modelUser = new CoreUser();\n $responsibleName = $modelUser->getUserFUllName($info[\"id_responsible\"]);\n\n // form\n // build the form\n $form = new Form($this->request, \"psinvoicehistory/edit\");\n $form->setTitle(PsTranslator::Edit_invoice($lang));\n $form->addHidden(\"id\", $info[\"id\"]);\n $form->addText(\"number\", PsTranslator::Number($lang), true, $info[\"number\"], \"readonly\");\n $form->addText(\"id_unit\", CoreTranslator::Unit($lang), true, $unitName, \"readonly\");\n $form->addText(\"id_responsible\", CoreTranslator::Responsible($lang), true, $responsibleName, \"readonly\");\n $form->addText(\"period_begin\", PsTranslator::BeginingPeriod($lang), true, CoreTranslator::dateFromEn($info[\"period_begin\"],$lang), \"readonly\");\n $form->addText(\"period_begin\", PsTranslator::EndPeriod($lang), true, CoreTranslator::dateFromEn($info[\"period_end\"],$lang), \"readonly\");\n $form->addText(\"date_generated\", PsTranslator::Date_Generated($lang), true, CoreTranslator::dateFromEn($info[\"date_generated\"],$lang), \"readonly\");\n $dp = $info[\"date_paid\"];\n if ($dp == \"0000-00-00\"){\n $dp = \"\";\n }\n $form->addDate(\"date_paid\", PsTranslator::Date_Paid($lang), true, CoreTranslator::dateFromEn($dp,$lang));\n $form->addSelect(\"is_paid\", PsTranslator::Is_Paid($lang), array(PsTranslator::No($lang), PsTranslator::Yes($lang)), array(0,1), $info[\"is_paid\"]);\n $form->addText(\"total_ht\", PsTranslator::TotalHT($lang), true, $info[\"total_ht\"]);\n $form->addDownloadButton(PsTranslator::Download($lang), $info[\"url\"]);\n \n $form->setValidationButton(CoreTranslator::Ok($lang), \"psinvoicehistory/edit\");\n $form->setCancelButton(CoreTranslator::Cancel($lang), \"psinvoicehistory\");\n\n if ($form->check()) {\n // run the database query\n \n $modelInvoice->edit( $this->request->getParameter(\"id\"),\n CoreTranslator::dateToEn($this->request->getParameter(\"date_paid\"), $lang), \n $this->request->getParameter(\"is_paid\"),\n $this->request->getParameter(\"total_ht\")\n );\n\n $this->redirect(\"psinvoicehistory\");\n \n } else {\n // set the view\n $formHtml = $form->getHtml();\n // view\n $navBar = $this->navBar();\n $this->generateView(array(\n 'navBar' => $navBar,\n 'formHtml' => $formHtml\n ));\n }\n\t}", "title": "" }, { "docid": "42acb2833fcdfce38f157f4219f3a022", "score": "0.6190627", "text": "public function index()\n {\n $invoices = Invoice::orderBy('created_at', 'DESC')->get();\n return view('admin_res.invoice.index', compact('invoices'));\n }", "title": "" }, { "docid": "fd63e6bf69af3ac0039251231942fc8c", "score": "0.6188342", "text": "public function invoiceShow()\n {\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, config(\"app.asaas_url\").\"webhook/invoice\");\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_HEADER, FALSE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n \"Content-Type: application/json\",\n \"access_token: \".config(\"app.asaas_key\")\n ));\n $response = curl_exec($ch);\n curl_close($ch);\n return response()->json($response);\n }", "title": "" }, { "docid": "70c31d162d2f92f6b3299f6f2d12666b", "score": "0.61868405", "text": "function invoice_view($param1 = '', $param2 = '')\n\t{\n\t\tif ($this->session->userdata('patient_login') != 1)\n\t\t\tredirect(base_url() . 'index.php?login');\n\t\t$page_data['invoice_id'] = $param1;\n\t\t$page_data['page_name'] = 'invoice_view';\n\t\t$page_data['page_title'] = 'Invoice';\n\t\t$this->load->view('index', $page_data);\n\t}", "title": "" }, { "docid": "f22a2f1c5208a6bfb1736210a865d288", "score": "0.6185932", "text": "function invoice($param=0,$type='invoice')\n {\n $data['title'] = $this->properti['name'].' | Invoice '.ucwords($this->modul['title']).' | SO-0'.$param;\n $sales = $this->Sales_model->get_by_id($param)->row();\n \n if ($sales){\n \n // property\n $data['p_name'] = $this->properti['sitename'];\n $data['p_address'] = $this->properti['address'];\n $data['p_city'] = $this->properti['city'];\n $data['p_zip'] = $this->properti['zip'];\n $data['p_phone'] = $this->properti['phone1'];\n $data['p_email'] = $this->properti['email'];\n $data['p_logo'] = $this->properti['logo'];\n \n //agent details\n $agent = $this->agent->get_by_id($sales->agent_id)->row();\n $data['a_code'] = strtoupper($agent->code);\n $data['a_name'] = strtoupper($agent->name);\n $data['a_phone'] = $agent->phone1.' / '.$agent->phone2;\n $data['a_address'] = $agent->address;\n $data['a_city'] = $agent->city;\n $data['a_zip'] = $agent->zip;\n\n // customer details\n $customer = $this->customer->get_details($sales->cust_id)->row();\n $data['c_name'] = strtoupper($customer->first_name.' '.$customer->last_name);\n $data['c_email'] = $customer->email;\n $data['c_address'] = $customer->shipping_address;\n $data['c_phone'] = $customer->phone1.' / '.$customer->phone2;\n $data['c_city'] = $this->city->get_name($customer->city);\n $data['c_zip'] = $customer->zip;\n\n // sales\n $data['so'] = $sales->code.'/'.get_month_romawi(date('m', strtotime($sales->dates))).'/'.date('Y', strtotime($sales->dates));\n $data['dates'] = tglincomplete($sales->dates);\n\n $data['total'] = $sales->total;\n $data['shipping'] = idr_format(floatval($sales->shipping+$sales->cost));\n $data['tot_amt'] = idr_format(intval($sales->amount+$sales->cost+$sales->shipping));\n\n // weight total\n $total = $this->sitem->total($param);\n $data['tax'] = $sales->tax;\n $data['discount'] = $sales->discount;\n // bank\n $data['banks'] = $this->bank->get();\n\n // transaction table\n $data['items'] = $this->sitem->get_last_item($param)->result();\n if ($type == 'invoice'){ $this->load->view('sales_invoice', $data); }\n else{\n $html = $this->load->view('sales_invoice', $data, true); // render the view into HTML\n return $html;\n }\n }\n }", "title": "" }, { "docid": "f99a1168994fb0aeb73a62d8359b39e6", "score": "0.6185227", "text": "public function invoice() {\n\t\treturn view('fatura.invoice', ['page_title' => 'Fatura']);\n\t}", "title": "" }, { "docid": "822ef2a26f2aae1bcc5bd587d2c80caa", "score": "0.616326", "text": "public function index()\n {\n $invoices = Auth::user()->invoices()->with('shop')->paginate(1);\n\n return view('invoices.index')\n ->with('invoices', $invoices);\n }", "title": "" }, { "docid": "ca18e28daa8c17b13bc901b4a829d44f", "score": "0.61549395", "text": "public function index()\n {\n $invoices = Invoice::with('invoice')->with('status')->paginate(20);\n return view('dashboard.Invoices.invoiceList', ['invoices' => $invoices]);\n }", "title": "" }, { "docid": "945cfe4eae68310ea32f0976b07f4b44", "score": "0.6148935", "text": "public function index()\n {\n $invoices = Invoices::all();\n return view('invoice.index', compact('invoices'));\n }", "title": "" }, { "docid": "3c059e892587ffba680296ad565fdff4", "score": "0.6148343", "text": "public function index()\n {\n //\n $search = request()->input('search');\n $docs = Invoice::search($search)->orderBy('date_doc', 'desc')->paginate();\n return view(\"Invoices\")->with(['docs' => $docs]);\n }", "title": "" }, { "docid": "83a40cb51657d64151c2d5b1b82e7f0f", "score": "0.6144716", "text": "public function index()\n {\n // dd(1);\n $importInvoices = ImportInvoice::query()->with('importInvoiceDetail')->get();\n // dd($importInvoices->importInvoiceDetail);\n return view('admin/importInvoices/index', ['importInvoices' => $importInvoices]);\n }", "title": "" }, { "docid": "6865d922aeea64ffe7b9477194d3c404", "score": "0.6141111", "text": "public function index()\n {\n $items = InvoiceItem::all();\n return view('invoice-items.browse')->with('items', $items);\n }", "title": "" }, { "docid": "bd46d95445f288f4365d847c8c60c6c8", "score": "0.6134408", "text": "public function index()\n {\n $invoices = Invoice::all();\n for ($index = 0; $index < count($invoices); $index++) {\n $invoices[$index]->processesNames = '(' . implode('), (', $invoices[$index]->processes()->pluck('name')->toArray()) . ')';\n }\n return view('invoice.index', compact('invoices'));\n }", "title": "" }, { "docid": "d6f2b3ea3124901641075a43058909ab", "score": "0.61294246", "text": "public function index()\n {\n $contractors = Contractor::all();\n return view('contractors.list_invoices', compact('contractors'));\n }", "title": "" }, { "docid": "562666abecd31448203f55667f6214a7", "score": "0.61230105", "text": "public function part_order_invoice($id) {\n //send to view\n\n $partOrder = PartOrder::where('id', $id)->with('customer', 'invoice')->first();\n $invoice = null;\n if($partOrder->invoice !== null) \n {\n $invoice = Invoice::where('id', $partOrder->invoice->id)->with('sale')->first();\n }\n isset($_GET['print']) ? $print = true : $print = false;\n\n return view('print/part-orders/index')->with('partOrder', $partOrder)->with('invoice', $invoice)->with('print', $print);\n }", "title": "" }, { "docid": "0cd23fbdf209f76ad31880e5d227e544", "score": "0.61156404", "text": "public function edit(Invoice $invoice)\n {\n\n }", "title": "" }, { "docid": "b195fe7dda4996dcb7852e9ede5bd1fe", "score": "0.61150926", "text": "public function index()\n { \n $id = null;\n $vinvoices = VInvoice::orderBy('created_at', 'desc')\n ->paginate(8);\n return view('vinvoices.index', compact('vinvoices','id'));\n }", "title": "" }, { "docid": "7ebfb42d93cdc2c0b9a55d1f89b2e428", "score": "0.61123586", "text": "public function showMonthInvoices($id){\n $repository = Repository::find($id);\n $invoices = $repository->monthlyInvoices()->orderBy('created_at','DESC')->paginate(10);\n return view('manager.Reports.show_invoices')->with(['repository'=>$repository,'invoices'=>$invoices]);\n }", "title": "" }, { "docid": "d8283a06767d84472eb602d413e51370", "score": "0.6108007", "text": "public function edit_invoice($invoice_id = null)\n {\n\n if(empty($this->data))\n {\n if($this->params['pass'][0])\n {\n $employees = $this->Client->ClientsContract->Employee->salesStaff();\n $this->set(compact('employees'));\n $next = $this->params['named']['next'];\n $this->set(compact('next'));\n $this->data = $this->Client->ClientsContract->Invoice->getInvoiceReview($invoice_id);\n $this->page_title = 'Edit Invoice: '.$this->data['Invoice']['id'].'-'.$this->data['Client']['Client']['name'].' - '.$this->data['Employee']['Employee']['firstname'].' '.$this->data['Employee']['Employee']['lastname'];\n }\n } else {\n\n $user = $this->Auth->user();\n $this->data['Invoice']['modified_user_id'] =$user['User']['id'];\n $this->data['Invoice']['modified_date'] = date('Y-m-d');\n $invoiceToSave = $this->InvoiceFunction->AdjustDatesBeforeSave($this->data);\n $res = $this->Client->ClientsContract->Invoice->save_dynamic($invoiceToSave);\n\n if($res[0] > 0)\n {\n /*\n * setup flash message from messages from model\n */\n $outmsg = '';\n foreach($res[1] as $msg)\n {\n $outmsg .= $msg. ' ';\n }\n $this->Session->setFlash(__($outmsg, true));\n }\n $invoice = $this->Client->ClientsContract->Invoice->read(null,$this->data['Invoice']['id']);\n $contract = $this->Client->ClientsContract->read(null,$invoice['Invoice']['contract_id']);\n\n switch ($this->data['Invoice']['next']) {\n case \"view_invoices_pending\":\n $this->setup_view_invoices_pending($contract['ClientsContract']['client_id']);\n $this -> render('view_invoices_pending');\n break;\n case \"view_invoice\":\n $this->data = $this->Client->ClientsContract->Invoice->getInvoiceReview($invoice_id);\n $this->page_title = 'Edit Invoice: '.$this->data['Invoice']['id'].'-'.\n $this->data['Client']['Client']['name'].' - '.\n $this->data['Employee']['Employee']['firstname'].\n ' '.$this->data['Employee']['Employee']['lastname'];\n $this -> render('view_invoice');\n break;\n case \"view_invoices_pastdue\":\n $this->setup_view_invoices_pastdue($contract['ClientsContract']['client_id']);\n $this -> render('view_invoices_pastdue');\n break;\n }\n }\n }", "title": "" }, { "docid": "c88492b62c63d3b8c61da65869b3c540", "score": "0.6104493", "text": "public function invoice(Request $request)\n {\n $data = auth()->user();\n $datas = Orders::where('transaction_id',$request->tran_id)->with(\n 'get_order_details',\n 'get_order_details.get_product',\n 'get_order_details.get_product.get_product_avatars',\n )->first();\n\n return view('layouts.backend.invoice.order_invoice',[\n 'data'=>$data,\n 'datas'=>$datas\n ]);\n\n // $pdf = PDF::loadView('layouts.backend.invoice.order_invoice',['datas'=>$datas]);\n // return $pdf->stream('invoice.pdf');\n }", "title": "" }, { "docid": "373672dc2cc9a94c66d9add036595982", "score": "0.60971767", "text": "public function directsalesinvoice() { \n $data['page'] = 'Sales';\n\t\t$data['page_title'] = 'Direct Sales Invoice';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/sales/transaction/direct_sales_invoice', $data); \n\t}", "title": "" }, { "docid": "c58fde4b0b3889ba33a3bf0efd58dd96", "score": "0.609525", "text": "public function testListInvoices()\n {\n }", "title": "" }, { "docid": "a41443006cbd75a464b84648c41d1eed", "score": "0.60929406", "text": "public function show(InvoicesAttachment $invoicesAttachment)\n {\n //\n }", "title": "" }, { "docid": "d5dc3b535c9abbac835f14f8aabe455b", "score": "0.6090757", "text": "public function show()\n {\n\n return View::make(\"invoice.list\");\n }", "title": "" }, { "docid": "edb117444d5466379c6e1d2d5d2b399e", "score": "0.6085465", "text": "public function supplierinvoicelist() { \n $data['page'] = 'Purchase Order';\n\t\t$data['page_title'] = 'Supplier Invoice';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/purchase/supplier_invoice/supplierinvoicelist', $data); \n\t}", "title": "" }, { "docid": "a34d608144c39a0c4ad65f72558c0780", "score": "0.6072332", "text": "public function index()\n {\n $receipts = DB::table('receipts')->select('receiptid')->orderBy('receiptid', 'desc')->take(1)->get();\n if(count($receipts) > 0){\n foreach($receipts as $rec){\n $receiptid = $rec->receiptid;\n }\n $receiptid = \"REC0001\";\n $strstring = Str::substr($receiptid, 3, 10);\n $sum = (int)$strstring + 1;\n if(strlen($sum) == 1){\n $id = \"000\".$sum;\n }else if(strlen($sum) == 2){\n $id = \"00\".$sum;\n }else if(strlen($sum) == 3){\n $id = \"0\".$sum;\n }else{\n $id = $sum;\n }\n $rcpt = \"REC\".$id;\n }else{\n $rcpt = \"REC0001\";\n }\n $invoice = DB::table('invoice')->orderBy('invoiceid', 'desc')->get();\n return view('manage/account/receipt')->with('receiptid', $rcpt)->with('invoice', $invoice);\n }", "title": "" }, { "docid": "fd9dde268db9a8f204036f1c58d4a1b5", "score": "0.6068097", "text": "public function view()\n\t{\n\t\tif(!empty(Input::get('saleid')))\n\t\t{\n\t\t\t$id = Input::get('saleid');\n\t\t\t$invoice_number = Input::get('invoice_number');\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$id = Input::get('serviceid');\n\t\t\t$auto_id = Input::get('auto_id');\n\t\t}\n\t\t\t\t\n\t\t$viewid = $id;\n\t\t$sales = DB::table('tbl_sales')->where('id','=',$id)->first();\n\t\t$v_id = $sales->vehicle_id;\n\t\t$vehicale = DB::table('tbl_vehicles')->where('id','=',$v_id)->first();\n\t\tif(Input::get('saleid'))\n\t\t{\n\t\t\t$invioce = DB::table('tbl_invoices')->where([['sales_service_id',$id],['invoice_number',$invoice_number]])->first();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$invioce = DB::table('tbl_invoices')->where('id',$auto_id)->first();\n\t\t}\n\t\tif(!empty($invioce->tax_name))\n\t\t{\n\t\t\t$taxes = explode(', ',$invioce->tax_name);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$taxes='';\t\n\t\t}\t\t\n\t\t$rto = DB::table('tbl_rto_taxes')->where('vehicle_id','=',$v_id)->first();\n\t\t$logo = DB::table('tbl_settings')->first();\t\t\n\t\t$updatekey = DB::table('updatekey')->first();\n\t\t$s_key = $updatekey->secret_key;\n\t\t$p_key = $updatekey->publish_key;\n\t\t\n\t\t$html = view('invoice.salesinvoicemodel')->with(compact('viewid','vehicale','sales','logo','invioce','taxes','rto','p_key'))->render();\n\t\treturn response()->json(['success' => true, 'html' => $html]);\n\t}", "title": "" }, { "docid": "26658ab7faf52e4ee98295245b55e591", "score": "0.6055258", "text": "public function printInvoiceAction() {\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n $this->view->directPayment = Engine_Api::_()->sitestoreproduct()->isDirectPaymentEnable();\r\n $order_id = Engine_Api::_()->sitestoreproduct()->getEncodeToDecode($this->_getParam('order_id', null));\r\n $viewer_id = Engine_Api::_()->user()->getViewer()->getIdentity();\r\n\r\n if (empty($order_id)) {\r\n $this->view->sitestoreproduct_print_invoice_no_permission = true;\r\n return;\r\n }\r\n\r\n //USER IS BUYER OR NOT\r\n $this->view->orderObj = $orderObj = Engine_Api::_()->getItem('sitestoreproduct_order', $order_id);\r\n if ($viewer_id != $orderObj->buyer_id) {\r\n $authValue = Engine_Api::_()->sitestoreproduct()->isStoreAdmin($orderObj->store_id);\r\n\r\n //IS USER IS STORE ADMIN OR NOT\r\n if (empty($authValue) || $authValue == 1) {\r\n $this->view->sitestoreproduct_print_invoice_no_permission = true;\r\n return;\r\n }\r\n }\r\n\r\n $this->_helper->layout->setLayout('default-simple');\r\n $this->view->site_title = Engine_Api::_()->getApi('settings', 'core')->getSetting('core.general.site.title', '');\r\n\r\n if (!empty($orderObj->buyer_id)) {\r\n $user_table = Engine_Api::_()->getDbtable('users', 'user');\r\n $select = $user_table->select()->from($user_table->info('name'), array(\"email\", \"displayname\"))->where('user_id =?', $orderObj->buyer_id);\r\n $this->view->user_detail = $user_table->fetchRow($select);\r\n }\r\n\r\n // FETCH SITE LOGO OR TITLE\r\n $db = Zend_Db_Table_Abstract::getDefaultAdapter();\r\n\r\n $select = new Zend_Db_Select($db);\r\n $select->from('engine4_core_pages')->where('name = ?', 'header')->limit(1);\r\n\r\n $info = $select->query()->fetch();\r\n if (!empty($info)) {\r\n $page_id = $info['page_id'];\r\n\r\n $select = new Zend_Db_Select($db);\r\n $select->from('engine4_core_content', array(\"params\"))\r\n ->where('page_id = ?', $page_id)\r\n ->where(\"name LIKE '%core.menu-logo%'\")\r\n ->limit(1);\r\n $info = $select->query()->fetch();\r\n $params = json_decode($info['params']);\r\n\r\n if (!empty($params->logo))\r\n $this->view->logo = $params->logo;\r\n }\r\n\r\n if ($orderObj->gateway_id == 3)\r\n $this->view->cheque_info = Engine_Api::_()->getDbtable('ordercheques', 'sitestoreproduct')->getChequeDetail($orderObj->cheque_id);\r\n\r\n if (!empty($this->view->directPayment)) {\r\n $this->view->storeTitle = Engine_Api::_()->getDbtable('stores', 'sitestore')->getStoreAttribute($orderObj->store_id, 'title');\r\n $this->view->storeChequeDetail = Engine_Api::_()->getDbtable('sellergateways', 'sitestoreproduct')->getStoreChequeDetail(array('store_id' => $orderObj->store_id));\r\n } else {\r\n $this->view->admin_cheque_detail = Engine_Api::_()->getApi('settings', 'core')->getSetting('send.cheque.to', null);\r\n }\r\n $this->view->storeAddress = Engine_Api::_()->sitestoreproduct()->getStoreAddress($orderObj->store_id);\r\n $this->view->sitestore = $sitestore = Engine_Api::_()->getItem('sitestore_store', $orderObj->store_id);\r\n $this->view->order_products = $order_products = Engine_Api::_()->getDbtable('orderProducts', 'sitestoreproduct')->getOrderProductsDetail($order_id);\r\n $this->view->billing_address = Engine_Api::_()->getDbtable('orderaddresses', 'sitestoreproduct')->getAddress($order_id);\r\n $this->view->shipping_address = Engine_Api::_()->getDbtable('orderaddresses', 'sitestoreproduct')->getAddress($order_id, true, array('address_type' => 1));\r\n $this->view->billing_region_name = Engine_Api::_()->getItem('sitestoreproduct_region', $this->view->billing_address->state)->region;\r\n $this->view->shipping_region_name = Engine_Api::_()->getItem('sitestoreproduct_region', $this->view->shipping_address->state)->region;\r\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Sitestore/View/Helper', 'Sitestore_View_Helper');\r\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($sitestore);\r\n }", "title": "" }, { "docid": "0dc69f3c9c2c7ef2cfe31bd0fda8f229", "score": "0.605264", "text": "public function index()\n {\n $invoices = Invoice::all();\n\n return view('invoice.index', compact('invoices'));\n }", "title": "" }, { "docid": "542c21a2c3a902abc44a319153203ab9", "score": "0.6047194", "text": "public function invoicesalesdelivery() { \n $data['page'] = 'Sales';\n\t\t$data['page_title'] = 'Invoice Against Sales Delivery';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/sales/transaction/invoice_sales_delivery', $data); \n\t}", "title": "" }, { "docid": "cb059cc835bf3c97186f95b12b7c4124", "score": "0.60464656", "text": "public function index()\n {\n if (is_login()) {\n redirect(base_url() . 'invoices', 'refresh');\n }\n }", "title": "" }, { "docid": "795e1dafc5eee2a36439538c8b44038f", "score": "0.6044529", "text": "public function index()\n\t{\n\t\t$invoices = Invoice::all();\n\n return view('invoices.home', compact('invoices'));\n\t}", "title": "" }, { "docid": "0e4ddf58251b60ec7e8bf871ab19ab8a", "score": "0.604327", "text": "public function index()\n {\n $data[\"_sir\"] = Purchasing_inventory_system::select_sir_status($this->user_info->shop_id,'array',1,0,Request::input(\"sir_id\"));\n $data[\"count_sir\"] = Purchasing_inventory_system::count_sir($this->user_info->shop_id,'array',1,0);\n\n return view(\"member.purchasing_inventory_system.manual_invoicing.manual_invoice\",$data);\n }", "title": "" }, { "docid": "b88589e425fe9932b43e3c3e45880ccb", "score": "0.60399204", "text": "public function getPaidInvoices()\r\n {\r\n \textract($_POST);\r\n \t$this->db->select(\"*\");\r\n \t$this->db->from(\"invoice_pricing\");\r\n \t$this->db->where(\"doctor_id='\".$doctor_id.\"'\");\r\n $this->db->order_by(\"invoice_pricing_id DESC\");\r\n \t$invoiceInfo = $this->db->get()->result();\r\n\r\n \t$i = 1;\r\n \tforeach ($invoiceInfo as $value) \r\n \t{\r\n $dateObj = DateTime::createFromFormat('!m', $value->month);\r\n \t\t?>\r\n \t\t<tr>\r\n \t\t\t<td><?=$i?></td>\r\n <td><?=$dateObj->format('F').\" - \".$value->year?></td>\r\n <td><?=$value->totalInvoices?></td>\r\n \r\n <?php\r\n if($value->totalInvoices<=100)\r\n {\r\n ?>\r\n <td>\r\n <span style=\"font-size:12px;font-weight: bold;color: green !important\">FREE</span>\r\n </td>\r\n <?php\r\n \r\n }\r\n else\r\n {\r\n $total = $value->amount-100;\r\n ?>\r\n <td class=\"text-right\">\r\n <span style=\"font-size:12px;font-weight: bold;\"><?=number_format($total,2)?></span>\r\n </td>\r\n <?php\r\n }\r\n ?>\r\n <td><a href=\"<?=base_url('Pricing/printInvoice/'.$value->invoice_pricing_id)?>\" target=\"blank\"><i class=\"fa fa-print\"></i></a></td>\r\n \t\t</tr>\r\n \t\t<?php\r\n \t\t$i++;\r\n \t}\r\n }", "title": "" }, { "docid": "ec5486af0e255dbc40e9965d728c2be7", "score": "0.6039581", "text": "public function index()\n {\n $files = CmExpDataEntry::pluck('cm_file_id');\n $invoicevalues = CmExpDataEntry::pluck('inv_value');\n $invoiceno = CmExpDataEntry::pluck('inv_no');\n return view('commercial\\export\\exportbill\\exportbillair',compact('files','invoicevalues'));\n }", "title": "" }, { "docid": "7d90fbcaab02d492d3848524af65403c", "score": "0.60383415", "text": "public function purchaseInvoiceList()\n {\n\n if (isset($_POST[\"post\"])) {\n\n $data = json_decode($_POST[\"post\"],true);\n\n /* limit, offset and sql*/\n $limit = $data[\"itemPerPage\"];\n $offset = ($data[\"pageNumber\"] - 1) * $limit;\n $sql = \"\";\n $params = array();\n /* limit, offset and sql*/\n\n\n /* adding filter */\n if (@$data[\"filters\"][\"txtPurchaseInvoiceSupplierId\"] != \"\") {\n $sql .= \" AND tbl_suppliers.supplier_name LIKE :supplier_name\";\n $params[\"supplier_name\"] = \"%\".$data[\"filters\"][\"txtPurchaseInvoiceSupplierId\"].\"%\";\n }\n /* adding filter */\n\n\n /* adding filter */\n if (@$data[\"filters\"][\"txtPurchaseInvoiceMaturityDate\"] != \"\") {\n $sql .= \" AND DATE(tbl_purchase_invoices.purchase_invoice_maturity_date)=:maturity_date\";\n $params[\"maturity_date\"] = $data[\"filters\"][\"txtPurchaseInvoiceMaturityDate\"];\n }\n /* adding filter */\n\n /* adding filter */\n if (@$data[\"filters\"][\"txtPurchaseInvoiceCashId\"] != \"\") {\n $sql .= \" AND tbl_cashes.cash_name LIKE :cash_name\";\n $params[\"cash_name\"] = \"%\".$data[\"filters\"][\"txtPurchaseInvoiceCashId\"].\"%\";\n }\n /* adding filter */\n\n\n\n\n $model = new Model();\n\n\n /*selecting purchaseInvoices*/\n $stmt = $model->dbh->prepare(\n \"SELECT\n tbl_purchase_invoices.purchase_invoice_id,\n tbl_suppliers.supplier_name,\n tbl_purchase_invoices.purchase_invoice_maturity_date,\n tbl_purchase_invoices.purchase_invoice_total\n FROM tbl_purchase_invoices\n INNER JOIN tbl_suppliers ON tbl_suppliers.supplier_id=tbl_purchase_invoices.purchase_invoice_supplier_id\n LEFT JOIN tbl_cashes ON tbl_cashes.cash_id=tbl_purchase_invoices.purchase_invoice_cash_id\n WHERE tbl_purchase_invoices.purchase_invoice_id IS NOT NULL\n $sql\n LIMIT $limit OFFSET $offset\"\n );\n $stmt->execute($params);\n $purchaseInvoices = $stmt->fetchAll(PDO::FETCH_ASSOC);\n /*selecting purchaseInvoices*/\n\n\n /* total purchaseInvoice number */\n\n $stmt = $model->dbh->prepare(\n \"SELECT\n COUNT(tbl_purchase_invoices.purchase_invoice_id) AS total_purchase_invoice_number\n FROM tbl_purchase_invoices\n INNER JOIN tbl_suppliers ON tbl_suppliers.supplier_id=tbl_purchase_invoices.purchase_invoice_supplier_id\n LEFT JOIN tbl_cashes ON tbl_cashes.cash_id=tbl_purchase_invoices.purchase_invoice_cash_id\n WHERE tbl_purchase_invoices.purchase_invoice_id IS NOT NULL\n $sql\"\n );\n $stmt->execute($params);\n $totalPurchaseInvoiceNumber = $stmt->fetch()[\"total_purchase_invoice_number\"];\n /* total purchaseInvoice number */\n\n /* total page number */\n $totalPageNumber = $totalPurchaseInvoiceNumber / $limit;\n /* total page number */\n\n $model = null;\n\n echo json_encode(array(\n \"data\"=>$purchaseInvoices,\n \"totalPageNumber\"=>$totalPageNumber,\n \"doesHaveProfile\"=>false\n ));\n\n }else {\n $model = new Model();\n\n /* categories */\n $stmt = $model->dbh->prepare(\"SELECT category_id,category_name FROM tbl_categories\");\n $stmt->execute();\n $categories = $stmt->fetchAll();\n /* categories */\n\n $model = null;\n\n $this->view->categories = $categories;\n $this->view->render('apps/accounting/purchase-invoice/purchase-invoice-list');\n }\n\n }", "title": "" }, { "docid": "15b74e1c6db6d9f52bba8ea33a743571", "score": "0.6034904", "text": "public function printrecurrentinvoice() { \n $data['page'] = 'Sales';\n\t\t$data['page_title'] = 'Recurrent Invoice';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/sales/transaction/recurrent_invoice', $data); \n\t}", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "fa5d44b71d552697b98a700a85154992", "score": "0.6027543", "text": "public function edit(Invoice $invoice)\n {\n //\n }", "title": "" }, { "docid": "5607990956e12e390a0f3c4c86b40a60", "score": "0.60274833", "text": "public function invoicepreviewmodalAction()\r\n {\r\n $em = $this->entityManager;\r\n $response = new Response();\r\n $invoiceId = $this->params()->fromQuery(\"data\", NULL);\r\n\r\n if ($invoiceId == NULL) {\r\n $gritter = new GritterMessage();\r\n $gritter->setType(GritterMessage::TYPE_ERROR);\r\n $gritter->setText(\"Invoice ID not transmitted\");\r\n $gritter->setTitle(\"Invoice Id Error\");\r\n $response->add($gritter);\r\n } else {\r\n $invoiceEntity = $em->find(\"Transactions\\Entity\\Invoice\", $invoiceId);\r\n $broker = $em->find(\"Users\\Entity\\InsuranceBrokerRegistered\", $this->centralBrokerId);\r\n $viewModel = new ViewModel(array(\r\n \"invoice\" => $invoiceEntity,\r\n \"broker\" => $broker\r\n ));\r\n $viewModel->setTemplate(\"proposal-invoice-preview-modal\");\r\n $modal = new WasabiModal(\"standard\", \"Invoice Preview\");\r\n $modal->setSize(WasabiModalConfigurator::MODAL_LG);\r\n $modal->setContent($viewModel);\r\n\r\n $modalView = new WasabiModalView(\"#dialog\", $this->renderer, $modal);\r\n\r\n $response->add($modalView);\r\n }\r\n return $this->getResponse()->setContent($response);\r\n }", "title": "" } ]
29eef50c308ee953d1e5c7bb54a75337
Run Application DB Backup
[ { "docid": "c026de0fec6047a301908547dcfed17a", "score": "0.7109889", "text": "public function backupDb()\n {\n Artisan::call('backup:run', [ '--only-db' => true]);\n $output = Artisan::output();\n\n if (Str::contains($output, 'Backup completed!')) {\n return redirect()->back()->with('success', 'Application Database Backed-up successgully');\n } else {\n return redirect()->back()->with('error', 'Application Database Backed-up failed');\n }\n }", "title": "" } ]
[ { "docid": "66daf9594f92d6517220253d75746bdd", "score": "0.74541044", "text": "public function backup() {\n set_time_limit(0);\n $pw = $this->_helper->config()->db->params->password;\n $username = $this->_helper->config()->db->params->username;\n // Dump them\n $name = self::NAME;\n $backupdb = exec(\"$this->_mysqldump -u$username -p$pw $name > $this->getSqlDump()\");\n // Tar them up\n $tardbsql = exec(\"$this->_tar -cpzf $this->getTarDump() $this->getSqlDump())\");\n if(file_exists($this->getSqlDump())){\n unlink($this->getSqlDump());\n }\n }", "title": "" }, { "docid": "86f212d2b21d847e0e98f561a14bd0a7", "score": "0.7283742", "text": "public function backup_database()\n\t{\n\t}", "title": "" }, { "docid": "f911e89698dd22ad86d1f6ca9c3bde78", "score": "0.72167367", "text": "function backupdb(){\n\t\t$this->load->dbutil();\n\t\t// Backup your entire database and assign it to a variable\n\t\t$backup =& $this->dbutil->backup();\n\t\t// Load the file helper and write the file to your server\n\t\t$this->load->helper('file');\n\t\twrite_file('/path/to/mybackup.gz', $backup);\n\t\t// Load the download helper and send the file to your desktop\n\t\t$this->load->helper('download');\n\t\tforce_download('mybackup.gz', $backup); \n\t}", "title": "" }, { "docid": "3ae1f33642a19978cc4e4990b9223719", "score": "0.7190688", "text": "public function backup() {\n $this->load->dbutil();\n\n // Backup your entire database and assign it to a variable\n $backup = & $this->dbutil->backup();\n\n // Load the file helper and write the file to your server\n $this->load->helper('file');\n write_file('/path/to/mybackup.gz', $backup);\n\n // Load the download helper and send the file to your desktop\n $this->load->helper('download');\n force_download('mybackup.gz', $backup);\n }", "title": "" }, { "docid": "6c72c8d72566dc41cab802a0c26868e3", "score": "0.7086334", "text": "public function runAction()\n\t{\n\t\t$options = Zend_Controller_Front::getInstance()->getParam('bootstrap')->getOptions();\t\t\n\t\t\n\t\t// create all files we need\n\t\t$logfile = dirname(APPLICATION_PATH) . sprintf('/log/incremental-%s.log', getenv('APPLICATION_ENV'));\n\t\t@touch($logfile);\n\t\tif(!file_exists($logfile) || !is_writable($logfile))\n\t\t{\n\t\t\techo sprintf(\"Path %s not writable!\\n\", $logfile);\n\t\t\texit(1);\n\t\t}\n\n\t\t$backupfile = dirname(APPLICATION_PATH) . sprintf('/log/before-rebuild-%s-%s.sql', getenv('APPLICATION_ENV'), date('YmdHis'));\n\t\t@touch($backupfile);\n\t\tif(!file_exists($backupfile) || !is_writable($backupfile))\n\t\t{\n\t\t\techo sprintf(\"Backup %s not writable!\\n\", $backupfile);\n\t\t\texit(1);\n\t\t}\n\n\t\t// create myqsl backup command autodetecting myqsldump binary\n\t\t$mysqlDumpBinary\t= trim(`which mysqldump`);\n\t\t$command\t\t\t= sprintf('%s -h %s --user=%s --password=%s --force --opt --routines --single-transaction --databases %s > %s',\n\t\t\t$mysqlDumpBinary,\n\t\t\t$options['database']['params']['host'],\n\t\t\t$options['database']['params']['username'],\n\t\t\t$options['database']['params']['password'],\n\t\t\t$options['database']['params']['dbname'],\n\t\t\t$backupfile\n\t\t);\n\n\t\t// create the backup ...\n\t\t$output = array();\n\t\t$error = 0;\n\t\texec($command, $output, $error);\n\t\tif($error)\n\t\t{\n\t\t\t// something has gone wrong?\n\t\t\t// get out of here!\n\t\t\techo \"BACKUP FAILED!\\n\";\n\t\t\techo implode(\"\\n\", $output) . \"\\n\";\n\t\t\texit(1);\n\t\t}\n\n\t\t// drop tables\n\t\t$tables = Db_Pdo::fetchAll(\"SHOW TABLES;\");\n\t\t$allSQL = array();\n\t\tDb_Pdo::execute(\"SET foreign_key_checks = 0;\");\n\t\tfor ($i = 0, $c = count($tables); $i < $c; $i++)\n\t\t{\n\t\t\t$allSQL[] = sprintf(\"DROP TABLE `%s`;\", $tables[$i]['Tables_in_'.$options['database']['params']['dbname']]);\n\t\t}\n\t\tfor ($i = 0, $c = count($allSQL); $i < $c; $i++)\n\t\t{\n\t\t\tfwrite(STDOUT, $allSQL[$i] . \"\\n\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\tDb_Pdo::execute($allSQL[$i]);\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\techo \"Exception trapped with message: \".$e->getMessage();\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t\tDb_Pdo::execute(\"SET foreign_key_checks = 1;\");\n\n\t\t// create command template autodetecting myqsl\n\t\t$mysqlBinary\t= trim(`which mysql`);\n\t\t$command\t\t= sprintf('%s -h %s --user=%s --password=%s %s < %%s',\n\t\t\t$mysqlBinary,\n\t\t\t$options['database']['params']['host'],\n\t\t\t$options['database']['params']['username'],\n\t\t\t$options['database']['params']['password'],\n\t\t\t$options['database']['params']['dbname']\n\t\t);\n\n\t\t// use nice SPL goodie to get needed files\n\t\t$files = new GlobIterator(dirname(APPLICATION_PATH).'/scripts/sql/*.sql', FilesystemIterator::KEY_AS_FILENAME);\n\t\t$handle = fopen($logfile, 'a+');\n\n\t\t// do updates in a loop, break on error\n\t\tforeach ($files as $name => $path)\n\t\t{\n\t\t\t// ok, we can try your sql, dude...\n\t\t\t$output = array();\n\t\t\t$error = 0;\n\t\t\texec(sprintf($command, $path), $output, $error);\n\t\t\tif($error)\n\t\t\t{\n\t\t\t\t// something has gone wrong?\n\t\t\t\t// get out of here!\n\t\t\t\tfclose($handle);\n\t\t\t\techo \"UPDATE FAILED in $name:\\n\";\n\t\t\t\techo implode(\"\\n\", $output) . \"\\n\";\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tfwrite($handle, $name.\"\\n\");\n\t\t\tfwrite(STDOUT, \"Updates in $name ............ SUCCESS\\n\");\n\t\t}\n\n\t\t// do updates in developer database\n\n\t\t// Drop tables from developer\n\t\t$dsn\t\t= 'mysql:host=' . $options['database']['params']['host'] . ';dbname=' . 'developer';\n\t\t$pdo\t\t= new PDO($dsn, $options['database']['params']['username'], $options['database']['params']['password']);\n\t\t$resultSet = $pdo->query(\"SHOW TABLES;\");\n\t\t$tables\t = $resultSet->fetchAll();\n\n\t\t$allSQL = array();\n\t\t$pdo->exec(\"SET foreign_key_checks = 0;\");\n\t\tfor ($i = 0, $c = count($tables); $i < $c; $i++)\n\t\t{\n\t\t\t$allSQL[] = sprintf(\"DROP TABLE `%s`;\", $tables[$i][0]);\n\t\t}\n\t\tfor ($i = 0, $c = count($allSQL); $i < $c; $i++)\n\t\t{\n\t\t\tfwrite(STDOUT, $allSQL[$i] . \"\\n\");\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$pdo->exec($allSQL[$i]);\n\t\t\t}\n\t\t\tcatch(Exception $e)\n\t\t\t{\n\t\t\t\techo \"Exception trapped with message: \".$e->getMessage();\n\t\t\t\texit(1);\n\t\t\t}\n\t\t}\n\t\t$pdo->exec(\"SET foreign_key_checks = 1;\");\n\n\t\t// create developer command pattern\n\t\t$command\t\t= sprintf('%s -h %s --user=%s --password=%s %s < %%s',\n\t\t\t$mysqlBinary,\n\t\t\t$options['database']['params']['host'],\n\t\t\t$options['database']['params']['username'],\n\t\t\t$options['database']['params']['password'],\n\t\t\t'developer'\n\t\t);\n\n\t\t$files = new GlobIterator(dirname(APPLICATION_PATH).'/scripts/sql/developer/*.sql', FilesystemIterator::KEY_AS_FILENAME);\n\t\tforeach ($files as $name => $path)\n\t\t{\n\t\t\t// ok, we can try your sql, dude...\n\t\t\t$output = array();\n\t\t\t$error = 0;\n\t\t\texec(sprintf($command, $path), $output, $error);\n\t\t\tif($error)\n\t\t\t{\n\t\t\t\t// something has gone wrong?\n\t\t\t\t// get out of here!\n\t\t\t\tfclose($handle);\n\t\t\t\techo \"UPDATE FAILED in $name:\\n\";\n\t\t\t\techo implode(\"\\n\", $output) . \"\\n\";\n\t\t\t\texit(1);\n\t\t\t}\n\t\t\tfwrite($handle, $name.\"\\n\");\n\t\t\tfwrite(STDOUT, \"Updates in $name ............ SUCCESS\\n\");\n\t\t}\n\n\t\tfclose($handle);\n\t\techo \"\\nDatabase updates done...\\n\";\n\n\t\t// always do that at the end of action...\n\t\texit(0);\n\t}", "title": "" }, { "docid": "31c68ea19bb8028b9cab831ab6060f94", "score": "0.70651335", "text": "public function database_backup(){\n\t\t//Audit Trails\n\t\t$audit_trail = null;\n\t\t$audit_trail = array(\n\t\t\t'Username' => $this->session->userdata('Username'),\n\t\t\t'UserType' => $this->session->userdata('UserTypeID'),\n\t\t\t'ActionDone' => 'Backed Up Database.',\n\t\t\t'DateTimeActionMade' => date('Y-m-d H:i:s')\n\t\t);\n\t\t//Audit Trail\n\t\t$this->_insertRecords($tableName = 'tblaudittrail', $audit_trail);\n\t\t\n\t\t$this->load->dbutil();\n\t\t$db_format = array('format'=>'zip','filename'=>'dbgradetrack_backup.sql');\n\t\t$backup =& $this->dbutil->backup($db_format);\n\t\t$dbname = 'backup-on-' .date('Y-m-d'). ' .zip';\n\t\t$save = 'resources/db_backup/'. $dbname;\n\t\twrite_file($save,$backup);\n\t\tforce_download($dbname,$backup);\n\t}", "title": "" }, { "docid": "3032625de4b015a732218726d562c85e", "score": "0.7061873", "text": "function backup_db()\n {\n $this->load->dbutil();\n\n $tablename = $this->backup->tablesList();\n\n $prefs = array(\n 'tables' => $tablename, // Array of tables to backup.\n 'ignore' => array(), // List of tables to omit from the backup\n 'format' => 'txt', // gzip, zip, txt\n 'filename' => 'mybackup.sql', // File name - NEEDED ONLY WITH ZIP FILES\n 'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file\n 'add_insert' => TRUE, // Whether to add INSERT data to backup file\n 'newline' => \"\\n\" // Newline character used in backup file\n );\n\n $backup = $this->dbutil->backup($prefs);\n\n $file_name =date('Y-m-d_H-i').'-backup-'. strtotime('now');\n $fp = fopen(APPPATH.'../assets/uploads/backups/'.$file_name.'.sql', \"wb\");\n fwrite($fp, $backup);\n fclose($fp);\n\n $data = array(\n 'name' => $file_name.\".sql\",\n 'created_at' => date_stamp()\n );\n\n if($this->add_record_id('db_backup', $data))\n return true;\n\n return false;\n }", "title": "" }, { "docid": "008c61f1e9ad782c8370969edd1dc849", "score": "0.7014759", "text": "public function backup(){\n\t\t$this->load->dbutil();\n\t\t/*$prefs = array(\n 'tables' => array('academic_years', 'addresses'), // Array of tables to backup.\n 'ignore' => array(), // List of tables to omit from the backup\n 'format' => 'zip', // gzip, zip, txt\n 'filename' => 'mybackup.sql', // File name - NEEDED ONLY WITH ZIP FILES\n 'add_drop' => TRUE, // Whether to add DROP TABLE statements to backup file\n 'add_insert' => TRUE, // Whether to add INSERT data to backup file\n 'newline' => \"\\n\" // Newline character used in backup file\n\t\t);\n\n\t\t$this->dbutil->backup($prefs);*/\n\n\t\t// Backup your entire database and assign it to a variable\n\t\t$backup = $this->dbutil->backup();\n\n\t\t// Load the file helper and write the file to your server\n\t\t$this->load->helper('file');\n\t\twrite_file('/path/to/mybackup.gz', $backup);\n\n\t\t// Load the download helper and send the file to your desktop\n\t\t$this->load->helper('download');\n\t\tforce_download('mybackup.gz', $backup);\n\t}", "title": "" }, { "docid": "3738ca81cdb1c025e37a703ff6c3a0db", "score": "0.70008373", "text": "public function dump_db() {\n\t\t$this->load->dbutil();\n $prefs = array( \n 'format' => 'zip', \n 'filename' => 'micro_journal.sql'\n );\n\n $backup =& $this->dbutil->backup($prefs); \n\n $db_name = 'micro-journal-db-backup-on-'. date(\"Y-m-d-H-i-s\") .'.zip';\n $save = $db_name;\n\n $this->load->helper('file');\n write_file($save, $backup); \n\n $this->load->helper('download');\n force_download($db_name, $backup); \n\t\thttp_response(200, 1);\n\t}", "title": "" }, { "docid": "329473034d64cb9ed8096289dc685bfa", "score": "0.6976224", "text": "public function backups($database);", "title": "" }, { "docid": "9ffcd4d70eaee3f1e1ee3cf0c37d0421", "score": "0.6889619", "text": "protected function getDatabaseBackup()\n {\n $db = Config::get('database.connections.' . Config::get('database.default'));\n\n $dbUserName = $db['username'];\n $dbPassword = $db['password'];\n $databaseName = $db['database'];\n // Dump the database contents\n $command = \"mysqldump --no-tablespaces --single-transaction --routines --triggers -P {$db['port']} -h {$db['host']} -u\\\"$dbUserName\\\" -p\\\"$dbPassword\\\" $databaseName\";\n\n // remove the \"DEFINER: /*!50013 DEFINER=`homestead`@`%` SQL SECURITY DEFINER */ -> /*!50013 */\" string from generated views in the export\n // remove the DEFINER in the function, procedure. https://stackoverflow.com/questions/9446783/remove-definer-clause-from-mysql-dumps\n $command .= \" | sed -e 's/DEFINER[ ]*=[ ]*[^*]*\\*/\\*/' | sed -e 's/DEFINER[ ]*=[ ]*[^*]*PROCEDURE/PROCEDURE/' | sed -e 's/DEFINER[ ]*=[ ]*[^*]*FUNCTION/FUNCTION/' \";\n\n // remove any references to the database name in the dump (example: 'databasename'.xxx)\n $command .= \" | sed -e \\\"s/\\`{$db['database']}\\`\\.//g\\\" \";\n\n // gzip the results and store it in a temporary file\n $destFile = tempnam(temp_path(), 'backup');\n $command .= \" | gzip > $destFile;\";\n\n // Run the command\n shell_exec($command);\n\n // Sanity check the resulting backup\n $filesize = @filesize($destFile);\n if (empty($filesize) || $filesize < Backup::LOWEST_FILE_SIZE) {\n throw new ApplicationException(\"Backup failed, the resulting file was $filesize bytes, expected at \" . Backup::LOWEST_FILE_SIZE);\n }\n\n return $destFile;\n }", "title": "" }, { "docid": "4d5279b659007edc0f97bea61353e8b0", "score": "0.68838584", "text": "function main() {\n\t\t\n\t\t$dataSourceName = 'default';\n\t\t\n\t\t$path = APP_DIR . DS .'Backups' . DS;\n\n\t\t$Folder = new Folder($path, true);\n\t\t\n\t\t$fileSufix = date('Ymd\\_His') . '.sql';\n\t\t$file = $path . $fileSufix;\n\t\tif (!is_writable($path)) {\n\t\t\ttrigger_error('The path \"' . $path . '\" isn\\'t writable!', E_USER_ERROR);\n\t\t}\n\t\t\n\t\t$this->out(\"Backing up...\\n\");\n\t\t$File = new File($file);\n\n\t\t$db = ConnectionManager::getDataSource($dataSourceName);\n\n\t\t$config = $db->config;\n\t\t$this->connection = \"default\";\n\t\t\n\t\tforeach ($db->listSources() as $table) {\n\t\t\n\t\t\t$table = str_replace($config['prefix'], '', $table);\n\t\t\t// $table = str_replace($config['prefix'], '', 'dinings');\n\t\t\t$ModelName = Inflector::classify($table);\n\t\t\t$Model = ClassRegistry::init($ModelName);\n\t\t\t$DataSource = $Model->getDataSource();\n\t\t\t$this->Schema = new CakeSchema(array('connection' => $this->connection));\n\t\t\t\n\t\t\t$cakeSchema = $db->describe($table);\n\t\t\t// $CakeSchema = new CakeSchema();\n\t\t\t$this->Schema->tables = array($table => $cakeSchema);\n\t\t\t\n\t\t\t$File->write(\"\\n/* Drop statement for {$table} */\\n\");\n\t\t\t$File->write(\"SET foreign_key_checks = 0;\");\n\t\t\t// $File->write($DataSource->dropSchema($this->Schema, $table) . \"\\n\");\n\t\t\t$File->write($DataSource->dropSchema($this->Schema, $table));\n\t\t\t$File->write(\"SET foreign_key_checks = 1;\\n\");\n\n\t\t\t$File->write(\"\\n/* Backuping table schema {$table} */\\n\");\n\n\t\t\t$File->write($DataSource->createSchema($this->Schema, $table) . \"\\n\");\n\n\t\t\t$File->write(\"\\n/* Backuping table data {$table} */\\n\");\n\n\t\t\n\t\t\tunset($valueInsert, $fieldInsert);\n\n\t\t\t$rows = $Model->find('all', array('recursive' => -1));\n\t\t\t$quantity = 0;\n\t\t\t\n\t\t\tif (sizeOf($rows) > 0) {\n\t\t\t\t$fields = array_keys($rows[0][$ModelName]);\n\t\t\t\t$values = array_values($rows);\t\n\t\t\t\t$count = count($fields);\n\n\t\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t\t$fieldInsert[] = $DataSource->name($fields[$i]);\n\t\t\t\t}\n\t\t\t\t$fieldsInsertComma = implode(', ', $fieldInsert);\n\n\t\t\t\tforeach ($rows as $k => $row) {\n\t\t\t\t\tunset($valueInsert);\n\t\t\t\t\tfor ($i = 0; $i < $count; $i++) {\n\t\t\t\t\t\t$valueInsert[] = $DataSource->value(utf8_encode($row[$ModelName][$fields[$i]]), $Model->getColumnType($fields[$i]), false);\n\t\t\t\t\t}\n\n\t\t\t\t\t$query = array(\n\t\t\t\t\t\t'table' => $DataSource->fullTableName($table),\n\t\t\t\t\t\t'fields' => $fieldsInsertComma,\n\t\t\t\t\t\t'values' => implode(', ', $valueInsert)\n\t\t\t\t\t);\t\t\n\t\t\t\t\t$File->write($DataSource->renderStatement('create', $query) . \";\\n\");\n\t\t\t\t\t$quantity++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\t\t\t$this->out('Model \"' . $ModelName . '\" (' . $quantity . ')');\n\t\t}\n\t\t$File->close();\n\t\t$this->out(\"\\nFile \\\"\" . $file . \"\\\" saved (\" . filesize($file) . \" bytes)\\n\");\n\n\t\tif (class_exists('ZipArchive') && filesize($file) > 100) {\n\t\t\t$this->out('Zipping...');\n\t\t\t$zip = new ZipArchive();\n\t\t\t$zip->open($file . '.zip', ZIPARCHIVE::CREATE);\n\t\t\t$zip->addFile($file, $fileSufix);\n\t\t\t$zip->close();\n\t\t\t$this->out(\"Zip \\\"\" . $file . \".zip\\\" Saved (\" . filesize($file . '.zip') . \" bytes)\\n\");\n\t\t\t$this->out(\"Zipping Done!\");\n\t\t\tif (file_exists($file . '.zip') && filesize($file) > 10) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t\t$this->out(\"Database Backup Successful.\\n\");\n\t\t}\n\t}", "title": "" }, { "docid": "f52faa48514d91709ed05fee200f2e89", "score": "0.6776522", "text": "public function backupAction()\n {\n $filter = $this->getSearchFilter(false);\n $model = $this->getModel();\n\n $tables = $model->load();\n $allTables = [];\n $noDataTables = [];\n\n $addDropTables = false;\n if (array_key_exists('include_drop', $filter) && $filter['include_drop'] == '1') {\n $addDropTables = true;\n }\n $singleTransaction = false;\n if (array_key_exists('single_transaction', $filter) && $filter['single_transaction'] == '1') {\n $singleTransaction = true;\n }\n $lockTables = false;\n if (array_key_exists('lock_tables', $filter) && $filter['lock_tables'] == '1') {\n $lockTables = true;\n }\n\n foreach($tables as $table) {\n if ($table['type'] == 'view' && (!array_key_exists('include_views', $filter) || $filter['include_views'] != '1')) {\n continue;\n }\n\n $allTables[] = $table['name'];\n if ($table['respondentData'] === true && (!array_key_exists('include_respondent_data', $filter) || $filter['include_respondent_data'] != '1')) {\n $noDataTables[] = $table['name'];\n }\n }\n\n $filename = $this->getBackupFilename($filter);\n $dbConfig = $this->getDatabaseConfig();\n $dumpSettings = [\n 'include-tables' => $allTables,\n 'no-data' => $noDataTables,\n 'single-transaction' => $singleTransaction,\n 'lock-tables' => $lockTables,\n 'add-locks' => false,\n 'add-drop-table' => $addDropTables,\n ];\n\n ini_set('max_execution_time', 300);\n\n try {\n $dump = new \\Ifsnop\\Mysqldump\\Mysqldump($dbConfig['dsn'], $dbConfig['username'], $dbConfig['password'], $dumpSettings);\n $dump->start($filename);\n echo sprintf($this->_('Database backup completed. File can be found in %s'), $filename);\n } catch (\\Exception $e) {\n echo 'mysqldump-php error: ' . $e->getMessage();\n }\n }", "title": "" }, { "docid": "464d081af674fcf9cbca1f8116ff96b7", "score": "0.67638624", "text": "public function createBackup()\n {\n $userName = \\config('database.connections.mysql.username'); // get the username of super user, it has all permissions on all databases @author Amr\n $password = \\config('database.connections.mysql.password'); // get the password of super user, it has all permissions on all databases @author Amr\n $dataBase = $this->getDatabase();\n $backupPath = \\config('database.backup_path');\n if (!File::exists($backupPath)) {\n File::makeDirectory($backupPath);\n }\n Artisan::call('db:backup', ['user' => $userName, 'password' => $password,\n 'database' => $dataBase, 'backupName' => $dataBase . '_backup']); // create backup using custom laravel command line @author Amr\n $result = intval(Artisan::output());\n if (!$result)\n throw new DatabaseBackupException(trans('Auth::lang.backup_created_failed'));\n return true;\n }", "title": "" }, { "docid": "c131d53a05ac56dcc9ad256c996c113b", "score": "0.6740089", "text": "abstract function backup_db($gzip = FALSE);", "title": "" }, { "docid": "02ca4b4b7eddbcc3f46a2cb9eff32ac5", "score": "0.67200416", "text": "public function createBackup()\n {\n $this->resetDirectory();\n\n $zipper = $this->populateZipper(\n $this->getNewZipper('backup'),\n $this->getBackupDirectories(),\n $this->getBackupFiles()\n );\n\n $this->addDbdumpToPackage($zipper);\n }", "title": "" }, { "docid": "10b541efbd281a48a2df7ab041aadbf8", "score": "0.67141885", "text": "public function SaveDatabase()\n\t{\n\t\t$shellProcessor = new McCool\\DatabaseBackup\\Processors\\ShellProcessor(new Symfony\\Component\\Process\\Process(''));\n\t\t$dumper = new McCool\\DatabaseBackup\\Dumpers\\MysqlDumper($shellProcessor, env('DB_HOST'), 3306, env('DB_USERNAME'), env('DB_PASSWORD'), env('DB_DATABASE'), 'backup/'.date('d-m-Y').'EMFSoftware.sql');\n\n\t\t$backup = new McCool\\DatabaseBackup\\BackupProcedure($dumper);\n\t\t$backup->backup();\n\t}", "title": "" }, { "docid": "e523b00808f1975a91eb5c4475242e67", "score": "0.66938186", "text": "private function backup_db() {\n\t\t$domain = $this->text_domain;\n\t\t$result = array();\n\t\t$database_file = FQDB;\n\t\t$db_name = basename(FQDB);\n\t\tif (!file_exists($database_file)) {\n\t\t\treturn false;\n\t\t}\n\t\t$today = date(\"Ymd\");\n\t\tif (!extension_loaded('zip')) {\n\t\t\t$backup_file = $database_file . '.' . $today . '.back';\n\t\t\tif (copy($database_file, $backup_file)) {\n\t\t\t\t$result['success'] = basename($backup_file) . __(' was created.', $domain);\n\t\t\t} else {\n\t\t\t\t$result['error'] = basename($backup_file) . __(' was not created.', $domain);\n\t\t\t}\n\t\t} else {\n\t\t\t$backup_file = $database_file . '.' . $today . '.zip';\n\t\t\t$zip = new ZipArchive();\n\t\t\t$res = $zip->open($backup_file, ZipArchive::CREATE | ZipArchive::OVERWRITE);\n\t\t\tif ($res === true) {\n\t\t\t\t$zip->addFile($database_file, $db_name);\n\t\t\t\t$result['success'] = basename($backup_file) . __(' was created.', $domain);\n\t\t\t} else {\n\t\t\t\t$result['error'] = basename($backup_file) . __(' was not created.', $domain);\n\t\t\t}\n\t\t\t$zip->close();\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "83f1889cd4ea520db0c32648040b19ca", "score": "0.6662035", "text": "function backup_database(){\n\t\treturn True;\n\t}", "title": "" }, { "docid": "91c44bf902e58f0c2c48625e6a8ba9f4", "score": "0.6635236", "text": "public function backupDatabase()\n {\n if ($this->databaseIsBackedUp) {\n $this->log->add(\"Database already backed up!\");\n return true;\n } else {\n $this->log->add(\"Backing up database...\");\n if(!is_dir($this->backupPath. \"database/\")) {\n $this->log->add(\"Creating database backup folder in {$this->backupPath}database\");\n mkdir($this->backupPath. \"database/\", 0660, true);\n chmod($this->backupPath. \"database/\", 0774);\n }\n\n $now = date(\"Ymd-Gi\");\n $nowFormatted = date(\"Y-m-d H:i:s\");\n try {\n $dump = new IMysqldump\\Mysqldump('mysql:host=localhost;dbname=djvbnu_makeit', 'root', '');\n $dump->start($this->backupPath . \"database/db-{$this->currentCoreVersion}-{$now}.zip\");\n $this->databaseIsBackedUp = true;\n // TODO: Remove local setting and add to API instance\n $this->config_set('general', 'latest_db_backup', $nowFormatted);\n $this->config_set('general', 'db_backup_name', \"db-{$this->currentCoreVersion}-{$now}.zip\");\n $this->log->add(\"Successfully backed up database\");\n return true;\n } catch (\\Exception $e) {\n $this->log->add(\"mysqldump-php throwed an error: \". $e->getMessage(), \"error\");\n return false;\n }\n }\n }", "title": "" }, { "docid": "b9ea27117e1ba7601b8eab987d8c9eaa", "score": "0.660002", "text": "public function backup()\n {\n $command;\n $dbConnection = env('DB_CONNECTION');\n $dbName = env('DB_DATABASE');\n $dbHost = env('DB_HOST');\n $dbPort = env('DB_PORT');\n $dbUsername = env('DB_USERNAME');\n $dbPassword = env('DB_PASSWORD');\n\n switch ($dbConnection) \n {\n case \"mysql\":\n $command = \"C:\\\\xampp\\mysql\\bin\\mysqldump $dbName -h$dbHost -P$dbPort -u$dbUsername > database_backup.sql\";\n break;\n\n case \"pgsql\":\n $command = \"PGPASSWORD='$dbPassword' pg_dump -h $dbHost -p $dbPort -U $dbUsername $dbName > database_backup.sql\";\n break;\n }\n exec($command);\n return response()->download('database_backup.sql')->deleteFileAfterSend(false);\n }", "title": "" }, { "docid": "5b5d39f6d13025e5c9135ab220ef3870", "score": "0.6599796", "text": "function backupDB($dbname) {\n writeLog(\"=========================================================\", false);\n writeLog(\"Realizando backup >> $dbname...\");\n $dumpSettings = array(\n 'compress' => 'gzip'\n );\n try {\n $mysqlPath = getenv('BACKUP_SAVE');\n $zipFile = $dbname . '_' . date('Ymdhi') . \".zip\";\n $dump = new IMysqldump\\Mysqldump('mysql:host='. getenv('MYSQL_HOST') .';dbname=' . $dbname, getenv('MYSQL_USER'), getenv('MYSQL_PASSWORD'), $dumpSettings);\n $dump->start($mysqlPath . $zipFile);\n writeLog(\"Backup e compressão finalizados!\");\n } catch (\\Exception $e) {\n writeLog('mysqldump-php error: ' . $e->getMessage());\n echo 'mysqldump-php error: ' . $e->getMessage();\n }\n}", "title": "" }, { "docid": "1ffa75179398867192fca21533a48588", "score": "0.65819883", "text": "function backup_database()\n\t{\n\t\t$this->load->dbutil();\n\n\t\t// This ignores the ci_sessions table, which gets WAAAAYY too large, and is also unnecessary\n\t\t$prefs = array(\n\t\t\t'ignore' => 'ci_sessions',\n\t\t\t'format' => 'txt'\n\t\t);\n\n\t\t// Backup your entire database and assign it to a variable\n\t\t$backup =& $this->dbutil->backup($prefs);\n\n\t\t// Load the file helper and write the file to your server\n\t\t$this->load->helper('file');\n\t\t$fname = 'tutorical ('.date('Y-m-d').').sql';\n\t\twrite_file(\"backup/$fname\", $backup);\n\t}", "title": "" }, { "docid": "c5f35c2097496f353e2e55220adbbea5", "score": "0.6503819", "text": "function create_backup()\r\n {\r\n $this->load->dbutil(); \r\n $options = array(\r\n 'format' => 'txt', \r\n 'add_drop' => TRUE, \r\n 'add_insert' => TRUE, \r\n 'newline' => \"\\n\" \r\n );\r\n $tables = array();\r\n $file_name = 'db_backup_'.date('Y-m-d-H-i-s');\r\n $backup = $this->dbutil->backup(array_merge($options , $tables));\r\n $this->load->helper('file');\r\n write_file('db_backup/'.$file_name.'.sql', $backup); \r\n //$this->load->helper('download');\r\n //force_download($file_name.'.sql', $backup);\r\n return 'done';\r\n }", "title": "" }, { "docid": "eb43a8597694d886d59240925dc63053", "score": "0.65012765", "text": "public function dbSeed()\n {\n $this->_exec('gunzip dump.sql.gz');\n $this->taskFilesystemStack()\n ->mkdir('mariadb-init')\n ->remove('mariadb-init/dump.sql')\n ->rename('dump.sql', 'mariadb-init/dump.sql')\n ->run();\n }", "title": "" }, { "docid": "3164b03be0f76d2c526398d2a8d64709", "score": "0.6494983", "text": "public function beifen()\n\t{\n\t\t$this->load->dbutil();\n\n\t\t// Backup your entire database and assign it to a variable\n\t\t$backup = $this->dbutil->backup();\n\n\t\t// Load the file helper and write the file to your server\n\t\t$this->load->helper('file');\n\t\twrite_file('/path/to/mybackup.gz', $backup);\n\n\t\t// Load the download helper and send the file to your desktop\n\t\t$this->load->helper('download');\n\t\tforce_download('mybackup.gz', $backup);\n\t}", "title": "" }, { "docid": "6f7fe623ffa7473062960f3d54a32ff3", "score": "0.6461363", "text": "function create_backup(){\n $this->load->dbutil();\n\n // Backup your entire database and assign it to a variable\n $backup =& $this->dbutil->backup();\n\n // Load the file helper and write the file to your server\n $this->load->helper('file');\n write_file('backups/'.\"\".date(\"Y-m-d_H-i-s\").'.zip',$backup);\n \n $this->data['title'] = ' Backups'; \n \n $this->data['main_content'] = 'inventory/backup';\n $this->load->view('includes/template', $this->data);\n }", "title": "" }, { "docid": "45e6be0e00ac2fd7331103e6dc55d42a", "score": "0.6432208", "text": "public function mainBackupFim() {\n set_time_limit(0);\n $dbhost = HOST;\n $dbuser = USUARIO_BANCO;\n $dbpass = SENHA_BANCO;\n $db = BANCO;\n\n if ($db == 'prophet_main') {\n $this->erroPermissao();\n return;\n }\n $ds = DIRECTORY_SEPARATOR;\n\n if (!is_dir('backups'))\n mkdir('backups', 777, true);\n\n $backup_file = 'backups' . $ds . $_SESSION['cdnClinica'] . '.sql';\n\n if (LOCAL == 'web') {\n $command = \"/usr/bin/mysqldump \";\n } else {\n $command = \"c:\" . $ds . \"xampp\" . $ds . \"mysql\" . $ds . \"bin\" . $ds . \"mysqldump \";\n }\n\n if ($dbpass != '')\n $command .= \"--opt -h $dbhost -u $dbuser -p$dbpass $db > \" . __DIR__ . \"/../$backup_file\";\n else\n $command .= \"--opt -h $dbhost -u $dbuser $db > $backup_file\";\n\n system($command);\n $modMain = new ModeloMain(true);\n $modMain->mainSalvarBackup($backup_file);\n // Geração de log\n $this->log(array('sucesso', 'backup', 'backup'));\n $this->visualizador->setFlash('Backup realizado com sucesso.', 'sucesso');\n $this->mainBackup();\n return;\n }", "title": "" }, { "docid": "144598333b1405df1250ce3399dcb65f", "score": "0.6396286", "text": "public function process()\n{ \n\n // If not backups enabled\n if (app::_config('core:backups_enable') != 1) { return; }\n\n // Perform needed backups\n $client = new backups();\n if (time() >= app::_config('core:backups_next_full')) { $client->perform_backup('full'); }\n elseif (time() >= app::_config('core:backups_next_db')) { $client->perform_backup('db'); }\n\n\n}", "title": "" }, { "docid": "a70dd8d20577fd96a797445d3dcb8780", "score": "0.6327826", "text": "public function backup() {\n\t\tif ($this->settings['backup_database']) {\n\t\t\tif (!$this->backupDatabase()) {\n\t\t\t\t$this->error['backup'] = 'No database backup file created. The backup process appears to have failed';\n\t\t\t}\n\t\t}\n\t\tif (!$this->backupUserFiles()) {\n\t\t\t$this->error['backup'] = 'No backup file created. The backup process appears to have failed';\n\t\t}\n\t\tif (!$this->backupProcessCleanup()) {\n\t\t\t$this->error['backup'] = 'Backup cleanup process failed.';\n\t\t}\n\t}", "title": "" }, { "docid": "28cb5bf89348b579f7bfbe2d8d57b208", "score": "0.6325032", "text": "public function runBackup()\n {\n $this->cleanup();\n\n //Run backups tasks on registered services.\n foreach ($this->backupServices as $backupService) {\n $backupService->backup();\n //TODO: Log or report upon failure of executing the backup configuration\n }\n\n //Move archived results of various backup services into a general archive, ready for long term storage.\n $this->archive();\n\n //Move archive to storage.\n $this->store();\n //TODO: Log or report upon failure\n\n //Remove old backups if required.\n $this->enforceStorageRetentionPolicy();\n }", "title": "" }, { "docid": "0de00f3b8b24a03d2f63ef48cab18226", "score": "0.6304552", "text": "public function exportFullDb()\n {\n try {\n $simpleBackup = SimpleBackup::setDatabase(\n [\n DB_NAME,\n DB_USER,\n DB_PASSWORD,\n DB_HOST\n ]\n )->storeAfterExportTo(\n WPM2AWS_PLUGIN_DIR . '/libraries/db',\n 'db.sql'\n );\n } catch (Throwable $e) {\n wpm2awsLogAction('Error! DB Download Failed: ' . $e->getMessage());\n wpm2awsLogRAction('wpm2aws-run-db-download', 'wpm2aws_download_db_complete: Fail');\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'error');\n set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), __('Error!<br><br>Prepare Database Failed. (1)<br>Fatal Error', 'migrate-2-aws'));\n exit(wp_safe_redirect(admin_url('/admin.php?page=wpm2aws')));\n } catch (NoTablesFoundException $e) {\n wpm2awsLogAction('Error! DB Download Failed: ' . $e->getMessage());\n wpm2awsLogRAction('wpm2aws-run-db-download', 'wpm2aws_download_db_complete: Fail');\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'error');\n set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), __('Error!<br><br>Prepare Database Failed. (2)<br>Fatal Error', 'migrate-2-aws'));\n exit(wp_safe_redirect(admin_url('/admin.php?page=wpm2aws')));\n } catch (RuntimeException $e) {\n wpm2awsLogAction('Error! DB Download Failed: ' . $e->getMessage());\n wpm2awsLogRAction('wpm2aws-run-db-download', 'wpm2aws_download_db_complete: Fail');\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'error');\n set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), __('Error!<br><br>Prepare Database Failed. (3)<br>Fatal Error', 'migrate-2-aws'));\n exit(wp_safe_redirect(admin_url('/admin.php?page=wpm2aws')));\n } catch (Exception $e) {\n wpm2awsLogAction('Error! DB Download Failed: ' . $e->getMessage());\n wpm2awsLogRAction('wpm2aws-run-db-download', 'wpm2aws_download_db_complete: Fail');\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'error');\n set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), __('Error!<br><br>Prepare Database Failed. (4)<br>Fatal Error', 'migrate-2-aws'));\n exit(wp_safe_redirect(admin_url('/admin.php?page=wpm2aws')));\n }\n \n try {\n $response = $simpleBackup->getResponse();\n wpm2awsLogRAction('wpm2aws-run-db-download', 'Simple Backup Response (fdb): ' . json_encode($response));\n } catch (Throwable $e) {\n wpm2awsLogRAction('wpm2aws-run-db-download', 'Simple Backup Response Error: ' . $e->getMessage());\n $response = (object) array(\n 'status' => false,\n 'message' => 'Could Not Determine Response',\n );\n } catch (Exception $e) {\n wpm2awsLogRAction('wpm2aws-run-db-download', 'Simple Backup Response Error: ' . $e->getMessage());\n $response = (object) array(\n 'status' => false,\n 'message' => 'Could Not Determine Response',\n );\n }\n\n // Throw error if Response is not as expected\n if ('object' !== gettype($response)) {\n wpm2awsLogAction('Error! DB Download Failed - Bad Response: Not Object (fdb)' . json_encode($response));\n wpm2awsLogRAction('wpm2aws-run-db-download', 'Error! DB Download Failed - Bad Response: Not Object (fdb)' . json_encode($response));\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'error');\n set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), __('Error!<br><br>Prepare Database Failed. <br>Error Ref: Bad Response - No Object (fdb)', 'migrate-2-aws'));\n exit(wp_safe_redirect(admin_url('/admin.php?page=wpm2aws')));\n }\n\n // Throw Error if we cannot determine the Response Status\n if (property_exists($response, 'status') === false) {\n $responseStatus = 'Status Not Found';\n\n // Get or Create Message\n if (property_exists($response, 'message') === true) {\n $responseMessage = $response->message;\n }\n if (property_exists($response, 'message') === false || empty($responseMessage)) {\n $responseMessage = 'Could Not Determine Response Message';\n }\n \n wpm2awsLogAction('Error! DB Download Failed - Bad Response: (fdb) Status=' . $responseStatus . ' | Message=' . $responseMessage . ' | Response=' . json_encode($response));\n wpm2awsLogRAction('wpm2aws-run-db-download', 'Error! DB Download Failed - Bad Response: (fdb) Status=' . $responseStatus . ' | Message=' . $responseMessage . ' | Response=' . json_encode($response));\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'error');\n set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), __('Error!<br><br>Prepare Database Failed. <br>Error Ref: ' . $responseMessage, 'migrate-2-aws'));\n exit(wp_safe_redirect(admin_url('/admin.php?page=wpm2aws')));\n }\n\n // Return Success or Throw Error if Status is not TRUE\n if ($response->status === true) {\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'success');\n wpm2awsLogRAction('wpm2aws-run-db-download', 'wpm2aws_download_db_complete (fdb): Success');\n set_transient('wpm2aws_admin_success_notice_' . get_current_user_id(), __('Success!<br><br>Prepare Database Complete.', 'migrate-2-aws'));\n wpm2awsAddUpdateOptions('wpm2aws_current_active_step', 3);\n } else {\n // Get or Create Message\n if (property_exists($response, 'message') === true) {\n $responseMessage = $response->message;\n }\n if (property_exists($response, 'message') === false || empty($responseMessage)) {\n $responseMessage = 'Could Not Determine Response Message';\n }\n\n wpm2awsLogAction('Error! DB Download Failed - Bad Response: (fdb) Status=' . $response->status . ' | Message=' . $responseMessage . ' | Response=' . json_encode($response));\n wpm2awsLogRAction('wpm2aws-run-db-download', 'wpm2aws_download_db_complete (fdb): Error: Status=' . $response->status . ' | Message=' . $responseMessage . ' | Response=' . json_encode($response));\n wpm2awsAddUpdateOptions('wpm2aws_download_db_complete', 'error');\n set_transient('wpm2aws_admin_error_notice_' . get_current_user_id(), __('Error!<br><br>Prepare Database Failed. <br>Error Ref: ' . $responseMessage, 'migrate-2-aws'));\n }\n\n exit(wp_safe_redirect(admin_url('/admin.php?page=wpm2aws')));\n }", "title": "" }, { "docid": "b98ce8c3479fedadbd199043900fd096", "score": "0.6291193", "text": "public function run_processing_db() {\n $getbackups = $this->db->query(\"select * from backupsql where cron_status = 0 AND daily_backup_check = 0 AND status IN('processing','failed')\")->result();\n foreach ($getbackups as $bkp) {\n $cmd = \"php \" . FCPATH . \"index.php cron execute_background_db \" . $bkp->backup_id . \" \";\n exec($cmd.\" > /dev/null 2>/dev/null &\");\n }\n }", "title": "" }, { "docid": "24dfad6f1035881f1ff5fc3ff46f0ba3", "score": "0.6286475", "text": "function beplus_import_pack_backup_site_substep_backup_database() {\n\n // bbackup_backup_database\n $result = BBACKUP_Backup_Database( [], '' );\n\n if( $result['success'] == true ) {\n \n wp_send_json( [\n 'success' => true,\n 'result' => [\n 'status' => true,\n 'message' => __( 'Backup database successful.', 'beplus' ),\n 'next_step_data' => $result,\n ]\n ] );\n } else {\n wp_send_json( [\n 'success' => true,\n 'result' => [\n 'status' => false,\n 'message' => __( 'Backup database fail!', 'beplus' ),\n ]\n ] );\n }\n }", "title": "" }, { "docid": "6f9238ad8ecad296913b932d09fa1df9", "score": "0.6259085", "text": "public function dbBackup()\n {\n if (\\Auth::user()->role != 'Admin')\n return \\Redirect::to('/');\n $file = storage_path('database.sqlite');\n if (file_exists($file)) {\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=\"'.basename($file).'\"');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . filesize($file));\n readfile($file);\n exit;\n }\n }", "title": "" }, { "docid": "e8ac04e0a10cc96b0e0f4a55dafddfd4", "score": "0.6252578", "text": "public function backup(){\n\t // naming\n\t $excludefolder = str_replace('/','', $this->location);\n\t $this->location = $this->location . 'backup_' . date('d-m-Y_H-i') . '/';\n\t $this_backup_name = str_replace(' ', '_', $this->backup_base_name . '_'.date('d-m-Y_H-i').'.zip');\n\t \n\t\t// check subfolder\n\t if(!file_exists($_SERVER['DOCUMENT_ROOT'] . $this->location)){\n\t\t $this->debug[] = __LINE__ . \" Folder not existing, creating dir\";\n\t\t mkdir($_SERVER['DOCUMENT_ROOT'] . $this->location, 0777, true);\n\t } else {\n\t\t $this->debug[] = __LINE__ . \" Success: Backup folder found\";\n\t }\n\t \n\t ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t //////////// DATABASE BACKUP\n\t ////////////////////////////////////////////////////////////\n\t if($this->db_use == true){\n\t\t // backup the database\n\t\t // checking all variables\n\t\t if($this -> db_host == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' database host not specified';\n\t\t\t $this->db_use = false;\n\t\t }\n\t\t \n\t\t if($this -> db_username == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' database username not specified';\n\t\t\t $this->db_use = false;\n\t\t }\n\t\t \n\t\t if($this -> db_password == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' database password not specified. not necessarily a problem';\n\t\t }\n\t\t \n\t\t if($this -> db_name == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' database name not specified';\n\t\t\t $this->db_use = false;\n\t\t }\n\t\t \n\t\t // database name\n\t\t $this->db_backup_name = $this->location . str_replace(' ', '_', $this-> db_name . '_'.date('d-m-Y_H-i').'.sql');\n\t\t \n\t\t // backup the database backup\n\t\t if($this->db_use == true){\n\t\t\t $this->debug[] = 'Making database backup.....';\n\t\t\t\t$this->debug[] = backup_db($this -> db_host, $this -> db_username, $this -> db_password, $this -> db_name, $this->db_backup_name);\n\t\t\t}\n\t }\n\t \n\t ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t //////////// MAKE BACKUP FROM FILES\n\t ////////////////////////////////////////////////////////////\n\t \n\t echo ExtendedZip::zipTree(\n\t\t $excludefolder, \n\t\t $_SERVER['DOCUMENT_ROOT'], \n\t\t $_SERVER['DOCUMENT_ROOT'] . $this->location . $this_backup_name, \n\t\t ZipArchive::CREATE, \n\t\t '', \n\t\t $this->db_backup_name\n\t );\n\t \n\t ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t //////////// MAIL \n\t ////////////////////////////////////////////////////////////\n\t \n\t if($this->db_use == true && $this->mail_use == true){\n\t\t // backup the database\n\t\t // checking all variables\n\t\t if($this -> mail_host == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' mail host not specified';\n\t\t\t $this->mail_use = false;\n\t\t }\n\t\t \n\t\t if($this -> mail_username == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' mail username not specified';\n\t\t\t $this->mail_use = false;\n\t\t }\n\t\t \n\t\t if($this -> mail_password == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' mail password not specified';\n\t\t\t $this->mail_use = false;\n\t\t }\n\t\t \n\t\t if($this -> mail_to == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' mail name not specified';\n\t\t\t $this->mail_to = false;\n\t\t }\n\t\t \n\t\t // backup the database backup\n\t\t if($this->mail_use == true){\n\t\t\t $this->debug[] = 'Making mail.....';\n\t\t\t\t$this->debug[] = mail_with_attachment(\n\t\t\t\t\t$this -> mail_host, \n\t\t\t\t\t$this -> mail_username, \n\t\t\t\t\t$this -> mail_password, \n\t\t\t\t\t$this -> mail_port, \n\t\t\t\t\t$this->mail_to,\n\t\t\t\t\tarray($this->db_backup_name)\n\t\t\t\t);\n\t\t\t}\n\t }\n\t \n\t ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\t //////////// FTP\n\t ////////////////////////////////////////////////////////////\n\t \n\t if($this->ftp_use = true){\n\t\t // backup the database\n\t\t // checking all variables\n\t\t if($this->ftp_host == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' ftp host not specified';\n\t\t\t $this->ftp_use = false;\n\t\t }\n\t\t \n\t\t if($this -> ftp_username == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' ftp username not specified';\n\t\t\t $this->ftp_use = false;\n\t\t }\n\t\t \n\t\t if($this -> ftp_password == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' ftp password not specified';\n\t\t\t $this->ftp_use = false;\n\t\t }\n\t\t \n\t\t if($this -> ftp_path == ''){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' ftp path not specified';\n\t\t\t $this->ftp_use = false;\n\t\t }\n\t\t \n\t\t // backup the database backup\n\t\t if(uploadFTP(\n\t\t \t$this->ftp_host,\n\t\t \t$this->ftp_username,\n\t\t \t$this->ftp_password, \n\t\t \t$_SERVER['DOCUMENT_ROOT'] . $this->location . $this_backup_name, \n\t\t \t$this -> ftp_path, \n\t\t \t$this_backup_name)\n\t\t ){\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' file uploaded to ftp';\n\t\t } else {\n\t\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' ftp upload problem';\n\t\t }\n\t }\n\t \n\t if($this->local_use == true){\n\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' keep folder';\n\t\t delete_old($_SERVER['DOCUMENT_ROOT'] . '/' . $excludefolder , $this->delete_days); // delete de files IN de folder\n\t\t \n\t } else {\n\t\t $this->debug[] = 'line: '. __LINE__ .' '. ' delete folder';\n\t\t removeDirectory($_SERVER['DOCUMENT_ROOT'] . '/' . $excludefolder); // delete de hele folder\n\t }\n }", "title": "" }, { "docid": "03b08ec914d0d581d39eea7e9f99d290", "score": "0.6213906", "text": "public function backup() {\r\n\t if ( count($this->error) > 0 ){\r\n\t //echo '<br>Error - backup: '.$this->dbName.' L:'.__LINE__;\r\n\t return false;\r\n\t }\r\n //echo '<br>Database: '.$this->dbName.' L: '.__LINE__;\r\n\t\t$this->_getTables();\r\n if ( !is_dir($this->config['temp_path']) ) {\r\n mkdir($this->config['temp_path']);\r\n }\r\n\t\t$this->_generate();\r\n \r\n // clean up temp:\r\n $this->purge(0, 'temp_path');\r\n\t\t//return $this->final;\r\n\t\tif ( count($this->error)>0 ) {\r\n\t\t\treturn false;//, 'msg'=>$this->error);\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "7ac8080cb534b58451b2a2efc7bce7f5", "score": "0.62094647", "text": "function backup()\r\n\t{\r\n\t //check rights\r\n $userlogin = getUserLogin();\r\n if ( (!$userlogin->hasRights('database_manage'))\r\n ) \r\n {\r\n\t appendErrorMessage(__('Backup database').': '.__('insufficient rights').'.<br/>');\r\n\t redirect('');\r\n }\r\n\r\n\t $type = $this->uri->segment(3,'win');\r\n\t if (!in_array($type,array('win','unix','mac'))) {\r\n\t $type = 'unix';\r\n\t }\r\n\t\tif ($type == \"win\")\r\n\t\t\t$linebreak = \"\\r\\n\";\r\n\t\telse if ($type == \"unix\")\r\n\t\t\t$linebreak = \"\\n\";\r\n\t\telse if ($type == \"mac\")\r\n\t\t\t$linebreak = \"\\r\";\r\n\r\n // Load the DB utility class\r\n $this->load->dbutil();\r\n \r\n //tables to backup: only those with right prefix, if prefix set (!)\r\n $tables=array();\r\n if (AIGAION_DB_PREFIX!='') {\r\n foreach ($this->db->list_tables() as $table) {\r\n $p = strpos($table,AIGAION_DB_PREFIX);\r\n if (!($p===FALSE)) {\r\n if ($p==0) {\r\n $tables[]=$table;\r\n }\r\n }\r\n }\r\n }\r\n // Backup your entire database and assign it to a variable\r\n //note: we could make a site setting for whether a gz, zip or txt is returned. But gz is OK, I guess.\r\n $backup =$this->dbutil->backup(array('tables'=>$tables,'newline'=>$linebreak,'format'=>'txt'));\r\n \r\n \r\n header(\"Content-Type: charset=utf-8\"); //we intentionally do not use the download helper, as we need to set some UTF* specific thingies here\r\n header('Content-Disposition: attachment; filename=\"'.AIGAION_DB_PREFIX.AIGAION_DB_NAME.\"_backup_\".date(\"Y_m_d\").'.sql'.'\"');\r\n header('Expires: 0');\r\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\r\n //header(\"Content-Transfer-Encoding: binary\");\r\n header('Pragma: public,no-cache');\r\n //header(\"Content-Length: \".strlen($backup));\r\n //echo \" <html><head><meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=utf-8\\\" /></head><body>\";\r\n //we can send BOM, because otherwise not all editors will recognize this file as UTF8!!!\r\n //echo Chr(239).Chr(187).Chr(191); //unfortunately, other editors will NOT b able to handle the BOM :( Also, on the web I find suggestions that BOM breaks IE (http://trac.seagullproject.org/wiki/Misc/CharsetEncoding\r\n //so we choose another solution, see below\r\n //http://mailman.rfc-editor.org/pipermail/rfc-interest/2008-October/000771.html\r\n echo \"-- Iñtërnâtiônàlizætiøn\r\n -- Aigaion developers: \r\n -- Don't remove the above commented sentence with some UTF8 characters in it, \r\n -- as it is needed to make sure that editors recognize the downloaded file as UTF8. (note that we could have\r\n -- added a BOM instead, but many editors choke on BOM, so we chose not to do this.)\r\n -- Refer to the following link for a discussion about this problem with editors 'guessing'\r\n -- the encoding.\r\n -- http://mailman.rfc-editor.org/pipermail/rfc-interest/2008-October/000771.html\r\n -- - Aigaion database: \".AIGAION_DB_NAME.\"\r\n -- - Export date: \".date(\"Y_m_d\").\"\r\n\r\n \";\r\n \r\n echo $backup;\r\n //echo \"</body></html>\";\r\n die(); \r\n }", "title": "" }, { "docid": "1e90d937d18dcf31a5f4e17164b4ae86", "score": "0.6191923", "text": "public function run()\n {\n User::query()->create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => password_hash('123', PASSWORD_DEFAULT),\n ]);\n \\App\\Models\\DbBackup\\Connection::query()->create([\n 'name' => 'local',\n 'host' => 'localhost',\n 'username' => 'root',\n 'password' => encrypt('password'),\n 'driver' => \\App\\Models\\DbBackup\\Connection::DRIVER_MYSQL,\n ]);\n }", "title": "" }, { "docid": "9bbd59778cbae8d3049a628118dc7e89", "score": "0.615656", "text": "function backup_database($username, $password, $db,$host,$directory='')\n{\n //delete the old folder if it exists\n if(!$directory){\n $directory='backup';\n }\n\n if (file_exists($directory)) {\n deleteDirectory($directory);\n\n\n }\n\n if (!file_exists($directory)) {\n\n mkdir($directory, 0777, true);\n }\n //todo automatically create backup folder if it does not exist\n $suffix = time();\n #Execute the command to create backup sql file\n exec(\"mysqldump --user={$username} --password={$password} --quick --add-drop-table --add-locks --extended-insert --lock-tables --all{$db} > $directory/backup.sql\");\n //exec(\"mysqldump --user={$username} --password={$password} --host={$host} {$db} > $directory/backup.sql\");\n\n #Now zip that file\n $zip = new ZipArchive();\n $filename = $directory.\"/backup-$suffix.zip\";\n if ($zip->open($filename, ZIPARCHIVE::CREATE) !== TRUE) {\n exit(\"cannot open <$filename>n\");\n }\n $zip->addFile($directory.\"/backup.sql\", \"backup.sql\");\n $zip->close();\n #Now delete the .sql file without any warning\n @unlink($directory.\"/backup.sql\");\n #Return the path to the zip backup file\n return $directory.\"/backup-$suffix.zip\";\n}", "title": "" }, { "docid": "63b7487958aadefafcfb804a22be71d7", "score": "0.6139672", "text": "public function backupImport();", "title": "" }, { "docid": "008d7e8f9d9fb0b467396825a1be4acc", "score": "0.6091397", "text": "protected function _make_backup(){\n if ($this->db->dbdriver != 'mysql') {\n // FIXME kip9 Look for a way to work with other drivers\n return false;\n }\n\n $fullBackupFileName = $this->_createBackupFile();\n if($fullBackupFileName !== false){\n // Do backup\n $this->load->dbutil();\n // Backup your entire database and assign it to a variable\n $backup =& $this->dbutil->backup();\n\n // Load the file helper and write the file to your server\n $this->load->helper('file');\n write_file($fullBackupFileName, $backup);\n @chmod($fullBackupFileName, 0600);\n log_message('info', 'Created backup file '.$fullBackupFileName);\n }\n return $fullBackupFileName;\n }", "title": "" }, { "docid": "a1c1f085303dac97318cba53557154c2", "score": "0.60575247", "text": "function zip_archive_backup_db($task_name, $db_result, $backup_file) {\r\n \t$disable_comp = $this->tasks['args']['disable_comp'];\r\n \tif (!$disable_comp) {\r\n \t\t$this->_log(\"Compression is not supported by ZipArchive\");\r\n \t}\r\n \t$zip = new ZipArchive();\r\n\r\n \t$result = $zip->open($backup_file, ZIPARCHIVE::OVERWRITE); // Tries to open $backup_file for acrhiving\r\n \tif ($result === true) {\r\n \t\t$result = $result && $zip->addFile(IWP_BACKUP_DIR.'/iwp_db/index.php', \"iwp_db/index.php\"); // Tries to add iwp_db/index.php to $backup_file\r\n \t\t$result = $result && $zip->addFile($db_result, \"iwp_db/\" . basename($db_result)); // Tries to add db dump form iwp_db dir to $backup_file\r\n \t\t$result = $result && $zip->close(); // Tries to close $backup_file\r\n \t} else {\r\n \t\t$result = false;\r\n \t}\r\n \t\r\n \treturn $result; // true if $backup_file iz zipped successfully, false if error is occurred in zip process\r\n }", "title": "" }, { "docid": "2e592f2616cc05891b824009a1a2a37f", "score": "0.60445976", "text": "public function backupDatabase() {\n\t\t$host = $this->settings['ss_dbhost'];\n\t\t$user = $this->settings['ss_dbuser'];\n\t\t$pass = $this->settings['ss_dbpass'];\n\t\t$name = $this->settings['ss_dbname'];\n\t\t$tables = '*';\n\t\t$link = mysql_connect($host,$user,$pass);\n\t\tmysql_select_db($name,$link);\n\t\tif ($tables == '*') {\n\t\t\t$tables = array();\n\t\t\t$result = mysql_query('SHOW TABLES');\n\t\t\twhile ($row = mysql_fetch_row($result)) {\n\t\t\t\t$tables[] = $row[0];\n\t\t\t}\n\t\t} else {\n\t\t\t$tables = is_array($tables) ? $tables : explode(',',$tables);\n\t\t}\n\t\tforeach ($tables as $table) {\n\t\t\t$result = mysql_query('SELECT * FROM ' . $table);\n\t\t\t$num_fields = mysql_num_fields($result);\n\t\t\t$return.= 'DROP TABLE IF EXISTS ' . $table . ';';\n\t\t\t$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE ' . $table));\n\t\t\t$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\t\t\tfor ($i = 0; $i < $num_fields; $i++) \n\t\t\t{\n\t\t\t\twhile($row = mysql_fetch_row($result))\n\t\t\t\t{\n\t\t\t\t\t$return.= 'INSERT INTO '.$table.' VALUES(';\n\t\t\t\t\tfor($j=0; $j<$num_fields; $j++) \n\t\t\t\t\t{\n\t\t\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t\t\t$row[$j] = ereg_replace(\"\\n\",\"\\\\n\",$row[$j]);\n\t\t\t\t\t\tif (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } else { $return.= '\"\"'; }\n\t\t\t\t\t\tif ($j<($num_fields-1)) { $return.= ','; }\n\t\t\t\t\t}\n\t\t\t\t\t$return.= \");\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return.=\"\\n\\n\\n\";\n\t\t}\n\t\t$handle = fopen($this->settings['full_install_path'] . 'ss_database_backup' . '.sql','w+');\n\t\tfwrite($handle,$return);\n\t\tfclose($handle);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "54a36ec890e3a14395dea2d9f40c83e7", "score": "0.60344243", "text": "public function s3backupAction() {\n $available = $this->getS3()->isObjectAvailable('dbback/' . $this->_suffix . '.sql.tar.gz');\n if($available == false){\n if(!file_exists($this->_tarDump)){\n $backup = $this->backup();\n $ret = $this->transfer($backup);\n } else {\n $backup = $this->_tarDump;\n $ret = $this->transfer($backup);\n }\n echo \"Success: \" . ($ret ? 'Yes' : 'No');\n if($ret == true){\n $deleted = $this->cleanUp();\n $this->notify('The backup process was successful');\n unlink($backup);\n } else {\n $this->notify('The backup process was unsuccessful');\n }\n } else {\n echo \"The backup file already exists at the S3 server\";\n $this->notify('The backup file already exists at the S3 server');\n }\n }", "title": "" }, { "docid": "41f23af45dca66e63b168e650984cfcb", "score": "0.6030733", "text": "function backupDB($backupPath) {\n $db = getFuel('database');\n $backup = $db->backups();\n $file = $backup->backup();\n if($file) {\n return $file; \n } else {\n throw new WireException(\"Backup failed: \" . print_r($backup->errors(), true));\n } \n}", "title": "" }, { "docid": "61dc8ccf10417f39a69290c05425e77c", "score": "0.60215586", "text": "public function run()\n {\n \n $sql = file_get_contents(__DIR__ . '/dumps/dump-20191121.sql');\n\n // split the statements, so DB::statement can execute them.\n $statements = array_filter(array_map('trim', explode(';', $sql)));\n\n foreach ($statements as $stmt) {\n DB::statement($stmt);\n }\n }", "title": "" }, { "docid": "0d4a0aae7be4ce0e482b8991b7fedc53", "score": "0.6010426", "text": "protected function dbBackup($form, $viewModel) {\r\n\t\t\t$request = $this->getRequest();\r\n\t\t\tif ($request->isPost()) {\r\n\t\t\t\t$businessDate = new BusinessDate();\r\n\t\t\t\t$form->setData($request->getPost());\r\n\t\t\t\tif ($form->isValid()) {\r\n\t\t\t\t\t$formData = $form->getData();\r\n\t\t\t\t\t$data = array(\r\n\t\t\t\t\t\t\t\t'BUSINESS_DATE' => $this->getBusinessDateTable()->currentBusinessDate,\r\n\t\t\t\t\t\t\t\t'SOD_BKUP'\t\t=> (isset($formData['btnSOD']) && (strtolower($formData['btnSOD']) == 'backup database')) ? 'y' : null,\r\n\t\t\t\t\t\t\t\t'SOD_FLAG' \t\t=> null,\r\n\t\t\t\t\t\t\t\t'EOD_BKUP'\t\t=> null,\r\n\t\t\t\t\t\t\t\t'EOD_FLAG' \t\t=> null,\r\n\t\t\t\t\t\t\t\t'DATE_CLOSE' \t=> null,\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t$businessDate->exchangeArray($data);\r\n\t\t\t\t\tif($this->getBusinessDateTable()->saveBusinessDate($businessDate)) {\r\n\t\t\t\t\t\treturn $this->redirect()->toRoute('businessdate');\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//$viewModel->setVariable('error', 'Access denied : Unauthorized user information');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "0b95d8f4d408d31e73b89484520c90cf", "score": "0.599037", "text": "public function backup() {\r\n\t\t// gather the paths to the created backup files for emailing!\r\n\t\t$attachmentPaths = array();\r\n\t\t\r\n\t\t// run the backup for each given config\r\n\t\tforeach ($this->configs as $config) {\r\n\t\t\t\r\n\t\t\t// extract config data\r\n\t\t\t$schema = $config[0];\r\n\t\t\t$username = $config[1];\r\n\t\t\t$password = $config[2];\r\n\t\t\t$host = $config[3];\r\n\t\t\r\n\t\t\t// create the path to the backup file\r\n\t\t\t$path = sprintf(\r\n\t\t\t\t'%s%s_%s.sql%s',\r\n\t\t\t\t$this->path,\r\n\t\t\t\t$schema,\r\n\t\t\t\tdate($this->dateFormat),\r\n\t\t\t\t$this->extension\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t// save path for attaching\r\n\t\t\t$attachmentPaths[] = $path;\r\n\t\t\t\r\n\t\t\t// build the command\r\n\t\t\t$command = sprintf(\r\n\t\t\t\t'%smysqldump --user=\\'%s\\' --password=\\'%s\\'%s %s %s | %s > %s',\r\n\t\t\t\t$this->pathMysqldump,\r\n\t\t\t\t$username,\r\n\t\t\t\t$password,\r\n\t\t\t\t(strlen($host) > 0 ? ' --host=' . $host : ''),\r\n\t\t\t\t$schema,\r\n\t\t\t\t$this->opts,\r\n\t\t\t\t$this->pathGZip . $this->zip,\r\n\t\t\t\t$path\r\n\t\t\t);\r\n\t\t\t\r\n\t\t\t// execute the command\r\n\t\t\texec($command);\r\n\t\t\t\r\n\t\t\t// reset variables\r\n\t\t\t$schema = $username = $password = $host = '';\r\n\t\t}\r\n\t\t\r\n\t\t// check mail prerequisites\r\n\t\t// mailer has to be defined and someone to send to\r\n\t\tif (strlen($this->mailer) > 0 && in_array($this->mailer, array('mail', 'smtp')) && count($this->recipients) > 0) {\r\n\t\t\trequire_once 'lib/swift-4.0.6/swift_required.php';\r\n\t\t\t\r\n\t\t\t// select swift transport\r\n\t\t\t$transport = null;\r\n\t\t\tswitch ($this->mailer) {\r\n\t\t\t\tcase 'mail':\r\n\t\t\t\t\t$transport = Swift_MailTransport::newInstance();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'smtp':\r\n\t\t\t\t\t$transport = Swift_SmtpTransport::newInstance($this->smtpConfig[0], $this->smtpConfig[3])\r\n\t\t\t\t\t\t->setUsername($this->smtpConfig[1])\r\n\t\t\t\t\t\t->setPassword($this->smtpConfig[2])\r\n\t\t\t\t\t;\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// create the mailer\r\n\t\t\t$mailer = Swift_Mailer::newInstance($transport);\r\n\t\t\t\r\n\t\t\t// create the message\r\n\t\t\t$message = Swift_Message::newInstance()\r\n\t\t\t\t->setSubject($this->mailSubject)\r\n\t\t\t\t->setFrom(array($this->sender))\r\n\t\t\t\t->setTo($this->recipients)\r\n\t\t\t\t->setBody('')\r\n\t\t\t;\r\n\t\t\t\r\n\t\t\t// attach the backup files\r\n\t\t\tforeach ($attachmentPaths as $path) {\r\n\t\t\t\tif (file_exists($path)) {\r\n\t\t\t\t\t$message->attach(Swift_Attachment::fromPath($path));\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdie('Path of backup file not found: ' . $path);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// send the mail\r\n\t\t\t$result = $mailer->send($message);\r\n\t\t}\r\n\t\t\r\n\t\t// if the backup files shall be deleted, do so\r\n\t\tif ($this->deleteFiles) {\r\n\t\t\tforeach ($attachmentPaths as $path) {\r\n\t\t\t\tunlink($path);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "fb5e9b608f5c5e729d9381c853ae21cf", "score": "0.5986036", "text": "public function backupCheck()\n {\n #-- path to dir and file\n $rootDir = \\System::getContainer()->getParameter('kernel.project_dir');\n $filepath = $rootDir . '/files/dbBackup';\n $file = $filepath . '/lastBackup.txt';\n #-- after how many hours the backup will executed again\n $hours = 24;\n #-- how many backup files will be stored\n $stored = 30;\n\n #-- check if dir exists\n if(!is_dir($filepath)){\n mkdir($filepath);\n }\n\n #-- check if file exists\n if(!file_exists($file)){\n file_put_contents($file,'');\n }\n\n #-- check of file exists\n if(!file_get_contents($file)){\n #-- no file or empty take backup now\n $time = self::doDump($filepath, 'Dump_'.date(\"Ymd_His\").'.sql');\n }else{\n #-- check if last backup was X hours ago\n $content = file_get_contents($file);\n\n if($content <= strtotime('-' . $hours . ' hours')){\n $time = self::doDump($filepath, 'Dump_'.date(\"Ymd_His\").'.sql' );\n }else{\n $time = false;\n }\n }\n\n #-- write time in file for next check\n if($time){\n $handle = fopen($file, 'w+');\n fwrite($handle, time());\n fclose($handle);\n }\n\n #-- delete old backups\n exec('ls -d -1tr ' . $filepath . '/* | head -n -' . ($stored + 1) . ' | xargs -d \\'\\n\\' rm -f');\n }", "title": "" }, { "docid": "2c904be7ca43ba2cbd61cf6d95a04290", "score": "0.59766626", "text": "public static function Backup() {\n $db = new SQLite3('app/db/viro.db', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);\n\n # Current time\n $ct = time();\n\n # Get user ID\n if(isset($_SESSION['UserID'])) {\n $usrID = $_SESSION['UserID'];\n }else{\n $usrID = 0;\n }\n\n # Create the directory\n if(!mkdir(\"app/db/backup/$ct\", 0777, true)) {\n return false;\n }\n\n # Copy the file\n if(copy(\"app/db/viro.db\", \"app/db/backup/$ct/viro.db\")) {\n # Insert backup\n $db->query('INSERT INTO backups (\"title\", \"u_id\", \"created\")\n VALUES (\"Viro_' . $ct . '\", \"' . $usrID . '\", \"' . $ct . '\")');\n\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "73e223d0212d24a676c85bf7af207a06", "score": "0.5973447", "text": "function backup_database($dbname, $exclude_tables)\n {\n global $dbh, $path, $LOG;\n global $server, $username, $password;\n\n // log it\n fwrite($LOG, \"Backing Up Database: \".$dbname.\"\\r\\n\");\n\n // output progress\n echo \"Backing up database: \".$dbname.\"\\n\";\n\n // select the database\n mysql_select_db($dbname, $dbh);\n\n // make sure a directory exists\n $filename = $path.$dbname;\n if (!file_exists($filename)) {\n mkdir($filename, 0777);\n }\n fwrite($LOG, \"Files Stored at: \".$filename.\"\\r\\n\");\n\n // now get a list of all the tables\n $sql = \"SHOW tables FROM \".$dbname;\n $tables = mysql_query($sql, $dbh) or die(mysql_error());\n\n while ($table = mysql_fetch_array($tables)) {\n $tablename = $table[0];\n if ($dbname == 'mysql' && $tablename == 'event') {\n // mysqldump throws a warning and skips the mysql.event table so this\n // should hopefully avoid the warning\n continue;\n }\n\n // see if this table should be excluded from the backup\n $fqn = $dbname.'.'.$tablename;\n if (in_array($fqn, $exclude_tables)) {\n echo \" Skipping table: \".$fqn.\"\\n\";\n continue;\n }\n\n // output the structure\n $filename = date(\"Y-m-d\").\"_structure_\".$tablename.\".sql\";\n $cmd = escapeshellcmd('mysqldump --skip-opt --host='.$server.' --user='.$username.' --password='.$password.' -d '.$dbname.' '.$tablename);\n $cmd .= ' > '.escapeshellcmd($path.$dbname.'/'.$filename);\n system($cmd);\n fwrite($LOG, \"Table Structure for Table [\".$tablename.\"] created: \".$filename.\"\\r\\n\");\n\n // output the table data\n $filename = date(\"Y-m-d\").\"_data_\".$tablename.\".sql\";\n $cmd = escapeshellcmd('mysqldump --skip-opt --host='.$server.' --user='.$username.' --password='.$password.' -t '.$dbname.' '.$tablename);\n $cmd .= ' > '.escapeshellcmd($path.$dbname.'/'.$filename);\n system($cmd);\n fwrite($LOG, \"Table Data for Table [\".$tablename.\"] created: \".$filename.\"\\r\\n\");\n }\n mysql_free_result($tables);\n unset($table);\n\n fwrite($LOG, \"\\r\\n\");\n }", "title": "" }, { "docid": "65f483411232c06ac1f01da9e422401d", "score": "0.59653586", "text": "public function backupAction()\n {\n $dumpFiles = array();\n $backupDir = dirname(__FILE__) . '/../Resources/dump/';\n if ($dumpDir = opendir($backupDir)) {\n while (false !== ($entry = readdir($dumpDir))) {\n if (!is_dir($entry)) {\n // If is .sql file\n if (preg_match(\"/\\.sql$/\", $entry)) {\n $dumpFiles[] = $entry;\n }\n }\n }\n }\n $form = $this->createRestoreForm($dumpFiles);\n return array(\n 'formRestore' => $this->createFormBuilder()->getForm()->createView(),\n 'formBackup' => $form->createView(),\n 'files' => $dumpFiles,\n );\n }", "title": "" }, { "docid": "e03d131ed3e9ca26e70c389a7d430d70", "score": "0.5959528", "text": "protected function pageDbBackup()\n {\n // Init | Set Step to 1\n if ($this->intStep == 0)\n {\n // Init content\n $this->booError = false;\n $this->booAbort = false;\n $this->booFinished = false;\n $this->strError = \"\";\n $this->booRefresh = true;\n $this->strUrl = \"contao/main.php?do=syncCto_backups&amp;table=tl_syncCto_backup_db&amp;act=start\";\n $this->strGoBack = \\Environment::get('base') . \"contao/main.php?do=syncCto_backups&table=tl_syncCto_backup_db\";\n $this->strHeadline = $GLOBALS['TL_LANG']['tl_syncCto_backup_db']['edit'];\n $this->strInformation = \"\";\n $this->intStep = 1;\n $this->floStart = microtime(true);\n $this->objData = new ContentData(array(), $this->intStep);\n\n // Reset some Sessions\n $this->resetStepPool();\n }\n\n // Load step pool\n $this->loadStepPool();\n\n // Set content back to normale mode\n $this->booRefresh = true;\n\n $this->objData->setStep(1);\n $this->objData->setState(SyncCtoEnum::WORK_WORK);\n $this->objData->setHtml(\"\");\n\n try\n {\n switch ($this->intStep)\n {\n // Init Page \n case 1:\n $this->objData->setTitle($GLOBALS['TL_LANG']['MSC']['step'] . \" %s\");\n $this->objData->setDescription($GLOBALS['TL_LANG']['tl_syncCto_backup_db']['step1']);\n $this->objData->setState(SyncCtoEnum::WORK_WORK);\n\n $this->intStep++;\n break;\n\n // Run Dump\n case 2:\n if(!file_exists(TL_ROOT . '/' . SyncCtoHelper::getInstance()->standardizePath($GLOBALS['SYC_PATH']['db'])))\n {\n throw new Exception(sprintf($GLOBALS['TL_LANG']['ERR']['missing_file_folder'] , SyncCtoHelper::getInstance()->standardizePath($GLOBALS['SYC_PATH']['db'])));\n }\n \n $this->objStepPool->zipname = $this->objSyncCtoDatabase->runDump($this->arrBackupSettings['syncCto_BackupTables'], false, false);\n Dbafs::addResource(SyncCtoHelper::getInstance()->standardizePath($GLOBALS['SYC_PATH']['db'],$this->objStepPool->zipname));\n\n $this->intStep++;\n break;\n\n // Show last page\n case 3:\n $this->booFinished = true;\n $this->booRefresh = false;\n\n $this->objData->setStep(1);\n $this->objData->setState(SyncCtoEnum::WORK_OK);\n\n $strHTML = \"<p class='tl_help'><br />\";\n $strHTML .= \"<a onclick=\\\"Backend.openModalIframe({'width':600,'title':'\" . $this->objStepPool->zipname . \"','url':this.href,'height':216});return false\\\" href='contao/popup.php?src=\" . base64_encode($GLOBALS['TL_CONFIG']['uploadPath'] . \"/syncCto_backups/database/\" . $this->objStepPool->zipname) . \"'>\" . $GLOBALS['TL_LANG']['MSC']['fileDownload'] . \"</a>\";\n $strHTML .= \"</p>\";\n\n $this->objData->setStep(2);\n $this->objData->setTitle($GLOBALS['TL_LANG']['MSC']['complete']);\n $this->objData->setDescription($GLOBALS['TL_LANG']['tl_syncCto_backup_db']['complete'] . \" \" . $this->objStepPool->zipname);\n $this->objData->setHtml($strHTML);\n $this->objData->setState(SyncCtoEnum::WORK_OK);\n break;\n }\n }\n catch (Exception $exc)\n {\n $objErrTemplate = new BackendTemplate('be_syncCto_error');\n $objErrTemplate->strErrorMsg = $exc->getMessage();\n \n $this->booRefresh = false;\n $this->objData->setState(SyncCtoEnum::WORK_ERROR);\n $this->objData->setHtml($objErrTemplate->parse());\n }\n }", "title": "" }, { "docid": "acf65afded03cbeb2ec03b2931e17e5a", "score": "0.5954911", "text": "public function backupDB($post)\n {\n // start backup\n if(isset($post['form']) && $post['form']==\"backup\")\n {\n // check if tables are selected\n if(empty($post['table']))\n {\n throw new \\Exception(\"Please select a table.\",40000);\n }\n\n /** start backup **/\n $tables = array();\n $insert = array();\n $sql_statement = '';\n\n // lock tables\n foreach($post['table'] AS $table)\n {\n // Read table structure\n $res = DB::select('SHOW CREATE TABLE '.$table.'');\n $res = json_decode(json_encode($res[0]),true);\n\n $str = PHP_EOL.\"DROP TABLE IF EXISTS `$table`;\".PHP_EOL.$res[\"Create Table\"].\";\".PHP_EOL.PHP_EOL;\n\n array_push($tables, $str);\n\n // Read table \"inserts\"\n $sql = 'SELECT * FROM '.$table;\n\n $res = DB::select($sql);\n\n $sql_statement = PHP_EOL.PHP_EOL.\"---- Data Table `$table` --\".PHP_EOL.PHP_EOL;\n\n // start reading progress\n foreach ($res as $val){\n $sql_statement .= 'INSERT INTO `'.$table.'` (';\n\n $vars = get_object_vars($val);\n\n foreach ($vars as $k => $v) {\n $sql_statement .= \"`\".$k.\"`,\";\n }\n\n $sql_statement = rtrim($sql_statement,\",\");\n\n\n $sql_statement .= ') VALUES (';\n\n foreach ($vars as $k => $v) {\n\n if(gettype($v)==\"string\"){\n $sql_statement .= \"'\".$v.\"',\";\n }else if(gettype($v)==\"NULL\"){\n $sql_statement .= gettype($v).\",\";\n }else{\n $sql_statement .= $v.\",\";\n }\n\n }\n\n $sql_statement = rtrim($sql_statement,\",\");\n\n $sql_statement .= \");\".PHP_EOL;\n }\n\n // insert \"Inserts\" into an array if not exists\n if(!in_array($sql_statement, $insert))\n {\n array_push($insert, $sql_statement);\n unset($sql_statement);\n }\n\n unset($sql_statement);\n\n }\n\n // put table structure and inserts together in one var\n $this->struktur = array_combine($tables, $insert);\n\n // create full dump\n $this->createDUMP($this->struktur);\n\n // create zip file\n $this->createZIP();\n\n /** end backup **/\n return true;\n }\n }", "title": "" }, { "docid": "4ea0fc93cc141373ad6840dcac5b89c3", "score": "0.5941819", "text": "public function addBackup()\r\n {\r\n $dir = $this->getDirbackup();\r\n\r\n if (!$this->rjBackupAll) {\r\n $ignoreInsertTable = array(_DB_PREFIX_ . 'connections', _DB_PREFIX_ . 'connections_page', _DB_PREFIX_\r\n . 'connections_source', _DB_PREFIX_ . 'guest', _DB_PREFIX_ . 'statssearch',\r\n );\r\n } else {\r\n $ignoreInsertTable = array();\r\n }\r\n\r\n // Generate some random number, to make it extra hard to guess backup file names\r\n $rand = dechex(mt_rand(0, min(0xffffffff, mt_getrandmax())));\r\n $date = time();\r\n $backupfile = $dir . $date . '-' . $rand . '.sql';\r\n\r\n // Figure out what compression is available and open the file\r\n if (function_exists('bzopen')) {\r\n $backupfile .= '.bz2';\r\n $fp = @bzopen($backupfile, 'w');\r\n } elseif (function_exists('gzopen')) {\r\n $backupfile .= '.gz';\r\n $fp = @gzopen($backupfile, 'w');\r\n } else {\r\n $fp = @fopen($backupfile, 'wb');\r\n }\r\n\r\n if ($fp === false) {\r\n echo Context::getContext()->getTranslator()->trans('Unable to create backup file', array(), 'Admin.Advparameters.Notification') . ' \"' . addslashes($backupfile) . '\"';\r\n\r\n return false;\r\n }\r\n\r\n $this->id = realpath($backupfile);\r\n\r\n fwrite($fp, '/* Backup for ' . Tools::getHttpHost(false, false) . __PS_BASE_URI__ . \"\\n * at \" . date($date) . \"\\n */\\n\");\r\n fwrite($fp, \"\\n\" . 'SET NAMES \\'utf8\\';');\r\n fwrite($fp, \"\\n\" . 'SET FOREIGN_KEY_CHECKS = 0;');\r\n fwrite($fp, \"\\n\" . 'SET SESSION sql_mode = \\'\\';' . \"\\n\\n\");\r\n\r\n // Find all tables\r\n $tables = Db::getInstance()->executeS('SHOW TABLES');\r\n $found = 0;\r\n foreach ($tables as $table) {\r\n $table = current($table);\r\n\r\n // Skip tables which do not start with _DB_PREFIX_\r\n if (strlen($table) < strlen(_DB_PREFIX_) || strncmp($table, _DB_PREFIX_, strlen(_DB_PREFIX_)) != 0) {\r\n continue;\r\n }\r\n\r\n // Export the table schema\r\n $schema = Db::getInstance()->executeS('SHOW CREATE TABLE `' . $table . '`');\r\n\r\n if (count($schema) != 1 || !isset($schema[0]['Table']) || !isset($schema[0]['Create Table'])) {\r\n fclose($fp);\r\n $this->delete();\r\n echo Context::getContext()->getTranslator()->trans('An error occurred while backing up. Unable to obtain the schema of %s', array($table), 'Admin.Advparameters.Notification');\r\n\r\n return false;\r\n }\r\n\r\n fwrite($fp, '/* Scheme for table ' . $schema[0]['Table'] . \" */\\n\");\r\n\r\n if ($this->rjBackupDropTable) {\r\n fwrite($fp, 'DROP TABLE IF EXISTS `' . $schema[0]['Table'] . '`;' . \"\\n\");\r\n }\r\n\r\n fwrite($fp, $schema[0]['Create Table'] . \";\\n\\n\");\r\n\r\n if (!in_array($schema[0]['Table'], $ignoreInsertTable)) {\r\n $data = Db::getInstance()->query('SELECT * FROM `' . $schema[0]['Table'] . '`', false);\r\n $sizeof = Db::getInstance()->numRows();\r\n $lines = explode(\"\\n\", $schema[0]['Create Table']);\r\n\r\n if ($data && $sizeof > 0) {\r\n // Export the table data\r\n fwrite($fp, 'INSERT INTO `' . $schema[0]['Table'] . \"` VALUES\\n\");\r\n $i = 1;\r\n while ($row = Db::getInstance()->nextRow($data)) {\r\n $s = '(';\r\n\r\n foreach ($row as $field => $value) {\r\n $tmp = \"'\" . pSQL($value, true) . \"',\";\r\n if ($tmp != \"'',\") {\r\n $s .= $tmp;\r\n } else {\r\n foreach ($lines as $line) {\r\n if (strpos($line, '`' . $field . '`') !== false) {\r\n if (preg_match('/(.*NOT NULL.*)/Ui', $line)) {\r\n $s .= \"'',\";\r\n } else {\r\n $s .= 'NULL,';\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n $s = rtrim($s, ',');\r\n\r\n if ($i % 200 == 0 && $i < $sizeof) {\r\n $s .= \");\\nINSERT INTO `\" . $schema[0]['Table'] . \"` VALUES\\n\";\r\n } elseif ($i < $sizeof) {\r\n $s .= \"),\\n\";\r\n } else {\r\n $s .= \");\\n\";\r\n }\r\n\r\n fwrite($fp, $s);\r\n ++$i;\r\n }\r\n }\r\n }\r\n ++$found;\r\n }\r\n\r\n fclose($fp);\r\n if ($found == 0) {\r\n $this->delete();\r\n echo Context::getContext()->getTranslator()->trans('No valid tables were found to backup.', array(), 'Admin.Advparameters.Notification');\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "096b0c3e16e3ac224073b0fed7a53d3b", "score": "0.59309983", "text": "public function run()\n {\n $sql = file_get_contents(database_path() . '/sql-dump/transactions.sql');\n\n DB::statement($sql);\n }", "title": "" }, { "docid": "38cbca4ce7baf0cf1553574f4ebe4802", "score": "0.59277767", "text": "public function actionIndex()\n {\n /**\n * Check if the request has the proper API keys, deny access if not.\n */\n $this->checkIfAuthenticated();\n\n $backupService = new BackupService();\n $backupService->createDbBackup();\n }", "title": "" }, { "docid": "d540e6edaa402af376b2d572a02082bb", "score": "0.59258485", "text": "private function _backup(): bool\n {\n if (!$this->_shouldBackup()) {\n $this->stdout('Skipping database backup.' . PHP_EOL, Console::FG_GREY);\n return true;\n }\n\n $this->stdout('Backing up the database ... ', Console::FG_YELLOW);\n\n try {\n $this->_backupPath = Craft::$app->getDb()->backup();\n } catch (\\Throwable $e) {\n $this->stdout('error: ' . $e->getMessage() . PHP_EOL, Console::FG_RED);\n\n if (!$this->_backupWarning()) {\n $this->stderr('Aborting update.' . PHP_EOL . PHP_EOL, Console::FG_RED);\n return false;\n }\n\n return true;\n }\n\n $this->stdout('done' . PHP_EOL, Console::FG_GREEN);\n return true;\n }", "title": "" }, { "docid": "bd938dcfa0d423bcefdfc3808adf6aae", "score": "0.58874255", "text": "public function backupGet()\n {\n $this->terminusExec('backup:create', [self::SITENAME . '.dev'], ['element', 'db']);\n $this->terminusExec('backup:get', [self::SITENAME . '.dev'], ['to', self::DUMP_FILE]);\n }", "title": "" }, { "docid": "cb231fbd703c6e39416948429bb789b2", "score": "0.5887079", "text": "public function onCreateBackup()\n {\n try\n {\n $this->vars['backupSteps'] = $this->buildBackupSteps(post('only_db'));\n\n } catch (Exception $ex)\n {\n $this->handleError($ex);\n }\n\n return $this->makePartial('execute');\n }", "title": "" }, { "docid": "184e28146185ce8a7267a6e32849f8f6", "score": "0.5861898", "text": "function __backupDatabaseNow()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n // Load the DB utility class\n $this->load->dbutil();\n\n $next = true;\n\n //backup the database\n if ($next) {\n\n // Backup entire database and assign it to a variable\n $backup = &$this->dbutil->backup();\n\n //generate a filename from the current date-time\n $filename = date('m-d-Y_H-m-s');\n $filepath = FILES_DATABASE_BACKUP_FOLDER . $filename . '.gz';\n\n // Load the file helper and write the file to the server\n write_file($filepath, $backup);\n\n //check if we mnaged to create the file\n if (!file_exists($filepath)) {\n //log this error\n log_message('error', 'AJAX-LOG:: [FILE: ' . __file__ . '] [FUNCTION: ' . __function__ . '] [LINE: ' . __line__ . \"] [MESSAGE: Backing up database failed. Unable to save file ($filepath)]\");\n\n //halt\n $next = false;\n }\n\n }\n\n if ($next) {\n\n //json output\n $this->jsondata = array(\n 'result' => 'success',\n 'message' => $this->data['lang']['lang_backup_complete_page_will_now_reload'],\n 'debug_line' => __line__);\n\n //send headers\n header('HTTP/1.0 200 OK', true, 200);\n\n } else {\n\n //json output\n $this->jsondata = array(\n 'result' => 'failed',\n 'message' => $this->data['lang']['lang_request_could_not_be_completed'],\n 'debug_line' => __line__);\n\n //send headers\n header('HTTP/1.0 400 Bad Request', true, 400);\n }\n\n //log debug data\n $this->__ajaxdebugging();\n\n //load the view for json echo\n $this->__flmView('common/json');\n }", "title": "" }, { "docid": "bd1501fb8d52a68c5dafc994278c9525", "score": "0.5856052", "text": "function generateDatabaseBackup($con){\n\t\t$tables = array();\n\t\t$result = mysqli_query($con,\"SHOW TABLES\");\n\t\twhile($row = mysqli_fetch_row($result)){\n\t\t\t$tables[] = $row[0];\n\t\t}\n\t\t$return = '';\n\t\tforeach($tables as $table){\n\t\t\t$result = mysqli_query($con,\"SELECT * FROM \".$table);\n\t\t\t$num_fields = mysqli_num_fields($result);\n\t\t \n\t\t\t$return .= 'DROP TABLE '.$table.';';\n\t\t\t$row2 = mysqli_fetch_row(mysqli_query($con,\"SHOW CREATE TABLE \".$table));\n\t\t\t$return .= \"\\n\".$row2[1].\";\\n\";\n\t\t \n\t\t\tfor($i=0;$i<$num_fields;$i++){\n\t\t\t\twhile($row = mysqli_fetch_row($result)){\n\t\t\t\t\t$return .= \"INSERT INTO \".$table.\" VALUES(\";\n\t\t\t\t\tfor($j=0;$j<$num_fields;$j++){\n\t\t\t\t\t\t$row[$j] = addslashes($row[$j]);\n\t\t\t\t\t\tif(isset($row[$j])){ $return .= '\"'.$row[$j].'\"';}\n\t\t\t\t\t\telse{ $return .= '\"\"';}\n\t\t\t\t\t\tif($j<$num_fields-1){ $return .= ',';}\n\t\t\t\t\t}\n\t\t\t\t$return .= \");\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= \"\\n\";\n\t\t}\n\t\t\n\t\t$filename = \"backup\".DS.getID('db').\".sql\";\n\t\t$handle = fopen($filename,\"w+\");\n\t\tfwrite($handle,$return);\n\t\tfclose($handle);\n\t\treturn $filename;\n}", "title": "" }, { "docid": "b573c87346f879f6903e93ddfaf5ef33", "score": "0.5851627", "text": "function back_db1($host,$user,$pass,$dataname){\n $validador=$this->vali_db($host,$user,$pass,$dataname);\n if($validador){\n $link = mysql_connect($host,$user,$pass) or die(\"Can't Connect to the Data Base...\");\n echo \"\\nprocessing!!\\n\";\n if (count($dataname)>1){\n for ($i=0;$i<count($dataname);$i++){\n $db_name=$dataname[$i];\n echo \"\\n\".$db_name;\n $status2=new Clase_Backup_Database;\n $valor_retorno=$status2->Backup_Database($host,$user,$pass,$db_name);\n if($valor_retorno){\n $status = $status2->backupTables(\"*\") ? 'OK' : 'KO';\n echo \"\\nBackup successful $status !!!!!\\nverify all the information in dbbackup folder!\\n\";\n }\n }\n }\n else {\n $status2=new Clase_Backup_Database;\n $db_name=$dataname[0];\n echo \"\\n\".$db_name;\n $valor_retorno=$status2->Backup_Database($host,$user,$pass,$db_name);\n if($valor_retorno){\n $status = $status2->backupTables(\"*\") ? 'OK' : 'KO';\n echo \"\\nBackup successful $status !!!!!\\nverify all the information in dbbackup folder!\\n\";\n }\n } \n }\n else { \n echo \"\\nOne of the Data Bases doesn't exist!\\nplease reconnect to the server and review the name of the available databases!\\n\";\n echo \"-------------------------------------------------------------------------------\\n\";\n $this->lista_db();\n } \n}", "title": "" }, { "docid": "f94d8be4cabd5fd216a3a86d33ffdf2d", "score": "0.5841238", "text": "function backup() {\n\t\tglobal $database;\n\t\t$query = \"DROP TABLE IF EXISTS #__joomap_backup\";\t\t\t\t\t\t// remove old backup\n\t\t$database->setQuery( $query );\n\t\tif( $database->query() === FALSE ) {\n\t\t\techo _JOOMAP_ERR_NO_PREV_BU . \"<br />\\n\";\n\t\t\techo mosStripslashes($database->getErrorMsg());\n\t\t}\n\n\t\t$query = \"CREATE TABLE #__joomap_backup SELECT * FROM #__joomap\";\t\t// backup current settings\n\t\t$database->setQuery( $query );\n\t\tif( $database->query() === FALSE ) {\n\t\t\techo _JOOMAP_ERR_NO_BACKUP . \"<br />\\n\";\n\t\t\techo mosStripslashes($database->getErrorMsg());\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ebd77962011080df4cbf0573ce6b8252", "score": "0.58183515", "text": "public function start_midrub_backup() {\n \n // Backup\n (new MidrubBaseAdminCollectionUpdateHelpers\\Midrub)->start_backup();\n \n }", "title": "" }, { "docid": "4bc0c06226c34e11dcbd26dd698ac666", "score": "0.581604", "text": "public function handle()\n {\n $ds = DIRECTORY_SEPARATOR;\n $host = env('DB_HOST');\n $username = env('DB_USERNAME');\n $password = env('DB_PASSWORD');\n $database = env('DB_DATABASE');\n $path = database_path('backups' . $ds);\n $file = 'bd' . date('_Ymd_Hmi') . '.sql';\n if (!is_dir($path)) {\n mkdir($path, 0755, true);\n }\n $this->line('<fg=cyan>Backup: </><fg=yellow;bg=black>'. $path . $file . '</>');\n # Generamos el comando con mysqldump para exportar los datos\n// $command = sprintf(\n// 'mysqldump --skip-comments --skip-compact --no-create-info'\n// . ' --skip-triggers --complete-insert --skip-add-locks'\n// . ' --disable-keys --lock-tables --host=\"%s\" --user=\"%s\" '\n// , $host, $username\n// );\n $command = sprintf(\n 'mysqldump --host=\"%s\" --user=\"%s\" ' , $host, $username\n );\n if (!empty($password)) {\n $command .= sprintf('--password=\"%s\" ', $password);\n }\n $command .= sprintf('%s > \"%s\"', $database, $path . $file);\n //$this->line('<fg=green>CMD: </><fg=yellow;bg=black>'. $command . '</>');\n exec($command, $output, $return);\n if ($return) {\n $this->line('<fg=red;bg=yellow>Error al intentar generar el Backup</>');\n if (file_exists($path . $ds . $file)) {\n unlink($path . $ds . $file);\n }\n return; // error\n }\n // Comprimiendo el archivo:\n // mayor info: https://www.php.net/manual/es/function.gzopen.php\n // Open the gz file (w9 is the highest compression)\n $fileCompress = gzopen ($path . $ds . $file . '.gz', 'w9');\n // Compress the file\n gzwrite ($fileCompress, file_get_contents($path . $ds . $file));\n // Close the gz file and we are done\n gzclose($fileCompress);\n // Generando el esquema\n $path = database_path('backups' . $ds . 'schemas'. $ds);\n $file = 'schema.sql';\n if (!is_dir($path)) {\n mkdir($path, 0755, true);\n }\n # Generamos el comando con mysqldump para exportar la estructura\n $command = sprintf(\n 'mysqldump --skip-comments --skip-compact '\n . ' --no-data --host=\"%s\" --user=\"%s\" '\n , $host, $username\n );\n if (!empty($password)) {\n $command .= sprintf('--password=\"%s\" ', $password);\n }\n $command .= sprintf(\n '%s | sed \"s/ AUTO_INCREMENT=[0-9]*//g\" > \"%s\"',\n $database, $path . $file\n );\n $this->line('<fg=magenta>Generando Schema</>');\n exec($command, $output, $return);\n if ($return) {\n $this->line('<fg=red;bg=yellow>Error al intentar generar el Schema</>');\n if (file_exists($path . $ds . $file)) {\n unlink($path . $ds . $file);\n }\n return; // error\n }\n }", "title": "" }, { "docid": "9e059110c3932fbe72c814bdbba0cc36", "score": "0.580658", "text": "function backupSystem(){\n #Zip(getcwd());\n EXPORT_DATABASE($host = 'db760412577.hosting-data.io',$user = 'dbo760412577',$pass = 'eOYeGfetXFXHJfGZqkTv',$name = 'db760412577',$tables=false, $backup_name=false);\n \n $msg = \"Relax!\\nYour website was successfully backed up\";\n\n // use wordwrap() if lines are longer than 70 characters\n $msg = wordwrap($msg,70);\n\n // send email\n mail(\"[email protected]\",\"Backup Notification\",$msg);\n }", "title": "" }, { "docid": "54271fd591372f8c44cd9e6aa877af83", "score": "0.57784647", "text": "function get_db() {\n backup_migrate_include('destinations', 'files', 'filters', 'profiles');\n\n $file = new backup_file();\n // Clone the default settings so we can make changes without them leaking out of this function.\n $settings = clone _backup_migrate_profile_saved_default_profile();\n $settings->source_id = 'db';\n $settings->filters['compression'] = 'none';\n\n // Execute the backup on the db with the default settings.\n $file = backup_migrate_filters_backup($file, $settings);\n\n // Generate a tmp file with the correct final title (because ArchiveTar doesn't seem to allow renaming).\n $tmpdir = backup_migrate_temp_directory();\n $filepath = $tmpdir . '/database.sql';\n rename($file->filepath(), $filepath);\n\n return $filepath;\n }", "title": "" }, { "docid": "3cd9520ba6fd4db05cf0aee908ffae4f", "score": "0.57772106", "text": "public function export_to_file(){\r\n $command='mysqldump --opt -h' . DatabaseHost .' -u' . DatabaseUser .' -p' . DatabasePassword .' ' . DatabaseName .' > ' . AppPath . 'upload/buffer/database.sql';\r\n //run mysqldump program\r\n exec($command,$output=array(),$result);\r\n return $result;\r\n}", "title": "" }, { "docid": "887ab5f97f50c31f58cd2864f93343f7", "score": "0.5766658", "text": "public function list_dbs_backup(){\n $input=array(\n 'module' => 'MysqlFE',\n 'function' => 'listdbsbackup'\n );\n $query=$this->build_query($input);\n $raw=$this->query($query);\n $ob=json_decode($raw, false);\n return $status=$ob->cpanelresult->data;\n }", "title": "" }, { "docid": "3c10693489c8b4221ede5bde374d0984", "score": "0.5759603", "text": "private function backup($destination)\n {\n $this->writeln('Laxative: Backing up your local database to: ' . $this->_backupPath . '...');\n\n $this->dumpCommand($destination);\n\n $this->writeln('Done.');\n\n }", "title": "" }, { "docid": "46ea46ead15ea108f217278c124d7733", "score": "0.57582706", "text": "function backupDBs($hostname, $username, $password, $prefix, $post_backup_query = '') {\n global $DATE, $oss, $mysql_backup_options;\n \n\tif (schedule == \"hourly\") deleteHourlyBackups($prefix);\n \n // Connecting, selecting database\n $link = mysql_connect($hostname, $username, $password) or die('Could not connect: ' . mysql_error());\n \n $query = 'SHOW DATABASES';\n $result = mysql_query($query) or die('Query failed: ' . mysql_error());\n \n $databases = array();\n \n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n foreach ($row as $database) {\n $databases[] = $database;\n }\n }\n \n // Free resultset\n mysql_free_result($result);\n\n //Run backups on each DB found\n foreach ($databases as $database) {\n backupDB($hostname, $username, $password, $database, $prefix, $post_backup_query = '');\n }\n \n //Run post backup queries if needed\n if ($post_backup_query != '') {\n $result = mysql_query($post_backup_query) or die('Query failed: ' . mysql_error());\n }\n \n // Closing connection\n mysql_close($link);\n \n}", "title": "" }, { "docid": "f771b890661182c7ec71bd88bffe22e9", "score": "0.57533026", "text": "function backup_db(){\n$allTables = array();\n$result = mysql_query('SHOW TABLES');\nwhile($row = mysql_fetch_row($result)){\n $allTables[] = $row[0];\n}\n$return = '';\nforeach($allTables as $table){\n$result = mysql_query('SELECT * FROM '.$table);\n$num_fields = mysql_num_fields($result);\n\n$return.= 'DROP TABLE IF EXISTS '.$table.';';\n$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table));\n$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n\nfor ($i = 0; $i < $num_fields; $i++) {\nwhile($row = mysql_fetch_row($result)){\n $return.= 'INSERT INTO '.$table.' VALUES(';\n for($j=0; $j<$num_fields; $j++){\n $row[$j] = addslashes($row[$j]);\n $row[$j] = str_replace(\"\\n\",\"\\\\n\",$row[$j]);\n if (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; } \n else { $return.= '\"\"'; }\n if ($j<($num_fields-1)) { $return.= ','; }\n }\n $return.= \");\\n\";\n}\n}\n$return.=\"\\n\\n\";\n}\n\n// Create Backup Folder\n$folder = 'backup/';\nif (!is_dir($folder))\nmkdir($folder, 0777, true);\nchmod($folder, 0777);\n\n$date = date('m-d-Y-H-i-s', $_SERVER['REQUEST_TIME']); \n$filename = $folder.\"db-backup-\".$date; \n\n$handle = fopen($filename.'.sql','w+');\nfwrite($handle,$return);\nfclose($handle);\n$z = new ZipArchive(); \n $z->open($filename . '.zip', ZIPARCHIVE::CREATE); \n $z->addFile($filename . '.sql');\n $z->close(); \n\tunlink($filename . '.sql');\n}", "title": "" }, { "docid": "1e16b1d5062dbd685f12a7d478529bb3", "score": "0.574999", "text": "function backup_db(){\n$allTables = array();\n$result = mysql_query('SHOW TABLES');\nwhile($row = mysql_fetch_row($result)){\n $allTables[] = $row[0];\n}\n $return = \"\";\nforeach($allTables as $table){\n$result = mysql_query('SELECT * FROM '.$table);\n$num_fields = mysql_num_fields($result);\n \n$return.= 'DROP TABLE IF EXISTS '.$table.';';\n$row2 = mysql_fetch_row(mysql_query('SHOW CREATE TABLE '.$table));\n$return.= \"\\n\\n\".$row2[1].\";\\n\\n\";\n \nfor ($i = 0; $i < $num_fields; $i++) {\nwhile($row = mysql_fetch_row($result)){\n $return.= 'INSERT INTO '.$table.' VALUES(';\n for($j=0; $j<$num_fields; $j++){\n $row[$j] = addslashes($row[$j]);\n $row[$j] = str_replace(\"\\n\",\"\\\\n\",$row[$j]);\n if (isset($row[$j])) { $return.= '\"'.$row[$j].'\"' ; }\n else { $return.= '\"\"'; }\n if ($j<($num_fields-1)) { $return.= ','; }\n }\n $return.= \");\\n\";\n}\n}\n$return.=\"\\n\\n\";\n}\n \n// Tao Backup Folder\n$folder = 'DB_Backup/';\nif (!is_dir($folder))\nmkdir($folder, 0777, true);\nchmod($folder, 0777);\n \n$date = date('m-d-Y-H-i-s', time());\n$filename = $folder.\"db-backup-\".$date;\n \n$handle = fopen($filename.'.sql','w+');\nfwrite($handle,$return);\nfclose($handle);\n\n//mở file để đọc với chế độ nhị phân (binary)\n$fp = fopen($filename.'.sql', \"rb\");\n \n//gởi header đến cho browser\nheader('Content-type: application/octet-stream');\nheader('Content-disposition: attachment; filename=\"VIETTRADE-'.$filename.'.sql\"');\nheader('Content-length: ' . filesize($filename.'.sql'));\n \n//đọc file và trả dữ liệu về cho browser\nfpassthru($fp);\nfclose($fp);\n\nunlink($filename.'.sql');\n \n\n}", "title": "" }, { "docid": "8076cb4fbebbb6a43c01544d0a0222a8", "score": "0.573263", "text": "public function create()\n {\n $backup = $this->dbutil->backup(['format'=>'zip']);\n\n // Load the file helper and write the file to your server\n //$this->load->helper('file');\n //write_file('/assets/backup/mybackup.zip', $backup);\n\n // Load the download helper and send the file to your desktop\n $this->load->helper('download');\n $this->applog->write(['nokp'=>$this->appsess->getSessionData('username'),'event'=>'Melakukan backup keseluruhan pangkalan data']);\n force_download('espel_backup_' . time() . '.zip', $backup);\n }", "title": "" }, { "docid": "1519001b91c3b040c957faf14eb1424e", "score": "0.5727941", "text": "public function dbAction() {\n\t\terror_reporting(E_ALL);\n\t\tini_set('display_errors', '1');\n\t\t$this->_helper->layout()->disableLayout();\n\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t\t$instanceId = $this->getRequest()->getParam(0);\n\t\tif ($instanceId) {\n\t\t\t$instance = R::load('instance', $instanceId);\n\t\t}\n\t\tif ($instanceId && $instance->id !== 0) {\n\t\t\t$server = $instance->server;\n\t\t\tif (isset($instance->box()->host)) {\n\t\t\t\t$host = $instance->box()->host;\n\t\t\t} elseif (isset($server->host)) {\n\t\t\t\t$host = $server->host;\n\t\t\t} else {\n\t\t\t\t$host = null;\n\t\t\t}\n\n\t\t\tif (isset($instance->box()->databaseName)) {\n\t\t\t\t$user = $instance->box()->databaseName;\n\t\t\t} else {\n\t\t\t\t$user = null;\n\t\t\t}\n\n\t\t\tif (isset($instance->box()->databasePassword)) {\n\t\t\t\t$password = $instance->box()->databasePassword;\n\t\t\t} else {\n\t\t\t\t$password = null;\n\t\t\t}\n\n\t\t\t$dsn = 'mysql:host=' . $host . ';dbname=' . $user;\n\t\t\ttry {\n\t\t\t\t$db = new PDO($dsn, $user, $password);\n\t\t\t\t$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\t$dbhash = shell_exec('mysqldump -h ' . $host . ' -u' . $user . ' -p' . $password . ' --database ' . $user . ' -d --compact | sha1sum | awk \\'{ print $1 }\\'');\n\t\t\t} catch (PDOException $e) {\n\t\t\t\t$dbhash = '';\n\t\t\t}\n\t\t\t$instance = R::load('instance', $instance->id);\n\t\t\t$instance->dbhash = $dbhash;\n\t\t\tR::store($instance);\n\t\t}\n\t}", "title": "" }, { "docid": "9e411fec8dff517b2b2a29f4ccb69ce0", "score": "0.5720551", "text": "public function restoringBackupSQLFull_Plain($backupFilePath) {\n if (file_exists($backupFilePath)) {\n //echo \"The file $filename exists\";\n } else {\n return \"The file $backupFilePath does not exist\";\n }\n\n $em = $this->getDoctrine()->getManager();\n\n //1 admininstrator user + 8 tests users = 9 users\n $users = $em->getRepository(User::class)->findAll();\n echo \"users=\".count($users).\"<br>\";\n if( count($users) > 9 ) {\n //return \"Exit: Users are already populated in DB, therefore DB is not empty.\";\n }\n //exit('111');\n\n //check if db compatable with filename\n $userServiceUtil = $this->container->get('user_service_utility');\n $dbInfo = $userServiceUtil->getDbVersion(); //PostgreSQL 14.3, compiled by Visual C++ build 1914, 64-bit\n $dbInfoLower = strtolower($dbInfo);\n echo \"$dbInfoLower=\".$dbInfoLower.\"<br>\";\n if( str_contains($dbInfoLower, 'postgresql') === false ) {\n return \"File \".$filename. \" is not compatable with current database \" . $dbInfo;\n }\n\n $memory_limit = ini_get('memory_limit');\n echo \"Current memory limit is: \" . $memory_limit . \"<br>\";\n echo \"Peak memory usage: \" . memory_get_peak_usage() . \"<br>\";\n ini_set('memory_limit', '-1');\n ini_set('max_execution_time', '-1');\n $memory_limit = ini_get('memory_limit');\n echo \"memory_limit: \" . $memory_limit . \"<br>\";\n $max_execution_time = ini_get('max_execution_time');\n echo \"max_execution_time: \" . $max_execution_time . \"<br>\";\n //exit('111');\n\n //1) drop current DB\n if(0) {\n $logger = $this->container->get('logger');\n $userServiceUtil = $this->container->get('user_service_utility');\n $phpPath = $userServiceUtil->getPhpPath();\n $projectRoot = $this->container->get('kernel')->getProjectDir();\n\n //drop existing DB: php bin/console doctrine:database:drop --force\n if (0) {\n //request.CRITICAL: Uncaught PHP Exception\n // Symfony\\Component\\Process\\Exception\\ProcessFailedException:\n // \"The command \"/opt/remi/php82/root/usr/bin/php\n // /opt/order-lab/orderflex/bin/console doctrine:database:drop --force\" failed.\n // Exit Code: 1(General error) Working directory: /opt/order-lab/orderflex/public\n // Output: ================ Could not drop database \"ScanOrderTest\"\n // for connection named default An exception occurred while executing\n // a query: SQLSTATE[55006]: Object in use: 7 ERROR: database \"ScanOrderTest\"\n // is being accessed by other users DETAIL: There is 1 other session using the database.\n //$drop = $phpPath . ' ' . $projectRoot . '/bin/console doctrine:database:drop --force --verbose';\n $drop = $phpPath . ' ' . $projectRoot . '/bin/console doctrine:schema:drop --full-database --force --verbose';\n $logger->notice(\"drop command=[\" . $drop . \"]\");\n $res = $this->runProcess($drop);\n echo \"drop res=\" . $res . \"<br>\";\n $logger->notice(\"drop res=\".$res);\n } else {\n //DROP DATABASE db_name WITH (FORCE)\n echo \"Start drop DB <br>\";\n $sqlDrop = 'DROP DATABASE ' . $dbname . ' WITH (FORCE)';\n $em->getConnection()->exec($sqlDrop); // Execute native SQL\n $em->flush();\n }\n }\n\n echo \"Start restore. Read file: \" . $backupFilePath . \"<br>\";\n $sql = file_get_contents($backupFilePath); // Read file contents\n\n echo \"Start restore: exec dql from file: \" . $backupFilePath . \"<br>\";\n $em->getConnection()->exec($sql); // Execute native SQL\n\n $em->flush();\n\n //exit(\"generateAntibodyList: Finished\");\n return true;\n }", "title": "" }, { "docid": "59521efa00e87733b2fa1565fb557827", "score": "0.57095045", "text": "protected function createZIP()\n {\n\n // Set permissions to 777\n $basedir = base_path().\"/backup/\";\n\n if(!is_dir($basedir)){\n mkdir($basedir);\n }\n\n chmod($basedir, 0777);\n\n\n // create zip file\n //$zip = new \\ZipArchive();\n // Create file name\n $this->filename = $basedir.env(\"DB_DATABASE\").\"-\".date(\"YmdH_i_s\").\".sql\";\n\n // Checking if file could be created\n /*if ($zip->open($this->filename, ZIPARCHIVE::CREATE)!==TRUE) {\n throw new \\Exception(\"cannot open <\".$this->filename.\">\\n\");\n }\n\n // add mysql dump to zip file\n $zip->addFromString(\"dump.sql\", $this->dump);\n // close file\n $zip->close();*/\n file_put_contents($this->filename,$this->dump);\n // Check whether file has been created\n if(!file_exists($this->filename))\n {\n throw new \\Exception(\"The sql file could not be created.\");\n }\n\n }", "title": "" }, { "docid": "abe5bfc061917cc40547a2c0c4be82d3", "score": "0.5708882", "text": "public function schedule_backups() {\n global $CFG, $SHAREDB;\n\n $events = $SHAREDB->get_records('rollovers', array(\n 'status' => \\local_rollover\\Rollover::STATUS_WAITING_SCHEDULE,\n 'from_env' => $CFG->kent->environment,\n 'from_dist' => $CFG->kent->distribution\n ));\n\n // All of these need to be backed up.\n foreach ($events as $event) {\n $task = new \\local_rollover\\task\\backup();\n $task->set_custom_data(array(\n 'id' => $event->id\n ));\n\n $event->status = \\local_rollover\\Rollover::STATUS_SCHEDULED;\n $SHAREDB->update_record('rollovers', $event);\n\n \\core\\task\\manager::queue_adhoc_task($task);\n }\n }", "title": "" }, { "docid": "397e4f49ecd3ef889d403bb92984de67", "score": "0.5690227", "text": "public function exec()\n {\n echo '数据库存储成功!';\n echo '<hr />';\n }", "title": "" }, { "docid": "266f865f4f51b9545414849a157ef9b4", "score": "0.5683052", "text": "function database_update(){\r\n if(app::in_development()){\r\n $path = app::prependRootFolder(\"app/data-dump/ohome.sql\");\r\n app::update_database($path);\r\n }else{\r\n app::abort();\r\n }\r\n}", "title": "" }, { "docid": "3002e49a20b2bbf283e3fd2446c7f1e5", "score": "0.5682203", "text": "public function run()\n {\n\t\t// Note: these dump files must be generated with DELETE (or TRUNCATE) + INSERT statements\n \t$sql = file_get_contents(__DIR__ . '/../../airports.sql');\n\n // split the statements, so DB::statement can execute them.\n \t$statements = array_filter(array_map('trim', explode(';', $sql)));\n\n \tforeach ($statements as $stmt) {\n \t\tDB::statement($stmt);\n \t}\n }", "title": "" }, { "docid": "cbea876c692aeb029d3b4ed2069e546d", "score": "0.5663378", "text": "public function create()\n {\n try{\n Artisan::call('backup:database');\n Toastr::success('New database backup has been created', 'Backup Done!!');\n return back();\n }catch(\\Exception $e){\n\n \\LogActivity::errorLog($e->getMessage());\n Toastr::error('Something happend Wrong!', 'Error!!');\n return back();\n }\n }", "title": "" }, { "docid": "1a7366e61b411f35c9772f1f3892bf26", "score": "0.5649388", "text": "public function handle()\n {\n // $date = Carbon::now()->format('Y-m-d_h-i');\n // $this->info($date);\n // $user = env('DB_USERNAME');\n // $password = env('DB_PASSWORD');\n // $database = env('DB_DATABASE');\n\n // $command = \"mysqldump --user={$user} -p{$password} {$database} > {$date}.sql\";\n // $this->info($command);\n // $process = new Process($command);\n // $process->start();\n\n // while($process->isRunning()){\n // $s3 = Storage::disk('local');\n // $s3->put('backups/'.$date.\".sql\", file_get_contents(\"{$date}.sql\"));\n // unlink(\"{$date}.sql\");\n // }\n\n try {\n $filename = Carbon::now()->format('Y-m-d_h-i') . '.sql';\n $this->process = new Process(sprintf(\n 'mysqldump -u%s -p%s %s > %s',\n config('database.connections.mysql.username'),\n config('database.connections.mysql.password'),\n config('database.connections.mysql.database'),\n storage_path(\"app/backups/{$filename}\")\n ));\n\n if (!File::exists(storage_path() . \"/app/backups\")) {\n File::makeDirectory(storage_path() . '/app/backups');\n }\n\n $this->process->mustRun();\n\n $data = array(\n 'destinatario' => '[email protected]',\n 'asunto' => 'Backup perficon ' . Carbon::now()->format('d-m-Y'),\n 'mensaje' => 'Se envia adjunto el backup de la BD Perficon.',\n 'url' => \"app/backups/{$filename}\"\n );\n Mail::send(new SendMail($data));\n\n if (File::exists(storage_path() . \"/app/backups/{$filename}\")) {\n File::delete(storage_path() . \"/app/backups/{$filename}\");\n }\n $this->info('The backup has been proceed successfully.');\n } catch (ProcessFailedException $exception) {\n $this->error('The backup process has been failed.');\n }\n }", "title": "" }, { "docid": "fe7382764cf166f94665f5fed8fc6e83", "score": "0.56436574", "text": "public function run()\n {\n DB::table('applications')->truncate();\n\n $application = new Application;\n $application->name = 'Demo';\n $application->api_key = 'demo';\n $application->save();\n }", "title": "" }, { "docid": "e96da60ba5e5cc60f0ecf490dae54bbd", "score": "0.56224144", "text": "#[Route(path: '/list/generate-cron-jobs/dbbackup', name: 'user_generate_cron_dbbackup', methods: ['GET'])]\n public function generateDbBackupCronAction(Request $request)\n {\n if( false === $this->isGranted('ROLE_PLATFORM_DEPUTY_ADMIN') ) {\n return $this->redirect( $this->generateUrl($this->getParameter('employees.sitename').'-nopermission') );\n }\n\n $userServiceUtil = $this->container->get('user_service_utility');\n\n //add ExternalUrlMonitor: view-test monitors view\n $res = $userServiceUtil->createDbBackupCronLinux();\n\n $this->addFlash(\n 'notice',\n $res\n );\n\n return $this->redirect($this->generateUrl('employees_data_backup_management'));\n }", "title": "" }, { "docid": "ca43f6f2f10e93e54364b6f19dcd3487", "score": "0.56217873", "text": "public static function fullBackup() {\n\n $ext = '.zip';\n \n $backup_file = 'full-backup-' . str_replace('.','', utility::getVersion()) . $ext;\n \n // remove the old backup\n if (file_exists(DIR_FS_WORK . 'updates/' . $backup_file)) unlink(DIR_FS_WORK . 'updates/' . $backup_file);\n \n // create full file backup\n if (utility::execEnabled() === true && utility::isLinux() === true) {\n try {\n //exec(CFG_APP_ZIP . ' -r ' . DIR_FS_WORK . 'updates/' . $backup_file . ' ' . DIR_FS_CATALOG . '* -x \\*.zip\\*');\n exec(CFG_APP_ZIP . ' -r ' . DIR_FS_WORK . 'updates/' . $backup_file . ' ' . DIR_FS_CATALOG . '* -x \"' . DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/*\" -x \"*.cache\" -x \"*.zip\" -x \"php_error*\" -x \"*.gif\" -x \"*.jpg\" -x \"*.jpeg\" -x \"*.png\" -x \"*.sql\" -x \"*.tgz\" -x \"*.tar\" -x \"*.gz\"');\n } catch ( Exception $e ) { \n return array('rpcStatus' => 0);\n } \n return array('rpcStatus' => 1);\n \n } else if (extension_loaded('zip')) {\n try {\n self::_makeZip(DIR_FS_CATALOG, DIR_FS_WORK . 'updates/' . $backup_file); \n } catch ( Exception $e ) { \n return array('rpcStatus' => 0);\n } \n \n return array('rpcStatus' => 1);\n \n } else { \n return array('rpcStatus' => -1);\n }\n }", "title": "" }, { "docid": "69c1fc62fd3e3e2adbe0ed64ccaf0599", "score": "0.5621582", "text": "function backup() {\n $dataArray = $_POST['table'];\n $filename = $_POST['filename'] ? $_POST['filename'] : 'Backup' . date('Y-m-d-H');\n $mysql = '';\n foreach ($dataArray as $v) {\n $table = TABLE_PREFIX . '_' . $v;\n $q2 = mysql_query(\"show create table `$table`\");\n $sql = mysql_fetch_array($q2);\n $mysql .= $sql['Create Table'] . \";\\r\\n\";\n $q3 = mysql_query(\"select * from `$table`\");\n while ($data = mysql_fetch_assoc($q3)) {\n $keys = array_keys($data);\n $keys = array_map('addslashes', $keys);\n $keys = join('`,`', $keys);\n $keys = \"`\" . $keys . \"`\";\n $vals = array_values($data);\n $vals = array_map('addslashes', $vals);\n $vals = join(\"','\", $vals);\n $vals = \"'\" . $vals . \"'\";\n $mysql .= \"insert into `$table`($keys) values($vals);\\r\\n\";\n }\n }\n $filename = 'Backup/' . iconv('UTF-8', 'GBK', $filename) . \".sql\";\n file_put_contents(ROOT_PATH . $filename, $mysql);\n return iconv('GBK', 'UTF-8', $filename);\n }", "title": "" }, { "docid": "01ec9deec7bd1728f799bcac9d6eefc1", "score": "0.5605215", "text": "public function backup() {\n \n if ($this->session->userdata('validated')) {\n \n /*captura variables*/\n $pass = $this->input->post('pass');\n $typeBackup = $this->input->post('db_backup');\n \n $validateLogin = $this->MPrincipal->login_verify($this->session->userdata('userid'),$pass);\n \n if ($validateLogin != FALSE){\n \n if ($typeBackup == 1) { /*BD Aplicacion*/\n \n // Load the DB utility class\n $this->load->dbutil();\n // Backup your entire database and assign it to a variable\n $backup = $this->dbutil->backup();\n // Load the download helper and send the file to your desktop\n $this->load->helper('download');\n force_download('freya-'.date('Ymd-His').'.gz', $backup);\n \n } else {\n \n if ($typeBackup == 2){ /*BD Auditoria*/\n \n // Load the DB utility class\n $this->load->dbutil();\n /*Carga Auditoria BD*/\n $this->db = $this->MAuditoria->db_set_audit();\n // Backup your entire database and assign it to a variable\n $backup_aud = $this->dbutil->backup();\n // Load the download helper and send the file to your desktop\n $this->load->helper('download');\n force_download('auditoria_freya-'.date('Ymd-His').'.gz', $backup_aud);\n \n }\n \n }\n \n $info['message'] = 'Se genero el backup de datos exitosamente. Por favor elija la ubicacion en la USB y guardelo.';\n $info['alert'] = 1;\n $this->module($info);\n \n } else {\n \n $info['message'] = 'La contraseña ingresada no es correcta.';\n $info['alert'] = 2;\n $this->module($info);\n \n }\n \n } else {\n \n show_404();\n \n }\n \n }", "title": "" }, { "docid": "42cd5c3f8ff2a29345d0b231906a2c67", "score": "0.5598677", "text": "public function restaurarBackup($arquivo){\r\n //obtem o conteudo do arquivo\r\n $arquivoNegocio = new ArquivoNegocio();\r\n $conteudoArquivo = $arquivoNegocio->getConteudo($arquivo);\r\n \r\n //descriptografa o conteudo do arquivo\r\n $criptografia = new CriptografiaNegocio();\r\n $backup = $criptografia->descriptografar($conteudoArquivo);\r\n \r\n //restaura o backup\r\n $dao = new BackupDao();\r\n $dao->restaurarDB($backup); \r\n }", "title": "" }, { "docid": "994a71de898517136ded39aeb3bda045", "score": "0.5591323", "text": "public abstract function backup();", "title": "" }, { "docid": "d5e91425c0ef850980443d35192023b4", "score": "0.5585107", "text": "public function write_backup_sql($generate_file = false, $all_dbs = true) {\r\r\n // If the user wants to generate an SQL file, then convert the Content Type\r\r\n if ($generate_file) {\r\r\n $this->as_file = $generate_file;\r\r\n header('Content-Type: application/octetstream');\r\r\n header('Content-Disposition: filename=\"' . $this->db_name . '.sql\"');\r\r\n }\r\r\n\r\r\n // Write header\r\r\n $dump_buffer = \"# MySQL Database Dump\" . $this->crlf;\r\r\n $dump_buffer .= \"# Backup made: \" . date(\"F j, Y, g:i a\") . $this->crlf;\r\r\n $dump_buffer .= \"# Database: \" . ($all_dbs == true ? 'All Databases' : $this->db_name) . $this->crlf;\r\r\n if (!$all_dbs)\r\r\n $dump_buffer .= \"# Backed up tables: \" . count($this->get_tables()) . $this->crlf;\r\r\n else\r\r\n $dump_buffer .= \"# Backed up databases: \" . count($this->get_databases()) . $this->crlf;\r\r\n $dump_buffer .= \"# Generated by: class_database by Matt DeKok\" . $this->crlf;\r\r\n\r\r\n if ($all_dbs) {\r\r\n // Retrieve SQL dump for each database\r\r\n $db_name = $this->db_name;\r\r\n $dbs = $this->get_databases();\r\r\n foreach ($dbs as $db) {\r\r\n $this->db_name = $db;\r\r\n $dump_buffer .= $this->generate_sql($generate_file, $db);\r\r\n }\r\r\n $this->db_name = $db_name;\r\r\n } else {\r\r\n // Retrieve SQL dump for each table\r\r\n $dump_buffer .= $this->generate_sql($generate_file, $this->db_name);\r\r\n }\r\r\n\r\r\n // Output SQL dump\r\r\n if ($generate_file) {\r\r\n echo $dump_buffer;\r\r\n exit;\r\r\n } else {\r\r\n return $dump_buffer;\r\r\n }\r\r\n }", "title": "" }, { "docid": "0f9dea7d77248d2aba067a0e8cddb095", "score": "0.5581586", "text": "public function backup()\n {\n $this->createPath();\n\n // Fetch collections from Mongo.\n $collections = $this->mongo->listCollections();\n\n // Manually add system collections.\n $collections[] = $this->mongo->selectCollection('system.indexes');\n $collections[] = $this->mongo->selectCollection('system.users');\n\n foreach ($collections as $collection) {\n $collectionPath = \"{$this->path}/{$collection->getName()}\";\n echo \"Creating {$collectionPath}/\\n\";\n $cmd = \"mkdir -p {$collectionPath}\";\n system($cmd);\n\n $cursor = $collection->find();\n foreach ($cursor as $record) {\n switch ($collection->getName()) {\n case 'system.indexes':\n $recordPath = \"{$collectionPath}/{$record['ns']}.json\";\n break;\n //case 'system.users':\n //$recordPath = \"{$collectionPath}/{$record['_id']}.json\";\n //break;\n default:\n if (is_array($record['_id'])) {\n $recordPath = \"{$collectionPath}/{$record['_id']['$id']}.json\";\n } else {\n $recordPath = \"{$collectionPath}/{$record['_id']}.json\";\n }\n }\n $cmd = \"touch {$recordPath}\";\n $data = json_encode($record, JSON_PRETTY_PRINT);\n file_put_contents($recordPath, $data);\n }\n }\n }", "title": "" }, { "docid": "50cfe6820ccbaee49761a07fc8d3e651", "score": "0.55706275", "text": "public function createAction() {\r\n $request = reqBup::get('post');\r\n $response = new responseBup();\r\n /** @var backupLogModelBup $log */\r\n $log = $this->getModel('backupLog');\r\n\r\n if(!empty($request['opt_values'])){\r\n $log->writeBackupSettings($request['opt_values']);\r\n frameBup::_()->getModule('options')->getModel('options')->saveMainFromDestGroup($request);\r\n frameBup::_()->getModule('options')->getModel('options')->saveGroup($request);\r\n frameBup::_()->getModule('options')->getModel('options')->refreshOptions();\r\n\r\n // if warehouse changed - create necessary dir\r\n $bupFolder = frameBup::_()->getModule('warehouse');\r\n if (!$bupFolder->getFolder()->exists())\r\n $bupFolder->getFolder()->create();\r\n }\r\n\r\n // We are need to check \"warehouse\" directory (usually: wp-content/upsupsystic)\r\n if (!$this->getModel()->checkWarehouse()) {\r\n $response->addError($this->getModel()->getWarehouseError());\r\n\r\n return $response->ajaxExec();\r\n }\r\n\r\n if(!$this->_checkExtensions($response)) {\r\n return $response->ajaxExec();\r\n }\r\n\r\n $filename = $this->getModel()->generateFilename(array('zip', 'sql', 'txt'));\r\n $cloud = array();\r\n\r\n if ($this->getModel()->isFilesystemRequired()) {\r\n if (!isset($request['complete'])) {\r\n // Disallow to do backups while backup already in proccess.\r\n $this->lock();\r\n\r\n $files = $this->getModel()->getFilesList();\r\n // $files = array_map('realpath', $files);\r\n\r\n $log->string(sprintf('%s files scanned.', count($files)));\r\n\r\n $warehouse = frameBup::_()->getModule('warehouse')->getPath();\r\n $dir = frameBup::_()->getModule('warehouse')->getTemporaryPath();\r\n\r\n $log->string('Clear out old temporary files');\r\n if (file_exists($file = $dir . '/stacks.dat')) {\r\n if (@unlink($file)) {\r\n $log->string(sprintf('%s successfully deleted', basename($file)));\r\n } else {\r\n $log->string(sprintf('Cannot delete file %s. If you notice a problem with archives - delete the file manually', $file));\r\n }\r\n }\r\n $tmpDirFiles = glob($dir . '/*');\r\n if(!empty($tmpDirFiles) && is_array($tmpDirFiles)) {\r\n foreach ($tmpDirFiles as $tmp) {\r\n if (substr(basename($tmp), 0, 3) === 'BUP') {\r\n if (@unlink($tmp)) {\r\n $log->string(sprintf('%s successfully deleted', $tmp));\r\n } else {\r\n $log->string(sprintf('Cannot delete file %s', $tmp));\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Defined in ./config.php\r\n if (!defined('BUP_FILES_PER_STACK')) {\r\n define('BUP_FILES_PER_STACK', 500);\r\n }\r\n\r\n $response->addData(array(\r\n 'files' => $files,\r\n 'per_stack' => BUP_FILES_PER_STACK,\r\n ));\r\n\r\n $log->string('Send request to generate temporary file stacks');\r\n\r\n return $response->ajaxExec();\r\n }\r\n\r\n $log->string(sprintf('Create a backup of the file system: %s', $filename['zip']));\r\n $this->getModel()->getFilesystem()->create($filename['zip']);\r\n $cloud[] = $filename['zip'];\r\n }\r\n\r\n if ($this->getModel()->isDatabaseRequired()) {\r\n // Disallow to do backups while backup already in proccess.\r\n $this->lock();\r\n\r\n $log->string(sprintf('Create a backup of the database: %s', $filename['sql']));\r\n $this->getModel()->getDatabase()->create($filename['sql']);\r\n $dbErrors = $this->getModel()->getDatabase()->getErrors();\r\n if(!empty($dbErrors)) {\r\n $log->string(sprintf('Errors during creation of database backup, errors count %d', count($dbErrors)));\r\n $response->addError( $dbErrors );\r\n return $response->ajaxExec();\r\n }\r\n $cloud[] = $filename['sql'];\r\n }\r\n\r\n $log->string('Backup complete');\r\n\r\n $destination = $this->getModel()->getConfig('dest');\r\n $handlers = $this->getModel()->getDestinationHandlers();\r\n\r\n if (array_key_exists($destination, $handlers)) {\r\n\r\n $cloud = array_map('basename', $cloud);\r\n\r\n $log->string(sprintf('Upload to the \"%s\" required', ucfirst($destination)));\r\n $log->string(sprintf('Files to upload: %s', rtrim(implode(', ', $cloud), ', ')));\r\n $handler = $handlers[$destination];\r\n $result = call_user_func_array($handler, array($cloud));\r\n if ($result === true || $result == 200 || $result == 201) {\r\n $log->string(sprintf('Successfully uploaded to the \"%s\"', ucfirst($destination)));\r\n\r\n $path = frameBup::_()->getModule('warehouse')->getPath();\r\n $path = untrailingslashit($path);\r\n\r\n foreach ($cloud as $file) {\r\n $log->string(sprintf('Removing %s from the local storage.', $file));\r\n if (@unlink($path . '/' . $file)) {\r\n $log->string(sprintf('%s successfully removed.', $file));\r\n } else {\r\n $log->string(sprintf('Failed to remove %s', $file));\r\n }\r\n }\r\n } else {\r\n switch ($result) {\r\n case 401:\r\n $error = 'Authentication required.';\r\n break;\r\n case 404:\r\n $error = 'File not found';\r\n break;\r\n case 500:\r\n $error = is_object($handler[0]) ? $handler[0]->getErrors() : 'Unexpected error (500)';\r\n break;\r\n default:\r\n $error = 'Unexpected error';\r\n }\r\n\r\n $log->string(\r\n sprintf(\r\n 'Cannot upload to the \"%s\": %s',\r\n ucfirst($destination),\r\n is_array($error) ? array_pop($error) : $error\r\n )\r\n );\r\n }\r\n }\r\n\r\n\r\n\r\n $response->addMessage(langBup::_('Backup complete'));\r\n\r\n // Allow to do new backups.\r\n $this->unlock();\r\n\r\n if (frameBup::_()->getModule('options')->get('email_ch') == 1) {\r\n $email = frameBup::_()->getModule('options')->get('email');\r\n $subject = 'Backup by Supsystic Notifications';\r\n\r\n $log->string('Email notification required.');\r\n $log->string(sprintf('Sending to %s', $email));\r\n\r\n $message = $log->getContents();\r\n\r\n wp_mail($email, $subject, $message);\r\n }\r\n\r\n $log->save($filename['txt']);\r\n $log->clear();\r\n\r\n return $response->ajaxExec();\r\n\t}", "title": "" }, { "docid": "b87d2b55b7490a24338704cfc949aa24", "score": "0.5567489", "text": "function backup()\n { \t\t\n global $DEBUG;\n\tglobal $dbg;\n global $BACKUP_LOGFILE; \n global $BACKUP_INC0; \n global $BACKUP_INC0_SCRIPTFILE; \n global $BACKUP_INC1;\n global $BACKUP_INC1_SCRIPTFILE; \n \n $BACKUP_SCRIPTFILE = \"\";\n\n\t$dbg->writeMessage(\"backup():start\");\n\t\n\t if (!empty($DEBUG)) writelogmsg(\"backup():start\"); \n\n\t $date = date(\"D\");\n \n if (count($BACKUP_INC0) != 7 || count($BACKUP_INC1) != 7) \n {\n writelogmsg(\"BACKUP-108 Wrong backup configuration (count array < 7)\",$BACKUP_LOGFILE);\n return(-1); \n }\n\n if ($date != \"Mon\" && $date != \"Tue\" && $date != \"Wed\" && \n $date != \"Thu\" && $date != \"Fri\" && $date != \"Sat\" && \n $date != \"Sun\")\n {\n writelogmsg(\"BACKUP-109 Date strings not correct\",$BACKUP_LOGFILE);\n return(-1); \n }\n \n if (!empty($BACKUP_INC0[$date]) && !empty($BACKUP_INC1[$date])) \n {\n writelogmsg(\"BACKUP-110 Wrong backup configuration (array's)\",$BACKUP_LOGFILE);\n return(-1); \n }\n\n if (empty($BACKUP_INC0[\"Mon\"]) && empty($BACKUP_INC0[\"Tue\"]) && empty($BACKUP_INC0[\"Wed\"]) &&\n empty($BACKUP_INC0[\"Thu\"]) && empty($BACKUP_INC0[\"Fri\"]) && empty($BACKUP_INC0[\"Sat\"]) &&\n empty($BACKUP_INC0[\"Sun\"])) \n {\n writelogmsg(\"BACKUP-111 Wrong backup configuration (no weekly full database backup)\",$BACKUP_LOGFILE);\n return(-1); \n }\n \n if (!empty($BACKUP_INC0[$date]))\n {\n $BACKUP_SCRIPTFILE = $BACKUP_INC0_SCRIPTFILE; \n writelogmsg(\"backup():date=$date => full database backup (rcv=$BACKUP_SCRIPTFILE)\",$BACKUP_LOGFILE);\n }\n else\n {\n if (!empty($BACKUP_INC1[$date]))\n {\n $BACKUP_SCRIPTFILE = $BACKUP_INC1_SCRIPTFILE;\n writelogmsg(\"backup():date=$date => full database backup (rcv=$BACKUP_SCRIPTFILE)\",$BACKUP_LOGFILE);\n }\n }\n \n if (!empty($BACKUP_SCRIPTFILE))\n {\n $descriptorspec = array(0 => array(\"pipe\",\"r\"), \n 1 => array(\"pipe\",\"w\"), \n 2 => array(\"file\",$BACKUP_LOGFILE,\"a\")); \n \n $process = proc_open(\"rman\",$descriptorspec,$pipes);\n \n if (is_resource($process)) \n {\n if (!empty($DEBUG)) \n\t\t{\twritelogmsg(\"backup():scriptfile=$BACKUP_SCRIPTFILE\"); \n\t\t}\n \n if (!($fread = fopen($BACKUP_SCRIPTFILE,\"r+\")))\n {\n writelogmsg(\"BACKUP-101 Could not open rman script file (file=$BACKUP_SCRIPTFILE)\",$BACKUP_LOGFILE);\n return(-1);\n }\n \t \n $data = fread($fread,filesize($BACKUP_SCRIPTFILE));\n \t $data = preg_replace(\"/\\r/\",\"\",$data);\n \t \n fclose($fread); \n \n if (!empty($data))\n { \t \n \t $data_array = explode(\"\\n\",$data);\t\n \n \t foreach ($data_array as $data_row)\n \t { \n \t\t $data_row .= \"\\n\";\n \t\t\t\n \t\t\tif (!empty($DEBUG)) \n\t\t\t{\twritelogmsg(\"backup():scriptfile (row=\".trim($data_row).\")\"); \n \t \n\t\t\t\tif (!empty($data_row))\n\t\t\t\t{\n\t\t\t\t if (!fwrite($pipes[0],$data_row))\n\t\t\t\t {\n\t\t\t\t\twritelogmsg(\"BACKUP-102 Process fwrite failed (row=\".trim($data_row).\")\",$BACKUP_LOGFILE);\n\t\t\t\t }\n\t\t\t\t}\n \t } \t\n\t\t } \n\t\t}\n else\n {\n writelogmsg(\"BACKUP-103 Empty rman script file (file=$scriptfile)\",$BACKUP_LOGFILE);\n return(-1);\n } \n \n fclose($pipes[0]);\n \n while (!feof($pipes[1])) \n {\n $message=fgets($pipes[1], 1024);\n writelogmsg($message,$BACKUP_LOGFILE);\n }\n \n fclose($pipes[1]); \n $return_value = proc_close($process);\n \n if ($return_value)\n {\n writelogmsg(\"BACKUP-104 RMAN return value $return_value\",$BACKUP_LOGFILE);\n }\n } \n }\n else\n {\n \t if (!empty($DEBUG)) writelogmsg(\"backup():no entry in array's - no backup\"); \n }\n \n\t if (!empty($DEBUG)) writelogmsg(\"backup():end\"); \n }", "title": "" }, { "docid": "a5f7b4e9fad73c22a09d1052db0bb801", "score": "0.5556764", "text": "private function _createBackupFile(){\n\n $backupFolder = APPPATH . $this->config->item('plain_db_backup_folder');\n if(!file_exists($backupFolder)){\n if(!mkdir($backupFolder, 0700, true)){\n log_message('DEBUG', 'Cannot create folder for DB backups '.$backupFolder);\n return false;\n }\n }\n if(!is_readable($backupFolder)){\n log_message('DEBUG', 'Cannot create DB backup - backups folder '.$backupFolder.' is not readable');\n return false;\n }\n $absolutePath = realpath($backupFolder);\n $count=0;\n // Skip existing backups\n do{\n $backupFileName = 'db_'.$count.'_'.time().'.bak.gz';\n $fullBackupFileName = $absolutePath . DIRECTORY_SEPARATOR . $backupFileName;\n } while(file_exists($fullBackupFileName));\n return $fullBackupFileName;\n }", "title": "" }, { "docid": "0281feba5a9434f861bcefd91d121872", "score": "0.5540569", "text": "public function run()\n {\n\n // Get task collection (via Traits?) // TODO: do we need that? Are there alternatives?\n $collection = $this->collectionBuilder();\n\n // Set sql dump filename\n $sqlDumpFilename = $this->remoteDbName . '_' . date('YmdHis') . '.sql';\n\n // Create our dump on the remote server (requires ~/.my.cnf)\n // TODO: instead of ignoring tables rather only ignore the data dump, but include structure, please\n $cmd = 'mysqldump ' .\n ' --single-transaction ' .\n //' --structure-tables=' . escapeshellarg(implode(',', $this->getStructureOnlyTableList())) . // TODO: make this happen!\n ' ' . $this->remoteDbName . ' > /tmp/' . $sqlDumpFilename;\n\n // 1) create a gzipped dump on the server // TODO: add the gzip part // TODO: Maybe add exception handling here, if file does not exist\n $this->printTaskInfo('Dumping DB on remote server - <info>'.$cmd.'</info>');\n $collection->taskSshExec($this->sshHost, $this->sshUser)\n ->remoteDir('/tmp')\n ->exec($cmd)\n ->run();\n\n // 2) download the dump // TODO: Add exception handling here, if file does not exist\n $this->printTaskInfo('Downloading SQL dump <info>'.$sqlDumpFilename.'</info>');\n $collection->taskRsync()\n ->fromHost($this->sshHost)\n ->fromPath('/tmp/' . $sqlDumpFilename)\n ->fromUser($this->sshUser)\n ->toPath('./_temp/')\n ->checksum()\n ->wholeFile()\n ->verbose()\n ->progress()\n ->humanReadable()\n ->stats()\n ->run();\n\n // 3) delete the dump on the server\n $this->printTaskInfo('Deleting SQL dump on remote server <info>'.$sqlDumpFilename.'</info>');\n $collection->taskSshExec($this->sshHost, $this->sshUser)\n ->remoteDir('/tmp')\n ->exec(\"rm -f ./$sqlDumpFilename\")\n ->run();\n\n // 4) import the dump locally\n $this->printTaskInfo(\"Importing SQL dump into <info>$this->localDbName@$this->localDbHost</info>: <info>./_temp/$sqlDumpFilename</info>\");\n if (\n !$collection->taskImportSqlDump(\"./_temp/$sqlDumpFilename\")\n ->host($this->localDbHost)\n ->user($this->localDbUser)\n ->pass($this->localDbPass)\n ->name($this->localDbName)\n ->run()->wasSuccessful()\n ) {\n throw new RuntimeException('Failed to import dump on local server.');\n }\n\n // 5) delete the dump locally\n $this->printTaskInfo('Deleting dump locally.');\n unlink(\"./_temp/$sqlDumpFilename\");\n\n // If we get to here assume everything worked\n return Result::success($this);\n }", "title": "" }, { "docid": "944b45514291fda334f44167bf33d55f", "score": "0.55148417", "text": "function sqlDump(){\n\n\tif(!file_exists(SQL_DUMP_DIR) && !is_dir(SQL_DUMP_DIR)){\n\t\tlogActivity(\"SQL Dump - directory \".SQL_DUMP_DIR.\" does not exist, creating\");\n\t\tmkdir(SQL_DUMP_DIR);\n\t}\n\n\tif(file_exists(SQL_DUMP_DIR.SQL_DUMP_NEW)){\n\t\tlogActivity(\"SQL Dump - dump exists \".SQL_DUMP_DIR.SQL_DUMP_NEW.\", deleting\");\n\t\tunlink(SQL_DUMP_DIR.SQL_DUMP_NEW);\n\t}\n\n\tlogActivity(\"SQL Dump - dumping to: \".SQL_DUMP_DIR.SQL_DUMP_NEW);\n\n\t$cmd = \"mysqldump --user=\".DB_READ_USER;\n\t$cmd .= \" --password=\".DB_READ_PASS;\n\t$cmd .= \" --host=\".DB_SERVER;\n\t$cmd .= \" --single-transaction\";\n\t$cmd .= \" \".DB_USE.\" | gzip > \".SQL_DUMP_DIR.SQL_DUMP_NEW;\n\n\texec($cmd);\n\n\tif(file_exists(SQL_DUMP_DIR.SQL_DUMP_CURRENT)\n\t&&(file_exists(SQL_DUMP_DIR.SQL_DUMP_NEW))){\n\t\tlogActivity(\"SQL Dump - removing old sql dump\");\n\t\tunlink(SQL_DUMP_DIR.SQL_DUMP_CURRENT);\n\t}\n\n\tif(file_exists(SQL_DUMP_DIR.SQL_DUMP_NEW)){\n\t\tlogActivity(\"SQL Dump - fresh dump promoted to current\");\n\t\trename(SQL_DUMP_DIR.SQL_DUMP_NEW,SQL_DUMP_DIR.SQL_DUMP_CURRENT);\n\t}\n}", "title": "" }, { "docid": "124eb026333a5657d013b22842c59e99", "score": "0.551285", "text": "public function handle()\n {\n $this->info(\"Starting export...\");\n app()->configure('snapshot'); // save overhead by only loading config when needed\n\n $databaseName = env('DB_DATABASE');\n $this->info(\"databaseName: $databaseName\");\n\n $snapshotDirPath = FileHelper::storagePath(config('snapshot.directory.path'));\n $this->info(\"snapshotDirPath: $snapshotDirPath\");\n\n $excludeTables = array_keys(array_filter(config('snapshot.substitutions.download'), function ($fields) {\n return $fields == [\n '*' => null,\n ]; // for now, can only exclude entire tables with wildcard\n }));\n\n $excludeTablesString = implode(',', array_map(function ($table) {\n return escapeshellarg($table);\n }, $excludeTables));\n $this->info(\"excludeTablesString: $excludeTablesString\");\n\n $snapshotCreationNeeded = false;\n\n // First check if there has been an upload since the last snapshot creation\n $latestSnapshot = Snapshot::where('deleted_at',null)\n ->orderBy('created_at', 'desc')\n ->first();\n $this->info(\"latestSnapshot: \" . $latestSnapshot['created_at']);\n\n // TODO: Check Upload table instead of Sync\n $latestUpload = Sync::where('deleted_at', null)\n ->where('type', 'upload')\n ->orderBy('created_at', 'desc')\n ->first();\n $this->info(\"latestUpload: \" . $latestUpload['created_at']);\n\n if ($latestSnapshot == null) {\n // Always create a new snapshot if the snapshot table is empty\n $snapshotCreationNeeded = true;\n $this->info(\"No snapshot found, always create snapshot.\");\n } else if ($latestUpload != null) {\n // Otherwise, create a snapshot if there is a newer upload than the latest snapshot\n $this->info(\"unix timestamp of latestSnapshot: \" . strtotime($latestSnapshot['created_at']));\n $this->info(\"unix timestamp of latestUpload: \" . strtotime($latestUpload['created_at']));\n $snapshotCreationNeeded = (strtotime($latestSnapshot['created_at']) < strtotime($latestUpload['created_at']));\n $this->info(\"latestSnapshot older than latestUpload?: \" . (($snapshotCreationNeeded) ? \"true\" : \"false\"));\n }\n\n if (!$snapshotCreationNeeded) {\n // Check the latest updated table that is synced\n $this->info(\"Checking the latest table update using the information_schema database.\");\n $latestUpdateQuery = \"select max(update_time) as latest_update_time \" .\n \"from information_schema.tables \" .\n \"where table_schema = '$databaseName' \" .\n \"and table_name not in ($excludeTablesString);\";\n\n $this->info(\"latestUpdateQuery: \" . $latestUpdateQuery);\n $latestUpdate = DB::select($latestUpdateQuery);\n $latestUpdateTime = $latestUpdate[0]->latest_update_time;\n $this->info(\"unix timestamp of latestSnapshot: \" . strtotime($latestSnapshot['created_at']));\n $this->info(\"unix timestamp of latestUpdate: \" . strtotime($latestUpdate[0]->latest_update_time));\n $snapshotCreationNeeded = ( ($latestUpdateTime == null) || (strtotime($latestSnapshot['created_at']) < strtotime($latestUpdateTime)) );\n $this->info(\"latestSnapshot older than latestUpdate?: \" . (($snapshotCreationNeeded) ? \"true\" : \"false\"));\n }\n\n if ($snapshotCreationNeeded) {\n $this->info(\"Snapshot creation is needed, starting snapshot generation.\");\n $snapshotId = Uuid::uuid4();\n $this->info(\"snapshotId: $snapshotId\");\n\n ///// remove old temporary files /////\n $this->info(\"Removing old temporary files.\");\n app()->configure('temp'); // save overhead by only loading config when needed\n $tempDirPath = FileHelper::storagePath(config('temp.directory.path'));\n $this->info(\"tempDirPath: $tempDirPath\");\n FileHelper::mkdir($tempDirPath);\n FileHelper::cleanDirectory($tempDirPath, config('temp.directory.size.max'));\n\n ///// dump sqlite and zip output /////\n $excludeTablesString = implode(' ', array_map(function ($table) {\n return \"--exclude=\" . escapeshellarg($table);\n }, $excludeTables));\n $this->info(\"excludeTablesString: $excludeTablesString\");\n\n $sqliteDumpPrefix = self::DUMP_PREFIX . 'sqlite_';\n $this->info(\"sqliteDumpPrefix: $sqliteDumpPrefix\");\n $sqliteDumpName = $sqliteDumpPrefix . $snapshotId . '.sql';\n $this->info(\"sqliteDumpName: $sqliteDumpName\");\n $sqliteDumpPath = \"$tempDirPath/$sqliteDumpName\";\n $this->info(\"sqliteDumpPath: $sqliteDumpPath\");\n $zipPath = $sqliteDumpPath . '.zip';\n $this->info(\"zipPath: $zipPath\");\n $zipPathString = escapeshellarg($zipPath);\n $this->info(\"zipPathString: $zipPathString\");\n\n\n $this->info(\"Starting trellis:export:sqlite process...\");\n $process = Process::fromShellCommandline(<<<EOT\nphp artisan trellis:export:sqlite $excludeTablesString > $sqliteDumpPath\nEOT\n , base_path());\n\n $process->setTimeout(null)->run(function ($type, $buffer) {\n fwrite($type === Process::OUT ? STDOUT : STDERR, $buffer);\n });\n\n if (!$process->isSuccessful()) {\n $this->error('trellis:export:sqlite process failed!');\n throw new ProcessFailedException($process);\n }\n\n $this->info(\"Zipping sqlite export...\");\n $process = Process::fromShellCommandline(<<<EOT\nzip -j $zipPath $sqliteDumpPath\nEOT\n , base_path());\n\n $process->setTimeout(null)->run(function ($type, $buffer) {\n fwrite($type === Process::OUT ? STDOUT : STDERR, $buffer);\n });\n\n if (!$process->isSuccessful()) {\n $this->error('trellis:export:sqlite process failed!');\n throw new ProcessFailedException($process);\n }\n\n $this->info(\"Removing old snapshot files...\");\n ///// remove old storage files /////\n FileHelper::mkdir($snapshotDirPath);\n FileHelper::cleanDirectory($snapshotDirPath, config('snapshot.directory.size.max') - filesize($zipPath), 'getBasename'); // reserve room for new snapshot by subtracting its size\n\n $this->info(\"Moving temporary file to snapshot directory...\");\n ///// move zip file to destination atomically /////\n $snapshotName = $snapshotId . '.sqlite.sql.zip';\n $this->info(\"snapshotName: $snapshotName\");\n $snapshotPath = $snapshotDirPath . '/' . $snapshotName;\n $this->info(\"snapshotPath: $snapshotPath\");\n\n $renameResult = rename($zipPath, $snapshotPath);\n\n if ($renameResult) {\n $this->info(\"Snapshot creation successful!\");\n $snapshotModel = new Snapshot;\n $snapshotModel->id = $snapshotId;\n $snapshotModel->file_name = $snapshotName;\n $md5Hash = hash_file(\"md5\", $snapshotPath);\n $this->info(\"calculated MD5 hash: $md5Hash\");\n $snapshotModel->hash = $md5Hash;\n $snapshotModel->save();\n return 0;\n } else {\n $this->error(\"Snapshot creation failed!\");\n return 1;\n }\n //return (rename($zipPath, $snapshotPath) != true)*1; // return 0 for success, 1 for failure\n }\n\n // No snapshot needed\n $this->info(\"No snapshot creation needed.\");\n return 0;\n }", "title": "" } ]
b49e4d981a25982b046e46660821e32c
determine if this user is an admin
[ { "docid": "e723d60564fdc838f991cb25ef0fb598", "score": "0.0", "text": "function is_admin($uid){\n\t\tif($uid === false){\n\t\t\treturn false;\n\t\t}\n\t\t$role = $this->get_user_roles($uid);\n\t\tfor($i = 0; $i < count($role); $i++){\n\t\t\t// if permission equals visitor's role\n\t\t\tif($role[$i] == 1){\n\t\t\t\t$isadmin = true;\n\t\t\t\tbreak;\n\t\t\t}else{\n\t\t\t\t$isadmin = false;\n\t\t\t}\n\t\t}\n\t\treturn $isadmin;\n\t}", "title": "" } ]
[ { "docid": "b211aea6d1718e98ea8f98062e15a565", "score": "0.8853738", "text": "protected function isAdminUser() {}", "title": "" }, { "docid": "15cf9a48fdb7eb94c3c6964995199ce3", "score": "0.87614757", "text": "function isAdmin(){\n\n\t\tif($this->user_type == 'Admin'){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "09dd6314a1ead9622198a804cfd3d71e", "score": "0.8730151", "text": "public function isAdmin(){\n if($this->type->id == User_Type::ADMIN)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "a332daf1d3d0f9786bfa62c8f9f858fb", "score": "0.8727484", "text": "public function isAdmin()\n {\n return $this->admin == User::ADMIN_USER;\n }", "title": "" }, { "docid": "96082860496bcef0d4c35e0d50b2dce8", "score": "0.8726087", "text": "public function isAdminUser();", "title": "" }, { "docid": "2fe3ebada2271cce7bb20c7cbf9a91f4", "score": "0.8674833", "text": "public function is_admin() {\n\n\t\tif ( 'admin' == $this->user_type ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "21bb4cbd19ab68a7d6984f5c33150855", "score": "0.86679924", "text": "public function isAdminUser()\n\t{\n\t\tif ('on' === $this->get('is_admin') || 1 == $this->get('is_admin')) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3951af180cef1271d1ae60d792a53fe6", "score": "0.86639726", "text": "public function isAdmin() {\n\t\tif( !$this->_user ) { \n\t\t\tcheckLogin(); \n\t\t}\n\t\tif( $this->_user->user_type == 'admin' ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0bd69e749f6bdbb54f9facb7c18dce43", "score": "0.8584338", "text": "public function isAdmin() {\n return $this->is(User::ADMIN);\n }", "title": "" }, { "docid": "961247950493cf98c2412508328699b6", "score": "0.8573011", "text": "function isAdmin() {\r\n\t\treturn ($this->user['class'] == self::CLASS_ADMIN);\r\n\t}", "title": "" }, { "docid": "7b560dc5cc6e265d8a2cdb604995bc75", "score": "0.856994", "text": "public function isAdmin(){\n $user = $this->getUserInfo();\n if($user->getRole() == 'admin')\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "00d25589602dd49cae2a158204711438", "score": "0.8554999", "text": "public function isAdminUser()\n {\n return (bool) $this->group['is_admin'];\n }", "title": "" }, { "docid": "09e7f4f1a7dbd8f1f9b2919f32898890", "score": "0.85343426", "text": "function isAdmin(){\n return intval($this->_role) == 'admin';\n }", "title": "" }, { "docid": "41e153d3e9fffec0573068e11478f7a9", "score": "0.8507644", "text": "public function isAdmin()\n\t{\n\t\treturn $this->checkUserRole('admin');\n\t}", "title": "" }, { "docid": "1bc3f32a93998bd163aec5f7f2378835", "score": "0.8469544", "text": "function isAdmin() {\r\n if (!Yii::app()->user->isGuest) {\r\n $user = $this->loadUser(Yii::app()->user->id);\r\n return $user->username == 'Admin';\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "0dc80e458941c8f3cc7b2f1ab5fb2d99", "score": "0.8451536", "text": "function isAdmin()\r\n\t{\r\n\t\t$user = $this->loadUser(Yii::app()->user->id);\r\n\t\tif($user === null)\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse \r\n\t\t\treturn $user->role == \"管理员\";\r\n\t}", "title": "" }, { "docid": "fececf2bf50e9d5f214b1a12683a6be3", "score": "0.84216017", "text": "public function isAdmin() {\n if(($this->loggedIn===true) && ($this->admin == true)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8893e7cbb701d8dff0311419b2fea806", "score": "0.8417017", "text": "public function isAdmin()\n {\n return $this->isMemberOf('admin');\n }", "title": "" }, { "docid": "d63c982659e16ccdf4cdf84fb0e403b8", "score": "0.84154874", "text": "public function admin()\n\t{\n\t\tif ($this->check() && $this->user())\n\t\t{\n\t\t\t// User type is admin = 0\n\t\t return $this->user()->type == 0;\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "ba1386d287042fc7751fa8dad6981002", "score": "0.84142804", "text": "public function isAdmin()\n {\n return $this->role === 'admin';\n }", "title": "" }, { "docid": "8bfaf0a83214d3a2095e07fc45f60bc0", "score": "0.8407735", "text": "public function isAdmin()\n {\n return $this->admin == 1 ? true : false;\n }", "title": "" }, { "docid": "7d1002effe949bcb2588e0908dff6166", "score": "0.84069806", "text": "function isAdmin()\n\t{\n\t\treturn ($this->userlevel == ADMIN_LEVEL ||\n\t\t\t\t$this->email == ADMIN_NAME);\n\t}", "title": "" }, { "docid": "4686438b10f752d484253e5b61a97f2b", "score": "0.84059465", "text": "public function isAdmin()\n\t{\n\t\treturn ($this->role*1 & 8)>0;\n\t}", "title": "" }, { "docid": "2d505b6330265051604b633ba038cbcc", "score": "0.8399516", "text": "public function isAdmin()\n {\n $user = $this->getLoggedInUser();\n\n if (!$user) {\n return false;\n }\n\n if ($user->role === \"admin\") {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0f1f1c961a0544bf3d35d1816636b755", "score": "0.8391147", "text": "public function isAdmin() {\n\t\treturn Admins::model()->findByAttributes(array('user_id'=>$this->id));\n\t}", "title": "" }, { "docid": "07bd4ae404c55d96db10122e8a86d062", "score": "0.8380436", "text": "public function isAdmin()\n\t{\n\t\treturn $this->admin == 1;\n\t}", "title": "" }, { "docid": "fdaae76b69a7c592b08c0b593785ca94", "score": "0.8373702", "text": "private function isAdmin()\n {\n return $this->isLoggedIn() && isset($this->session->userrole) && $this->session->userrole === \"admin\";\n }", "title": "" }, { "docid": "4101eb2f6a4c95dfc4c0534e6f8bfc90", "score": "0.83706665", "text": "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "title": "" }, { "docid": "4101eb2f6a4c95dfc4c0534e6f8bfc90", "score": "0.83706665", "text": "function isAdmin(){\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->role) == 1;\n }", "title": "" }, { "docid": "6555b73804c2e37580549abd4b4befb5", "score": "0.83651334", "text": "function isAdmin()\n {\n return $this->role === 'admin';\n }", "title": "" }, { "docid": "20dbfe38b87c8d57215378a65ec3f35a", "score": "0.8362362", "text": "private function isAdmin()\n {\n return ($this->getService('session')->user['role'] === 'admin');\n }", "title": "" }, { "docid": "8be757907d2ac942ca3956a5dd99465c", "score": "0.836158", "text": "public function isAdmin() {\r\n\t\t$userSession = new UserSession();\r\n\t\t$isAdmin = $userSession->getAdminStatus();\r\n\t\tif ($isAdmin == 1) {\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": "acd33984e6784846f9027eff011d6e9e", "score": "0.8359748", "text": "public function getUserIsAdmin()\n {\n return $this->userIsAdmin;\n }", "title": "" }, { "docid": "dbf1dac2c7a4b89aa3e43b3add742abd", "score": "0.8354508", "text": "public function isAdmin()\n {\n if ($this->role_id == 1)\n return true;\n\n return false;\n }", "title": "" }, { "docid": "d71bb5cc6def1c686382b8b6f6c3c7f0", "score": "0.8348813", "text": "function isAdmin() {\n\t\tif (!isset($_SESSION['loginUser']))\n\t\t\treturn false;\n\t\t$user = $_SESSION['loginUser'];\n\t\treturn $user->isAdmin();\n\t}", "title": "" }, { "docid": "2727ff25b01de6e74100866e70cc9923", "score": "0.8341398", "text": "public function isAdminUser()\n {\n $oUser = $this->getUser();\n $sAclRole = $oUser->getAclrole();\n return ($sAclRole == 'admin');\n }", "title": "" }, { "docid": "14ef7131c8464799f19b7e67331fa1ca", "score": "0.83394915", "text": "public function is_admin() {\n if($this->is_logged_in() && $this->user_level_usr == 'a') {\n return true;\n } else {\n // $session->message(\"Access denied.\");\n }\n }", "title": "" }, { "docid": "7bed9c71113df3cc3c26a20ca90019d5", "score": "0.8338216", "text": "public function isAdmin() {\n $role = intval($this->token->getClaim('user')->role);\n return $role == 1;\n }", "title": "" }, { "docid": "7b09c5654224cdfbd6a20cce6c2da989", "score": "0.8331486", "text": "function isAdmin()\r\n {\r\n }", "title": "" }, { "docid": "602321fd3eaf47f14e2f213a03bf06d0", "score": "0.83295465", "text": "function isAdmin() {\n $user = $this->loadUser(Yii::app()->user->id);\n return intval($user->level_id) == 1;\n }", "title": "" }, { "docid": "f258aea11d2464d49d3a08859f712e7a", "score": "0.8326201", "text": "public static function isAdminUser()\n {\n return \\Auth::user()->hasRole('super_administrator');\n }", "title": "" }, { "docid": "7b09a05b8228f2fe9c2189eca93aec31", "score": "0.832613", "text": "public function isAdmin() {\r\n if ($_SESSION['username'] == 'admin') {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "2fe9f7b139c5c1fd0daf8565c462b980", "score": "0.83230716", "text": "public function isAdmin()\n\t{\n\t\treturn ( true === $this->session->get( 'is_logged' ) && false !== strpos( $this->session->get( 'role' ), 'admin' ) );\n\t}", "title": "" }, { "docid": "a4b7948c06aac5656a9f5f110e0f04b4", "score": "0.83196086", "text": "public function isAdmin(): bool\n {\n return $this->account_user()->is_admin;\n }", "title": "" }, { "docid": "80e5fd1bbba8bc57786c4a89737c393a", "score": "0.8305985", "text": "public static function isAdmin()\n {\n return ($_SESSION['role_id'] == 2 ? true : false);\n }", "title": "" }, { "docid": "7c86971ce84dd891e7f3ddf01911b856", "score": "0.8301966", "text": "public function isAdmin(): bool\n {\n return $this->role === 'admin';\n }", "title": "" }, { "docid": "a942f383dd1756e3ef2eb3fec1e193c0", "score": "0.83014244", "text": "public function isAdmin()\n {\n return $this->role() == Acl::ADMIN ? true : false;\n }", "title": "" }, { "docid": "c1fa1fbffd83bcd33bddafd385d6645a", "score": "0.82870966", "text": "public function is_admin()\n {\n global $config;\n \n if(self::is_logged_in())\n {\n if($user = self::get_user($this->username()))\n {\n if(in_array($user['username'],$config['admins'])) return TRUE; \n }\n } \n \n return FALSE;\n }", "title": "" }, { "docid": "212352dfac5221ddfc67d1e1d89eea48", "score": "0.82861507", "text": "private function isAdmin():bool {\n // Get user id from session\n $userId = $this->_session->offsetGet('userId');\n // Look up for his settings\n $user = $this->userList->findUser( $userId );\n if( (integer)$user->getIsAdmin()===1 ){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.8284073", "text": "public function isAdmin();", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.8284073", "text": "public function isAdmin();", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.8284073", "text": "public function isAdmin();", "title": "" }, { "docid": "1e18b457348db710ed1b727d7a0d2299", "score": "0.828373", "text": "public function userIsAdmin()\n {\n $user = new \\Weleoka\\Users\\User();\n\n return $user->isAdmin();\n }", "title": "" }, { "docid": "32da09fb12a3e6195d9e732e6edf7420", "score": "0.82837063", "text": "public function isAdmin()\n\t{\n\t\treturn $this->privileges['details']['is_admin'];\n\t}", "title": "" }, { "docid": "36b266d3ae82ae514d9d76d3115ba513", "score": "0.8282222", "text": "public function isAdmin() {\n return $this->role=='admin';\n }", "title": "" }, { "docid": "268c0ceae34b987d770054c424051796", "score": "0.82804143", "text": "public function is_admin() {\n\t\treturn $this->admin;\n\t}", "title": "" }, { "docid": "702da9a6434eef098bc942cfe7dbb0e1", "score": "0.8276617", "text": "public function isAdmin()\n {\n return $this->admin;\n }", "title": "" }, { "docid": "4f206bfce9b66c1182528f90ad83af0a", "score": "0.8260215", "text": "function isAdmin () {\n\t\tif ($this->isLoggedIn ()) {\n\t\t\t$user = $this->getUser ($_SESSION['username']);\n\t\t\tif ($user['isadmin'] == 'yes') {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "e164a33e0269da79785378e6a6fe08a3", "score": "0.8258221", "text": "public function isAdmin() {\n return $this->admin;\n }", "title": "" }, { "docid": "e164a33e0269da79785378e6a6fe08a3", "score": "0.8258221", "text": "public function isAdmin() {\n return $this->admin;\n }", "title": "" }, { "docid": "21afc3d65b131f98f06177e1b49d9fd8", "score": "0.82491523", "text": "function isUserAdmin() {\n return (getUserGroup() == 1);\n}", "title": "" }, { "docid": "835cd6d5f5c3ad84786d61b64bd770b0", "score": "0.82396066", "text": "public function isAdmin()\n\t{\n\t\treturn $this->hasAccess('admin');\n\t}", "title": "" }, { "docid": "24a2e9c1d047808205c6a5e4be24b2e1", "score": "0.82390946", "text": "private function adminAuth()\n\t{\t\t\n\t\tif (Auth::User()->type !=\"admin\" && Auth::User()->type !=\"super admin\"){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d45511f68caceda41d9d85b0211e7f1b", "score": "0.8235723", "text": "protected function checkAdmin(){\n return $this->getSecurityContext()->hasAdminUser();\n }", "title": "" }, { "docid": "c8e2e7239f5a1d30f27b83d3bdf11fcc", "score": "0.82344896", "text": "public function isAdmin() {\n\t\tif (!$this->isLoggedIn()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!$this->isLoaded()) {\n\t\t\t$this->load($uid);\n\t\t}\n\n\t\tif ($this->columns['role_id'] == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "1744db267caa26fcff9c3e231ec02421", "score": "0.82320553", "text": "public function isAdmin(): bool {\n\t return $this->getUserLevel() >= $this::MIN_LEVEL_FOR_ADMIN;\n }", "title": "" }, { "docid": "1fb21245526ebbe24d834fc48f46ad30", "score": "0.82309055", "text": "public function isAdmin () {\n return $this->role->slug == 'admin';\n }", "title": "" }, { "docid": "34f769e41bb6e3b1ba36a7abfd2773de", "score": "0.82270384", "text": "function userIsAdmin() {\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "03fe591156254305bf5e454dbed3d860", "score": "0.8226719", "text": "public function isAdmin() {}", "title": "" }, { "docid": "2742762e73074f7f999bd7553c8ce12a", "score": "0.822153", "text": "function isAdmin(){\n if(Auth::user())\n {\n if(Auth::user()->is_admin){\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "b4fb5e97c3a26fc18358ec9d9501bc17", "score": "0.821778", "text": "protected function isCurrentUserAdmin() {}", "title": "" }, { "docid": "8684f6f1f05e7fb23d10f3129fd97694", "score": "0.8217768", "text": "static function isAdmin()\n {\n if (self::check()) {\n return self::user()->isAdmin();\t// uses this classes user() method to retrieve the user from sql, then call isadmin on that object.\n }\n\n }", "title": "" }, { "docid": "1b5430a7797ec52de013dbee29545b4a", "score": "0.8215352", "text": "public function isAdmin()\n\t{\n\t\treturn $this->is_admin;\n\t}", "title": "" }, { "docid": "caeb327072a49eb0601c19277b14896d", "score": "0.82103914", "text": "public function isAdmin() {\n\t\tglobal $groups;\n\n\t\treturn ($groups[$this->info['usergroupid']]->info['admin'] == 1) ? true : false;\n\t}", "title": "" }, { "docid": "7ece3c27698a89c0b71633640c1917e4", "score": "0.82063866", "text": "public function _isAdmin() {\r\n\t\treturn (bool)$this->joel->user->u_type == 'admin' ? true : false;\r\n\t}", "title": "" }, { "docid": "8050979c7556de1b61da30ab0d4cd0ef", "score": "0.82026076", "text": "public static function checkAdmin() {\n $userId = User::checkLogged();\n $user = User::getUserById($userId);\n if (!empty($user && $user['id'] == 1))\n return true;\n }", "title": "" }, { "docid": "297daadbfababedd044ef3f0a0aa7955", "score": "0.8197414", "text": "public function isAdmin()\n {\n return boolval($this->admin);\n }", "title": "" }, { "docid": "297daadbfababedd044ef3f0a0aa7955", "score": "0.8197414", "text": "public function isAdmin()\n {\n return boolval($this->admin);\n }", "title": "" }, { "docid": "c04cdcf8c539b21fccce2f00cda4d14e", "score": "0.81884915", "text": "public function isAdmin() {\r\n if (is_multisite()) {\r\n $super_admins = get_super_admins();\r\n if (is_array($super_admins) && in_array($this->getLogin(), $super_admins))\r\n return true;\r\n } elseif($this->getWpUser()) {\r\n if ($this->getWpUser()->has_cap('delete_users'))\r\n return true;\r\n }\r\n \r\n return false;\r\n }", "title": "" }, { "docid": "a3affab4a2c267430ea0615a3669e304", "score": "0.8187608", "text": "function isAdmin() {\n\t\t\tif ($this->loggedIn && in_array($this->user->email, $this->config->admin[\"adminAccounts\"]))\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "a4dbd660253fbdff9b2f71ff0feaaa31", "score": "0.8175924", "text": "public function isAdmin () {\n return $this->is_admin;\n }", "title": "" }, { "docid": "2254378855949b4387a6d478adab1339", "score": "0.8167817", "text": "public function isAdmin()\n\t{\n\t\treturn $this->retrieveVisitor()->isAdmin();\n\t}", "title": "" }, { "docid": "43b230ad3829200a6f7c7aebc0bd69ce", "score": "0.81662875", "text": "public function isAdmin() {\n return ($this->attributes['is_admin']) ? true : false;\n }", "title": "" }, { "docid": "68e5db780dd71c3995865f009016e18c", "score": "0.81655943", "text": "public function admin(){\n\t\treturn $this->is_admin!==0;\n\t}", "title": "" }, { "docid": "268ff075d7976fcdd2d3dcf0571aa683", "score": "0.8161554", "text": "public function isAdmin()\n {\n return $this->rank >= self::ADMIN;\n }", "title": "" }, { "docid": "8691ba0db106c93640ba0d99b1fca25e", "score": "0.8153576", "text": "function userIsAdmin() {\n\n $utils = $this->getUtils();\n return $utils->userIsAdmin($this->getUser(), $this->getProject()->getGroupId());\n\n }", "title": "" }, { "docid": "0343e61bc4124386a4ee0c68a617900c", "score": "0.81520414", "text": "public function isAdmin()\n {\n return $this->is_admin;\n }", "title": "" }, { "docid": "fe01017b6970249eb4d4d49eccda4195", "score": "0.81511235", "text": "public function isAdmin(): bool\n\t{\n\t\treturn $this->bIsAdmin;\n\t}", "title": "" }, { "docid": "9a762e1e876dc1faa7e597e23edd329e", "score": "0.8149943", "text": "public function isAdmin()\n {\n // if ($this->role->name == 'Admin' && $this->is_active == 1) {\n // return true;\n // }\n return 5 == $this->role;\n }", "title": "" }, { "docid": "345a6e05e56d65dc3ea1c488f3e69e5e", "score": "0.81495404", "text": "private function isAdmin(){\n if(auth()->user()->role == 1) {\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "b3290c21ed64cee3643177f1013afba4", "score": "0.81467444", "text": "public function isAdmin()\n\t{\n\t\treturn hasPermission(\"view\", \"admin\");\n\t}", "title": "" }, { "docid": "d189a769664458a516e9e11eb9bbcf91", "score": "0.81455576", "text": "public function isAdmin() : bool{\n\t\treturn $this->admin;\n\t}", "title": "" }, { "docid": "679db1118c47ae84eb2045e621c1b75f", "score": "0.8144485", "text": "public function isAdmin()\r\n {\r\n return Mage::getSingleton('admin/session')->isLoggedIn();\r\n }", "title": "" }, { "docid": "1ae8eee52d4702ce561b59b467852ef0", "score": "0.814213", "text": "public function isAdmin()\n {\n return ($this->role == Role::ADMIN);\n }", "title": "" }, { "docid": "8bba64ed4815ff2b9b434e22f7cf1e87", "score": "0.813688", "text": "public static function isAdmin()\r\n\t{\r\n\t\tif( !isLogged() )\r\n\t\t\treturn false;\r\n\t\tif( !Security::dynamicPermissions() ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$userRights = &Security::dynamicUserRights();\r\n\t\treturn $userRights[ \".IsAdmin\" ];\r\n\t}", "title": "" }, { "docid": "6cca2f6774bb64c73dfcd10837524cfc", "score": "0.8136806", "text": "public function isAdmin(){\n\t\treturn (($lvl = \\Library\\Application::appConfig()->getConst(\"MAX_ADMIN_LVL\")) !== NULL\n\t\t\t\t&& ($lvl <= $this->getAdminLvl()));\n\t}", "title": "" }, { "docid": "ed4b7820a9ff751c5acb4b68d570be1e", "score": "0.8128928", "text": "public function isAdmin() {\n return $this->role == self::ROLE_ADMIN;\n }", "title": "" }, { "docid": "097ff86bedf9bb62d17942342b7c13ca", "score": "0.8127329", "text": "public function isAdmin()\n {\n return $this->get('admin') === true;\n }", "title": "" }, { "docid": "a06986d2087732091d9ee9050dd06097", "score": "0.81240636", "text": "protected function isAdmin()\n {\n $authed = $this->auth->user();\n\n return $authed->isAdmin();\n }", "title": "" }, { "docid": "c30c02f1fe90bf6286d6f0e935580e1a", "score": "0.81218", "text": "public function isAdmin()\n {\n $p = User::getUser();\n if($p)\n {\n if($p->canAccess('Super Admin Interface') === TRUE)\n {\n return TRUE;\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "cb159a2db32b2f170f9c42ea04cbe597", "score": "0.811065", "text": "public function getIsAdmin()\n {\n if (Yii::$app->getAuthManager()\n && static::getUserModule()->adminPermission\n && Yii::$app->user->can(static::getUserModule()->adminPermission)\n ) {\n return true;\n }\n\n return in_array($this->username, static::getUserModule()->admins);\n }", "title": "" } ]
ff7e6c8d35d9d602b9d3ba70994de503
Returns the value of the property with a given key from the project identified by the key or by the id.
[ { "docid": "8091a5b9f082404668b0333dc77bca5a", "score": "0.6501679", "text": "public function getProjectProperty($projectId, $propertyKey)\n {\n $request = new ProjectPropertyRequest($projectId, $propertyKey);\n\n return $request->get(['propertyKey'=> $propertyKey]);\n }", "title": "" } ]
[ { "docid": "7f14f4ff075bbb710466d1c83264b029", "score": "0.7009527", "text": "public function getProperty($key);", "title": "" }, { "docid": "86742e32a965b918bb66849784124c1f", "score": "0.67542243", "text": "public function getProperty( string $key ): Property;", "title": "" }, { "docid": "3aef8e2683beeed0b1bdfb605134b0c9", "score": "0.66574776", "text": "public function getProperty($id, $group, $key) {\n $query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"campaign_property \n WHERE `campaign_id` = '\" . (int) $id . \"' \n AND `group` = '\" . $this->db->escape($group) . \"'\n AND `key` = '\" . $this->db->escape($key) . \"'\");\n\n return unserialize(str_replace(\"\\'\", \"'\", $query->row['value']));\n }", "title": "" }, { "docid": "0185e73c1f1445ed4de51651464e459f", "score": "0.65409285", "text": "public function getProperty($id, $group, $key) {\n $query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"product_property \n WHERE `product_id` = '\" . (int) $id . \"' \n AND `group` = '\" . $this->db->escape($group) . \"'\n AND `key` = '\" . $this->db->escape($key) . \"'\");\n\n return unserialize(str_replace(\"\\'\", \"'\", $query->row['value']));\n }", "title": "" }, { "docid": "9217c8817e9d610412d21b2952923df7", "score": "0.6483807", "text": "public function getProperty($key)\n {\n if (array_key_exists($key, $this->properties))\n {\n return $this->properties[$key];\n }\n }", "title": "" }, { "docid": "23aab68ab80fa36326c02fba520db54c", "score": "0.6481802", "text": "public function getPropByKey($key) {\n if (array_key_exists($key, $this->prop_arr)) {\n return $this->prop_arr[$key];\n }\n return NULL;\n }", "title": "" }, { "docid": "6c52172b5e237b27ba415284856e4c39", "score": "0.6429627", "text": "public function getProperty($key)\n\t{\n\t\treturn $this->_dataObject->getProperty($key);\n\t}", "title": "" }, { "docid": "f7af15fef9e1483c919f402220359737", "score": "0.64130926", "text": "public function getProperty($id, $group, $key) {\n\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"manufacturer_property \n WHERE `manufacturer_id` = '\" . (int)$id . \"' \n AND `group` = '\". $this->db->escape($group) .\"'\n AND `key` = '\". $this->db->escape($key) .\"'\");\n \n\t\treturn unserialize(str_replace(\"\\'\",\"'\",$query->row['value']));\n\t}", "title": "" }, { "docid": "cb2ae34de1ed2a23d5725c541c6d64ad", "score": "0.63961893", "text": "public function getProperty($id);", "title": "" }, { "docid": "bfcee0c495e6403afd5a9080c22f81ff", "score": "0.6360768", "text": "public function property($key)\n {\n return parent::get($key);\n }", "title": "" }, { "docid": "0d54e95254a1070d922f0d3c02a4b8f9", "score": "0.62959516", "text": "public function getProperty($key) {\n if ( ! array_key_exists($key, $this->properties)) {\n return;\n }\n\n return $this->properties[$key];\n }", "title": "" }, { "docid": "a64e06dbaadd8c494fd1d0b127ee9a0b", "score": "0.6210715", "text": "function getProperty($key)\n\t{\n\t\tif(array_key_exists($key, $this->properties))\n\t\t{\n\t\t\treturn $this->properties[$key];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "75583c4df1305a18f2aebfba70eb3c8b", "score": "0.61868095", "text": "public function getProperty($key)\n {\n return $this->vars[$key]['value'];\n }", "title": "" }, { "docid": "a6f1b401e872c428756287e82452ea52", "score": "0.61171615", "text": "public function getProperty($key) {\n\t\tif(property_exists($this, $key)) {\n\t\t\treturn $this->$key;\n\t\t}\n\t\t\n\t\t$keyP = $key . '_p';\n\t\t//add _p to $key and try again\t\n\t\tif(property_exists($this, $keyP)) {\n\t\t\treturn $this->$keyP;\n\t\t}\n\t\t\n\t\t//otherwise throw an exception\n\t\tthrow new DBException(\"$key doesn't exist in the object.\");\n\t}", "title": "" }, { "docid": "a3cd078003fec224ad574bcd2664bddc", "score": "0.6085642", "text": "public static function fetchSetting($key) {\n $property = Settings::whereRaw('clave = \"' . $key . '\" AND fk_company = ' . Auth::user()->fk_company)->first();\n if ($property)\n return $property->value;\n else\n return '';\n }", "title": "" }, { "docid": "34ce3617ddde1100a8170176a6d5be1d", "score": "0.607458", "text": "public function getValue(string $key);", "title": "" }, { "docid": "2c4aac37b8b22c92d14abf64b4351f4b", "score": "0.60585093", "text": "public static function getValueByKey($key);", "title": "" }, { "docid": "2e90fc8b20b2463f0a7f4d825c1c8d3e", "score": "0.6050822", "text": "public function __get($key)\n {\n return $this->getProperty($key);\n }", "title": "" }, { "docid": "493cb4f408edc607cb29caf3211d5f0e", "score": "0.60408235", "text": "public static function getValue(string $key);", "title": "" }, { "docid": "a9b046af9ae7922f0d11fca264fb9982", "score": "0.6030807", "text": "public function get($key) {\n\t\tif(!in_array($key, $this->_properties)) {\n\t\t\trequire_once 'Service/Freshbooks/Entity/Exception.php';\n\t\t\tthrow new Service_Freshbooks_Entity_Exception(\"Invalid property requested: \" . $key);\n\t\t}\n\t\tif(!isset($this->_data[$key])) {\n\t\t\treturn null;\n\t\t}\n\t\treturn $this->_data[$key];\n\t}", "title": "" }, { "docid": "7c49acae71096a09a31cf18d90c848c9", "score": "0.6017297", "text": "public function get($key) { \n return $this->getValue($key);\n }", "title": "" }, { "docid": "19232a094f2520bed81aac866e6efb63", "score": "0.5985334", "text": "private function _getValue( $key )\n {\n return $this->{$key};\n }", "title": "" }, { "docid": "5f610676361f793ab73f84c6d88098a9", "score": "0.5976694", "text": "public function offsetGet ($key) {\n\t\treturn property_exists($this, $key) ? $this->$key : Arr::get($this->getData(), $key);\n\t}", "title": "" }, { "docid": "4147fd40acdb9feff233c9ba74b43425", "score": "0.59765553", "text": "public function get($key)\n\t{\n\t\tif (property_exists($this, $key)) {\n\t\t\treturn $this->{$key};\n\t\t}\n\t\treturn parent::get($key);\n\t}", "title": "" }, { "docid": "9c97d53680f546a50bdfb8c5260866f1", "score": "0.5973548", "text": "public function get($p_key)\n {\n if (isset($this->$p_key))\n {\n return $this->$p_key;\n }\n }", "title": "" }, { "docid": "66fad82d0b60b98f6afd48f9dc5b7feb", "score": "0.59623253", "text": "protected static function getValue($key) {\n\t\t$r = static::fetchOne($key);\n\t\tif ($r === false) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\treturn $r->value;\n\t\t}\n\t}", "title": "" }, { "docid": "4c7dc0589f416477295fac73c07e7a01", "score": "0.59399384", "text": "public function getValue($key){\n\t\treturn $this->translator->getValue($this->chain, $this->document, $key);\n\t}", "title": "" }, { "docid": "2b644fe4b8094c1b6337670cdef4ea76", "score": "0.59385693", "text": "function _getProp($key)\n {\n return $this->_props[$key];\n }", "title": "" }, { "docid": "2b644fe4b8094c1b6337670cdef4ea76", "score": "0.59385693", "text": "function _getProp($key)\n {\n return $this->_props[$key];\n }", "title": "" }, { "docid": "82f7c08a29adb44ff23c836727bc2b18", "score": "0.5937109", "text": "public function getProperty($key)\n {\n if (isset($this->properties[$key])) {\n return $this->properties[$key];\n }\n\n return null;\n }", "title": "" }, { "docid": "bad8f2980ead5d949672bb4bbc5ca83a", "score": "0.59321517", "text": "function getProperty($id){\r\n\t}", "title": "" }, { "docid": "fa77285b6bfadf7c31a6399ee98f1784", "score": "0.5901061", "text": "private static function property($key)\n {\n $class = get_called_class();\n $properties = $class::allProperties();\n $property = $properties[$key];\n if (!$property)\n $key = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', $key))));\n return $property ? $property : $key;\n }", "title": "" }, { "docid": "cfcb0571ef713482988e36164d0ab1bb", "score": "0.5881224", "text": "function get_project($key) {\n\t\treturn jira_get('project');\n\t}", "title": "" }, { "docid": "26b3e03bcf1ca15721090bb8a82fb0c0", "score": "0.5853504", "text": "public function __get( $key ) {\n\n\t\tif ( method_exists( $this, \"get_{$key}\" ) ) {\n\t\t\treturn $this->{\"get_{$key}\"}();\n\t\t}\n\n\t\t/* translators: %s: property key */\n\t\treturn new WP_Error( 'give-form-invalid-property', sprintf( esc_html__( 'Can\\'t get property %s.', 'give' ), $key ) );\n\n\t}", "title": "" }, { "docid": "6166708a5e3b51fc5658fa6c35bb3264", "score": "0.58356196", "text": "public function offsetGet($key) {\n\t\treturn $this->resolve($key);\n\t}", "title": "" }, { "docid": "58acfe962e1a25f8c721f8a9ff6fac28", "score": "0.58335537", "text": "public function __get($key)\n\t{\n\t\t// All this to get the primary key without loading the entity\n\t\tif(isset($this->data[static::$key]))\n\t\t{\n\t\t\tif($key == static::$key) return $this->data[static::$key];\n\t\t\tif( ! $this->loaded) $this->load();\n\t\t}\n\n\t\t//if(isset($this->data[static::$key]) AND ! $this->loaded) $this->load();\n\t\treturn array_key_exists($key, $this->data) ? $this->data[$key] : $this->related($key);\n\t}", "title": "" }, { "docid": "dedd69c586f55d55f79ce47a8dacf0c6", "score": "0.58233654", "text": "public function getProperty($id) {\r\n\t\treturn $this->obj->getProperty($id);\r\n\t}", "title": "" }, { "docid": "2e9ca8d2f906c41cd5d0dee8b367aa43", "score": "0.5814825", "text": "public function getproperty($pi_propertyid) {\r\n\t\t$this->settable(self::TABLE_PROPERTY);\r\n\r\n\t\t$lo_property = $this->getrow(['propertyid' => $pi_propertyid]);\r\n\r\n\t\treturn $lo_property;\r\n\t}", "title": "" }, { "docid": "446af0fff86d42f8caa9af957e27641c", "score": "0.5799377", "text": "public function __get( $key ) {\n\t\tif ( isset( $this->legacy_properties[ $key ] ) ) {\n\t\t\treturn $this->legacy_properties[ $key ];\n\t\t} elseif ( isset( $this->data[ $key ] ) ) {\n\t\t\treturn $this->data[ $key ];\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "69817050f3225d634fbef3849572350f", "score": "0.5793164", "text": "public function __get($key)\n {\n return $this->resolve($key);\n }", "title": "" }, { "docid": "a70bfeb14b8422af1f8264538b30c4a9", "score": "0.5792957", "text": "public function __get($key){\n if(property_exists($this, $key)){\n return $this->$key; \n }\n }", "title": "" }, { "docid": "a99b4f66c37fb5547739f5cfe38e9040", "score": "0.57917273", "text": "public function property($key) { }", "title": "" }, { "docid": "a99b4f66c37fb5547739f5cfe38e9040", "score": "0.57917273", "text": "public function property($key) { }", "title": "" }, { "docid": "287c015817f7315d7a42871d99f6acfa", "score": "0.57821506", "text": "public function __get($key)\n {\n if (isset($this->object->getProperties()[$key])) {\n return $this->property($key);\n }\n\n return parent::__get($key);\n }", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.57528627", "text": "public function get($key);", "title": "" }, { "docid": "2f1339c0e986223e47612bac58083fd9", "score": "0.57464004", "text": "public function __get($key)\n {\n return $this->record->{$key};\n }", "title": "" }, { "docid": "5f7d4f5f7402bcb8dc04e441dee49ac9", "score": "0.5746024", "text": "public function __get($key) {\r\n return $this->$key;\r\n }", "title": "" }, { "docid": "9860c0452fe83b2dd18e8e644b8e7a4a", "score": "0.5734825", "text": "public static function get($key);", "title": "" }, { "docid": "570b51af685d34fac57425bad8b48db7", "score": "0.57252634", "text": "public function get($id, $key) {\n\t\t\t// Create statement\n\t\t\t$statement = $this->database->getStatement('SELECT '.$this->database->escapeString($key).' FROM settings WHERE id=?');\n\n\t\t\t// Bind and execute statement\n\t\t\t$statement->bind_param('i', $id);\n\t\t\t$statement->execute();\n\n\t\t\t// Return status\n\t\t\treturn $statement->get_result()->fetch_array()[0];\n\t\t}", "title": "" }, { "docid": "9cf5d16e877336a886633ba7277f9c21", "score": "0.5708789", "text": "public function __get( $key ) {\n\t\treturn $this->country->$key;\n\t}", "title": "" }, { "docid": "0587bac698483c4fa97983d2666c7f69", "score": "0.5703376", "text": "public function get($key) {\n \treturn $this->p_get($this->get_root(), $key); \n }", "title": "" }, { "docid": "45fd66f4f3f2caaaf1cf6361cdadf54c", "score": "0.5702379", "text": "public function get(?string $p_key = null);", "title": "" }, { "docid": "b6b79eaed2a45d433f2645d246bfc6c1", "score": "0.57006407", "text": "public function offsetGet( $key )\n\t{\n\t\t//if key references name or value properties,\n\t\t//get them\n\n\t\tif( in_array( $key, ['name', 'value'] ) )\n\t\t{\n\n\t\t\treturn $this->{'get'.ucfirst($key)}();\n\n\t\t}\n\n\t\t//else attempt to get an Item\n\n\t\treturn $this->getItem( $key );\n\t\t\n\t}", "title": "" }, { "docid": "c762322a390a3d78ed4aff2effd4c850", "score": "0.5699981", "text": "protected function prop(string $key = null)\n {\n return Arr::get($this->props, $key);\n }", "title": "" }, { "docid": "fb64e30451765a9f3b7ef1cd6940ed21", "score": "0.56981045", "text": "public function __get($key)\n {\n return $this->$key;\n }", "title": "" } ]
7fcc152530183a2589346cae44ba36e1
permit to extend the template engine with custom functions
[ { "docid": "9e8c4cd9dc5afa12128d4a9799086e50", "score": "0.0", "text": "public static function extend($method) {\n if (is_array($method)) {\n if (count($method) == 2 && method_exists($method[0], $method[1])) {\n array_push(self::$_extends, ['class' => $method[0], 'method' => $method[1]]);\n }\n else {\n throw new MissingTemplateException('You c\\'ant extend the template engine with the method : \"' . $method[0] . '\"');\n }\n }\n else {\n $trace = debug_backtrace();\n\n if (isset($trace[1])) {\n array_push(self::$_extends, ['class' => '\\\\' . $trace[1]['class'], 'method' => $method]);\n }\n else {\n throw new MissingTemplateException('Can\\'t reach the method \"' . $method . '\"');\n }\n }\n }", "title": "" } ]
[ { "docid": "522f688cf9d4ebf75ff5dc87c2bb71e4", "score": "0.74581575", "text": "public function include_template_functions() {\n\n\t}", "title": "" }, { "docid": "f2b4609e4828c7d452d1eeafdf3c027c", "score": "0.7065441", "text": "public function template();", "title": "" }, { "docid": "1491bae0fff23e8153c9e5af6cccf43e", "score": "0.6837585", "text": "protected function _content_template()\n {\n\n }", "title": "" }, { "docid": "1491bae0fff23e8153c9e5af6cccf43e", "score": "0.6837585", "text": "protected function _content_template()\n {\n\n }", "title": "" }, { "docid": "aa6203dd07fc64a46ccf4f1a83726093", "score": "0.680017", "text": "private static function addFunctions()\n {\n \tself::$twig->addFunction(new \\Twig_SimpleFunction('asset', function ($asset) {\n return sprintf('%s', ltrim($asset, '/'));\n\t\t}));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('getBaseUrl', function () {\n return getBaseUrl();\n }));\n\n self::$twig->addFunction(new \\Twig_SimpleFunction('csrf_token', function () {\n return csrf_token();\n }));\n }", "title": "" }, { "docid": "be8d4cdefedabfbb4cbd16582f18b306", "score": "0.66723144", "text": "protected function addTemplateFunctionConfigs()\n {\n // TODO: add twig template function configs\n }", "title": "" }, { "docid": "f3a27eea3c0ceab01273b0aee79cf984", "score": "0.6645566", "text": "protected function _content_template() {\n \n }", "title": "" }, { "docid": "dd7f12727c162b7a39c3fc48b4d2b2bc", "score": "0.6624249", "text": "protected function _content_template() {\n\t}", "title": "" }, { "docid": "0c2271782559c388a8b85ac936d07a69", "score": "0.65427893", "text": "protected function content_template()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "212254960a50e2556e857ba3b26ae5c5", "score": "0.6510775", "text": "protected function render_template()\n {\n }", "title": "" }, { "docid": "212254960a50e2556e857ba3b26ae5c5", "score": "0.6510775", "text": "protected function render_template()\n {\n }", "title": "" }, { "docid": "212254960a50e2556e857ba3b26ae5c5", "score": "0.6510775", "text": "protected function render_template()\n {\n }", "title": "" }, { "docid": "212254960a50e2556e857ba3b26ae5c5", "score": "0.6510074", "text": "protected function render_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.6493906", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.6493906", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.6493906", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.6493906", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.6493906", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "5de0203771483dc376ec4e201d16c88f", "score": "0.6493906", "text": "protected function content_template()\n {\n }", "title": "" }, { "docid": "baaa308729edc7f0e6911dc22704024d", "score": "0.6467482", "text": "function getFunctionTemplate();", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "36d07bf6879de7275a3ef9e9e729a4fc", "score": "0.6441973", "text": "public function content_template()\n {\n }", "title": "" }, { "docid": "9278277ba1b92a378bd9c1d7b6bddf2a", "score": "0.64004266", "text": "public function initTemplate() {}", "title": "" }, { "docid": "8856a6ad9c8bef095c2e3ce986f55591", "score": "0.638454", "text": "function get_template()\n {\n }", "title": "" }, { "docid": "d045a5fc7c949bea41e7c2ca51322b87", "score": "0.637308", "text": "public function get_custom_templates()\n {\n }", "title": "" }, { "docid": "ffef816fdeacd365697eb7fe4e4a85c7", "score": "0.63627607", "text": "protected function setupTemplate() {\r\n \r\n }", "title": "" }, { "docid": "822a65bff58d213564bddf0cad8fff45", "score": "0.6343254", "text": "public function include_template_functions() {\n\t\t\tinclude_once( 'inc/frontend/wd-template-functions.php' );\n\t\t}", "title": "" }, { "docid": "132b7828230c87e39547c221d5560310", "score": "0.6221879", "text": "public function addExtHelpers()\n\t{\n\t\t# site-context-dependent JS support file for Extjs\n\t\t$render = $this->getTemplate('izomi_extjs_helpers');\n\t\treturn $render;\n\t}", "title": "" }, { "docid": "abefa3aac70e181670f5feb88c65a4e5", "score": "0.6210348", "text": "protected function _content_template() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore\n\t\t$this->content_template();\n\t}", "title": "" }, { "docid": "03991f41fc033abc4b9372f48f727c7b", "score": "0.615455", "text": "private function addTwigFunctions() : void\n {\n $config = $this->viewConfig;\n\n if (isset($config['twig_functions'])) {\n foreach ($config['twig_functions'] as $name => $function) {\n if (is_callable($function)) {\n $fn = new TwigFunction($name, $function);\n $this->template->addFunction($fn);\n }\n }\n }\n }", "title": "" }, { "docid": "0e3806d88a3ca8b6e1bae61c73bf507a", "score": "0.60891175", "text": "function getSourceTemplate();", "title": "" }, { "docid": "d96716c2367f75e09116d6a59d7bc208", "score": "0.60711676", "text": "public function getModuleTemplate() {}", "title": "" }, { "docid": "d96716c2367f75e09116d6a59d7bc208", "score": "0.60711676", "text": "public function getModuleTemplate() {}", "title": "" }, { "docid": "2af7637d7dc81c9a947b5f30d4cc6bf4", "score": "0.6070005", "text": "function getCombinedTemplate();", "title": "" }, { "docid": "ca403ad95d942f97f7abead51d25064c", "score": "0.60678816", "text": "public function template(){\n\n\t\tinclude_once \"views/template.php\";\n\n\t}", "title": "" }, { "docid": "9dd7e45a60b0e8e899162b8e8045f9be", "score": "0.60457665", "text": "public function generate()\n {\n if (TL_MODE == 'BE')\n {\n $objTemplate = new \\BackendTemplate('be_wildcard');\n \n $objTemplate->wildcard = '### EINSATZLISTE ###';\n $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\n \n return $objTemplate->parse();\n }\n \n return parent::generate();\n }", "title": "" }, { "docid": "9da7b16f4a6f4e29a6759a0173bc45bb", "score": "0.60412264", "text": "function common(){\n\n $this->View->add('nav', 'primary_navigation')\n ->add('layout', 'sidebar')\n ->add('main_sidebar', 'sidebar-primary')\n ->add('main_class', 'col-sm-8')\n ->add('read_more_text', 'MORE')\n ->add('content_template', $this->View->get(\"base_template\"))\n\n //base_template is a reserved keyword. by default, $base_template\n //is the current template being used. If base_template value is\n //changed wordpress will include the new base_template value\n \n //->add('base_template', locate_template(\"base.php\"));\n ;\n }", "title": "" }, { "docid": "8760429e311280e275523af73e312ccb", "score": "0.60272443", "text": "function render_template() {\n ob_start();\n if (func_num_args() > 1)\n extract(func_get_arg(1));\n include func_get_arg(0);\n return ob_get_clean();\n}", "title": "" }, { "docid": "e11c35e9de3029292e7639e9e848e549", "score": "0.6027107", "text": "public function hook()\n {\n add_filter('template_include', array($this, 'overrideTemplate'), 10, 1);\n }", "title": "" }, { "docid": "7f6620f30e900b66ec38bdc2a2f1bef4", "score": "0.6024859", "text": "protected function compile()\r\n\t{\r\n\t\tif (TL_MODE == 'BE')\r\n\t\t{\r\n\t\t\t$this->strTemplate = 'be_wildcard';\r\n\r\n\t\t\t$this->Template = new Contao\\BackendTemplate($this->strTemplate);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "79396cce03ea11f840d96988986c89f1", "score": "0.60087067", "text": "function __render(){\r\n\tTemplate::getInstance()->renderPartial();\r\n}", "title": "" }, { "docid": "35b80d498f5fece86f4213997464db03", "score": "0.5996887", "text": "protected function setTemplateVariables() {}", "title": "" }, { "docid": "80ef0efb3d7a1253c9efd3d64c87dfff", "score": "0.5993778", "text": "public function render_content() {\n\n\t}", "title": "" }, { "docid": "26d0006e3559ed9de2ea71ac4b7d1a6c", "score": "0.5987851", "text": "function load_template()\n{\n $CI =& get_instance();\n $CI->load->library('sistema');\n $CI->parser->parse($CI->sistema->tema['template'],get_tema());\n}", "title": "" }, { "docid": "bb243ef2ea608a426e8608ee9963ccdc", "score": "0.5980425", "text": "public function generate()\n {\n \n if (TL_MODE == 'BE') {\n $template = new \\BackendTemplate('be_wildcard');\n \n $template->wildcard = 'pdfbo';\n //$template->title = $this->headline;\n $template->title = \"\";\n $template->id = $this->id;\n $template->link = $this->name;\n $template->href = 'contao?do=themes&amp;table=tl_module&amp;act=edit&amp;id='.$this->id;\n \n return $template->parse();\n }\n \n return parent::generate();\n }", "title": "" }, { "docid": "c4964e5d8be449df77cfe09e69193475", "score": "0.5979362", "text": "public function load_template_methods()\n\t{\n\t\tif (!$this->modtemplates)\n\t\t{\n\t\t\trequire_once(cms_join_path(dirname(__FILE__), 'module_support', 'modtemplates.inc.php'));\n\t\t\t$this->modtemplates = true;\n\t\t}\n\t}", "title": "" }, { "docid": "76839fbcc0c97f2bff7a87fd1087b095", "score": "0.5971062", "text": "public function generate()\r\n\t{\r\n\t\tif (TL_MODE == 'BE')\r\n\t\t{\r\n\t\t\t$objTemplate = new BackendTemplate('be_wildcard');\r\n\t\t\t$objTemplate->wildcard = '### ISOTOPE ECOMMERCE: KIENER CUSTOM FILTER ###';\r\n\t\t\t$objTemplate->title = $this->headline;\r\n\t\t\t$objTemplate->id = $this->id;\r\n\t\t\t$objTemplate->link = $this->name;\r\n\t\t\t$objTemplate->href = $this->Environment->script.'?do=modules&amp;act=edit&amp;id=' . $this->id;\r\n\r\n\t\t\treturn $objTemplate->parse();\r\n\t\t}\r\n\t\t\r\n\t\treturn parent::generate();\r\n\t}", "title": "" }, { "docid": "4c2e9a084baa3254a91a7a354eb7c8eb", "score": "0.5961365", "text": "function usage()\n{\nob_start(); \n?>\nThis plugin will run the content inside the tag through EE's typographic parser. For example, the following EE Tag:\n\n{exp:ee_typography}Here's some [b]sample[/b] text with some pMcode and quotes inside it.{/exp:ee_typography}\n\n\nWould be rendered as:\n\n<p>Here&#1217;s some <b>sample</b> text with some pMcode and quotes inside it.</p>\n\n\nPARAMETERS:\n\nformatting=\nSet the text formatting to use on the content. Allowed values are 'xhtml', 'br', 'none', or 'lite'. Default value is 'xhtml'. Ex:\n\n {exp:ee_typography formatting=\"none\"}\n\n\nallowed_html=\nSet what HTML is allowed in the content. Valid values are 'safe', 'all', or 'none'. Default value is 'safe'. Ex:\n\n {exp:ee_typography allowed_html=\"none\"}\n\n\nauto_link=\nThis determines whether or not URLs in the content are automatically turned into links. Valid values are 'y' or 'n'. Default value is 'y'. Ex:\n\n {exp:ee_typography auto_link=\"n\"}\n\n\nallow_image_urls=\nThis determines whether URLs to images will be displayed as an image in the content. Valid values are 'y' or 'n'. Default value is 'n'. Ex:\n\n {exp:ee_typography allow_image_urls=\"y\"}\n\n\n<?php\n$buffer = ob_get_contents();\n\t\nob_end_clean(); \n\nreturn $buffer;\n}", "title": "" }, { "docid": "c900623ebe7a3873607695c6cafb44be", "score": "0.5954608", "text": "public function getFunctions()\n {\n //Function definition\n return array(\n 'tyhand_docdownloader_url' => new \\Twig_Function_Method($this, 'url', array('is_safe' => array('html')))\n );\n }", "title": "" }, { "docid": "72a081e388b0fb04d267e54348149fad", "score": "0.5949471", "text": "function add_to_twig($twig){\n\t\t\t$twig->addExtension(new Twig_Extension_StringLoader());\n\t\t\t$twig->addFilter('myfoo', new Twig_Filter_Function('myfoo'));\n\t\t\treturn $twig;\n\t}", "title": "" }, { "docid": "484142f30a39428a3dfc4055094c789d", "score": "0.5933876", "text": "protected function createTemplateFunctions()\n {\n if (!function_exists('wpml_mailto')):\n function wpml_mailto($email, $display = null, $attrs = array())\n {\n if (is_array($display)) {\n // backwards compatibility (old params: $display, $attrs = array())\n $attrs = $display;\n $display = $email;\n } else {\n $attrs['href'] = 'mailto:'.$email;\n }\n\n return WPML::get('front')->protectedMailto($display, $attrs);\n }\n endif;\n\n if (!function_exists('wpml_filter')):\n function wpml_filter($content)\n {\n return WPML::get('front')->filterContent($content);\n }\n endif;\n }", "title": "" }, { "docid": "428bad2020ed85ab682ab1d83e7fbd0d", "score": "0.5930786", "text": "function defaultTemplate() {\n\t\t$l = $this->api->locate('addons',__NAMESPACE__,'location');\n\t\t$addon_location = $this->api->locate('addons',__NAMESPACE__);\n\t\t$this->api->pathfinder->addLocation($addon_location,array(\n\t\t\t//'js'=>'templates/js',\n\t\t\t//'css'=>'templates/css',\n //'template'=>'templates',\n\t\t))->setParent($l);\n\n //return array('view/lister/tags');\n return parent::defaultTemplate();\n }", "title": "" }, { "docid": "52f7ad904ff6b5f885207c209a36435d", "score": "0.5927577", "text": "abstract public function getTemplate();", "title": "" }, { "docid": "534fd8452f59d64813054d0213ee7556", "score": "0.59166986", "text": "public function getFunctions()\n {\n return array(\n 'renderInfo' => new \\Twig_Function_Method($this, 'renderInfo', array(\"is_safe\" => array(\"html\"))),\n );\n }", "title": "" }, { "docid": "182fbfbb312165c5b21c780d102d0c21", "score": "0.5906597", "text": "private function moduleContent()\t{\n\t\tglobal $LANG;\n\t\t$this->smarty = tx_smarty::smarty();\n\t\t$this->smarty->setTemplateDir('EXT:'.$this->extension.'/mod_kickadmin/res');\n\t\t$this->smarty->setSmartyVar('caching', $this->cacheSmarty);\n\t\t$this->smarty->setSmartyVar('compile_dir', 'typo3temp/smarty_compile');\n\t\t$this->smarty->setSmartyVar('cache_dir', 'typo3temp/smarty_cache');\n\t\t$this->smarty->registerPlugin('function', 'createDirectory', array('tx_kbkickstarter_Hooks_Smarty_CreateDirectory', 'createDirectory'));\n\t\t$this->smarty->assign('configObj', $this->configObj);\n\t\t$this->smarty->assign('extension', $this->extension);\n\n\t\t$function = $this->MOD_SETTINGS['function'];\n\t\tswitch ($function) {\n\t\t\tcase 'genConfig':\n\t\t\tcase 'configExt':\n\t\t\t\t$class = __CLASS__.'_'.$function;\n\t\t\t\t$kickadmin_mod = t3lib_div::makeInstance($class);\n\t\t\t\t$kickadmin_mod->init($this, $this);\n\t\t\t\t$content = $kickadmin_mod->moduleContent();\n\t\t\t\t$this->content .= $this->doc->section($LANG->getLL('function_'.$function), $content);\n\t\t\tbreak;\n/*\n\t\t\t\trequire_once(PATH_kb_kickstarter.'mod_kickadmin/class.tx_kbkickstarter_kickadmin_genTCA.php');\n\t\t\t\t$kickadmin_genTCA = t3lib_div::makeInstance('tx_kbkickstarter_kickadmin_genTCA');\n\t\t\t\t$kickadmin_genTCA->init($this, $this);\n\t\t\t\t$content = $kickadmin_genTCA->moduleContent_genTCA($this);\n\t\t\t\t$this->content .= $this->doc->section($LANG->getLL('function_regenerate'), $content);\n\t\t\tbreak;\n\t\t\tcase 'config_ext':\n\t\t\t\trequire_once(PATH_kb_kickstarter.'mod_kickadmin/class.tx_kbkickstarter_kickadmin_configExt.php');\n\t\t\t\t$kickadmin_configExt = t3lib_div::makeInstance('tx_kbkickstarter_kickadmin_configExt');\n\t\t\t\t$kickadmin_configExt->init($this, $this);\n\t\t\t\t$content = $kickadmin_configExt->moduleContent_configExt($this);\n\t\t\tbreak;\n*/\n\t\t} \n\t}", "title": "" }, { "docid": "47daedce95e3a64a359aba57a3d396d8", "score": "0.5904803", "text": "public function get_template()\n {\n }", "title": "" }, { "docid": "47daedce95e3a64a359aba57a3d396d8", "score": "0.5904765", "text": "public function get_template()\n {\n }", "title": "" }, { "docid": "3f04befb4ab211c2859859941265d0d7", "score": "0.5900435", "text": "public function generate()\n\t{\n\t\tif (TL_MODE == 'BE')\n\t\t{\n\t\t\t$objTemplate = new \\BackendTemplate('be_wildcard');\n\n\t\t\t$objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['Electricity'][0]) . ' ###';\n\t\t\t$objTemplate->title = $this->headline;\n\t\t\t$objTemplate->id = $this->id;\n\t\t\t$objTemplate->link = $this->name;\n\t\t\t$objTemplate->href = 'contao/main.php?do=themes&amp;table=tl_module&amp;act=edit&amp;id=' . $this->id;\n\n\t\t\treturn $objTemplate->parse();\n\t\t}\n\t\t\n\t\treturn parent::generate();\n\t}", "title": "" }, { "docid": "b864df4fadfbf6f155a67100069d9428", "score": "0.5899214", "text": "function add_function ( $name ) {\r\n $this->_twig->addFunction( $name, new Twig_Function_Function( $name ) );\r\n }", "title": "" }, { "docid": "8d8e559d083bd87eafeacb6ef4cbb8e8", "score": "0.58920413", "text": "protected function render() {\n\t\t\n\t}", "title": "" }, { "docid": "0d11aa6699cd38e89b5dbf4e5e725e18", "score": "0.58905315", "text": "protected function template()\n\t{\n\t\treturn Phpfox::getLib('template');\t\n\t}", "title": "" }, { "docid": "d8b4ef4d7786d09731e34b60f320aa0f", "score": "0.58863133", "text": "function make_all_functions_avaible_for_twig () {\r\n $this->CI->config->set_item( 'reveal_all_functions_to_twig', true );\r\n $get_defined_functions = get_defined_functions();\r\n\r\n foreach ( $get_defined_functions[ 'user' ] as $function ) {\r\n if ( ! isset( $this->_twig->$function ) ) {\r\n $this->_twig->addFunction( $function, new Twig_Function_Function( $function ) );\r\n }\r\n }\r\n\r\n unset( $get_defined_functions );\r\n }", "title": "" }, { "docid": "6df919052fe006585886ac833b7908b8", "score": "0.58846205", "text": "public function getHtmlTemplate() {}", "title": "" }, { "docid": "06f2bd5951c61d71d4bb85547fb54dfe", "score": "0.58774763", "text": "protected function initDocumentTemplate() {}", "title": "" }, { "docid": "06f2bd5951c61d71d4bb85547fb54dfe", "score": "0.58774763", "text": "protected function initDocumentTemplate() {}", "title": "" }, { "docid": "06f2bd5951c61d71d4bb85547fb54dfe", "score": "0.58774763", "text": "protected function initDocumentTemplate() {}", "title": "" }, { "docid": "06f2bd5951c61d71d4bb85547fb54dfe", "score": "0.5876168", "text": "protected function initDocumentTemplate() {}", "title": "" }, { "docid": "e0d006d0af3d9150b87a6dc398515eb5", "score": "0.58575124", "text": "function quick_view_template()\n\t{\n\t\tinclude(WP_PLUGIN_DIR.'/scatalog/templates/quick_view.php');\n\t}", "title": "" }, { "docid": "fa8e4c629f3ec3ca2401498877d93065", "score": "0.5853543", "text": "function add_to_twig( $twig ) {\n\t\t// $twig->addExtension( new Twig_Extension_StringLoader() );\n\t\t// $twig->addFilter('myfoo', new Twig_SimpleFilter('myfoo', array($this, 'myfoo')));\n\t\treturn $twig;\n\t}", "title": "" }, { "docid": "5dba43bac1058473862585277407f5af", "score": "0.5844937", "text": "public function getFunctions()\n {\n return array(\n 'tinymce_init' => new \\Twig_SimpleFunction(\n 'tinymce_init',\n array($this, 'tinymceInit'),\n array('is_safe' => array('html'))\n ),\n );\n }", "title": "" }, { "docid": "87e627e59276befd401f650dd819659f", "score": "0.5844103", "text": "function ETemplates($file = null,$tmpl = null) {\n\t\t\t$this -> load_all_block();\n\t\t\tglobal $econfig;\n\t \tglobal $head_meta_key,$head_meta_des,$title,$array_meta;\n\t\t\t$etemplate = $econfig -> etemplate?$econfig -> etemplate:'default';\n\t \t$this -> tmpl_name = 'estores/'.$etemplate;\n\t $this->file = $file;\n\t $this->tmpl = $tmpl;\n\t $this->head_meta_key = $econfig ->keywords; \n\t $this->head_meta_des = $econfig -> estore_intro; \n\t \n\t $title = $econfig -> estore_name;\n\t\t\t$this -> array_meta = $array_meta;\n\t $this->title = str_replace(chr(13),'',htmlspecialchars( $title));\n\t \n\t // default:\n\t $this->style = array(); \n\t $this->script_top = array(); \n\t $this->script_bottom = array(); \n\t \n\t\t\t$file_css = URL_ROOT.\"templates\".\"/\".$this->tmpl_name.\"/\".\"css\".\"/templates.css\";\n\t array_push($this->style, $file_css);\n\t\t\t\n \t \t\tarray_push($this->script_bottom,URL_ROOT.\"libraries/jquery/jquery_1.4.1.min.js\");\n//\t array_push($this->script_bottom,URL_ROOT.\"templates/default/js/main.js\");\n\n\t //add plugin\n//\t include_once 'plugins/counter/counter.php';\n//\t $counter = Counter::updateHit();\n\t }", "title": "" }, { "docid": "a928ae62e0a697aa814e7801a2fa5215", "score": "0.5843508", "text": "function render() {}", "title": "" }, { "docid": "b435c6100c8803916caae58ba6fd7055", "score": "0.5821995", "text": "public function before_render() {}", "title": "" }, { "docid": "27fe30313d58dde4bb111257e67e8d2e", "score": "0.5821374", "text": "public function beforeTemplate(){\n\t\t//defaults to empty\n\t}", "title": "" }, { "docid": "12ce5e110d587df70b39d661167b079f", "score": "0.58163494", "text": "public function getGathercontentTemplate();", "title": "" }, { "docid": "392ab311ff9a635019073b2393cbfbbf", "score": "0.5812448", "text": "function add_to_twig($twig) {\n $twig->addExtension(new \\Twig_Extension_StringLoader());\n $twig->addFunction(new \\Twig_SimpleFunction('script', 'CodekippleWPTheme\\Timber\\Site\\script'));\n $twig->addFunction(new \\Twig_SimpleFunction('css', 'CodekippleWPTheme\\Timber\\Site\\css'));\n $twig->addFilter('body_class', new \\Twig_Filter_Function('CodekippleWPTheme\\Timber\\Site\\body_class'));\n\n return $twig;\n }", "title": "" }, { "docid": "0ee6d25aea476ae17115acd9fb5188f4", "score": "0.5810172", "text": "private function addTwigExtensions() : void\n {\n $config = $this->viewConfig;\n\n if (isset($config['twig_extensions'])) {\n foreach ($config['twig_extensions'] as $extension => $options) {\n $this->template->addExtension(new $extension($this->template, $options));\n }\n }\n }", "title": "" }, { "docid": "c8696b9baddc9abbc9f51a247e3b8889", "score": "0.5810155", "text": "function register_block_core_template_part()\n {\n }", "title": "" }, { "docid": "1bbd0957747c342f7d7f1aae280f5394", "score": "0.5806594", "text": "function render() ;", "title": "" }, { "docid": "fe0664bf195fcd62b3fe4579453144c9", "score": "0.57932633", "text": "function add_to_twig($twig){\n $twig->addExtension(new Twig_Extension_StringLoader());\n $twig->addFunction('file_exists', new Twig_Function_Function('file_exists'));\n $twig->addFunction('environment', new Twig_Function_Function('get_environment'));\n return $twig;\n }", "title": "" }, { "docid": "300540fb0384cb3bee63e3642258f7cd", "score": "0.57931274", "text": "public function generate()\r\n {\r\n if (TL_MODE == 'BE')\r\n {\r\n $objTemplate = new \\BackendTemplate('be_wildcard');\r\n \r\n $objTemplate->wildcard = '### ' . utf8_strtoupper($GLOBALS['TL_LANG']['FMD']['bericht_list'][0]) . ' ###';\r\n $objTemplate->title = $this->headline;\r\n $objTemplate->id = $this->id;\r\n $objTemplate->link = $this->name;\r\n $objTemplate->href = 'contao/main.php?do=themes&table=tl_module&act=edit&id=' . $this->id;\r\n \r\n return $objTemplate->parse();\r\n }\r\n \r\n return parent::generate();\r\n }", "title": "" }, { "docid": "2384660f3f63de3ac3e4c5962256925b", "score": "0.57920873", "text": "public function getTemplateEngine() {\n\t\treturn parent::getTemplateEngine();\n\t}", "title": "" }, { "docid": "ef0c97f33a3ad9bce82e36dcc8cda22d", "score": "0.5789402", "text": "protected function _beforeToHtml()\n {\n\n }", "title": "" }, { "docid": "2c05e21e6a8339803047245afea22f35", "score": "0.5787254", "text": "function tpl_add_content()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2c05e21e6a8339803047245afea22f35", "score": "0.5787254", "text": "function tpl_add_content()\n\t{\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e218326604fe9d990fa36376a4130f98", "score": "0.57832503", "text": "protected function render() {}", "title": "" }, { "docid": "e218326604fe9d990fa36376a4130f98", "score": "0.57832503", "text": "protected function render() {}", "title": "" }, { "docid": "e218326604fe9d990fa36376a4130f98", "score": "0.578212", "text": "protected function render() {}", "title": "" }, { "docid": "19df50a2d6590e0bfdc0ea05d6bae34b", "score": "0.5775496", "text": "protected function render() {\n\n\n\t}", "title": "" }, { "docid": "4d39998fb7705fed9a71ece7eb8565ad", "score": "0.57568514", "text": "function _preview_theme_template_filter()\n {\n }", "title": "" }, { "docid": "652f21e884851900f6fc1bbf4c9c1ef6", "score": "0.57561415", "text": "protected function template() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "9efeca0126ea5d08f86326693c606697", "score": "0.5737267", "text": "function _add_template_loader_filters()\n {\n }", "title": "" }, { "docid": "82cf6e30847354a42154cf45ebe024ff", "score": "0.5737221", "text": "function xh_templateMapping($name)\r\n\t{\r\n\t}", "title": "" } ]
c345fa07b367a4c976444f6bf1e8c46e
Returns the winner from the current game, if any
[ { "docid": "62f603a462e128e12645d4bcd5f93957", "score": "0.52806616", "text": "public function getWinner(array $boardState)\n {\n $game = TicTacToe::createFromArray($boardState, $this->getFirstPiece($boardState));\n return $game->getWinner();\n }", "title": "" } ]
[ { "docid": "ed07ef05107af4391e67c32fde9f81f0", "score": "0.7701108", "text": "function getGamePlayerWinner()\n\t{\n\t\tif (isset($this->curr_game)) {\n\t\t\t$query = \"select player from pkr_game_win where seat>0 and idtable=\".$this->curr_table.\" and game=\".$this->curr_game;\n\t\t\treturn $GLOBALS['mydb']->select_singlefield($query, \"player\");\n\t\t}\n\t\telse\n\t\t\treturn null;\t\t\t\n\t}", "title": "" }, { "docid": "ed1c612df3595c165fe17ac994a6fabc", "score": "0.75420225", "text": "public function winner(): ?string\n {\n if ($this->isEnded && !$this->winner) {\n return 'draw';\n }\n\n return $this->winner;\n }", "title": "" }, { "docid": "ae3ae76123e7e01132c590b1bfc2566c", "score": "0.73674154", "text": "public function getWinner();", "title": "" }, { "docid": "ffe190b16784d285b5e81ca2c2c4f2d5", "score": "0.69963676", "text": "public function battle()\n {\n // heroA wins ties for now because I'm lame.\n if ($this->heroA->attr == $this->heroB->attr) {\n $this->winner = $this->heroA;\n }\n elseif ($this->heroA->attr > $this->heroB->attr) {\n $this->winner = $this->heroA;\n } else {\n $this->winner = $this->heroB;\n }\n // Return the match winner.\n return $this->winner;\n }", "title": "" }, { "docid": "e750788e02e8b589df9074aef2fc9cb4", "score": "0.6933464", "text": "public function win() {\n return $this->state == Game::STATE_FINISHED && $this->winner_id == $this->currentPlayer()->id;\n }", "title": "" }, { "docid": "89b90d0bfa9e52a9dd1abf0540d1aaf1", "score": "0.6921418", "text": "function getWinner();", "title": "" }, { "docid": "b71e09acea263e6c77b26401d342828e", "score": "0.6825289", "text": "public function winningTeam()\n {\n return $this->game->winningTeam();\n }", "title": "" }, { "docid": "c042dd87d4bb60c03362f8cefc50c61a", "score": "0.6813549", "text": "public function playGame()\n {\n if ($this->computerMove == $this->playerMove) {\n $result = \"tie\"; # The game is a tie; no winner\n } elseif (($this->playerMove =='rock' and $this->computerMove == 'scissors') ||\n ($this->playerMove == 'paper' and $this->computerMove == 'rock') ||\n ($this->playerMove == 'scissors' and $this->computerMove == 'paper')) {\n $result = \"win\"; # The player wins\n } elseif (($this->playerMove== 'rock' and $this->computerMove =='paper') ||\n ($this->playerMove == 'paper' and $this->computerMove == 'scissors')||\n ($this->playerMove == 'scissors' and $this->computerMove == 'rock')) {\n $result = \"loss\"; # The player loses\n }\n return $result;\n }", "title": "" }, { "docid": "7b81d6e43ac4837dc8a80fb3f34e60b0", "score": "0.674094", "text": "public function isWinner(): bool\n {\n return $this->winner;\n }", "title": "" }, { "docid": "a4a9ba9f73d08243e95261c1755f4b33", "score": "0.6611642", "text": "public function check_for_winner_or_draw($game_array)\n\t\t{\n\t\t\t$present_possible_winner \t= \"\";\n\t\t\t$count_to_win \t\t\t\t= 0;\n\t\t\t$game_not_a_draw\t\t\t= FALSE;\n\t\t\t\n\t\t\tfor($i = 0; $i < $this->board_length; $i++)\n\t\t\t{\n\t\t\t\tfor($j = 0; $j < $this->board_width; $j++)\n\t\t\t\t{\n\t\t\t\t\t// start checking for a winner\n\t\t\t\t\tif($game_array[$i][$j] !== \"_\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$present_possible_winner = $game_array[$i][$j]; \n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for a winner horizontally\n\t\t\t\t\t\tfor($x = 0; $x < 4; $x++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($j+$x < $this->board_width)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($game_array[$i][$j+$x] === $present_possible_winner)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$count_to_win = $count_to_win + 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}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($count_to_win > 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $present_possible_winner;\t// this player has won\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$count_to_win = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for a winner horizontally\n\t\t\t\t\t\tfor($y = 0; $y < 4; $y++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($i+$y < $this->board_width)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($game_array[$i+$y][$j] === $present_possible_winner)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$count_to_win = $count_to_win + 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}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($count_to_win > 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $present_possible_winner;\t// this player has won\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$count_to_win = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for a winner up to down diagonal\n\t\t\t\t\t\tfor($z = 0; $z < 4; $z++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(($i+$z < $this->board_width) && ($j+$z < $this->board_length))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($game_array[$i+$z][$j+$z] === $present_possible_winner)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$count_to_win = $count_to_win + 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}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($count_to_win > 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $present_possible_winner;\t// this player has won\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$count_to_win = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// check for a winner down to up diagonal\n\t\t\t\t\t\tfor($w = 0; $w < 4; $w++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(($i+$w < $this->board_width) && ($j-$w >= 0))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($game_array[$i+$w][$j-$w] === $present_possible_winner)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$count_to_win = $count_to_win + 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}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($count_to_win > 3)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $present_possible_winner;\t// this player has won\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$count_to_win = 0;\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// check for a drawed game and return accordingly\n\t\t\tfor($i = 0; $i < $this->board_length; $i++)\n\t\t\t{\n\t\t\t\tfor($j = 0; $j < $this->board_width; $j++)\n\t\t\t\t{\n\t\t\t\t\tif($game_array[$i][$j] === \"_\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$game_not_a_draw = TRUE;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(!$game_not_a_draw)\n\t\t\t{\n\t\t\t\treturn 'draw';\n\t\t\t}\n\t\t\t\n\t\t\treturn 'none';\n\t\t}", "title": "" }, { "docid": "716d8826740a607ac278f16c98946145", "score": "0.6570217", "text": "public function winningTeam()\n {\n if($this->home_team_score !== $this->away_team_score){\n $winning_team = $this->home_team_score > $this->away_team_score ? 'homeTeam' : 'awayTeam';\n return $this->{$winning_team};\n }\n return null;\n }", "title": "" }, { "docid": "c4176642dd4e5cd0a8ff79f9a98d7450", "score": "0.65337837", "text": "public function getWinner(): Pokemon\n {\n return $this->winner;\n }", "title": "" }, { "docid": "7a80c120deb4e7ba7309990a86f95f92", "score": "0.6478574", "text": "protected function _test_winner( )\n\t{\n\t\tcall(__METHOD__);\n\n\t\t// check the players and see if there are any more alive\n\t\t$count = 0;\n\t\tforeach ($this->_risk->players as $player) {\n\t\t\tif ( ! in_array($player['state'], ['Resigned', 'Dead'])) {\n\t\t\t\t++$count;\n\t\t\t\t$alive[] = $player['player_id'];\n\t\t\t}\n\t\t}\n\n\t\tif (1 == $count) {\n\t\t\t$this->state = 'Finished';\n\t\t}\n\t}", "title": "" }, { "docid": "f51e40f053158b73dd9492210140f56e", "score": "0.6475832", "text": "public function checkWinner()\n {\n for ($i = 0; $i < count($this->players); $i++) {\n if ($this->players[$i]->total >= 100) {\n return $this->players[$i];\n }\n }\n return false;\n }", "title": "" }, { "docid": "fb7cbb259f9eb85720567b68aeaa228e", "score": "0.63713264", "text": "function matchWinner($bracket)\n\t{\n\t\tif ($bracket['score1'] > $bracket['score2']) {\n\t\t\treturn $bracket['team1'];\n\t\t} else {\n\t\t\treturn $bracket['team2'];\n\t\t}\n\t}", "title": "" }, { "docid": "0a26fa6e70f976a603343a938b276007", "score": "0.63145506", "text": "public function won() {\n if ($this->match->game->home) {\n if ($this->result_one > $this->result_two) {\n return true;\n }\n }\n else {\n if ($this->result_one < $this->result_two) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "72e86377f29c37bd3e52cc12f72f5ead", "score": "0.628409", "text": "public function playAndGetWinnerProvider()\n {\n $rounds = [\n [PlayingStrategyInterface::RESULT_ROCK, PlayingStrategyInterface::RESULT_ROCK, null],\n [PlayingStrategyInterface::RESULT_ROCK, PlayingStrategyInterface::RESULT_SCISSOR, PlayingStrategyInterface::RESULT_ROCK],\n [PlayingStrategyInterface::RESULT_ROCK, PlayingStrategyInterface::RESULT_PAPER, PlayingStrategyInterface::RESULT_PAPER],\n\n [PlayingStrategyInterface::RESULT_SCISSOR, PlayingStrategyInterface::RESULT_ROCK, PlayingStrategyInterface::RESULT_ROCK],\n [PlayingStrategyInterface::RESULT_SCISSOR, PlayingStrategyInterface::RESULT_SCISSOR, null],\n [PlayingStrategyInterface::RESULT_SCISSOR, PlayingStrategyInterface::RESULT_PAPER, PlayingStrategyInterface::RESULT_SCISSOR],\n\n [PlayingStrategyInterface::RESULT_PAPER, PlayingStrategyInterface::RESULT_ROCK, PlayingStrategyInterface::RESULT_PAPER],\n [PlayingStrategyInterface::RESULT_PAPER, PlayingStrategyInterface::RESULT_SCISSOR, PlayingStrategyInterface::RESULT_SCISSOR],\n [PlayingStrategyInterface::RESULT_PAPER, PlayingStrategyInterface::RESULT_PAPER, null],\n ];\n\n foreach ($rounds as $round) {\n $player1Stub = $this->createMock(AbstractPlayer::class);\n $player2Stub = $this->createMock(AbstractPlayer::class);\n $gameParticipate = (new PaperScissorRockGameParticipate())->setPlayer1($player1Stub)->setPlayer2($player2Stub);\n\n $player1Stub->method('getPlayingStrategyClass')->willReturn($round[0]);\n $player2Stub->method('getPlayingStrategyClass')->willReturn($round[1]);\n $winner = null;\n\n if ($round[0] === $round[2]) {\n $winner = $player1Stub;\n }\n\n if ($round[1] === $round[2]) {\n $winner = $player2Stub;\n }\n\n yield [$gameParticipate, $winner];\n }\n }", "title": "" }, { "docid": "bc3e88844f2f758244be8284f69b02df", "score": "0.6254768", "text": "function checkWinner()\n {\n // $player = $_SESSION[\"currentplayer\"];\n $computer = $_SESSION[\"computerturn\"];\n\n if ($computer === false) {\n if ($_SESSION[\"gameroundSum\"] >= 100) {\n $_SESSION[\"haveWinner\"] = \"Spelare 1\";\n } else {\n changePlayer();\n }\n } elseif ($computer === true) {\n if ($_SESSION[\"computersum\"] >= 100) {\n $_SESSION[\"haveWinner\"] = \"datorn\";\n } else {\n changePlayer();\n }\n }\n }", "title": "" }, { "docid": "efe28f32bd111aeb3fc8bf35ecf068cc", "score": "0.62167704", "text": "private function getCurrentGame(): Game\n {\n if (!$this->game) {\n $this->theGameIsSetUp();\n }\n\n return $this->game;\n }", "title": "" }, { "docid": "f8ce437a458f6e15ef91e65ffba0f17a", "score": "0.6193219", "text": "public function getWinner(Game $game): ?Player\n {\n if (!$game->getPlayer1() || !$game->getPlayer2()) {\n return null;\n }\n \n if ($this->hasSunkenFleet($game, $game->getPlayer1())) {\n return $game->getPlayer2();\n } elseif ($this->hasSunkenFleet($game, $game->getPlayer2())) {\n return $game->getPlayer1();\n }\n\n return null;\n }", "title": "" }, { "docid": "91a7f27439dc1380ea924a16b78d8ae8", "score": "0.617953", "text": "public function getNextGame()\r\n\t{\r\n\t\treturn $this->games->getNextGame();\r\n\t}", "title": "" }, { "docid": "15cc560a565423d246767f4eeed79f93", "score": "0.61707795", "text": "function winner($total1, $total2){\nif($total1 > $total2){\n return 'PLAYER 1!';\n} else {\nreturn 'PLAYER 2!';\n}\n}", "title": "" }, { "docid": "838ffcf04408bd12f00b4b42bd6a78a7", "score": "0.61282504", "text": "public function winner($params){\n if($params['id'] && $params['count']){\n return $this->game->winner($params['id'],$params['count']);\n }\n return ['error','8'];\n }", "title": "" }, { "docid": "abd66395e580e8a9e692e82a2051b997", "score": "0.605692", "text": "public function winner($value)\n {\n $this->setProperty('winner', $value);\n return $this;\n }", "title": "" }, { "docid": "5ce6458fab89413e81dd4e15a5f8e863", "score": "0.6023709", "text": "function win()\n {\n return ((self::$board[0][0] + self::$board[0][1] + self::$board[0][2] == self::$player * 3)\n || (self::$board[1][0] + self::$board[1][1] + self::$board[1][2] == self::$player * 3)\n || (self::$board[2][0] + self::$board[2][1] + self::$board[2][2] == self::$player * 3)\n || (self::$board[0][0] + self::$board[1][0] + self::$board[2][0] == self::$player * 3)\n || (self::$board[0][1] + self::$board[1][1] + self::$board[2][1] == self::$player * 3)\n || (self::$board[0][2] + self::$board[1][2] + self::$board[2][2] == self::$player * 3)\n || (self::$board[0][0] + self::$board[1][1] + self::$board[2][2] == self::$player * 3)\n || (self::$board[2][0] + self::$board[1][1] + self::$board[0][2] == self::$player * 3));\n }", "title": "" }, { "docid": "5e29afed5e7c0e05827102e3a594b741", "score": "0.6020247", "text": "public function winner()\n {\n return $this->belongsTo('App\\Models\\Team', 'winner_id');\n }", "title": "" }, { "docid": "1493b3ace826a93cd3fcec462bde441c", "score": "0.5922108", "text": "public function winner()\n {\n return $this->belongsTo(Wrestler::class);\n }", "title": "" }, { "docid": "c17f055858256bcc5ee0a026f98199cf", "score": "0.5918794", "text": "public function stopTheGameIAmWinner()\n {\n return $this->iAmWinner;\n }", "title": "" }, { "docid": "5188a3a6c5bda0795d6a0baeefdc6a28", "score": "0.58671457", "text": "public function losingTeam()\n {\n return $this->game->losingTeam();\n }", "title": "" }, { "docid": "8a0470e51c333abddfa4629731ac5657", "score": "0.58370465", "text": "public static function getWinner($player, $cpu){\n $winner = null;\n switch ($cpu) {\n case 1:\n if ($player == 2) {\n $winner = 'cpu';\n } else if ($player == 3) {\n $winner = 'player';\n } else if ($player == 1) {\n $winner = 'tie';\n }\n break;\n case 2:\n if ($player == 2) {\n $winner = 'tie';\n } else if ($player == 3) {\n $winner = 'cpu';\n } else if ($player == 1) {\n $winner = 'player';\n }\n break;\n case 3:\n if ($player == 2) {\n $winner = 'player';\n } else if ($player == 3) {\n $winner = 'tie';\n } else if ($player == 1) {\n $winner = 'cpu';\n }\n break;\n }\n return $winner;\n }", "title": "" }, { "docid": "586116cc713c9ae72f18563e2e97d71a", "score": "0.5835197", "text": "public function ownCurrentTeam()\n {\n return $this->ownTeam($this->currentTeam());\n }", "title": "" }, { "docid": "3f1f1c833e9efc4c7e1bb1613c30c891", "score": "0.57994556", "text": "function CheckOponentsUpdate()\n{\n session_start();\n $ret = QuerySingleRow(\"SELECT Turn, Outcome, WinnerID FROM `Match` WHERE MatchID = {$_SESSION['matchID']}\");\n \n if( $ret[\"Turn\"] == $_SESSION[\"side\"] && $_SESSION[\"gameState\"] == GameState::WAITING)\n {\n $_SESSION[\"gameState\"] = GameState::TURN;\n GetBoard();\n }\n\n\n if($ret[\"Outcome\"] != 0)\n {\n \n \n switch($ret[\"Outcome\"])\n {\n case 1:\n case 2: \n case -1:\n case 3:\n if($ret[\"WinnerID\"] == $_SESSION[\"userID\"])\n {\n $_SESSION[\"won\"] = 1;\n }\n else\n { \n $_SESSION[\"won\"] = 0;\n }\n $_SESSION[\"outcome\"] = $ret[\"Outcome\"];\n $_SESSION[\"gameState\"] = GameState::GAME_OVER;\n GetBoard();\n break;\n\n case -2:\n if($ret[\"WinnerID\"] == $_SESSION[\"opponentID\"])\n $_SESSION[\"won\"] = -3;\n break;\n }\n\n }\n}", "title": "" }, { "docid": "ecdea05191ef4e21ad25fa68c0d270fd", "score": "0.5798976", "text": "private function getWhoChallengedWhom() {\n\n foreach ($this->players as $player) {\n if ($player->mark === 'X') $challenger = $player;\n if ($player->mark === 'O') $challengee = $player;\n }\n if ($challenger && $challengee) {\n return $challenger->user_name . \" has challenged \" . $challengee->user_name . \"!\";\n }\n }", "title": "" }, { "docid": "670367804097db4775f913c23db642e6", "score": "0.5740993", "text": "public function findCurrentGame($includeNotStarted = true)\n {\n\t$games = $this->findBy(array(), array(\"id\" => \"DESC\"), 1);\n\t$game = $games[0];\n\n\t// Check if we should include not started games\n\tif ($includeNotStarted == false) {\n\t if ($game->isStarted() == false) {\n\t\t// The game is not yet started. We dont want it\n\t\t$game = $this->findOneBy(\n\t\t array(\n\t\t\t'id' => ($game->getId() - 1)\n\t\t )\n\t\t);\n\t }\n\t}\n\n\treturn $game;\n }", "title": "" }, { "docid": "11c7931232e54d340a39be3cde2460f2", "score": "0.57302487", "text": "public function get_winner_rating()\n\t{\n\t\treturn $this->newRatingA;\n\t}", "title": "" }, { "docid": "103660deee7701e06ae9b0cbfd70a23b", "score": "0.5712529", "text": "public function losingTeam()\n {\n $winning_team = $this->winningTeam();\n if($winning_team != null){\n return $this->homeTeam->id == $winning_team->id ? $this->awayTeam : $this->homeTeam;\n }\n return null;\n }", "title": "" }, { "docid": "72685dfefb6adaa84762fdcd4a59d1ed", "score": "0.57022655", "text": "public function current_player() {\n return $this->players[$this->current_player];\n }", "title": "" }, { "docid": "8dbd79accbf2c0106efae41dce133eaf", "score": "0.5700915", "text": "public function getWins()\n {\n return $this->wins;\n }", "title": "" }, { "docid": "3e9cf5a719ebeb57cfe685d05b355a73", "score": "0.5660603", "text": "function rock_wins( $opponent ) {\n $valid = array( 'scissors', 'paper', 'rock' );\n if ( ! in_array( $opponent, $valid ) )\n return true;\n\n if ( 'scissors' == $opponent ) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "aff4ba334eb6ef47222e07f882c6ae6b", "score": "0.56597686", "text": "function determineWinner()\n{\n global $totalplays, $maxplays, $wins1, $wins2;\n if ($totalplays == $maxplays) {\n if ($wins1 == $wins2) {\n setcookie(\"final-win\", \"Gelijkspel\");\n } elseif ($wins1 > $wins2) {\n setcookie(\"final-win\", \"Speler 1 wint\");\n } elseif ($wins1 < $wins2) {\n setcookie(\"final-win\", \"Speler 2 wint\");\n }\n }\n}", "title": "" }, { "docid": "76dd50308bded5a1f7dae8b73cb36336", "score": "0.56574285", "text": "public function getJoinedGame()\n {\n return $this->joinedGame;\n }", "title": "" }, { "docid": "1264e45a33dff56d8919316d9fd67c60", "score": "0.56452525", "text": "public function winning_games()\n {\n $games = Game::join('players', 'players.game_id', '=', 'games.id')\n ->join('users', 'players.user_id', '=', 'users.id')\n ->where('users.id', '=', $this->id)\n ->where(function ($query) {\n $query\n ->whereColumn('games.score_team_1', '>', 'games.score_team_2');\n $query\n ->where(function ($query){\n $query\n ->where('players.position', '=', 1)\n ->orWhere('players.position', '=', 2);\n });\n $query\n ->orWhere(function ($query){\n $query\n ->whereColumn('games.score_team_2', '>', 'games.score_team_1');\n $query\n ->where(function ($query){\n $query\n ->where('players.position', '=', 3)\n ->orWhere('players.position', '=', 4);\n });\n });\n })\n ->groupBy('games.id');\n\n return $games->get();\n }", "title": "" }, { "docid": "2ba4223920badb4387212dd1ff40d625", "score": "0.56448394", "text": "protected function determineWinner($playerMove, $randomMove)\n {\n $userWon = isset($this->winners[$playerMove][$randomMove]);\n if ($userWon) return $this->winners[$playerMove][$randomMove] . ', <info>you win</info>!';\n\n $computerWon = isset($this->winners[$randomMove][$playerMove]);\n if ($computerWon) return $this->winners[$randomMove][$playerMove] . ', <error>you lost</error>!';\n\n return 'Looks like a tie!';\n }", "title": "" }, { "docid": "739c939fc01f0b319abd1ce1fb80eb90", "score": "0.5634484", "text": "public function getWin()\n {\n return $this->Win;\n }", "title": "" }, { "docid": "bf3f2c87c9029bd66959c8073d89feb7", "score": "0.5632584", "text": "function findWinner($players){\n\t\t$results = [];\n\t\t$dealer = getHandTotal($players[\"Dealer\"]);\n\t\tfor ($i = 1; $i <= count($players) -1; $i++){\n\t\t\t$playerTot = getHandTotal($players[\"Player $i\"]);\n\t\t\tif (($playerTot > $dealer && $playerTot < 22) || ($playerTot < $dealer && $dealer > 21) || ($playerTot == 21 && count($player[\"Player $1\"]) == 2)){\n\t\t\t\t$results [\"Player $i\"] = \"won\";\n\t\t\t}\n\t\t\telse if ($playerTot > 21 || $playerTot < $dealer){\n\t\t\t\t$results [\"Player $i\"] = \"lost\";\n\t\t\t}\n\t\t\telse\n\t\t\t\t$results[\"Player $i\"] = \"pushed\";\n\t\t}\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "147d4c9b05dfe45196fd057fa637cddd", "score": "0.56258416", "text": "public function getPlayer() {\n\t\treturn $this->competition->isTeamCompetition() ? $this->team : $this->golfer;\n\t}", "title": "" }, { "docid": "cbd866ddaad918e68e8d49a746a9493f", "score": "0.56213146", "text": "function who_wins( $users_throw, $computers_throw) {\n\t$user_Wins = 'User Wins, Great Job!!!';\n\t$tie = 'You tied try again!'; \n\t$computer_Win = 'The Computer Wins, Play again!!';\n\n\tswitch ($users_throw) {\n\t\tcase 'Rock':\n\t\t\tif ( $computers_throw == 'Scissors' || $computers_throw == 'Lizard' ){\n\t\t\treturn $user_Wins; } else {\treturn $computer_Win; \t}\n\t\tcase 'Paper':\n\t\t\tif ( $computers_throw == 'Rock' || $computers_throw == 'Spock' ){\n\t\t\t\treturn $user_Wins; } else {\treturn $computer_Win; \t}\n\t\tcase 'Scissors':\n\t\t\tif ( $computers_throw == 'Lizard' || $computers_throw == 'Paper' ){\n\t\t\t\treturn $user_Wins; } else {\treturn $computer_Win; \t}\n\t\tcase 'Lizard':\n\t\t\tif ( $computers_throw == 'Spock' || $computers_throw == 'Paper' ) {\n\t\t\t\treturn $user_Wins; } else {\treturn $computer_Win; \t}\n\t\tcase 'Spock':\n\t\t\tif ( $computers_throw == 'Rock' || $computers_throw == 'Scissors' ) {\n\t\t\t\treturn $user_Wins; } else {\treturn $computer_Win; \t}\n\t\t}\n\n\n}", "title": "" }, { "docid": "13d0667a9b8a6d95c75220ebc7ec5fb6", "score": "0.56202966", "text": "function gameHasWinningCondition($sessionID) {\n\n\t/*\n\tif(number of killer == 0){\n\t\tDetectives Win;\n\t}\n\telse{\n\t\tif(number of all alive player > 2){ //at least 3, so you could also use >=3\n\t\t\tgame not finished;\n\t\t}\n\t\telse{\n\t\t\tKillers Win;\n\t\t}\t\n\t} */\n\t\n\n\tglobal $con;\n\t$stmt = $con->prepare(\"SELECT count(*) FROM sessionsInPlay WHERE sessionID = (?) AND playerAlive = 1 AND playerRole = 2\");\n\t$stmt->bind_param(\"i\", $sessionID);\n\t$stmt->execute();\n\t$stmt->bind_result($result); // number of alive killers\n\twhile ($stmt->fetch()) {\n }\n\n if ($result == 0) {\n \tsetGameNotReady($sessionID);\n \treturn 1;\n }\n else {\n \t$stmt = $con->prepare(\"SELECT count(*) FROM sessionsInPlay WHERE sessionID = (?) AND playerAlive = 1\");\n\t\t$stmt->bind_param(\"i\", $sessionID);\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($result); // number of alive players\n\t\twhile ($stmt->fetch()) {\n \t}\n\n \tif ($result >= 3) {\n \t\treturn 0;\n \t}\n \telse {\n \t\tsetGameNotReady($sessionID);\n \t\treturn 2;\n \t}\n }\n}", "title": "" }, { "docid": "7ed2892ee4637c81247ffe8967d41567", "score": "0.56075484", "text": "function getLastWinner($number_ordered = false)\n\t{\n\t\t$query = \"select * from pkr_game_win where idtable=\".$this->curr_table.\" and game=\".$this->curr_game.\" order by number\";\n\t\t$res = $GLOBALS['mydb']->select($query);\n\t\n\t\t$tmp = array();\n\t\t$c_res = count($res);\n\t\tfor($i=0; $i < $c_res; $i++)\n\t\t\t$tmp[$res[$i][\"number\"]] = $res[$i];\n\t\t\n\t\tif ($number_ordered)\n\t\t\treturn $tmp;\n\t\telse\n\t\t\treturn $res;\n\t}", "title": "" }, { "docid": "21548838b4fefbfcf91f1bf183222872", "score": "0.55739737", "text": "public function getWins() {\n return $this->_getResult('win');\n }", "title": "" }, { "docid": "44854853b9d5dfb7dce25061d2fbe52c", "score": "0.5567446", "text": "public function opponentPlayer() {\n return $this->players()->where('users.id', '<>', Auth::user()->id)->first();\n }", "title": "" }, { "docid": "28d4c4b621df3ecd45326e85387c2cf0", "score": "0.55606097", "text": "public function currentPlayer() {\n return $this->players()->find(Auth::user()->id);\n }", "title": "" }, { "docid": "f3b52b54b95801486e890753fd34c594", "score": "0.5548621", "text": "function db_queryCheckOpponent($userName,& $curOpponent){\n global $db_db;\n $query = 'SELECT currentopponent FROM PlayerStates\n WHERE username = :user';\n $statement = $db_db->prepare($query);\n $statement->bindValue(':user', $userName);\n $statement->execute();\n $opponentName = $statement->fetch();\n $statement->closeCursor();\n if(is_null($opponentName['currentopponent'])){\n return false;\n }\n else{\n $curOpponent = $opponentName['currentopponent'];\n return true;\n }\n}", "title": "" }, { "docid": "efe3decbf225c54e15732c00ab807413", "score": "0.5531922", "text": "public function getOpponentState() {\n return $this->opponentPlayer()->pivot->state;\n }", "title": "" }, { "docid": "3a0cfd9ba2b8f7fad11fd61675107a16", "score": "0.55192155", "text": "function getWinnerCards()\n\t{\n\t\t//$query = \"select number,card,seed,seat from (pkr_dealer d inner join pkr_seat s on d.seat=s.seat_number) where seat in (select seat from pkr_typepost where idtable=\".$this->curr_table.\" and game=\".$this->curr_game.\") and s.player not in (select player from pkr_game_fold where idtable=\".$this->curr_table.\" and game=\".$this->curr_game.\") and game=\".$this->curr_game.\" and d.idtable=\".$this->curr_table.\" and s.status = \".PLAYING.\" order by seat, number\";\n\t\t$query = \"select number,card,seed,seat from pkr_dealer where idtable=\".$this->curr_table.\" and game=\".$this->curr_game.\" and seat in (select seat from pkr_typepost where idtable=\".$this->curr_table.\" and game=\".$this->curr_game.\") and player in (select player from pkr_seat where idtable=\".$this->curr_table.\" and status=\". PLAYING .\") and seat not in (select seat from pkr_game_fold where idtable=\".$this->curr_table.\" and game=\".$this->curr_game.\") order by seat, number\";\n\t\treturn $GLOBALS['mydb']->select($query);\n\t}", "title": "" }, { "docid": "aa2d71fa302107548e3bc1bec3fa4200", "score": "0.5518485", "text": "public function current_turn() {\n return $this->current_turn;\n }", "title": "" }, { "docid": "9beea9a11770d49d5e618119cfcc6eab", "score": "0.54994595", "text": "public function loadWinner(){\n $query = $this->getDBConnection()->prepare(\"select v.video_id, v.title, v.description, v.created,\n v.views, v.video_length, v.likes, u.username\n from competition_winner cw, video v, users u\n where cw.competition_id = ? and cw.video_id = v.video_id\n and v.created_by = u.user_id\");\n $query->bind_param(\"i\", $this->competitionId);\n $query->execute();\n $query->store_result();\n $query->bind_result($videoId, $title, $description, $created, $views, $length, $likes, $username);\n\n $winner = array();\n if($query->fetch()){\n $winner[\"id\"] = $videoId;\n $winner[\"title\"] = $title;\n $winner[\"description\"] = $description;\n $winner[\"created\"] = $created;\n $winner[\"user\"] = $username;\n $winner[\"views\"] = $views;\n $winner[\"length\"] = $length;\n $winner[\"likes\"] = $likes;\n }\n\n return $winner;\n }", "title": "" }, { "docid": "21718a672ef22c98529a2d1574e187c9", "score": "0.5496422", "text": "function stNextPlayer() {\n $player = self::getActivePlayerId();\n\n self::incStat( 1,'turns_number'); \n self::incStat( 1,'turns_number', $player); \n\n $oponent_player = self::getPlayerAfter( $player );\n $oponent_blooms = $this->getBlooms( $oponent_player );\n foreach ($oponent_blooms as $bloom) {\n if($bloom['fenced'] == true) {\n $this->captureBloom($bloom);\n\n self::incStat( 1, 'player_captured_blooms', $player ); \n self::incStat( 1, 'player_lost_blooms', $oponent_player ); \n }\n }\n\n $this->showLastMove();\n\n //check victory condition\n $player_score = self::getUniqueValueFromDB( \"SELECT player_score FROM player WHERE player_id='$player'\" );\n\n $string = \"x_value\".self::getgameStateValue('board_size');\n if ($player_score > (self::getgameStateValue($string)-1) ) {\n\n $oponent_score = self::getUniqueValueFromDB( \"SELECT player_score FROM player WHERE player_id='$oponent_player'\" );\n \n if (self::getStat('player_captured_blooms' , $player ) == 0 ) {\n self::setStat( 0, 'player_average_captured_stones_per_bloom', $player ); \n self::setStat( 0 , 'player_average_lost_stones_per_bloom', $oponent_player ); \n } else {\n self::setStat( $player_score/self::getStat('player_captured_blooms' , $player ), 'player_average_captured_stones_per_bloom', $player ); \n self::setStat( $player_score/self::getStat('player_captured_blooms' , $player ) , 'player_average_lost_stones_per_bloom', $oponent_player ); \n }\n\n if (self::getStat('player_captured_blooms' , $oponent_player ) == 0) {\n self::setStat( 0, 'player_average_lost_stones_per_bloom', $player ); \n self::setStat( 0, 'player_average_captured_stones_per_bloom', $oponent_player ); \n } else {\n self::setStat( $oponent_score/self::getStat('player_captured_blooms' , $oponent_player ), 'player_average_lost_stones_per_bloom', $player ); \n self::setStat( $oponent_score/self::getStat('player_captured_blooms' , $oponent_player ), 'player_average_captured_stones_per_bloom', $oponent_player ); \n }\n\n self::DbQuery( \"UPDATE player SET player_score= '\".self::getgameStateValue($string).\"' WHERE player_id='$player' \" );\n\n $this->gamestate->nextState(\"endGame\");\n } else {\n self::giveExtraTime( $player);\n $this->activeNextPlayer();\n $this->gamestate->nextState(\"nextPlayer\");\n }\n }", "title": "" }, { "docid": "e2d059f6f89a5edcefde353c68b6e7d5", "score": "0.5490733", "text": "public function wins () {\n\t\treturn $this->hasMany('\\App\\Competition');\n\t}", "title": "" }, { "docid": "e5b6d27121ee094bdde79e64bd1d71a0", "score": "0.54869664", "text": "public function lose() {\n return $this->state == Game::STATE_FINISHED && $this->winner_id && $this->winner_id != $this->currentPlayer()->id;\n }", "title": "" }, { "docid": "ec1aa7441c7dff169c69b05bba3cf107", "score": "0.5463337", "text": "function winningest()\r\t{\r\t\tif ( isset( $this->ipsclass->input['st'] ) )\r\t\t{\r\t\t\t$this->first = intval( $this->ipsclass->input['st'] );\r\t\t}\r\t\t\r\t\tif ( !isset( $this->first ) )\r\t\t{\r\t\t\t$this->first = 0;\r\t\t}\r\t\t\r\t\t$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(ibbookie_won) AS total',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'members',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"ibbookie_won > 0\",\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t );\r\t\t\r\t\tif ( !$count['total'] )\r\t\t{\t\r\t\t\t$title = \"<{CAT_IMG}>&nbsp;{$this->ipsclass->lang['winningest']}\";\r\t\t\t$data = \"{$this->ipsclass->lang['no_winningest']}\";\r\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_bookie']->none( $title, $data );\r\t\t}\r\t\telse\r\t\t{\r\t\t$this->ipsclass->DB->build_query( array( \r\t\t\t'select' => 'members_display_name, ibbookie_won, mgroup, id',\r\t\t\t'from' => 'members',\r\t\t\t'where' => \"ibbookie_won > 0\",\r\t\t\t'order' => 'ibbookie_won DESC',\r\t\t\t'limit' => array( $this->first, $this->ipsclass->vars['ibbookie_num_pages'] )\r\t\t) );\t\t \r\t\t$this->ipsclass->DB->exec_query();\r\t\t\t\r\t\t\t$content = array();\r\t\t\t\r\t\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\r\t\t\t{ \r\t\t\t\t$r['points'] = $this->ipsclass->do_number_format( $r['ibbookie_won'] );\r\t\t\t\t$r['name'] = $this->ipsclass->make_profile_link( $this->ipsclass->make_name_formatted( $r['members_display_name'], $r['mgroup'] ), $r['id'] );\r\t\t\t\t$r['group'] = $this->ipsclass->make_name_formatted( $this->ipsclass->cache['group_cache'][$r['mgroup']]['g_title'], $r['mgroup'] );\r\t\t\t\t\r\t\t\t\t$content[] = $r;\r\t\t\t}\r\t\t\t\r\t\t\t$links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $count['total'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'PER_PAGE' => $this->ipsclass->vars['ibbookie_num_pages'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'CUR_ST_VAL' => $this->first,\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_SINGLE' => \"\",\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_MULTI' => $this->ipsclass->lang['pages'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'BASE_URL' => $this->ipsclass->base_url.\"autocom=bookie&amp;cmd=winningest\",\r\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t);\r\t\t\t\r\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_bookie']->winningest( $content, $links );\r\t\t}\r\t\t\r\t\t$this->page_title = $this->ipsclass->lang['winningest'];\r\t\t$this->nav[] = $this->ipsclass->lang['winningest'];\r\t}", "title": "" }, { "docid": "77107c42ef69961666a6ebca53e97a8b", "score": "0.5460593", "text": "public function currentPlayer()\n {\n return $this->currentPlayer;\n }", "title": "" }, { "docid": "d273086af2bbb6c472d18105a96927bb", "score": "0.5454486", "text": "public function testPlayerWin()\n {\n $game = new DiceGame(2, 6, 100);\n\n $game->setScores([100, 10]);\n $game->checkwin();\n $data = $game->getGameData();\n $this->assertEquals($data[\"resultMessage\"], \" You win!\");\n $this->assertTrue($data[\"gameOver\"]);\n }", "title": "" }, { "docid": "72261d73426c94e25d9d7f4d4233daaa", "score": "0.5436751", "text": "public function testCurrentPlayer()\n {\n $diceGame = new DiceGame();\n $this->assertTrue($diceGame->getCurrentPlayer() === \"spelaren\");\n\n $diceGame->changePlayer();\n $this->assertTrue($diceGame->getCurrentPlayer() === \"datorn\");\n $diceGame->changePlayer();\n $this->assertTrue($diceGame->getCurrentPlayer() === \"spelaren\");\n }", "title": "" }, { "docid": "5e0066ab56bb7fee29247a32eb8d6bae", "score": "0.5426584", "text": "function isWin() : bool\n {\n $bLine1 = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[0][1]) && ($this->board[0][1] == $this->board[0][2]);\n if ($bLine1) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bLine2 = !empty(trim($this->board[1][0])) && ($this->board[1][0] == $this->board[1][1]) && ($this->board[1][1] == $this->board[1][2]);\n if ($bLine2) {\n echo 'Victoire de '. $this->board[1][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bLine3 = !empty(trim($this->board[2][0])) && ($this->board[2][0] == $this->board[2][1]) && ($this->board[2][1] == $this->board[2][2]);\n if ($bLine3) {\n echo 'Victoire de '. $this->board[2][0]->getPlayer(). PHP_EOL;\n return true;\n }\n\n $bCol1 = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[1][0]) && ($this->board[1][0] == $this->board[2][0]);\n if ($bCol1) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bCol2 = !empty(trim($this->board[0][1])) && ($this->board[0][1] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][1]);\n if ($bCol2) {\n echo 'Victoire de '. $this->board[0][1]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bCol3 = !empty(trim($this->board[0][2])) && ($this->board[0][2] == $this->board[1][2]) && ($this->board[1][2] == $this->board[2][2]);\n if ($bCol3) {\n echo 'Victoire de '. $this->board[0][2]->getPlayer(). PHP_EOL;\n return true;\n };\n\n $bDiaLR = !empty(trim($this->board[0][0])) && ($this->board[0][0] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][2]);\n if ($bDiaLR) {\n echo 'Victoire de '. $this->board[0][0]->getPlayer(). PHP_EOL;\n return true;\n };\n $bDiaRL = !empty(trim($this->board[0][2])) && ($this->board[0][2] == $this->board[1][1]) && ($this->board[1][1] == $this->board[2][0]);\n if ($bDiaRL) {\n echo 'Victoire de '. $this->board[0][2]->getPlayer() . PHP_EOL;\n return true;\n };\n \n $bTie = !empty(trim($this->board[0][0])) && !empty(trim($this->board[0][1])) && !empty(trim($this->board[0][2]))\n && !empty(trim($this->board[1][0])) && !empty(trim($this->board[1][1])) && !empty(trim($this->board[1][2]))\n && !empty(trim($this->board[2][0])) && !empty(trim($this->board[2][1])) && !empty(trim($this->board[2][2]));\n if ($bTie) {\n echo 'Match nul ! :\\'('. PHP_EOL;\n return true;\n };\n\n return false;\n }", "title": "" }, { "docid": "5978417c72f587413307d04924900f95", "score": "0.54126024", "text": "public function currentTeam()\n {\n $this->ensureHasCurrentTeam();\n //return $this->belongsTo(Saas::$teamModel, 'current_team_id');\n\n // Important when calling currentTeam() after modifying the user's team,\n // (For example after creating the stripe_id of the billable team)\n $this->load('teams');\n\n $currentTeamId = $this->current_team_id;\n return $this->teams->first(function ($team) use($currentTeamId) {\n return ($team->id === $currentTeamId);\n });\n }", "title": "" }, { "docid": "90937fd7e93c6eec42d88ebc64630bb4", "score": "0.5396254", "text": "public function getChoice()\n {\n $dream_team = array('PacoTheGreat', 'Felixdupriez', 'Shiinsekai', 'Ghope', 'Etienneelg', 'Benli06', 'Galtar95');\n\n $oppName = $this->result->getStatsFor($this->opponentSide)['name'];\n if (in_array($oppName, $dream_team))\n return parent::friendChoice();\n\n\n // setting the variables i will need\n \n $opponent_choices = $this->result->getChoicesFor($this->opponentSide);\n $opponent_scores = $this->result->getScoresFor($this->opponentSide);\n $my_choices = $this->result->getChoicesFor($this->mySide);\n $my_scores = $this->result->getScoresFor($this->mySide);\n\n\n // compute the average and if the score of friend is higher choose friend\n if (isset($this->start_choices[count($my_choices)]))\n return $this->start_choices[count($my_choices)];\n\n $friend_average = $this->calculate_average('friend');\n $foe_average = $this->calculate_average('foe');\n return $friend_average > $foe_average ? 'friend' : 'foe';\n\n\n \n // ------------------------------------- -----------------------------------------------------\n // How to get my Last Choice ? $this->result->getLastChoiceFor($this->mySide) -- if 0 (first round)\n // How to get the opponent Last Choice ? $this->result->getLastChoiceFor($this->opponentSide) -- if 0 (first round)\n // ------------------------------------- -----------------------------------------------------\n // How to get my Last Score ? $this->result->getLastScoreFor($this->mySide) -- if 0 (first round)\n // How to get the opponent Last Score ? $this->result->getLastScoreFor($this->opponentSide) -- if 0 (first round)\n // ------------------------------------- -----------------------------------------------------\n // How to get all the Choices ? $this->result->getChoicesFor($this->mySide)\n // How to get the opponent Last Choice ? $this->result->getChoicesFor($this->opponentSide)\n // ------------------------------------- -----------------------------------------------------\n // How to get my Last Score ? $this->result->getLastScoreFor($this->mySide)\n // How to get the opponent Last Score ? $this->result->getLastScoreFor($this->opponentSide)\n // ------------------------------------- -----------------------------------------------------\n // How to get the stats ? $this->result->getStats()\n // How to get the stats for me ? $this->result->getStatsFor($this->mySide)\n // array('name' => value, 'score' => value, 'friend' => value, 'foe' => value\n // How to get the stats for the oppo ? $this->result->getStatsFor($this->opponentSide)\n // array('name' => value, 'score' => value, 'friend' => value, 'foe' => value\n // ------------------------------------- -----------------------------------------------------\n // How to get the number of round ? $this->result->getNbRound()\n // ------------------------------------- -----------------------------------------------------\n // How can i display the result of each round ? $this->prettyDisplay()\n // ------------------------------------- -----------------------------------------------------\n //return parent::friendChoice();\n }", "title": "" }, { "docid": "4fc3a793d99104cc49e97d3cbe6e5b98", "score": "0.53879124", "text": "public function getStatus() {\n # Returns status string that prompts users to take their turn or begin a new game.\n\n if ($this->active) {\n return \"It's \" . $this->players[$this->current_player_idx]->user_name . \"'s turn!\";\n } elseif ($this->boardIsEmpty()) {\n return NEW_GAME_PROMPT . PLAYER_TURN_INSTRUCTIONS;\n } else {\n $text_out = '';\n $winner = $this->getWinner();\n if ($winner) $text_out .= $winner->user_name . \" wins!\";\n else $text_out .= \"Cat's game.\"; # this is a brittle assumption that no winner, and a not empty board means a draw\n $text_out .= NEW_GAME_PROMPT;\n return $text_out;\n }\n }", "title": "" }, { "docid": "5d0c13f753fd068f8f3b8a133c5a2752", "score": "0.5374963", "text": "function matchLoser($bracket)\n\t{\n\t\tif ($bracket['score1'] > $bracket['score2']) {\n\t\t\treturn $bracket['team2'];\n\t\t} else {\n\t\t\treturn $bracket['team1'];\n\t\t}\n\t}", "title": "" }, { "docid": "e2305915d39528d4fde9122425815dfb", "score": "0.5355294", "text": "public function winner( MLData $input) {\n\t\t$output = $this->compute($input);\n\t\treturn EngineArray\\maxIndex($output->getData());\n\t}", "title": "" }, { "docid": "dca88462ee949a121a808cc77eec4327", "score": "0.5354935", "text": "public function testWinGame()\n {\n $game = new Game('zombi');\n $game->guess('z');\n $game->guess('o');\n $game->guess('m');\n $game->guess('b');\n $game->guess('i');\n\n $this->assertTrue($game->isEnded());\n $this->assertTrue($game->playerWon());\n }", "title": "" }, { "docid": "7a0a8d9702aa7be4c3a0dbe89957541b", "score": "0.5351709", "text": "public function getCurrentLeague() {\r\n\t\tif($this->readAttribute(\"league\") !== null && ($tag = TagModel::find($this->readAttribute(\"league\"))) !== null) {\r\n\t\t\treturn $tag->name;\r\n\t\t} else {\r\n\t\t\treturn \"default\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c1f61687a2de5b719bc001ed761816cc", "score": "0.53454924", "text": "public function advance() {\n\t\t$event_id = $this->args[0];\n\t\t$event = $this->Event->getById($event_id);\n\t\t$settings = Configure::read('Tournament.settings');\n\n\t\tif (!$event) {\n\t\t\t$this->err('Invalid event');\n\t\t\treturn;\n\t\t}\n\n\t\t// Update matches with fake data\n\t\t$this->out('Advancing current round matches');\n\n\t\tif ($matches = $this->Match->getPendingMatches($event_id, $event['Event']['round'])) {\n\t\t\tforeach ($matches as $match) {\n\t\t\t\t$home_id = $match['Match']['home_id'];\n\t\t\t\t$away_id = $match['Match']['away_id'];\n\n\t\t\t\tif ($event['Event']['type'] == Event::SINGLE_ELIM || $event['Event']['type'] == Event::DOUBLE_ELIM) {\n\t\t\t\t\t$winner = rand(1, 2);\n\t\t\t\t} else {\n\t\t\t\t\t$winner = rand(1, 3);\n\t\t\t\t}\n\n\t\t\t\t$query = array(\n\t\t\t\t\t'winner' => $winner\n\t\t\t\t);\n\n\t\t\t\tif ($winner == Match::HOME) {\n\t\t\t\t\t$query['homeOutcome'] = Match::WIN;\n\t\t\t\t\t$query['awayOutcome'] = Match::LOSS;\n\t\t\t\t\t$query['homePoints'] = $settings['defaultWinPoints'];\n\t\t\t\t\t$query['awayPoints'] = $settings['defaultLossPoints'];\n\n\t\t\t\t\t$this->EventParticipant->updateStatistics($event_id, $home_id, array('wins' => 1, 'points' => $query['homePoints']));\n\t\t\t\t\t$this->EventParticipant->updateStatistics($event_id, $away_id, array('losses' => 1, 'points' => $query['awayPoints']));\n\n\t\t\t\t} else if ($winner == Match::AWAY) {\n\t\t\t\t\t$query['homeOutcome'] = Match::LOSS;\n\t\t\t\t\t$query['awayOutcome'] = Match::WIN;\n\t\t\t\t\t$query['homePoints'] = $settings['defaultLossPoints'];\n\t\t\t\t\t$query['awayPoints'] = $settings['defaultWinPoints'];\n\n\t\t\t\t\t$this->EventParticipant->updateStatistics($event_id, $home_id, array('losses' => 1, 'points' => $query['homePoints']));\n\t\t\t\t\t$this->EventParticipant->updateStatistics($event_id, $away_id, array('wins' => 1, 'points' => $query['awayPoints']));\n\n\t\t\t\t} else {\n\t\t\t\t\t$query['homeOutcome'] = Match::TIE;\n\t\t\t\t\t$query['awayOutcome'] = Match::TIE;\n\t\t\t\t\t$query['homePoints'] = $settings['defaultTiePoints'];\n\t\t\t\t\t$query['awayPoints'] = $settings['defaultTiePoints'];\n\n\t\t\t\t\t$this->EventParticipant->updateStatistics($event_id, $home_id, array('ties' => 1, 'points' => $query['homePoints']));\n\t\t\t\t\t$this->EventParticipant->updateStatistics($event_id, $away_id, array('ties' => 1, 'points' => $query['awayPoints']));\n\t\t\t\t}\n\n\t\t\t\t$this->Match->id = $match['Match']['id'];\n\t\t\t\t$this->Match->save($query, false);\n\t\t\t}\n\t\t}\n\n\t\t// Generate the next round\n\t\t$this->out('Generating next round matches');\n\n\t\ttry {\n\t\t\tTournament::factory($event)->generateMatches();\n\n\t\t} catch (Exception $e) {\n\t\t\t$this->out($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "8a844aaba7ecf0a7bf4f2d021db0db7f", "score": "0.53368706", "text": "function gameLogic($move){\n\t\t$GLOBALS['handsPlayed']++;\n\t\t$result = array();\n\n\t\t$playerMove = array_search($move, $GLOBALS['moves']);\n\t\t// randomly get Bot's move\n\t\t$botMove = rand(0, count($GLOBALS['moves'])-1 ); \n\t\t$result['HumanMove'] = $playerMove;\n\t\t$result['RobotMove'] = $botMove;\n\n\t\t// not a big fan of this section. need to refactor\n\t\tif( (($botMove == 0 )||($playerMove== 0) ) && (($botMove== 2) || ($playerMove== 2))) {\n\t\t\t$a = ($botMove==0?'Robot':'Human');\n\t\t\t$b = ($botMove==2?'Robot':'Human');\n\n\t\t\t$result['handWinner'] = $a; \n\t\t\t$GLOBALS['hands'][$a]++; // increment the wins for this player\n\n\t\t}elseif($playerMove>$botMove){\n\t\t\t$result['handWinner'] = \"Human\";\n\t\t\t$GLOBALS['hands'][\"Human\"]++;\n\t\t}elseif ($playerMove<$botMove) {\n\t\t\t$result['handWinner'] = \"Robot\";\n\t\t\t$GLOBALS['hands'][\"Robot\"]++;\n\t\t}elseif ($playerMove==$botMove) {\n\t\t\t$result['handWinner'] = \"None\";\n\t\t}else{ // ? \n\t\t\t$result['handWinner'] = \"None2\";\n\t\t}\n\n\t\tif( (getWins('Robot') == 3) || (getWins('Human')==3)) {\n\t\t\t$result['gameWinner'] = (getWins('Robot')==3?'Robot':'Human');\n\t\t\t$result['status']='finished';\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "4cc496feece3aafec6081faca000d326", "score": "0.53321385", "text": "function stEndOfTrick(){\n $cards = Cards::getOnTable();\n $winningColor = Globals::getTrickColor();\n $bestCard = null;\n\n // Who wins ?\n foreach ($cards as $card) {\n if ($card['color'] == CARD_ROCKET && $winningColor != CARD_ROCKET) { // A trump has been played: this is the first one\n $winningColor = CARD_ROCKET; // Now trumps are needed to win the trick\n $bestCard = $card;\n }\n else if($card['color'] == $winningColor) { // This card is the right color to win the trick\n if(is_null($bestCard) || $card['value'] > $bestCard['value']) {\n $bestCard = $card;\n }\n }\n }\n $winner = Players::get($bestCard['pId']);\n\n // Transfer the cards, inc trick counter and notify\n Cards::winTrick($cards, $winner);\n $winner->winTrick();\n Notifications::winTrick($cards, $winner);\n Globals::setLastWinner($winner);\n\n // Update tasks\n Tasks::checkLastTrick();\n $mission = Missions::getCurrent();\n $mission->check([\n 'bestCard' => $bestCard,\n 'winner' => $winner,\n 'cards' => $cards,\n ]);\n\n $status = $mission->getStatus();\n if($status != 0){\n $msg = $status > 0? clienttranslate('Mission ${nb} completed') : clienttranslate('Mission ${nb} failed');\n Notifications::message($msg, ['nb' => $mission->getId() ]);\n Globals::setMissionFinished($status);\n// $this->gamestate->setAllPlayersMultiactive();\n $this->gamestate->nextState(\"endMission\");\n } else {\n $this->gamestate->changeActivePlayer($winner->getId());\n $this->gamestate->nextState(\"nextTrick\");\n }\n }", "title": "" }, { "docid": "fd9e66560129bcc620be2a050e124fc6", "score": "0.53286153", "text": "private function getWinLoss($playerData, $teams, $pid)\n {\n $index = 0;\n\n if($teams[1][\"win\"] == \"Win\") { $index = 1; }\n $winningTeamId = $teams[$index][\"teamId\"];\n $myTeamId = $playerData[intval($pid) - 1][\"teamId\"];\n\n return ($winningTeamId == $myTeamId) ? 'W' : 'L';\n }", "title": "" }, { "docid": "581044e6ffd6ad75c1f808588d1e61bb", "score": "0.5314252", "text": "function getWinnerMessage($contestID){\n $q = mysql_query(\"SELECT count(v.entrant_id) as votes, e.fname,lname, e.userfile, e.social_link \n FROM \" . ENTRANT_TABLE . \" e \n LEFT JOIN \" . VOTE_TABLE . \" v on v.entrant_id=e.id\n WHERE v.contest_id = '\" . $contestID . \"' ORDER BY count(v.entrant_id)\n DESC LIMIT 1\n \");\n $entrant = mysql_fetch_assoc($q);\n \n $html = '<h3>And the winner is...</h3>';\n $html .= '<p style=\"margin-top:-20px!important;\"><strong>' . $entrant['fname'] . ' ' . substr($entrant['lname'],0,1) . '.</strong><br />';\n if($entrant['social_link']!=''){ $html .= Utility::getEmbed($entrant['social_link'],'s'); } \n else { $html .= '<img src=\"'. CONTEST_IMG_PATH . $entrant['userfile'] .'\" />'; }\n $html .= '</p>';\n return $html;\n\n }", "title": "" }, { "docid": "b6d578dbdd110556085004ae3070c119", "score": "0.52990043", "text": "function getCurrentRound() {\n\t\treturn $this->getData('currentRound');\n\t}", "title": "" }, { "docid": "b6d578dbdd110556085004ae3070c119", "score": "0.52990043", "text": "function getCurrentRound() {\n\t\treturn $this->getData('currentRound');\n\t}", "title": "" }, { "docid": "a3b37f740b4f0a3e60755734d96be281", "score": "0.52883655", "text": "public function getAwayGame($Round, $Player)\n {\n $homeGame = ($Round * 2) + ($Player - 2);\n switch($homeGame) {\n case 2:\n return 3;\n case 3:\n return 2;\n default:\n return $homeGame;\n }\n }", "title": "" }, { "docid": "f8d527adc0d8310a01e460ace9b56293", "score": "0.52837485", "text": "public static function getTeamRankedOpponent($team)\n {\n $range = [$team->elo - 50 < 0 ? 0 : $team->elo - 50, $team->elo + 50];\n $fighters = Team::where('id', '!=', $team->id)\n ->where('visible', true)\n ->where('user_id', '!=', $team->user_id)\n ->whereBetween('elo', $range)->get();\n\n if ($fighters->count())\n {\n return $fighters->shuffle()->first();\n }\n\n $opponent = Team::where('id', '!=', $team->id)\n ->where('visible', true)\n ->where('user_id', '!=', $team->user_id)\n ->orderBy(\\DB::raw('ABS(elo - '.$team->elo.')'), 'ASC')->first();\n \n return $opponent;\n }", "title": "" }, { "docid": "4cbabe7d4c66e154d621dc260a8a65c7", "score": "0.528064", "text": "public function getWinningCount()\n {\n return $this->winningCount;\n }", "title": "" }, { "docid": "a07a697df9253136d23e5ad77f31df00", "score": "0.52781653", "text": "public function outcome(){\n\n if($this->player1->award==\"Win\"){\n $outcome[]=array(\n \"p1Gesture\"=>$this->player1->gestureName,\n \"p1GestureFA\"=>$this->player1->gestureFA,\n \"winnerGesture\"=>$this->player1->gestureName,\n \"action\"=>$this->player1->gestureAction,\n \"loserGesture\"=>$this->player2->gestureName,\n \"p2Gesture\"=>$this->player2->gestureName,\n \"p2GestureFA\"=>$this->player2->gestureFA,\n \"outcomeText\"=>\"Player 1 Wins!\"\n );\n }elseif($this->player2->award==\"Win\"){\n $outcome[]=array(\n \"p1Gesture\"=>$this->player1->gestureName,\n \"p1GestureFA\"=>$this->player1->gestureFA,\n \"winnerGesture\"=>$this->player2->gestureName,\n \"action\"=>$this->player2->gestureAction,\n \"loserGesture\"=>$this->player1->gestureName,\n \"p2Gesture\"=>$this->player2->gestureName,\n \"p2GestureFA\"=>$this->player2->gestureFA,\n \"outcomeText\"=>\"Player 2 Wins!\"\n );\n }else{\n $outcome[]=array(\n \"p1Gesture\"=>$this->player1->gestureName,\n \"p1GestureFA\"=>$this->player1->gestureFA,\n \"winnerGesture\"=>\"\",\n \"action\"=>\"\",\n \"loserGesture\"=>\"\",\n \"p2Gesture\"=>$this->player2->gestureName,\n \"p2GestureFA\"=>$this->player2->gestureFA,\n \"outcomeText\"=>\"Draw!\"\n );\n }\n\n return $outcome;\n }", "title": "" }, { "docid": "59a223dfbd174a979ef9d4f42e79945a", "score": "0.5276252", "text": "public static function getWinner($id)\n {\n \n $db = DB::getInstance();\n $data = $db->get('challenge1',array('id','=',$id));\n if($data)\n {\n $data = ($data->results())[0];\n if(empty($data->winner))\n {\n $challenger = $data->challenger;\n $accepter = $data->accepter;\n $cc = $data->cc;\n $c_s_t = $data->challenger_start_time;\n $a_s_t = $data->accepter_start_time;\n $c_e_t = $data->challenger_end_time;\n $a_e_t = $data->accepter_end_time;\n $d_e_c = $data->default_endtime_challenger;\n $d_e_a = $data->default_endtime_accepter;\n $a_ques = $data->accepter_ques;\n $c_ques = $data->challenger_ques;\n // echo $c_ques;\n \n if($c_s_t == null && Challenge1::checktime($d_e_c))\n {\n // this means that challenger didnt started the challenge but it can challenge till d_e_c\n \n }\n\n if($c_e_t == null && !(Challenge1::checktime($d_e_c)))\n {\n // set challenger end time\n $db->updateNotification('challenge1',$id,array('challenger_end_time'=>$d_e_c));\n }\n \n if($a_e_t == null && !(Challenge1::checktime($d_e_a)))\n {\n $db->updateNotification('challenge1',$id,array('accepter_end_time'=>$d_e_a));\n }\n\n if($a_e_t != null && $c_e_t != null)\n {\n if($a_ques == $c_ques ) // 0 for bot or 1 for both\n {\n //check time difference\n $a_time = strtotime($a_e_t) - strtotime($a_s_t);\n $c_time = strtotime($c_e_t) - strtotime($c_s_t);\n\n if($a_time > $c_time)\n {\n //challenger wins\n Challenge1::setWinner($challenger,$accepter,$id, $cc);\n return true;\n \n }\n else\n {\n //accepter wins\n Challenge1::setWinner($accepter,$challenger,$id, $cc);\n return true;\n }\n }\n elseif($a_ques == 1 && $c_ques == 0)\n {\n //accepter is the winner\n Challenge1::setWinner($accepter,$challenger,$id, $cc);\n return true;\n }\n elseif($a_ques == 0 && $c_ques == 1){\n //challenger wins is the winner\n Challenge1::setWinner($challenger,$accepter,$id, $cc);\n return true;\n }\n elseif($c_e_t != 0 && $c_s_t == null){\n Challenge1::setWinner($accepter,$challenger,$id, $cc);\n return true;\n }\n else\n {\n //challenger is the winner\n Challenge1::setWinner($challenger,$accepter,$id, $cc);\n return true;\n }\n }\n return false;\n }\n return false;\n \n \n }\n return false;\n\n }", "title": "" }, { "docid": "40883e40a984498a74455903ee53ea67", "score": "0.5272367", "text": "public function winner($contest_id)\n {\n $this->load->library('payout');\n $contest = $this->contest->get($contest_id);\n if (!$contest) {\n $this->responder->fail(\"That contest does not exist\")->code(500)->respond();\n return;\n }\n\n if ($contest->stop_time < date('Y-m-d H:i:s')) {\n $contest->status = 'ended';\n } else {\n $contest->status = 'active';\n }\n $contest->total_amount = $this->config->item('payout_to_launch_price')[$contest->prize];\n\n if ($payout = $this->payout->exists(array('contest_id' => $contest_id))) {\n $winner = $this->submission->where('id', $payout->submission_id)->limit(1)->fetch()->row();\n $owner = $winner->owner;\n $winner->first_name = $this->ion_auth->user($owner)->row()->first_name;\n $winner->last_name = $this->ion_auth->user($owner)->row()->last_name;\n $winner->votes = (int) $this->vote->select('COUNT(*) as count')->where(array('submission_id' => $winner->id))->fetch()->row()->count;\n $winner->test_result = unserialize($winner->test_result);\n $winner->test_result = is_array($winner->test_result) ? $winner->test_result : array();\n $winner->ctr = isset($winner->test_result['ctr']) ? $winner->test_result['ctr'] : $winner->ctr;\n $contest->payout = true;\n if ($contest->use_attachment == 1) {\n $winner->attachment = $contest->attachment;\n }\n $this->responder->data(array('contest' => $contest, 'winner' => $winner))->respond();\n } else {\n $contest->payout = false;\n $this->responder->data(array('contest' => $contest, 'winner' => false))->respond();\n }\n }", "title": "" }, { "docid": "d4119446cd29a79cb2746ba87d6363dd", "score": "0.5270868", "text": "public function findAvailableOpponent($player) {\r\n\t\t$rowset = $this->fetchAll(\r\n\t\t\t$this->select()\r\n\t\t\t\t->where('`opponent_id` IS NULL')\r\n\t\t\t\t->where('`id` <> ?', $player->getId())\r\n\t\t\t);\r\n\t\t\r\n\t\tif($rowset->count() === 0) {\r\n\t\t\treturn null;\r\n\t\t} else {\r\n\t\t\t$row = $rowset->getRow(0);\r\n\t\t\t\r\n\t\t\treturn $this->_load($row);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "66113023cf225396e5221631632b9393", "score": "0.5253072", "text": "public function testComputerWin()\n {\n $game = new DiceGame(2, 6, 100);\n\n $game->setScores([2, 100]);\n $game->checkwin();\n $data = $game->getGameData();\n $this->assertEquals($data[\"resultMessage\"], \" Computer wins!\");\n $this->assertTrue($data[\"gameOver\"]);\n }", "title": "" }, { "docid": "5474a3b2d4e57f1184870c006172ebfd", "score": "0.52260023", "text": "public function getLatestEtapeWinnersID($competition)\r\n {\r\n $sql = 'SELECT\r\n p.Round_ID as round,\r\n p.Athletes_ID as rider,\r\n p.Position as position,\r\n p.Points as points,\r\n p.Active as active\r\n FROM\r\n round_position p,\r\n round r\r\n WHERE\r\n p.Round_ID=r.id AND\r\n r.Competition_ID= '.$competition.' AND\r\n p.Round_ID = \r\n \r\n (SELECT p.Round_ID FROM round_position p, round r \r\n WHERE r.Competition_ID='.$competition.' AND p.Round_ID=r.id \r\n ORDER BY p.Round_ID DESC LIMIT 1)\r\n \r\n ORDER BY\r\n points DESC';\r\n \r\n return PDODAO::getDataArrays($sql);\r\n }", "title": "" }, { "docid": "4a5413e6be2a968655832297c3ebce32", "score": "0.5212862", "text": "public function show(Winner $winner)\n {\n \n\n\n }", "title": "" }, { "docid": "86fe6452ca5dede0ea7dd13ff3510b14", "score": "0.5212289", "text": "public function testMustReturnAWinner()\n {\n $this->setOutputCallback(function() {});\n $this->game->setup();\n $this->game->setWinner($this->game->getPlayerOne());\n ob_start();\n $this->setOutputCallback(function() {});\n $this->game->start();\n $contents = ob_get_contents();\n ob_end_clean();\n\n self::assertContains(\"Congratulations! The winner is Robot 🤖\", $contents);\n }", "title": "" }, { "docid": "a0dab1ffb2221d82775d499455a673ea", "score": "0.52062726", "text": "function input_winners()\r\t{\r\t\tif ( !$this->ipsclass->member['ibbookie_admin_groups'] && ( !$this->ipsclass->member['ibbookie_admin'] )) \r\t\t{\r\t\t\t$this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_no_admin_bookie'));\r\t\t}\r\t\t\r\t\tif ( isset( $this->ipsclass->input['st'] ) )\r\t\t{\r\t\t\t$this->first = intval( $this->ipsclass->input['st'] );\r\t\t}\r\t\t\r\t\tif ( !isset( $this->first ) )\r\t\t{\r\t\t\t$this->first = 0;\r\t\t}\t\r\t\t$count = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'COUNT(id) AS total',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'from' => 'bookie_games',\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'where' => \"winner = '' \",\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t );\r\t\tif ( !$count['total'] )\r\t\t{\t\r\t\t\t$title = \"<{CAT_IMG}>&nbsp;{$this->ipsclass->lang['input_winners']}\";\r\t\t\t$data = \"{$this->ipsclass->lang['no_games']}\";\r\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_bookie']->none( $title, $data );\r\t\t}\r\t\telse\r\t\t{\t\r\t\t\t$this->ipsclass->DB->build_query( array( 'select' => 'id, home_team, away_team, start, home_spread, away_spread, home_odds, away_odds, cat_image',\r\t\t\t\t'from' => 'bookie_games',\r\t\t\t\t'where' => \"winner = '' \",\r\t\t\t\t\r\t\t\t\t'order' => 'start ASC',\r\t\t\t\t'limit' => array( $this->first, $this->ipsclass->vars['ibbookie_num_pages'] )\r\t\t) );\r\t\t\t$this->ipsclass->DB->exec_query();\r\t\t\r\t\tif ( $this->ipsclass->DB->get_num_rows() )\r\t\t{\r\t\t\t$content = array();\r\t\t\t\r\t\t\twhile ( $r = $this->ipsclass->DB->fetch_row() )\r\t\t\t{\r\t\t\t\t$r['id'] = $r['id'];\r\t\t\t\t$r['home_team'] = $r['home_team'];\r\t\t\t\t$r['away_team'] = $r['away_team'];\r\t\t\t\t\r\t\t\t\t$r['cat_image'] = $r['cat_image'];\r\t\t\t\t$r['start'] = date('D, M j g:ia T',strtotime($r['start']));\r\t\t\t\t\r\t\t\t\t$content[] = $r;\r\t\t\t}\r\t\t\t\t\t\t\t\t$links = $this->ipsclass->build_pagelinks( array( 'TOTAL_POSS' => $count['total'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'PER_PAGE' => $this->ipsclass->vars['ibbookie_num_pages'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'CUR_ST_VAL' => $this->first,\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_SINGLE' => \"\",\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'L_MULTI' => $this->ipsclass->lang['pages'],\r\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'BASE_URL' => $this->ipsclass->base_url.\"autocom=bookie&amp;cmd=input_winners\",\r\t\t\t\t\t\t\t\t\t\t\t\t\t )\t\t);\t\r\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_bookie']->input_winners( $content, $links );\r\t\t}\r\t\telse\r\t\t{\r\t\t\t$this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_no_null_winners'));\r\t\t}\r\t\t$this->page_title = $this->ipsclass->lang['input_winners'];\r\t\t$this->nav[] = $this->ipsclass->lang['input_winners'];\r\t\t}\r\t}", "title": "" }, { "docid": "dbe77e185ee86ae333144160c47cab24", "score": "0.52027", "text": "public function testMustReturnNoWinner()\n {\n $this->setOutputCallback(function() {});\n $this->game->setup();\n $this->game->setWinner(null);\n $this->game->setMaximumTurns(0);\n ob_start();\n $this->setOutputCallback(function() {});\n $this->game->start();\n $contents = ob_get_contents();\n ob_end_clean();\n\n self::assertContains(\"There is no winner. :(\", $contents);\n }", "title": "" }, { "docid": "d574c1ae37cbf36d2ace37ce35a5ce97", "score": "0.5183197", "text": "function isItUsersTurn($game_id)\n{\n $whos_turn = getTurn($game_id);\n\n $userRow = getUserRow();\n\n // Get the current user's user_id:\n $current_user_id = $userRow['userId'];\n\n // Run a query for the user_id of the current player:\n $mysqli = new mysqli(\"oniddb.cws.oregonstate.edu\", \"minorc-db\", \"kLdt7swbvLhRmjzu\", \"minorc-db\");\n if (!($stmt = $mysqli->prepare(\"SELECT players.user_id FROM `players` WHERE players.game_id=$game_id AND players.name='$whos_turn'\"))) {\n echo \"Prepare failed in isItUsersTurn: \" . $stmt->errno . \" \" . $stmt->error;\n }\n\n if (!$stmt->execute()) {\n echo \"Execute failed: \" . $stmt->errno . \" \" . $stmt->error;\n }\n\n if (!$stmt->bind_result($whos_turn_user_id)) {\n echo \"Bind failed: \" . $mysqli->connect_errno . \" \" . $mysqli->connect_error;\n }\n\n while ($stmt->fetch()) {\n if ($whos_turn_user_id == $current_user_id) {\n return True;\n } else {\n return False;\n }\n }\n}", "title": "" }, { "docid": "2cc77fa0f197a913db06f545f6e751c1", "score": "0.51803106", "text": "public function compare()\n {\n for ($i = 0; $i < $this->numberOfPlayers; $i++) {\n $sumValues[] = array_sum($this->values[$i]);\n }\n $maxValue = max($sumValues);\n $maxPlayer = array_search($maxValue, $sumValues);\n return $maxPlayer;\n }", "title": "" }, { "docid": "1f044aca0059e4967d1d7996cad3c021", "score": "0.51733214", "text": "public function isDone()\n {\n if ($this->getPlayers()[0]->points() >= 100) {\n return \"Player won!\";\n } elseif ($this->getPlayers()[1]->points() >= 100) {\n return \"Computer won!\";\n }\n return false;\n }", "title": "" }, { "docid": "9897003ecc3a07b0dfa3cc47ef26636d", "score": "0.51655096", "text": "public function getLastWinners()\n {\n $sqlQueryService = new sqlQueryService();\n $lastScores = $sqlQueryService->sqlQueryService(\"SELECT * FROM game_lastScore\");\n $lastScoresArray = [];\n for ($i=0; $i < sizeof($lastScores); $i++) {\n $lastScoresArray[$i] = [\n 'place'=>$lastScores[$i][\"place\"], \n 'playerId'=>$lastScores[$i][\"playerId\"], \n 'score'=>$lastScores[$i][\"score\"]\n ];\n }\n return $lastScoresArray;\n }", "title": "" }, { "docid": "3601001b42baa3dd606abc88b3e90f01", "score": "0.5161319", "text": "public function getRankInTeamAttribute() {\n $team = Team::whereId($this->last_known_team)->first();\n\n // This gets us a list of players ordered by mean rating.\n if (Cache::has( $team->name.\"PlayerRanks\" ))\n {\n $results = Cache::get( $team->name.\"PlayerRanks\" );\n }\n else {\n // the ranks have not yet been generated so run func to generate them.\n $results = $team->getRankedPlayers();\n }\n\n // Now get the rank of our player within that set.\n $i = 0;\n // results: player_id, mean_rating, player_name\n foreach ($results as $row) {\n if( $row->player_id == $this->id ){\n // the player hasn't been rated\n if ($row->mean_rating == null)\n return \"Unranked\";\n else{\n ++$i;\n return \"Ranked: #\".$i; // Send the 1-based index to the row\n }\n }\n // else this isn't the player we are looking for\n else {\n ++$i;\n }\n }\n }", "title": "" }, { "docid": "92d213e381d46b1d216551b2d4a116b2", "score": "0.5140491", "text": "public function next_turn() {\n\t\t$players = $this->get_current_room_players();\n\t\t$next = 0;\n\t\tfor($i = 0; $i < count($players); $i++) {\n\t\t\tif ($players[$i]['role']['active'] == 1) {\n\t\t\t\t$this->add_status($players[$i]['player_id'], array('active' => 0));\n\t\t\t\t$next = $i+1;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ($next == count($players)) $next = 0;\n\t\t$next = $players[$next]['player_id'];\n\t\treturn $this->add_status($next, array('active' => 1));\n\t}", "title": "" }, { "docid": "90b0299ebd7db2398164a3f314635f02", "score": "0.5139321", "text": "public function getOpponent(Rating $player)\n {\n if ($this->winner === $player) {\n $opponent = $this->loser;\n } elseif ($this->loser === $player) {\n $opponent = $this->winner;\n } else {\n throw new InvalidArgumentException('Player did not participate in match');\n }\n \n return $opponent;\n }", "title": "" }, { "docid": "b059270cf5ad3b321b0f23a3ef1860cb", "score": "0.5127831", "text": "function getCurrentGames() {\r\n\t\t$query = $this->CI->db->query(\"SELECT id, level, session FROM rallye_duell_games\");\r\n\t\tif ($query->num_rows() > 0) {\r\n\t\t\t$aGames = array();\r\n\t\t\tforeach ($query->result() as $row){\r\n\t\t\t\t$aGames[] = $row;\r\n\t\t\t}\r\n\t\t\treturn $aGames;\r\n\t\t} else {\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "title": "" } ]
62829092a53a292edbfcfabe54189ec6
Lists all Image entities.
[ { "docid": "90324bc50d282560e3a914829fa23c3f", "score": "0.0", "text": "public function uploadProcessAction(Request $request)\n {\n if (\n empty($_FILES) &&\n empty($_POST) &&\n isset($_SERVER['REQUEST_METHOD']) &&\n strtolower($_SERVER['REQUEST_METHOD']) == 'post'\n ) {\n // catch file overload error...\n $postMax = ini_get('post_max_size'); //grab the size limits...\n return new Response(\"Files larger than {$postMax} are not allowed!\", 413);\n }\n\n $uploadsDir = $this->getParameter('kernel.root_dir') . '/../web/' . $this->getParameter('uploads_dir') . '/images/default/';\n $files = $request->files->all();\n\n /** @var UploadedFile $file */\n foreach ($files as $file) {\n\n $name = $this->getFileName($file->getClientOriginalName());\n if ($extension = $this->getExtension($file)) {\n $name = sprintf('%s.%s', $name, $extension);\n }\n\n $file = $file->move($uploadsDir, $name);\n\n $entity = $this->getNewEntity();\n $entity->setActive(true);\n $entity->setImageFile($file);\n $entity->setImageName($name);\n $this->getManager()->persist($entity);\n }\n\n $this->getManager()->flush();\n\n return new Response('OK');\n }", "title": "" } ]
[ { "docid": "94e8d60bfbe1905ec94ef8d14d42b818", "score": "0.7183487", "text": "public function index()\n {\n return $this->showAll(Image::all());\n }", "title": "" }, { "docid": "61a65b29a32934c06a3aa09e82f784a7", "score": "0.71348554", "text": "public function getAllImages()\n\t\t{\n\t\t\t// getting an array that holds all the images in the database\n\t\t\t$ob = $this->getFilteredQuery(['images'], ['*'] , null, 'Image');\n\t\t\treturn $ob;\n\t\t}", "title": "" }, { "docid": "5800c590be02efbc549e4c0edf6afbd9", "score": "0.7005949", "text": "public function index()\n {\n return Image::all();\n }", "title": "" }, { "docid": "3c197075207840b66f9b300fa1c1ed9e", "score": "0.68451965", "text": "function eh_list_all_images()\n\t{\n\t\treturn getLoopData(\"* from eh_image as i, eh_region as r where i.id_region = r.id_region and (r.region_code = '\".$_SESSION['eh_credentials']['region_code'].\"' or r.region_code = 'all') \");\n\t}", "title": "" }, { "docid": "7c24772a8b602234bd0ab1797dc7fde2", "score": "0.6831552", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DatawalkeMainBundle:Thumb')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "612ac1600c17ab8020b32aff68625a25", "score": "0.6741", "text": "public function findAllPicture();", "title": "" }, { "docid": "579c4a7b3c0705f4d9ca004fdc6bd49a", "score": "0.6691909", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $this->get('security.context')->getToken()->getUser();\n \n $msgs = $em->getRepository('HamdiContactBundle:Contact')->findAll(); \n $n = $this->getDoctrine()->getEntityManager()->createQuery('select COUNT(p) as nb FROM HamdiContactBundle:Contact p where p.msg_vue = 0')->getResult();\n $galeries_img = $em->getRepository('HamdiMediaBundle:galleryImage')->findAll();\n\n \n \n $entities = $em->getRepository('HamdiMediaBundle:Images')->findAll();\n\n return $this->render('HamdiMediaBundle:Images:index.html.twig', array(\n 'entities' => $entities,'user'=>$user,'n'=>$n[0]['nb'],'msgs'=>$msgs,\n 'galerie_img'=>$galeries_img\n ));\n }", "title": "" }, { "docid": "e886f4a49034bf902b832ae246ca37ce", "score": "0.66112036", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //$images = $em->getRepository('AppBundle:Image')->findAll();\n\n $catimg = $em->getRepository('AppBundle:Image')->getCategsImagesByCateg();\n $images = $em->getRepository('AppBundle:Image')->getImagesByCateg();\n\n foreach ($catimg as $idx_c => $categ) {\n $cat = $categ[\"imgCat\"];\n switch ($cat) {\n case \"Kifa\":\n $categlib = \"Bijoux\"; break;\n default:\n $categlib = \"Tableaux\";\n }\n $catimg[$idx_c][\"Lib\"] = $categlib;\n }\n\n return $this->render('AppBundle:image:index.html.twig', array(\n 'catimg' => $catimg,\n 'images' => $images,\n ));\n }", "title": "" }, { "docid": "96333ae524ef2aaa70ff265cf8874256", "score": "0.66065586", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $pictures = $em->getRepository('EngravingBundle:Picture')->findAll();\n\n return $this->render('EngravingBundle:picture:index.html.twig', array(\n 'pictures' => $pictures,\n ));\n }", "title": "" }, { "docid": "120ea2fb180a5898eeb8a4b5ebfcb876", "score": "0.65327185", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $lieu=$em->getRepository('ApplicationHomeBundle:Region')->findAll();\n $annonce=$em->getRepository('ApplicationHomeBundle:TypeAnnonce')->findAll();\n $entities = $em->getRepository('ApplicationHomeBundle:Autres')->findAll();\n $im = $em->getRepository('ApplicationHomeBundle:Image')->findByTypeAnnonceClient(9);\n for ($i = 0; $i < count($entities); $i++) {\n $k = 0;\n foreach ($im as $photo) {\n if ($entities[$i]->getId() == $photo->getObj()) {\n $entities[$i]->images[$k] = $photo->path;\n $k++;\n }\n }\n }\n\n return $this->render('ApplicationHomeBundle:Autres:index.html.twig', array(\n 'entities' => $entities,\n 'region' =>$lieu,\n 'annonce'=>$annonce\n ));\n }", "title": "" }, { "docid": "d5744a11b7fc2ad6210d28cce1d798b5", "score": "0.6493426", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $imagens = $em->getRepository('AppBundle:Imagen')->findAll();\n\n return $this->render('imagen/index.html.twig', array(\n 'imagens' => $imagens,\n 'page'=>\"galery\",\n ));\n }", "title": "" }, { "docid": "ee0c74fd7f49649e33ac49b46425d660", "score": "0.64725846", "text": "public function index()\n {\n $list = Image::paginate(10);\n return view('admin.images.index', ['list' => $list]);\n }", "title": "" }, { "docid": "c4d80cd907a76d7a900ae40897b5dad6", "score": "0.6440806", "text": "public function index()\n {\n $images = Image::latest()->paginate();\n return view('Admin/Image.index',compact('images'));\n }", "title": "" }, { "docid": "7b90efd363e915ed07a5a439c30d2423", "score": "0.6373684", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AVBundle:FotoPerfil')->findAll();\n\n \n return $this->render('AVBundle:FotoPerfil:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "5ab648d0227c118af2626ec8d622e518", "score": "0.636858", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('TouqGalleryBundle:Album')->findAll();\n\n return $this->render('TouqGalleryBundle:Album:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "0112aa13f17ba2b1e4b8235d69e6e398", "score": "0.63676983", "text": "public function index()\n {\n $images = Image::with('product')->get();\n return view('admin.images.index', compact('images'));\n }", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.6366528", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.6366528", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.6366528", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.6366528", "text": "public function getImages();", "title": "" }, { "docid": "565cfbedbd26c54aeb82a22de4bd240f", "score": "0.6366528", "text": "public function getImages();", "title": "" }, { "docid": "eced7c385f1f4fb732dd014cb4429066", "score": "0.6364316", "text": "public function images(){\n $ci =& get_instance();\n $query = $ci->db->query(\"select * from product_images where pid = \".$this->id);\n return $query->custom_result_object('Product_imagesEntity');\n }", "title": "" }, { "docid": "9399519736f55a72539bb7f6087958f1", "score": "0.63378894", "text": "public function index()\n {\n $images = Image::all();\n return $this->apiSuccess($images);\n }", "title": "" }, { "docid": "a1b137ad9ec4707d1218ee7cb6f4aee5", "score": "0.6326225", "text": "public function index()\n {\n $images = ProductImage::paginate(10);\n return new ProductImageCollection($images); \n }", "title": "" }, { "docid": "28e52f58401df8048fb8b48df81e8252", "score": "0.6325187", "text": "public function getAll()\n {\n\n $all_images = DB::table('photos')->orderBy('id', 'desc')->paginate(6);\n\n return View::make('tpl.all_images')\n ->with('images', $all_images);\n }", "title": "" }, { "docid": "60cafe4b821f9999f20353a77b1cd852", "score": "0.63170177", "text": "public function index()\n\t{\n\t\t$images = Image::all();\n\n\t\treturn View::make('admin.images.index', compact('images'));\n\t}", "title": "" }, { "docid": "2173da9942a55a2489fa8a0c7e108183", "score": "0.6291976", "text": "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Img::find(),\n ]);\n\n return $this->renderPartial('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "f194613b4e91815108a3dd1faa1cc151", "score": "0.6272535", "text": "public function index()\n {\n $photos = Images::paginate(10);\n\n return (new ImagesCollection($photos))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "4652378f1ca9c4b157ec2cbe4c5e9db6", "score": "0.62660354", "text": "public function index()\n\t{\n $images = Image::all();\n\n\t\treturn view('images.index', compact('images'));\n\t}", "title": "" }, { "docid": "c5e16aafa676b7f133cca232c6f79416", "score": "0.62568974", "text": "public function index()\n {\n $images = Image::where('deleted_at',NULL)->get();\n $products = Product::where('deleted_at',NULL)->paginate(10);\n return view('backend.images.index')->with([\n 'images'=>$images,\n 'products'=>$products\n ]);\n }", "title": "" }, { "docid": "022e104a595c114f40d7fa00efbc8ba4", "score": "0.6234616", "text": "public function index()\n {\n $images = Image::all()->load(['album', 'location', 'owner']);\n return Response::json($images);\n }", "title": "" }, { "docid": "14ee337a75c1e3593a239e1630c1fe99", "score": "0.6211062", "text": "public function index(Request $request)\n {\n $images = Image::filtered()\n ->paginate($request->input('count', 15));\n\n return ImagesResource::collection($images);\n }", "title": "" }, { "docid": "215208fe1fe1f7a66d32bbcedef2fbf7", "score": "0.6204938", "text": "public function index(Request $request)\n {\n $user = auth()->user();\n $clients = new Clients(config(\"humstack.apiServerURL\", \"http://localhost:8080\"));\n\n $res = $clients->Image()->list($user->group->name);\n $imageList = $res->data;\n if (isset($request->imageName)) {\n foreach ($imageList as $image) {\n if ($image->meta->id === $request->imageName) {\n return redirect(route('images.show', [\n 'imageName' => $request->imageName,\n ]));\n }\n }\n }\n return view('pages.images.index', [\n 'imageList' => $imageList,\n ]);\n }", "title": "" }, { "docid": "a0255507de8195e55161e3a700160b27", "score": "0.6204514", "text": "public function indexAction()\n {\n $entities = $this->repo->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "db28252579c580612dd3407b43d44e88", "score": "0.62015206", "text": "public function index(): \\Illuminate\\Database\\Eloquent\\Collection\n {\n return Product::with('images')->get();\n }", "title": "" }, { "docid": "357ac4a106bfeb559a8507853ac898c3", "score": "0.6195441", "text": "public function index()\n {\n $image = Image::all();\n $image->each(function($image){\n $image->article->pluck('title');\n });\n return view ('admin.images.index')->with('images', $image);\n }", "title": "" }, { "docid": "4e9d62e18166b499798e69bca80cbd1c", "score": "0.6194425", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('KoyaanGlobeBundle:Globe')->findAll();\n\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "df9050dc9de932611466a3e1aa66038d", "score": "0.61918634", "text": "public function indexAction()\n {\n $page = 1;\n\n $user = $this->get('security.context')->getToken()->getUser();\n\n $objects = $this->get('buggl_main.entity_repository')\n ->getRepository('BugglMainBundle:LocalAuthorPhoto')\n ->findByLocalAuthor($user, self::LIMIT, $page);\n\n $images = array();\n foreach ($objects as $object) {\n $images[] = array( 'id' => $object->getId(), 'path' => $object->getWebImagePath() );\n }\n\n $data = array(\n 'activeTab' => 'photos',\n 'images' => json_encode($images),\n 'totalCount' => count($objects),\n 'limit' => self::LIMIT\n );\n\n return $this->render('BugglMainBundle:LocalAuthor\\MediaGallery:mediaGalleryPhotos.html.twig', $data);\n }", "title": "" }, { "docid": "f72ceeb9f2249e9b93813f80230fceb6", "score": "0.6181781", "text": "public function index()\n {\n $images = Images::all();\n\n return view('main.images.index', compact('images'));\n }", "title": "" }, { "docid": "88ea79bba131a1dfbc62fa393f93709f", "score": "0.61817217", "text": "public function getImages()\n {\n return $this->hasMany(Image::className(), ['collection' => 'id']);\n }", "title": "" }, { "docid": "ccf4edd5854253c5ea2d7b5bf21b5f63", "score": "0.6179937", "text": "public function fetchImages()\n {\n try {\n $api_client = new Client();\n $list = $api_client->getImagesByArticles($this->HailID);\n } catch (\\Exception $ex) {\n return;\n }\n\n $hailIdList = [];\n\n // Clean before importing\n $this->ImageGallery()->removeAll();\n\n foreach ($list as $hailData) {\n // Build up Hail ID list\n $hailIdList[] = $hailData['id'];\n\n // Check if we can find an existing item.\n $hailObj = Image::get()->filter(['HailID' => $hailData['id']])->First();\n\n if (!$hailObj) {\n $hailObj = new Image();\n }\n $hailObj->OrganisationID = $this->OrganisationID;\n $hailObj->HailOrgID = $this->HailOrgID;\n $hailObj->HailOrgName = $this->HailOrgName;\n\n $hailObj->importHailData($hailData);\n $this->ImageGallery()->add($hailObj);\n }\n }", "title": "" }, { "docid": "05935c18767c0ed8db47b4d80211f7e1", "score": "0.61628443", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ckRecipesBundle:Ingredient')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "69f935cbbddc94af06c9bd5c21a239d1", "score": "0.6141938", "text": "public function getAllEntities(): array;", "title": "" }, { "docid": "6220e515930fe33232e627690e49bfa9", "score": "0.6137276", "text": "public function index()\n {\n $images = Image::all();\n return view('index',compact('images'));\n }", "title": "" }, { "docid": "aebb939eca74b1c8cfd5cf5c1234fca4", "score": "0.61251104", "text": "public function index()\n {\n return Image::where('private', 0)->get();\n }", "title": "" }, { "docid": "1f77f7ce9a5ebbead41e1f0de9dcd364", "score": "0.6124046", "text": "public function index()\n {\n return Gallery::with('user', 'images')->get();\n\n }", "title": "" }, { "docid": "2b3a48ced8a08e4cb50d21b69fb64845", "score": "0.61230195", "text": "public function index()\n {\n $lsImages = ProductImages::paginate(10);\n return view('product_images.list')->with(['lsImages'=>$lsImages]);\n }", "title": "" }, { "docid": "d163afb7da2393090152e60ab5cecba0", "score": "0.6122139", "text": "public function index()\n\t{\n\t\t$images = new Image;\n\n\t\t// If a search was performed.\n\t\tif (Input::get('search')) {\n\t\t\t$images = $images->where('title', 'like', '%' . Input::get('search') . '%');\n\t\t}\n\n\t\t// Filter images.\n\t\t$images = $images->orderBy('created_at', 'desc')->take(10)->get();\n\n\t\t// Return the response as a table view.\n\t\treturn View::make('file.image.table')->with('images', $images);\n\t}", "title": "" }, { "docid": "410304de27f007884a0c5f7819dabe2e", "score": "0.61106896", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GitesBundle:Gites')->findAll();\n\n //var_dump($entities);\n\n\n return $this->render('GitesBundle:Administration:Gites\\layout\\index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "96154efde542ba33b11ce3d100c8f4db", "score": "0.6107085", "text": "public function images() {\n \t$this->template->content = View::instance('v_images_image');\n\t\n \t# Build the query to get the image(s)\n\t\t$img = \"SELECT image_name\n\t\t\tFROM images\n\t\t\tINNER JOIN users \n\t\t\tON images.user_id = users.user_id\";\n \t\t\t\n \t# Execute the query to getthe users images. \n \t$_POST['image'] = DB::instance(DB_NAME)->sanitize($img);\n \t$images = DB::instance(DB_NAME)->select_rows($img);\t\n \t\n \t# Pass data to the View\n \t$this->template->content->images = $images;\n\t\t\n\t\t# Render the View\n\t\techo $this->template;\n\t}", "title": "" }, { "docid": "219153773cc25825f598984d4ece5e38", "score": "0.6105019", "text": "public function getAllPhotosAction() {\n $album_id = (int) $this->_getParam('album_id');\n $album = Engine_Api::_()->getItem('album', $album_id);\n $this->view->showLightBox = Engine_Api::_()->sitealbum()->showLightBoxPhoto();\n if (!Engine_Api::_()->sitealbum()->isLessThan417AlbumModule()) {\n $photoTable = Engine_Api::_()->getItemTable('album_photo');\n $this->view->paginator = $paginator = $photoTable->getPhotoPaginator(array(\n 'album' => $album,\n ));\n } else {\n $this->view->paginator = $paginator = $album->getCollectiblesPaginator();\n }\n $paginator->setItemCountPerPage(10000);\n }", "title": "" }, { "docid": "d5b9aab29b5f7489fce35cbfd328bd37", "score": "0.6078072", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $itemEntities = $em->getRepository('MeldonCatalogBundle:itemEntity')->findAll();\n\n return $this->render('itementity/index.html.twig', array(\n 'itemEntities' => $itemEntities,\n ));\n }", "title": "" }, { "docid": "62530aae079dced4428f27d0a5bead65", "score": "0.6071925", "text": "public function listImage()\n {\n $datas = Image::orderBy(\"created_at\", \"DESC\")->where(\"user_id\", Auth::user()->id)->get();\n $Image = new Image;\n foreach ($datas as $data) {\n $row = $data;\n $row->image64 = $Image->getThumbnailBase64($data->filename, Auth::user()->id);\n $row->cdn = parse_url(Storage::url('images/user_id_' . Auth::user()->id . \"/\" . $data->filename))[\"path\"];\n }\n $response[\"data\"] = $datas;\n return response()->json($response);\n }", "title": "" }, { "docid": "152cfc950f674f24af2b8e2bc2412ae8", "score": "0.60633594", "text": "public function index()\n\t{\n try{\n $images = $this->imageRepository->all();\n } catch (\\Exception $e) {\n $images = false;\n }\n\n if(!$images || $images->count() == 0 ){\n return redirect('images/create');\n }\n\n\t\treturn view('images.index')->with('images', $images)->with('SearchCriteria','');\n\t}", "title": "" }, { "docid": "c01c8d17945dbdcb8d190688692421a8", "score": "0.6059818", "text": "public function index()\n {\n $images = Image::with('author')->paginate();\n\n return view('gallery.index', compact('images'));\n }", "title": "" }, { "docid": "dc56bd231b767544de11c0d08fc1f9dd", "score": "0.60193855", "text": "public function actionIndex()\n {\n if (Yii::$app->user->isGuest || Yii::$app->user->identity->username == \"demo\") {\n return $this->goHome();\n }\n\n $searchModel = new ImageSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "d55f8416ff2b09341a399d8256c6bde1", "score": "0.6011984", "text": "public function testImagesGetAll()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "f1e603ea662add4126146f7948781439", "score": "0.6007661", "text": "public function getAllImages()\n {\n $images = new ArrayList();\n if ($this->hasHeroImage()) {\n $images->push($this->HeroImage());\n }\n if ($this->hasGalleryImages()) {\n $images->merge($this->ImageGallery());\n }\n $images->removeDuplicates('HailID');\n\n return $images;\n }", "title": "" }, { "docid": "b0e4a742932bd9d757d84c661f94d1cd", "score": "0.60048324", "text": "public function getImages()\n {\n }", "title": "" }, { "docid": "c261f8db64b10eec7c428c26bdc92d4b", "score": "0.596928", "text": "public function listAction() {\n\t\t$contentObject = $this->configurationManager->getContentObject();\n\t\t$contentElement = $contentObject->data;\n\t\t$contentuid = $contentElement['uid'];\n\n\t\t$this->view->assign('gallery', $this->imagesRepository->findByContentUid($contentuid));\n $this->view->assign('popupimgclass', $this->getExtSettings('imagePopupCssClass')); // CSS Class for PopUp Image\n\t\t$this->view->render();\n\n\t}", "title": "" }, { "docid": "88f0cc2a016695e599b89167d9e01086", "score": "0.59578544", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('OGInversaBundle:Location')->findAll();\n\n return array('entities' => $entities);\n }", "title": "" }, { "docid": "313356a15373fab07503ee77925d4686", "score": "0.59510404", "text": "public function listEntities()\n {\n return $this->client->call(array(\n 'method' => 'glpi.listEntities'\n ));\n }", "title": "" }, { "docid": "9be120d8cf0c13f9d8b348bda92d4a14", "score": "0.59461987", "text": "public function actionIndex()\n {\n $searchModel = new ImagenSearch;\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->query->where(['tipoimg'=>'noticia']);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "d5b5ca3c7fc37ce870e217229540080c", "score": "0.5945803", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SiteMainBundle:Media')->findAll();\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $entities,\n $this->get('request')->query->get('page', 1) /*page number*/,\n 10/*limit per page*/\n );\n\n return $this->render('SiteMainBundle:Backend/Media:index.html.twig', array(\n 'entities' => $pagination,\n ));\n }", "title": "" }, { "docid": "8cfe9517e23eb333e2acefcd95e2947b", "score": "0.59409446", "text": "public function images()\n {\n return $this->relationshipTrashedFilter($this->morphToMany('App\\Api\\V1\\Models\\Image', 'imageable'));\n }", "title": "" }, { "docid": "de57cda828a95462b7fdc027469ac1fc", "score": "0.5938153", "text": "public function index()\n {\n $actions = ImageAction::all();\n return view(\"images/imageAction/index\",compact(\"actions\"));\n }", "title": "" }, { "docid": "8403e387359df254460fd89946526b9c", "score": "0.5934491", "text": "public function indexAction()\n {\n \n $em = $this->getDoctrine()->getEntityManager();\n\n return $this->render('BetaBundle:Villes:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "c44145386b2f0c90fb9a3a0c740f748a", "score": "0.59221125", "text": "public function getAllImages ()\n {\n $response= $this->PostImageService-> getAllImages();\n return response($response,200)\n ->header('Access-control-Allow-Origin','*')\n ->header('Access-control-Allow-Methods','*');\n }", "title": "" }, { "docid": "574d66bb1128b847c498baa2becce563", "score": "0.59194624", "text": "public function indexAction() {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('GestionEmploisBundle:Emploi')->findAll();\r\n\r\n return $this->render('GestionEmploisBundle:Emploi:index.html.twig', array(\r\n 'entities' => $entities,\r\n ));\r\n }", "title": "" }, { "docid": "d6bd209eea7a909ec1bbf56afae413a6", "score": "0.59062314", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Search')->findAll();\n\n return $this->render('AppBundle:Search:list.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "042ae76be2f34a5747bdb508e873c3a8", "score": "0.59052104", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('LvSaladeBundle:Famille')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "cd2486af22fc0e149fc8fe0386074cca", "score": "0.5903326", "text": "public function fetchAll() {\n return $this->getEntityRepository()->findAll();\n }", "title": "" }, { "docid": "96ad1d1c507379b0cb23eb90f20a6af7", "score": "0.59020674", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ModuleSliderBundle:Slide')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "0de408af75f865dadb915db4ee00f452", "score": "0.5899006", "text": "public function images()\n {\n return $this->hasMany(Image::class);\n }", "title": "" }, { "docid": "0de408af75f865dadb915db4ee00f452", "score": "0.5899006", "text": "public function images()\n {\n return $this->hasMany(Image::class);\n }", "title": "" }, { "docid": "51ee4808a59e9d7a7f50f39471a231d4", "score": "0.58986235", "text": "function listImagesObject()\n\t{\n\t\tglobal $tpl, $ilToolbar, $ilCtrl, $lng, $rbacsystem;\n\t\t\n\t\tif ($rbacsystem->checkAccess(\"write\", (int) $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$ilToolbar->addButton($lng->txt(\"sty_add_image\"),\n\t\t\t\t$ilCtrl->getLinkTarget($this, \"addImage\"));\n\t\t}\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilStyleImageTableGUI.php\");\n\t\t$table_gui = new ilStyleImageTableGUI($this, \"listImages\",\n\t\t\t$this->object);\n\t\t$tpl->setContent($table_gui->getHTML());\n\t\t\n\t}", "title": "" }, { "docid": "358920a4872aa27cd67baf11c5ed769f", "score": "0.58956134", "text": "public function actionGenerateImages(){\n //header('HTTP/1.1 400 Bad Request');\n //die(json_encode(['error' => 'obecna chyba']));\n\n $qb = $this->em->createQueryBuilder();\n $imageObjArr = $qb->select(\"img\")\n ->from('\\App\\Model\\Database\\Entity\\Image','img')\n ->where($qb->expr()->isNotNull(\"img.image_icon\"))\n ->andWhere('img.deleted_on IS NULL')\n ->getQuery()->getResult();\n\n foreach($imageObjArr as $imageObj){\n $imageObj->createImageFile();\n }\n\n\n die(json_encode(['total' => sizeof($imageObjArr)]));\n }", "title": "" }, { "docid": "e69cbd32a79fbc7cb35934c5482bfedb", "score": "0.58900607", "text": "public function images() {\n return $this->hasMany(Image::class);\n }", "title": "" }, { "docid": "c8746f894e336f3d7026a009567b9628", "score": "0.5885795", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('IbwJobeetBundle:Goods')->findAll();\n\n return $this->render('IbwJobeetBundle:Goods:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "title": "" }, { "docid": "1e879e2bbbcdf410e58ae9842318ffd5", "score": "0.58832955", "text": "public function showAllAddImages()\n\t{\n\t\t$requestData = Request::all();\n\t\treturn AdvertisementImage::where('advertisement_id', '=', $requestData['add_id'])->get();\n\t}", "title": "" }, { "docid": "3fe117b23db7678e7da7e90252ec7e06", "score": "0.5874911", "text": "public function index()\n {\n return Products::with('images')\n ->with('category')->get();\n }", "title": "" }, { "docid": "ca84eff87f82bf66776b50acb295c585", "score": "0.5874756", "text": "public function index()\n {\n $title = 'Index - image';\n\n if (auth()->user()->hasRole('client')) {\n $images = Image::all()->where('user_id', '=', auth()->user()->id);\n } else {\n $images = Image::all();\n }\n\n return view('image.index', compact('title', 'images'));\n }", "title": "" }, { "docid": "17b7b2d875450ea09026d4bb46b1ccf9", "score": "0.586784", "text": "public function liste() {\n \t$galerieManager = new GalerieManager();\n $photoManager = new PhotoManager();\n $galerieListe = $galerieManager->findAll();\n\n foreach ($galerieListe as $galerie){\n $firstPhoto[$galerie['id']] = $photoManager->getFirstImage($galerie['id']);\n }\n\n\t\t$this->show('galerie/liste',\n\t\t\t['galerieListe' => $galerieListe, 'firstPhoto' => $firstPhoto]);\n }", "title": "" }, { "docid": "7a815dfc8997170397c50f90fd4f4458", "score": "0.58619595", "text": "public function images()\n {\n return $this->hasMany('\\Evolve\\Render\\Models\\Image');\n }", "title": "" }, { "docid": "68743a91885e00c3c8bdcdd8de3a53ff", "score": "0.5860827", "text": "function GetImages()\n {\n echo BannerHelper::GetImages($this->Core, Request::GetPost(\"BannerId\"));\n }", "title": "" }, { "docid": "1f010093076907dfcc86e00fbdd767e7", "score": "0.5856608", "text": "public function get_all_picture(){\n $shops = $this->all()->get();\n \n }", "title": "" }, { "docid": "208837ec32d7963f4f583b8fc3e2abdc", "score": "0.5855614", "text": "public function index() {\n \t$this->template->content = View::instance('v_images_index');\n # \t$this->template->content = View::instance('v_posts_images');\n \t\n \t# Build the query to get the image(s)\n \t$img = \"SELECT *\n \t\t\tFROM images\n \t\t\tWHERE user_id = \".$this->user->user_id;\n \t\n \t# Execute the query to getthe users images. \n \t$_POST['image'] = DB::instance(DB_NAME)->sanitize($img);\n \t$images = DB::instance(DB_NAME)->select_rows($img);\t\n \t\n \t# Pass data to the View\n \t$this->template->content->images = $images;\n \t\n \t# Render the View\n\t\techo $this->template;\n \t\n }", "title": "" }, { "docid": "ba7a5dc4f395b3f725d948127643681b", "score": "0.58554924", "text": "public function getAllImg()\n\t{\n\t\t$sql = \"SELECT img_name FROM img\";\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query->num_rows() > 0 ? $query->result() : null;\n\t}", "title": "" }, { "docid": "447d8bb306cd692b99c6ae5033381aaa", "score": "0.58488375", "text": "public function index()\n {\n $images = Image::all();\n return view('hasil',compact('images'));\n }", "title": "" }, { "docid": "16a579634a84a69390ae06ef6618298d", "score": "0.5842225", "text": "public function index()\n\t{\n\t\n\t\t$images;\n\t\t$sort_by = Input::get('sort_by');\n\t\t$sort_order = Input::get('sort_order');\n\t\t\n\t\t$images = Image::with('flower')->get();\n\n\t\t// Check for sort_by and sort if requested\n\t\tif ( $sort_order === null || $sort_order === 'DESC' ){\n\t\t\t\t\n\t\t\tif ( $sort_by != null ){\n\t\t\t\t$images = $images->sortByDesc( $sort_by );\n\t\t\t};\n\t\t\n\t\t} else {\n\t\t\t\t\n\t\t\tif ( $sort_by != null ){\n\t\t\t\t$images = $images->sortBy( $sort_by );\n\t\t\t};\n\t\t\n\t\t}\n\t\n\t\treturn view('images.index', array('images' => $images));\n\t}", "title": "" }, { "docid": "77245f57af161b92f5a620a8ff3f6437", "score": "0.58420104", "text": "public function images()\n {\n return $this->morphMany( Image::class, 'ownerable', 'owner_type', 'owner_id' );\n }", "title": "" }, { "docid": "6002e99f5cb0b0a6aab828d580ba8b65", "score": "0.5836829", "text": "public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CMSBundle:IngredientCategory')->findAll();\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "673522cb7f4fb638d36795c1b8088f9b", "score": "0.58337474", "text": "public function index()\n {\n //return Photo::all();\n return PhotoResource::collection(Photo::all());\n }", "title": "" }, { "docid": "d9770debfb43e53b747c54d43c05a87b", "score": "0.5831244", "text": "public function listAction()\n {\n $limit = (int) $this->Request()->getParam('limit');\n $offset = (int) $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter');\n $filterBy = $this->Request()->getParam('filterBy');\n $categoryId = $this->Request()->getParam('categoryId');\n\n $query = $this->getRepository()->getListingQuery($filter, $filterBy, $categoryId);\n\n $query->setFirstResult($offset)\n ->setMaxResults($limit);\n\n /** @var PDOStatement $statement */\n $statement = $query->execute();\n $emotions = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n $query->select('COUNT(emotions.id) as count')\n ->resetQueryPart('groupBy')\n ->resetQueryPart('orderBy')\n ->setFirstResult(0)\n ->setMaxResults(1);\n\n $statement = $query->execute();\n $count = $statement->fetch(PDO::FETCH_COLUMN);\n\n $this->View()->assign([\n 'success' => true,\n 'data' => $emotions,\n 'total' => (int) $count,\n ]);\n }", "title": "" }, { "docid": "b77735ad46fe36c7703267a37802902c", "score": "0.58267546", "text": "public function getEntities();", "title": "" }, { "docid": "d03bb27f4ae8bade1a4953e0cba1f63a", "score": "0.5819005", "text": "public function indexAction() {\r\n\t\t$data = array();\r\n\t\t\r\n\t\t$gallery_id = $this->getRequest()->getParam('gallery_id', null);\r\n\t\tif ($gallery_id && is_numeric($gallery_id)) {\r\n\t\t\t$gallery = new Petolio_Model_PoGalleries();\r\n\t\t\t$gallery->find($gallery_id);\r\n\t\t\tif($gallery) {\r\n\t\t\t\t$files = new Petolio_Model_PoFiles();\r\n\t\t\t\t$data = $files->fetchListToArray(\"type = 'image' AND folder_id = '{$gallery->getFolderId()}'\", \"date_created ASC\");\r\n\t\t\t} else {\r\n\t\t\t\treturn $this->returnError($this->translate->_(\"Gallery does not exist.\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$this->sendResponse($data);\r\n\t}", "title": "" }, { "docid": "0d60f344bbdd3329afe228f8ddddcafb", "score": "0.5810577", "text": "function getImages() { return $this->_images; }", "title": "" }, { "docid": "a57179cda9740b5b091c3bc2d7a74aa9", "score": "0.58012754", "text": "public function getImages(){\n\t\t$imagesManager = new \\Manager\\ImagesManager();\n\t\t$images = $imagesManager->getLastImages();\n\n\t\treturn $images;\n\t}", "title": "" }, { "docid": "aea8997cbfc0c139b16a3a6bb7fdb719", "score": "0.579876", "text": "public function images()\n {\n return $this->hasMany(ProductImageProxy::modelClass(), 'product_id', 'product_id')\n ->orderBy('position');\n }", "title": "" }, { "docid": "72e04b6d49d7f5716a5f39dafc5ef133", "score": "0.5795653", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('UserBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "a6ceff68c57ed3571256d152cfde4a04", "score": "0.5794535", "text": "public function index()\n {\n $images =Images::all();\n $images =$images->sortBy('desc');\n return view('admin.images',compact('images'));\n }", "title": "" } ]
1b49ebcf0b5dd3847a364851b436b7d2
Generate EDI For Bpost Function : ESCorreosEDIBody() Function Generate EDI for Correos forwarder
[ { "docid": "91232ba5a934751ddecf4d4f4353cd28", "score": "0.5347324", "text": "public function ESCorreosEDIBody($data, $counter, $total_records){\n $sender_data = $this->getCustomerDetails($data[ADMIN_ID]);\n\t\tif($counter== 1 && $total_records==1){\n\t\t\t$position = 'U';\t// If there is only one registration\n\t\t}\n\t\telseif($counter==$total_records){\n\t\t\t$position = 'F';\t//For the last registration\n\t\t}\n\t\telseif($counter==1){\n\t\t\t$position = 'C';\t//For the first registration\n\t\t}else{\n \t$position = 'R'; //1 For the rest\n\t\t}\n\n\t\t//echo \"<pre>\";print_r($data); echo \"</pre>\"; die;\n $year_of_creation = '2012v001'; //2\n if ($data['service_id'] == 126) { //3\n\t\t\t $product_code = 'S0133';\n }else{\n $product_code = 'S0132';\n }\n\t\t\n $franking_type \t\t\t \t\t= commonfunction::paddingRight(\"FP\",2,\" \");'FP'; //4 to be changed\n $labeler_code \t\t\t \t\t= commonfunction::paddingRight($this->ForwarderRecord['contract_number'],4,\" \");\n $contract_number \t\t \t\t= commonfunction::paddingRight(\"\",8,\" \"); //6\n $client_number \t\t\t \t\t= commonfunction::paddingRight(\"\",8,\" \");\t//7\n $franking_machine_number \t\t= commonfunction::paddingRight(\"\",8,\" \");\t// 8 depend on $franking_type FM\n $amount_franked \t\t \t\t= commonfunction::paddingRight(\"\",10,\" \"); //9 depend on $franking_type FM\n $shipment_code \t\t\t \t\t= commonfunction::paddingRight($data['barcode'],23,\" \");\t// 10 barcode\n $total_packages \t\t\t\t= '1';\t \t\n $package_number \t\t \t\t= '1';\t \t\n\t\t\n\t\t$manifest \t\t\t\t \t\t= 'MD'.$this->ForwarderRecord['contract_number'].'04'.date(\"YmdHis\").'01';\n $manifest_number \t\t \t\t= commonfunction::paddingRight($manifest,24,\" \");// $data['manifest_number'];\t// 13 to be passed in database\n $promotion_code \t\t \t\t= commonfunction::paddingRight(\"\",10,\" \");\t//14\n $reason_resending \t\t \t\t= commonfunction::paddingRight(\"\",1,\" \"); //15 1 to be determined\n\n //Addressee\n $name \t\t\t\t\t\t\t= commonfunction::sub_string(commonfunction::utf8Decode(trim($data[RECEIVER])),0,50);\n\t\t$name \t\t\t\t\t\t\t= commonfunction::paddingRight($name,50,\" \"); //16\n $surname1 \t\t\t\t\t\t= commonfunction::paddingRight(\"\",50,\" \"); // 17 not required\n $surname2 \t\t\t\t\t\t= commonfunction::paddingRight(\"\",50,\" \"); //18 not required\n $taxpayer_identification_number = commonfunction::paddingRight(\"\",15,\" \"); // 19 to be determined\n $company \t\t\t\t\t\t= (trim($data[RECEIVER])=='')?commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode(trim($data[CONTACT])),50),50,\" \"):commonfunction::paddingRight(\"\",50,\" \"); //20 to be determined\n $contact_person \t\t\t\t= commonfunction::sub_string(trim($data[CONTACT]),0,50);\n\t\t$contact_person \t\t\t\t= commonfunction::paddingRight($contact_person,50,\" \");\t//21\n $street_type \t\t\t\t\t= commonfunction::paddingRight(\"\",3,\" \"); //22 to be determined\n $street_name \t\t\t\t\t= commonfunction::utf8Decode(trim($data[STREET])).' '.trim($data[STREET2]);\n\t\t$street_name \t\t\t\t\t= commonfunction::sub_string($street_name,0,50);\n\t\t$street_name \t\t\t\t\t= commonfunction::paddingRight(trim($street_name),50,\" \"); //23\n $street_number \t\t\t\t\t= trim($data[STREETNR]);\n\t\t$street_number \t\t\t\t\t= commonfunction::paddingRight($street_number,5,\" \");\t//24\n $main_door \t\t\t\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($data[ADDRESS],0,5),5,\" \"); //25 not required\n $block \t\t\t\t\t\t\t= commonfunction::paddingRight(\"\",5,\" \"); // 26not required\n $stairway \t\t\t\t\t\t= commonfunction::paddingRight(\"\",5,\" \"); //27 not required\n $floor \t\t\t\t\t\t\t= commonfunction::paddingRight(\"\",5,\" \"); //28 not required\n $door \t\t\t\t\t\t\t= commonfunction::paddingRight(\"\",5,\" \"); //29 not required\n $town \t\t\t\t\t\t\t= commonfunction::utf8Decode(trim(commonfunction::stringReplace(';','',$data[CITY])));\n\t\t$town \t\t\t\t\t\t\t= commonfunction::paddingRight($town,50,\" \");\n \n\t\t$str_province=\"\";\n\t\t$post_code \t\t\t\t\t\t= commonfunction::onlynumbers(trim($data[ZIPCODE]));\n\t\tif($data['country_id']==192)\n\t\t{\t\n\t\t\t$zip_code1 = commonfunction::paddingRight('',5,\" \");\n\t\t\t$zip_code2 \t= commonfunction::paddingRight(commonfunction::sub_string($post_code,0,10),10,\" \");\n\t\t\t$Province \t= commonfunction::paddingRight('',40,\" \");\n\t\t}\t\n\t\telse\n\t\t{\t\n\t\t $zip_code1 = commonfunction::paddingleft(commonfunction::sub_string($post_code,-5,5),5,'0');\n\t\t $zip_code2 \t = commonfunction::paddingRight(\"\",10,\" \");\n\t\t $str_province = $this->GetProvince(commonfunction::sub_string($zip_code1,0,2));\n\t\t $Province \t = commonfunction::paddingRight(commonfunction::sub_string($str_province,0,40),40,\" \");\t\n\t\t}\t\n\t\t\n $country \t\t\t\t\t\t= trim($data['cncode']);\n\t\t$country \t\t\t\t\t\t= commonfunction::paddingRight($country,2,\" \");\t//34 2 digit iso code default ES\n $chosen_ofc \t\t\t\t\t= commonfunction::paddingRight(\"\",7,\" \"); //35 not required\n $destination_i_po_box \t\t\t= commonfunction::paddingRight(\"\",1,\" \"); //36 not required\n $destination_po_box \t\t\t= commonfunction::paddingRight(\"\",6,\" \"); //37 not required\n $contact_number \t\t\t\t= commonfunction::sub_string(commonfunction::onlynumbers(trim($data[PHONE])),-12);\n\t\t$contact_number \t\t\t\t= commonfunction::paddingRight($contact_number,12,\" \"); \t//38\n $email \t\t\t\t\t\t\t= trim($data['rec_email']);\n\t\t$email \t\t\t\t\t\t\t= commonfunction::paddingRight($email,50,\" \");\t//39\n\t\t\n //Shipment data\n $reference_number \t\t\t\t= trim($data[REFERENCE]);\n\t\t$reference_number \t\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($reference_number,0,30),30,\" \");\t//40\n $delivery_mode \t\t\t\t\t= ($data['service_id']==126 || $data['service_id']==149)?commonfunction::paddingRight(\"OR\",2,\" \"):commonfunction::paddingRight(\"ST\",2,\" \"); //41 to be changed\t\n $weight \t\t\t\t\t\t= trim($data['weight']);\n\t\t$weight \t\t\t\t\t\t= commonfunction::paddingRight($weight*1000,5,\" \");\t//42\n $length \t\t\t\t\t\t= commonfunction::paddingRight(\"\",3,\" \"); //43 not required\n $height \t\t\t\t\t\t= commonfunction::paddingRight(\"\",3,\" \"); //44 not required\n $width \t\t\t\t\t\t\t= commonfunction::paddingRight(\"\",3,\" \"); //45 not required\n $insurance \t\t\t\t\t\t= commonfunction::paddingRight(\"N\",1,\" \"); //46 not required\n $insuredvalue \t\t\t\t\t= commonfunction::paddingRight('',6,\" \"); //47 not required, depend on $insurance\n if ($data['service_id'] == 7 || $data['service_id'] == 146) { \n $cash_on_delivery \t\t\t= 'S'; //48\n $codAmount \t\t\t\t\t= trim($data['cod_price']);\n\t\t\t$codAmount \t\t\t\t\t= commonfunction::paddingRight($codAmount,6,\" \");\t//49\n\t\t\t$type_of_cod \t\t\t\t= 'RC';\n\t\t\t$account_number \t\t\t= commonfunction::paddingRight(\"\",20,\" \");\n }else{\n $cash_on_delivery \t\t\t= ''; //N\n $codAmount \t\t\t\t\t= commonfunction::paddingRight(\"\",6,\" \");\n\t\t\t$type_of_cod \t\t\t\t= ' ';\n\t\t\t$account_number \t\t\t= commonfunction::paddingRight(\"\",34,\" \");\n }\n\t\t\n $delivery \t\t\t\t\t= ' '; //52 not required\n $proof_of_delivery \t\t\t= ' '; //53 not required\n $pee_reference \t\t\t\t= commonfunction::paddingRight(\"\",55,\" \"); //54 not required\n $sender_pee_reference \t\t= commonfunction::paddingRight(\"\",350,\" \"); //55 not required\n $prior_delivery \t\t\t= commonfunction::paddingRight(\"\",23,\" \"); //56 not required\n $generate_return_delivery \t= \" \"; //57 not required\n $return_delivery_barcode \t= commonfunction::paddingRight(\"\",23,\" \"); //58 not required\n $return_delivery_expirydate = commonfunction::paddingRight(\"\",8,\" \"); //59 not required\n $return_delivery_allow_pkg \t= \" \"; //60 not required\n $return_delivery_code \t\t= commonfunction::paddingRight(\"\",4,\" \"); //61 not required\n $address_sms_number \t\t= commonfunction::paddingRight(\"\",12,\" \"); //62 not required\n $sender_sms_number \t\t\t= commonfunction::paddingRight(\"\",12,\" \"); //63 not required\n $sms_lang_sender \t\t\t= commonfunction::paddingRight(\"\",1,\" \"); //64 not required\n $sms_lang_addresse \t\t\t= commonfunction::paddingRight(\"\",1,\" \"); //65 not required\n $home_collection \t\t\t= commonfunction::paddingRight(\"\",1,\" \"); //66 not required\n $delivery_note_return \t\t= commonfunction::paddingRight(\"\",1,\" \"); //67 not required\n $satrday_delivery \t\t\t= commonfunction::paddingRight(\"\",1,\" \"); //68 not required\n $agreed_delivery \t\t\t= commonfunction::paddingRight(\"\",8,\" \"); //69 not required\n $prepaid_packaging \t\t\t= commonfunction::paddingRight(\"\",1,\" \"); // 70 not required\n $prepaid_packaging_code \t= commonfunction::paddingRight(\"\",23,\" \"); //71 not required\n $code_point_admission \t\t= commonfunction::paddingRight(\"\",7,\" \"); //72 not required\n $promotional_slogan \t\t= commonfunction::paddingRight(\"\",80,\" \"); //73 not required\n $envisaged_deposit_date \t= date('Ymd'); \t//74\n $observation1 \t\t\t\t= commonfunction::paddingRight(\"\",45,\" \"); //75 not required\n $observation2 \t\t\t\t= commonfunction::paddingRight(\"\",45,\" \"); //76 not required\n $return_instructions \t\t= commonfunction::paddingRight(\"\",1,\" \"); //77 not required\n\n //Custom data\n if($this->RecordData['goods_id']!='' || $this->RecordData['goods_id']=='Documents'){\t//78\n $shipment_type = '1';\n }else if($this->RecordData['goods_id']=='Gifts'){\n $shipment_type = '3';\n }else if($this->RecordData['goods_id']=='commercial'){\n $shipment_type = '4';\n }else if($this->RecordData['goods_id']=='commercial goods'){\n $shipment_type = '2';\n }else{\n $shipment_type = '1';\n }\n $commercial_shipment = commonfunction::paddingRight(\"\",1,\" \");\t//79\n $invoice \t\t\t= commonfunction::paddingRight(\"\",1,\" \");\t//80\n $custom_dec_form \t= commonfunction::paddingRight(\"\",1,\" \"); \t//81\n $amount1 \t\t\t= commonfunction::paddingRight(\"\",3,\" \"); //82 to be determined\n $description_goods1 = commonfunction::paddingRight(\"\",3,\" \"); //83 to be determined\n $net_weight1 \t\t= commonfunction::paddingRight(\"\",5,\" \"); //84 to be determined\n $net_value1 \t\t= commonfunction::paddingRight(\"\",6,\" \"); //85 to be determined\n $pricing_number1 \t= commonfunction::paddingRight(\"\",10,\" \"); //86 not required\n $country_of_origin1 = commonfunction::paddingRight(\"\",2,\" \"); //87 not required\n $amount2 \t\t\t= commonfunction::paddingRight(\"\",3,\" \"); //88 not required\n $description_goods2 = commonfunction::paddingRight(\"\",3,\" \"); //89 not required\n $net_weight2 \t\t= commonfunction::paddingRight(\"\",5,\" \"); //90 not required\n $net_value2 \t\t= commonfunction::paddingRight(\"\",6,\" \"); //91 not required\n $pricing_number2 \t= commonfunction::paddingRight(\"\",10,\" \"); //92 not required\n $country_origin2 \t= commonfunction::paddingRight(\"\",2,\" \"); //93 not required\n $amount3 \t\t\t= commonfunction::paddingRight(\"\",3,\" \"); //94 not required\n $description_goods3 = commonfunction::paddingRight(\"\",3,\" \"); //95 not required\n $net_weight3 \t\t= commonfunction::paddingRight(\"\",5,\" \"); //96 not required\n $net_value3 \t\t= commonfunction::paddingRight(\"\",6,\" \"); //97 not required\n $pricing_number3 \t= commonfunction::paddingRight(\"\",10,\" \"); //98 not required\n $country_origin3 \t= commonfunction::paddingRight(\"\",2,\" \"); //99 not required\n $invoice_attached \t= \" \"; //100 not required\n $license_attached \t= \" \"; //101 not required\n $certificate_attached = \" \"; //102 not required\n\n //Details of sender\n\t\t$SenderInfo = $this->ForwarderRecord['SenderAddress'];\n\t\t$customerName = ($SenderInfo[0]!='')?$SenderInfo[0]:$sender_data['company_name'];\n\t\t\n\t\tif($SenderInfo[0]=='' && $data[ADMIN_ID]==3121){\n\t\t $customerName = 'Lidl Fotos';\n\t\t}\n\t\t\n $sender_name \t\t\t= 'PARCEL.NL';\n\t\t$sender_name \t\t\t= commonfunction::paddingRight($sender_name,50,\" \");\t//103\n $sender_surname1 \t\t= commonfunction::paddingRight(\"\",50,\" \"); //104 not required\n $sender_surname2 \t\t= commonfunction::paddingRight(\"\",50,\" \"); //105 not required\n $sender_taxpayernumber \t= commonfunction::paddingRight(\"\",15,\" \"); //106 not required\n $sender_company \t\t= commonfunction::paddingRight($customerName,50,\" \"); //107\n $sender_contact_person \t= commonfunction::paddingRight('PARCEL.NL',50,\" \");\t//108\n $sender_street_type \t= commonfunction::paddingRight(\"\",3,\" \"); //109 not required\n $sender_street_name \t= commonfunction::paddingRight('C/29, nº 12 PARC LOGISTIC Polígono ZONA FRANCA',50,\" \");\t//110\n $sender_street_number \t= commonfunction::paddingRight(\"\",5,\" \"); //111 not required\n $sender_maindoor \t\t= commonfunction::paddingRight(\"\",5,\" \"); //112 not required\n $sender_block \t\t\t= commonfunction::paddingRight(\"\",5,\" \"); //113 not required\n $sender_stairway \t\t= commonfunction::paddingRight(\"\",5,\" \"); //114 not required\n $sender_floor \t\t\t= commonfunction::paddingRight(\"\",5,\" \"); //115 not required\n $sender_door \t\t\t= commonfunction::paddingRight(\"\",5,\" \"); //116 not required\n $sender_town \t\t\t= commonfunction::paddingRight('CORREOS UAMCLI Paquetería',25,\" \"); \t//117\n $sender_province \t\t= commonfunction::paddingRight('Barcelona',40,\" \"); //118 not required \n\t\t\n\t\t$sender_pc = commonfunction::paddingRight('08070',5,\" \");\n\t\t\n $sender_sendertelnumber = commonfunction::paddingRight(commonfunction::sub_string(commonfunction::onlynumbers($sender_data['phoneno']),-12),12,\" \"); //120 not required\n $sender_email \t\t\t= commonfunction::paddingRight($sender_data['email'],50,\" \"); //121 not required\n $sender_pobox \t\t\t= commonfunction::paddingRight(\"\",6,\" \"); //122 not required\n\n //control data of file\n $end_registration = 'E';\t//123\n\t\t\n $tab = \"\\t\";\n\t\t\n $PARCEL_DATA = $position. \"$tab\" .$year_of_creation . \"$tab\" .$product_code. \"$tab\" .$franking_type. \"$tab\" .$labeler_code. \"$tab\" .$contract_number. \"$tab\" .\n $client_number. \"$tab\" .$franking_machine_number. \"$tab\" .$amount_franked. \"$tab\" .$shipment_code. \"$tab\" .$total_packages. \"$tab\" .$package_number. \"$tab\" .\n $manifest_number. \"$tab\" .$promotion_code. \"$tab\" .$reason_resending. \"$tab\" .\n $name . \"$tab\" .$surname1. \"$tab\" .$surname2. \"$tab\" .$taxpayer_identification_number. \"$tab\" .$company. \"$tab\" .$contact_person. \"$tab\" .\n $street_type. \"$tab\" .$street_name. \"$tab\" .$street_number. \"$tab\" .$main_door. \"$tab\" .$block. \"$tab\" .$stairway. \"$tab\" .$floor. \"$tab\" .$door.\"$tab\"\n .$town. \"$tab\" .$Province. \"$tab\" .$zip_code1. \"$tab\" .$zip_code2. \"$tab\" .$country. \"$tab\" .$chosen_ofc. \"$tab\" .$destination_i_po_box. \"$tab\" .$destination_po_box . \"$tab\" .\n $contact_number. \"$tab\" .$email. \"$tab\" .\n $reference_number . \"$tab\" .$delivery_mode . \"$tab\" .$weight. \"$tab\" .$length. \"$tab\" .$height. \"$tab\" .$width. \"$tab\" .$insurance . \"$tab\" .$insuredvalue. \"$tab\" .\n $cash_on_delivery. \"$tab\" .$codAmount . \"$tab\" .$type_of_cod . \"$tab\" .$account_number . \"$tab\" .$delivery . \"$tab\" .$proof_of_delivery . \"$tab\" .\n $pee_reference. \"$tab\" .$sender_pee_reference . \"$tab\" .$prior_delivery . \"$tab\" .$generate_return_delivery . \"$tab\" . $return_delivery_barcode. \"$tab\" .\n $return_delivery_expirydate. \"$tab\" .$return_delivery_allow_pkg. \"$tab\" .$return_delivery_code. \"$tab\" .$address_sms_number . \"$tab\" .\n $sender_sms_number . \"$tab\" .$sms_lang_sender. \"$tab\" .$sms_lang_addresse. \"$tab\" .$home_collection . \"$tab\" .$delivery_note_return. \"$tab\" .\n $satrday_delivery. \"$tab\" .$agreed_delivery . \"$tab\" .$prepaid_packaging . \"$tab\" .$prepaid_packaging_code . \"$tab\" .$code_point_admission . \"$tab\" .\n $promotional_slogan. \"$tab\" .$envisaged_deposit_date. \"$tab\" .$observation1 . \"$tab\" .$observation2 . \"$tab\" .$return_instructions . \"$tab\" .\n $shipment_type. \"$tab\" .$commercial_shipment. \"$tab\" .$invoice. \"$tab\" .$custom_dec_form. \"$tab\" . $amount1 . \"$tab\" .$description_goods1 . \"$tab\" .$net_weight1. \"$tab\" .\n $net_value1. \"$tab\" .$pricing_number1 . \"$tab\" .$country_of_origin1. \"$tab\" .$amount2 . \"$tab\" .$description_goods2. \"$tab\" .$net_weight2. \"$tab\" .\n $net_value2 . \"$tab\" .$pricing_number2. \"$tab\" .$country_origin2 . \"$tab\" .$amount3 . \"$tab\" .$description_goods3 . \"$tab\" .$net_weight3 . \"$tab\" .\n $net_value3. \"$tab\" .$pricing_number3. \"$tab\" .$country_origin3 . \"$tab\" .$invoice_attached . \"$tab\" .$license_attached. \"$tab\" .$certificate_attached. \"$tab\" .\n $sender_name. \"$tab\" .$sender_surname1. \"$tab\" . $sender_surname2. \"$tab\" .$sender_taxpayernumber. \"$tab\" .$sender_company. \"$tab\" .\n $sender_contact_person. \"$tab\" .$sender_street_type. \"$tab\" .$sender_street_name . \"$tab\" .$sender_street_number. \"$tab\" .\n $sender_maindoor. \"$tab\" .$sender_block. \"$tab\" . $sender_stairway . \"$tab\" .$sender_floor . \"$tab\" .$sender_door. \"$tab\" .$sender_town. \"$tab\" .$sender_province. \"$tab\" .\n $sender_pc . \"$tab\" .$sender_sendertelnumber. \"$tab\" .$sender_email. \"$tab\" .$sender_pobox. \"$tab\" .$end_registration . (($counter==$total_records)?'':\"\\r\\n\");\n\n\n return $PARCEL_DATA;\n }", "title": "" } ]
[ { "docid": "efbe56c8f4a576159d5ddb8f45c1aaa0", "score": "0.5050153", "text": "public function bienvenido()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "25b925fe4622c543c628b299c27208ad", "score": "0.49296755", "text": "function generaXMLCFDI($cadena_original,$tipocomprobante,$tagref,$serie,$folio,$iddocto,$carpeta,$orderno=0,$db) {\r\n //echo $cadena_original;\r\n global $xml, $cadena, $conn, $sello,$cadenasellar,$totalimporte;\r\n $banderaimpuestos=false;\r\n $banderaconceptos=false;\r\n $cadena=str_replace(chr(13).chr(10).'0','@%',$cadena_original);\r\n error_reporting(E_ALL);\r\n $tipocomprobante=strtolower($tipocomprobante);\r\n $noatt= array();\r\n $arraycadena= array();\r\n $nufa = $serie.$folio; // Junta el numero de factura serie + folio\r\n $impuestofact=0;\r\n $cadenasellar=\"\";\r\n $xml = new DOMdocument('1.0','UTF-8');\r\n //$envioCFDI = $xml->createElement(\"soapenv:Envelope\");\r\n //$envioCFDI = $xml->appendChild($envioCFDI);\r\n //cargaAtt($envioCFDI, array(\"xmlns:soapenv\"=>\"http://schemas.xmlsoap.org/soap/envelope/\",\r\n //\t\t\t \"xmlns:cfdi\"=>\"http://www.sat.gob.mx/cfd/3\"\r\n // )\r\n // );\r\n //$envioCFDIHeader = $xml->createElement(\"soapenv:Header\");\r\n //$envioCFDIHeader = $envioCFDI->appendChild($envioCFDIHeader);\r\n \r\n //$envioCFDIBody = $xml->createElement(\"soapenv:Body\");\r\n //$envioCFDIBody = $envioCFDI->appendChild($envioCFDIBody);\r\n \r\n\r\n $root = $xml->createElement(\"cfdi:Comprobante\");\r\n $root = $xml->appendChild($root);\r\n\r\n cargaAtt($root, array(\"xmlns\"=>\"http://www.sat.gob.mx/cfd/3\",\r\n \"xmlns:xsi\"=>\"http://www.w3.org/2001/XMLSchema-instance\",\r\n\t\t\t \"xmlns:cfdi\"=>\"http://www.sat.gob.mx/cfd/3\",\r\n\t\t\t \"xmlns:ecfd\"=>\"http://www.southconsulting.com/schemas/strict\",\r\n \"xsi:schemaLocation\"=>\"http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv3.xsd\"\r\n )\r\n );\r\n \r\n $SQL=\" SELECT l.taxid,a.address5,t.tagname,t.areacode,l.legalid,l.legalname as empresa,a.areadescription as legalname,\r\n a.address1 as calle,a.address2 as noExterior,a.address3 as colonia,\r\n a.address4 as localidad,a.address4 as municipio,a.address5 as estado,\r\n a.cp as cp,\r\n t.address1 as calleexpedido,t.address2 as noExteriorexpedido,\r\n t.address3 as coloniaexpedido,\r\n t.address4 as localidadexpedido,\r\n t.address4 as municipioexpedido,\r\n t.address5 as estadoexpedido,\r\n t.cp as codigoPostalExpedido,\r\n t.address6 as paisexpedido,\r\n a.Anioaprobacion,\r\n a.Noaprobacion,\r\n a.Nocertificado,\r\n\t\t\t l.FileSAT,\r\n\t\t\t l.regimenfiscal\r\n FROM areas a, tags t, legalbusinessunit l \r\n WHERE a.areacode=t.areacode\r\n\t\t\tand l.legalid=t.legalid\r\n\t\t\tAND tagref='\".$tagref.\"'\";\r\n $ErrMsg=_('El Sql que fallo fue');\r\n $DbgMsg=_('No se pudo obtener los datos de la unidad de negocio');\r\n\t\t // echo $SQL;\r\n $Result= DB_query($SQL,$db,$ErrMsg,$DbgMsg,true);\r\n if (DB_num_rows($Result)==1) {\r\n $myrowtags = DB_fetch_array($Result);\r\n $rfc=trim($myrowtags['taxid']);\r\n $keyfact=$myrowtags['address5'];\r\n $nombre=$myrowtags['tagname'];\r\n $area=$myrowtags['areacode'];\r\n $legaid=$myrowtags['legalid'];\r\n $legalname=$myrowtags['empresa'];\r\n }\r\n\t\t \r\n\r\n\r\n\t$arraycadena=explode('@%',$cadena);\r\n\t// lee primero el arreglo y pone el monto de los productos\r\n\t$impuestosinifact=0;\r\n\t$totalimporte=0;\r\n\tfor($cad=4;$cad<=count($arraycadena)-1;$cad++){\r\n\t $linea=$arraycadena[$cad];\r\n $datos=explode('|',$linea);\r\n\t if($cad>=4 and $datos[0]=='5'){\r\n\t\t\t\r\n\t\t\tif($carpeta=='Recibo'){\r\n\t\t\t $importe=$datos[6];\r\n\t\t\t $unidades=$datos[7];\r\n\t\t\t}elseif($carpeta=='NCargo' or $carpeta=='NCreditoDirect'){\r\n\t\t\t $importe=$datos[13];\r\n\t\t\t $unidades=\"unidades\";\r\n\t\t\t}else{\r\n\t\t\t $importe=$datos[5]*$datos[3];//$datos[13];\r\n\t\t\t //echo '<br>importe envia:'.$importe;\r\n\t\t\t $unidades=$datos[7];\r\n\t\t\t}\r\n\t\t\t$totalimporte=$totalimporte+$importe;\r\n\t\t\t\r\n }elseif($cad>=4 and $datos[0]=='6'){\r\n\t\t\t \r\n\t\t\t$impuestosinifact=$impuestosinifact+trim($datos[3]);\r\n\t\t\t//$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[1])).\"|\".trim(ReglasXCadena($datos[2])).\"|\".trim(ReglasXCadena($datos[3]));\r\n }//fin de if de cad\r\n\t}\r\n\t$totalimporte=number_format($totalimporte,2,'.','');\r\n\tfor($cad=0;$cad<=count($arraycadena)-1;$cad++){\r\n\t\t$linea=$arraycadena[$cad];\r\n $datos=explode('|',$linea);\r\n\t\t\r\n\t\tif ($cad==0){\r\n\t\t$vendedor=$datos[15];\r\n\t\t$seriekm=$datos[15];\r\n\t\t $datosdos=explode('|',$arraycadena[1]);\r\n\t\t $aprobaxfolio=TraeAprobacionxFolio($rfc,$serie,$folio,$db);\r\n\t\t $aprobacionfolios=explode('|',$aprobaxfolio);\r\n\t\t $Certificado=$aprobacionfolios[0];\r\n\t\t $Noaprobacion=$aprobacionfolios[1];\r\n\t\t $anioAprobacion=$aprobacionfolios[2];\r\n\t\t \r\n\t\t cargaAtt($root,array(\r\n\t\t\t\t\t\"version\"=>\"3.2\",\r\n\t\t\t\t\t\"fecha\"=>str_replace(' ','T',str_replace('/','-',$datos[4])),\r\n\t\t\t\t\t\"sello\"=>\"@\",\r\n\t\t\t\t\t\"tipoDeComprobante\"=>trim($tipocomprobante),\r\n\t\t\t\t\t\"formaDePago\"=>$datosdos[1],\r\n\t\t\t\t\t\"noCertificado\"=>trim($Certificado),\r\n\t\t\t\t\t\"certificado\"=>\"@\",\r\n\t\t\t\t\t\"subTotal\"=>$totalimporte,\r\n\t\t\t\t\t\"descuento\"=>number_format($datos[8],2),\r\n\t\t\t\t\t\"total\"=>number_format($totalimporte+$impuestosinifact,2,'.',''),\r\n\t\t\t\t\t\"metodoDePago\"=>$datosdos[3],\r\n\t\t\t\t\t\"TipoCambio\"=>$datos[13],\r\n\t\t\t\t\t\"Moneda\"=>$datos[12],\r\n\t\t\t\t\t\"LugarExpedicion\"=>$myrowtags['municipioexpedido'].','.$myrowtags['estadoexpedido'],\r\n\t\t\t\t\t\"NumCtaPago\"=>\"No identificado\"\r\n\t\t\t\t\t)\r\n );\r\n\t\t $fechaamece=str_replace(' ','T',str_replace('/','-',$datos[4]));\r\n\t\t $cantidadletra=$datos[10];\r\n\t\t $cadenasellar=$cadenasellar.\"|3.2|\".trim(str_replace(' ','T',str_replace('/','-',$datos[4])));\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim($tipocomprobante);\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datosdos[1]));\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($totalimporte));\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim(number_format($datos[8],2));\r\n\t\t //$cadenasellar=$cadenasellar.\"|\".trim($Certificado);\r\n\t\t //$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($totalimporte)).\"|\".trim(number_format($datos[8],2)).\"|\".trim(ReglasXCadena(number_format($totalimporte+$impuestosinifact,2,'.','')));\r\n\t\t //$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datosdos[3]));\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[13]));\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[12]));\r\n\t\t $cadenasellar=$cadenasellar.\"|\".number_format($totalimporte+$impuestosinifact,2,'.','');\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datosdos[3]));\r\n\t\t $cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['municipioexpedido'].','.$myrowtags['estadoexpedido']));\r\n\t\t $cadenasellar=$cadenasellar.\"|No identificado\";\r\n\t\t //$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[13]));\r\n\t\t //$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[12]));\r\n\t\t}elseif($cad==1){\r\n \r\n \r\n $emisor = $xml->createElement(\"cfdi:Emisor\");\r\n\t\t\t$emisor = $root->appendChild($emisor);\r\n\t\t\t//cargaAtt($emisor, array(\"rfc\"=>$rfc,\"nombre\"=>$legalname));\r\n cargaAtt($emisor, array(\"rfc\"=>trim($rfc),\r\n \"nombre\"=>trim($legalname)\r\n )\r\n ); \r\n $domfis = $xml->createElement(\"cfdi:DomicilioFiscal\");//$xml->createElement(\"DomicilioFiscal\");\r\n $cadenasellar=$cadenasellar.\"|\".trim($rfc).\"|\".trim($legalname);\r\n\t\t\t\r\n $domfis = $emisor->appendChild($domfis);\r\n cargaAtt($domfis, array(\"calle\"=>$myrowtags['calle'],\r\n \"noExterior\"=>$myrowtags['noExterior'],\r\n \"noInterior\"=>\"\",\r\n \"colonia\"=>$myrowtags['colonia'],\r\n \"referencia\"=>$legalname,\r\n \"municipio\"=>$myrowtags['municipio'],\r\n \"estado\"=>$myrowtags['estadoexpedido'],\r\n \"pais\"=>\"MEXICO\",\r\n \"codigoPostal\"=>$myrowtags['cp']\r\n )\r\n );\r\n $cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['calle'])).\"|\".trim(ReglasXCadena($myrowtags['noExterior']));\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['colonia']));//.\"|\".trim($myrowtags['municipio']);\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($legalname)).\"|\".trim(ReglasXCadena($myrowtags['municipio']));\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['estadoexpedido'])).\"|MEXICO|\".trim(ReglasXCadena($myrowtags['cp']));\r\n\t\t\t\r\n $expedido = $xml->createElement(\"cfdi:ExpedidoEn\");\r\n $expedido = $emisor->appendChild($expedido);\r\n cargaAtt($expedido, array(\"calle\"=>$myrowtags['calleexpedido'],\r\n \"noExterior\"=>$myrowtags['noExteriorexpedido'],\r\n \"noInterior\"=>\"\",\r\n\t\t\t\t\t\t \"colonia\"=>$myrowtags['colonia'],\r\n\t\t\t\t\t\t \"referencia\"=>$myrowtags['tagname'],\r\n \"municipio\"=>$myrowtags['municipioexpedido'],\r\n \"estado\"=>$myrowtags['estadoexpedido'],\r\n \"pais\"=>$myrowtags['paisexpedido'],\r\n \"codigoPostal\"=>$myrowtags['codigoPostalExpedido']\r\n )\r\n );\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['calleexpedido'])).\"|\".trim(ReglasXCadena($myrowtags['noExteriorexpedido']));\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['colonia']));//.\"|\".trim($myrowtags['municipioexpedido']);\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['tagname'])).\"|\".trim(ReglasXCadena($myrowtags['municipioexpedido']));\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['estadoexpedido'])).\"|\".trim(ReglasXCadena($myrowtags['paisexpedido']));\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['codigoPostalExpedido']));\r\n\t\t\t//regimen fiscal\r\n\t\t\t$regimenfiscal = $xml->createElement(\"cfdi:RegimenFiscal\");\r\n $regimenfiscal = $emisor->appendChild($regimenfiscal);\r\n cargaAtt($regimenfiscal, array(\"Regimen\"=>$myrowtags['regimenfiscal']\r\n )\r\n );\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($myrowtags['regimenfiscal']));\r\n\t\t\t\r\n\t\t\t\r\n\t }elseif($cad==2){\r\n \r\n $receptor = $xml->createElement(\"cfdi:Receptor\");\r\n $receptor = $root->appendChild($receptor);\r\n cargaAtt($receptor, array(\"rfc\"=>trim($datos[2]),\r\n \"nombre\"=>trim($datos[3])\r\n )\r\n );\r\n\t\t\t$rfccliente=trim($datos[2]);\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[2])).\"|\".trim(ReglasXCadena($datos[3]));\r\n\t\t\t\r\n\t\t\t$coloniarecep=$datos[8];\r\n\t\t\t$telrecep=$datos[10];\r\n $cad=$cad+1;\r\n $linea=$arraycadena[$cad];\r\n $datos=explode('|',$linea);\r\n //echo '<br>'.ReglasXCadena($coloniarecep).'<br>';\r\n $domicilio = $xml->createElement(\"cfdi:Domicilio\");\r\n $domicilio = $receptor->appendChild($domicilio);\r\n if($rfccliente!='XAXX010101000'){\r\n\t\t\t cargaAtt($domicilio, array(\"calle\"=>trim($datos[4]),\r\n\t\t\t\t \"noExterior\"=>trim($datos[5]),\r\n\t\t\t\t \"noInterior\"=>trim($datos[6]),\r\n\t\t\t\t \"colonia\"=>trim($coloniarecep),\r\n\t\t\t\t \"referencia\"=>trim($telrecep),\r\n\t\t\t\t \"localidad\"=>trim($datos[10]),\r\n\t\t\t\t \"municipio\"=>trim($datos[10]),\r\n\t\t\t\t \"estado\"=>trim($datos[11]),\r\n\t\t\t\t \"codigoPostal\"=>trim($datos[12]),\r\n\t\t\t\t \"pais\"=>\"Mexico\",\r\n\t\t\t )\r\n\t\t\t );\r\n\t\t\t // echo '<br>datos:'.$datos[5].'<br>';\r\n\t\t\t if (strlen(trim($datos[4]))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[4]));\r\n\t\t\t }\r\n\t\t\t if (strlen(trim($datos[5]))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[5]));\r\n\t\t\t }\r\n\t\t\t if (strlen(trim($datos[6]))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[6]));\r\n\t\t\t }\r\n\t\t\t if (strlen(trim($coloniarecep))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($coloniarecep));\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t if (strlen(trim(trim($datos[10])))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[10]));\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t if (strlen(trim($telrecep))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($telrecep));\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t if (strlen(trim(trim($datos[10])))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[10]));\r\n\t\t\t }\r\n\t\t\t if (strlen(trim(trim($datos[11])))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[11]));\r\n\t\t\t }\r\n\t\t\t $cadenasellar=$cadenasellar.\"|Mexico\";\r\n\t\t\t if (strlen(trim(trim($datos[12])))>0){\r\n\t\t\t\t$cadenasellar=$cadenasellar.\"|\".trim($datos[12]);\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}else{\r\n\t\t\t cargaAtt($domicilio, array(\"calle\"=>\"\",\r\n\t\t\t\t \"noExterior\"=>\"\",\r\n\t\t\t\t \"colonia\"=>\"\",\r\n\t\t\t\t \"referencia\"=>\"\",\r\n\t\t\t\t \"localidad\"=>\"\",\r\n\t\t\t\t \"municipio\"=>\"\",\r\n\t\t\t\t \"estado\"=>\"\",\r\n\t\t\t\t \"pais\"=>\"MEXICO\",\r\n\t\t\t\t \"codigoPostal\"=>\"\",\r\n\t\t\t )\r\n\t\t\t );\r\n\t\t\t \r\n\t\t\t $cadenasellar=$cadenasellar.\"|Mexico\";\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 }elseif($cad>=4 and $datos[0]=='5'){\r\n\t\t\tif ($banderaconceptos==false){\r\n\t\t\t $conceptos = $xml->createElement(\"cfdi:Conceptos\");\r\n\t\t\t $conceptos = $root->appendChild($conceptos);\r\n\t\t\t \r\n\t\t\t $banderaconceptos=true;\r\n\t\t\t}\r\n $concepto = $xml->createElement(\"cfdi:Concepto\");\r\n $concepto = $conceptos->appendChild($concepto);\r\n\t\t\tif($carpeta=='Recibo'){\r\n\t\t\t $importe=$datos[6];\r\n\t\t\t $unidades=$datos[7];\r\n\t\t\t}elseif($carpeta=='NCargo' or $carpeta=='NCreditoDirect'){\r\n\t\t\t $importe=$datos[13];\r\n\t\t\t $unidades=\"unidades\";\r\n\t\t\t}else{\r\n\t\t\t $importe=$datos[5]*$datos[3];//$datos[13];\r\n\t\t\t $unidades=$datos[7];\r\n\t\t\t}\r\n\t\t\t//echo \"unidades\".$unidades;\r\n cargaAtt($concepto, array(\"cantidad\"=>trim($datos[3]),\r\n\t\t\t\t \"unidad\"=>trim($unidades),\r\n\t\t\t\t \"noIdentificacion\"=>trim($datos[2]),\r\n \"descripcion\"=>trim($datos[4]),\r\n \"valorUnitario\"=>trim($datos[5]),\r\n \"importe\"=>trim($importe)\r\n )\r\n );\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[3])).\"|\".trim(ReglasXCadena($unidades));\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[2])).\"|\".trim(ReglasXCadena($datos[4]));\r\n\t\t\t//echo $cadenasellar;\r\n\t\t\t$totalimporte=$totalimporte+$importe;\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim($datos[5]).\"|\".trim($importe);\r\n }elseif($cad>=4 and $datos[0]=='6'){\r\n\t\t\tif ($banderaimpuestos==false){\r\n\t\t\t $impuestos = $xml->createElement(\"cfdi:Impuestos\");\r\n\t\t\t $impuestos = $root->appendChild($impuestos);\r\n\t\t\t $traslados = $xml->createElement(\"cfdi:Traslados\");\r\n\t\t\t $traslados = $impuestos->appendChild($traslados);\r\n\t\t\t \r\n\t\t\t $banderaimpuestos=true;\r\n\t\t\t}\r\n\t\t\t$traslado = $xml->createElement(\"cfdi:Traslado\");\r\n $traslado = $traslados->appendChild($traslado);\r\n cargaAtt($traslado, array(\"impuesto\"=>trim($datos[1]),\r\n \"tasa\"=>trim($datos[2]),\r\n \"importe\"=>trim($datos[3])\r\n )\r\n );\r\n \r\n $impuestofact=$impuestofact+trim($datos[3]);\r\n\t\t\t$cadenasellar=$cadenasellar.\"|\".trim(ReglasXCadena($datos[1])).\"|\".trim(ReglasXCadena($datos[2])).\"|\".trim(ReglasXCadena($datos[3]));\r\n }//fin de if de cad\r\n }\r\n \r\n if ($banderaimpuestos==true){\r\n $impuestos->SetAttribute(\"totalImpuestosTrasladados\",$impuestofact);\r\n }else{\r\n\t$impuestos = $xml->createElement(\"cfdi:Impuestos\");\r\n\t$impuestos = $root->appendChild($impuestos);\r\n }\r\n if ($banderaimpuestos==false){\r\n\t$cadenasellar=$cadenasellar;//.\"||\";\r\n }else{\r\n\t$cadenasellar=$cadenasellar.\"|\".$impuestofact;//.\"||\";\r\n } \r\n $cadenasellar ='|'.$cadenasellar.\"||\";\r\n //echo '<br><br>'.$cadenasellar.'<br><br>';\r\n // inicializa y termina la cadena original con el doble ||\r\n $certificado = $myrowtags['FileSAT'];\r\n $maquina = trim(`uname -n`);\r\n $ruta = \"/var/www/html\".dirname($_SERVER['PHP_SELF']).\"/companies/\".$_SESSION['DatabaseName'].\"/SAT/\".str_replace('.','',str_replace(' ','',$legalname)).\"/\";\r\n $file=$ruta.$certificado.\".key.pem\"; // Ruta al archivo\r\n $pkeyid = openssl_get_privatekey(file_get_contents($file));\r\n openssl_sign($cadenasellar, $crypttext, $pkeyid, OPENSSL_ALGO_SHA1);\r\n openssl_free_key($pkeyid); \r\n $sello = base64_encode($crypttext);// lo codifica en formato base64\r\n $root->setAttribute(\"sello\",$sello); \r\n $file=$ruta.$certificado.\".cer.pem\"; // Ruta al archivo\r\n \r\n $datos = file($file);\r\n $certificado = \"\"; $carga=false;\r\n for ($i=0; $i<sizeof($datos); $i++) {\r\n if (strstr($datos[$i],\"END CERTIFICATE\")) $carga=false;\r\n if ($carga) $certificado .= trim($datos[$i]);\r\n if (strstr($datos[$i],\"BEGIN CERTIFICATE\")) $carga=true;\r\n }\r\n $root->setAttribute(\"certificado\",$certificado);\r\n $xml->formatOutput = true;\r\n $todo = $xml->saveXML();\r\n $dir=\"/var/www/html/\".dirname($_SERVER['PHP_SELF']).\"/companies/\".$_SESSION['DatabaseName'].\"/SAT/\".str_replace('.','',str_replace(' ','',$legalname)).\"/XML/\".$carpeta.\"/\";\r\n if ($dir != \"/dev/null\") {\r\n $xml->formatOutput = true;\r\n\t$nufa=$nufa.date('YmdHi');\r\n $xml->save($dir.$nufa.\".xml\");\r\n } else {\r\n $paso = $todo;\r\n $conn->replace(\"cfdsello\",array(\"selldocu\"=>$nufa,\"sellcade\"=>$cadena_original,\"sellxml\"=>$paso),\"selldocu\",true);\r\n }\r\n //guardamos la cadena y sello en la base de datos\r\n $sql=\"update debtortrans\r\n\t set sello='\".$sello.\"',\r\n\t cadena='\".$cadenasellar.\"'\r\n\t where id=\".$iddocto;\r\n $ErrMsg=_('El Sql que fallo fue');\r\n $DbgMsg=_('No se pudo actualizar el sello y cadena del documento');\r\n $Result= DB_query($sql,$db,$ErrMsg,$DbgMsg,true);\r\n // echo '<br>todo:<br>'.$todo;\r\n \r\n //printf (\"<pre>%s</pre>\", htmlentities ($todo));\r\n\r\n return($todo); \r\n}", "title": "" }, { "docid": "93443cc01406ce97f8c731358eda75ec", "score": "0.49219555", "text": "private function generateEncoded() {\n\t\t$expDays = $this->getExpDays();\n\t\t$expDays = intval($expDays);\n\t \t\n\t\t$expDaysFormated = '';\n\t \t\n\t\tif( $expDays != 0 ) {\n\t\t\t$expDaysFormated = date('d.m.Y h:m:s', strtotime(\"+{$expDays} days\"));\n\t\t} else {\n\t\t\t$expDaysFormated = date('d.m.Y h:m:s', strtotime(\"+{$this->epaybg->getDefaultExpDays()} days\"));\n\t\t}\n\t\t\n\t\t$data = '';\n\t \t\n\t\tif($this->getTraderNumber()) {\n\t\t\t$data .= \"MIN={$this->getTraderNumber()}\" . \"\\n\";\n\t\t} elseif($this->getTraderEmail()) {\n\t\t\t$data .= \"EMAIL={$this->getTraderEmail()}\" . \"\\n\";\n\t\t}\n\t\t\n\t\t$data .= \"INVOICE={$this->getOrderId()}\" . \"\\n\";\n\t\t$data .= \"AMOUNT=\" . number_format($this->getOrderGrantTotal(), 2, '.', '') . \"\\n\";\n\t\tif($this->getPaymentMethod() != 'epaybg_easypaybpay') {\n\t\t\t$data .= \"CURRENCY=\" . $this->order->getOrderCurrency()->getCurrencyCode() . \"\\n\";\n\t\t}\n\t\t$data .= \"EXP_TIME=\" . $expDaysFormated . \"\\n\";\n\t\t$data .= \"DESCR=Payment request from - \" . $this->getStoreName() . \"\\n\";\n\t\t$data .= \"ENCODING=utf-8\\n\";\n\t\t\t\n\t\treturn base64_encode($data);\n\t}", "title": "" }, { "docid": "f281ce0c06aa82f178579cec85a2871d", "score": "0.48881474", "text": "public function MondialRelayEdiBody($data){\n\t $PARCEL_DATA = '';\n\t\t$data['Country_code'] = $this->RecordData['rec_cncode'];\n\t\t$agency \t\t\t = $this->getAgencyNumber($data);\n\t\t$marchant = $this->Forwarders['service_type'];\n\t\t$origin = $this->Forwarders['barcode_prefix'];\n\t\t\n\t\t\n\t\tif($data[SERVICE_ID]==1 || $data[SERVICE_ID]==2){\n\t\t\t$servicecode = 0;\n\t\t\t$collectionServce = 1;\n\t\t }else{\n\t\t\t$servicecode = 3;\n\t\t\t$collectionServce = 2;\n\t\t }\n\t\t$weight = $data[WEIGHT] * 1000;\n\t\t\n\t\t$Sender = $this->ForwarderRecord['SenderAddress'];\n\t\t\n\t\t// File Information\n\t $CODFIC\t\t\t= 'A';\t\t\t\t\t\t\t\t\t//file type\n\t\t$CODENR \t\t= '1';\t\t\t\t\t\t\t\t\t// Recording COde\n\t\t$SSCODE\t\t\t= '0';\t\t\t\t\t\t\t\t\t//recording sub-code\n\t\t$MARQUE\t\t\t= commonfunction::paddingRight('NL',2,' ');\t\t\t\t\t\t\t// Brand Code given by Mondial Relay\n\t\t$NEXPE\t\t\t= commonfunction::paddingRight($data[TRACENR],8,' ');\t\t//Shipment Number\n\t\t$NBCOLIS\t\t= commonfunction::paddingleft($data['CNT'],2,0);\t\t\t\t\t\t\t//Number of parcel in the shipment\n\t\t$DISTRI\t\t\t= commonfunction::paddingRight('D',1,' ');\t\t\t\t\t\t\t//Distribution Mode\n\t\t$CDEST\t\t\t= commonfunction::paddingRight($agency['pr_number'],8,' ');\t\t//destination zipcode\n\t\t$TRANS\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($agency['agency_code'],0,4),4,' '); // Agency Number\n\t\t$TOURNE\t\t\t= commonfunction::paddingRight($agency['pr_number'],5,' ');\t\t\t\t\t// Run number\n\t\t$TYPSER\t\t\t= commonfunction::paddingRight($servicecode,1,' ');\t\t\t\t\t\t\t//Service code\n\t\tif($data[QUANTITY]>1){\n\t\t\t$LIVMOD\t\t\t= commonfunction::paddingRight('24L',3,' ');\t\t\t\t\t\t// Mode of Delivery\n\t\t}else{\n\t\t\t$LIVMOD\t\t\t= commonfunction::paddingRight('24R',3,' ');\t\t\t\t\t\t// Mode of Delivery\n\t\t}\n\t\t$DATREM\t\t\t= date('d.m.Y');\t\t\t\t\t\t\t\t\t\t\t//preadvice date\n\t\t$SIGLE\t\t\t= commonfunction::paddingRight('Mr',4,' ');\t\t\t\t\t\t// Status\n\t\t//51 \n\t\t$PARCEL_DATA .= $CODFIC.$CODENR.$SSCODE.$MARQUE.$NEXPE.$NBCOLIS.$DISTRI.$CDEST.$TRANS.$TOURNE.$TYPSER.$LIVMOD.$DATREM.$SIGLE;\n\t\t\n\t\t//Receiver Information\n\t\t$firstTwo = (commonfunction::sub_string($data[PHONE],0,2)=='33')?commonfunction::sub_string($data[PHONE],2):$data[PHONE];\n\t\t$rec_phone = commonfunction::sub_string((!empty($data[PHONE]))?commonfunction::stringReplace(array('(0)',' '),array('0',''),$firstTwo):'748800700',0,17);\n\t\t\n\t\t$LVADR1\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[RECEIVER]),0,28),28,' ');\t\t//Receiver name\n\t\t$LVADR2\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[CONTACT]),0,30),30,' '); //receiver Contact\n\t\t$Libre\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t\t\t\t// free space\n\t\t$LVADR3\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[STREET].' '.$data[STREETNR]),0,30),30,' '); //receiver address 1\n\t\t$Libre1\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t\t\t\t//free space\n\t\t$LVADR4\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[ADDRESS].' '.$data[STREET2]),0,30),30,' '); //receiver address 2\n\t\t$Libre2\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t//free space\n\t\t$LVADR5\t\t\t= commonfunction::paddingRight('',30,' ');\t\t\t\t// Receiver address 3\n\t\t$Libre3\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t\t//free space\n\t\t$LVADR6\t\t\t= commonfunction::paddingRight(commonfunction::utf8Decode($data[CITY]),26,' ');\t// Receiver city\n\t\t$LVCPAY\t\t\t= commonfunction::paddingRight($data['Country_code'],2,' ');\t//receiver country Code\n\t\t$LVCPOS\t\t\t= commonfunction::paddingRight($data[ZIPCODE],5,' ');\t//Receiver Zipcode\n\t\t$LVXPOS\t\t\t= commonfunction::paddingRight('',5,' ');\t\t\t\t\t\t//Delivery Zipcode extension\n\t\t$LVTEL1\t\t\t= commonfunction::paddingRight('+33'.$rec_phone,20,' ');\t// Receiver Phone 1\n\t\t$LVTEL2\t\t\t= commonfunction::paddingRight('',20,' ');\t\t\t\t\t\t//Receiver Phone 2\n\t\t$LVEMAI\t\t\t= commonfunction::paddingRight($data[EMAIL],70,' ');\t//Receiver email\n\t\t$INSLIV1\t\t= commonfunction::paddingRight($data[REFERENCE],31,' ');\t\t// Delivery special information\n\t\t\n\t\t//335\n\t\t$PARCEL_DATA .= $LVADR1.$LVADR2.$Libre.$LVADR3.$Libre1.$LVADR4.$Libre2.$LVADR5.$Libre3.$LVADR6.$LVCPAY.$LVCPOS.$LVXPOS.$LVTEL1.$LVTEL2.$LVEMAI.$INSLIV1;\n\n\t\t//Shipment Information\n\t\t$INSLIV2\t\t= commonfunction::paddingRight('',31,' ');\t\t\t\t\t\t\t\t//Delivery special information line 2\n\t\t$Libre4\t\t\t= commonfunction::paddingRight('',10,' ');\t\t\t\t\t\t\t\t// Free space\n\t\t$POIDS\t\t\t= commonfunction::paddingleft($weight,7,'0');\t\t\t\t\t\t\t// Weight in grams\n\t\t$VOLU\t\t\t= commonfunction::paddingRight('',7,' ');\t\t\t\t\t\t\t\t// PArcel volumn in dl\n\t\t$LONG\t\t\t= commonfunction::paddingRight('',3,' ');\t\t\t\t\t\t\t\t//SHipment max length in cm?\n\t\t$ORIG\t\t\t= commonfunction::paddingRight($origin,6,' '); \t\t\t\t\t// Marchant Given by Modial Relay\n\t\t$VENTE\t\t\t= commonfunction::paddingRight('',7,' ');\t\t\t\t\t\t\t\t//SHipment value in cents\n\t\t$DEVVTE\t\t\t= commonfunction::paddingRight('',3,' ');\t\t\t\t\t\t\t\t//Currency of shipment Value\n\t\t\n\t\t$cod_value = commonfunction::paddingleft(0,7,0);\n\t\t$cod_currency = '';\n\t\tif(($data[ADDSERVICE_ID]==141 || $data[ADDSERVICE_ID]==157) && $data['cod_price']>0){\n\t\t $cod_value = commonfunction::paddingleft(($data['cod_price']*100),7,0);\n\t\t\t$cod_currency = 'EUR';\n\t\t}\n\t\t\n\t\t$CRT\t\t\t= commonfunction::paddingRight($cod_value,7,' ');\t\t\t\t\t\t\t\t//COD shipment value in cents\n\t\t$DEVCRT\t\t\t= commonfunction::paddingRight($cod_currency,3,' ');\t\t\t\t\t\t\t\t//Currency of shipment value\n\t\t$REFEXT\t\t\t= commonfunction::paddingRight('',15,' ');\t\t\t\t\t\t\t\t//Marchant shpment reference\n\t\t$REFCLI\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($data[REFERENCE],0,9),9,' ');\t//Receiver reference\t\t\t\t\n\t\t$DATFAC\t\t\t= date('d.m.Y');\t\t\t\t\t\t\t\t\t\t\t\t//Invoice date\n\t\t$DATCDE\t\t\t= date('d.m.Y');\t\t\t\t\t\t\t\t\t\t\t\t//Order Date\n\t\t$CALPHA\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($data[RECEIVER],0,5),5,' ');\t//five character of receiver name\n\t\t$PRTMIS\t\t\t= commonfunction::paddingRight('',5,' ');\t\t\t\t\t\t\t\t//Blanck\n\t\t$COLLEC\t\t\t= commonfunction::paddingRight('',1,' ');\t\t\t\t\t\t\t//Blanck\n\t\t$TOPMDM\t\t\t= commonfunction::paddingRight('O',1,' ');\t\t\t\t\t\t\t//furniture assembly O or Not is N\n\t\t$TOPEMB\t\t\t= commonfunction::paddingRight('01',2,' ');\t\t\t\t\t\t\t//Packeging\n\t\t$QTLGAR\t\t\t= commonfunction::paddingRight('01',2,' ');\t\t\t\t\t\t\t//Quantiry of item lines\n\t\t\n\t\t$DATRDV\t\t\t= date('d.m.Y');\n\t\t$CODCRNRDV\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$DEBCRNLIVANN\t= commonfunction::paddingRight('',2,' ');\n\t\t$FINCRNLIVANN\t= commonfunction::paddingRight('',2,' ');\n\t\t$Blank\t\t\t= commonfunction::paddingRight('',10,' ');\n\t\t$TOPAVI\t\t\t= commonfunction::paddingRight('O',1,' ');\n\t\t$TAXAFF\t\t\t= commonfunction::paddingRight('',7,' ');\n\t\t$TAXCRT\t\t\t= commonfunction::paddingRight('',7,' ');\n\t\t$Blank1\t\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$TOPKDO\t\t\t= commonfunction::paddingRight('',3,' ');\n\t\t$TOTDIM\t\t\t= commonfunction::paddingRight('',3,' '); \n\t\t$Blank2\t\t\t= commonfunction::paddingRight('',33,' ');\n\t\t$TOP_POSIT\t\t= commonfunction::paddingRight('',7,' ');\n\t\t\n\t\t$DISCOL\t\t\t= commonfunction::paddingRight('',1,' ');\n\t\t\n\t\t$CCOLL\t\t\t= commonfunction::paddingRight('',8,' ');\n\t\t$AGPEC\t\t\t= commonfunction::paddingRight('',4,' ');\n\t\t$TRNCOL\t\t\t= commonfunction::paddingRight('',5,' ');\n\t\t$SERCOL\t\t\t= commonfunction::paddingRight(2,1,' ');\n\t\t$COLMOD\t\t\t= commonfunction::paddingRight('CCC',3,' ');\n\t\t$SIGLE1\t\t\t= commonfunction::paddingRight('',4,' ');\n\t\t//256\n\t\t$PARCEL_DATA .= $INSLIV2.$Libre4.$POIDS.$VOLU.$LONG.$ORIG.$VENTE.$DEVVTE.$CRT.$DEVCRT.$REFEXT.$REFCLI.$DATFAC.$DATCDE.$CALPHA.$PRTMIS.$COLLEC.$TOPMDM.$TOPEMB.$QTLGAR.$DATRDV.$CODCRNRDV.$DEBCRNLIVANN.$FINCRNLIVANN.$Blank.$TOPAVI.$TAXAFF.$TAXCRT.$Blank1.$TOPKDO.$TOTDIM.$Blank2.$TOP_POSIT.$DISCOL.$CCOLL.$AGPEC.$TRNCOL.$SERCOL.$COLMOD.$SIGLE1;\n\t\t\n\t\t//Sender Information\n\t\t$EXADR1\t\t\t= commonfunction::paddingRight('',28,' ');\n\t\t$EXADR2\t\t\t= commonfunction::paddingRight('',30,' ');\n\t\t$Libres1\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR3\t\t\t= commonfunction::paddingRight('',30,' ');\n\t\t$Libres2\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR4\t\t\t= commonfunction::paddingRight('',30,' ');\n\t\t$Libres3\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR5\t\t\t= commonfunction::paddingRight('',30,' '); \n\t\t$Libres4\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR6\t\t\t= commonfunction::paddingRight('',26,' ');\n\t\t$EXCPAY\t\t\t= commonfunction::paddingRight('',2,' '); \n\t\t$EXCPOS\t\t\t= commonfunction::paddingRight('',5,' '); \n\t\t$EXXCPO\t\t\t= commonfunction::paddingRight('',5,' ');\n\t\t$EXNTEL\t\t\t= commonfunction::paddingRight('',20,' ');\n\t\t$EXEMAI\t\t\t= commonfunction::paddingRight('',70,' ');\n\t\t$LNGCOL\t\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$RECOL\t\t\t= commonfunction::paddingRight('999999999',9,' ');\n\t\t//291\n\t\t$PARCEL_DATA .= $EXADR1.$EXADR2.$Libres1.$EXADR3.$Libres2.$EXADR4.$Libres3.$EXADR5.$Libres4.$EXADR6.$EXCPAY.$EXCPOS.$EXXCPO.$EXNTEL.$EXEMAI.$LNGCOL.$RECOL;\n\t\t\n\t\t//Delvery information\n\t\t$TASSU\t\t\t= commonfunction::paddingRight('',1,' ');\n\t\t$LNGLIV\t\t\t= commonfunction::paddingRight($data['Country_code'],2,' '); \n\t\t$Blank1\t\t\t= commonfunction::paddingRight('',57,' ');\n\t\t//67\n\t\t$PARCEL_DATA .= $TASSU.$LNGLIV.$Blank1.\"\\r\\n\";\n\t \n\t\treturn $PARCEL_DATA;\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "e390107e7c903ad3acd7e879283a4035", "score": "0.4870676", "text": "public function MondialRelayReturnEdiBody($data){ \n\t $PARCEL_DATA = '';\n\t $data['Country_code'] = $this->RecordData['rec_cncode'];\n\t\t$agency \t\t\t = $this->getAgencyNumberReturn($data);\t\n\t\t$marchant = $this->Forwarders['service_type'];\n\t\t$origin = $this->Forwarders['barcode_prefix'];\n\t\t\n\t\t$servicecode = 2;\n\t\t$collectionServce = 2;\n\t\t\n\t\t$weight = $data[WEIGHT] * 1000;\n\t\t\n\t\t$Sender = $this->ForwarderRecord['SenderAddress'];\n\t\t\n\t\t// File Information\n\t $CODFIC\t\t\t= 'A';\t\t\t\t\t\t\t\t\t//file type\n\t\t$CODENR \t\t= '1';\t\t\t\t\t\t\t\t\t// Recording COde\n\t\t$SSCODE\t\t\t= '0';\t\t\t\t\t\t\t\t\t//recording sub-code\n\t\t$MARQUE\t\t\t= commonfunction::paddingRight('NL',2,' ');\t\t\t\t\t\t\t// Brand Code given by Mondial Relay\n\t\t$NEXPE\t\t\t= commonfunction::paddingRight($data[TRACENR],8,' ');\t\t//Shipment Number\n\t\t$NBCOLIS\t\t= commonfunction::paddingleft($data['CNT'],2,0);\t\t\t\t\t\t\t//Number of parcel in the shipment\n\t\t$DISTRI\t\t\t= commonfunction::paddingRight('D',1,' ');\t\t\t\t\t\t\t//Distribution Mode\n\t\t$CDEST\t\t\t= commonfunction::paddingRight('1480',8,' ');\t\t//destination zipcode\n\t\t$TRANS\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($agency['agency_code'],0,4),4,' '); // Agency Number\n\t\t$TOURNE\t\t\t= commonfunction::paddingRight($agency['pr_number'],5,' ');\t\t\t\t\t// Run number\n\t\t$TYPSER\t\t\t= commonfunction::paddingRight($servicecode,1,' ');\t\t\t\t\t\t\t//Service code\n\t\t\n\t\t$LIVMOD\t\t\t= commonfunction::paddingRight('LCC',3,' ');\n\t\t\n\t\t$DATREM\t\t\t= date('d.m.Y');\t\t\t\t\t\t\t\t\t\t\t//preadvice date\n\t\t$SIGLE\t\t\t= commonfunction::paddingRight('Mr',4,' ');\t\t\t\t\t\t// Status\n\t\t//51 \n\t\t$PARCEL_DATA .= $CODFIC.$CODENR.$SSCODE.$MARQUE.$NEXPE.$NBCOLIS.$DISTRI.$CDEST.$TRANS.$TOURNE.$TYPSER.$LIVMOD.$DATREM.$SIGLE;\n\t\t\n\t\t//Receiver Information\n\t\t$rec_phone = (!empty($data[PHONE]))?$data[PHONE]:'748800700';\n\t\t$userdetail = $this->getCustomerDetails($data[ADMIN_ID]);\n\t\t$LVADR1\t\t\t= commonfunction::paddingRight(commonfunction::utf8Decode($userdetail['company_name']),28,' ');\t\t//Receiver name\n\t\t$LVADR2\t\t\t= commonfunction::paddingRight('Parcel.nl',30,' '); //receiver Contact\n\t\t$Libre\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t\t\t\t// free space\n\t\t$LVADR3\t\t\t= commonfunction::paddingRight('3 Square Fabelta',30,' '); //receiver address 1\n\t\t$Libre1\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t\t\t\t//free space\n\t\t$LVADR4\t\t\t= commonfunction::paddingRight('',30,' '); //receiver address 2\n\t\t$Libre2\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t//free space\n\t\t$LVADR5\t\t\t= commonfunction::paddingRight('',30,' ');\t\t\t\t// Receiver address 3\n\t\t$Libre3\t\t\t= commonfunction::paddingRight('',2,' ');\t\t\t\t\t//free space\n\t\t$LVADR6\t\t\t= commonfunction::paddingRight('Tubeke Tubize',26,' ');\t// Receiver city\n\t\t$LVCPAY\t\t\t= commonfunction::paddingRight('BE',2,' ');\t//receiver country Code\n\t\t$LVCPOS\t\t\t= commonfunction::paddingRight('1480',5,' ');\t//Receiver Zipcode\n\t\t$LVXPOS\t\t\t= commonfunction::paddingRight('',5,' ');\t\t\t\t\t\t//Delivery Zipcode extension\n\t\t$LVTEL1\t\t\t= commonfunction::paddingRight('+33748800700',20,' ');\t// Receiver Phone 1\n\t\t$LVTEL2\t\t\t= commonfunction::paddingRight('',20,' ');\t\t\t\t\t\t//Receiver Phone 2\n\t\t$LVEMAI\t\t\t= commonfunction::paddingRight($userdetail['email'],70,' ');\n\t\t$INSLIV1\t\t= commonfunction::paddingRight($data[REFERENCE],31,' ');\t\t// Delivery special information\n\t\t//335\n\t\t$PARCEL_DATA .= $LVADR1.$LVADR2.$Libre.$LVADR3.$Libre1.$LVADR4.$Libre2.$LVADR5.$Libre3.$LVADR6.$LVCPAY.$LVCPOS.$LVXPOS.$LVTEL1.$LVTEL2.$LVEMAI.$INSLIV1;\n\n\t\t//Shipment Information\n\t\t$INSLIV2\t\t= commonfunction::paddingRight('',31,' ');\t\t\t\t\t\t\t\t//Delivery special information line 2\n\t\t$Libre4\t\t\t= commonfunction::paddingRight('',10,' ');\t\t\t\t\t\t\t\t// Free space\n\t\t$POIDS\t\t\t= commonfunction::paddingleft($weight,7,'0');\t\t\t\t\t\t\t// Weight in grams\n\t\t$VOLU\t\t\t= commonfunction::paddingRight('',7,' ');\t\t\t\t\t\t\t\t// PArcel volumn in dl\n\t\t$LONG\t\t\t= commonfunction::paddingRight('',3,' ');\t\t\t\t\t\t\t\t//SHipment max length in cm?\n\t\t$ORIG\t\t\t= commonfunction::paddingRight($origin,6,' '); \t\t\t\t\t// Marchant Given by Modial Relay\n\t\t$VENTE\t\t\t= commonfunction::paddingRight('',7,' ');\t\t\t\t\t\t\t\t//SHipment value in cents\n\t\t$DEVVTE\t\t\t= commonfunction::paddingRight('',3,' ');\t\t\t\t\t\t\t\t//Currency of shipment Value\n\t\t\n\t\t$cod_value = commonfunction::paddingleft(0,7,0);\n\t\t\n\t\t$CRT\t\t\t= commonfunction::paddingRight($cod_value,7,' ');\t\t\t\t\t\t\t\t//COD shipment value in cents\n\t\t$DEVCRT\t\t\t= commonfunction::paddingRight('',3,' ');\t\t\t\t\t\t\t\t//Currency of shipment value\n\t\t$REFEXT\t\t\t= commonfunction::paddingRight('',15,' ');\t\t\t\t\t\t\t\t//Marchant shpment reference\n\t\t$REFCLI\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($data[REFERENCE],0,9),9,' ');\t//Receiver reference\t\t\t\t\n\t\t$DATFAC\t\t\t= date('d.m.Y');\t\t\t\t\t\t\t\t\t\t\t\t//Invoice date\n\t\t$DATCDE\t\t\t= date('d.m.Y');\t\t\t\t\t\t\t\t\t\t\t\t//Order Date\n\t\t$CALPHA\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($data[RECEIVER],0,5),5,' ');\t//five character of receiver name\n\t\t$PRTMIS\t\t\t= commonfunction::paddingRight('',5,' ');\t\t\t\t\t\t\t\t//Blanck\n\t\t$COLLEC\t\t\t= commonfunction::paddingRight('',1,' ');\t\t\t\t\t\t\t//Blanck\n\t\t$TOPMDM\t\t\t= commonfunction::paddingRight('O',1,' ');\t\t\t\t\t\t\t//furniture assembly O or Not is N\n\t\t$TOPEMB\t\t\t= commonfunction::paddingRight('01',2,' ');\t\t\t\t\t\t\t//Packeging\n\t\t$QTLGAR\t\t\t= commonfunction::paddingRight('01',2,' ');\t\t\t\t\t\t\t//Quantiry of item lines\n\t\t\n\t\t$DATRDV\t\t\t= date('d.m.Y');\n\t\t$CODCRNRDV\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$DEBCRNLIVANN\t= commonfunction::paddingRight('',2,' ');\n\t\t$FINCRNLIVANN\t= commonfunction::paddingRight('',2,' ');\n\t\t$Blank\t\t\t= commonfunction::paddingRight('',10,' ');\n\t\t$TOPAVI\t\t\t= commonfunction::paddingRight('O',1,' ');\n\t\t$TAXAFF\t\t\t= commonfunction::paddingRight('',7,' ');\n\t\t$TAXCRT\t\t\t= commonfunction::paddingRight('',7,' ');\n\t\t$Blank1\t\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$TOPKDO\t\t\t= commonfunction::paddingRight('',3,' ');\n\t\t$TOTDIM\t\t\t= commonfunction::paddingRight('',3,' '); \n\t\t$Blank2\t\t\t= commonfunction::paddingRight('',33,' ');\n\t\t$TOP_POSIT\t\t= commonfunction::paddingRight('',7,' ');\n\t\t\n\t\t$collectionAddress = $this->getCollectionAddress($data);\n\t\t$DISCOL\t\t\t= commonfunction::paddingRight('D',1,' ');\n\t\t$CCOLL\t\t\t= commonfunction::paddingRight($data[ZIPCODE],8,' ');\n\t\t$AGPEC\t\t\t= commonfunction::paddingRight(commonfunction::sub_string($collectionAddress['agency_number'],0,4),4,' ');\n\t\t$TRNCOL\t\t\t= commonfunction::paddingRight($collectionAddress['direction'],5,' ');\n\t\t\n\t\t\n\t\t$SERCOL\t\t\t= commonfunction::paddingRight(2,1,' ');\n\t\t$COLMOD\t\t\t= commonfunction::paddingRight('CDS',3,' ');\n\t\t\n\t\t$SIGLE1\t\t\t= commonfunction::paddingRight('',4,' ');\n\t\t//256\n\t\t$PARCEL_DATA .= $INSLIV2.$Libre4.$POIDS.$VOLU.$LONG.$ORIG.$VENTE.$DEVVTE.$CRT.$DEVCRT.$REFEXT.$REFCLI.$DATFAC.$DATCDE.$CALPHA.$PRTMIS.$COLLEC.$TOPMDM.$TOPEMB.$QTLGAR.$DATRDV.$CODCRNRDV.$DEBCRNLIVANN.$FINCRNLIVANN.$Blank.$TOPAVI.$TAXAFF.$TAXCRT.$Blank1.$TOPKDO.$TOTDIM.$Blank2.$TOP_POSIT.$DISCOL.$CCOLL.$AGPEC.$TRNCOL.$SERCOL.$COLMOD.$SIGLE1;\n\t\t\n\t\t//Sender Information\n\t\t$EXADR1\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[RECEIVER]),0,28),28,' ');\n\t\t$EXADR2\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[CONTACT]),0,30),30,' ');\n\t\t$Libres1\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR3\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[STREET].' '.$data[STREETNR]),0,30),30,' ');\n\t\t$Libres2\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR4\t\t\t= commonfunction::paddingRight(commonfunction::sub_string(commonfunction::utf8Decode($data[ADDRESS].' '.$data[STREET2]),0,30),30,' ');\n\t\t$Libres3\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR5\t\t\t= commonfunction::paddingRight('',30,' '); \n\t\t$Libres4\t\t= commonfunction::paddingRight('',2,' ');\n\t\t$EXADR6\t\t\t= commonfunction::paddingRight($data[CITY],26,' ');\n\t\t$EXCPAY\t\t\t= commonfunction::paddingRight($data['Country_code'],2,' ');\n\t\t$EXCPOS\t\t\t= commonfunction::paddingRight($data[ZIPCODE],5,' '); \n\t\t$EXXCPO\t\t\t= commonfunction::paddingRight('',5,' ');\n\t\t$EXNTEL\t\t\t= commonfunction::paddingRight('+33748800700',20,' ');\n\t\t$EXEMAI\t\t\t= commonfunction::paddingRight('',70,' ');\n\t\t$LNGCOL\t\t\t= commonfunction::paddingRight('',2,' ');\n\t\t\n\t\t$RECOL\t\t\t= commonfunction::paddingRight('',9,' ');\n\t\t//291\n\t\t$PARCEL_DATA .= $EXADR1.$EXADR2.$Libres1.$EXADR3.$Libres2.$EXADR4.$Libres3.$EXADR5.$Libres4.$EXADR6.$EXCPAY.$EXCPOS.$EXXCPO.$EXNTEL.$EXEMAI.$LNGCOL.$RECOL;\n\t\t\n\t\t//Delvery information\n\t\t$TASSU\t\t\t= commonfunction::paddingRight('',1,' ');\n\t\t$LNGLIV\t\t\t= commonfunction::paddingRight('FR',2,' '); \n\t\t$Blank1\t\t\t= commonfunction::paddingRight('',57,' ');\n\t\t//67\n\t\t\n\t\t$PARCEL_DATA .= $TASSU.$LNGLIV.$Blank1.\"\\r\\n\";\n\t \n\t\treturn $PARCEL_DATA;\t\t\t\t\t\t\t\t\t\n\t}", "title": "" }, { "docid": "5c190daf79c55e18141e6f2868e7b5a6", "score": "0.48607403", "text": "protected function createEmbeddedDocumentXml()\n {\n $args = func_get_args();\n if ($this->_textalign != '' &&\n ($this->_textalign < 0 || $this->_textalign > 5)\n ) {\n $ajusteTexto = 0;\n } else {\n $ajusteTexto = $this->_textalign;\n }\n if ($this->_sizeX != '') {\n $sizeX = $this->_sizeX * CreateImage::CONSTWORD;\n } else {\n $sizeX = 2993296;\n }\n if ($this->_sizeY != '') {\n $sizeY = $this->_sizeY * CreateImage::CONSTWORD;\n } else {\n $sizeY = 2238233;\n }\n\n $this->_xml = '';\n $this->generateQUITAR();\n $this->generateRPR();\n $this->generateNOPROOF();\n $this->generateDRAWING();\n if ($ajusteTexto == 0) {\n $this->generateINLINE();\n } else {\n if ($ajusteTexto == 3) $this->generateANCHOR(1);\n else $this->generateANCHOR();\n $this->generateSIMPLEPOS();\n $this->generatePOSITIONH();\n $align = '';\n if ($this->_jc != '' && $this->_jc == 'center') {\n $sizePageX = 15 * CreateImage::CONSTWORD;\n $align = round(($sizePageX - $sizeX) / 2);\n } elseif ($this->_jc != '' && $this->_jc == 'right') {\n $sizePageX = 15 * CreateImage::CONSTWORD;\n $align = round($sizePageX - $sizeX);\n }\n if ($align != '') {\n $this->generatePOSOFFSET($align);\n }else $this->generatePOSOFFSET(15240);\n $this->generatePOSITIONV();\n $this->generatePOSOFFSET(\"0\");\n }\n\n $this->generateEXTENT($sizeX, $sizeY);\n $this->generateEFFECTEXTENT();\n switch ($ajusteTexto) {\n case 1:\n $this->generateWRAPSQUARE();\n break;\n case 2:\n case 3:\n $this->generateWRAPNONE();\n break;\n case 4:\n $this->generateWRAPTOPANDBOTTOM();\n break;\n case 5:\n $this->generateWRAPTHROUGH();\n $this->generateWRAPPOLYGON();\n $this->generateSTART();\n $this->generateLINETO();\n $this->generateLINETO('21540', '21342');\n $this->generateLINETO('21540', '0');\n $this->generateLINETO('-198', '0');\n break;\n default:\n break;\n }\n $this->generateDOCPR();\n $this->generateCNVGRAPHICFRAMEPR();\n $this->generateGRAPHIC();\n $this->generateGRAPHICDATA(\n 'http://schemas.openxmlformats.org/'.\n 'drawingml/2006/chart'\n );\n $this->generateDOCUMENTCHART();\n $this->cleanTemplate();\n return true;\n }", "title": "" }, { "docid": "9c76f067634436bff0cd54170c9b0309", "score": "0.48604682", "text": "public function processaEmbalagemPadrao($idEspecificacao, $produtos, $ufOrigem, $ufDestino) {\r\n $dimPesoPermitidos = $this->recuperaDimensoes($idEspecificacao, $ufOrigem, $ufDestino);\r\n\r\n // Seleciona as embalagens validas para os Correios\r\n $sql = \"SELECT *\r\n FROM \"._DB_PREFIX_.\"fkcorreiosg2_embalagens\r\n WHERE ativo = 1 AND\r\n id_shop = \".$this->context->shop->id.\" AND\r\n comprimento >= \".$dimPesoPermitidos['comprimento_min'].\" AND\r\n comprimento <= \".$dimPesoPermitidos['comprimento_max'].\" AND\r\n altura >= \".$dimPesoPermitidos['altura_min'].\" AND\r\n altura <= \".$dimPesoPermitidos['altura_max'].\" AND\r\n largura >= \".$dimPesoPermitidos['largura_min'].\" AND\r\n largura <= \".$dimPesoPermitidos['largura_max'].\" AND\r\n comprimento + altura + largura <= \".$dimPesoPermitidos['somatoria_dimensoes_max'].\"\r\n ORDER BY cubagem\";\r\n\r\n $caixas = Db::getInstance()->executeS($sql);\r\n\r\n // Classifica produtos por cubagem\r\n usort($produtos, array($this, 'ordenaCubagem'));\r\n\r\n // Inicializa variaveis das embalagens\r\n $embalagens = array();\r\n\r\n $alturaEmbalagem = 0;\r\n $larguraEmbalagem = 0;\r\n $comprimentoEmbalagem = 0;\r\n $pesoEmbalagem = 0;\r\n $custoEmbalagem = 0;\r\n $cubagemEmbalagem = 0;\r\n\r\n $pesoAcumuladoProdutos = 0;\r\n $valorAcumuladoProdutos = 0;\r\n $valorAcumuladoAdicionalEnvio = 0;\r\n $cubagemAcumuladaProdutos = 0;\r\n\r\n // Adiciona os produtos em suas embalagens\r\n foreach ($produtos as $prod) {\r\n\r\n // Se peso do produto for igual a zero assume valor minimo\r\n if ($prod['peso'] > 0) {\r\n $pesoProduto = $prod['peso'];\r\n }else {\r\n $pesoProduto = 0.01;\r\n }\r\n\r\n // Retorna vazio se as dimensoes e peso do produto estiverem fora do permitido\r\n if ($prod['altura'] > $dimPesoPermitidos['altura_max'] Or\r\n $prod['largura'] > $dimPesoPermitidos['largura_max'] Or\r\n $prod['comprimento'] > $dimPesoPermitidos['comprimento_max'] Or\r\n $pesoProduto > $dimPesoPermitidos['peso_maximo'] Or\r\n $prod['altura'] + $prod['largura'] + $prod['comprimento'] > $dimPesoPermitidos['somatoria_dimensoes_max']) {\r\n\r\n return array();\r\n }\r\n\r\n // Seleciona embalagem\r\n $embalagemSelecionada = $this->selecionaEmbalagem($caixas, $prod['cubagem']);\r\n\r\n // Retorna vazio se o peso do produto + embalagem estiverem fora do permitido\r\n if ($embalagemSelecionada) {\r\n if (($pesoProduto + $embalagemSelecionada['peso']) > $dimPesoPermitidos['peso_maximo']) {\r\n return array();\r\n }\r\n }\r\n\r\n // Grava embalagem se produto for frete gratis\r\n if ($prod['freteGratisProduto']) {\r\n\r\n // Grava dados considerando as dimensoes minimas\r\n $embalagens[] = array(\r\n 'altura' => ($prod['altura'] < $dimPesoPermitidos['altura_min'] ? $dimPesoPermitidos['altura_min'] : $prod['altura']),\r\n 'largura' => ($prod['largura'] < $dimPesoPermitidos['largura_min'] ? $dimPesoPermitidos['largura_min'] : $prod['largura']),\r\n 'comprimento' => ($prod['comprimento'] < $dimPesoPermitidos['comprimento_min'] ? $dimPesoPermitidos['comprimento_min'] : $prod['comprimento']),\r\n 'pesoEmbalagem' => 0,\r\n 'custoEmbalagem' => 0,\r\n 'cubagem' => $prod['cubagem'],\r\n 'pesoProdutos' => $pesoProduto,\r\n 'valorProdutos' => $prod['valorProduto'],\r\n 'adicionalEnvio' => $prod['adicionalEnvio'],\r\n 'freteGratisProduto' => true\r\n );\r\n\r\n continue;\r\n }\r\n\r\n // Grava embalagem se nao existe embalagem para o produto\r\n if (!$embalagemSelecionada) {\r\n\r\n $embalagens[] = array(\r\n 'altura' => ($prod['altura'] < $dimPesoPermitidos['altura_min'] ? $dimPesoPermitidos['altura_min'] : $prod['altura']),\r\n 'largura' => ($prod['largura'] < $dimPesoPermitidos['largura_min'] ? $dimPesoPermitidos['largura_min'] : $prod['largura']),\r\n 'comprimento' => ($prod['comprimento'] < $dimPesoPermitidos['comprimento_min'] ? $dimPesoPermitidos['comprimento_min'] : $prod['comprimento']),\r\n 'pesoEmbalagem' => 0,\r\n 'custoEmbalagem' => 0,\r\n 'cubagem' => $prod['cubagem'],\r\n 'pesoProdutos' => $pesoProduto,\r\n 'valorProdutos' => $prod['valorProduto'],\r\n 'adicionalEnvio' => $prod['adicionalEnvio'],\r\n 'freteGratisProduto' => false\r\n );\r\n\r\n continue;\r\n }\r\n\r\n // Verifica se existe caixa para a cubagem acumulada somada a cubagem do produto atual\r\n $embalagemSelecionada = $this->selecionaEmbalagem($caixas, ($prod['cubagem'] + $cubagemAcumuladaProdutos));\r\n\r\n // Se embalagem nao localizada\r\n if (!$embalagemSelecionada Or (($pesoAcumuladoProdutos + $pesoProduto + $pesoEmbalagem) > $dimPesoPermitidos['peso_maximo'] And $dimPesoPermitidos['peso_maximo'] > 0)) {\r\n\r\n // Grava dados acumulados\r\n $embalagens[] = array(\r\n 'altura' => $alturaEmbalagem,\r\n 'largura' => $larguraEmbalagem,\r\n 'comprimento' => $comprimentoEmbalagem,\r\n 'pesoEmbalagem' => $pesoEmbalagem,\r\n 'custoEmbalagem' => $custoEmbalagem,\r\n 'cubagem' => $cubagemEmbalagem,\r\n 'pesoProdutos' => $pesoAcumuladoProdutos,\r\n 'valorProdutos' => $valorAcumuladoProdutos,\r\n 'adicionalEnvio' => $valorAcumuladoAdicionalEnvio,\r\n 'freteGratisProduto' => false\r\n );\r\n\r\n // Seleciona embalagem para o produto\r\n $embalagemSelecionada = $this->selecionaEmbalagem($caixas, $prod['cubagem']);\r\n\r\n // Inicializa variaveis\r\n $pesoAcumuladoProdutos = 0;\r\n $valorAcumuladoProdutos = 0;\r\n $valorAcumuladoAdicionalEnvio = 0;\r\n $cubagemAcumuladaProdutos = 0;\r\n }\r\n\r\n // Guarda os campos da embalagem\r\n $alturaEmbalagem = $embalagemSelecionada['altura'];\r\n $larguraEmbalagem = $embalagemSelecionada['largura'];\r\n $comprimentoEmbalagem = $embalagemSelecionada['comprimento'];\r\n $pesoEmbalagem = $embalagemSelecionada['peso'];\r\n $custoEmbalagem = $embalagemSelecionada['custo'];\r\n $cubagemEmbalagem = $embalagemSelecionada['cubagem'];\r\n\r\n // Acumula valores\r\n $pesoAcumuladoProdutos += $pesoProduto;\r\n $valorAcumuladoProdutos += $prod['valorProduto'];\r\n $valorAcumuladoAdicionalEnvio += $prod['adicionalEnvio'];\r\n $cubagemAcumuladaProdutos += $prod['cubagem'];\r\n }\r\n\r\n // Grava a ultima embalagem\r\n if ($pesoAcumuladoProdutos > 0) {\r\n\r\n $embalagens[] = array(\r\n 'altura' => $alturaEmbalagem,\r\n 'largura' => $larguraEmbalagem,\r\n 'comprimento' => $comprimentoEmbalagem,\r\n 'pesoEmbalagem' => $pesoEmbalagem,\r\n 'custoEmbalagem' => $custoEmbalagem,\r\n 'cubagem' => $cubagemEmbalagem,\r\n 'pesoProdutos' => $pesoAcumuladoProdutos,\r\n 'valorProdutos' => $valorAcumuladoProdutos,\r\n 'adicionalEnvio' => $valorAcumuladoAdicionalEnvio,\r\n 'freteGratisProduto' => false\r\n );\r\n }\r\n\r\n return $embalagens;\r\n }", "title": "" }, { "docid": "a720dcba274d05d89f91aaa4ed5988ec", "score": "0.48554265", "text": "function ordenentrega($estado,$tipoflujo,$user){\t\n\t\n\tif( $tipoflujo == 4){\n\t\t$ode = 'CVPODEC';\n\t}else{\n\t\t$ode = 'CVPODES';\t\n\t}\n\t\n\t$suf = 'trg';\n\t$listaEncode0 = new connlist($ordenentrega = new dtoencordenent(array ('id_estado' => $estado,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t 'id_tipoflujo'=> $tipoflujo\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t )));\n\t\n\t\n\tif(!bizcve::getordenentsap($listaEncode0,$listaDetode = new connlist())){\n\t\tgeneral::writelog('ERROR al Obtener OE en flujo '.$tipoflujo );\n\t\treturn;\t\t\t\n\t}\n\t\n\t$listaEncode0->gofirst();\n\tif ($listaEncode0->numelem()) {\n\t\tdo{\n\t\t\tif (!$listaEncode0->getelem()->indmsgsap){\n\t\t\t\t$listaEncode = new connlist($ordenentrega = new dtoencordenent(array ('id_ordenent' =>$listaEncode0->getelem()->id_ordenent )));\n\t\t\t\tif (!bizcve::getordenent($listaEncode,$listaDetode = new connlist())){\n\t\t\t\t\tgeneral::writelog('ERROR al Obtener OE en flujo '.$tipoflujo );\n\t\t\t\t\treturn;\t\n\t\t\t\t}\n\t\t\t\t$id_cotizacion = $listaEncode0->getelem()->id_cotizacion;\n\t\t\t\t$nom = $listaEncode0->getelem()->codlocalventa.$ode.date(\"Ymd\").general::CompletaCerosI($listaEncode0->getelem()->id_ordenent,8);\n\t\t\t\t$myMsgOde = creaMsgode($listaEncode,$listaDetode,false);\n\t\t\t\tif(grabaarchivo($myMsgOde,$nom,$_SESSION[\"CONFIG\"]->getValue('APPLICATION','PATH_BIN_OUT_TEMP'),false)){\n\t\t\t\t\t//Escribo en log de eventos\t\t\t\t\t\n\t\t\t\t\t\tgeneral::writeevent(\"Archivo generado: $nom en \" . $_SESSION[\"CONFIG\"]->getValue('APPLICATION','PATH_BIN_OUT_TEMP'));\n\t\t\t\t\t\n\t\t\t\t\t//Generamos el mismo archivo en carpeta de backup\n\t\t\t\t\t//\tif (!grabaarchivo($myMsgOde,$nom,$_SESSION[\"CONFIG\"]->getValue('APPLICATION','PATH_BIN_OUT_BKP'),true))\n\t\t\t\t\t//\t\tgeneral::writelog(\"ERROR al grabar archivo BACKUP SAP \" . $_SESSION[\"CONFIG\"]->getValue('APPLICATION','PATH_BIN_OUT_BKP') . $nom . \" [MSG: \" . $myMsgOde . \"]\" );\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// Generamos el Archivo de Comprobación\n\t\t\t\t\t\t$nom .= '.'.$suf;\n\t\t\t\t\t\tif (grabaarchivo(' ',$nom,$_SESSION[\"CONFIG\"]->getValue('APPLICATION','PATH_BIN_OUT_TEMP'),false)){\n\t\t\t\t\t\t\t\t$listaEncode00 = new connlist($ordenentrega = new dtoencordenent(array ('id_ordenent' => $listaEncode0->getelem()->id_ordenent,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'indmsgsap' => 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'usrmod'=>$user\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t \t\t \t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t )));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//Marcamos la OD como enviada a SAP\n\t\t\t\t\t\t\t\tif(!bizcve::cambioindicadorsap($listaEncode00)){\n\t\t\t\t\t\t\t\t\tgeneral::writelog('ERROR al marcar envio a Sap en OE N'.$listaEncode0->getelem()->id_ordenent.' FLujo '.$tipoflujo );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgeneral::writelog(\"ERROR al grabar archivo SAP \" . $_SESSION[\"CONFIG\"]->getValue('APPLICATION','PATH_BIN_OUT_TEMP') . $nom . \" [MSG: \" . $myMsgOde . \"]\" );\n\t\t\t\t}\n\t\t\t}\n\t\t}while ($listaEncode0->gonext());\n\t\treturn $listaEncode0;\t\t\n\t}else{\n\t\treturn $lista = new connlist();\n\t}\n\t\n}", "title": "" }, { "docid": "a1f6726e25a76f80bb8e9349d1b44c31", "score": "0.48526457", "text": "public function generateKE_1($elementObj) {\r\n\t\t$db = new Database();\r\n\r\n\t\t// later use, get A and I from ba_sections\r\n\t\t$sectionObj = Section::getRecordByRcdNo($elementObj -> PK4ba_g);\r\n\t\t$A = array(\r\n\t\t\t'A_start' => 0,\r\n\t\t\t'A_end' => 0\r\n\t\t);\r\n\t\t$I = array(\r\n\t\t\t'Ix_start' => 0,\r\n\t\t\t'Ix_end' => 0,\r\n\t\t\t'Iy_start' => 0,\r\n\t\t\t'Iy_end' => 0\r\n\t\t);\r\n\t\tif ($sectionObj != null) {\r\n\t\t\t$A = array(\r\n\t\t\t\t'A_start' => $sectionObj -> get('A_start'),\r\n\t\t\t\t'A_end' => $sectionObj -> get('A_end')\r\n\t\t\t);\r\n\t\t\t$I = array(\r\n\t\t\t\t'Ix_start' => $sectionObj -> get('Ix_start'),\r\n\t\t\t\t'Ix_end' => $sectionObj -> get('Ix_end'),\r\n\t\t\t\t'Iy_start' => $sectionObj -> get('Iy_start'),\r\n\t\t\t\t'Iy_end' => $sectionObj -> get('Iy_end')\r\n\t\t\t);\r\n\t\t}\r\n\r\n\r\n\t\t// get E\r\n\t\tif ($elementObj -> PK4ba_mat == 2) { $materialObj = Material::getRecordByRcdNo(22); }\r\n\t\telseif ($elementObj -> PK4ba_mat == 0) { $materialObj = Material::getRecordByRcdNo(23); }\r\n\t\t$E = ($materialObj != null) ? $materialObj -> get('E') : 0;\r\n\t\t\r\n\t\t$I = $elementObj -> PK4ba_g;\r\n\t\t$EI = $E * $I;\r\n\t\t$le = $elementObj -> getLength();\r\n\t\t$v1 = $EI * 12 / pow($le, 3);\r\n\t\t$v2 = $EI * 6 / pow($le, 2);\r\n\t\t$v3 = $EI * 4 / $le;\r\n\t\t$v4 = pow($EI, 2) / $le;\r\n\r\n\t\t$k_e = array(\r\n\t\t\tarray($v1, $v2, -$v1, $v2),\r\n\t\t\tarray($v2, $v3, -$v2, $v4),\r\n\t\t\tarray(-$v1, -$v2, $v1, -$v2),\r\n\t\t\tarray($v2, $v4, -$v2, $v3)\r\n\t\t);\r\n\t\treturn $k_e;\r\n\t}", "title": "" }, { "docid": "e1ac556cd01045baccad22d3653c8ccd", "score": "0.4851915", "text": "public function enfocar() {\n\n $comando=$this->comandos1[\"enfocar\"];\n $comando= $this->procesarComando($comando,self::$FOCN);\n $this->enviarComando($comando);\n\n }", "title": "" }, { "docid": "949f415c9c135f9b8b71a7e294154fdc", "score": "0.48517096", "text": "function esig_render_shortcode($doc_id) {\n\n $docType = WP_E_Sig()->document->getDocumentType($doc_id);\n if ($docType != \"stand_alone\") {\n return false;\n }\n $documentContentUnfilter = WP_E_Sig()->document->esig_do_shortcode($doc_id);\n\n $document_content = WP_E_Sig()->signature->encrypt(ENCRYPTION_KEY, $documentContentUnfilter);\n $document_checksum = sha1($doc_id . $documentContentUnfilter);\n Esign_Query::_update(\"documents\", array(\"document_content\" => $document_content, \"document_checksum\" => $document_checksum), array(\"document_id\" => $doc_id), array(\"%s\", \"%s\"), array(\"%d\"));\n //Esign_Query::_update(\"documents\",array(\"document_content\"=>$document_content),array(\"document_id\"=>$doc_id),array(\"%s\"),array(\"%d\"));\n}", "title": "" }, { "docid": "e083d4f3db9991e5790ce5f32c202fd5", "score": "0.47543505", "text": "public function generateLetterPDFDBS($confid, $lang) {\n\n $pound = html_entity_decode('&pound;');\n /* Copy Symbol */\n $copySymbol = html_entity_decode('&copy;');\n\n\n ########## TEXT COLOR ###########\n\n $r = .40;\n $g = .19;\n $b = .57;\n #################\n ########## White TEXT COLOR ###########\n $whiter = 1;\n $whiteg = 1;\n $whiteb = 1;\n\n #################\n ########## Disclosures TEXT COLOR ###########\n $discr = .58;\n $discg = .58;\n $discb = .60;\n\n #################\n ########## Disclosures TEXT COLOR ###########\n $otherr = .18;\n $otherg = .21;\n $otherb = .57;\n\n #################\n ########## Filled Rectangle (BackGround color) #########\n\n $fr = .40;\n $fg = .14;\n $fb = .40;\n\n #######################\n ########## Line Color #########\n\n $lr = .40;\n $lg = .19;\n $lb = .57;\n\n #######################\n\n $docCount = count($documentDetails);\n $date = $usedByDate;\n\n $pdf = & new Cezpdf('a4', 'portrait');\n//$pdf->setPreferences('HideToolbar','false');\n//$pdf->setPreferences('HideMenuBar','true');\n $pdf->setPreferences('HideWindoUI', 'true');\n $pdf->setPreferences('FitWindow', 'true');\n\n $pdf->ezSetMargins(50, 50, 0, 0);\n $rights = array('print');\n\n ###################################################################################################################################\n if (!empty($confid)) {\n\n $objApplication = new Application();\n\n #get Application Reference Number\n $resAppRefNo = $objApplication->getAppRefNo($confid);\n $appRefNo = $resAppRefNo[0]['app_ref_no'];\n\n #get Applicant PDF Information\n $pdfres = $objApplication->getAppPDFInfo($appRefNo);\n\n\n #get country name from ebulk_iso_country_code\n $country1name = $this->getCountyEbulkISO($pdfres[0]['app_addr_country_code']);\n\n #RB Refrence Number\n $rbAppRefNo = $pdfres[0]['rb_app_ref_no'];\n\n #get result name from ebulk_result_batch_person_names\n $pdfresultname = $this->getEbulkResultNames($rbAppRefNo);\n $othernames = $this->correctcase($pdfresultname[0][\"result_name\"]);\n\n #get photoimage,photo_image_accepted from Section X\n $pdfimage = $this->getAppPhotoInfo($confid);\n $photoimage = $pdfimage[0][\"photoimage\"];\n\n if ($pdfimage[0][\"photo_image_accepted\"] == '1' || $pdfimage[0][\"photo_image_accepted\"] == '0') {\n $disclosuretype = $this->correctcase($pdfres[0][\"disclosure_type\"]);\n $disclosureno = $pdfres[0][\"disclosure_number\"];\n $disclosureIssueDate = $pdfres[0][\"disclosure_issue_date\"];\n $positionapplied = $pdfres[0][\"emp_position_applied_for\"];\n $registeredbody = $pdfres[0][\"cntsig_rb_name\"];\n $countersignatory = $pdfres[0][\"cntsig_full_name\"];\n $nameofemployer = $pdfres[0][\"emp_org_name\"];\n $surname = $pdfres[0][\"app_surname\"];\n $forename = $pdfres[0][\"app_forname\"];\n $dob = $pdfres[0][\"app_dob\"];\n $placeofbirth = $pdfres[0][\"app_place_of_birth\"];\n $gender = $this->correctcase($pdfres[0][\"app_gender\"]);\n $address1 = $pdfres[0][\"app_addr_line1\"];\n $address2 = $pdfres[0][\"app_addr_line2\"];\n $town = $pdfres[0][\"app_addr_town\"];\n $country = $pdfres[0][\"app_addr_country\"];\n $postcode = $pdfres[0][\"app_addr_postcode\"];\n $countrycode = $country1name;\n $policerecordsofconvictions = strtoupper($pdfres[0][\"disc_police_records_of_convictions\"]);\n $eduactlist = strtoupper($pdfres[0][\"disc_edu_act_list\"]);\n $protectionchild = strtoupper($pdfres[0][\"disc_isa_child_barred_list\"]);\n $vulnerableadult = strtoupper($pdfres[0][\"disc_isa_vulnerable_adult_barred_list\"]);\n $otherrelaventinfo = strtoupper($pdfres[0][\"ecert_other_relevant_infn\"]);\n\n if (empty($eduactlist) && strtoupper($disclosuretype) == \"STANDARD\")\n $eduactlist = \"NOT REQUESTED\";\n\n if (empty($protectionchild) && strtoupper($disclosuretype) == \"STANDARD\")\n $protectionchild = \"NOT REQUESTED\";\n\n if (empty($vulnerableadult) && strtoupper($disclosuretype) == \"STANDARD\")\n $vulnerableadult = \"NOT REQUESTED\";\n\n\n $isaflag = $pdfres[0][\"isaflag\"];\n\n\n\n //$pdf->addText(50+$offsetH,670+$offsetV,10,$firstname,0,0);\n\n $today = date(\"d\") . \" \" . date(\"M\") . \" \" . date(\"Y\");\n\n ###################################################################################################################################\n //echo \"Hori::::::::\".$offsetH.\"<br>\";\n //echo \"Ver:::::::::\".$offsetV.\"<br>\";\n\n $offsetV = 30;\n\n\n ############################PAGE1\n\n require_once(CLASS_PATH . \"dbs_page1.php\");\n\n $pdf->setColor($fr, $fg, $fb);\n $pdf->filledRectangle(0, 0, 600, 130);\n $pdf->setColor(0, 0, 0);\n\n $messageEmployee = \"THIS \".strtoupper(CERT_DISC).\" IS NOT EVIDENCE OF IDENTITY & IS REPRESENTATIVE OF \".strtoupper(CERT_DISC).\" INFORMATION ISSUED BY THE \".DBS;\n\n $pdf->ezSetY(110);\n\n $pdf->ezSetY(110);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->ezText($messageEmployee, 7, array('justification' => 'full', 'left' => '40', 'right' => '285'));\n $pdf->setColor(0, 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->ezSetY(770);\n\n\n if(empty($setAddresLineTwo) && empty($setAddresLineOne))\n {\n $offsetV = 38;\n }\n if(empty($setAddresLineTwo) && !empty($setAddresLineOne)){\n $offsetV=38;\n }\n\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->addText(40 + $offsetH, 75 + $offsetV, 15, \"Employers Copy\", 0, 0);\n /* $pdf->addText(40+$offsetH,60+$offsetV,9,\"THIS DISCLOSURE IS NOT EVIDENCE OF IDENTITY & IS\\nREPRESENTATIVE OF DISCLOSURE INFORMATION ISSUED\\nBY THE CRB\",0,0); */\n\n\n\n $pdf->selectFont(FONT_PATH . 'Times-Roman.afm');\n//$pdf->addText(35+$offsetH,38+$offsetV,26,\"@\",0,0);\n //$pdf->addText(40 + $offsetH, 42 + $offsetV, 15, $lang['atlanticDataLtd'], 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n //$pdf->addText(40 + $offsetH, 29 + $offsetV, 9, $lang[\"kindRegards\"], 0, 0);\n $pdf->addText(40 + $offsetH, 29 + $offsetV, 15, $lang['disclosureServiceAddressone'], 0, 0);\n $pdf->addText(40 + $offsetH, 19 + $offsetV, 9, $lang[\"disclosureServiceAddresstwo\"], 0, 0);\n $pdf->addText(40 + $offsetH, 9 + $offsetV, 9, $lang[\"disclosureServiceAddressthree\"], 0, 0);\n $pdf->addText(40 + $offsetH, -2 + $offsetV, 9, $lang[\"disclosureServiceAddressfour\"], 0, 0);\n \n \n $pdf->setColor(0, 0, 0);\n\n\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->filledRectangle(320, 50, 250, 70);\n\n $timedet = time();\n $barcode = $confid . $timedet;\n\n if (isset($barcode) && strlen($barcode) > 0) {\n $barcodesrc = $this->generateResultbarcode($barcode, $appRefNo);\n }\n\n //$lineCount=$lineCount-20;\n//$pdf->addJpegFromFile($barcodesrc,330,703,$width,$height);\n//-------------------- Barcode Ends here ---------------------\n//$image=\"../images/barcode.jpg\";\n $pdf->addJpegFromFile($barcodesrc, 350, 55, 200);\n\n\n $pdf->addText(520 + $offsetH, 1 + $offsetV, 10, \"Page 1 of 2\", 0, 0);\n\n $pdf->addText(250 + $offsetH, -15 + $offsetV, 6, $copySymbol . \" This document is copyright to @lantic Data Ltd\", 0, 0);\n $pdf->setColor(0, 0, 0);\n##endfooter\n##newpage\n $pdf->ezNewPage();\n $pdf->selectFont(FONT_PATH . 'gilfont.afm');\n $pdf->ezSetY(800);\n\n#########################END OF PAGE1\n############################PAGE2\n\n include(CLASS_PATH . \"dbs_page2.php\");\n\n##footer\n\n $pdf->setColor($fr, $fg, $fb);\n $pdf->filledRectangle(0, 0, 600, 130);\n $pdf->setColor(0, 0, 0);\n\n $messageEmployee = \"THIS \".strtoupper(CERT_DISC).\" IS NOT EVIDENCE OF IDENTITY & IS REPRESENTATIVE OF \".strtoupper(CERT_DISC).\" INFORMATION ISSUED BY THE \".DBS;\n\n $pdf->ezSetY(110);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->ezText($messageEmployee, 7, array('justification' => 'full', 'left' => '40', 'right' => '285'));\n $pdf->setColor(0, 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->ezSetY(770);\n\n\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->addText(40 + $offsetH, 75 + $offsetV, 15, \"Employers Copy\", 0, 0);\n//$pdf->addText(40+$offsetH,60+$offsetV,9,\"THIS DISCLOSURE IS NOT EVIDENCE OF IDENTITY\",0,0);\n $pdf->selectFont(FONT_PATH . 'Times-Roman.afm');\n//$pdf->addText(35+$offsetH,38+$offsetV,26,\"@\",0,0);\n //$pdf->addText(40 + $offsetH, 42 + $offsetV, 15, $lang['atlanticDataLtd'], 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n //$pdf->addText(40 + $offsetH, 29 + $offsetV, 9, $lang[\"kindRegards\"], 0, 0);\n $pdf->addText(40 + $offsetH, 29 + $offsetV, 15, $lang['disclosureServiceAddressone'], 0, 0);\n $pdf->addText(40 + $offsetH, 19 + $offsetV, 9, $lang[\"disclosureServiceAddresstwo\"], 0, 0);\n $pdf->addText(40 + $offsetH, 9 + $offsetV, 9, $lang[\"disclosureServiceAddressthree\"], 0, 0);\n $pdf->addText(40 + $offsetH, -2 + $offsetV, 9, $lang[\"disclosureServiceAddressfour\"], 0, 0);\n \n \n $pdf->setColor(0, 0, 0);\n\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->filledRectangle(320, 50, 250, 70);\n\n\n//$image=\"images/barcode.jpg\";\n//$pdf->addJpegFromFile($image,350,55,200);\n\n $pdf->addJpegFromFile($barcodesrc, 350, 55, 200);\n $pdf->addText(520 + $offsetH, 1 + $offsetV, 10, \"Page 2 of 2\", 0, 0);\n $pdf->addText(250 + $offsetH, -15 + $offsetV, 6, $copySymbol . ' This document is copyright to @lantic Data Ltd', 0, 0);\n\n//$pdf->addText(250+$offsetH,-15+$offsetV,6,\"© This document is copyright to @lantic Data Ltd\",0,0);\n $pdf->setColor(0, 0, 0);\n } else {\n $pdf->addText(200 + $offsetH, 700 + $offsetV, 30, \"Access Denied\", 0, 0);\n }\n } else {\n\n $pdf->addText(200 + $offsetH, 700 + $offsetV, 30, \"Access Denied\", 0, 0);\n }\n\n if (!empty($d) && $d) {\n $pdfcode = $pdf->output(1);\n //$end_time = getmicrotime();\n $pdfcode = str_replace(\"\\n\", \"\\n<br>\", htmlspecialchars($pdfcode));\n echo '<html><body>';\n echo trim($pdfcode);\n echo '</body></html>';\n } else {\n $pdfcode = $pdf->output();\n $pdf->stream();\n }\n// \n }", "title": "" }, { "docid": "b5eabee580c5e5fd08a9fbe747e7319a", "score": "0.47277218", "text": "function op__eco(toba_servicio_web_mensaje $mensaje)\r\n\t{\r\n\t\ttoba::logger()->debug('Entro al servicio web');\r\n\t\t$xml = new SimpleXMLElement($mensaje->get_payload());\r\n\t\ttoba::logger()->debug('El payload para testeo es: ' .$xml->texto);\r\n\t\t$texto = xml_encode(xml_decode($xml->texto));\r\n\t\t$payload = <<<XML\r\n<ns1:eco xmlns:ns1=\"http://siu.edu.ar/toba/pruebas\">\r\n\t<texto>$texto</texto>\r\n</ns1:eco>\r\nXML;\r\n\t\treturn new toba_servicio_web_mensaje($payload);\r\n\t}", "title": "" }, { "docid": "f8a4ea6b7e1db190f62b98ac78ae716e", "score": "0.471848", "text": "function DECODE_GEN($m_s, $c_inv){\r\n\t\t\t\t\t\t$cara = array();\r\n\t\t\t\t\t\t$ale = array();\r\n\t\t\t\t\t\t$cara = $this->caracteres();\r\n\t\t\t\t\t\t$ale = $this->caracteres_ale();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//Mensaje De: tabla de n elementos a Matriz de 2xn elementos\r\n\t\t\t\t\t\t$m_m = array();\r\n\t\t\t\t\t\t$m_m = $this->A_2xn($m_s);\r\n\r\n\t\t\t\t\t//Multiplicado de las matrices (Mensaje y clave)\r\n\t\t\t\t\t\t$m_des = array();\r\n\t\t\t\t\t\t$m_des = $this->cif_des($m_m, $c_inv);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t//Conversión a números enteros\r\n\t\t\t\t\tfor($a=0;$a<2;$a++){\r\n\t\t\t\t\t\tforeach($m_des[$a] as &$elemento){\r\n\t\t\t\t\t\t\t$elemento = round($elemento);\r\n\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\tunset($elemento);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t//Cambiado de números a caracteres\r\n\t\t\t\t\t\t$m_descifrado = \"\";\r\n\t\t\t\t\t\tfor($a=0;$a<2;$a++){\r\n\t\t\t\t\t\t\tfor($b=0;$b<count($m_des[$a]);$b++){\r\n\t\t\t\t\t\t\t\t$val = $m_des[$a][$b];\r\n\t\t\t\t\t\t\t\t//Aqui se sustituye el numero por un caracter\r\n\t\t\t\t\t\t\t\t$val_2 = (int)$val + 1;\r\n\t\t\t\t\t\t\t\tif(count($cara) < $val_2 || (int)$val<0)\r\n\t\t\t\t\t\t\t\t\t$m_descifrado.= \"_\";\r\n\t\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\t\t$m_descifrado.= $cara[$val];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t//Retornamos el mensaje descifrado\r\n\t\t\t\t\t\t$this->recibirResultado($m_descifrado);\r\n\t\t\t\t}", "title": "" }, { "docid": "9c19adf2b6b99ced5e55bc90b052870d", "score": "0.47064164", "text": "function createEtape($objFormx,$idEtape,$libelleEtape,$tabAttributs) {\r\n\t$neudFormx = $objFormx->XMLDOM->getElementsByTagName('FORMX')->item(0);\r\n\t$etapeTemp = $objFormx->XMLDOM->createElement('ETAPE');\r\n\t$etape = $neudFormx->appendChild($etapeTemp);\r\n\tforeach($tabAttributs as $key => $value) {\r\n\t\t$etape->setAttribute($key,utf8_encode($value));\t\r\n\t}\r\n\t$libelle = $objFormx->XMLDOM->createElement('Libelle',utf8_encode($libelleEtape));\r\n\t$etape->appendChild($libelle);\r\n\treturn $etape;\r\n}", "title": "" }, { "docid": "8c8d5b20aea29e93d1212d99cf32a35b", "score": "0.46770105", "text": "function generateLetterPDF($confid, $lang) {\n\n $pound = html_entity_decode('&pound;');\n /* Copy Symbol */\n $copySymbol = html_entity_decode('&copy;');\n\n\n ########## TEXT COLOR ###########\n\n $r = .40;\n $g = .19;\n $b = .57;\n #################\n ########## White TEXT COLOR ###########\n $whiter = 1;\n $whiteg = 1;\n $whiteb = 1;\n\n #################\n ########## Disclosures TEXT COLOR ###########\n $discr = .58;\n $discg = .58;\n $discb = .60;\n\n #################\n ########## Disclosures TEXT COLOR ###########\n $otherr = .18;\n $otherg = .21;\n $otherb = .57;\n\n #################\n ########## Filled Rectangle (BackGround color) #########\n\n $fr = .40;\n $fg = .14;\n $fb = .40;\n\n #######################\n ########## Line Color #########\n\n $lr = .40;\n $lg = .19;\n $lb = .57;\n\n #######################\n\n $docCount = count($documentDetails);\n $date = $usedByDate;\n\n $pdf = & new Cezpdf('a4', 'portrait');\n//$pdf->setPreferences('HideToolbar','false');\n//$pdf->setPreferences('HideMenuBar','true');\n $pdf->setPreferences('HideWindoUI', 'true');\n $pdf->setPreferences('FitWindow', 'true');\n\n $pdf->ezSetMargins(50, 50, 0, 0);\n $rights = array('print');\n\n ###################################################################################################################################\n if (!empty($confid)) {\n\n $objApplication = new Application();\n\n #get Application Reference Number\n $resAppRefNo = $objApplication->getAppRefNo($confid);\n $appRefNo = $resAppRefNo[0]['app_ref_no'];\n\n #get Applicant PDF Information\n $pdfres = $objApplication->getAppPDFInfo($appRefNo);\n\n\n #get country name from ebulk_iso_country_code\n $country1name = $this->getCountyEbulkISO($pdfres[0]['app_addr_country_code']);\n\n #RB Refrence Number\n $rbAppRefNo = $pdfres[0]['rb_app_ref_no'];\n\n #get result name from ebulk_result_batch_person_names\n $pdfresultname = $this->getEbulkResultNames($rbAppRefNo);\n $othernames = $this->correctcase($pdfresultname[0][\"result_name\"]);\n\n #get photoimage,photo_image_accepted from Section X\n $pdfimage = $this->getAppPhotoInfo($confid);\n $photoimage = $pdfimage[0][\"photoimage\"];\n\n if ($pdfimage[0][\"photo_image_accepted\"] == '1' || $pdfimage[0][\"photo_image_accepted\"] == '0') {\n $disclosuretype = $this->correctcase($pdfres[0][\"disclosure_type\"]);\n $disclosureno = $pdfres[0][\"disclosure_number\"];\n $disclosureIssueDate = $pdfres[0][\"disclosure_issue_date\"];\n $positionapplied = $pdfres[0][\"emp_position_applied_for\"];\n $registeredbody = $pdfres[0][\"cntsig_rb_name\"];\n $countersignatory = $pdfres[0][\"cntsig_full_name\"];\n $nameofemployer = $pdfres[0][\"emp_org_name\"];\n $surname = $pdfres[0][\"app_surname\"];\n $forename = $pdfres[0][\"app_forname\"];\n $dob = $pdfres[0][\"app_dob\"];\n $placeofbirth = $pdfres[0][\"app_place_of_birth\"];\n $gender = $this->correctcase($pdfres[0][\"app_gender\"]);\n $address1 = $pdfres[0][\"app_addr_line1\"];\n $address2 = $pdfres[0][\"app_addr_line2\"];\n $town = $pdfres[0][\"app_addr_town\"];\n $country = $pdfres[0][\"app_addr_country\"];\n $postcode = $pdfres[0][\"app_addr_postcode\"];\n $countrycode = $country1name;\n $policerecordsofconvictions = strtoupper($pdfres[0][\"disc_police_records_of_convictions\"]);\n $eduactlist = strtoupper($pdfres[0][\"disc_edu_act_list\"]);\n $protectionchild = strtoupper($pdfres[0][\"disc_isa_child_barred_list\"]);\n $vulnerableadult = strtoupper($pdfres[0][\"disc_isa_vulnerable_adult_barred_list\"]);\n $otherrelaventinfo = strtoupper($pdfres[0][\"ecert_other_relevant_infn\"]);\n\n if (empty($eduactlist) && strtoupper($disclosuretype) == \"STANDARD\")\n $eduactlist = \"NOT REQUESTED\";\n\n if (empty($protectionchild) && strtoupper($disclosuretype) == \"STANDARD\")\n $protectionchild = \"NOT REQUESTED\";\n\n if (empty($vulnerableadult) && strtoupper($disclosuretype) == \"STANDARD\")\n $vulnerableadult = \"NOT REQUESTED\";\n\n\n $isaflag = $pdfres[0][\"isaflag\"];\n\n\n\n //$pdf->addText(50+$offsetH,670+$offsetV,10,$firstname,0,0);\n\n $today = date(\"d\") . \" \" . date(\"M\") . \" \" . date(\"Y\");\n\n ###################################################################################################################################\n //echo \"Hori::::::::\".$offsetH.\"<br>\";\n //echo \"Ver:::::::::\".$offsetV.\"<br>\";\n\n $offsetV = 30;\n\n\n ############################PAGE1\n\n require_once(CLASS_PATH . \"page1.php\");\n\n $pdf->setColor($fr, $fg, $fb);\n $pdf->filledRectangle(0, 0, 600, 130);\n $pdf->setColor(0, 0, 0);\n\n $messageEmployee = \"THIS DISCLOSURE IS NOT EVIDENCE OF IDENTITY & IS REPRESENTATIVE OF DISCLOSURE INFORMATION ISSUED BY THE CRB\";\n\n $pdf->ezSetY(110);\n\n $pdf->ezSetY(110);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->ezText($messageEmployee, 7, array('justification' => 'full', 'left' => '40', 'right' => '285'));\n $pdf->setColor(0, 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->ezSetY(770);\n\n\n if(empty($setAddresLineTwo) && empty($setAddresLineOne))\n {\n $offsetV = 38;\n }\n if(empty($setAddresLineTwo) && !empty($setAddresLineOne)){\n $offsetV=38;\n }\n\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->addText(40 + $offsetH, 75 + $offsetV, 15, \"Employers Copy\", 0, 0);\n /* $pdf->addText(40+$offsetH,60+$offsetV,9,\"THIS DISCLOSURE IS NOT EVIDENCE OF IDENTITY & IS\\nREPRESENTATIVE OF DISCLOSURE INFORMATION ISSUED\\nBY THE CRB\",0,0); */\n\n\n\n $pdf->selectFont(FONT_PATH . 'Times-Roman.afm');\n//$pdf->addText(35+$offsetH,38+$offsetV,26,\"@\",0,0);\n $pdf->addText(40 + $offsetH, 42 + $offsetV, 15, $lang['atlanticDataLtd'], 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->addText(40 + $offsetH, 29 + $offsetV, 9, $lang[\"kindRegards\"], 0, 0);\n $pdf->addText(40 + $offsetH, 19 + $offsetV, 9, $lang[\"disclosureServiceAddressone\"], 0, 0);\n $pdf->addText(40 + $offsetH, 9 + $offsetV, 9, $lang[\"disclosureServiceAddresstwo\"], 0, 0);\n $pdf->addText(40 + $offsetH, -2 + $offsetV, 9, $lang[\"disclosureServiceAddressthree\"], 0, 0);\n $pdf->addText(40 + $offsetH, -12 + $offsetV, 9, $lang[\"disclosureService\"], 0, 0);\n $pdf->addText(40 + $offsetH, -22 + $offsetV, 9, $lang[\"disclosureServiceAddressfour\"], 0, 0);\n $pdf->setColor(0, 0, 0);\n\n\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->filledRectangle(320, 50, 250, 70);\n\n $timedet = time();\n $barcode = $confid . $timedet;\n\n if (isset($barcode) && strlen($barcode) > 0) {\n $barcodesrc = $this->generateResultbarcode($barcode, $appRefNo);\n }\n\n //$lineCount=$lineCount-20;\n//$pdf->addJpegFromFile($barcodesrc,330,703,$width,$height);\n//-------------------- Barcode Ends here ---------------------\n//$image=\"../images/barcode.jpg\";\n $pdf->addJpegFromFile($barcodesrc, 350, 55, 200);\n\n\n $pdf->addText(520 + $offsetH, 1 + $offsetV, 10, \"Page 1 of 2\", 0, 0);\n\n $pdf->addText(250 + $offsetH, -15 + $offsetV, 6, $copySymbol . \" This document is copyright to @lantic Data Ltd\", 0, 0);\n $pdf->setColor(0, 0, 0);\n##endfooter\n##newpage\n $pdf->ezNewPage();\n $pdf->selectFont(FONT_PATH . 'gilfont.afm');\n $pdf->ezSetY(800);\n\n#########################END OF PAGE1\n############################PAGE2\n\n include(CLASS_PATH . \"page2.php\");\n\n##footer\n\n $pdf->setColor($fr, $fg, $fb);\n $pdf->filledRectangle(0, 0, 600, 130);\n $pdf->setColor(0, 0, 0);\n\n $messageEmployee = \"THIS DISCLOSURE IS NOT EVIDENCE OF IDENTITY & IS REPRESENTATIVE OF DISCLOSURE INFORMATION ISSUED BY THE CRB\";\n\n $pdf->ezSetY(110);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->ezText($messageEmployee, 7, array('justification' => 'full', 'left' => '40', 'right' => '285'));\n $pdf->setColor(0, 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->ezSetY(770);\n\n\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->addText(40 + $offsetH, 75 + $offsetV, 15, \"Employers Copy\", 0, 0);\n//$pdf->addText(40+$offsetH,60+$offsetV,9,\"THIS DISCLOSURE IS NOT EVIDENCE OF IDENTITY\",0,0);\n $pdf->selectFont(FONT_PATH . 'Times-Roman.afm');\n//$pdf->addText(35+$offsetH,38+$offsetV,26,\"@\",0,0);\n $pdf->addText(40 + $offsetH, 42 + $offsetV, 15, $lang['atlanticDataLtd'], 0, 0);\n $pdf->selectFont(FONT_PATH . 'arial.afm');\n $pdf->addText(40 + $offsetH, 29 + $offsetV, 9, $lang[\"kindRegards\"], 0, 0);\n $pdf->addText(40 + $offsetH, 19 + $offsetV, 9, $lang[\"disclosureServiceAddressone\"], 0, 0);\n $pdf->addText(40 + $offsetH, 9 + $offsetV, 9, $lang[\"disclosureServiceAddresstwo\"], 0, 0);\n $pdf->addText(40 + $offsetH, -2 + $offsetV, 9, $lang[\"disclosureServiceAddressthree\"], 0, 0);\n $pdf->addText(40 + $offsetH, -12 + $offsetV, 9, $lang[\"disclosureService\"], 0, 0);\n $pdf->addText(40 + $offsetH, -22 + $offsetV, 9, $lang[\"disclosureServiceAddressfour\"], 0, 0);\n $pdf->setColor(0, 0, 0);\n\n $pdf->setColor($whiter, $whiteg, $whiteb);\n $pdf->filledRectangle(320, 50, 250, 70);\n\n\n//$image=\"images/barcode.jpg\";\n//$pdf->addJpegFromFile($image,350,55,200);\n\n $pdf->addJpegFromFile($barcodesrc, 350, 55, 200);\n $pdf->addText(520 + $offsetH, 1 + $offsetV, 10, \"Page 2 of 2\", 0, 0);\n $pdf->addText(250 + $offsetH, -15 + $offsetV, 6, $copySymbol . ' This document is copyright to @lantic Data Ltd', 0, 0);\n\n//$pdf->addText(250+$offsetH,-15+$offsetV,6,\"© This document is copyright to @lantic Data Ltd\",0,0);\n $pdf->setColor(0, 0, 0);\n } else {\n $pdf->addText(200 + $offsetH, 700 + $offsetV, 30, \"Access Denied\", 0, 0);\n }\n } else {\n\n $pdf->addText(200 + $offsetH, 700 + $offsetV, 30, \"Access Denied\", 0, 0);\n }\n\n if (!empty($d) && $d) {\n $pdfcode = $pdf->output(1);\n //$end_time = getmicrotime();\n $pdfcode = str_replace(\"\\n\", \"\\n<br>\", htmlspecialchars($pdfcode));\n echo '<html><body>';\n echo trim($pdfcode);\n echo '</body></html>';\n } else {\n $pdfcode = $pdf->output();\n $pdf->stream();\n }\n// \n }", "title": "" }, { "docid": "63315645b78bd1058883d1a367f8b168", "score": "0.46728164", "text": "function generarXML ($rfc_emisor) {\n $fecha_actual = substr( date('c'), 0, 19);\n\n $cfdi = <<<XML\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<cfdi:Comprobante xmlns:cfdi=\"http://www.sat.gob.mx/cfd/3\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv33.xsd\" Version=\"3.3\" Serie=\"A\" Folio=\"01\" Fecha=\"$fecha_actual\" Sello=\"TqVg+/JpnhP5rLODxlLB3ptRT3QgArW4taQCK5H3QZcGnSm570QFq3Vpe7vBpxcq6Nr25no9sdvwzekU7pgawmUwCL5KWcZCWkCEKCx0UUBuxMRwSgKhR1iTDR/Jy+nosxoWhRA/NZxtTKvoePKKkT5waMN5Qy2YM5TtXSFnNXM=\" FormaPago=\"03\" NoCertificado=\"20001000000200000192\" Certificado=\"MIIERjCCAy6gAwIBAgIUMjAwMDEwMDAwMDAyMDAwMDAxOTIwDQYJKoZIhvcNAQEFBQAwggFcMRowGAYDVQQDDBFBLkMuIDIgZGUgcHJ1ZWJhczEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMTQwMgYJKoZIhvcNAQkCDCVSZXNwb25zYWJsZTogQXJhY2VsaSBHYW5kYXJhIEJhdXRpc3RhMB4XDTEyMTAyMjIwNDgwNloXDTE2MTAyMjIwNDgwNlowgcAxITAfBgNVBAMTGEVESVRPUklBTCBTSVNUQSBTQSBERSBDVjEhMB8GA1UEKRMYRURJVE9SSUFMIFNJU1RBIFNBIERFIENWMSEwHwYDVQQKExhFRElUT1JJQUwgU0lTVEEgU0EgREUgQ1YxJTAjBgNVBC0THEVTSTkyMDQyNzg4NiAvIEhFR1Q3NjEwMDM0UzIxHjAcBgNVBAUTFSAvIEhFR1Q3NjEwMDNNREZSTk4wOTEOMAwGA1UECxMFQW1pZ2EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAK6YqAg3LHOPpAKD9OFkcNgB5wj+3k4oHPK3bFfku4TCEswtMhIt5LnZCt4UK0cp9SYpKMa2kZVYm6k6zphWg9bzv3pvHwt9mB6kFGyApU71cOk16unqL2o/pDj65zNtUBfDyKkKBUGQMYgtqvVq6aXJipqKOS/NsDKEUt0q1ghTAgMBAAGjHTAbMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgbAMA0GCSqGSIb3DQEBBQUAA4IBAQCgCCpYDbmN8npLX6vHCEJAF/1G3KhuAGY48wVt1va1YXRy6yj+tJZ9HZ3l8TY7J6n10XkrbzedOArKyjdpfqWbNabZHw6b2IlSN8HrHliiAEor5hwTUJnkg6S1nm0mmirInxCmWoVV+qrEX/XHylJ+OjIql/GyZrH9sEPCY+LYFfVhO0U73jKqajMEeZtWYq5wro4UhPUhlYgwhlzUN6XNWtiC8ohjE6QJaf8jYRsJjHraZL257O1o5T/3ULMJhASN7R211FmyAuiYsq8H3buPE0kl+EmN8DUNpTDkB9Xf1ba6gXZ0PRXF1oGUwxvX9FiI5eIau2RLfy9AfJPcpAXN\" CondicionesDePago=\"CONTADO\" SubTotal=\"1850\" Descuento=\"175.00\" Moneda=\"MXN\" Total=\"1943.00\" TipoDeComprobante=\"I\" MetodoPago=\"PUE\" LugarExpedicion=\"68050\">\n <cfdi:Emisor Rfc=\"$rfc_emisor\" Nombre=\"FACTURACION MODERNA SA DE CV\" RegimenFiscal=\"601\"/>\n <cfdi:Receptor Rfc=\"XAXX010101000\" Nombre=\"PUBLICO EN GENERAL\" UsoCFDI=\"G01\"/>\n <cfdi:Conceptos>\n <cfdi:Concepto ClaveProdServ=\"01010101\" NoIdentificacion=\"AULOG001\" Cantidad=\"5\" ClaveUnidad=\"H87\" Unidad=\"Pieza\" Descripcion=\"Aurriculares USB Logitech\" ValorUnitario=\"350.00\" Importe=\"1750.00\" Descuento=\"175.00\">\n <cfdi:Impuestos>\n <cfdi:Traslados>\n <cfdi:Traslado Base=\"1575.00\" Impuesto=\"002\" TipoFactor=\"Tasa\" TasaOCuota=\"0.160000\" Importe=\"252.00\"/>\n </cfdi:Traslados>\n </cfdi:Impuestos>\n </cfdi:Concepto>\n <cfdi:Concepto ClaveProdServ=\"43201800\" NoIdentificacion=\"USB\" Cantidad=\"1\" ClaveUnidad=\"H87\" Unidad=\"Pieza\" Descripcion=\"Memoria USB 32gb marca Kingston\" ValorUnitario=\"100.00\" Importe=\"100.00\">\n <cfdi:Impuestos>\n <cfdi:Traslados>\n <cfdi:Traslado Base=\"100.00\" Impuesto=\"002\" TipoFactor=\"Tasa\" TasaOCuota=\"0.160000\" Importe=\"16.00\"/>\n </cfdi:Traslados>\n </cfdi:Impuestos>\n </cfdi:Concepto>\n </cfdi:Conceptos>\n <cfdi:Impuestos TotalImpuestosTrasladados=\"268.00\">\n <cfdi:Traslados>\n <cfdi:Traslado Impuesto=\"002\" TipoFactor=\"Tasa\" TasaOCuota=\"0.160000\" Importe=\"268.00\"/>\n </cfdi:Traslados>\n </cfdi:Impuestos>\n</cfdi:Comprobante>\nXML;\n return $cfdi;\n}", "title": "" }, { "docid": "8702ee7d34fbcbc5fcabd61c4b01866a", "score": "0.4669225", "text": "private function generateXml() {\n\n $xml = '<dte:GTDocumento xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" \n xmlns:dte=\"http://www.sat.gob.gt/dte/fel/0.2.0\" \n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n Version=\"0.1\" xsi:schemaLocation=\"http://www.sat.gob.gt/dte/fel/0.2.0 GT_Documento-0.2.0.xsd\">\n <dte:SAT ClaseDocumento=\"dte\">\n <dte:DTE ID=\"DatosCertificados\">\n <dte:DatosEmision ID=\"DatosEmision\">';\n \n \n //Datos Generales\n $xml .= \"<dte:DatosGenerales Tipo=\\\"\" . $this->tipo_documento . \"\\\" \" . ($this->es_exportacion ? \"Exp=\\\"SI\\\"\" : \"\") . \" \"\n . \"FechaHoraEmision=\\\"\" . $this->fechaHoraEmision . \"\\\" CodigoMoneda=\\\"\" . $this->codigoMoneda . \"\\\"\"\n . //\" NumeroAcceso=\\\"\\\" \".\n ($this->tipoPersoneria != null ? \" TipoPersoneria=\\\"\" . $this->tipoPersoneria . \"\\\" \" : \"\") . \"></dte:DatosGenerales>\";\n\n //Datos Emisor\n $xml .= \"<dte:Emisor NITEmisor=\\\"\" . $this->nit_emisor . \"\\\" \"\n . \"NombreEmisor=\\\"\" . $this->nombre_emisor . \"\\\" \"\n . \"CodigoEstablecimiento=\\\"\" . $this->codigo_establecimiento . \"\\\" \"\n . \"NombreComercial=\\\"\" . $this->nombre_comercial . \"\\\" \"\n . \"CorreoEmisor=\\\"\" . $this->correo_emisor . \"\\\" \"\n . \"AfiliacionIVA=\\\"\" . $this->afiliacion_iva_emisor . \"\\\">\";\n //Direccion Emisor\n $xml .= \"<dte:DireccionEmisor>\n <dte:Direccion>\" . $this->direccion_emisor . \"</dte:Direccion>\n <dte:CodigoPostal>\" . $this->codigo_postal_emisor . \"</dte:CodigoPostal>\n <dte:Municipio>\" . $this->municipio_emisor . \"</dte:Municipio>\n <dte:Departamento>\" . $this->departamento_emisor . \"</dte:Departamento>\n <dte:Pais>\" . $this->pais_emisor . \"</dte:Pais>\n </dte:DireccionEmisor>\";\n $xml .= \"</dte:Emisor>\";\n\n // . \"TipoEspecial=\\\"\" . ($this->es_cui ? \"CUI\" : \"EXT\") . \"\\\" \"\n //Datos Receptor\n $xml .= \"<dte:Receptor \"\n . \"IDReceptor=\\\"\" . $this->idReceptor . \"\\\" \"\n . \"NombreReceptor=\\\"\" . $this->nombre_receptor . \"\\\" \"\n . \"CorreoReceptor=\\\"\" . $this->correo_receptor . \"\\\">\";\n //Direccion Emisor\n $xml .= \"<dte:DireccionReceptor>\n <dte:Direccion>\" . $this->direccion_receptor . \"</dte:Direccion>\n <dte:CodigoPostal>\" . $this->codigo_postal_receptor . \"</dte:CodigoPostal>\n <dte:Municipio>\" . $this->municipio_receptor . \"</dte:Municipio>\n <dte:Departamento>\" . $this->departamento_receptor . \"</dte:Departamento>\n <dte:Pais>\" . $this->pais_receptor . \"</dte:Pais>\n </dte:DireccionReceptor>\";\n $xml .= \"</dte:Receptor>\";\n\n $xml .= '<dte:Frases>\n <dte:Frase CodigoEscenario=\"1\" TipoFrase=\"1\"></dte:Frase>\n </dte:Frases>';\n\n //ITEMS\n $xml .= \"<dte:Items>\";\n foreach ($this->items as $item) {\n $xml .= \"<dte:Item NumeroLinea=\\\"\" . $item->numero_linea . \"\\\" \"\n . \"BienOServicio=\\\"\" . ($item->es_servicio ? \"S\" : \"B\") . \"\\\">\n <dte:Cantidad>\" . $item->cantidad . \"</dte:Cantidad>\n <dte:UnidadMedida>UND</dte:UnidadMedida>\n <dte:Descripcion>\" . $item->descripcion . \"</dte:Descripcion>\n <dte:PrecioUnitario>\" . $item->precio_unitario . \"</dte:PrecioUnitario>\n <dte:Precio>\" . $item->precio . \"</dte:Precio>\";\n if ($item->descuento > 0) {\n $xml .= \"<dte:Descuento>\" . $item->descuento . \"</dte:Descuento>\";\n } else {\n $xml .= \"<dte:Descuento>0.0</dte:Descuento>\";\n }\n if (count($item->impuestos) > 0) {\n $xml .= \"<dte:Impuestos >\";\n foreach ($item->impuestos as $impuesto) {\n $xml .= \"<dte:Impuesto>\";\n $xml .= \"<dte:NombreCorto>\" . $impuesto[\"nombre_corto\"] . \"</dte:NombreCorto>\";\n $xml .= \"<dte:CodigoUnidadGravable>\" . $impuesto[\"codigo_unidad_gravable\"] . \"</dte:CodigoUnidadGravable>\";\n if ($impuesto[\"monto_gravable\"] > 0) {\n $xml .= \"<dte:MontoGravable>\" . $impuesto[\"monto_gravable\"] . \"</dte:MontoGravable>\";\n }\n if ($impuesto[\"unidades_gravables\"] > 0) {\n $xml .= \"<dte:CantidadUnidadesGravables>\" . $impuesto[\"unidades_gravables\"] . \"</dte:CantidadUnidadesGravables>\";\n }\n\n $xml .= \"<dte:MontoImpuesto>\" . $impuesto[\"monto_impuesto\"] . \"</dte:MontoImpuesto>\";\n $xml .= \"</dte:Impuesto>\";\n }\n $xml .= \"</dte:Impuestos>\";\n }\n\n $xml .= \"<dte:Total>\" . $item->total . \"</dte:Total>\"\n . \"</dte:Item>\";\n }\n $xml .= \"</dte:Items>\";\n $xml .= \"<dte:Totales>\";\n if (count($this->taxes) > 0) {\n $xml .= \"<dte:TotalImpuestos>\";\n foreach ($this->taxes as $tax) {\n $xml .= \"<dte:TotalImpuesto NombreCorto=\\\"\" . $tax[\"nombre_corto\"] . \"\\\" TotalMontoImpuesto=\\\"\" . $tax[\"monto_total\"] . \"\\\"></dte:TotalImpuesto>\";\n }\n $xml .= \"</dte:TotalImpuestos>\";\n }\n $xml .= \"<dte:GranTotal>\" . $this->granTotal . \"</dte:GranTotal>\n </dte:Totales>\";\n $xml .= \"\n </dte:DatosEmision>\n </dte:DTE>\n </dte:SAT></dte:GTDocumento>\";\n $dom = new DOMDocument();\n $dom->preserveWhiteSpace = FALSE;\n $dom->loadXML($xml);\n $dom->formatOutput = TRUE;\n $doc=$dom->saveXML();\n if($this->provider==self::PROVIDER_INFILE){\n $doc= str_replace(\"</dte:GTDocumento>\", \"\", $doc);\n }\n $this->xml = $doc;\n $this->base64xml = base64_encode($this->xml);\n }", "title": "" }, { "docid": "afa5ba54e4a03d07df4ef8b80ced6c0a", "score": "0.46454686", "text": "function do_enclose( $content, $post_ID ) {\n\t\tglobal $wpdb;\n\t\tinclude_once( ABSPATH . WPINC . '/class-IXR.php' );\n\n\t\t$log = debug_fopen( ABSPATH . 'enclosures.log', 'a' );\n\t\t$post_links = array();\n\t\tdebug_fwrite( $log, 'BEGIN ' . date( 'YmdHis', time() ) . \"\\n\" );\n\n\t\t$pung = get_enclosed( $post_ID );\n\n\t\t$ltrs = '\\w';\n\t\t$gunk = '/#~:.?+=&%@!\\-';\n\t\t$punc = '.:?\\-';\n\t\t$any = $ltrs . $gunk . $punc;\n\n\t\tpreg_match_all( \"{\\b http : [$any] +? (?= [$punc] * [^$any] | $)}x\", $content, $post_links_temp );\n\n\t\tdebug_fwrite( $log, 'Post contents:' );\n\t\tdebug_fwrite( $log, $content . \"\\n\" );\n\n\t\tforeach ( (array) $post_links_temp[0] as $link_test ) {\n\t\t\tif ( !in_array( $link_test, $pung ) ) { // If we haven't pung it already\n\t\t\t\t$test = parse_url( $link_test );\n\t\t\t\tif ( isset( $test['query'] ) )\n\t\t\t\t\t$post_links[] = $link_test;\n\t\t\t\telseif ( $test['path'] != '/' && $test['path'] != '' )\n\t\t\t\t\t$post_links[] = $link_test;\n\t\t\t}\n\t\t}\n\n\t\tforeach ( (array) $post_links as $url ) {\n\t\t\tif ( $url != '' && !$wpdb->get_var( $wpdb->prepare( \"SELECT post_id FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = 'enclosure' AND meta_value LIKE (%s)\", $post_ID, $url . '%' ) ) ) {\n\t\t\t\tif ( $headers = wp_get_http_headers( $url) ) {\n\t\t\t\t\t$len = (int) $headers['content-length'];\n\t\t\t\t\t$type = $headers['content-type'];\n\t\t\t\t\t$allowed_types = array( 'video', 'audio' );\n\t\t\t\t\tif ( in_array( substr( $type, 0, strpos( $type, \"/\" ) ), $allowed_types ) ) {\n\t\t\t\t\t\t$meta_value = \"$url\\n$len\\n$type\\n\";\n\t\t\t\t\t\t$wpdb->insert($wpdb->postmeta, array('post_id' => $post_ID, 'meta_key' => 'enclosure', 'meta_value' => $meta_value) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9bd6e1c36c70e61ab1e7f30617b14f71", "score": "0.46384346", "text": "function ricca3_shortcode_notesufloe($atts, $content = null) {\r\n\tglobal $wpdb;\r\n\tglobal $ricca3_butons_espec;\r\n\tglobal $ricca3_especalum;\r\n\t\r\n//\tdump_r($_POST);\r\n\t\r\n\t$dades_any=$wpdb->get_row('SELECT * FROM ricca3_any WHERE actual=1', ARRAY_A, 0);\r\n\tricca3_missatge(__('Notes Unitats Formatives LOE','ricca3-dades'));\r\n\t$ricca3_butons_espec['texte'][0] = __('ajuda-dades-dades', 'ricca3-dades');\r\n//\t\tbutons\r\n\tricca3_butons( $ricca3_butons_espec, 6 );\r\n\t\r\n\tif( !isset( $_GET['ID'] ) ) return '';\r\n\r\n#############################################\r\n// \tnavegació endevant i enrere\r\n#############################################\r\n\t$query= $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne=%s AND idany=%s', $_GET['ID'], $dades_any['idany']);\r\n\t$data_alumne= $wpdb->get_row($query,ARRAY_A,0);\r\n\t$query= $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idespecialitat=%s AND idany=%s AND idestat_es=1 ', $data_alumne['idespecialitat'], $data_alumne['idany']);\r\n\t$dades = $wpdb->get_results( $query, ARRAY_A );\r\n\t\r\n//\tdump_r($dades);\r\n\t\r\n\tfor( $i=0; $i < count($dades); $i++){\r\n\t\tif( $dades[$i]['idalumne'] == $_GET['ID']){\r\n\t\t\t$ara = $i;\r\n\t\t\t$despr = $i + 1;\r\n\t\t\t$abans = $i - 1;\r\n\t\t\tif( $despr > count($dades) - 1) $despr = 0;\r\n\t\t\tif( $abans == -1) $abans = count($dades) - 1 ;\r\n\t\t\t$row_abans = $wpdb->get_row( $query, ARRAY_A, $abans);\r\n\t\t\t$row_despr = $wpdb->get_row( $query, ARRAY_A, $despr);\r\n\t\t\t\r\n//\t\t\tdump_r($row_abans);\r\n//\t\t\tdump_r($row_despr);\r\n\t\t\t\r\n\t\t\tprintf('<table width=\"100%%\"><tr><td align=\"left\"> <a href=\"%s/%s?ID=%s\"><img src=\"%s/ricca3/imatges/ricca3-anterior.png\" border=0 \" /></a></td>',\r\n\t\t\tsite_url(), 'ricca3-notesufloe', $row_abans['idalumne'], WP_PLUGIN_URL);\r\n\t\t\tprintf(' <td align=\"left\"> <a href=\"%s/%s?ID=%s\"><img src=\"%s/ricca3/imatges/ricca3-seguent.png\" border=0 \" /></a></td></tr></table>',\r\n\t\t\tsite_url(), 'ricca3-notesufloe', $row_despr['idalumne'], WP_PLUGIN_URL);\r\n\t\t}\r\n\t}\r\n#############################################\t\r\n\t\r\n//\t\tbuscar les dades del alumne\r\n\t$row_alu = $wpdb->get_row($wpdb->prepare('SELECT * FROM ricca3_alumne WHERE idalumne=%s', $_GET['ID']), ARRAY_A, 0);\r\n\t$image_attributes = ricca3_miniatura($_GET['ID']);\r\n//\t\tmissatge de capçalera de la pàgina\r\n\tricca3_missatge(sprintf('%s %s</td><td><img src=\"%s\" width=\"%s\" height=\"%s\">',__('Especialitats de l\\'alumne','ricca3-alum'), $row_alu['cognomsinom'], $image_attributes[0], $image_attributes[1], $image_attributes[2] ));\r\n\t$token = array( 'espec' => $_GET['espec'], 'grup' => $_GET['grup'], 'any' => $_GET['any'], 'estat' => $_GET['estat'], 'repe' => $_GET['repe']);\r\n//\t\tbuscar especialitats\r\n\t$data_view = $wpdb->get_results( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne = %s ORDER BY idany ',$_GET['ID']), ARRAY_A);\r\n//\t\tllistat de les especialitats del alumne\r\n\tricca3_graella( $ricca3_especalum, $data_view, $token );\r\n\tprintf('</table></form>', NULL);\r\n\t\r\n\t$idespec = $wpdb->get_row( $wpdb->prepare('SELECT DISTINCT idespecialitat FROM ricca3_alumespec_view WHERE idalumne=%s AND idestat_es=1 AND (idespecialitat = 10 or idespecialitat = 11) ', $_GET['ID']), ARRAY_A, 0);\r\n\t$row_espec = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne=%s AND idespecialitat=%s', $_GET['ID'], $idespec['idespecialitat']), ARRAY_A, 0);\r\n\t$nom = str_word_count($row_espec['nomespecialitat'], 1, 'ÀÈÒÓ');\r\n\t$query_cred = $wpdb->prepare('SELECT * FROM ricca3_credits_avaluacions '.\r\n\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp=ricca3_credits_avaluacions.idccomp '.\r\n\t\t\t'INNER JOIN ricca3_credits ON ricca3_credits.idcredit = ricca3_ccomp.idcredit '.\r\n\t\t\t'INNER JOIN ricca3_especialitats ON ricca3_especialitats.idespecialitat = ricca3_credits.idespecialitat '.\r\n\t\t\t'INNER JOIN ricca3_grups ON ricca3_grups.idgrup = ricca3_ccomp.idgrup '.\r\n\t\t\t'INNER JOIN ricca3_any ON ricca3_any.idany = ricca3_credits_avaluacions.idany '.\r\n\t\t\t'INNER JOIN ricca3_professors ON ricca3_professors.idprof = ricca3_ccomp.idprofessor '.\r\n\t\t\t'WHERE idalumne=%s AND ricca3_credits.idespecialitat=%s '.\r\n\t\t\t'ORDER BY ordre_cr, ricca3_credits_avaluacions.idccomp, ricca3_credits_avaluacions.idany ', $_GET['ID'], $idespec['idespecialitat']);\r\n\t$data_cred = $wpdb->get_results( $query_cred, ARRAY_A);\r\n\t\r\n//\tdump_r($data_cred);\r\n\t\r\n//\t\tMirar si ja te UF creades\r\n\t$dades_uf= $wpdb->get_results($wpdb->prepare('SELECT * from ricca3_loe_alumnes WHERE idalumne=%s', $_GET['ID']), ARRAY_A);\r\n\tif(count($dades_uf)==0){\r\n\t\t$dades_loeuf=$wpdb->get_results($wpdb->prepare('SELECT * from ricca3_loe_uf WHERE idespecialitat=%s ORDER BY modul', $idespec['idespecialitat']), ARRAY_A);\r\n\t\tfor($k=0; $k< count($dades_loeuf); $k++){\r\n\t\t\t$wpdb->insert('ricca3_loe_alumnes',\r\n\t\t\t\t\tarray(\t'idalumne'\t=> $_GET['ID'],\r\n\t\t\t\t\t\t\t'iduf'\t\t=> $dades_loeuf[$k]['iduf'],\r\n\t\t\t\t\t\t\t'nota'\t\t=> '',\r\n\t\t\t\t\t\t\t'idany_uf'\t=> $dades_any['idany']\r\n\t\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\t}\r\n//\t\r\n\tif (isset($_POST['accio']) && $_POST['accio']=='actualitzarufloe'){\r\n\t\tfor( $i=0; $i < count( $_POST['notauf']); $i++ ){\r\n\t\t\t\r\n\t\t\t$result = ricca3_dbupdate('ricca3_loe_alumnes',\r\n\t\t\t\t\tarray( 'nota' => $_POST['notauf'][$i]),\r\n\t\t\t\t\tarray( 'idloe' => $_POST['idloe'][$i]) );\r\n\t\t}\r\n\t}\r\n//\t\r\n\tprintf('<form method=\"post\" action=\"\" target=\"_self\" name=\"notauf\" id=\"notauf\"><table>');\r\n//\tmostrem la capçalera de la graella amb les ajudes\r\n\tprintf( '<tr><th>Grup</th><th></th><th>MODUL/UF</th><th></th><th>hores UF</th><th>Aval</th><th>Professor</th>'.\r\n\t\t\t'<th>Nota</th><th></th><th></th><th></th><th>NF</th><th></th><th></th><th></th><th>Hores</th></tr>', NULL);\t\r\n\t$z=0;\r\n\tfor( $j=0; $j < count($data_cred); $j++ ){\r\n//\tsi el crèdit es actiu per aquest any mostrem la convocatoria en negretes\r\n\t\t$conv = $data_cred[$j]['convord'];\r\n\t\tif($data_cred[$j]['conv'] == $row_any['conv']) $conv = sprintf('<b>%s</b>', $data_cred[$j]['convord']);\r\n//\r\n\t\t$repeteix = $data_cred[$j]['repe'];\r\n\t\tif($data_cred[$j]['repe'] =='R') $repeteix = '<b>*</b>';\r\n//\tmostrem els resultats a la linea de la graella\r\n//\tsi es un credit nou a la graella, mostrem el grup, el nom del crèdit, la nota final de credit i les hores\r\n\t\tif( $j == 0 || $data_cred[$j]['idcredit'] != $data_cred[$j-1]['idcredit']){\r\n//\tbusquem la ultima entrada del crèdit per esbrinar la nota final del credit\r\n\t\t\t$row_nota = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ricca3_credits_avaluacions '.\r\n\t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp=ricca3_credits_avaluacions.idccomp '.\r\n\t\t\t\t\t\t'WHERE idalumne=%s AND idcredit=%s ORDER by idany DESC ',\r\n\t\t\t\t\t\t$_GET['ID'], $data_cred[$j]['idcredit']), ARRAY_A, 0);\r\n\t\t\t$nota = $row_nota['notaf_cr'];\r\n//\tmostrem la linea inicial del crèdit\r\n\t\t\t$pendi='';\r\n\t\t\tif( $data_cred[$j]['pendi'] == 'P') $pendi='P';\r\n\t\t\tprintf('<tr class=\"credit\"><td>%s</td><td>%s</td><td colspan=\"2\"><b>%s</b></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><b>%s</b></td><td><b>%s</b></td><td></td><td></td><td>%s</td></tr>',\r\n\t\t\t\t$data_cred[$j]['grup'], '<b>===></b>', $data_cred[$j]['nomcredit'], $nota, $pendi, $data_cred[$j]['hores_cr']);\r\n\t\t\t$query=$wpdb->prepare('SELECT * from ricca3_loe_uf WHERE idcredit=%s ORDER BY uf, aval', $data_cred[$j]['idcredit']);\r\n\t\t\t$dades_loeuf=$wpdb->get_results($query, ARRAY_A);\r\n\t\t\t\r\n//\t\t\techo(count($dades_loeuf));\r\n//\tmostrem les UF\r\n\t\t\tfor($k=0;$k<count($dades_loeuf); $k++){\r\n\t\t\t\t$dades_prof=$wpdb->get_row( $wpdb->prepare('SELECT * from ricca3_professors WHERE idprof=%s', $dades_loeuf[$k]['prof']), ARRAY_A, 0);\r\n\t\t\t\t$dades_notauf=$wpdb->get_row( $wpdb->prepare('SELECT * from ricca3_loe_alumnes WHERE idalumne=%s AND iduf=%s', $_GET['ID'], $dades_loeuf[$k]['iduf']), ARRAY_A, 0);\r\n\t\t\t\t\r\n\t\t\t\tprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td></td><td>%s hores</td><td>%s aval</td><td>%s</td>',\r\n\t\t\t\t\t$dades_notauf['idloe'], $dades_loeuf[$k]['uf'], $dades_loeuf[$k]['ufnom'],$dades_loeuf[$k]['ufchores'], $dades_loeuf[$k]['aval'], $dades_prof['nomicognoms']);\r\n\t\t\t\t \r\n\t\t\t\tprintf('<td><INPUT type=\"text\" size=\"5\" name=\"notauf[%s]\" value=\"%s\" /></td>',$z, $dades_notauf['nota']);\r\n\t\t\t\tprintf('<td><input type=\"hidden\" name=\"idloe[%s]\" value=\"%s\" /></td>', $z, $dades_notauf['idloe']);\r\n\t\t\t\tprintf('<td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>', NULL);\r\n\t\t\t\t$z++;\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t}\r\n\tprintf('</table>', NULL);\r\n\tricca3_desar('accio', 'actualitzarufloe', __('ajuda-tab-credits-tots-desar', 'ricca3-alum'));\r\n\tprintf('</td></tr></table></form>', NULL);\r\n//\tprintf('</table></form>', NULL);\r\n\t\r\n}", "title": "" }, { "docid": "dd19444aa566e5d86071cc65d6b9c988", "score": "0.46374142", "text": "public function ips_editor($form_field=\"\",$initial_content=\"\",$images_path=\"\",$rte_mode=0,$editor_id='ed-0',$smilies='') {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$this->settings['extraJsModules']\t.= \",editor\";\n$bbcodes \t\t\t\t\t\t\t= IPSLib::fetchBbcodeAsJson();\n$show_sidebar\t\t\t\t\t\t= IPSCookie::get('emoticon_sidebar');\n$show_sidebar_class \t\t\t\t= $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'with_sidebar' : '';\n$show_sidebar_style\t\t\t\t\t= $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? '' : \"style='display:none'\";\n$show_sidebar_link\t\t\t\t\t= $show_sidebar && $this->settings['_remove_emoticons'] == 0 ? 'true' : 'false';\n\n$IPBHTML .= <<<EOF\n\t<!--top-->\n\t<input type='hidden' name='{$editor_id}_wysiwyg_used' id='{$editor_id}_wysiwyg_used' value='0' />\n\t<input type='hidden' name='editor_ids[]' value='{$editor_id}' />\n\t<div class='ips_editor {$show_sidebar_class}' id='editor_{$editor_id}'>\nEOF;\n\tif( $this->settings['_remove_emoticons'] == 0 )\n\t{\n\t\t$IPBHTML .= <<<EOF\n\t\t<div class='sidebar row1 altrow' id='{$editor_id}_sidebar' {$show_sidebar_style}>\n\t\t\t<h4><img src='{$this->settings['img_url']}/close_popup.png' alt='{$this->lang->words['icon']}' id='{$editor_id}_close_sidebar' /><span>{$this->lang->words['emoticons_template_title']}</span></h4>\n\t\t\t<div id='{$editor_id}_emoticon_holder' class='emoticon_holder'></div>\n\t\t\t<div class='show_all_emoticons' id='{$editor_id}_showall_bar'>\n\t\t\t\t<input type='button' value='{$this->lang->words['show_all_emotes']}' id='{$editor_id}_showall_emoticons' class='input_submit emoticons' />\n\t\t\t</div>\n\t\t</div>\nEOF;\n\t}\n\t\n\t$IPBHTML .= <<<EOF\n\t\t<div id='{$editor_id}_controls' class='controls'>\n\t\t\t<ul id='{$editor_id}_toolbar_1' class='toolbar' style='display: none'>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_removeformat' class='rte_control rte_button' title='{$this->lang->words['js_tt_noformat']}'><img src='{$this->settings['img_url']}/rte_icons/remove_formatting.png' alt='{$this->lang->words['js_tt_noformat']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_togglesource' class='rte_control rte_button' title='{$this->lang->words['js_tt_htmlsource']}'><img src='{$this->settings['img_url']}/rte_icons/toggle_source.png' alt='{$this->lang->words['js_tt_htmlsource']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_otherstyles' class='rte_control rte_menu rte_special' title='{$this->lang->words['box_other_desc']}' style='display: none'>{$this->lang->words['box_other']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_fontname' class='rte_control rte_menu rte_font' title='{$this->lang->words['box_font_desc']}'>{$this->lang->words['box_font']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_fontsize' class='rte_control rte_menu rte_fontsize' title='{$this->lang->words['box_size_desc']}'>{$this->lang->words['box_size']}</span>\n\t\t\t\t</li>\n\t\t\t\t<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_forecolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_font_col']}'><img src='{$this->settings['img_url']}/rte_icons/font_color.png' alt='{$this->lang->words['js_tt_font_col']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<!--<li class='left'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_backcolor' class='rte_control rte_palette' title='{$this->lang->words['js_tt_back_col']}'><img src='{$this->settings['img_url']}/rte_icons/background_color.png' alt='{$this->lang->words['js_tt_back_col']}' /></span>\n\t\t\t\t</li>-->\n\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_spellcheck' class='rte_control rte_button' title='{$this->lang->words['js_tt_spellcheck']}'><img src='{$this->settings['img_url']}/rte_icons/spellcheck.png' alt='{$this->lang->words['js_tt_spellcheck']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_r_small' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizesmall']}'><img src='{$this->settings['img_url']}/rte_icons/resize_small.png' alt='{$this->lang->words['js_tt_resizesmall']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_r_big' class='rte_control rte_button' title='{$this->lang->words['js_tt_resizebig']}'><img src='{$this->settings['img_url']}/rte_icons/resize_big.png' alt='{$this->lang->words['js_tt_resizebig']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_help' class='rte_control rte_button' title='{$this->lang->words['js_tt_help']}'><a href='{$this->settings['board_url']}/index.php?app=forums&amp;module=extras&amp;section=legends&amp;do=bbcode' title='{$this->lang->words['js_tt_help']}'><img src='{$this->settings['img_url']}/rte_icons/help.png' alt='{$this->lang->words['js_tt_help']}' /></a></span>\n\t\t\t\t</li>\t\t\t\n\t\t\t\t<li class='right sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_undo' class='rte_control rte_button' title='{$this->lang->words['js_tt_undo']}'><img src='{$this->settings['img_url']}/rte_icons/undo.png' alt='{$this->lang->words['js_tt_undo']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_redo' class='rte_control rte_button' title='{$this->lang->words['js_tt_redo']}'><img src='{$this->settings['img_url']}/rte_icons/redo.png' alt='{$this->lang->words['js_tt_redo']}' /></span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<ul id='{$editor_id}_toolbar_2' class='toolbar' style='display: none'>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_bold' class='rte_control rte_button' title='{$this->lang->words['js_tt_bold']}'><img src='{$this->settings['img_url']}/rte_icons/bold.png' alt='{$this->lang->words['js_tt_bold']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_italic' class='rte_control rte_button' title='{$this->lang->words['js_tt_italic']}'><img src='{$this->settings['img_url']}/rte_icons/italic.png' alt='{$this->lang->words['js_tt_italic']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_underline' class='rte_control rte_button' title='{$this->lang->words['js_tt_underline']}'><img src='{$this->settings['img_url']}/rte_icons/underline.png' alt='{$this->lang->words['js_tt_underline']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_strikethrough' class='rte_control rte_button' title='{$this->lang->words['js_tt_strike']}'><img src='{$this->settings['img_url']}/rte_icons/strike.png' alt='{$this->lang->words['js_tt_strike']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_subscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sub']}'><img src='{$this->settings['img_url']}/rte_icons/subscript.png' alt='{$this->lang->words['js_tt_sub']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_superscript' class='rte_control rte_button' title='{$this->lang->words['js_tt_sup']}'><img src='{$this->settings['img_url']}/rte_icons/superscript.png' alt='{$this->lang->words['js_tt_sup']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_insertunorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/unordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_insertorderedlist' class='rte_control rte_button' title='{$this->lang->words['js_tt_list']}'><img src='{$this->settings['img_url']}/rte_icons/ordered_list.png' alt='{$this->lang->words['js_tt_list']}' /></span>\n\t\t\t\t</li>\nEOF;\n\n\t\t\tif( $this->settings['_remove_emoticons'] == 0 )\n\t\t\t{\n$IPBHTML .= <<<EOF\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_emoticons' class='rte_control rte_button' title='{$this->lang->words['js_tt_emoticons']}'><img src='{$this->settings['img_url']}/rte_icons/emoticons.png' alt='{$this->lang->words['js_tt_emoticons']}' /></span>\n\t\t\t\t</li>\nEOF;\n\t\t\t}\n\n$IPBHTML .= <<<EOF\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_link' class='rte_control rte_palette' title='{$this->lang->words['js_tt_link']}'><img src='{$this->settings['img_url']}/rte_icons/link.png' alt='{$this->lang->words['js_tt_link']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_image' class='rte_control rte_palette' title='{$this->lang->words['js_tt_image']}'><img src='{$this->settings['img_url']}/rte_icons/picture.png' alt='{$this->lang->words['js_tt_image']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_email' class='rte_control rte_palette' title='{$this->lang->words['js_tt_email']}'><img src='{$this->settings['img_url']}/rte_icons/email.png' alt='{$this->lang->words['js_tt_email']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_ipb_quote' class='rte_control rte_button' title='{$this->lang->words['js_tt_quote']}'><img src='{$this->settings['img_url']}/rte_icons/quote.png' alt='{$this->lang->words['js_tt_quote']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_ipb_code' class='rte_control rte_button' title='{$this->lang->words['js_tt_code']}'><img src='{$this->settings['img_url']}/rte_icons/code.png' alt='{$this->lang->words['js_tt_code']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<span id='{$editor_id}_cmd_media' class='rte_control rte_palette' title='{$this->lang->words['js_tt_media']}'><img src='{$this->settings['img_url']}/rte_icons/media.png' alt='{$this->lang->words['js_tt_media']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_justifyright' class='rte_control rte_button' title='{$this->lang->words['js_tt_right']}'><img src='{$this->settings['img_url']}/rte_icons/align_right.png' alt='{$this->lang->words['js_tt_right']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_justifycenter' class='rte_control rte_button' title='{$this->lang->words['js_tt_center']}'><img src='{$this->settings['img_url']}/rte_icons/align_center.png' alt='{$this->lang->words['js_tt_center']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_justifyleft' class='rte_control rte_button' title='{$this->lang->words['js_tt_left']}'><img src='{$this->settings['img_url']}/rte_icons/align_left.png' alt='{$this->lang->words['js_tt_left']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right sep'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_indent' class='rte_control rte_button' title='{$this->lang->words['js_tt_indent']}'><img src='{$this->settings['img_url']}/rte_icons/indent.png' alt='{$this->lang->words['js_tt_indent']}' /></span>\n\t\t\t\t</li>\n\t\t\t\t<li class='right'>\n\t\t\t\t\t<span id='{$editor_id}_cmd_outdent' class='rte_control rte_button' title='{$this->lang->words['js_tt_outdent']}'><img src='{$this->settings['img_url']}/rte_icons/outdent.png' alt='{$this->lang->words['js_tt_outdent']}' /></span>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t\t<div id='{$editor_id}_wrap' class='editor'>\n\t\t\t<textarea name=\"{$form_field}\" class=\"input_rte\" id=\"{$editor_id}_textarea\" rows=\"10\" cols=\"60\" tabindex=\"0\">{$initial_content}</textarea>\n\t\t</div>\n\t</div>\n\n\t<!-- Toolpanes -->\n\t<script type=\"text/javascript\">\n\t//<![CDATA[\n\t$('{$editor_id}_toolbar_1').show();\n\t$('{$editor_id}_toolbar_2').show();\n\t// Rikki: Had to remove <form>... </form> because Opera would see </form> and not pass the topic icons / hidden fields properly. Tried \"</\" + \"form>\" but when it is parsed, it had the same affect\n\tipb.editor_values.get('templates')['link'] = new Template(\"<label for='#{id}_url'>{$this->lang->words['js_template_url']}</label><input type='text' class='input_text' id='#{id}_url' value='http://' tabindex='10' /><label for='#{id}_urltext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_urltext' value='{$this->lang->words['js_template_default']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_link']}' tabindex='12' />\");\n\n\tipb.editor_values.get('templates')['image'] = new Template(\"<label for='#{id}_img'>{$this->lang->words['js_template_imageurl']}</label><input type='text' class='input_text' id='#{id}_img' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_img']}' tabindex='11' />\");\n\n\tipb.editor_values.get('templates')['email'] = new Template(\"<label for='#{id}_email'>{$this->lang->words['js_template_email_url']}</label><input type='text' class='input_text' id='#{id}_email' tabindex='10' /><label for='#{id}_emailtext'>{$this->lang->words['js_template_link']}</label><input type='text' class='input_text _select' id='#{id}_emailtext' value='{$this->lang->words['js_template_email_me']}' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_email']}' tabindex='12' />\");\n\n\tipb.editor_values.get('templates')['media'] = new Template(\"<label for='#{id}_media'>{$this->lang->words['js_template_media_url']}</label><input type='text' class='input_text' id='#{id}_media' value='http://' tabindex='10' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_insert_media']}' tabindex='11' />\");\n\n\tipb.editor_values.get('templates')['generic'] = new Template(\"<div class='rte_title'>#{title}</div><strong>{$this->lang->words['js_template_example']}</strong><pre>#{example}</pre><label for='#{id}_option' class='optional'>#{option_text}</label><input type='text' class='input_text optional' id='#{id}_option' tabindex='10' /><label for='#{id}_text' class='tagcontent'>#{value_text}</label><input type='text' class='input_text _select tagcontent' id='#{id}_text' tabindex='11' /><input type='submit' class='input_submit' value='{$this->lang->words['js_template_add']}' tabindex='12' />\");\n\n\tipb.editor_values.get('templates')['toolbar'] = new Template(\"<ul id='#{id}_toolbar_#{toolbarid}' class='toolbar' style='display: none'>#{content}</ul>\");\n\n\tipb.editor_values.get('templates')['button'] = new Template(\"<li><span id='#{id}_cmd_custom_#{cmd}' class='rte_control rte_button specialitem' title='#{title}'><img src='{$this->settings['img_url']}/rte_icons/#{img}' alt='{$this->lang->words['icon']}' /></span></li>\");\n\n\tipb.editor_values.get('templates')['menu_item'] = new Template(\"<li id='#{id}_cmd_custom_#{cmd}' class='specialitem clickable'>#{title}</li>\");\n\n\tipb.editor_values.get('templates')['togglesource'] = new Template(\"<fieldset id='#{id}_ts_controls' class='submit' style='text-align: left'><input type='button' class='input_submit' value='{$this->lang->words['js_template_update']}' id='#{id}_ts_update' />&nbsp;&nbsp;&nbsp; <a href='#' id='#{id}_ts_cancel' class='cancel'>{$this->lang->words['js_template_cancel_source']}</a></fieldset>\");\n\n\tipb.editor_values.get('templates')['emoticons_showall'] = new Template(\"<input class='input_submit emoticons' type='button' id='#{id}_all_emoticons' value='{$this->lang->words['show_all_emoticons']}' />\");\n\n\tipb.editor_values.get('templates')['emoticon_wrapper'] = new Template(\"<h4><span>{$this->lang->words['emoticons_template_title']}</span></h4><div id='#{id}_emoticon_holder' class='emoticon_holder'></div>\");\n\n\t// Add smilies into the mix\n\tipb.editor_values.set( 'show_emoticon_link', true );\n\tipb.editor_values.set( 'emoticons', \\$H({ $smilies }) );\n\tipb.editor_values.set( 'bbcodes', \\$H( $bbcodes ) );\n\n\tipb.vars['emoticon_url'] = \"{$this->settings['emoticons_url']}\";\n\n\tEvent.observe(window, 'load', function(e){\n\t\tipb.editors[ '{$editor_id}' ] = new ipb.editor( '{$editor_id}', USE_RTE );\n\t});\n\n\t//]]>\n\t</script>\n\nEOF;\n//--endhtml--//\nreturn $IPBHTML;\n}", "title": "" }, { "docid": "5a63b64a1542e9dd3ec100a0c6822a05", "score": "0.46230817", "text": "function lib4ridora_get_embargo_data( $relsIntCode, $dsPdfAry ) {\t\t// $dsPdfAry may be: array( 'PDF2', 'PDF', 'PDF_PDF-A', 'PDF2_PDF-A' )\n\n\t// very important: the array we are going to return must have as many key as there were items inside the input array!\n\t$dataAry = array_flip($dsPdfAry);\n\n\t// DOM/XML tweak (to help with minus signs and colons):\n\t$repList = array( \"rdf_\" => \"rdf:\", \"dora_lib4ri\" => \"dora:lib4ri\", \"_multi_embargo_\" => \"-multi-embargo-\" );\n\tforeach( $repList as $new => $orig ) { $relsIntCode = str_replace($orig,$new,$relsIntCode); }\n\n\t$xmlObj = new SimpleXMLElement($relsIntCode);\n\t\n\t// now going through RELS-INT looking for information about the PDF datastreams:\n\tforeach($xmlObj->rdf_Description as $dIdx => $dElem ) {\n\t\tif ( $dsLink = @strval( $dElem->attributes()->rdf_about ) ) {\t\t// someting like info:fedora/eawag:156/PDF\"\n\t\t\t$dsPos = empty($pid) ? (strrpos($dsLink,\"/\")+1) : (stripos($dsLink,$pid)+strlen($pid)+1);\n\t\t\t$dsId = substr($dsLink,$dsPos);\n\t\t\tforeach( $dsPdfAry as $dsPdfIdx => $dsPdfName ) {\t\t// $dsName may be e.g. 'PDF2' or 'PDF_PDF-A'\n\t\t\t\tif ( $dsPdfName == $dsId ) {\n\t\t\t\t\t// remind, a replacement happened above, so do not use 'lib4ridora-multi-embargo-document_version' or 'lib4ridora-multi-embargo-availability' here!\n\t\t\t\t\t$dataAry[$dsPdfName] = array(\n\t\t\t\t\t\t'document_version' => strval($dElem->islandora_lib4ridora_multi_embargo_document_version),\n\t\t\t\t\t\t'availability' => strval($dElem->islandora_lib4ridora_multi_embargo_availability),\n\t\t\t\t\t);\n\t\t\t\t\tunset($dsPdfAry[$dsPdfIdx]);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $dataAry;\t\t// array( 'PDF' => array( 'document_version' => \"Published\", 'availability' => \"intranet\"), 'PDF2' => array...\n}", "title": "" }, { "docid": "84166c78aac718811f4cdb9d30d4f0ae", "score": "0.46183965", "text": "function __construct ( ) {\r\n \t\t$this->genEnvoi ( ) ;\r\n \t}", "title": "" }, { "docid": "061a84553792252164e9a9ea30afa58e", "score": "0.46050465", "text": "function generateInvocationCode()\n {\n $aComments['Comment'] = $this->translate(\"\n * If iFrames are not supported by the viewer's browser, then this\n * tag only shows image banners. There is no width or height in these\n * banners, so if you want these tags to allocate space for the ad\n * before it shows, you will need to add this information to the <img>\n * tag.\");\n parent::prepareCommonInvocationData($aComments);\n\n $conf = $GLOBALS['_MAX']['CONF'];\n $mi = &$this->maxInvocation;\n $buffer = $mi->buffer;\n $uniqueid = 'a'.substr(md5(uniqid('', 1)), 0, 7);\n\n if (!isset($mi->iframetracking) || $mi->iframetracking == 1) {\n // Add n as first parameter\n array_unshift($mi->parameters, \"{$conf['var']['n']}={$uniqueid}\");\n }\n\n if (isset($mi->refresh) && $mi->refresh != '') {\n if (is_array($mi->parameters)) {\n $mi->parameters = array('refresh' => \"refresh=\".$mi->refresh) + $mi->parameters;\n } else {\n $mi->parameters['refresh'] = \"refresh=\".$mi->refresh;\n }\n }\n if (isset($mi->resize) && $mi->resize == '1') {\n if (is_array($mi->parameters)) {\n $mi->parameters = array('resize' => \"resize=1\") + $mi->parameters;\n } else {\n $mi->parameters['resize'] = \"resize=1\";\n }\n }\n\n if (empty($mi->frame_width )) { $mi->frame_width = $mi->width; }\n if (empty($mi->frame_height)) { $mi->frame_height = $mi->height; }\n\t$host = $_SERVER['HTTP_HOST'];\n\t$filepath = $host. \"/plugins/invocationTags/oxInvocationTags/handset.php\";\n\n $buffer .= \"<iframe id='{$uniqueid}' name='{$uniqueid}' src='http://\".$filepath;\n// $buffer .= \"<iframe id='{$uniqueid}' name='{$uniqueid}' src='\".MAX_commonConstructDeliveryUrl($conf['file']['frame']);\n if (sizeof($mi->parameters) > 0) {\n $buffer .= \"?\".implode (\"&amp;\", $mi->parameters);\n }\n $buffer .= \"&amp;indicator=\". OA_Permission::getUserId();\n $buffer .= \"&amp;phpfile=afr.php\";\n $buffer .= \"' framespacing='0' frameborder='no' scrolling='no'\";\n if (isset($mi->frame_width) && $mi->frame_width != '' && $mi->frame_width != '-1') {\n $buffer .= \" width='\".$mi->frame_width.\"'\";\n }\n if (isset($mi->frame_height) && $mi->frame_height != '' && $mi->frame_height != '-1') {\n $buffer .= \" height='\".$mi->frame_height.\"'\";\n }\n if (isset($mi->transparent) && $mi->transparent == '1') {\n $buffer .= \" allowtransparency='true'\";\n }\n $buffer .= \">\";\n if (isset($mi->refresh) && $mi->refresh != '') {\n unset ($mi->parameters['refresh']);\n }\n if (isset($mi->resize) && $mi->resize == '1') {\n unset ($mi->parameters['resize']);\n }\n\n if (isset($mi->ilayer) && $mi->ilayer == 1 && isset($mi->frame_width) && $mi->frame_width != '' && $mi->frame_width != '-1' && isset($mi->frame_height) && $mi->frame_height != '' && $mi->frame_height != '-1') {\n $buffer .= \"<script type='text/javascript'>\\n\";\n $buffer .= \"<!--// <![CDATA[\\n\";\n $buffer .= \" document.write (\\\"<nolayer>\\\");\\n\";\n $buffer .= \" document.write (\\\"{$mi->backupImage}\\\");\\n\";\n $buffer .= \" document.write (\\\"</nolayer>\\\");\\n\";\n $buffer .= \" document.write (\\\"<ilayer id='layer\".$uniqueid.\"' visibility='hidden' width='\".$mi->frame_width.\"' height='\".$mi->frame_height.\"'></ilayer>\\\");\\n\";\n $buffer .= \"// ]]> -->\\n\";\n $buffer .= \"</script>\";\n $buffer .= \"<noscript>\\n <a href='\".MAX_commonConstructDeliveryUrl($conf['file']['click']);\n $buffer .= \"?n=\".$uniqueid;\n $buffer .= \"'\";\n if (isset($mi->target) && $mi->target != '') {\n $buffer .= \" target='$mi->target'\";\n }\n $buffer .= \">\\n <img src='\".MAX_commonConstructDeliveryUrl($conf['file']['view']);\n if (sizeof($mi->parameters) > 0) {\n $buffer .= \"?\".implode (\"&\", $mi->parameters);\n }\n $buffer .= \"' border='0' alt='' /></a></noscript>\";\n } else {\n $buffer .= $mi->backupImage;\n }\n $buffer .= \"</iframe>\\n\";\n\n if (isset($mi->target) && $mi->target != '') {\n $mi->parameters['target'] = \"target=\".urlencode($mi->target);\n }\n if (isset($mi->ilayer) && $mi->ilayer == 1 && isset($mi->frame_width) && $mi->frame_width != '' && $mi->frame_width != '-1' && isset($mi->frame_height) && $mi->frame_height != '' && $mi->frame_height != '-1') {\n // Do no rewrite target frames\n $mi->parameters['rewrite'] = 'rewrite=0';\n $buffer .= \"\\n\\n\";\n $buffer .= \"<!-- \" . $this->translate(\"Placement Comment\") . \" -->\\n\";\n $buffer .= \"<layer src='\".MAX_commonConstructDeliveryUrl($conf['file']['frame']);\n $buffer .= \"?n=\".$uniqueid;\n if (sizeof($mi->parameters) > 0) {\n $buffer .= \"&\".implode (\"&\", $mi->parameters);\n }\n $buffer .= \"' width='\".$mi->frame_width.\"' height='\".$mi->frame_height.\"' visibility='hidden' onload=\\\"moveToAbsolute(layer\".$uniqueid.\".pageX,layer\".$uniqueid.\".pageY);clip.width=\".$mi->frame_width.\";clip.height=\".$mi->frame_height.\";visibility='show';\\\"></layer>\";\n }\n\n if (!isset($mi->iframetracking) || $mi->iframetracking != 0) {\n $buffer .= \"<script type='text/javascript' src='\".MAX_commonConstructDeliveryUrl($conf['file']['google']).\"'></script>\";\n }\n\n return $buffer;\n }", "title": "" }, { "docid": "a014cf14f93e1d374c3c0694454d6da2", "score": "0.45908648", "text": "function generate_gefx($conf) {\n\tfwrite($conf[\"file_gexf_output\"],'<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <gexf xmlns=\"http://www.gexf.net/1.3\" version=\"1.3\" xmlns:viz=\"http://www.gexf.net/1.3/viz\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.gexf.net/1.3 http://www.gexf.net/1.3/gexf.xsd\">\n\t<meta lastmodifieddate=\"2020-06-09\">\n\t <creator>Gephi 0.9</creator>\n\t <description></description>\n\t</meta>\n\t<graph defaultedgetype=\"directed\" idtype=\"string\" mode=\"static\">'.\"\\n\");\n\n\tfwrite($conf[\"file_gexf_output\"],'<nodes count=\"'.sizeof($conf[\"nodes\"]).'\">'.\"\\n\");\n\tforeach ($conf[\"nodes\"] as $item=>$node_data) {\n\t\tfwrite($conf[\"file_gexf_output\"],'<node id=\"'.$item.'\" label=\"'.$node_data[\"label\"].'\"/>'.\"\\n\");\n\t}\n\tfwrite($conf[\"file_gexf_output\"],'</nodes>'.\"\\n\");\n\n\tfwrite($conf[\"file_gexf_output\"],'<edges count=\"'.count($conf[\"edges\"],COUNT_RECURSIVE).'\">'.\"\\n\");\n\n\t$number=0;\n\tforeach ($conf[\"edges\"] as $subject=>$object_prop) {\n\t\tforeach ($object_prop as $object=>$prop_array) {\n\t\t\tforeach ($prop_array as $prop=>$value) {\n\t\t\t\t$number++;\n\t\t\t\t$output=\"\";\n\t\t\t\t$output.='<edge id=\"'.$number.'\" source=\"'.$subject.'\" target=\"'.$object.'\" label=\"'.$prop.\":\".$conf[\"properties\"][$prop][\"label\"].'\" weight=\"1.0\"/>'.\"\\n\";\n\t\t\t\tfwrite($conf[\"file_gexf_output\"],$output);\n\t\t\t}\n\t\t}\n\t}\n\tfwrite($conf[\"file_gexf_output\"],'</edges>'.\"\\n\");\n\tfwrite($conf[\"file_gexf_output\"],'</graph>'.\"\\n\");\n\tfwrite($conf[\"file_gexf_output\"],'</gexf>'.\"\\n\");\n\tfclose($conf[\"file_gexf_output\"]);\n}", "title": "" }, { "docid": "00e1eec969f5ef270464c0014760fdb4", "score": "0.45789245", "text": "function mf_complemento_acreditamientoieps10($datos)\n{\n global $__mf_namespaces__;\n $__mf_namespaces__['aieps']['uri'] = 'http://www.sat.gob.mx/acreditamiento';\n $__mf_namespaces__['aieps']['xsd'] = 'http://www.sat.gob.mx/sitio_internet/cfd/acreditamiento/AcreditamientoIEPS10.xsd';\n\n $atrs = mf_atributos_nodo($datos);\n $xml = \"<aieps:acreditamientoIEPS Version='1.0' $atrs>\";\n $xml .= \"</aieps:acreditamientoIEPS>\";\n return $xml;\n}", "title": "" }, { "docid": "63f63719bae703dd7d480acf6230c1d1", "score": "0.45671976", "text": "function generate_woocommerce_end() {\n\t\t?>\n\t\t\t\t\t\t</div><!-- .entry-content -->\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * generate_after_content hook.\n\t\t\t\t\t\t *\n\t\t\t\t\t\t * @since 0.1\n\t\t\t\t\t\t */\n\t\t\t\t\t\tdo_action( 'generate_after_content' );\n\t\t\t\t\t\t?>\n\t\t\t\t\t</div><!-- .inside-article -->\n\t\t\t\t</article><!-- #post-## -->\n\t\t\t\t<?php\n\t\t\t\t/**\n\t\t\t\t * generate_after_main_content hook.\n\t\t\t\t *\n\t\t\t\t * @since 0.1\n\t\t\t\t */\n\t\t\t\tdo_action( 'generate_after_main_content' );\n\t\t\t\t?>\n\t\t\t</main><!-- #main -->\n\t\t</div><!-- #primary -->\n\t<?php\n\t}", "title": "" }, { "docid": "84535a5c005692429f0497287fb676f7", "score": "0.45587268", "text": "function drawInstructions()\n /**************************\n Fetch instructions from DocRep. If not available, return something else.\n */\n {\n $oDocRepDB = New_DocRepDB_WithMyPerms( $this->kfdb_for_DocRepDB /*$this->oApp->kfdb*/, 0, ['bReadonly'=>true] );\n if( !($kDoc = $oDocRepDB->GetDocFromName( $this->oApp->lang == 'FR' ? \"web/main/home/msd/msd-instructions-fr\" : \"web/main/home/msd/msd-instructions-en\" )) ||\n !($oDoc = new DocRepDoc( $oDocRepDB, $kDoc )) ||\n !($s = $oDoc->GetText(\"PUB\")) )\n {\n // Nope, this is probably a dev installation, so just use this\n $s = \"<p>Seeds of Diversity's Member Seed Exchange is a program for members to save and share seeds with each other.</p>\"\n .\"<p>All members can request seeds directly from the growers, and payment is usually made with e-transfers, \"\n .\"stamps, cash, cheques, or Canadian Tire money. We invite all members to request seeds, regardless of whether they offer seeds, \"\n .\"because participation in the seed exchange is the best way to get to know other members from coast to coast, and to get acquainted \"\n .\"with the larger seed saving community. We hope that everyone will try saving their own seeds, and when they feel ready to \"\n .\"share their saved seeds with other members, they will offer them here.</p>\"\n .\"<p>Members, please login to your Seeds of Diversity account to make your seed requests.</p>\"\n .\"<p>If you are not a member of Seeds of Diversity, <a href='https://seeds.ca/store' target='_blank'>you can join today</a>!</p>\";\n }\n\n $s = json_encode( $s );\n return( $s );\n }", "title": "" }, { "docid": "2ee98c45c856ca9ebaf2c536ae397525", "score": "0.453342", "text": "private function processEpub()\r\n {\r\n $this->log->m_log('Start download epub');\r\n $dl = new DownloadFileExtended();\r\n $dl->urlId = $this->urlId;\r\n $dl->pagesId = $this->pagesId;\r\n $dl->target = $this->target;\r\n $dl->folder = FOLDER_EPUB;\r\n $dl->downloadProcessing();\r\n \r\n $epub = new EPub($dl->localfile);\r\n \r\n $result['Authors'] = $epub->Authors();\r\n $result['Title'] = $epub->Title();\r\n $result['Language'] = $epub->Language();\r\n $result['Publisher'] = $epub->Publisher();\r\n $result['Copyright'] = $epub->Copyright();\r\n $result['Description'] = $epub->Description();\r\n $result['ISBN'] = $epub->ISBN();\r\n $result['Google'] = $epub->Google();\r\n $result['Amazon'] = $epub->Amazon();\r\n $result['Subjects'] = $epub->Subjects();\r\n \r\n $this->log->m_log('EPUB metadata Ok');\r\n $saveData['meta_data'] = '';\r\n if (isset($result) && !empty($result)) {\r\n $saveData['meta_data'] = serialize($result);\r\n }\r\n $saveData['id'] = $dl->id;\r\n $saveData['local_location'] = $dl->localfile;\r\n $saveData['file_type'] = 'epub';\r\n \r\n // File data Save Database\r\n $dl->saveData = $saveData;\r\n return $dl->saveEnd();\r\n }", "title": "" }, { "docid": "1f5298d9391dcf6f980c7f8e2b9fa2a2", "score": "0.4518191", "text": "public function generateString() \n\t\t{\n $content = \"BEGIN:VCALENDAR\\r\\n\"\n . \"VERSION:2.0\\r\\n\"\n . \"PRODID:-//\" . $this->author . \"//NONSGML//EN\\r\\n\"\n . \"X-WR-CALNAME:\" . $this->title . \"\\r\\n\"\n . \"CALSCALE:GREGORIAN\\r\\n\";\n\t\t\n foreach($this->events as $event) \n\t\t\t{\n\t\t\t$content .= $this->generateVeventString($event);\n \t}\n\t $content .= \"END:VCALENDAR\";\n return $content;\n\t\t}", "title": "" }, { "docid": "c4c239a6045fbe55a8cf0421abe8b927", "score": "0.44944102", "text": "function BarreTypoEnrichie_post_propre($texte) {\n\n\t# Intertitre de deuxieme niveau\n\t/*global $debut_intertitre_2, $fin_intertitre_2;\n\t$texte = ereg_replace('(<p class=\"spip\">)?[[:space:]]*@@SPIP_debut_intertitre_2@@', $debut_intertitre_2, $texte);\n\t$texte = ereg_replace('@@SPIP_fin_intertitre_2@@[[:space:]]*(</p>)?', $fin_intertitre_2, $texte);*/\n\n\t# Intertitre de troisieme niveau\n\t/*global $debut_intertitre_3, $fin_intertitre_3;\n\t$texte = ereg_replace('(<p class=\"spip\">)?[[:space:]]*@@SPIP_debut_intertitre_3@@', $debut_intertitre_3, $texte);\n\t$texte = ereg_replace('@@SPIP_fin_intertitre_3@@[[:space:]]*(</p>)?', $fin_intertitre_3, $texte);*/\n\n\t# Intertitre de quatrieme niveau\n\t/*global $debut_intertitre_4, $fin_intertitre_4;\n\t$texte = ereg_replace('(<p class=\"spip\">)?[[:space:]]*@@SPIP_debut_intertitre_4@@', $debut_intertitre_4, $texte);\n\t$texte = ereg_replace('@@SPIP_fin_intertitre_4@@[[:space:]]*(</p>)?', $fin_intertitre_4, $texte);*/\n\n\t# Intertitre de cinquieme niveau\n\t/*global $debut_intertitre_5, $fin_intertitre_5;\n\t$texte = ereg_replace('(<p class=\"spip\">)?[[:space:]]*@@SPIP_debut_intertitre_5@@', $debut_intertitre_5, $texte);\n\t$texte = ereg_replace('@@SPIP_fin_intertitre_5@@[[:space:]]*(</p>)?', $fin_intertitre_5, $texte);*/\n\n\t$cherche1 = array(\n\t\t/* 15 */ \t\",\\[/(.*)/\\],Ums\",\n\t\t/* 17 */ \t\",\\[\\|(.*)\\|\\],Ums\",\n\t\t/* 19 */ \t\",\\[\\((.*)\\)\\],Ums\",\n\t\t/* 21 */ \t\"/\\[\\*\\*/S\",\n\t\t/* 21b */ \t\"/\\[\\*/S\",\n\t\t/* 22 */\t\"/\\*\\]/S\",\n\t\t/* 23 */ \t\"/\\[\\^/S\",\n\t\t/* 24 */\t\"/\\^\\]/S\",\n\t\t/* 40 */\t\"/@@acro@@([^@]*)@@([^@]*)@@acro@@/S\"\n\t);\n\n\t$remplace1 = array(\n\t\t/* 15 */ \t\"<div class=\\\"spip\\\" style=\\\"text-align:right;\\\">$1</div>\",\n\t\t/* 17 */ \t\"<div class=\\\"spip\\\" style=\\\"text-align:center;\\\">$1</div>\",\n\t\t/* 19 */ \t\"<div class=\\\"texteencadre-spip spip\\\">$1</div>\",\n\t\t/* 21 */ \t\"<strong class=\\\"caractencadre2-spip spip\\\">\",\n\t\t/* 21b */ \t\"<strong class=\\\"caractencadre-spip spip\\\">\",\n\t\t/* 22 */\t\"</strong>\",\n\t\t/* 23 */ \t\"<sup>\",\n\t\t/* 24 */\t\"</sup>\",\n\t\t/* 40 */\t\"<acronym title='$1' class='spip_acronym spip'>$2</acronym>\"\n\t);\n\t$texte = preg_replace($cherche1, $remplace1, $texte);\n\t$texte = paragrapher($texte,$GLOBALS['toujours_paragrapher']); // il faut reparagrapher a cause des raccourcis typo que l'on a ajoute (block div)\n\treturn $texte;\n}", "title": "" }, { "docid": "7ec358b98d140f3d02b52e1ebc9555bd", "score": "0.44790983", "text": "public static function corregirDocSEA($Ids, $tipDoc) {\n $errAuto= new VSexception();\n $con = Yii::$app->db_edoc;\n $trans = $con->beginTransaction();\n try {\n switch ($tipDoc) {\n Case \"FA\"://FACTURAS\n $sql = \"UPDATE \" . $con->dbname . \".VC010101 SET ENV_DOC=0 WHERE ENV_DOC='$Ids';\";\n break;\n Case \"GR\"://GUIAS DE REMISION\n $sql = \"UPDATE \" . $con->dbname . \".IG0045 SET ENV_DOC=0 WHERE ENV_DOC='$Ids';\";\n break;\n Case \"CO\"://RETENCIONES\n $sql = \"UPDATE \" . $con->dbname . \".IG0050 SET ENV_DOC=0 WHERE ENV_DOC='$Ids';\";\n break;\n Case \"PP\"://RETENCIONES\n $sql = \"UPDATE \" . $con->dbname . \".IG0054 SET ENV_DOC=0 WHERE ENV_DOC='$Ids';\";\n break;\n Case \"NC\"://NOTAS DE CREDITO\n $sql = \"UPDATE \" . $con->dbname . \".IG0060 SET ENV_DOC=0 WHERE ENV_DOC='$Ids';\";\n break;\n Case \"ND\"://NOTAS DE DEBITO\n //$sql = \"UPDATE \" . $con->dbname . \".NubeFactura SET ENV_DOC=0 WHERE ENV_DOC='$Ids';\";\n break;\n }\n //VSValidador::putMessageLogFile($sql);\n if ($sql <> '') {//Verifica si Existe Sentencia SQL\n $comando = $con->createCommand($sql);\n $comando->execute();\n $trans->commit();\n //return true;\n return $errAuto->messageSystem('OK', null,12,null, null);\n } else {\n //return true;\n return $errAuto->messageSystem('NO_OK',null, 1, null, null);\n }\n } catch (Exception $e) { // se arroja una excepción si una consulta falla\n $trans->rollBack();\n throw $e;\n //return false;\n return $errAuto->messageSystem('NO_OK',null, 1, null, null);\n }\n }", "title": "" }, { "docid": "6b584135dc491a3b4dd93c254806cca9", "score": "0.4464269", "text": "public function Recomendar_Producto_a_Amigo( $Email_Amigo,$Nombre_Quien_Envia,$Mensaje_Enviado,$Nombre_Imagen,$IdProducto,$Nombre_Amigo, $Nom_Producto='' ){\n $this->Configurar_Cuenta('Recomendación de ' .$Nombre_Quien_Envia );\n $this->Email->AddAddress($Email_Amigo );\n $Id_Area_Consulta = Session::Get('Id_Area_Consulta');\n if ( $_SESSION['logueado'] == TRUE ) {\n $idtercero_presenta = Session::Get('idtercero');\n $codigousuario_presenta = Session::Get('codigousuario') ;\n $Url_Imagen = BASE_URL.\"productos/vista_ampliada/$IdProducto/$Id_Area_Consulta/1/$idtercero_presenta/$codigousuario_presenta/\";\n }else{\n $Url_Imagen = BASE_URL.\"productos/Detalle_Producto/$IdProducto/$Nom_Producto/\";\n }\n\n\n $codigo_confirmacion = General_Functions::Generar_Codigo_Confirmacion();\n\n $logo = BASE_IMG_EMPRESA .'logo.png';\n $imagen = BASE_IMG_PRODUCTOS_232x232 .$Nombre_Imagen;\n\n $Borrar_Registro = BASE_URL.\"terceros/Borrar_Lista_Suscripcion/\".$codigo_confirmacion;\n\n $Texto_Correo = file_get_contents(BASE_EMAILS.'productos_recomendar.html','r');\n $Texto_Correo = str_replace(\"#Nombre_Amigo#\" , ucfirst($Nombre_Amigo) ,$Texto_Correo);\n $Texto_Correo = str_replace(\"#Nombre_Quien_Envia#\" , $Nombre_Quien_Envia ,$Texto_Correo);\n $Texto_Correo = str_replace(\"#Nombre_Imagen#\" , $imagen,$Texto_Correo);\n $Texto_Correo = str_replace(\"#logo#\" , $logo ,$Texto_Correo);\n $Texto_Correo = str_replace(\"#Url#\" , $Url_Imagen ,$Texto_Correo);\n $Texto_Correo = str_replace(\"#tron#\" , BASE_URL,$Texto_Correo);\n $Texto_Correo = str_replace(\"#_CERRAR_SUSCIPCIÓN_#\" , $Borrar_Registro,$Texto_Correo);\n\n $Pie_Pagina ='';\n\n if (strlen($Mensaje_Enviado)>0) {\n $Pie_Pagina = '<div> ';\n $Pie_Pagina = $Pie_Pagina . '<strong><p>Nota: </strong>';\n $Pie_Pagina = $Pie_Pagina . '<div class=\"campo-escrit\"> ' . $Mensaje_Enviado .'</div></div>';\n }\n $Texto_Correo = str_replace(\" #Pie_Pagina#\" , $Pie_Pagina ,$Texto_Correo);\n $this->Email->Body = $Texto_Correo ;\n // GRABAR RECOMENDACION\n $this->Terceros->Recomendacion_Amigo_Producto_Grabar ( $Nombre_Amigo ,$Email_Amigo,$IdProducto,$codigo_confirmacion );\n //-------------------\n return $this->Enviar_Correo();\n }", "title": "" }, { "docid": "2dea0a2dbc36ae28a5b505396b1deb7e", "score": "0.44613153", "text": "public function getEfector()\r\n\t{\r\n\t\t$this->relacionCodigos->ConvertirCUIE($this->formularioGetCentro_inscriptor());\r\n\t\treturn($this->relacionCodigos->getCodremediar());\r\n\t}", "title": "" }, { "docid": "811650ac37f1ec3563f8ebfc40f81097", "score": "0.44497484", "text": "public function makeEspresso()\n\t{\n\n\t}", "title": "" }, { "docid": "c3c7e105e1c47f3759d3633b260666ca", "score": "0.44360313", "text": "function ExibeEtapa($O, $p_chave, $p_chave_aux, $p_tipo, $p_P1, $p_etapa, $p_tp, $p_sg) {\r\n extract($GLOBALS, EXTR_PREFIX_SAME, 'l_');\r\n if ($p_tipo == 'PDF') {\r\n $w_embed = 'WORD';\r\n }\r\n\r\n if (Nvl($p_etapa, '') == '') {\r\n $l_string = \"---\";\r\n } else {\r\n if ($w_embed == 'WORD') {\r\n $l_string .= $p_etapa;\r\n } else {\r\n $l_string .= '<A class=\"hl\" HREF=\"javascript:this.status.value;\" onClick=\"window.open(\\'' . $conRootSIW . (($w_dir == 'mod_pr/') ? '' : $w_dir) . 'projeto.php?par=AtualizaEtapa&w_chave=' . $p_chave . '&O=' . $O . '&w_chave_aux=' . $p_chave_aux . '&w_tipo=' . $p_tipo . '&P1=' . $p_P1 . '&P2=' . $P2 . '&P3=' . $P3 . '&P4=' . $P4 . '&TP=' . $p_tp . '&SG=' . $p_sg . '\\',\\'Etapa\\',\\'width=780,height=550,top=50,left=10,toolbar=no,scrollbars=yes,resizable=yes,status=no\\'); return false;\" title=\"Clique para exibir os dados!\">' . $p_etapa . '</A>';\r\n }\r\n }\r\n return $l_string;\r\n }", "title": "" }, { "docid": "d370eee65b4fe8e859b1634b15dc2333", "score": "0.44331986", "text": "function invoice_body() \n{\n global $invoice,$pdf,$CONFIG;\n\n if(isset($invoice['invoice']))\n\t $template = $CONFIG['invoices']['cnote_template_file'];\n else\n\t $template = $CONFIG['invoices']['template_file'];\n\n switch ($template)\n {\n\tcase \"standard\":\n\t invoice_body_standard();\n\tbreak;\n\tcase \"FT-0100\":\n\t invoice_body_ft0100();\n\tbreak;\n\tdefault:\n\t if(file_exists($template))\n require($template);\n\t else //go to LMS modules directory\n\t require(MODULES_DIR.'/'.$template);\n }\n\n if(!isset($invoice['last'])) $pdf->ezNewPage();\n}", "title": "" }, { "docid": "1ab59c05ec1bccffc9c6b6e1b27b9ffa", "score": "0.44289413", "text": "public function crearEpicrisis(){\r\n $sql = \"INSERT INTO Epicrisis(hipertension,\r\n enfermedad_Cardiaca,\r\n cancer,\r\n sida,\r\n hepatitis,\r\n epilepsia,\r\n alergias,\r\n asma,\r\n convulsiones,\r\n anticuagulante,\r\n hipoglicemia,\r\n embarazo,\r\n diabetes,\r\n otro,\r\n id_Usuario)\r\n VALUES ('{$this-> hipertension}',\r\n '{$this-> enfermedad_Cardiaca}',\r\n '{$this-> cancer}',\r\n '{$this-> sida}',\r\n '{$this-> hepatitis}',\r\n '{$this-> epilepsia}',\r\n '{$this-> alergias}',\r\n '{$this-> asma}',\r\n '{$this-> convulsiones}',\r\n '{$this-> anticuagulante}',\r\n '{$this-> hipoglicemia}',\r\n '{$this-> embarazo}',\r\n '{$this-> diabetes}',\r\n '{$this-> otro}',\r\n '{$this-> cedula_Usuario}')\";\r\n //Llama al Metodo consultaSimple para Ejecutar la Sentencia SQL\r\n $this-> conex-> consultaSimple($sql);\r\n }", "title": "" }, { "docid": "40402c4e95b3ddbb2c2929607156c24c", "score": "0.4427173", "text": "public function fact_01_enc() {\n $Facturas = $this->Db->Ejecutar_Sp(\"fact_01_enc_pndte_envio_dian()\");\n //Debug::Mostrar ( $Facturas );\n\n return $Facturas ;\n }", "title": "" }, { "docid": "298eb2f032ee39ff6e043e827e0a1a07", "score": "0.44269803", "text": "function placeholder_emoticon_chooser()\n{\n\t\t$em=new ocp_tempcode();\n\t\tforeach (placeholder_emoticons() as $emo)\n\t\t{\n\t\t\t$code=$emo[2];\n\t\t\t$em->attach(do_lorem_template('EMOTICON_CLICK_CODE',array('_GUID'=>'93968e9ff0308fff92d1d45e433557e2','FIELD_NAME'=>'post','CODE'=>$code,'IMAGE'=>apply_emoticons($code))));\n\t\t}\n\t\treturn $em;\n}", "title": "" }, { "docid": "8450a1d7d718906fdcc102c67f34b119", "score": "0.44239694", "text": "private function escreverRodape($oDados) {\n\n /**\n * Verifica se tem espaço antes de escrever\n */\n if ($this->oPdf->getAvailHeight() < 70) {\n $this->oPdf->AddPage();\n }\n\n $oDataAnalise = new DBDate($oDados->data_analise);\n $oInstituicao = InstituicaoRepository::getInstituicaoPrefeitura();\n $sCidade = mb_convert_case($oInstituicao->getMunicipio(), MB_CASE_TITLE);\n\n $this->oPdf->setBold(true);\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, \"DESPACHO\", 0, \"C\");\n $this->oPdf->setBold(false);\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, \"De acordo com a informação acima, encaminhamos o processo ao órgão de origem para providências.\", 0, \"C\");\n $this->oPdf->Ln($this->iAltura * 2);\n\n $this->oPdf->Cell($this->iLargura, $this->iAltura, \"{$sCidade}, {$oDataAnalise->dataPorExtenso()}\", 0, 1, 'C');\n $this->oPdf->Ln($this->iAltura * 2);\n\n if (!empty($oDados->chefe)) {\n $this->oPdf->MultiCell(100, $this->iAltura, \"__________________________________________\", 0, 'L');\n $this->oPdf->MultiCell(100, $this->iAltura, $oDados->chefe, 0, 'L');\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, $oDados->lotacao_chefe, 0, 'L');\n }\n\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, \"__________________________________________\", 0, 'R');\n if (!empty($oDados->usuario_liberacao_inicial)) {\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, $oDados->usuario_liberacao_inicial, 0, 'R');\n }\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, $oDados->lotacao_liberacao_inicial, 0, 'R');\n $this->oPdf->Ln($this->iAltura * 2);\n\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, \"__________________________________________\", 0, 'R');\n //if (!empty($oDados->usuario_liberacao_final)) {\n \n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, $oDados->usuario_liberacao_final, 0, 'R');\n //$this->oPdf->MultiCell($this->iLargura, $this->iAltura, \"JANICE MONTEIRO DA SILVA\", 0, 'R');\n //}\n $this->oPdf->MultiCell($this->iLargura, $this->iAltura, $oDados->lotacao_liberacao_final, 0, 'R'); \n //$this->oPdf->MultiCell($this->iLargura, $this->iAltura, \"Diretora de Controle Interno\", 0, 'R');\n }", "title": "" }, { "docid": "4bd25f155e359aa7ff3a754e8f2ab5a0", "score": "0.44214964", "text": "static function generateInvoice($payment_data){\n $configEntity = self::getConfigEntity();\n // var_dump($configEntity);\n $url = $configEntity['apiurl'] . \"v3/cfdi40/create\";\n //$url = \"https://factura.com/api/v3/cfdi40/create\";\n\n $request = 'POST';\n\n $order = FacturaWrapper::getCookies('order');\n // var_dump($order);\n $customer = $_SESSION['customer'];\n\n $items = array();\n $discount = $order->cart_discount;\n $calculate_tax = 1.16;\n\n foreach($order->line_items as $item){\n $unidad = ($item[\"product_id\"] == 31) ? \"Servicio\" : \"Producto\"; //No aplica\n // if(CommerceHelper::includeTax()){\n // $product_price = ($item[\"subtotal\"]/$item[\"quantity\"]) / 1.16;\n // }else{\n // $product_price = ($item[\"subtotal\"]/$item[\"quantity\"]);\n // }\n // $unit_price = $item[\"subtotal\"]/$item[\"quantity\"];\n // $product_price = $unit_price - ($unit_price * 0.16);\n // $product_price = ($item[\"subtotal\"]/$item[\"quantity\"]) / 1.16;\n\n // if($order->total_discount <= 0){\n // $product_price = ($item[\"subtotal\"]/$item[\"quantity\"]);\n // }else{\n // $product_price = ($item[\"total\"]/$item[\"quantity\"]);\n // }\n\n // $product_price = ($item[\"total\"]/$item[\"quantity\"]);\n // $product_price = $item[\"price\"]/ 1.16;\n // $subtotal_item = ($item[\"price\"] * $item[\"quantity\"]) / 1.16;\n $product_price = ($item[\"subtotal\"] / $item[\"quantity\"]); // / $calculate_tax;\n\n /**\n * @TODO Configuración de IVA\n */\n\n $product_data = array(\n \"cantidad\" => $item[\"quantity\"],\n \"unidad\" => $unidad,\n \"concept\" => $item[\"name\"],\n \"precio\" => $product_price,\n \"subtotal\" => $product_price * $item[\"quantity\"], //$subtotal_item, //$item[\"subtotal\"],\n );\n\n array_push($items, $product_data);\n }\n\n //payment method\n if($payment_data[\"account\"] == ''){\n $num_cta = '';\n }else{\n $num_cta = $payment_data[\"account\"];\n }\n\n //Consigo la serie\n $series = FacturaWrapper::check_serie();\n $serie = '';\n foreach( $series->data as $ser) {\n if($ser->SerieName == $configEntity['serie'] && $ser->SerieType=='F'){\n $serie = $ser;\n }\n }\n\n //Creo la estructura del objeto que voy a enviar:\n $cfdi = array(\n \"TipoCfdi\" => \"factura\",\n \"Receptor\" => [\n \"UID\" => $customer->UID,\n ],\n \"UsoCFDI\" => $payment_data[\"cfdi_use\"],\n \"Serie\" => $serie->SerieID,\n \"MetodoPago\" => \"PUE\",\n \"FormaPago\" => $payment_data[\"method\"],\n \"Moneda\" => $order->currency,\n \"Conceptos\" => array(),\n 'EnviarCorreo' => true,\n \"Redondeo\" => 2,\n \"NumOrder\" =>$order->id,\n // \"Cuenta\" =>(int)$num_cta,\n );\n foreach( $order->line_items as $item ) {\n // var_dump(floatval(wc_format_decimal($item['meta']['item_total'], 2 )));\n if($item['F_ClaveProdServ'] != \"78102203\"){\n $precio = floatval(wc_format_decimal($item['meta']['item_total'], 2 ));\n }\n else{\n $precio = floatval(wc_format_decimal($item['total'], 2 ));\n }\n \n if(isset($item['F_IVA']) && $item['F_IVA'] != \"\") {\n $tasa = $item['F_IVA']/100; \n }else {\n $tasa = 0.16;\n }\n \n //Reviso la configuración para saber si los precios incluyen iva \n if($configEntity['sitax'] == \"true\"){\n $importe = $precio / (1 + $tasa);\n }\n\n if($configEntity['sitax'] == \"false\"){\n $importe = $precio;\n }\n\n if($item['type_tax'] == \"none\" || $item['type_tax'] == \"shipping\" && $item['F_ClaveProdServ'] != \"78102203\"){\n $cfdi['Conceptos'][] = array(\n \"ClaveProdServ\" => $item['F_ClaveProdServ'],\n \"Cantidad\" => $item['quantity'],\n \"ClaveUnidad\" => $item['F_ClaveUnidad'],\n \"Unidad\" => $item['F_Unidad'],\n \"ValorUnitario\" => floatval(wc_format_decimal($importe, 2 )),\n \"Descripcion\" => $item['name'],\n );\n }\n else{\n\n $valorUnitario = floatval(wc_format_decimal($importe, 6));\n $Base = floatval(wc_format_decimal($valorUnitario * $item['quantity'], 6));\n $Importe = floatval(wc_format_decimal($Base * $tasa, 6));\n\n $cfdi['Conceptos'][] = array(\n \"ClaveProdServ\" => $item['F_ClaveProdServ'],\n \"Cantidad\" => $item['quantity'],\n \"ClaveUnidad\" => $item['F_ClaveUnidad'],\n \"Unidad\" => $item['F_Unidad'],\n \"ValorUnitario\" => $valorUnitario,\n \"Descripcion\" => $item['name'],\n \"Impuestos\" => array(\n \"Traslados\" => array([\n \"Base\" => $Base,\n \"Impuesto\" => \"002\",\n \"TipoFactor\" => \"Tasa\",\n \"TasaOCuota\" => $tasa,\n \"Importe\" => $Importe\n ]\n ),\n ),\n );\n }\n\n }\n\n //echo \"<pre>\";\n // var_dump($order);\n //die;\n // var_dump(woocommerce_price($product->get_price_including_tax()));\n // die;\n // var_dump($order->line_items);\n // var_dump(json_encode($cfdi));\n // die;\n // $invoiced = WrapperApi::callCurl($url, $request, $params);\n $invoiced = WrapperApi::callCurl($url, $request, $cfdi);\n // var_dump($invoiced->invoice->status);\n // var_dump($invoiced->response);\n //change status\n if($invoiced->response == 'success'){\n self::changeOrderStatus('wc-invoiced', $order->id);\n // $order->update_status( 'invoiced' );\n }\n // if($invoiced->status == 'success'){\n // self::changeOrderStatus('wc-invoiced', $order->id);\n // // $order->update_status( 'invoiced' );\n // }\n\n return $invoiced;\n }", "title": "" }, { "docid": "ae305f3149ef7eb75f26c2ad47c5840a", "score": "0.44176143", "text": "public function serialize()\n {\n $output = '<?xml version=\"1.0\" ?>';\n $output .= \"<EDI-X12>\";\n\n /** @var ISA $isa */\n foreach ($this->x12->ISA as &$isa) {\n\n // ISA\n $output .= $this->serializeSegment($isa);\n\n // TA1\n if ($isa->TA1) {\n $output .= $this->serializeSegment($isa->TA1);\n }\n\n /** @var GS $gs */\n foreach ($isa->GS as &$gs) {\n\n // GS\n $output .= $this->serializeSegment($gs);\n\n /** @var ST $st */\n foreach ($gs->ST as &$st) {\n\n // ST\n $output .= $this->serializeSegment($st);\n\n /** @var Segment $property */\n foreach ($st->properties as &$property) {\n\n // ST Property\n $output .= $this->serializeSegment($property);\n }\n\n /** @var HL $hl */\n foreach ($st->HL as &$hl) {\n\n // HL\n $output .= $this->serializeHLSegment($hl);\n }\n\n // SE\n $output .= $this->serializeSegment($st->SE);\n }\n\n // GE\n $output .= $this->serializeSegment($gs->GE);\n }\n\n // IEA\n $output .= $this->serializeSegment($isa->IEA);\n }\n\n $output .= \"</EDI-X12>\";\n\n // Return the serialized data\n return $output;\n }", "title": "" }, { "docid": "5ef5032dfc5e1837c92a622478203bb1", "score": "0.44147518", "text": "function write_consigne( $consigne ) {\r\n global $CFG;\r\n // initial string;\r\n $expout = \"\";\r\n // add comment\r\n $expout .= \"\\n\\n<!-- consigne: $consigne->id -->\r\n<div class='item'>\\n\";\r\n\t\tif ($consigne){\r\n\t\t\t$id = $consigne->id ;\t\t\r\n $type_consigne = trim($consigne->type_consigne);\r\n $description_consigne = trim($consigne->description_consigne);\r\n\t\t\t$url_consigne = $consigne->url_consigne;\r\n $ref_task = $consigne->ref_task;\r\n $expout .= \" <ul>\\n\";\r\n $expout .= \" <li><b>\".get_string('type_consigne','referentiel').\"</b> : $type_consigne</li>\\n\"; \r\n $expout .= \" <li><b>\".get_string('description','referentiel').\"</b> : $description_consigne</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('url','referentiel').\"</b> : $url_consigne</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('task','referentiel').\"</b> : $ref_task</li>\\n\";\r\n\t\t\t$expout .= \" </ul>\\n\"; \r\n }\r\n\t\t$expout .= \"</div>\\n\";\r\n return $expout;\r\n }", "title": "" }, { "docid": "77134cbeac1c784c65d7f2aa08d7618a", "score": "0.44133338", "text": "private function msgToEml() {\n $dir = dirname($this->doc_path);\n $file = $dir.\"/\".basename($this->doc_path);\n chmod($dir, 0777);\n chmod($file, 0777);\n \n //$res_c = copy(\"./lib/msgconvert/msgconvert.pl\",$dir.\"/msgconvert.pl\");\n $d = getcwd(); \n chdir($dir);\n //exec(\"/usr/bin/perl msgconvert.pl \".$file);\n if (!file_exists($file))\n throw new Exception('Konverze MSG selhala, zdrojový soubor neexistuje');\n $output = array();\n $locale='cs_CZ.UTF-8';\n setlocale(LC_ALL,$locale);\n putenv('LC_ALL='.$locale);\n //$ex = \"/var/www/cgi-bin/msg2eml \\\"\".$file.\"\\\" > /dev/null\";\n $res = exec(\"/var/www/cgi-bin/msg2eml \\\"\".$file.\"\\\" > /dev/null\",$output); \n //$res = exec(\"/var/www/cgi-bin/msg2eml \\\"\".$file.\"\\\"\",$output);\n chdir($d);\n $dest = $dir.'/'.basename($this->doc_path,\".msg\").\".eml\";\n $this->doc_path = $dest;\n if (!file_exists($dest))\n throw new Exception('Konverze MSG selhala');\n }", "title": "" }, { "docid": "88b7e138e27f6bd4d21c80bb37bbd579", "score": "0.44066298", "text": "function certificado_predeterminados($id,$evento,$funcion,$imagen,$dependencia,$imprimir)\n{\nrequire_once('php/tcpdf/config/lang/eng.php');\n\nini_set('memory_limit', '512M'); //Amplá la capacidad de memoria. Importante cuando se generan archivos muy pesados\nset_time_limit(0); //Libera la capacidad del tiempo de respuesta\n\nob_start();\n/*\necho \"<pre>\";\n print_r($_POST);\n echo \"</pre>\"; \n*/\n\n$sql =\"SELECT nombre FROM acto WHERE id='$evento'\";\n$db=$this->db;\n$rs = $db->query($sql);\n$rw = $db->fetch_assoc($rs);\n$nombre_evento=utf8_decode($rw['nombre']);\n\n if ($imprimir==0)\n {\n \n$funcion2=$funcion;\n$sql =\"SELECT nombre FROM funcion WHERE codigo='$funcion'\";\n$db=$this->db;\n$rs = $db->query($sql);\n$rw = $db->fetch_assoc($rs);\n$funcion=utf8_decode($rw['nombre']);\n\n\n\n$sql=\"SELECT p.identifica,p.tipoide, CONCAT_WS('',p.nombre,' ',p.apellido1,' ',p.apellido2) as nombre,t.nombre as tipo_identifica\n FROM general.persona p, general.tipoidentificacion t\n WHERE p.tipoide=t.codigo and p.id='$id'\";\n\n$db=$this->db;\n$rs = $db->query($sql);\n$rw = $db->fetch_assoc($rs);\n\n$nombre=utf8_decode($rw['nombre']);\n$tipo_documento=$rw['tipo_identifica'];\n$numero_documento=$rw['identifica'];\n\n//$this->SetFont('times', '', 10);\n \n\n \n$sql=\"SELECT i.nombre as institucion,d.nombre as dependencia FROM institucion i, dependencia d,agenda ag, asistencia a WHERE a.persona_id='$id' and a.funcion_id='$funcion2' and ag.acto_id='$evento' and ag.id=a.agenda_id and a.dependencia_id=d.id and i.codigo=d.institucion_id\";\n}\nelse\n{\n $sql = \"SELECT\ni.nombre as institucion,d.nombre as dependencia,f.nombre as funcion,\np.identifica,\nt.nombre as tipo_identifica,\nCONCAT_WS('',p.nombre,' ',p.apellido1,' ',p.apellido2) as nombre\nFROM agenda ag, asistencia a, general.persona p,general.tipoidentificacion t,institucion i, dependencia d,funcion f\nWHERE \np.id=a.persona_id\nand a.dependencia_id=d.id and i.codigo=d.institucion_id\nand ag.id=a.agenda_id\nand p.tipoide=t.codigo\nand a.funcion_id='$funcion'\nand ag.acto_id='$evento'\nGROUP BY p.identifica\nORDER BY nombre\";\n}\n\n $fecha = strftime(\"%A %d de %B del %Y - %H:%M:%S\");\n $fecha2 = strtoupper($fecha);\n$db=$this->db;\n$rs = $db->query($sql);\n//echo $sql;\nwhile ($rw = $db->fetch_assoc($rs)) \n{\n $dependencia= $rw['dependencia'];\n $institucion= $rw['institucion'];\n if ($imprimir==1) {\n $nombre=utf8_decode($rw['nombre']);\n$tipo_documento=$rw['tipo_identifica'];\n$numero_documento=$rw['identifica'];\n $funcion=$rw['funcion'];\n }\n\n?>\n\n<table border=\"0\" align=\"center\" >\n <tr style=\"background-image: url('../img/logo.png');\">\n <td colspan=\"3\" style=\"width:460px;text-align:justify;font-size:13px;\">\n <br/>\n <br/>\n <br/>\n\n El Jefe de la oficina de Registro y Control Académico,\n <br/>\n <br/>\n\n <p align=\"center\" style=\"font-size:20px;font-weight:bold\" >\n CERTIFICA:\n </p>\n <br/>\n \n Que, revisados los registros de esta institución de educación superior, se pudo certificar que <b><?php echo $nombre ?></b>, identifificado(a) con la <b><?php echo $tipo_documento ?> </b> número<b> <?php echo $numero_documento ?> </b>, asistio al acto <b><?php echo $nombre_evento ?> </b>\n cumpliendo la funcion de <b><?php echo $funcion ?></b>, de parte de la institucion <b><?php echo $institucion ?></b> del programa de <b><?php echo $dependencia ?></b>.\n \n <br/>\n <br/>\n <br/>\n <br/>\n Quibdó, <b><?php echo $fecha2 ?> </b>\n \n <br/>\n <br/>\n <br/>\n <br/>\n <br/>\n <br/>\n <br/>\n <br/>\n <b>JOSE DE LOS SANTOS RENTERÍA CÓRDOBA</b>\n \n \n \n </td>\n </tr>\n \n\n\n</table>\n\n<br/><br/><br/><br/><br/><br/>\n<br/><br/><br/><br/><br/><br/>\n\n\n<?php\n}\n$html = ob_get_contents(); //Pasa el contenido html anterior a una variable\nob_end_clean(); //Limpiar los datos anterios \n\n/*$formato=$_POST['formato'];\n$formato=\"pdf\";\nif($formato==\"excel\")\n{\n header(\"Content-Type: application/force-download\");\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Type: application/download\");\n header(\"Content-Disposition: attachment; filename={$nombre_archivo}.xls;\");\n echo $html;\n}\n\n\nif($formato==\"word\")\n{\n header(\"Content-Type: application/force-download\");\n header(\"Content-Type: application/octet-stream\");\n header(\"Content-Type: application/download\");\n header(\"Content-Disposition: attachment; filename={$nombre_archivo}.doc;\");\n echo $html; \n}\n\n\nif($formato==\"html\")\n{ \n echo $html; \n}\n\n\nif($formato==\"pdf\")\n{ }*/ \n //$p->NewPage();\n $p = new TCPDF_REPORTE(\"P\", \"pt\", \"LETTER\", true);\n $p->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n $p->SetMargins(85,100,55);// margenes de izquierda, arriba y abajo\n $p->setFooterMargin (30); \n \n $p->setPrintHeader(true);\n $p->setPrintFooter(true);\n \n $p->SetDrawColorArray( array(50,50,50) );\n \n $p->SetDisplayMode(100);\n $p->SetAutoPageBreak(TRUE,40);\n \n $p->AddPage();\n $p->SetFont(\"times\",\"\",10);\n $p->writeHTML($html, true, 0, true, 0); \n $p->Output(\"documento.pdf\"); \n\n\n}", "title": "" }, { "docid": "9980c3d9cdecf6d258c849aafc27cded", "score": "0.43968517", "text": "function do2Separate($ePubHub, $fixedLayoutEPub)\n{\n $result = $ePubHub->renderBook($fixedLayoutEPub, SRC_EPUB_FILES);\n\n if ($result !== false) {\n echo \"successfully rendered content.opf<br />\";\n // 5th zip the rendered files into the epub you want\n $result = $ePubHub->zipRendered(SRC_EPUB_FILES, EPUB_FILES);\n $metadata = $fixedLayoutEPub->getMetadata();\n $filename = $metadata['title'] . '.epub';\n\n if ($result !==false) {\n echo \"successfully generated $filename<br />\";\n } else {\n echo \"failed to generate $filename<br />\";\n }\n } else {\n echo \"failed to generate content.opf<br />\";\n }\n return $result;\n}", "title": "" }, { "docid": "8f705a6d8fa757c1a974d232aca1265b", "score": "0.43861818", "text": "function encabezado(&$linea, $pdf, $fila, $altura, $ancho, $izquierda)\r\n{\r\n\tif ($ancho == 1)\r\n\t{\r\n\t\t$ancho = 85;\r\n\t\t$tamanoid=12;\r\n\t\t$tamanonombre=8;\r\n\t\t$tamanologo=8;\r\n\t\t$altura=3;\r\n\t}\r\n\tif ($ancho == 2)\r\n\t{\r\n\t\t$ancho = 130;\r\n\t\t$tamanoid=16;\r\n\t\t$tamanonombre=12;\r\n\t\t$tamanologo=12;\r\n\t\t$altura=4;\r\n\t}\r\n\tif ($ancho == 3)\r\n\t{\r\n\t\t$ancho = 200;\r\n\t\t$tamanoid=20;\r\n\t\t$tamanonombre=14;\r\n\t\t$tamanologo=20;\r\n\t\t$altura=5;\r\n\t}\r\n\t$pdf->SetFont('Arial','B',$tamanoid);\r\n\t$pdf->SetY($linea);\r\n\t$pdf->SetX($izquierda);\r\n\t$pdf->MultiCell(0,0, $pdf->Image('fpdf_x/logo/logo.jpg', $pdf->GetX()+$tamanologo, $pdf->GetY(), $tamanologo) ,0,\"C\");\r\n\t$pdf->SetFont('Arial','B',$tamanoid);\r\n\t$pdf->SetX($izquierda);\r\n\t$pdf->MultiCell($ancho,$altura,$fila['alias_empr'],0,'C',0);\r\n\t$linea+=$altura;\r\n\t$pdf->SetY($linea);\r\n\t$pdf->SetX($izquierda);\r\n\t$pdf->SetFont('Arial','',$tamanonombre);\r\n\t$pdf->MultiCell($ancho,$altura,$fila['nombr1_empr'],0,'C',0);\r\n\t$linea+=$altura;\r\n\t$pdf->SetY($linea);\r\n\t$pdf->SetX($izquierda);\r\n\t$pdf->SetFont('Arial','',$tamanonombre);\r\n\t$pdf->MultiCell($ancho,$altura,$fila['nombr2_empr'],0,'C',0);\r\n\t$linea+=$altura;\r\n\t$pdf->SetY($linea);\r\n\t$pdf->SetX($izquierda);\r\n\t$pdf->SetFont('Arial','',$tamanonombre);\r\n\t$pdf->MultiCell($ancho,$altura,'RIF '.$fila['rif'],0,'C',0);\r\n\treturn $altura;\r\n}", "title": "" }, { "docid": "c8c23c6c5c9cd1f5429184839d1040a9", "score": "0.43745667", "text": "public static function enviarResumenEpis(contactoempresa $contacto, $force = false)\n {\n $languages = system::getLanguages();\n $template = Plantilla::singleton();\n $db = db::singleton();\n $log = log::singleton();\n $log->info($contacto->getModuleName(), \"leer/enviar resumen EPIs {$contacto->getCompany()}\", $contacto->getUserVisibleName() );\n $empresa = $contacto->getCompany();\n $html = $defaultHTML = false; // Por defecto no enviamos nada\n\n if ( !$empresa instanceof empresa || !$empresa->exists() ) {\n echo \"No se encuentra la empresa para el contacto {$contacto->getUID()} \\n\";\n $log->resultado( \"No se encuentra la empresa para el contacto {$contacto->getUID()}\", true);\n\n return false;\n }\n\n if ($empresa instanceof empresa) {\n $plantillaemail = plantillaemail::instanciar(\"resumen_epis\");\n if ($plantillaemail) {\n $defaultHTML = trim($plantillaemail->getFileContent($empresa));\n }\n if (!$defaultHTML) {\n if (!$force) {\n error_log(print_r('No hay html en la plantilla de resumen Epis. Se cancela el proceso.',true));\n exit;\n }\n }\n }\n\n if (!$defaultHTML) {\n $defaultHTML = utf8_decode(archivo::leer( DIR_ROOT . \"res/template/resumenepis.html\" ));\n }\n\n $resumenEpis = $empresa->resumenEpis();\n if (!$resumenEpis) return false;\n $html = plantillaemail::reemplazar($defaultHTML,array('{%epis%}' => $resumenEpis));\n\n if ($html === false) {\n echo \"No se tratará de enviar ningún email. No hay nada que enviar\\n\"; ob_flush();flush();\n echo \"<hr /></blockquote>\";\n\n return false;\n }\n\n $destinatario = trim($contacto->obtenerDato('email'));\n $forceWhiteList = array(\"[email protected]\", \"[email protected]\",\"[email protected]\", );\n if ( $force && !in_array($destinatario, $forceWhiteList) ) {\n echo \"\\t\\t\\tSaltando $destinatario por forzar\\n\";\n\n return false;\n }\n\n $destinatarios = explode(\",\", $destinatario);\n $email = new email($destinatarios);\n\n $email->establecerContenido($html);\n $email->establecerAsunto( utf8_decode(\"Resumen de EPIS para \". $contacto->getUserVisibleName()) );\n\n echo \"Enviando a \". implode(\", \", $email->obtenerDestinatarios()) . \"...<br />\"; ob_flush();flush();\n\n if ( ($status = $email->enviar()) === true ) {\n echo \"Email enviado a \". implode(\", \", $email->obtenerDestinatarios() ) . \"\\n<br />\"; ob_flush();flush();\n if (CURRENT_ENV != \"dev\") { $log->resultado(\"Email enviado a \". implode(\", \", $email->obtenerDestinatarios()) , true); }\n\n return true;\n } else {\n echo \"Ocurrió un error al enviar el email a \". $contacto->getUserVisibleName() . \"\\n<br />\"; ob_flush();flush();\n if (CURRENT_ENV != \"dev\") { $log->resultado(\"Ocurrió un error al enviar el email a \". $contacto->getUserVisibleName(), true); }\n }\n\n return false;\n }", "title": "" }, { "docid": "6a56623ec2bef7c9402e9694a966070a", "score": "0.43722215", "text": "function buddyexpress_bcinverse_result($get_input = ''){\nif(!empty($get_input)){\n$params = array('a' => '&#592;','b' => 'q','c' => '&#596;','e' => '&#477;','f' => '&#607;','g' => '&#387;','h' => '&#613;','i' => '&#305;','j' => '&#638;','k' => '&#670;','l' => 'l','m' => '&#623;','n' => 'u','o' => 'o','p' => 'd','q' => 'b','r' => '&#633;',\n's' => 's','t' => '&#647;','u' => 'n','v' => '&#652;','w' => '&#653;','x' => 'x','y' => '&#654;','z' => 'z','d' => 'p','!' => '&iexcl;');\n return buddyexpress_bcinverse($get_input,$params);\n }\n}", "title": "" }, { "docid": "e76a5ace4400db4456da32da051876ce", "score": "0.43660635", "text": "public function edid() {\n\t\t$raw = $this->raw_edid();\n\t\tif (!is_null($this->_edid) && $this->_edid)\n\t\t\treturn $this->_edid;\n\t\t\n\t\t$edid = \"\";\n\t\tif (!$this->get('exterior'))\n\t\t\t$edid = $raw;\n\t\telse {\n\t\t\tif (!($edid=$raw)) {\n\t\t\t\tif (is_null($edid = $this->get('RGNN'))) {\n\t\t\t\t\t$edid = \"Wilderness\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$edid .= ' ['.$this->get('cell_x').','.$this->get('cell_y').']';\n\t\t}\n\t\t$this->_edid = $edid;\n\t\treturn $edid;\n\t}", "title": "" }, { "docid": "990b0c5c2499656e05926f0ce1119638", "score": "0.43654677", "text": "function BOF() {\n\t\t$this->doc .= pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\n\t}", "title": "" }, { "docid": "3b70619c51707088888945111755347f", "score": "0.43628648", "text": "function hexentities_to_decentities($chaine)\n{\n preg_match_all('/&#([a-zA-Z0-9]*);/', $chaine, $matches);\n $cpt = 0;\n foreach($matches[0] as $subval)\n {\n //echo $subval.'<br />';\n $rep = '&#' . hexdec($matches[1][$cpt]) . ';';\n $chaine = str_replace($subval, $rep, $chaine);\n $cpt++;\n }\n return($chaine);\n}", "title": "" }, { "docid": "9328bf1b1cf5dc064ba6ddada88946ec", "score": "0.4362706", "text": "public function reminderMailEpSubmitExpiresAction()\n {\n $paticipation_obj=new Ep_Participation_Participation();\n $participation_details=$paticipation_obj->getArticleSubmissionExpires(); \n if($participation_details!=\"NO\")\n {\n foreach($participation_details AS $paticipants)\n {\n $ep_user_id=$paticipants['created_user'];\n $contributor_id= $paticipants['user_id'];\n $client_id=$paticipants['client'];\n $automail=new Ep_Ticket_AutoEmails();\n \n $ep_details=$automail->getUserDetails($ep_user_id);\n $contributor_details= $automail->getUserDetails($contributor_id);\n $client_details= $automail->getUserDetails($client_id);\n $ep_user=$ep_details[0]['username'];\n $contributor='<b>'.$contributor_details[0]['username'].'</b>';\n $ongoing_bo='<a href=\"http://admin-test.edit-place.co.uk/ao/ongoingao?submenuId=ML2-SL4&client='.$paticipants['client'].'&ao='.$paticipants['delivery'].'\">click here</a>';\n $ongoing_fo= '<a href=\"http://ep-test.edit-place.co.uk/client/order1?id='.$paticipants['article_id'].'\">click here</a>';\n $article_client='<a href=\"http://ep-test.edit-place.co.uk/client/order1?id='.$paticipants['article_id'].'\"><b>'.stripslashes($paticipants['article']).'</b></a>'; \n $article_contrib='<a href=\"http://ep-test.edit-place.co.uk/contrib/mission-deliver?article_id='.$paticipants['article_id'].'\"><b>'.stripslashes($paticipants['article']).'</b></a>'; \n $link= $ongoing_fo; \n $message_ids=array(\"client\"=>35,\"contrib\"=>36);\n foreach($message_ids as $key=> $mid)\n {\n if($key=='client')\n {\n $article=$article_client;\n $AO_title=$article;\n $user_email=$client_details[0]['email'];\n } \n else\n {\n $article=$article_contrib;\n $AO_title=$article;\n $user_email=$contributor_details[0]['email'];\n } \n $email=$automail->getAutoEmail($mid);\n $Object=$email[0]['Object'];\n eval(\"\\$Object= \\\"$Object\\\";\");\n $Object=strip_tags($Object);\n $Message=$email[0]['Message'];\n eval(\"\\$Message= \\\"$Message\\\";\");\n \n if($paticipants['premium_option']=='0')\n {\n //echo $user_email.\"--\".$Message.\"--\".$Object.\"<br>\";\n $mail = new Zend_Mail();\n $mail->addHeader('Reply-To','[email protected]');\n $mail->setBodyHtml($Message)\n ->setFrom('[email protected]','Support Edit-place')\n ->addTo($user_email)\n //->setSubject(utf8_decode($object));\n ->setSubject($Object);\n $mail->send();\n } \n } \n \n }\n }\n }", "title": "" }, { "docid": "235faaa77e4bab85d80c1387bca4a97f", "score": "0.43617904", "text": "public function generate(): void\n {\n if (!$this->cacheManager->has(self::CACHE_KEY)) {\n $sourceCode = '';\n\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addPageTSConfig(\n 'mod.wizards.newContentElement.wizardItems.dce.header = ' .\n 'LLL:EXT:dce/Resources/Private/Language/locallang_db.xlf:tx_dce_domain_model_dce_long'\n );\n\n PHP;\n foreach ($this->input->getDces() as $dce) {\n if ($dce['hidden']) {\n continue;\n }\n $dceIdentifier = $dce['identifier'];\n $dceIdentifierSkipFirst4Chars = substr($dceIdentifier, 4);\n $dceCache = $dce['cache_dce'] ? '[]' : \"[\\T3\\Dce\\Controller\\DceController::class => 'show']\";\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility::configurePlugin(\n 'dce',\n '$dceIdentifierSkipFirst4Chars',\n [\n \\T3\\Dce\\Controller\\DceController::class => 'show',\n ],\n $dceCache,\n \\TYPO3\\CMS\\Extbase\\Utility\\ExtensionUtility::PLUGIN_TYPE_CONTENT_ELEMENT\n );\n\n PHP;\n // When FSC/CSC is not installed\n if (!$GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'] ||\n empty($GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'])\n ) {\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addTypoScriptSetup('\n tt_content.$dceIdentifier = USER\n tt_content.$dceIdentifier {\n userFunc = TYPO3\\CMS\\Extbase\\Core\\Bootstrap->run\n vendorName = T3\n extensionName = Dce\n pluginName = $dceIdentifierSkipFirst4Chars\n }\n ');\n\n PHP;\n } else {\n // When FSC is installed\n if ($dce['direct_output']) {\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addTypoScript(\n 'dce',\n 'setup',\n 'temp.dceContentElement < tt_content.$dceIdentifier.20\n tt_content.$dceIdentifier >\n tt_content.$dceIdentifier < temp.dceContentElement\n temp.dceContentElement >\n ',\n 43\n );\n\n PHP;\n }\n }\n\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addTypoScript(\n 'dce',\n 'setup',\n \"# Hide lib.stdheader for DCE with identifier $dceIdentifier\n tt_content.$dceIdentifier.10 >\",\n 43\n );\n\n PHP;\n\n if ($dce['hide_default_ce_wrap'] && ExtensionManagementUtility::isLoaded('css_styled_content')) {\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addTypoScript(\n 'dce',\n 'setup',\n \"# Hide default wrapping for content elements for DCE with identifier $dceIdentifier}\n tt_content.stdWrap.innerWrap.cObject.default.stdWrap.if.value := addToList($dceIdentifier)\",\n 43\n );\n\n PHP;\n }\n\n if ($dce['enable_container'] && ExtensionManagementUtility::isLoaded('fluid_styled_content')) {\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addTypoScript(\n 'dce',\n 'setup',\n \"# Change fluid_styled_content template name for DCE with identifier $dceIdentifier\n tt_content.$dceIdentifier.templateName = DceContainerElement\",\n 43\n );\n\n PHP;\n }\n\n if ($dce['wizard_enable']) {\n $iconIdentifierCode = $dce['hasCustomWizardIcon']\n ? 'ext-dce-' . $dceIdentifier . '-customwizardicon'\n : $dce['wizard_icon'];\n\n $wizardCategory = $dce['wizard_category'] ?? '';\n $flexformLabel = $dce['flexform_label'] ?? '';\n $title = addcslashes($dce['title'] ?? '', \"'\\\"\");\n $description = addcslashes($dce['wizard_description'] ?? '', \"'\\\"\");\n\n $sourceCode .= <<<PHP\n \\TYPO3\\CMS\\Core\\Utility\\ExtensionManagementUtility::addPageTSConfig(\n \"\n mod.wizards.newContentElement.wizardItems.$wizardCategory.elements.$dceIdentifier {\n iconIdentifier = $iconIdentifierCode\n title = $title\n description = $description\n tt_content_defValues {\n CType = $dceIdentifier\n }\n }\n mod.wizards.newContentElement.wizardItems.$wizardCategory.show := addToList($dceIdentifier)\n TCEFORM.tt_content.pi_flexform.types.$dceIdentifier.label = $flexformLabel\n \"\n );\n\n PHP;\n }\n }\n $this->cacheManager->set(self::CACHE_KEY, $sourceCode);\n }\n $this->cacheManager->requireOnce(self::CACHE_KEY);\n }", "title": "" }, { "docid": "bab27ce3b856f5d642eac90a8e155ab3", "score": "0.43577883", "text": "public function exibir(){\n\t\t$d = array(\n\t\t\t\"modelo\"=>$this->getModelo(),\n\t\t\t\"motor\"=>$this->getMotor(),\n\t\t\t\"ano\"=>$this->getAno()\n\n\t\t);\n\n\n\t}", "title": "" }, { "docid": "a117418601c9349a1dbd545193d2b4b3", "score": "0.4352134", "text": "function freeform_module_insert_end ($fields, $entry_id, $msg)\n\t{\n global $DB, $EXT, $REGX;\n\n // Select the appropriate form entry based on the entry_id in the hook\n $query = $DB->query(\"SELECT * FROM exp_freeform_entries WHERE entry_id = '\".$entry_id.\"' LIMIT 1\");\n if ( $query->num_rows == 0 )\n {\n return;\n }\n \n // New array for our new recipients\n $all_recipients = array();\n\n \n // Grab the recipients from the form results\n $form_fields = $this->settings['form_fields'] ? preg_split(\"/,|\\|/\" , $this->settings['form_fields'] ) : '';\n if (is_array($form_fields))\n {\n foreach ($form_fields as $field)\n {\n // Make sure there's actually a freeform field with this name and that the field value is not empty\n if ((array_key_exists($field, $query->row) && ($query->row[$field] != '')))\n {\n $all_recipients[] = $query->row[$field];\n }\n }\n }\n\n \n // Grab the additional email addresses from the CP settings\n $email_recipients = $this->settings['additional_emails'] ? preg_split(\"/,|\\|/\" , $this->settings['additional_emails'] ) : '';\n \n if (is_array($email_recipients))\n {\n foreach ($email_recipients as $address)\n {\n $all_recipients[] = $address;\n }\n }\n \n \n \n // echo '<pre>';\n // print_r($all_recipients);\n // print_r($msg);\n // echo '</pre>';\n // exit;\n \n\n if ( ! class_exists('EEmail'))\n {\n require PATH_CORE.'core.email'.EXT;\n }\n\n $email = new EEmail;\n $email->wordwrap = FALSE;\n $email->mailtype = 'html';\n\n foreach ($all_recipients as $recipient)\n {\n \n if ( strpos($recipient,'@') === FALSE ) $recipient .= $this->settings['domain'];\n \n $email->initialize();\n $email->from($msg['from_email'], $msg['from_name']);\t\n $email->to($recipient); \n $email->subject($msg['subject']);\t\n $email->message($REGX->entities_to_ascii($msg['msg']));\t\t\n $email->Send();\n \n }\n\n unset($msg);\n\n $EXT->end_script = FALSE;\n\t}", "title": "" }, { "docid": "f8446e7b8b2f9a6d423a38441bd47c6e", "score": "0.43509564", "text": "public function GoEOQ( ) {\n //\n $len = $this->GetLen();\n $this->oStart->GoEOQ();\n $this->SetLen( $len );\n\n }", "title": "" }, { "docid": "d05c2b16e41c44d31a88a71e7cf2ad25", "score": "0.43489668", "text": "function csrfguard_inject()\n{\n\t$data = ob_get_clean();\n\t$data = csrfguard_replace_forms($data);\n\techo $data;\n}", "title": "" }, { "docid": "61b8026eaac87e52385ae34b6efc3ac8", "score": "0.4345867", "text": "protected function generateDcePreview($uid) {\n\t\t$settings = array(\n\t\t\t'contentElementUid' => $uid,\n\t\t\t'dceUid' => $this->getDceUidByContentElementUid($uid),\n\t\t);\n\t\treturn array(\n\t\t\t'header' => $this->runExtbaseController('Dce', 'Dce', 'renderPreview', 'tools_DceDcemodule', array_merge($settings, array('previewType' => 'header'))),\n\t\t\t'bodytext' => $this->runExtbaseController('Dce', 'Dce', 'renderPreview', 'tools_DceDcemodule', array_merge($settings, array('previewType' => 'bodytext'))),\n\t\t);\n\t}", "title": "" }, { "docid": "f9aa3ddc39ebfe8ce841eee2bc504aba", "score": "0.43357983", "text": "function xlsBOF()\n {\n echo pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\n return;\n }", "title": "" }, { "docid": "cbdb5564c9d26388b72c241c15227bb8", "score": "0.4334521", "text": "protected function execute($arguments = array(), $options = array())\n {\n $databaseManager = new sfDatabaseManager($this->configuration);\n $connection = $databaseManager->getDatabase($options['connection'])->getConnection();\n\n \t$etablissement = EtablissementClient::getInstance()->find($arguments['identifiant']);\n $cc = null;\n $interpro = null;\n if (isset($options['code-comptable']) && $options['code-comptable'] && !in_array($options['code-comptable'], ['4110000C0', '4110000C'])) {\n $cc = $options['code-comptable'];\n }\n if (isset($options['interpro']) && $options['interpro']) {\n $interpro = $options['interpro'];\n }\n\n if (!$etablissement) {\n $this->logSection(\"generate:societe-by-etablissement\", \"Etablissement not found with id : \".$arguments['identifiant'], null, 'ERROR');\n return;\n }\n\n if (($s = SocieteClient::getInstance()->find($etablissement->identifiant)) && $cc) {\n if ($ccExistant = $s->getCodeComptableClient($interpro)) {\n $this->logSection(\"generate:societe-by-etablissement\", \"Société \".$arguments['identifiant'].\" ($cc) existante avec le code comptable : \".$ccExistant, null, 'WARNING');\n return;\n } else {\n $s->addCodeComptableClient($cc, $interpro);\n $s->save();\n $this->logSection(\"generate:societe-by-etablissement\", \"Affectation du code comptable $cc pour la societe déjà existante \".$s->_id, null, 'SUCCESS');\n return;\n }\n }\n\n try {\n $societe = $etablissement->getGenerateSociete();\n } catch (Exception $e) {\n $this->logSection(\"generate:societe-by-etablissement\", \"Generation impossible : \".$e->getMessage(), null, 'ERROR');\n return;\n }\n\n if ($cc) {\n $societe->addCodeComptableClient($cc, $interpro);\n }\n\n $societe->save();\n $this->logSection(\"generate:societe-by-etablissement\", \"Société créée avec succès \".$societe->_id.\" (\".$societe->getCodeComptableClient($interpro).\")\", null, 'SUCCESS');\n\n }", "title": "" }, { "docid": "3721b2b65609ab3bf94f9280edfe6dde", "score": "0.43298572", "text": "function writeEnvMdf($con, $exp_id) {\n\t\t\n\t\t$dbConnectInput[\"dc_sql_type\"] = \"select\";\n\t\t$dbConnectInput[\"dc_process_name\"] = \"\";\n\n\t\t// Write ENVIRONMENT MODIFICATIONS section\n\t\t$dbConnectInput[\"dc_sql\"] = \"SELECT * FROM environ_modif_levels as lev, environ_modif_events as eve WHERE lev.exp_id = '\" . $exp_id . \"' AND lev.exp_id = eve.exp_id AND lev.em = eve.em ORDER BY lev.em\";\n\t\t$dbConnectOutput = excuteSql($con, $dbConnectInput);\n\t\t$ret = $dbConnectOutput[\"dc_result\"];\n\t\t$num = $dbConnectOutput[\"dc_result_num\"];\n\n\t\t// write title\n\t\tif ($num > 0) {\n\t\t\techo \"*ENVIRONMENT MODIFICATIONS\\r\\n\";\n\t\t\techo \"@E ODATE EDAY ERAD EMAX EMIN ERAIN ECO2 EDEW EWIND ENVNAME\\r\\n\";\n\t\t}\n\n\t\t// write content\n\t\tfor ($i = 0; $i < $num; $i++) {\n\t\t\t\n\t\t\t// format the output data\n\t\t\t$em = formatStr(\"%2d\", $ret[$i][\"em\"]);\n\t\t\t$emday = changeDate2Days(\" %05d\", $ret[$i][\"emday\"]);\n\t\t\t$ecdyl = formatStr(\" %1s\", $ret[$i][\"ecdyl\"]);\n\t\t\t$emdyl = formatStr(\"%4.1f\", $ret[$i][\"emdyl\"]);\n\t\t\t$ecrad = formatStr(\" %1s\", $ret[$i][\"ecrad\"]);\n\t\t\t$emrad = formatStr(\"%4.1f\", $ret[$i][\"emrad\"]);\n\t\t\t$ecmax = formatStr(\" %1s\", $ret[$i][\"ecmax\"]);\n\t\t\t$emmax = formatStr(\"%4.1f\", $ret[$i][\"emmax\"]);\n\t\t\t$ecmin = formatStr(\" %1s\", $ret[$i][\"ecmin\"]);\n\t\t\t$emmin = formatStr(\"%4.1f\", $ret[$i][\"emmin\"]);\n\t\t\t$ecrai = formatStr(\" %1s\", $ret[$i][\"ecrai\"]);\n\t\t\t$emrai = formatStr(\"%4.1f\", $ret[$i][\"emrai\"]);\n\t\t\t$ecco2 = formatStr(\" %1s\", $ret[$i][\"ecco2\"]);\n\t\t\t$emco2 = formatStr(\"%4.0f\", $ret[$i][\"emco2\"]);\n\t\t\t$ecdew = formatStr(\" %1s\", $ret[$i][\"ecdew\"]);\n\t\t\t$emdew = formatStr(\"%4.1f\", $ret[$i][\"emdew\"]);\n\t\t\t$ecwnd = formatStr(\" %1s\", $ret[$i][\"ecwnd\"]);\n\t\t\t$emwnd = formatStr(\"%4.1f\", $ret[$i][\"emwnd\"]);\n\t\t\t$em_name = \" \" . $ret[$i][\"em_name\"];\n\t\t\t\n\t\t\techo $em . $emday . $ecdyl . $emdyl . $ecrad . $emrad . $ecmax . $emmax . $ecmin . $emmin . $ecrai . $emrai . $ecco2 . $emco2 . $ecdew . $emdew . $ecwnd . $emwnd . $em_name . \"\\r\\n\";\n\t\t}\n\t\techo \"\\r\\n\";\n\t}", "title": "" }, { "docid": "96f1495a708440cbef4e5d4f6951ccc6", "score": "0.43291628", "text": "public function generoEA() {\n return $this->isMasc() ? \"e\" : \"a\";\n }", "title": "" }, { "docid": "259699b1308cb7efe22b8e3ad5b383c6", "score": "0.4321071", "text": "public function retornoEPIsB($EPIs, $em){\n\t\t$CertificadoAprovacaoService = new \\Service\\CertificadoAprovacaoService;\n\t\t$retornoEPI = [];\n\t\t foreach($EPIs as $epi){\n\t\t \tif(!empty($epi)){\n\t\t \t$ca = $CertificadoAprovacaoService->find($epi->getCertificadoAprovacao()->getId(), $em);\n\t\t \t$retornoEPI[] = [\n\t\t \t\t'numeroCA' => $ca->getId(),\n\t\t \t\t'nome' => $ca->getNome(),\n\t\t \t\t'dataValidade' => $this->dataParaString($ca->getDataValidade()),\n\t\t \t\t'aprovadoPara' => mb_strtolower($ca->getAprovadoPara()),\n\t\t \t\t'visualizar' => '<a href=\"http://localhost/qualepi/index.php/EPIController/visualizarEPI/'.$ca->getId().'\" target=\"_blank\"><i class=\"fas fa-info-circle\"> </i></a>',\n\t\t \t\t'remover' => '<a href=\"http://localhost/qualepi/index.php/FavoritoController/remover/'.$ca->getId().'\"><i class=\"fas fa-trash-alt\"> </i></a>'\n\t\t \t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\treturn $retornoEPI;\n\t}", "title": "" }, { "docid": "d7969365cde6da0895b93aadb0e3c674", "score": "0.4316403", "text": "protected function _adMessageBody()\r\n\t{\r\n\t}", "title": "" }, { "docid": "a179b252f452d5cee474dad44a28182f", "score": "0.43148366", "text": "function ricca3_shortcode_baixaespec($atts, $content = null) {\r\n\tglobal $wpdb;\r\n\tglobal $ricca3_butons_editardades;\r\n\tglobal $ricca3_baixaespec;\r\n\tglobal $current_user;\r\n\r\n\tget_currentuserinfo();\t\r\n//\t\tpantalla inicial\r\n\t$row_alu = $wpdb->get_row($wpdb->prepare('SELECT * FROM ricca3_alumne WHERE idalumne=%s', $_GET['ID']), ARRAY_A, 0);\r\n\t$image_attributes = ricca3_miniatura($_GET['ID']);\r\n//\t\tmissatge de capçalera de la pàgina\r\n\tricca3_missatge(sprintf('%s %s</td><td><img src=\"%s\" width=\"%s\" height=\"%s\">', __('Donar de baixa d\\'una especialitat a l\\'alumne','ricca3-alum'), $row_alu['cognomsinom'], $image_attributes[0], $image_attributes[1], $image_attributes[2] ));\r\n\t$token = array( 'espec' => $_GET['espec'], 'grup' => $_GET['grup'], 'any' => $_GET['any'], 'estat' => $_GET['estat'], 'repe' => $_GET['repe']);\r\n//\tajuda al butons\r\n\t$ricca3_butons_editardades['texte'][0] = __('ajuda-editardades-especialitats', 'ricca3-alum');\r\n\t$ricca3_butons_editardades['texte'][1] = __('ajuda-editardades-dadesalumne', 'ricca3-alum');\r\n\t$ricca3_butons_editardades['texte'][2] = __('ajuda-editardades-alumnes', 'ricca3-alum');\r\n//\t\tmostrar la filera de butons\r\n\tricca3_butons( $ricca3_butons_editardades, 6, $token );\r\n//\tsi ha premut el buto de guardar dades, actualitzem\r\n\tif( isset( $_POST['accio'] ) && $_POST['accio'] == 'baixaespec' && isset($_POST['cbox'])){\r\n\t\tfor( $i = 0; $i <count($_POST['cbox']); $i++){\r\n\t\t\t$row = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumne_especialitat where idalumespec = %s', \r\n\t\t\t\t$_POST['cbox'][$i] ),ARRAY_A,0);\r\n//\tsi ja està de baixa, la donem d'alta\r\n\t\t\tif($row['idestat_es'] == 2 ){\r\n//\t\t\t\t$result = $wpdb->update('ricca3_alumne_especialitat' , array('idestat_es' => 1, 'motiubaixa' => '', 'stampuser' => $current_user->user_login, 'stampplace' => 'ricca_shortcode_baixaespec' ) , array( 'idalumespec' => $_POST['cbox'][$i] ));\r\n\t\t\t\t$result = ricca3_dbupdate('ricca3_alumne_especialitat' , array('idestat_es' => 1, 'motiubaixa' => '', 'stampuser' => $current_user->user_login, 'stampplace' => 'ricca_shortcode_baixaespec' ) , array( 'idalumespec' => $_POST['cbox'][$i] ));\r\n// si està d'alta, la donem de baixa\r\n\t\t\t}else{\r\n//\t\t\t\t$result = $wpdb->update('ricca3_alumne_especialitat' , array('idestat_es' => 2, 'motiubaixa' => $_POST['motiu'], 'stampuser' => $current_user->user_login, 'stampplace' => 'ricca_shortcode_baixaespec' ) , array( 'idalumespec' => $_POST['cbox'][$i] ));\r\n\t\t\t\t$result = ricca3_dbupdate('ricca3_alumne_especialitat' , array('idestat_es' => 2, 'motiubaixa' => $_POST['motiu'], 'stampuser' => $current_user->user_login, 'stampplace' => 'ricca_shortcode_baixaespec' ) , array( 'idalumespec' => $_POST['cbox'][$i] ));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n//\tESBORRA especialitat\r\n\tif( isset( $_POST['accio'] ) && $_POST['accio'] == 'borraespec' && isset($_POST['cbox'])){\r\n\t\tfor( $i = 0; $i <count($_POST['cbox']); $i++){\r\n//\t\t\tif( $wpdb->delete('ricca3_alumne_especialitat', array('idalumespec' => $_POST['cbox'][$i]) ) ){\r\n\t\t\tif( ricca3_dbdelete('ricca3_alumne_especialitat', array('idalumespec' => $_POST['cbox'][$i]) ) ){\r\n\t\t\t\tricca3_missatge( __('Especialitat esborrada amb exit!', 'ricca3-alum'));\r\n\t\t\t}else{\r\n\t\t\t\tricca3_missatge( __('No s\\'ha pogut esborrar l\\'especialitat!', 'ricca3-alum'));\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n//\t\tajuda a la graella\r\n\t$ricca3_baixaespec['ajuda'][1] = __('ajuda-graella-baixaespec-motiu', 'ricca3-alum');\r\n\t$ricca3_baixaespec['ajuda'][2] = __('ajuda-graella-baixaespec-nom', 'ricca3-alum');\r\n\t$ricca3_baixaespec['ajuda'][3] = __('ajuda-graella-baixaespec-any', 'ricca3-alum');\r\n\t$ricca3_baixaespec['ajuda'][4] = __('ajuda-graella-baixaespec-espec', 'ricca3-alum');\r\n\t$ricca3_baixaespec['ajuda'][5] = __('ajuda-graella-baixaespec-grup', 'ricca3-alum');\r\n\t$ricca3_baixaespec['ajuda'][6] = __('ajuda-graella-baixaespec-estat', 'ricca3-alum');\r\n//\t\tbuscar especialitats\r\n\t$data_view = $wpdb->get_results( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne = %s ORDER BY idespecialitat, idany ',$_GET['ID']), ARRAY_A);\r\n//\t\tllistat de les especialitats del alumne\r\n\tprintf('<form method=\"post\" action=\"\" target=\"_self\" name=\"Baixes\" id=\"baixes\">', NULL);\r\n\tricca3_graella( $ricca3_baixaespec, $data_view, $token );\r\n\tprintf('</table>', NULL);\r\n\tprintf('<table><tr><td title=\"%s\">%s<INPUT type=\"text\" name=\"motiu\" size=\"30\" value=\"\" /> </td></tr></table>',\r\n\t\t__('ajuda-baixaespec-motiubaixa', 'ricca3_alum'), __('Motiu Baixa', 'ricca3-alum') );\r\n\tricca3_desar('accio', 'baixaespec', __('ajuda-desar-baixaespec', 'ricca3-alum'));\r\n\tricca3_missatge(sprintf('%s %s', __('Esborrar una especialitat a l\\'alumne','ricca3-alum'), $row_alu['cognomsinom']));\r\n\tricca3_desar('accio', 'borraespec', __('ajuda-desar-borraespec', 'ricca3-alum'));\r\n\tprintf('</td></tr></table></form>', NULL);\r\n}", "title": "" }, { "docid": "30f0116abf5d3b31eefe7d3d0f4bb0ec", "score": "0.43130055", "text": "public function villca()\n {\n\n\n \n $nombre_impresora = \"POS\"; \n\n\n $connector = new WindowsPrintConnector($nombre_impresora);\n $printer = new Printer($connector);\n #Mando un numero de respuesta para saber que se conecto correctamente.\n echo 1;\n /*\n Vamos a imprimir un logotipo\n opcional. Recuerda que esto\n no funcionará en todas las\n impresoras\n\n Pequeña nota: Es recomendable que la imagen no sea\n transparente (aunque sea png hay que quitar el canal alfa)\n y que tenga una resolución baja. En mi caso\n la imagen que uso es de 250 x 250\n */\n\n # Vamos a alinear al centro lo próximo que imprimamos\n $printer->setJustification(Printer::JUSTIFY_CENTER);\n\n /*\n Intentaremos cargar e imprimir\n el logo\n */\n\n \n try{\n $logo = EscposImage::load(public_path('img/logo.png'), false);\n $printer->bitImage($logo);\n }catch(Exception $e){/*No hacemos nada si hay error*/}\n\n /*\n Ahora vamos a imprimir un encabezado\n */\n\n $printer->text(\"\\n\".\"LA PRECIOSA \" . \"\\n\");\n $printer->text(\"Direccion: Orquídeas #151\" . \"\\n\");\n $printer->text(\"Tel: 454664544\" . \"\\n\");\n #La fecha también\n date_default_timezone_set(\"America/Mexico_City\");\n $printer->text(date(\"Y-m-d H:i:s\") . \"\\n\");\n $printer->text(\"-----------------------------\" . \"\\n\");\n $printer->setJustification(Printer::JUSTIFY_LEFT);\n $printer->text(\"CANT DESCRIPCION P.U IMP.\\n\");\n $printer->text(\"-----------------------------\".\"\\n\");\n /*\n Ahora vamos a imprimir los\n productos\n */\n /*Alinear a la izquierda para la cantidad y el nombre*/\n $printer->setJustification(Printer::JUSTIFY_LEFT);\n $printer->text(\"Producto Galletas\\n\");\n $printer->text( \"2 pieza 10.00 20.00 \\n\");\n $printer->text(\"Sabrtitas \\n\");\n $printer->text( \"3 pieza 10.00 30.00 \\n\");\n $printer->text(\"Doritos \\n\");\n $printer->text( \"5 pieza 10.00 50.00 \\n\");\n /*\n Terminamos de imprimir\n los productos, ahora va el total\n */\n $printer->text(\"-----------------------------\".\"\\n\");\n $printer->setJustification(Printer::JUSTIFY_RIGHT);\n $printer->text(\"SUBTOTAL: $100.00\\n\");\n $printer->text(\"IVA: $16.00\\n\");\n $printer->text(\"TOTAL: $116.00\\n\");\n\n\n /*\n Podemos poner también un pie de página\n */\n $printer->setJustification(Printer::JUSTIFY_CENTER);\n $printer->text(\"Muchas gracias por su compra\\n\");\n\n try{\n $logo = EscposImage::load(public_path('img/logo.png'), false);\n $printer->bitImage($logo);\n }catch(Exception $e){/*No hacemos nada si hay error*/}\n\n\n /*Alimentamos el papel 3 veces*/\n $printer->feed(3);\n\n /*\n Cortamos el papel. Si nuestra impresora\n no tiene soporte para ello, no generará\n ningún error\n */\n $printer->cut();\n\n /*\n Por medio de la impresora mandamos un pulso.\n Esto es útil cuando la tenemos conectada\n por ejemplo a un cajón\n */\n $printer->pulse();\n\n /*\n Para imprimir realmente, tenemos que \"cerrar\"\n la conexión con la impresora. Recuerda incluir esto al final de todos los archivos\n */\n $printer->close();\n\n }", "title": "" }, { "docid": "7fb3c5239e499d969e69bfc5a20c2a80", "score": "0.43129972", "text": "public function postGenerateInvoice()\n\t{\n\t\treturn $this->OpenCmsManagerService->generateInvoice( $this->Input->all() );\n\t}", "title": "" }, { "docid": "8d3471201bf37f20ecbfbf1dce6f318d", "score": "0.43079606", "text": "public function getAdminCommissionInvoiceContent()\n {\n $invoiceAddressPatternRules = Tools::jsonDecode(Configuration::get('PS_INVCE_INVOICE_ADDR_RULES'), true);\n $deliveryAddressPatternRules = Tools::jsonDecode(Configuration::get('PS_INVCE_DELIVERY_ADDR_RULES'), true);\n $invoice_address = new Address((int) $this->order->id_address_invoice);\n $country = new Country((int) $invoice_address->id_country);\n\n $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, $invoiceAddressPatternRules, '<br />', ' ');\n $delivery_address = null;\n $formatted_delivery_address = '';\n\n $delivery_address = new Address((int) $this->order->id_address_delivery);\n $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, $deliveryAddressPatternRules, '<br />', ' ');\n\n $customer = new Customer((int) $this->order->id_customer);\n\n $orderDetails = $this->order->getProducts();\n\n $seller_total_products = 0;\n // customize order_details to maintain tax\n foreach ($orderDetails as $key => $row) {\n // Add information for virtual product\n if ($orderDetails[$key]['download_hash'] && !empty($row['download_hash'])) {\n $orderDetails[$key]['filename'] = ProductDownload::getFilenameFromIdProduct((int) $row['product_id']);\n // Get the display filename\n $orderDetails[$key]['display_filename'] = ProductDownload::getFilenameFromFilename($row['filename']);\n }\n\n $orderDetails[$key]['id_address_delivery'] = $this->order->id_address_delivery;\n\n /* Ecotax */\n $roundMode = $this->order->round_mode;\n\n $orderDetails[$key]['ecotax_tax_excl'] = $row['ecotax']; // alias for coherence\n $orderDetails[$key]['ecotax_tax_incl'] = $row['ecotax'] * (100 + $row['ecotax_tax_rate']) / 100;\n\n $row['ecotax_tax_incl'] = $row['ecotax'] * (100 + $row['ecotax_tax_rate']) / 100;\n $row['ecotax_tax_excl'] = $row['ecotax'];\n\n $orderDetails[$key]['ecotax_tax'] = $row['ecotax_tax_incl'] - $row['ecotax_tax_excl'];\n\n if ($roundMode == Order::ROUND_ITEM) {\n $row['ecotax_tax_incl'] = Tools::ps_round($row['ecotax_tax_incl'], _PS_PRICE_COMPUTE_PRECISION_, $roundMode);\n }\n\n $orderDetails[$key]['total_ecotax_tax_excl'] = $row['ecotax_tax_excl'] * $row['product_quantity'];\n $orderDetails[$key]['total_ecotax_tax_incl'] = $row['ecotax_tax_incl'] * $row['product_quantity'];\n $row['total_ecotax_tax_incl'] = $row['ecotax_tax_incl'] * $row['product_quantity'];\n $row['total_ecotax_tax_excl'] = $row['ecotax_tax_excl'] * $row['product_quantity'];\n\n $orderDetails[$key]['total_ecotax_tax'] = $row['total_ecotax_tax_incl'] - $row['total_ecotax_tax_excl'];\n $row['total_ecotax_tax'] = $row['total_ecotax_tax_incl'] - $row['total_ecotax_tax_excl'];\n $row['ecotax_tax'] = $row['ecotax_tax_incl'] - $row['ecotax_tax_excl'];\n\n foreach (array(\n 'ecotax_tax_excl',\n 'ecotax_tax_incl',\n 'ecotax_tax',\n 'total_ecotax_tax_excl',\n 'total_ecotax_tax_incl',\n 'total_ecotax_tax',\n ) as $ecotaxField) {\n $orderDetails[$key][$ecotaxField] = Tools::ps_round($row[$ecotaxField], _PS_PRICE_COMPUTE_PRECISION_, $roundMode);\n }\n // Aliases\n $orderDetails[$key]['unit_price_tax_excl_including_ecotax'] = $row['unit_price_tax_excl'];\n $orderDetails[$key]['unit_price_tax_incl_including_ecotax'] = $row['unit_price_tax_incl'];\n $orderDetails[$key]['total_price_tax_excl_including_ecotax'] = $row['total_price_tax_excl'];\n $orderDetails[$key]['total_price_tax_incl_including_ecotax'] = $row['total_price_tax_incl'];\n }\n\n $hasDiscount = false;\n $context = Context::getContext();\n // $locale = static::getContextLocale($context);\n foreach ($orderDetails as $id => &$orderDetail) {\n if ($this->id_seller == 0) {\n $isBelongToSeller = $this->getSellerProductInfoByProductId($orderDetail['product_id']);\n if ($isBelongToSeller) {\n unset($orderDetails[$id]);\n continue;\n }\n } else {\n $isBelongToSeller = $this->getSellerProductInfo($orderDetail['product_id']);\n if (!$isBelongToSeller) {\n unset($orderDetails[$id]);\n continue;\n }\n }\n // Find out if column 'price before discount' is required\n if ($orderDetail['reduction_amount_tax_excl'] > 0) {\n $hasDiscount = true;\n $orderDetail['unit_price_tax_excl_before_specific_price'] = $orderDetail['unit_price_tax_excl_including_ecotax'] + $orderDetail['reduction_amount_tax_excl'];\n } elseif ($orderDetail['reduction_percent'] > 0) {\n $hasDiscount = true;\n $orderDetail['unit_price_tax_excl_before_specific_price'] = (100 * $orderDetail['unit_price_tax_excl_including_ecotax']) / (100 - $orderDetail['reduction_percent']);\n }\n if (isset($orderDetail['unit_price_tax_excl_before_specific_price'])) {\n $orderDetail['unit_price_tax_excl_before_specific_price'] = Tools::displayPrice(\n Tools::ps_round($orderDetail['unit_price_tax_excl_before_specific_price'], 2),\n (new Currency($this->order->id_currency))->iso_code\n );\n }\n // Set tax_code\n $taxes = OrderDetail::getTaxListStatic($id);\n $tax_temp = array();\n $objModule = new MpSellerInvoice();\n foreach ($taxes as $tax) {\n $obj = new Tax($tax['id_tax']);\n $tax_temp[] = sprintf($objModule->l('%1$s%2$s%%'), ($obj->rate + 0), '&nbsp;');\n }\n $seller_total_products += $orderDetail['total_price_tax_excl'];\n $orderDetail['order_detail_tax'] = $taxes;\n $orderDetail['order_detail_tax_label'] = implode(', ', $tax_temp);\n $sellerOrder = $this->getProductCommissionDetail($orderDetail['product_id'], $orderDetail['product_attribute_id']);\n\n if ($sellerOrder) {\n $orderDetails[$id]['admin_commission'] = $sellerOrder['admin_commission'];\n $orderDetails[$id]['admin_commission_tax'] = $sellerOrder['admin_tax'];\n $orderDetails[$id]['seller_amount'] = $sellerOrder['seller_amount'];\n $orderDetails[$id]['seller_amount_tax'] = $sellerOrder['seller_tax'];\n }\n unset($sellerOrder);\n }\n\n unset($tax_temp);\n unset($orderDetail);\n\n // Calculate all the seller and admin amount from the order\n $totalCommission = $totalAdminCommission = $totalAdminCommissionTax = $sellerTotal = $sellerTotalTax = 0;\n $objOrderDetail = new WkMpSellerOrderDetail();\n $sellerOrderDetail = $objOrderDetail->getSellerProductFromOrder($this->order->id, $this->id_seller_customer);\n\n if ($sellerOrderDetail) {\n foreach ($sellerOrderDetail as $sellerDetail) {\n $totalAdminCommission += $sellerDetail['admin_commission'];\n $totalAdminCommissionTax += $sellerDetail['admin_tax'];\n $sellerTotal += $sellerDetail['seller_amount'];\n $sellerTotalTax += $sellerDetail['seller_tax'];\n $totalCommission += $sellerDetail['admin_commission'];\n $totalCommission += $sellerDetail['admin_tax'];\n }\n }\n // ---------------------------------------------------------------\n $sellerCommission = new WkMpCommission();\n $commissionRate = $sellerCommission->getCommissionRate($this->id_seller_customer);\n if (!$commissionRate) {\n $commissionRate = Configuration::get('WK_MP_GLOBAL_COMMISSION');\n }\n $adminDiscount = 0;\n if ($this->order->total_discounts > 0) {\n $roundMode = $this->order->round_mode;\n $adminDiscount = (Tools::ps_round($this->order->total_discounts, _PS_PRICE_COMPUTE_PRECISION_, $roundMode))* $commissionRate;\n $adminDiscount = $adminDiscount / 100;\n $adminDiscount = Tools::ps_round($adminDiscount, _PS_PRICE_COMPUTE_PRECISION_, $roundMode);\n }\n\n $data = array(\n 'currency' => new Currency($this->order->id_currency),\n 'sellerTotal' => $sellerTotal,\n 'sellerTotalTax' => $sellerTotalTax,\n 'totalAdminCommission' => $totalAdminCommission,\n 'totalAdminCommissionTax' => $totalAdminCommissionTax,\n 'totalCommission' => $totalCommission,\n 'sellerCommissionRate' => $commissionRate,\n 'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_,\n 'adminDiscount' => $adminDiscount\n //'round_type' => $round_type,\n );\n\n if (Tools::getValue('debug')) {\n die(json_encode($data));\n }\n\n if ($this->adminInvoice) {\n unset($data['tax_tab']);\n }\n\n return $data;\n }", "title": "" }, { "docid": "af533fff344d08a82571f4b50b64e9ba", "score": "0.4306157", "text": "function bannieres_encart($flux) {\r\n\r\n\t$id_banniere = $flux;\r\n\r\n\t// pour charger une banniere au moment de la création, on fait comme dans de core\r\n\t// inspiré de articles_edit.php\r\n\tif ($id_banniere != 'oui') {\r\n\t\t$bloc_doc = afficher_documents_colonne($id_banniere, 'banniere');\r\n\t} else {\r\n\t\t$bloc_doc = afficher_documents_colonne(0-$GLOBALS['visiteur_session']['id_auteur'], 'banniere');\r\n\t}\r\n\r\n\t// affiche le resultat obtenu\r\n\t$navigation = $bloc_doc . pipeline('affiche_milieu',array('args' => array('exec' => 'bannieres', 'id_banniere' => $id_banniere), 'data' => ''));\r\n\r\n\treturn $navigation;\r\n}", "title": "" }, { "docid": "31e989d1152da9b165432508fb82e3ae", "score": "0.43048516", "text": "function write_certification() {\r\n \tglobal $CFG;\r\n // initial string;\r\n $expout = \"\";\r\n\t $id = $this->ireferentiel->id;\r\n\r\n \t// add comment and div tags\r\n \t$expout .= \"<!-- certification : \".$this->ireferentiel->id.\" name: \".$this->ireferentiel->name.\" -->\\n\";\r\n \t$expout .= \"<div class=\\\"referentiel\\\">\\n\";\r\n\r\n \t// add header\r\n \t$expout .= \"<h2>\".$this->ireferentiel->name.\"</h2>\\n\";\r\n \t// \r\n\t\t $expout .= \"<ul>\\n\";\r\n\t\t // \r\n if ($this->ireferentiel){\r\n $id = $this->ireferentiel->id;\r\n $name = trim($this->ireferentiel->name);\r\n $description = trim($this->ireferentiel->description_instance);\r\n $label_domaine = trim($this->ireferentiel->label_domaine);\r\n $label_competence = trim($this->ireferentiel->label_competence);\r\n $label_item = trim($this->ireferentiel->label_item);\r\n $date_instance = $this->ireferentiel->date_instance;\r\n $course = $this->ireferentiel->course;\r\n $ref_referentiel = $this->ireferentiel->ref_referentiel;\r\n\t\t\t$visible = $this->ireferentiel->visible;\r\n\r\n if ($this->format_condense){\r\n $expout .= \" <b>\".get_string('instance','referentiel').\"</b><li><b>\".get_string('name','referentiel').\"</b> : $name</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('description','referentiel').\"</b> : $description</li>\\n\";\r\n }\r\n else{\r\n $expout .= \" <li><b>\".get_string('id','referentiel').\"</b> : $id</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('name','referentiel').\"</b> : $name</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('description','referentiel').\"</b> : $description</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('label_domaine','referentiel').\"</b> : $label_domaine</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('label_competence','referentiel').\"</b> : $label_competence</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('label_item','referentiel').\"</b> : $label_item</li>\\n\"; \r\n $expout .= \" <li><b>\".get_string('date_instance','referentiel').\"</b> : \".date(\"Y/m/d\",$date_instance).\"</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('course').\"</b> : $course</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('ref_referentiel','referentiel').\"</b> : $ref_referentiel</li>\\n\";\r\n $expout .= \" <li><b>\".get_string('visible','referentiel').\"</b> : $visible</li>\\n\";\r\n\t\t\t}\r\n }\r\n \r\n\t\t// CERTIFICATS\r\n\t\tif (empty($this->rreferentiel) && (!empty($this->ireferentiel->ref_referentiel) && ($this->ireferentiel->ref_referentiel>0))){\r\n \t\t\t\t$this->rreferentiel = referentiel_get_referentiel_referentiel($this->ireferentiel->ref_referentiel); \r\n }\r\n\r\n if (!empty($this->rreferentiel)){\r\n $expout .= $this->write_referentiel($this->rreferentiel);\r\n\r\n if (!$this->records_certificats){\r\n $this->records_certificats = referentiel_get_certificats($this->rreferentiel->id);\r\n }\r\n // print_r($this->records_certificats);\r\n\r\n\t\t \tif ($this->records_certificats){\r\n\t\t\t\t\t foreach ($this->records_certificats as $record){\r\n\t\t\t\t\t\t $expout .= $this->write_certificat( $record );\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n }\r\n $expout .= \" </ul>\\n\";\r\n $expout .= \"</div>\\n\";\r\n return $expout;\r\n }", "title": "" }, { "docid": "9b99f87a4912b3eea0b52837162ba444", "score": "0.43002546", "text": "function build_edms($session,$output='htm') {\n\t\techo 'Building EDMs from '.$session.\"\\n\";\n\t\t$result = mysql_query(\"SELECT * FROM edms WHERE session='\".$session.\"' ORDER BY id ASC\") or die(mysql_error());\n\t\twhile($row = mysql_fetch_assoc($result)) {\n\t\t\techo 'Building '.$row['title'].\"\\n\";\n\t\t\t$this->build_edm($row['id'],'id',$output);\n\t\t}\n\t}", "title": "" }, { "docid": "fdfce79ccee822bf788cbec1f9fa430e", "score": "0.4298285", "text": "function generateLetterPDF($applicationDetails,$appMiddleName,$documentDetails,$appId,$personalDetBarcode,$idDocBarcodes,$initiatingBarcode,$app_email,$orgId,$actionType)\n {\n $cntDoc = count($documentDetails);\n for($i = 0;$i < count($applicationDetails);$i++)\n {\n $applicationDetails[$i]['formatedDate'] = $this->formateDOB($applicationDetails[$i]['dob'],true);\n $applicationDetails[$i]['forname'] = ucfirst($applicationDetails[$i]['forname']);\n $applicationDetails[$i]['surname'] = ucfirst($applicationDetails[$i]['surname']);\n $applicationDetails[$i]['address1'] = ucfirst($applicationDetails[$i]['address1']);\n $applicationDetails[$i]['postcode'] = strtoupper($applicationDetails[$i]['postcode']);\n $applicationDetails[$i]['town_city'] = ucfirst($applicationDetails[$i]['town_city']);\n $applicationDetails[$i]['door_no'] = strtoupper($this->DOORNO);\n//// if($applicationDetails[$i]['door_no'] == '')\n//// {\n// $applicationDetails[$i]['door_no'] == 'N/A';\n//// }\n }\n \n \n for($i = 0;$i < count($appMiddleName);$i++)\n {\n $appMiddleName[$i]['middlename'] = ucfirst($appMiddleName[$i]['middlename']);\n }\n for($i = 0;$i < count($documentDetails);$i++)\n {\n $documentDetails[$i]['formatedDate'] = $this->formateDOB($documentDetails[$i]['Issue Date'],true);\n \n if(trim($documentDetails[$i]['Issue Date']) == '')\n {\n $documentDetails[$i]['Issue Date'] = 'N/A';\n $documentDetails[$i]['formatedDate'] = 'N/A';\n }\n \n if(trim($documentDetails[$i]['Ref']) == '')\n {\n $documentDetails[$i]['Ref'] = 'N/A';\n }\n \n $idDocBarcodes[$i] = $this->sepBarcode($idDocBarcodes[$i]);\n }\n \n \n if(count($documentDetails) < 5)\n {\n for($j = count($documentDetails);$j < 5;$j++)\n {\n $documentDetails[$j]['Document Name'] = \"Not Applicable\";\n $documentDetails[$j]['Short Name'] = \"N/A\";\n $documentDetails[$j]['Issue Date\"'] = \"N/A\";\n $documentDetails[$j]['Ref'] = \"N/A\";\n $documentDetails[$j]['formatedDate'] = \"N/A\";\n }\n }\n $usedByDate = $this->formateUsedBydate($this->USEDBYDATE);\n $appDetails = $this->getFormatedAppDetails($applicationDetails, $appMiddleName);\n $this->append_Zero($this->TOTAL_FEE);\n $personalDetBarcode = $this->sepBarcode($personalDetBarcode);\n \n $initiatingBarcode = $this->sepBarcode($initiatingBarcode);\n \n //$this->saveAppBarcodeInfo($appId,$initiatingBarcode,$personalDetBarcode,$idDocBarcodes,$usedByDate);\n $this->saveBarcodeDetails($appId,$initiatingBarcode,$personalDetBarcode,$idDocBarcodes,$usedByDate);\n \n// if($this->DOC_EXPIRES <> 'Y')\n// {\n // Used By Date reduced by one while displaying\n $usedByDateArry = explode(\"/\", $usedByDate);\n $usedByDateTS = mktime(0, 0, 0, $usedByDateArry[1], $usedByDateArry[0], $usedByDateArry[2]);\n $usedByDate = date(\"d/m/y\", strtotime(\"-1 day\",$usedByDateTS));\n// }\n $objLetterPDF = new LetterPDF(IMAGE_PATH);\n $objLetterPDF->generateLetter($applicationDetails, $appMiddleName, $documentDetails,$this->TOTAL_FEE,$usedByDate,$appId,$appDetails,$personalDetBarcode,$idDocBarcodes,$initiatingBarcode,$cntDoc,$app_email,$orgId,$actionType);\n }", "title": "" }, { "docid": "8f014f8678d4747d1280aaf0c10428f2", "score": "0.42901385", "text": "function createMail($co_control_doc,$nu_correc_doc,$co_estado){\n\t\tinclude_once('../config.php');\n\t\t$conn=mysql_connect($dbhost,$dbuser,$dbpasswd);\n\t\tmysql_select_db($dbname,$conn);\n\t\t$result=mysql_query(\"SELECT ude.*,e.*,d.*,\n\t\t\t\t\t\t\tus.nb_usuario AS nb_solicitante,\n\t\t\t\t\t\t\tuc.nb_usuario AS nb_coordinador,\n\t\t\t\t\t\t\tu_ort.nb_usuario AS nb_ortografico,\n\t\t\t\t\t\t\tu_tec.nb_usuario AS nb_tecnico,\n\t\t\t\t\t\t\tu_adm.nb_usuario AS nb_administrativo\n\t\t\t\t\t\t\tFROM (c006t_usr_doc_estado AS ude,c001t_documento AS d,i005t_estado AS e, c002t_usuario AS uc)\n\t\t\t\t\t\t\tLEFT JOIN c002t_usuario AS us ON d.co_indicador_sol=us.co_indicador\n\t\t\t\t\t\t\tLEFT JOIN c002t_usuario AS u_ort ON d.co_indicador_rev_ort=u_ort.co_indicador\n\t\t\t\t\t\t\tLEFT JOIN c002t_usuario AS u_tec ON d.co_indicador_rev_tec=u_tec.co_indicador\n\t\t\t\t\t\t\tLEFT JOIN c002t_usuario AS u_adm ON d.co_indicador_rev_adm=u_adm.co_indicador\n\t\t\t\t\t\t\tWHERE ude.co_control_doc=d.co_control_doc AND ude.co_estado=e.co_estado AND\n\t\t\t\t\t\t\td.co_indicador_coordinador=uc.co_indicador AND\n\t\t\t\t\t\t\tude.co_control_doc=$co_control_doc AND ude.nu_correc_doc=$nu_correc_doc AND ude.co_estado=$co_estado\");\n\t\t$row=mysql_fetch_assoc($result);\n\t\t$contenido='GERENCIA AUTOMATIZACIÓN, INFORMÁTICA Y TELECOMUNICACIONES<br />\n\t\t\t\t\tCOMITÉ DE REVISIÓN DE DOCUMENTOS REGIÓN ORIENTE<br /><br />';\n\t\t$asunto=\"Documento N&deg; \".$row['co_control_doc'].\" | Estado:\".$row['nb_estado'];\n\t\t$contenido.='\n\t\t\t\t\tN° de control: '.$row['co_control_doc'].'<br />\n\t\t\t\t\tTítulo del documento: '.$row['tx_desc_doc'].'<br />\n\t\t\t\t\tSolicitante: '.$row['nb_solicitante'].' [ '.$row['co_indicador_sol'].' ]<br />\n\t\t\t\t\tCoordinador asignado: '.$row['nb_coordinador'].' [ '.$row['co_indicador_coordinador'].' ]<br />\n\t\t\t\t\tRecibido el: '.$row['fe_ho_registro'].'<br />\n\t\t\t\t\tEstado del documento: <b>'.$row['nb_estado'].'</b><br />\n\t\t\t\t\tEstado actualizado el: '.$row['fe_ho_cambio'].'<br />\n\t\t\t\t\tEstado actualizado por: '.$row['co_indicador_cam'].'<br />';\n\t\tswitch($co_estado){\n\t\t\tcase 1:\n\t\t\t\t$asunto.=' | ACUSE DE RECIBO';\n\t\t\tbreak;\n\t\t\tcase ($co_estado>=2 && $co_estado<=5):\n\t\t\t\t$contenido.='\n\t\t\t\tRevisor redacción/ortografía: '.$row['nb_ortografico'].' [ '.$row['co_indicador_rev_ort'].' ]<br />\n\t\t\t\tRevisor técnico: '.$row['nb_tecnico'].' [ '.$row['co_indicador_rev_tec'].' ]<br />\n\t\t\t\tRevisor administrativo: '.$row['nb_administrativo'].' [ '.$row['co_indicador_rev_adm'].' ]<br />';\n\t\t\tbreak;\n\t\t}\t\t\t\n\t\t$contenido.='<br />\n\t\tSi requiere información adicional o realizar el seguimiento a un documento ya introducido,\n\t\tpuede utilizar cuaquiera de las siguientes vías:<br />\n\t\t- Ingresar con Mozilla Firefox a la siguiente dirección web <b>http://orimat100/gesdoc</b><br />\n\t\t- Enviar una nota al correo\telectrónico <b>[email protected]</b><br />';\n\t\tmysql_query(\"UPDATE c006t_usr_doc_estado \n\t\t\t\t\tSET nu_notificacion=1 \n\t\t\t\t\tWHERE co_control_doc=$co_control_doc AND nu_correc_doc=$nu_correc_doc AND co_estado=$co_estado\");\n\t\t//$asunto.=' | SISTEMA EN PERIODO DE PRUEBA';\n\t\t\n\t\treturn array('asunto'=>$asunto,'cuerpo'=>$contenido,'solicitante'=>$row['co_indicador_sol'],'coordinador'=>$row['co_indicador_coordinador']);\n\t}", "title": "" }, { "docid": "f35469218a19a760d5143a79515339ef", "score": "0.42895275", "text": "public function AdminDispatcherRequestBrowseExchangeEdb(string $TargetID): \\Comet\\BrowseEDBResponse\n\t{\n\t\t$nr = new \\Comet\\AdminDispatcherRequestBrowseExchangeEdbRequest($TargetID);\n\t\t$response = $this->client->send($this->AsPSR7($nr));\n\t\treturn \\Comet\\AdminDispatcherRequestBrowseExchangeEdbRequest::ProcessResponse($response->getStatusCode(), (string)$response->getBody());\n\t}", "title": "" }, { "docid": "d1216a8582d26e941dae614c76139f82", "score": "0.42864588", "text": "function eMail( $receipients, $subject, $message, $cc = null, $attachments = null, $isHTML = true )\r\n{\r\n\t$receipients = is_array( $receipients ) ? $receipients : array( $receipients );\r\n\r\n\tforeach ( $receipients as $email => $name ) {\r\n\t\t$GLOBALS['MAILER'] -> addAddress( $email, $name );\r\n\t}\r\n\r\n\tif ( !is_null( $attachments ) ) {\r\n\t\t$attachments = is_array( $attachments ) ? $attachments : array( $attachments );\r\n\r\n\t\tforeach ($attachments as $file => $name ) {\r\n\t\t\t$GLOBALS['MAILER'] -> addAttachment( $file, $name);\r\n\t\t}\r\n\t}\r\n\r\n\t$GLOBALS['MAILER'] -> isHTML( $isHTML );\r\n\r\n\t$GLOBALS['MAILER'] -> From = getOption('email');\r\n\t$GLOBALS['MAILER'] -> FromName = getOption('name');\r\n\r\n\t$GLOBALS['MAILER'] -> Subject = $subject;\r\n\t$GLOBALS['MAILER'] -> Body = \"<em>\".$message.\"</em>\";\r\n\t$GLOBALS['MAILER'] -> AltBody = $message;\r\n\r\n\tif(!$GLOBALS['MAILER'] -> send()) \r\n\t{\r\n\t return array( \r\n\t \t\"status\" => \"fail\", \r\n\t \t\"message\" => $GLOBALS['MAILER'] -> ErrorInfo \r\n\t );\r\n\t} \r\n\telse \r\n\t{\r\n\t return array( \r\n\t \t\"status\" => \"success\", \r\n\t \t\"message\" => \"Message has been sent successfully\" \r\n\t );\r\n\t}\r\n}", "title": "" }, { "docid": "6df621997cf726684f71071187857db3", "score": "0.42860496", "text": "function action_export_soldescomptes_xml() {\n\t$securiser_action = charger_fonction('securiser_action', 'inc');\n\t$arg = $securiser_action();\n\n\tif (!preg_match(',^(\\d+)-(\\w+)-(\\w+)(-(\\w+))?$,', $arg, $r)) {\n\t\tspip_log(\"action_export_soldescomptes incompris: \" . $arg);\n\t} else {\n\t\tinclude_spip('inc/association_comptabilite');\n\t\t$xml = new ExportComptes_TXT();\n\t\t$balises = array();\n\t\tforeach (array('entete', 'titre', 'nom', 'exercice', 'charges', 'produits', 'contributions_volontaires', 'chapitre', 'code', 'libelle', 'categorie', 'intitule', 'montant') as $key) {\n\t\t\t$balises[$key.'1'] = '<'.ucfirst($key).'>';\n\t\t\t$balises[$key.'0'] = '</'.ucfirst($key).'>';\n\t\t}\n\t\t$balises['compteresultat1'] = '<?xml version=\"1.0\" encoding=\"'.$GLOBALS['meta']['charset'].'\"?>'.\"\\n<CompteDeResultat>\";\n\t\t$balises['compteresultat0'] = '</CompteDeResultat>';\n\t\t$xml->exportLignesMultiples(array($GLOBALS['association_metas']['classe_charges']=>'-1', $GLOBALS['association_metas']['classe_produits']=>'+1', $GLOBALS['association_metas']['classe_contributions_volontaires']=>0), $balises, array('<'=>'&lt;','>'=>'&gt;'), '', '');\n\t\t$xml->leFichier('xml');\n\t}\n}", "title": "" }, { "docid": "37e2aa69c90b2afba9588a156b5e41ae", "score": "0.4285296", "text": "function createEncuestas($valores) {\r\n $tabla = 'encuesta';\r\n $campos = ' enc_consecutivo, pla_id, ees_id ';\r\n $this->db->insertarVariosRegistros($tabla, $campos, $valores);\r\n }", "title": "" }, { "docid": "a612b047d781c1d9c43e839c4b526035", "score": "0.42826846", "text": "function enviarMailDetalle($mail_custodio,$mail_encargado,$body){\n\t//servidor de correo\n\t$email_host = \"mail.ieps.gob.ec\";\n\t$email_port = 587;\n\t$email_tipo = \"smtp\";\n\t//informacion de la cuenta\n\t$email_remintente = \"[email protected]\";\n\t$email_remintente_nombre = \"IEPS\";\n\t$email_remintente_usuario = \"transporte\"; \n\t$email_remintente_contrasena = \"namd0gma1\";\n\t$email_asunto = \"Solicitud de Mantenimiento\";\n\t//bandera\n\t$bandera = false;\n\t\n\t//echo \"$email_host , $email_port , $email_tipo , $email_remintente ,\t$email_remintente_nombre , $email_remintente_usuario , $email_remintente_contrasena , $email_asunto <br>\";\n\n\t$mail = new PHPMailer();\n\t//$body = $mail->getFile('contents.html');\n\t//$body = eregi_replace(\"[\\]\",'',$body);\n\t$mail->IsSMTP(); // telling the class to use SMTP\n\t$mail->Mailer = $email_tipo;//\"smtp\";\n\t$mail->Host = $email_host;//\"mail.ieps.gob.ec\"; // SMTP server\n\t$mail->Port = $email_port;//587;\n\t$mail->SMTPAuth = true;\n\t$mail->Username = $email_remintente_usuario;//\"conductores\";//\"compras\"; \n\t$mail->Password = $email_remintente_contrasena;//\"ieps000\"; \n\t$mail->From = $email_remintente;//\"[email protected]\";//\"[email protected]\";\n\t$mail->FromName = $email_remintente_nombre;//\"IEPS compras\";\n\t$mail->Subject = $email_asunto;//\"PHPMailer Test Subject via smtp\";\n\t$mail->MsgHTML($body);\n\t\t\n\t$mail->ClearAddresses();\t\n\t\n\t$mail->AddAddress($mail_custodio, \"Custodio\");\n\t$mail->AddAddress($mail_encargado, \"Encargado\");\n\t//agrega copia a administradores\n\t/*if ($email_ieps_recibe01!=\"\") $mail-> AddAddress($email_ieps_recibe01);\n\tif ($email_ieps_recibe02!=\"\") $mail-> AddAddress($email_ieps_recibe02);*/\n\t//Adjunta una imagen\n\t//$mail->AddAttachment(\"images/phpmailer.gif\"); // attachment\n\t\t\n\tif(!$mail->Send()) \n\t{\n\t echo \"Mailer Error: \" . $mail->ErrorInfo;\n\t $bandera = false;\n\t} else \n\t{\n\t echo \"Message sent!\";\n\t $bandera = true;\n\t}\n\t\n\treturn $bandera;\n}", "title": "" }, { "docid": "41169331247cd9c11f6f9f7469853d6e", "score": "0.4281318", "text": "function generate_html() \n\t{\n\t\t$rcmail = rcmail::get_instance();\n\t\t$rcmail->output->set_pagetitle('Duo Authentication');\n\t\t\n\t\t$this->include_script('js/Duo-Web-v2.min.js');\n\t\t\n\t\t$ikey = $this->get('IKEY');\n\t\t$skey = $this->get('SKEY');\n \t$host = $this->get('HOST');\n \t$akey = $this->get('AKEY');\n\n \t$user = trim(rcube_utils::get_input_value('_user', rcube_utils::INPUT_POST, true));\n \t\n\t\t$sig_request = Duo::signRequest($ikey, $skey, $akey, $user);\n\n\t\t$content =\t\"<script>\n\t\t\t\t\t\tDuo.init({\n\t\t\t\t\t\t\t'host': '\" . $host . \"',\n\t\t\t\t\t\t\t'post_action': '.',\n\t\t\t\t\t\t\t'sig_request': '\" . $sig_request . \"'\n\t\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\t<center>\t\n\t\t\t\t\t<iframe id=\\\"duo_iframe\\\" frameborder=\\\"0\\\" allowtransparency=\\\"true\\\" style=\\\"background: transparent;\\\">\n\t\t\t\t\t</iframe>\n\t\t\t\t\t<style>\n\t\t\t\t\t #duo_iframe {\n\t\t\t\t\t width: 100%;\n\t\t\t\t\t min-width: 304px;\n\t\t\t\t\t max-width: 620px;\n\t\t\t\t\t height: 330px;\n\t\t\t\t\t border: none;\n\t\t\t\t\t }\n\t\t\t\t</style>\n\t\t\t\t</center>\";\t\n\t\t\n\t\treturn($content);\n\t}", "title": "" }, { "docid": "2efcd3ea73ed874453a2b8e78a7e41d1", "score": "0.42776257", "text": "public function liberteautopublishAction()\n\t{\n\t\t$article_obj=new Ep_Ao_Article();\n\t\t$articles=$article_obj->checkPublishArticle();\n\t\t//print_r($articles);exit;\n\t\tfor($a=0;$a<count($articles);$a++)\n\t\t{\n\t\t\t$part_obj=new Ep_Ao_Participation();\n\t\t\t$participate_obj=new Ep_Participation_Participation();\n\t\t\t$royalty_obj=new Ep_Royalty_Royalties();\n\t\t\t\t\n\t\t\t\t$paricipationdetails=$participate_obj->getParticipateDetails($articles[$a]['partid']);\n\t\t\t\tif($royalty_obj->checkRoyaltyExists($articles[$a]['id'])=='NO')\n\t\t\t\t{\n\t\t\t\t\t$royalty_obj->participate_id=$paricipationdetails[0]['participateId'];\n\t\t\t\t\t$royalty_obj->article_id=$paricipationdetails[0]['article_id'];\n\t\t\t\t\t$royalty_obj->user_id=$paricipationdetails[0]['user_id'];\n\t\t\t\t\t$royalty_obj->price=$paricipationdetails[0]['price_user'];\n\t\t\t\t\t$royalty_obj->currency=$paricipationdetails[0]['currency'];\n\t\t\t\t\t$royalty_obj->insert();\n\t\t\t\t\t\n\t\t\t\t\t//Client name\n\t\t\t\t\t$client_obj=new Ep_User_Client();\n\t\t\t\t\t$clientdetails=$client_obj->getClientFulldetails($paricipationdetails[0]['clientId']);\n\t\t\t\t\tif($clientdetails[0]['company_name']!=\"\")\n\t\t\t\t\t\t$cname=$clientdetails[0]['company_name'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$cname=$clientdetails[0]['email'];\n\t\t\t\t\t\n\t\t\t\t\t//Writer info\t\t\t\t\t\n\t\t\t\t\t$user_obj=new Ep_User_UserPlus();\n\t\t\t\t\t$writerdetails=$user_obj->getUserPlus($paricipationdetails[0]['user_id']);\n\t\t\t\t\t\n\t\t\t\t\t$body='<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\n\t\t\t\t\t\t\t<tr><td><b>Article title :</b></td><td> '.$paricipationdetails[0]['title'].'</td></tr>\n\t\t\t\t\t\t\t<tr><td><b>AO title :</b> </td><td>'.$paricipationdetails[0]['deliveryTitle'].'</td></tr>\n\t\t\t\t\t\t\t<tr><td><b>Client :</b> </td><td>'.$cname.'</td></tr>\n\t\t\t\t\t\t\t<tr><td><b>Writer :</b> </td><td>'.$writerdetails[0]['first_name'].'&nbsp;'.$writerdetails[0]['last_name'].'</td></tr>\n\t\t\t\t\t\t\t<tr><td><b>Writer email :</b> </td><td>'.$writerdetails[0]['email'].'</td></tr>\n\t\t\t\t\t\t\t<tr><td><b>Royalties</b> :</b> </td><td>'.$paricipationdetails[0]['price_user'].'&euro; </td></tr>\n\t\t\t\t\t\t</table>\t';\n\t\t\t\t\t\t\n\t\t\t\t\t$mail = new Zend_Mail();\n\t\t\t\t\t$mail->addHeader('Reply-To','[email protected]');\n\t\t\t\t\t$mail->setBodyHtml($body)\n\t\t\t\t\t\t ->setFrom('[email protected]','Support Edit-place')\n\t\t\t\t\t\t ->addTo('[email protected]')\n\t\t\t\t\t\t ->setSubject('Royalty added through cron test site EN');\n\t\t\t\t\tif($mail->send())\n\t\t\t\t\t\treturn true; \n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Update Participation\n\t\t\t\t$where_art=\" id='\".$articles[$a]['partid'].\"'\";\n\t\t\t\t$arr_art=array();\n\t\t\t\t$arr_art['status']='published';\n\t\t\t\t$arr_art['current_stage']='client';\n\t\t\t\t$part_obj->updateparticipation($arr_art,$where_art); \n\t\t\t\t\n\t\t\t\t$invoiceid= $articles[$a]['id'];\n\t\t\t\t$invoicedir='/home/sites/site7/web/FO/invoice/client/'.$articles[$a]['user_id'].'/';\n\t\t\t \n\t\t\t\tif(!file_exists($invoicedir.'/'.$invoiceid.'.pdf'))\n\t\t\t\t{\n\t\t\t\t\t$pay_obj = new Ep_Ao_PaymentArticle();\n\t\t\t\t\t$art_obj = new Ep_Ao_Article();\n\t\t\t\t\t$country_array=$this->_arrayDb->loadArrayv2(\"countryList\", $this->_lang);\n\n\t\t\t\t\t//Payment details\n\t\t\t\t\t$payment=$pay_obj->getpaymentdetails($invoiceid);\n\t\t\t\t\n\t\t\t\t\t//Dates\n\t\t\t\t\tsetlocale(LC_TIME, 'fr_FR');\n\t\t\t\t\t$date_invoice_full= strftime(\"%e %B %Y\",strtotime($payment[0]['delivery_date']));\n\t\t\t\t\t$date_invocie = date(\"d/m/Y\",strtotime($payment[0]['delivery_date']));\n\t\t\t\t\t$date_invoice_ep=date(\"Y/m\",strtotime($payment[0]['delivery_date']));\n\n\t\t\t\t //Address\n\t\t\t\t\t$profileinfo=$pay_obj->getClientdetails($articles[$a]['user_id']);\n\t\t\t\t\t$address=$profileinfo[0]['company_name'].'<br>';\n\t\t\t\t\t$address.=$profileinfo[0]['address'].'<br>';\n\t\t\t\t\t$address.=$profileinfo[0]['zipcode'].' '.$profileinfo[0]['city'].' '.$country_array[$profileinfo[0]['country']].'<br>';\n\n\t\t\t\t\t//Invoice details\n\t\t\t\t\t$invoice_details_pdf='\n\t\t\t\t\t\t<div align=\"center\" style=\"font-size:16pt;\"><b>Appel d\\'offres : '.$payment[0]['title'].'</b></div>\n\t\t\t\t\t\t\t<table class=\"change_order_items\">\n\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>DESIGNATION</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>MONTANT</th>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<th>MONTANT PAY&Eacute;</th>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>';\n\n\t\t\t\t\t\t$total=0;\n\t\t\t\t\t\t$total=number_format($payment[0]['amount'],2);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$invoice_details_pdf.='<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td>'.$payment[0]['title'].'</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"change_order_total_col\">'.number_format($total,2,',','').'</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"change_order_total_col\">'.number_format($total,2,',','').'</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>';\n\n\t\t\t\t\t\t$invoice_details_pdf.='<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"border-top:1pt solid black;text-align:right;margin-right:10px;font-size: 12pt;\" colspan=\"2\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tTotal de la prestation HT\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"border-top:1pt solid black;font-size: 12pt;\" class=\"change_order_total_col\" >\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'.number_format($total,1,',','').'\n\t\t\t\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t</table>';\n\n\t\t\t\t\t//Pay info number\n\t\t\t\t\t$payinfo_number=\"\";\n\n\t\t\t\t\tif($payment[0]['amount']!=\"\" && $payment[0]['client_type']!=\"personal\")\t\t\n\t\t\t\t\t{\t\n\t\t\t\t\t //Tax details\n\t\t\t\t\t $tax=(($total*$payment[0]['tax'])/100);\n\t\t\t\t\t $tax_details_pdf='<table class=\"change_order_items\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>TVA</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td>taux : '.str_replace('.', ',',$payment[0]['tax']).'%</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"change_order_total_col\" style=\"border-top:1pt solid black;text-align:right;font-size: 12pt;\">'.number_format($tax,2,',','').' &#x80; </td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</table>';\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$tax=0;\n\t\t\t\t\t\t\n\t\t\t\t\t/**Final Total**/\n\t\t\t\t\t$final_invoice_amount='<table class=\"change_order_items\" width=\"100%\">\n\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"width:82%;font-size:12pt;font-weight:bold;background-color:#BDBDBD;border-top:1pt solid black;border-right:1pt solid black;text-align:right;padding:0.5em 1.5em 0.5em 0.5em;\">Montant TTC</td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td style=\"width:18%;font-weight:bold;border-top:1pt solid black;padding:0.5em;padding-right:10pt;font-size: 12pt;text-align: right\" >'.number_format(($total+$tax),2,',','').' &#x80;</td>\n\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t</table>';\n\t\t\t\t\tif(!is_dir($invoicedir))\n\t\t\t\t\t{\n\t\t\t\t\t mkdir($invoicedir,0777);\n\t\t\t\t\t chmod($invoicedir,0777);\n\t\t\t\t\t}\n\t\t\t\t\tinclude('/home/sites/site7/web/FO/dompdf/dompdf_config.inc.php');\n\t\t\t\t\t$html=file_get_contents('/home/sites/site7/web/FO/views/scripts/Client/Client_invoice_pdf.phtml');\n\t\t\t\t\t$html=str_replace('$$$$invoice_details_pdf$$$$',$invoice_details_pdf,$html);\n\t\t\t\t\t$html=str_replace('$$$$tax_details_pdf$$$$',$tax_details_pdf,$html);\n\t\t\t\t\t$html=str_replace('$$$$final_invoice_amount$$$$',$final_invoice_amount,$html);\n\t\t\t\t\t$html=str_replace('$$$$date_invoice_full$$$$',$date_invoice_full,$html);\n\t\t\t\t\t$html=str_replace('$$$$date_invoice$$$$',$date_invocie,$html);\n\t\t\t\t\t$html=str_replace('$$$$address$$$$',$address,$html);\n\t\t\t\t\t$html=str_replace('$$$$payinfo_number$$$$',$payinfo_number,$html);\n\t\t\t\t\t$html=str_replace('$$$$date_invoice_ep$$$$',$date_invoice_ep,$html);\n\t\t\t\t\t$html=str_replace('$$$$invoice_identifier$$$$',$payment[0]['payid'],$html);\n\n\t\t\t\t\t\t if ( get_magic_quotes_gpc() )\n\t\t\t\t\t\t\t $html = stripslashes($html);\n\n\t\t\t\t\t\t\t//echo $html;exit;\n\t\t\t\t\t\t //$old_limit = ini_set(\"memory_limit\", \"16M\");\n\n\t\t\t\t\t\t\t$dompdf = new DOMPDF();\n\t\t\t\t\t\t\t$dompdf->load_html( $html);\n\t\t\t\t\t\t\t$dompdf->set_paper(\"a4\");\n\t\t\t\t\t\t\t$dompdf->render();error_reporting(0);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$pdf = $dompdf->output();\n\n\t\t\t\t\tfile_put_contents($invoicedir.'/'.$invoiceid.'.pdf', $pdf);\n\t\t\t\t\tob_clean();\n\t\t\t\t\tflush();\n\t\t\t\t}\t\n\t\t}\n\t}", "title": "" }, { "docid": "70fa0cf39d948d336ce23fefb487ff3c", "score": "0.42774826", "text": "public function generate_post() {\r\n\r\n $this->BoardInterface->initTrans();\r\n\r\n $postdata = file_get_contents(\"php://input\");\r\n $request = json_decode($postdata);\r\n $tense = $request->tense;\r\n $tipusfrase = $request->tipusfrase;\r\n $negativa = $request->negativa;\r\n $idusu = $this->session->userdata('idusu');\r\n $this->Lexicon->insertarFrase($idusu, $tipusfrase, $tense, $negativa);\r\n\r\n\r\n $this->BoardInterface->commitTrans();\r\n\r\n if ($this->BoardInterface->statusTrans() === FALSE) {\r\n $response = [\r\n 'error' => \"errorText\"\r\n ];\r\n $this->response($response, 500);\r\n } else {\r\n $expander = new Myexpander();\r\n $expander->expand();\r\n \r\n $info = $expander->info;\r\n $errorText = \"\";\r\n \r\n if ($info[error]) {\r\n $errorCode = $info[errorcode];\r\n $errorText = $this->BoardInterface->get_errorText($errorCode);\r\n \r\n $response = [\r\n 'info' => $info,\r\n 'errorText' => $errorText[0][content]\r\n ];\r\n } else {\r\n $response = [\r\n 'info' => $info,\r\n 'errorText' => \"\"\r\n ];\r\n }\r\n\r\n $this->response($response, REST_Controller::HTTP_OK);\r\n }\r\n }", "title": "" }, { "docid": "b2f9bfdca84ac7f863e3fad262633f5b", "score": "0.42773074", "text": "function STFC_WRITE_TO_TCPIC ($fce)\n{\n global $rfc_handle, $data_file;\n\n $tbuf = sprintf(\"\\n\\nStart Function %s\", \"STFC_WRITE_TO_TCPIC\");\n TRFC_trace($tbuf);\n\n $tbuf = \"\\n<== RfcGetAttributes rc = \";\n TRFC_trace($tbuf);\n \n $rfc_attributes = saprfc_attributes ($rfc_handle);\n $tbuf = sprintf(\"%d\", 0);\n TRFC_trace($tbuf);\n if ($rfc_attributes == false)\n rfc_error(\"RfcGetAttributes\");\n\n $tbuf = \"\\n\\nAttributes of this RFC connection\";\n $tbuf .= \"\\n---------------------------------\";\n $tbuf .= sprintf (\"\\nDestination : %s\", $rfc_attributes[dest]);\n $tbuf .= sprintf (\"\\nMy Host : %s\", $rfc_attributes[own_host]);\n\n if ($rfc_attributes[rfc_role] == RFC_ROLE_CLIENT)\n {\n if ($rfc_attributes[partner_type] == RFC_SERVER_EXT)\n $tbuf .= sprintf(\"\\nServer Program Name : %s\", $rfc_attributes[partner_host]);\n elseif ($rfc_attributes[partner_type] == RFC_SERVER_EXT_REG)\n $tbuf .= sprintf(\"\\nServer Program ID : %s\", $rfc_attributes[partner_host]);\n else\n $tbuf .= sprintf(\"\\nPartner Host : %s\", $rfc_attributes[partner_host]);\n }\n else\n $tbuf.= sprintf(\"\\nPartner Host : %s\", $rfc_attributes[partner_host]);\n\n $tbuf.= sprintf(\"\\nSystem No. : %s\", $rfc_attributes[systnr]);\n $tbuf.= sprintf(\"\\nSystem Name : %s\", $rfc_attributes[sysid]);\n $tbuf.= sprintf(\"\\nClient : %s\", $rfc_attributes[client]);\n $tbuf.= sprintf(\"\\nUser : %s\", $rfc_attributes[user]);\n $tbuf.= sprintf(\"\\nLanguage : %s\", $rfc_attributes[language]);\n $tbuf.= sprintf(\"\\nISO-Language : %s\", $rfc_attributes[ISO_language]);\n\n if ($rfc_attributes[trace] == 'X')\n $tbuf .= sprintf(\"\\nRFC Trace : ON\");\n else\n $tbuf .= sprintf(\"\\nRFC Trace : OFF\");\n\n $tbuf .= sprintf(\"\\nMy Codepage : %s\", $rfc_attributes[own_codepage]);\n $tbuf .= sprintf(\"\\nPartner Codepage : %s\", $rfc_attributes[partner_codepage]);\n\n if ($rfc_attributes[rfc_role] == RFC_ROLE_CLIENT)\n $tbuf .= sprintf(\"\\nRFC Role : External RFC Client\");\n else if ($rfc_attributes[own_type] == RFC_SERVER_EXT)\n $tbuf .= sprintf(\"\\nRFC Role : External RFC Server, started by SAP gateway\");\n else\n $tbuf .= sprintf(\"\\nRFC Role : External RFC Server, registered at SAP gateway\");\n\n $tbuf .= sprintf(\"\\nRFC Library Release : %s\", $rfc_attributes[own_rel]);\n\n if ($rfc_attributes[partner_type] == RFC_SERVER_R3)\n $tbuf .= sprintf(\"\\nRFC Partner : SAP R/3\");\n elseif ($rfc_attributes[partner_type] == RFC_SERVER_R2)\n $tbuf .= sprintf(\"\\nRFC Partner : SAP R/2\");\n elseif ($rfc_attributes[rfc_role] == RFC_ROLE_CLIENT)\n {\n if ($rfc_attributes[partner_type] == RFC_SERVER_EXT)\n $tbuf .= sprintf(\"\\nRFC Partner : External RFC Server, started by SAP gateway\");\n else\n $tbuf .= sprintf(\"\\nRFC Partner : External RFC Server, registered at SAP gateway\");\n }\n else\n $tbuf .= sprintf(\"\\nRFC Partner : External RFC Client\");\n\n\n $tbuf .= sprintf(\"\\nPartner System Release : %s\", $rfc_attributes[partner_rel]);\n $tbuf .= sprintf(\"\\nR/3 Kernel Release : %s\", $rfc_attributes[kernel_rel]);\n $tbuf .= sprintf(\"\\nCPI-C Conversation ID : %s\\n\", $rfc_attributes[CPIC_convid]);\n TRFC_trace($tbuf);\n /* Put the name of data file in trace file */\n $tbuf = sprintf(\"\\nDATA FILE: '%s'\", $data_file);\n TRFC_trace($tbuf);\n\n $rc = write_itab_to_file($fce, $data_file, \"TCPICDAT\");\n\n if ($rc)\n {\n return (\"CANNOT_WRITE_DATA\");\n }\n return true;\n\n}", "title": "" }, { "docid": "015ab2ad092c7c3b8f895769706094c1", "score": "0.42707947", "text": "public function generateEditionComponente()\n {\n return $this->generateAditionComponent();\n }", "title": "" }, { "docid": "9d4c6cbf86091d3f9f9e1cd26b766d79", "score": "0.42660123", "text": "function recuperer_fond($contexte = array(), $forcer = false){\n\n\t\tif (!$this->fond_compile OR $forcer){\n\t\t\tinclude_spip('inc/presentation'); // offrir les fonctions d'espace prive\n\t\t\t\n\t\t\t// rendre editable systematiquement\n\t\t\t// sinon, ceux qui utilisent les fonds CFG avec l'API des formulaires dynamiques\n\t\t\t// et mettent des [(#ENV**{editable}|oui) ... ] ne verraient pas leurs variables\n\t\t\t// dans l'environnement vu que CFG ne pourrait pas lire les champs du formulaire\n\n\t\t\tif (!isset($contexte['editable'])) $contexte['editable'] = true; // plante 1.9.2 !!\n\n\t\t\t// passer cfg_id...\n\t\t\tif (!isset($contexte['cfg_id']) && $this->param['cfg_id']) {\n\t\t\t\t$contexte['cfg_id'] = $this->param['cfg_id'];\n\t\t\t}\n\t\t\t// passer id aussi\n\t\t\tif (!isset($contexte['id']) && $this->param['cfg_id']) {\n\t\t\t\t$contexte['id'] = $this->param['cfg_id'];\n\t\t\t}\n\t\t\t// passer 'message_ok', 'message_erreur', 'erreurs'\t\n\t\t\tif (!isset($contexte['message_ok']) && $this->messages['message_ok']) {\n\t\t\t\t$contexte['message_ok'] = join('<br />',$this->messages['message_ok']);\n\t\t\t}\n\t\t\tif (!isset($contexte['message_erreur']) && $this->messages['message_erreur']) {\n\t\t\t\t$contexte['message_erreur'] = join('<br />',$this->messages['message_erreur']);\n\t\t\t}\n\t\t\tif (!isset($contexte['erreurs']) && $this->messages['erreurs']) {\n\t\t\t\t$contexte['erreurs'] = $this->messages['erreurs'];\n\t\t\t}\n\t\t\t// cas particulier du formulaire generique 'configurer'\n\t\t\tif ($this->vue == 'configurer') {\n\t\t\t\tif (!isset($contexte['id'])) {\n\t\t\t\t\t$contexte['id'] = $this->param['nom'];\n\t\t\t\t}\n\t\t\t}\t\t\n\n\t\t\t$val = $this->val ? array_merge($contexte, $this->val) : $contexte;\n\t\n\t\t\t// si on est dans l'espace prive, $this->path_vue est\n\t\t\t// de la forme ../plugins/mon_plugin/fonds/toto, d'ou le replace\n\t\t\t$this->fond_compile = recuperer_fond(\n\t\t\t\tsubstr($this->path_vue, strlen(_DIR_RACINE)), $val);\n\t\t}\n\t\treturn $this->fond_compile;\n\t}", "title": "" }, { "docid": "e522e2954dd04bf38b0838a18da1f535", "score": "0.4262385", "text": "protected function getContent()\n {\n $body = 'Error';\n if (!empty($this->post)) {\n if(!empty($this->post['OutSum']) && !empty($this->post['InvId'])\n && !empty($this->post['SignatureValue'])){\n \n $signature = strtoupper(md5($this->post['OutSum'] . ':' . $this->post['InvId'] . ':' . ROBOCASSA_PASSWORD_2));\n\t\t\t\tif($signature == $this->post['SignatureValue']) {\n $result = clsOrder::getInstance()->updateOrder(array(\n 'id' => (int)$this->post['InvId'],\n 'status' => OrderStatusTypes::getValueByConstant(OrderStatusTypes::STATE_PAYOFF)));\n if($result) {\n //send email\n $template = clsEmailTemps::getInstance()->getEmailtempById(PAYMENT_MAIL_ID);\n $order = clsOrder::getInstance()->getOrderById((int)$this->post['InvId']);\n if(!empty($template) && !empty($order)) {\n $params = array(\n '{{USERNAME}}' => !empty($order->getUser()) ? ($order->getUser()->getFirstName() . ' ' . $order->getUser()->getLastName()) : $order->getUserName(),\n '{{SUM}}' => $this->post['OutSum'],\n '{{ORDER_ID}}' => $this->post['InvId']\n );\n clsEmail::getInstance()->send($template->getSubject(),\n !empty($order->getUser()) ? ($order->getUser()->getEmail()) : $order->getUserEmail(),\n $template->getValue(),\n $params);\n }\n \n $body = 'OK' . $this->post['InvId'];\n }\n }\n }\n \n return $body;\n } else {\n clsCommon::redirect404();\n }\n }", "title": "" }, { "docid": "b412b4028a902c54336ffb676bf9a58d", "score": "0.42614883", "text": "public function correctionBiddingEndMailAction()\n\t{\n\t\t$article_obj=new Ep_Article_Article();\n\t\t$artdeldetails = $article_obj->getCrtArticleDeliveryTimeUp();\n\t\t\n\t\tif($artdeldetails!=\"NO\")\n\t\t{ \n\t\t\tforeach($artdeldetails as $artdetail)\n\t\t\t{\n\t\t\t\t$artcount = $article_obj->getArticleCountDelivery($artdetail['id']);\n\t\t\t\t\n\t\t\t\t$parameters['bo_user'] = $artdetail['login'];\n\t\t\t\t$parameters['article_title'] = $artdetail['title'];\n\t\t\t\t$parameters['mission_link'] = \"<a href='http://admin-test.edit-place.com/ongoing/ao-details?client_id=\".$artdetail['user_id'].\"&ao_id=\".$artdetail['id'].\"&submenuId=ML2-SL4'>Cliquez-ici</a>\";\n\t\t\t\t$parameters['particpation_count'] = $artdetail['correctorcount'];\n\t\t\t\t//$parameters['time_to_manual_select'] = ($artdetail['correction_selection_time']/60).' heures';\n\t\t\t\t$parameters['time_to_manual_select'] = '1 hour';\n\t\t\t\t//$parameters['time_of_automatic_selection'] = ($artdetail['correction_selection_time']/60).' heures';\n\t\t\t\t$parameters['time_of_automatic_selection'] = '1 hour';\n\t\t\t\t$parameters['correction_selection_profile'] = \"<a href='http://admin-test.edit-place.com/correction/corrector-profiles-list?submenuId=ML2-SL18'>Cliquez-ici</a>\"; \n\t\t\t\t\n\t\t\t\tif($artdetail['correctorcount']>0)\n\t\t\t\t\t$this->sendMailToEPPersonal($artdetail['email'],189,$parameters);\n\t\t\t\telse\n\t\t\t\t\t$this->sendMailToEPPersonal($artdetail['email'],188,$parameters);\n\t\t\t}\n\t\t}\n\t\t\t\n\t}", "title": "" }, { "docid": "62e57c1584fd139e341dd8df551f5329", "score": "0.42610112", "text": "public static function enviarInfoDodSri($Ids,$tipDoc) {\n //UPDATE `APPWEB`.`EMPRESA` SET `EMP_EMAIL_CONTA`='[email protected]' WHERE `EMP_ID`='1';\n $rawData = array();\n $con = Yii::$app->db_edoc;\n switch ($tipDoc) {\n Case \"FA\"://FACTURAS\n $sql = \"SELECT A.ClaveAcceso,A.AutorizacionSRI,A.FechaAutorizacion,A.IdentificacionComprador Identificacion,\n A.RazonSocialComprador RazonSocial,A.NombreDocumento,B.USU_CORREO Correo,A.USU_ID UsuId\n FROM \" . $con->dbname . \".NubeFactura A\n INNER JOIN APPWEB.USUARIO B ON B.USU_NOMBRE=A.IdentificacionComprador\n WHERE A.IdFactura='$Ids' AND A.Estado IN(2,8) \"; \n break;\n Case \"GR\"://GUIAS DE REMISION\n $sql = \"SELECT A.ClaveAcceso,A.AutorizacionSRI,A.FechaAutorizacion,A.IdentificacionTransportista Identificacion,\n A.RazonSocialTransportista RazonSocial,A.NombreDocumento,B.USU_CORREO Correo,A.USU_ID UsuId\n FROM \" . $con->dbname . \".NubeGuiaRemision A\n INNER JOIN APPWEB.USUARIO B ON B.USU_NOMBRE=A.IdentificacionTransportista\n WHERE A.IdGuiaRemision='$Ids' AND A.Estado IN(2,8) \"; \n break;\n Case \"RT\"://RETENCIONES\n $sql = \"SELECT A.ClaveAcceso,A.AutorizacionSRI,A.FechaAutorizacion,A.IdentificacionSujetoRetenido Identificacion,\n A.RazonSocialSujetoRetenido RazonSocial,A.NombreDocumento,B.USU_CORREO Correo,A.USU_ID UsuId\n FROM \" . $con->dbname . \".NubeRetencion A\n INNER JOIN APPWEB.USUARIO B ON B.USU_NOMBRE=A.IdentificacionSujetoRetenido\n WHERE A.IdRetencion='$Ids' AND A.Estado IN(2,8) \"; \n break;\n Case \"NC\"://NOTAS DE CREDITO\n $sql = \"SELECT A.ClaveAcceso,A.AutorizacionSRI,A.FechaAutorizacion,A.IdentificacionComprador Identificacion,\n A.RazonSocialComprador RazonSocial,A.NombreDocumento,B.USU_CORREO Correo,A.USU_ID UsuId\n FROM \" . $con->dbname . \".NubeNotaCredito A\n INNER JOIN APPWEB.USUARIO B ON B.USU_NOMBRE=A.IdentificacionComprador\n WHERE A.IdNotaCredito='$Ids' AND A.Estado IN(2,8) \";\n break;\n Case \"ND\"://NOTAS DE DEBITO\n //$sql = \"UPDATE \" . $con->dbname . \".NubeFactura SET EstadoEnv='$Estado' WHERE IdFactura='$Ids';\";\n break;\n }\n //$cabFact[\"Estado\"];\n //$rawData = $con->createCommand($sql)->queryAll();\n $rawData = $con->createCommand($sql)->queryOne(); //Recupera Solo 1\n return $rawData;\n }", "title": "" }, { "docid": "b0643ea1f7d934861cf6566042248015", "score": "0.42608994", "text": "function run()\n\t{\n\t\trequire_lang('ocf');\n\t\trequire_css('ocf');\n\n\t\t$original_comcode=post_param('post');\n\t\trequire_code('ocf_posts_action');\n\t\trequire_code('ocf_posts_action2');\n\t\tocf_check_post($original_comcode,post_param_integer('topic_id',NULL),get_member());\n\t\t$posting_ref_id=post_param_integer('posting_ref_id',mt_rand(0,100000));\n\t\tif ($posting_ref_id<0) fatal_exit(do_lang_tempcode('INTERNAL_ERROR'));\n\t\t$post_bits=do_comcode_attachments($original_comcode,'ocf_post',strval(-$posting_ref_id),true,$GLOBALS['FORUM_DB']);\n\t\t$post_comcode=$post_bits['comcode'];\n\t\t$post_html=$post_bits['tempcode'];\n\n\t\t// Put quote in\n\t\t$parent_id=post_param_integer('parent_id',NULL);\n\t\tif ((!is_null($parent_id)) && (strpos($post_comcode,'[quote')===false))\n\t\t{\n\t\t\t$_p=$GLOBALS['FORUM_DB']->query_select('f_posts',array('*'),array('id'=>$parent_id),'',1);\n\t\t\tif (array_key_exists(0,$_p))\n\t\t\t{\n\t\t\t\t$p=$_p[0];\n\t\t\t\t$p['message']=get_translated_tempcode($p['p_post'],$GLOBALS['FORUM_DB']);\n\n\t\t\t\t$temp=$post_html;\n\t\t\t\t$post_html=new ocp_tempcode();\n\t\t\t\t$post_html=do_template('COMCODE_QUOTE_BY',array('SAIDLESS'=>false,'BY'=>$p['p_poster_name_if_guest'],'CONTENT'=>$p['message']));\n\t\t\t\t$post_html->attach($temp);\n\t\t\t}\n\t\t}\n\n\t\t$post_owner=get_member();\n\t\t$_post_date=time();\n\t\t$post_id=post_param_integer('post_id',NULL);\n\t\tif (!is_null($post_id))\n\t\t{\n\t\t\t$post_owner=$GLOBALS['FORUM_DB']->query_value_null_ok('f_posts','p_poster',array('id'=>$post_id));\n\t\t\tif (is_null($post_owner)) $post_owner=get_member();\n\n\t\t\t$_post_date=$GLOBALS['FORUM_DB']->query_value_null_ok('f_posts','p_time',array('id'=>$post_id));\n\t\t\tif (is_null($_post_date)) $_post_date=time();\n\t\t}\n\t\t$post_date=get_timezoned_date($_post_date);\n\n\t\t$post_title=post_param('title','');\n\t\tif (ocp_mb_strlen($post_title)>120)\n\t\t{\n\t\t\twarn_exit(do_lang_tempcode('TITLE_TOO_LONG'));\n\t\t}\n\t\t$unvalidated=((post_param_integer('validated',0)==0) && (get_param('page','')=='topics'))?do_lang_tempcode('UNVALIDATED'):new ocp_tempcode();\n\t\t$emphasis=new ocp_tempcode();\n\t\t$intended_solely_for=post_param('intended_solely_for',NULL);\n\t\tif ($intended_solely_for=='') $intended_solely_for=NULL;\n\t\t$is_emphasised=post_param_integer('is_emphasised',0)==1;\n\t\tif ($is_emphasised)\n\t\t{\n\t\t\t$emphasis=do_lang_tempcode('IMPORTANT');\n\t\t}\n\t\telseif (!is_null($intended_solely_for))\n\t\t{\n\t\t\tif (is_numeric($intended_solely_for))\n\t\t\t{\n\t\t\t\t$_intended_solely_for=$GLOBALS['FORUM_DRIVER']->get_username(intval($intended_solely_for));\n\t\t\t\tif (!is_null($_intended_solely_for)) $intended_solely_for=$_intended_solely_for;\n\t\t\t}\n\t\t\t$emphasis=do_lang_tempcode('PP_TO',escape_html($intended_solely_for));\n\n\t\t}\n\t\t$class=$is_emphasised?'ocf_post_emphasis':(!is_null($intended_solely_for)?'ocf_post_personal':'');\n\n\t\t// Member details\n\t\t$signature=get_translated_tempcode($GLOBALS['FORUM_DRIVER']->get_member_row_field($post_owner,'m_signature'),$GLOBALS['FORUM_DB']);\n\t\t$_postdetails_avatar=$GLOBALS['FORUM_DRIVER']->get_member_avatar_url($post_owner);\n\t\tif ($_postdetails_avatar!='')\n\t\t{\n\t\t\t$post_avatar=do_template('OCF_TOPIC_POST_AVATAR',array('_GUID'=>'2683c09eabd7a9f1fdc57a20117483ef','AVATAR'=>$_postdetails_avatar));\n\t\t} else\n\t\t{\n\t\t\t$post_avatar=new ocp_tempcode();\n\t\t}\n\t\trequire_code('ocf_groups');\n\t\trequire_code('ocf_members');\n\t\t$poster_title=addon_installed('ocf_member_titles')?$GLOBALS['FORUM_DRIVER']->get_member_row_field($post_owner,'m_title'):'';\n\t\t$primary_group=$GLOBALS['FORUM_DRIVER']->get_member_row_field($post_owner,'m_primary_group');\n\t\tif ($poster_title=='') $poster_title=get_translated_text(ocf_get_group_property($primary_group,'title'),$GLOBALS['FORUM_DB']);\n\n\t\t// Poster box\n\t\tif (!is_guest($post_owner))\n\t\t{\n\t\t\trequire_code('ocf_members2');\n\t\t\t$poster_details=ocf_show_member_box($post_owner,false,NULL,NULL,false);\n\t\t\t$poster_username=$GLOBALS['FORUM_DRIVER']->get_username($post_owner);\n\t\t\tif (is_null($poster_username)) $poster_username=do_lang('UNKNOWN');\n\t\t\t$poster=do_template('OCF_POSTER_MEMBER',array('_GUID'=>'976a6ceb631bbdcdd950b723cb5d2487','ONLINE'=>true,'ID'=>strval($post_owner),'POSTER_DETAILS'=>$poster_details,'PROFILE_URL'=>$GLOBALS['FORUM_DRIVER']->member_profile_url($post_owner,false,true),'POSTER_USERNAME'=>$poster_username));\n\t\t} else\n\t\t{\n\t\t\t$poster_details=new ocp_tempcode();\n\t\t\t$custom_fields=do_template('OCF_TOPIC_POST_CUSTOM_FIELD',array('NAME'=>do_lang_tempcode('IP_ADDRESS'),'VALUE'=>(get_ip_address())));\n\t\t\t$poster_details=do_template('OCF_GUEST_DETAILS',array('_GUID'=>'2db48e17db9f060c04386843f2d0f105','CUSTOM_FIELDS'=>$custom_fields));\n\t\t\t$poster_username=post_param('poster_name_if_guest',do_lang('GUEST'));\n\t\t\t$ip_link=has_actual_page_access(get_member(),'admin_lookup')?build_url(array('page'=>'admin_lookup','param'=>get_ip_address()),get_module_zone('admin_lookup')):new ocp_tempcode();\n\t\t\t$poster=do_template('OCF_POSTER_GUEST',array('_GUID'=>'9c0ba6198663de96facc7399a08e8281','IP_LINK'=>$ip_link,'POSTER_DETAILS'=>$poster_details,'POSTER_USERNAME'=>$poster_username));\n\t\t}\n\n\t\t// Rank images\n\t\t$rank_images=new ocp_tempcode();\n\t\t$posters_groups=$GLOBALS['FORUM_DRIVER']->get_members_groups($post_owner,true);\n\t\tforeach ($posters_groups as $group)\n\t\t{\n\t\t\t$rank_image=ocf_get_group_property($group,'rank_image');\n\t\t\t$group_leader=ocf_get_group_property($group,'group_leader');\n\t\t\t$group_name=ocf_get_group_name($group);\n\t\t\tif ($rank_image!='') $rank_images->attach(do_template('OCF_RANK_IMAGE',array('_GUID'=>'a6a413fc07e05b28ab995b072718b755','GROUP_NAME'=>$group_name,'USERNAME'=>$GLOBALS['FORUM_DRIVER']->get_username(get_member()),'IMG'=>$rank_image,'IS_LEADER'=>$group_leader==get_member())));\n\t\t}\n\n\t\tif (get_param('type')=='edit_post')\n\t\t{\n\t\t\t$last_edited=do_template('OCF_TOPIC_POST_LAST_EDITED',array('LAST_EDIT_DATE_RAW'=>strval(time()),'LAST_EDIT_DATE'=>get_timezoned_date(time(),true),'LAST_EDIT_PROFILE_URL'=>$GLOBALS['FORUM_DRIVER']->member_profile_url(get_member(),false,true),'LAST_EDIT_USERNAME'=>$GLOBALS['FORUM_DRIVER']->get_username(get_member())));\n\t\t} else $last_edited=new ocp_tempcode();\n\n\t\t$post=do_template('OCF_TOPIC_POST',array('_GUID'=>'354473f96b4f7324d2a9c476ff78f0d7','POST_ID'=>'','TOPIC_FIRST_POST_ID'=>'','TOPIC_FIRST_POSTER'=>strval(get_member()),'POST_TITLE'=>$post_title,'CLASS'=>$class,'EMPHASIS'=>$emphasis,'FIRST_UNREAD'=>'','TOPIC_ID'=>'','ID'=>'','POST_DATE_RAW'=>strval($_post_date),'POST_DATE'=>$post_date,'UNVALIDATED'=>$unvalidated,'URL'=>'','POSTER'=>$poster,'POST_AVATAR'=>$post_avatar,'POSTER_TITLE'=>$poster_title,'RANK_IMAGES'=>$rank_images,'POST'=>$post_html,'LAST_EDITED'=>$last_edited,'SIGNATURE'=>$signature,'BUTTONS'=>'','POSTER_ID'=>strval($post_owner)));\n\t\t$out=do_template('OCF_TOPIC_POST_CLEAN_WRAP',array('_GUID'=>'62bbfabfa5c16c2aa6724a0b79839626','POST'=>$post));\n\n\t\treturn array($out,$post_comcode);\n\t}", "title": "" }, { "docid": "caacd453f43d3c13b3ea6565b53958cb", "score": "0.42597866", "text": "function xlsBOF()\n\t{\n\techo pack(\"ssssss\", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);\n\treturn;\n\t}", "title": "" }, { "docid": "fddef28d97cb9aa2002a1d761e6293bd", "score": "0.42577112", "text": "public function printEpr()\r\n\t//affiche le formulaire de l'épreuve\r\n\t{\r\n\t\techo '<form action=\"dispacher2.php?page=3\" method=\"post\" >';\r\n\t\t\t\r\n\t\tforeach($this->questions() as $que)\r\n\t\t{\r\n\t\t\t$que->printQ();\r\n\t\t}\r\n\t\t//bouton valider du formulaire\r\n\t\techo '<input class=\"dr\" type=\"submit\" name=\"sent\" />\r\n\t\t</form>';\r\n\t}", "title": "" }, { "docid": "a7f5782bb7c1bbbed76d382adb774f0c", "score": "0.4254421", "text": "function zend_runtime_obfuscate() {}", "title": "" }, { "docid": "6f5729a3006ff1cea66bf3fe1b9a18d7", "score": "0.42540038", "text": "public function envoiAction()\n {\n $orderIds = $this->getRequest()->getPost('order_ids');\n\n if (!empty($orderIds)) {\n foreach ($orderIds as $order_id) {\n $order = Mage::getModel('sales/order')->load($order_id);\n\n $is_smp_method = stristr($order->getShippingMethod(), 'savemypaquet_');\n\n $service = $order->getSmypSelectedService();\n $colis_numero_savemypaquet = $order->getSmypNumeroColis();\n\n if ($is_smp_method !== false && $service && !$order->getSmypNumeroColis()) {\n $numero_colis = ($this->hasShipment($order)) ? ($this->hasShipment($order)) : $this->creatShipment($order);\n $weights = explode(\"-\", $this->getRequest()->getPost('weight_' . $order_id));\n $poids = number_format($weights[1], 2, '.', '');\n $coli = array(\n 'date_de_commande' => date('Y-m-d', strtotime($order->getCreatedAt())),\n 'numero_de_commande' => $order->getIncrementID(),\n 'numero_colis' => $numero_colis,\n 'service' => ((int) $service) - 1,\n 'nom_du_client' => $order->getCustomerFirstname() . ' ' . $order->getCustomerLastname(),\n 'email_du_client' => $order->getCustomerEmail(),\n 'tel_client' => $order->getSmypClientTel(),\n 'poids' => $poids,\n 'adresse1' => $order->getShippingAddress()->getStreet(1),\n 'adresse2' => $order->getShippingAddress()->getStreet(2),\n 'ville' => $order->getShippingAddress()->getCity(),\n 'code_postal' => $order->getShippingAddress()->getPostcode(),\n 'pays' => ($order->getShippingAddress()->getCountryId() == 'FR') ? 'France' : $order->getShippingAddress()->getCountryId(),\n 'batiment' => $order->getSmypClientBatiment(),\n 'etage' => $order->getSmypClientEtage(),\n 'porte_position' => $order->getSmypClientPortePosition(),\n 'porte_cote' => (int)$order->getSmypClientPorteCote(),\n 'digicode_1' => $order->getSmypClientDigicode(),\n 'digicode_2' => $order->getSmypClientDigicode2(),\n\n );\n $result = $this->getHelper()->get_api()->colis->create($coli);\n if (is_array($result) && $result['resultat'] == 'ok') {\n $order->setSmypNumeroColis($result['numero_Save_MyPaquet']);\n $order->setSmypCodeBarreColis($result['code_barre']);\n $order->setSmypStatutColis($result['statut']);\n $order->save();\n\n $this->getHelper()->trackingColis($result['numero_Save_MyPaquet'], $order);\n } else {\n $this->_getSession()->addError($this->__('Commande ID :' . $order->getIncrementID() . ' ' . $result));\n }\n } elseif ($colis_numero_savemypaquet) {\n $this->getHelper()->trackingColis($colis_numero_savemypaquet, $order, true);\n }\n }\n } else {\n $this->_getSession()->addError($this->__('No Order has been selected'));\n }\n $this->_redirect(\"*/*/\");\n }", "title": "" }, { "docid": "1cdb9e6fc2380808d95cd03886f643d5", "score": "0.42533806", "text": "function enc_func0($body) {\t// 7bit \n return $body;\n}", "title": "" }, { "docid": "112ec601199e0231db4dbaf3267e1179", "score": "0.4250347", "text": "function generaCadenaOriginal($x_factura_id, $conn, $x_mes, $x_anio){\r\n\t\r\n\t$x_factura = $x_factura_id ;\r\n\t$conn = $conn;\r\n\t$mes = $x_mes;\r\n\t$anio = $x_anio;\r\n\t\r\n\t// sleeccionamos los datos de la factura para generar la cadena original \r\n\t\r\n\t$x_cadena_original = \"\";\r\n\t$sqlFactura = \"SELECT * FROM factura WHERE factura_id = $x_factura \";\r\n\t$rsFactura = phpmkr_query($sqlFactura,$conn) or die (\"Error al seleccionar la factura en la genracion del xml\". phpmkr_error().\"Query:\".$sqlFactura);\r\n\t$rowFactura = phpmkr_fetch_array($rsFactura);\r\n\t$x_cliente_id = $rowFactura[\"cliente_id\"];\r\n\t$x_fecha_generacion = $rowFactura[\"fecha_generacion\"];\r\n\t$x_folio = $rowFactura[\"folio\"];\r\n\t$x_sub_total_XML = $rowFactura[\"sub_total\"];\r\n\t$x_total_XML = $rowFactura[\"total\"];\r\n\t$x_forma_pago = limpiaCadena($rowFactura[\"forma_pago\"]);\r\n\t$x_metodo_pago = limpiaCadena($rowFactura[\"metodo_pago\"]);\r\n\t$x_tipo_comprobante = limpiaCadena($rowFactura[\"tipo_comprobante\"]);\r\n\t$x_total_iva = ($x_total_XML - $x_sub_total_XML);\r\n\t$x_importe_iva = $x_total_iva;\r\n\tmysql_free_result($rsFactura);\r\n\t\r\n\t\r\n\t$sqlCliente = \"SELECT * FROM factura_datos WHERE factura_id = $x_factura \" ;\r\n\t$rsCliente = phpmkr_query($sqlCliente, $conn) or die (\"Error al seleccionar los datos del cliente en la genracion del xml\". phpmkr_error().\"Query:\".$sqlCliente);\r\n\t$rowCliente = phpmkr_fetch_array($rsCliente);\r\n\t$x_cliente_id = $rowCliente[\"cliente_id\"];\r\n\t$x_nombre = limpiaCadena($rowCliente[\"nombre\"]);\r\n\t$x_paterno = limpiaCadena($rowCliente[\"paterno\"]);\r\n\t$x_materno = limpiaCadena($rowCliente[\"materno\"]);\r\n\t$x_rfc = limpiaCadena($rowCliente[\"rfc\"]);\r\n\t$x_calle = limpiaCadena($rowCliente[\"calle\"]);\r\n\t$x_colonia = limpiaCadena($rowCliente[\"colonia\"]);\r\n\t$x_numero = limpiaCadena($rowCliente[\"numero\"]);\r\n\t$x_delegacion = limpiaCadena($rowCliente[\"delegacion\"]);\r\n\t$x_estado = limpiaCadena($rowCliente[\"estado\"]);\r\n\t$x_codigo_postal = limpiaCadena($rowCliente[\"codigo_postal\"]);\r\n\t$x_nombre_completo = $x_nombre.\" \".$x_paterno.\" \".$x_paterno;\r\n\t$x_nombre_completo = limpiaCadena($x_nombre_completo);\r\n\t\r\n\tmysql_free_result($rsCliente);\r\n\t\r\n\t$sqlPagos = \"SELECT * FROM factura_pago WHERE factura_id = $x_factura\";\r\n\t$rsPagos = phpmkr_query($sqlPagos,$conn) or die (\"Error al seleccionar los datos de los pagos en la genracion del xml\". phpmkr_error().\"Query:\".$sqlPagos);\r\n\t$x_cont = 0;\r\n\twhile($rowPagos = phpmkr_fetch_array($rsPagos)){\r\n\t\t$x_cont ++;\r\n\t\t// mientras hay pagos se genera un renglon del xml por cada pago.\r\n\t\t$GLOBALS[\"x_recibo_id_$x_cont\"] = $rowPagos[\"recibo_id\"];\r\n\t\t${\"x_cantidad_\".$x_cont} = $rowPagos[\"cantidad\"];\r\n\t\t${\"x_unidad_\".$x_cont} = $rowPagos[\"unidad\"];\r\n\t\t${\"x_descripcion_\".$x_cont} = limpiaCadena($rowPagos[\"descripcion\"]);\r\n\t\t${\"x_valor_unitario_\".$x_cont} = $rowPagos[\"valor_unitario\"];\r\n\t\t${\"x_importe_\".$x_cont} = $rowPagos[\"importe\"];\r\n\t\t${\"x_impuesto_\".$x_cont} = $rowPagos[\"impuesto\"];\r\n\t\t${\"x_importe_impuesto_\".$x_cont} = $rowPagos[\"importe_impuesto\"];\r\n\t\t${\"x_tasa_\".$x_cont} = $rowPagos[\"tasa\"];\r\n\t\t}\r\n\t\t\r\n\t\t$GLOBALS[\"x_total_pagos\"] = $x_cont;\r\n\t\t$x_factura_certificado_id = 1;\r\n\t\t\r\n\t\t\r\n\t\tmysql_free_result($rsPagos);\r\n\t$sqlCertificado = \"SELECT * FROM factura_certificado WHERE factura_certificado_id = $x_factura_certificado_id\";\r\n\t$rsCertificado = phpmkr_query($sqlCertificado, $conn) or die (\"Error al seleccionar los datos de los pagos en la genracion del xml\". phpmkr_error().\"Query:\".$sqlCertificado);\r\n\t$rowCertificado = phpmkr_fetch_array($rsCertificado);\r\n\t$x_rfc_contribuyente = $rowCertificado[\"rfc_contribuyente\"];\r\n\t$x_numero_aprobacion = $rowCertificado[\"numero_aprobacion\"];\r\n\t$x_anio_aprobacion = $rowCertificado[\"anio_aprobacion\"];\r\n\t$x_serie_certificado = $rowCertificado[\"serie_certificado\"];\r\n\t$x_serie = $rowCertificado[\"serie\"];\r\n\t$x_fecha_transaccion = $rowCertificado[\"fecha_transaccion\"];\r\n\t$x_hora_transaccion = $rowCertificado[\"hora_transaccion\"];\r\n\t$x_hora_transaccion = $rowCertificado[\"hora_transaccion\"];\r\n\t$x_hora_transaccion = $rowCertificado[\"hora_transaccion\"];\r\n\t$x_hora_transaccion = $rowCertificado[\"hora_transaccion\"];\r\n\t$x_fecha_T = $x_fecha_transaccion.\"T\".$x_hora_transaccion;\r\n\t$x_fecha_R = $x_fecha_transaccion.\" \".$x_hora_transaccion;\r\n\t\r\n\tmysql_free_result($rsCertificado);\r\n\t\r\n\t\r\n\t\r\n\t$x_cadena_original = \"||\";\r\n\t$x_cadena_original .= \"2.0\"; // version \r\n\t$x_cadena_original .= \"|$x_serie\";\r\n\t$x_cadena_original .= \"|$x_folio\";\r\n\t$x_cadena_original .= \"|$x_fecha_T\";\r\n\t$x_cadena_original .= \"|$x_numero_aprobacion\";\r\n\t$x_cadena_original .= \"|$x_anio_aprobacion\";\r\n\t$x_cadena_original .= \"|ingreso\"; //tipoDeComprobante\r\n\t$x_cadena_original .= \"|$x_forma_pago\";\r\n\t#$x_cadena_original .= \"|$x_metodo_pago\";\r\n\t$x_cadena_original .= \"|$x_sub_total_XML\";\r\n\t$x_cadena_original .= \"|$x_total_XML\";\r\n\t$x_cadena_original .= \"|$x_rfc_contribuyente\";\r\n\t$x_cadena_original .= \"|FINANCIERA CREA\";\r\n\t$x_cadena_original .= \"|AVENIDA REVOLUCION\";\r\n\t$x_cadena_original .= \"|1909\";\r\n\t$x_cadena_original .= \"|2\";\r\n\t$x_cadena_original .= \"|SAN ANGEL\";\r\n\t$x_cadena_original .= \"|ALVARO OBREGON\";\r\n\t$x_cadena_original .= \"|DISTRITO FEDERAL\";\r\n\t$x_cadena_original .= \"|MEXICO\";\r\n\t$x_cadena_original .= \"|01000\";\r\n\t$x_cadena_original .= \"|$x_rfc\";\r\n\t$x_cadena_original .= \"|$x_nombre_completo\";\r\n\t$x_cadena_original .= \"|$x_calle\";\r\n\t$x_cadena_original .= \"|$x_numero\";\r\n\t$x_cadena_original .= \"|$x_colonia\";\r\n\t$x_cadena_original .= \"|$x_delegacion\";\r\n\t$x_cadena_original .= \"|$x_estado\";\r\n\t$x_cadena_original .= \"|MEXICO\";\r\n\t$x_cadena_original .= \"|$x_codigo_postal\";\r\n\t\r\n\t$x_cuenta = 1;\r\n\t//UN REGISTRO POR CADA PAGO\r\n\twhile($x_cuenta <= $x_cont){\r\n\t\t\r\n\t//sacamos los valores de las variables\t\r\n\t$x_cantidad_n = \"x_cantidad_$x_cuenta\";\r\n\t$x_cantidad = $$x_cantidad_n;\r\n\t$x_unidad_n = \"x_unidad_$x_cuenta\";\r\n\t$x_unidad = $$x_unidad_n;\r\n\t$x_descripcion_n = \"x_descripcion_$x_cuenta\";\r\n\t$x_descripcion = $$x_descripcion_n;\r\n\t$x_valor_unitario_n = \"x_valor_unitario_$x_cuenta\";\r\n\t$x_valor_unitario = $$x_valor_unitario_n;\r\n\t$x_importe_n = \"x_importe_$x_cuenta\";\r\n\t$x_importe = $$x_importe_n;\t\r\n\t\t\r\n\t$x_cadena_original .= \"|$x_cantidad\";\t\r\n\t$x_cadena_original .= \"|$x_unidad\";\r\n\t$x_cadena_original .= \"|$x_descripcion\";\r\n\t$x_cadena_original .= \"|$x_valor_unitario\";\r\n\t$x_cadena_original .= \"|$x_importe\";\r\n\t$x_cuenta++;\r\n\t}\r\n\t\r\n\t$x_cadena_original .= \"|IVA\";\r\n\t$x_cadena_original .= \"|$x_importe_iva\";\r\n\t$x_cadena_original .= \"|$x_total_iva\";\r\n\t$x_cadena_original .= \"||\"; // fin de la cadena original\r\n\t \r\n\t \r\n\t$x_cadena_original = utf8_encode($x_cadena_original);\t\r\n\t//segumos con la cadena original\r\n\t\r\n\t\r\n\t#creamos el archivo para el reporte mensual \r\n\t$x_ms = $mes;\r\n\t$x_ao = $anio;\r\n\t\r\n\t$_x_tot = substr ($x_total_XML, 0, strlen($x_total_XML) - 1);\r\n\t$_x_iva = substr ($x_total_iva, 0, strlen($x_total_iva) - 1);\r\n\tif(($_x_iva <0)){\r\n\t\t$_x_iva = \"\";\r\n\t\t}\r\n\r\n\r\n\t$x_nombre_archivo = \"1\".$rcf_contibuyente.$mes.$x_ao.\".txt\";\r\n\t$x_registro_actual .= \"|$x_rfc\";\r\n\t$x_registro_actual .= \"|$x_serie\";\r\n\t$x_registro_actual .= \"|$x_folio\";\r\n\t$x_registro_actual .= \"|$x_numero_aprobacion\";\r\n\t$x_registro_actual .= \"|$x_fecha_R\";\r\n\t$x_registro_actual .= \"|$_x_tot\";\r\n\t$x_registro_actual .= \"|$_x_iva\";\r\n\t$x_registro_actual .= \"|1\";\r\n\t$x_registro_actual .= \"|I\";\r\n\t$x_registro_actual .= \"|\";\r\n\t$x_registro_actual .= \"|\";\r\n\t$x_registro_actual .= \"|\\r\\n\";\r\n\r\n\t\r\n\t\r\n\t//abrimos el archivo y le conactenamos el registro actual......\r\n\t$file_t =fopen(\"CFDS/REPORTES_MENSUALES/$x_nombre_archivo\",\"a+\");\r\n\tfwrite($file_t, $x_registro_actual);\r\n\tfclose($file_t);\r\n\treturn $x_cadena_original;\r\n\t}", "title": "" }, { "docid": "db1c753d1f3e8361bd79fc3bb13855d5", "score": "0.42467886", "text": "function xmlbody(){\n\t\t$guid=$_REQUEST[\"guid\"];\n\t\t$accid=$_REQUEST['accountId'];\n\n // Find the document/rights info\n // NOTE: MySQL, NULL != NULL\n $result = $this->dbexec(\"select * \n from rights r, document d, document_location l \n where ((r.document_id = d.id) or (r.storage_account_id = d.storage_account_id))\n and d.guid = '$guid' \n and r.account_id = '$accid'\n and l.document_id = d.id;\", \"Unable to query rights\");\n\n\t\t// echo inputs\n\t\t$this->xm($this->xmfield (\"inputs\",\n\t\t$this->xmfield(\"guid\",$guid).\n $this->xmfield(\"accid\",$accid)));\n\n // add results\n $docRefs = \"\";\n if($result) {\n while($rights = mysql_fetch_object($result)) {\n $docRefs.=\"<docRef><guid>$guid</guid>\"\n .$this->xmfield(\"creationDate\",$rights->creation_time)\n .$this->xmfield(\"location\",$rights->node_node_id)\n .\"</docRef>\\n\";\n }\n\n // return outputs\n $this->xm($this->xmfield (\"outputs\", $this->xmfield(\"status\",\"ok\").$docRefs));\n }\n else\n $this->xm($this->xmfield (\"outputs\", $this->xmfield(\"status\",\"failed\")));\n }", "title": "" }, { "docid": "88bffcad7396cebe3a1d6fb89dd52852", "score": "0.4240732", "text": "function ricca3_shortcode_especalum($atts, $content = null) {\r\n\tglobal $wpdb;\r\n\tglobal $ricca3_especalum;\r\n\tglobal $ricca3_butons_especalum;\r\n\tglobal $current_user;\r\n\r\n\tget_currentuserinfo();\r\n\t$num_cols=count($ricca3_especalum,1)/count($ricca3_especalum,0)-1;\r\n\t\r\n\tif( !isset( $_GET['ID'] ) ) return '';\r\n//\t\tbuscar les dades del alumne\r\n\t$row_alu = $wpdb->get_row($wpdb->prepare('SELECT * FROM ricca3_alumne WHERE idalumne=%s', $_GET['ID']), ARRAY_A, 0);\r\n\t$image_attributes = ricca3_miniatura($_GET['ID']);\r\n//\t\tmissatge de capçalera de la pàgina\t\r\n\tricca3_missatge(sprintf('%s %s</td><td><img src=\"%s\" width=\"%s\" height=\"%s\">',__('Especialitats de l\\'alumne','ricca3-alum'), $row_alu['cognomsinom'], $image_attributes[0], $image_attributes[1], $image_attributes[2] ));\r\n\t$token = array( 'espec' => $_GET['espec'], 'grup' => $_GET['grup'], 'any' => $_GET['any'], 'estat' => $_GET['estat'], 'repe' => $_GET['repe']);\r\n//\tajuda al butons\t\r\n\t$ricca3_butons_especalum['texte'][0] = __('ajuda-especalum-afegirespecialitat', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][1] = __('ajuda-especalum-baixaespecialitat', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][2] = __('ajuda-especalum-creditsalumne', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][3] = __('ajuda-especalum-aplicarpla', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][4] = __('ajuda-especalum-dadesalumne', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][5] = __('ajuda-especalum-alumne', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][6] = __('ajuda-especalum-butlleti', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][7] = __('ajuda-especalum-caratula', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][8] = __('ajuda-especalum-marcarrepetidor', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][9] = __('ajuda-especalum-canviarany', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][10] = __('ajuda-especalum-afegircredit', 'ricca3-alum');\r\n\t$ricca3_butons_especalum['texte'][11] = __('ajuda-especalum-notafinal', 'ricca3-alum');\r\n//\t\tmostrar la filera de butons\r\n\tricca3_butons( $ricca3_butons_especalum, 12, $token );\t\r\n//\t\tajuda a la graella\r\n\t$ricca3_especalum['ajuda'][0] = __('ajuda-graella-especalum-any', 'ricca3-alum');\r\n\t$ricca3_especalum['ajuda'][1] = __('ajuda-graella-especalum-especialitat', 'ricca3-alum');\r\n\t$ricca3_especalum['ajuda'][2] = __('ajuda-graella-especalum-grup', 'ricca3-alum');\r\n\t$ricca3_especalum['ajuda'][3] = __('ajuda-graella-especalum-estat', 'ricca3-alum');\r\n\t$ricca3_especalum['ajuda'][4] = __('ajuda-graella-especalum-nota', 'ricca3-alum');\r\n\t$ricca3_especalum['ajuda'][5] = __('ajuda-graella-especalum-repeteix', 'ricca3-alum');\r\n//\t\tbuscar especialitats\r\n\t$data_view = $wpdb->get_results( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne = %s ORDER BY idany ',$_GET['ID']), ARRAY_A);\r\n//\t\tllistat de les especialitats del alumne\r\n\tricca3_graella( $ricca3_especalum, $data_view, $token );\r\n\tprintf('</table></form>', NULL);\r\n//\t\tquantes especialitats te l'alumne?\r\n\t$espec = $wpdb->query( $wpdb->prepare('SELECT DISTINCT idespecialitat FROM ricca3_alumespec_view WHERE idalumne=%s and idestat_es = 1', $_GET['ID']));\t\r\n//\t<!-- the tabs -->\r\n\tprintf('<div id=\"tabs\">', NULL);\r\n//\t\ttab principal\r\n\tprintf('<ul class=\"tabs\"><li><a href=\"#estat\" title=\"%s\">%s</a></li>', __('ajuda-tab-estatcredits', 'ricca3-alum'), __('Estat dels crèdits', 'ricca3-alum'));\r\n//\t\ttabs especialitats\t\r\n\tfor( $i = 0; $i < $espec; $i++){\r\n\t\t$idespec = $wpdb->get_row( $wpdb->prepare('SELECT DISTINCT idespecialitat FROM ricca3_alumespec_view WHERE idalumne=%s and idestat_es = 1', $_GET['ID']), ARRAY_A, $i);\r\n\t\t$row_espec = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne=%s AND idespecialitat=%s', $_GET['ID'], $idespec['idespecialitat']), ARRAY_A, 0);\r\n\t\t$nom = str_word_count($row_espec['nomespecialitat'], 1, 'ÀÈÒÓ');\r\n\t\tprintf('<li><a href=\"#espec%s\" title=\"%s\">%s</a></li>', $i, __('ajuda-tab-especialitats','ricca3-alum'), $nom[0]); \r\n\t}\r\n//\t\ttabs historial\t\r\n\tfor( $i = 0; $i < $espec; $i++){\r\n\t\t$idespec = $wpdb->get_row( $wpdb->prepare('SELECT DISTINCT idespecialitat FROM ricca3_alumespec_view WHERE idalumne=%s and idestat_es = 1', $_GET['ID']), ARRAY_A, $i);\r\n\t\t$row_espec = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne=%s AND idespecialitat=%s', $_GET['ID'], $idespec['idespecialitat']), ARRAY_A, 0);\r\n\t\t$nom = str_word_count($row_espec['nomespecialitat'], 1, 'ÀÈÒÓ');\r\n\t\tprintf('<li><a href=\"#hist%s\" title=\"%s\">HISTORIAL %s</a></li>', $i, __('ajuda-tab-historial','ricca3-alum') ,$nom[0]);\r\n\t}\r\n \tprintf('</ul>', NULL);\r\n//\t\t<!-- tab \"panes\" -->\r\n#################################\r\n##//\t\tprimer tab\r\n#################################\r\n \tprintf('<div id=\"estat\">', NULL);\r\n \tfor( $i = 0; $i < $espec; $i++){\r\n//\tbusquem quines son les especialitats\r\n\t\t$idespec = $wpdb->get_row( $wpdb->prepare('SELECT DISTINCT idespecialitat FROM ricca3_alumespec_view WHERE idalumne=%s AND idestat_es=1 ', $_GET['ID']), ARRAY_A, $i);\r\n \t\t$row_espec = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne=%s AND idespecialitat=%s', $_GET['ID'], $idespec['idespecialitat']), ARRAY_A, 0);\r\n \t\tprintf('<form method=\"post\" action=\"\" target=\"_self\" name=\"espec\" id=\"primertab\">', NULL);\r\n \t\tprintf('<table><tr><td>%s</td></tr></table>', $row_espec['nomespecialitat']);\r\n//\tbusquem quin credits te asignats \t\t\r\n \t\t$query = $wpdb->prepare('SELECT DISTINCT ricca3_credits_avaluacions.idccomp, ricca3_credits.ordre_cr FROM ricca3_credits_avaluacions '. \r\n\t\t\t\t\t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp = ricca3_credits_avaluacions.idccomp '.\r\n\t\t\t\t\t\t\t\t'INNER JOIN ricca3_credits ON ricca3_credits.idcredit = ricca3_ccomp.idcredit '.\r\n\t\t\t\t\t\t\t\t'WHERE idalumne=%s AND ricca3_credits.idespecialitat=%s ORDER BY ricca3_credits.ordre_cr ', $_GET['ID'], $idespec['idespecialitat']);\r\n// \t\techo \"<br />\", $query; \t\t\r\n \t\t$array_cred_espec = $wpdb->get_results( $query, ARRAY_A );\r\n \t\tprintf('<table>', NULL);\r\n//\tmostrem la capçalera de la graella amb les ajudes\r\n \t\tprintf( '<tr><th title=\"%s\">Grup</th><th title=\"%s\">Conv</th><th title=\"%s\">R</th><th title=\"%s\">Crèdit</th><th title=\"%s\">N1</th><th title=\"%s\">A1</th><th title=\"%s\">N2</th>'.\r\n \t\t\t\t'<th title=\"%s\">A2</th><th title=\"%s\">N3</th><th title=\"%s\">A3</th><th title=\"%s\">NFCC</th><th title=\"%s\">NF</th><th title=\"%s\">P</th><th title=\"%s\">Professor</th><th title=\"%s\">HoresCC</th><th title=\"%s\">Hores</th></tr>',\r\n \t\t\t\t__('ajuda-graella-credalu-grup', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-conv', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-R', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-credit', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-N1', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-A1', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-N2', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-A2', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-N3', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-A3', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-NFCC', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-NF', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-P', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-prof', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-horesCC', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-hores', 'ricca3-alum')\r\n \t\t\t\t);\r\n//\tbusquem quin es el any actual per les negretes de la graella \t\t\r\n \t\t$row_any = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ricca3_any WHERE actual = 1', NULL ) , ARRAY_A , 0 );\r\n//\tbusquem l'infomació dels crèdits \t\r\n//\t\techo \"<br />\", count($array_cred_espec);\t\t\r\n \t\tfor( $j=0; $j < count($array_cred_espec); $j++){\r\n \t\t\t$query_cred = $wpdb->prepare('SELECT * FROM ricca3_credits_avaluacions '. \r\n\t\t\t\t\t\t\t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp=ricca3_credits_avaluacions.idccomp '.\r\n\t\t\t\t\t\t\t\t\t\t'INNER JOIN ricca3_credits ON ricca3_credits.idcredit = ricca3_ccomp.idcredit '.\r\n\t\t\t\t\t\t\t\t\t\t'INNER JOIN ricca3_especialitats ON ricca3_especialitats.idespecialitat = ricca3_credits.idespecialitat '.\r\n \t\t\t\t\t\t\t\t\t\t'INNER JOIN ricca3_grups ON ricca3_grups.idgrup = ricca3_ccomp.idgrup '.\r\n \t\t\t\t\t\t\t\t\t\t'INNER JOIN ricca3_any ON ricca3_any.idany = ricca3_credits_avaluacions.idany '.\r\n \t\t\t\t\t\t\t\t\t\t'INNER JOIN ricca3_professors ON ricca3_professors.idprof = ricca3_ccomp.idprofessor '.\r\n\t\t\t\t\t\t\t\t\t\t'WHERE idalumne=%s AND ricca3_credits_avaluacions.idccomp=%s '.\r\n \t\t\t\t\t\t\t\t\t\t'ORDER BY ricca3_credits_avaluacions.idany DESC', $_GET['ID'], $array_cred_espec[$j]['idccomp']);\r\n \t\t\t$row_cred = $wpdb->get_row( $query_cred, ARRAY_A, 0);\r\n//\tsi el crèdit es actiu per aquest any mostrem la convocatoria en negretes\r\n \t\t\t$conv = $row_cred['convord'];\r\n \t\t\tif($row_cred['conv'] == $row_any['conv']) $conv = sprintf('<b>%s</b>', $row_cred['convord']);\r\n// \tpreparem les dades\r\n \t\t\t$repeteix = $row_cred['repe'];\r\n \t\t\tif($row_cred['repe'] =='R') $repeteix = '<b>*</b>';\r\n \t\t\t$title = '';\r\n//\tinfo del crèdit a title=\"\"\r\n\t\t\t$query_dades = $wpdb->prepare('SELECT * FROM ricca3_credits_avaluacions '.\r\n\t\t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp=ricca3_credits_avaluacions.idccomp '.\r\n\t\t\t\t\t'INNER JOIN ricca3_credits ON ricca3_credits.idcredit = ricca3_ccomp.idcredit '.\r\n\t\t\t\t\t'INNER JOIN ricca3_especialitats ON ricca3_especialitats.idespecialitat = ricca3_credits.idespecialitat '.\r\n\t\t\t\t\t'INNER JOIN ricca3_grups ON ricca3_grups.idgrup = ricca3_ccomp.idgrup '.\r\n\t\t\t\t\t'INNER JOIN ricca3_any ON ricca3_any.idany = ricca3_credits_avaluacions.idany '.\r\n\t\t\t\t\t'INNER JOIN ricca3_professors ON ricca3_professors.idprof = ricca3_ccomp.idprofessor '.\r\n\t\t\t\t\t'WHERE idalumne=%s AND ricca3_credits.idcredit = %s '.\r\n\t\t\t\t\t'ORDER BY ricca3_credits_avaluacions.idany ASC', $_GET['ID'], $row_cred['idcredit']);\r\n//\t\t\techo \"<br />\", $query_dades;\t\t\t\t\t\t\r\n \t\t\t$dades_cred = $wpdb->get_results( $query_dades, ARRAY_A);\r\n \t\t\t$title = sprintf('%s', $dades_cred[0]['nomcredit']);\r\n \t\t\tfor( $k = 0; $k < count( $dades_cred ); $k++){\r\n\r\n \t\t\t}\r\n//\tmostrem els resultats a la linea de la graella \t\t\t\r\n\t\t\tprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td title=\"%s\">%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td><b>%s</b></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', \r\n \t\t\t\t$row_cred['grup'], $conv, $repeteix, $title, $row_cred['nomccomp'], $row_cred['nota1'], $row_cred['act1'], $row_cred['nota2'], $row_cred['act2'], \r\n \t\t\t\t$row_cred['nota3'], $row_cred['actf'], $row_cred['notaf_cc'], $row_cred['notaf_cr'], $row_cred['pendi'], $row_cred['nomicognoms'], $row_cred['hores_cc'], $row_cred['hores_cr']);\r\n \t\t}\r\n \t\tprintf('</table></form>', NULL);\r\n \t}\r\n \tprintf('</div>', NULL);\r\n#################################\r\n//\t\ttabs detallats especialitat\r\n#################################\r\n \tfor( $i = 0; $i < $espec; $i++){\r\n \t\t$idespec = $wpdb->get_row( $wpdb->prepare('SELECT DISTINCT idespecialitat FROM ricca3_alumespec_view WHERE idalumne=%s AND idestat_es=1 ', $_GET['ID']), ARRAY_A, $i);\r\n \t\t$row_espec = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne=%s AND idespecialitat=%s', $_GET['ID'], $idespec['idespecialitat']), ARRAY_A, 0);\r\n \t\t$nom = str_word_count($row_espec['nomespecialitat'], 1, 'ÀÈÒÓ');\r\n \t\t$query_cred = $wpdb->prepare('SELECT * FROM ricca3_credits_avaluacions '.\r\n\r\n \t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp=ricca3_credits_avaluacions.idccomp '.\r\n \t\t\t\t'INNER JOIN ricca3_credits ON ricca3_credits.idcredit = ricca3_ccomp.idcredit '.\r\n \t\t\t\t'INNER JOIN ricca3_especialitats ON ricca3_especialitats.idespecialitat = ricca3_credits.idespecialitat '.\r\n \t\t\t\t'INNER JOIN ricca3_grups ON ricca3_grups.idgrup = ricca3_ccomp.idgrup '.\r\n \t\t\t\t'INNER JOIN ricca3_any ON ricca3_any.idany = ricca3_credits_avaluacions.idany '.\r\n \t\t\t\t'INNER JOIN ricca3_professors ON ricca3_professors.idprof = ricca3_ccomp.idprofessor '.\r\n \t\t\t\t'WHERE idalumne=%s AND ricca3_credits.idespecialitat=%s '.\r\n \t\t\t\t'ORDER BY ordre_cr, ricca3_credits_avaluacions.idccomp, ricca3_credits_avaluacions.idany ', $_GET['ID'], $idespec['idespecialitat']); \t\t\r\n\t\t$data_cred = $wpdb->get_results( $query_cred, ARRAY_A);\r\n\t\tprintf('<div id=\"espec%s\"><table>', $i);\r\n//\tmostrem la capçalera de la graella amb les ajudes\r\n \t\tprintf( '<tr><th title=\"%s\">Grup</th><th title=\"%s\">Conv</th><th title=\"%s\">R</th><th title=\"%s\">Crèdit</th><th title=\"%s\">N1</th><th title=\"%s\">A1</th><th title=\"%s\">N2</th>'.\r\n \t\t\t\t'<th title=\"%s\">A2</th><th title=\"%s\">N3</th><th title=\"%s\">A3</th><th title=\"%s\">NFCC</th><th title=\"%s\">NF</th><th title=\"%s\">P</th><th title=\"%s\">Professor</th><th title=\"%s\">HoresCC</th><th title=\"%s\">Hores</th></tr>',\r\n \t\t\t\t__('ajuda-graella-credalu-grup', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-conv', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-R', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-credit', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-N1', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-A1', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-N2', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-A2', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-N3', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-A3', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-NFCC', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-NF', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-P', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-prof', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-horesCC', 'ricca3-alum'),\r\n \t\t\t\t__('ajuda-graella-credalu-hores', 'ricca3-alum')\r\n \t\t\t\t);\t\t\t\r\n\t\tfor( $j=0; $j < count($data_cred); $j++ ){\r\n//\tsi el crèdit es actiu per aquest any mostrem la convocatoria en negretes\r\n\t\t\t$conv = $data_cred[$j]['convord'];\r\n\t\t\tif($data_cred[$j]['conv'] == $row_any['conv']) $conv = sprintf('<b>%s</b>', $data_cred[$j]['convord']);\r\n//\r\n\t\t\t$repeteix = $data_cred[$j]['repe'];\r\n\t\t\tif($data_cred[$j]['repe'] =='R') $repeteix = '<b>*</b>';\r\n//\tmostrem els resultats a la linea de la graella\r\n//\tsi es un credit nou a la graella, mostrem el grup, el nom del crèdit, la nota final de credit i les hores\r\n\t\t\tif( $j == 0 || $data_cred[$j]['idcredit'] != $data_cred[$j-1]['idcredit']){\r\n//\tbusquem la ultima entrada del crèdit per esbrinar la nota final del credit\t\t\t\t\r\n\t\t\t\t$row_nota = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ricca3_credits_avaluacions '.\r\n\t\t\t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp=ricca3_credits_avaluacions.idccomp '.\r\n\t\t\t\t\t\t'WHERE idalumne=%s AND idcredit=%s ORDER by idany DESC ',\r\n\t\t\t\t\t\t$_GET['ID'], $data_cred[$j]['idcredit']), ARRAY_A, 0);\r\n\t\t\t\t$nota = $row_nota['notaf_cr'];\r\n//\tmostrem la linea inicial del crèdit\r\n\t\t\t\t$pendi='';\r\n\t\t\t\tif( $data_cred[$j]['pendi'] == 'P') $pendi='P';\t\t\t\t\r\n//\t\t\t\tprintf('<tr class=\"credit\"><td>%s</td><td>%s</td><td></td><td><b>%s</b></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><b>%s</b></td><td><b>%s</b></td><td></td><td></td><td>%s</td></tr>',\r\n\t\t\t\tprintf('<tr class=\"credit\"><td>%s</td><td>%s</td><td colspan=\"2\"><b>%s</b></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td><b>%s</b></td><td><b>%s</b></td><td></td><td></td><td>%s</td></tr>',\r\n\t\t\t\t$data_cred[$j]['grup'], '<b>===></b>', $data_cred[$j]['nomcredit'], $nota, $pendi, $data_cred[$j]['hores_cr']);\r\n\t\t\t}\r\n//\tsi ja hem mostrat el ccomp a la linea anterior, no posem el nomccomp\r\n\t\t\tif( $j != 0 && $data_cred[$j]['idccomp'] == $data_cred[$j-1]['idccomp'] ){\r\n\t\t\t\tprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',\r\n\t\t\t\t$data_cred[$j]['grup'], $conv, $repeteix, $data_cred[$j]['nota1'], $data_cred[$j]['act1'], $data_cred[$j]['nota2'], $data_cred[$j]['act2'],\r\n\t\t\t\t$data_cred[$j]['nota3'], $data_cred[$j]['actf'], $data_cred[$j]['notaf_cc'], $data_cred[$j]['pendi'], $data_cred[$j]['nomicognoms'], $data_cred[$j]['hores_cc'], $data_cred[$j]['hores_cr']);\r\n\t\t\t}else{\t\t\t\r\n\t\t\t\tprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td></td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',\r\n\t\t\t\t$data_cred[$j]['grup'], $conv, $repeteix, $data_cred[$j]['nomccomp'], $data_cred[$j]['nota1'], $data_cred[$j]['act1'], $data_cred[$j]['nota2'], $data_cred[$j]['act2'],\r\n\t\t\t\t$data_cred[$j]['nota3'], $data_cred[$j]['actf'], $data_cred[$j]['notaf_cc'], $data_cred[$j]['pendi'], $data_cred[$j]['nomicognoms'], $data_cred[$j]['hores_cc'], $data_cred[$j]['hores_cr']);\r\n\t\t\t}\r\n\t\t}\r\n\t\tprintf('</table></div>', NULL);\r\n \t}\r\n################################# \t\r\n//\t\tTABS HISTORIAL\r\n#################################\r\n \tfor( $z = 0; $z < $espec; $z++){\r\n \t\t$idespec = $wpdb->get_row( $wpdb->prepare('SELECT DISTINCT idespecialitat FROM ricca3_alumespec_view WHERE idalumne=%s AND idestat_es=1 ', $_GET['ID']), ARRAY_A, $z);\r\n \t\t$row_espec = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne=%s AND idespecialitat=%s', $_GET['ID'], $idespec['idespecialitat']), ARRAY_A, 0);\r\n \t\t$nom = str_word_count($row_espec['nomespecialitat'], 1, 'ÀÈÒÓ');\r\n \t\tprintf('<div id=\"hist%s\">', $z);\r\n//\r\n//\tbuto imprimir historial\r\n \t\tprintf('<form method=\"post\" action=\"\" target=\"_self\" name=\"espec\" id=\"imphist\"><table><tr>', NULL);\r\n \t\tprintf('<td><a href=\"%s/ricca3-imphistorial/?ID=%s&espec=%s\" target=\"POPUPW\" onsubmit=\"POPUPW = window.open(\"about:blank\",\"POPUPW\",\"width=800,height=650\" ><button type=\"button\" title=\"%s\">%s</button></a></td>',\r\n \t\t\tsite_url(), $_GET['ID'], $idespec['idespecialitat'], __('ajuda-historial-imprimir', 'ricca3-alum'), __('Imprimir Historial', 'ricca3-alum') );\r\n \t\tprintf('</tr></table></form>', NULL);\r\n//\tinitzialitzem els arrays \t\t\r\n \t\t$cursespec = array();\r\n \t\t$ciclecodi = array();\r\n \t\t$ciclecentre = array();\r\n \t\t$nom_modul = array();\r\n \t\t$hores_modul = array();\r\n \t\t$qual_modul = array();\r\n\t\t$conv_modul = array();\r\n// \t\t\r\n \t\tif(isset($_POST['accio']) && $_POST['accio'] == \"actualitzar\"){\r\n \t\t\t$encoded_codi = json_encode($_POST['cicle_codi'][$z], JSON_FORCE_OBJECT);\r\n \t\t\t$encoded_nom = json_encode($_POST['cicle_nom'][$z], JSON_FORCE_OBJECT);\r\n \t\t\t$encoded_anyd = json_encode($_POST['cicle_any_de'][$z],JSON_FORCE_OBJECT);\r\n \t\t\t$encoded_anya = json_encode($_POST['cicle_any_a'][$z], JSON_FORCE_OBJECT);\r\n// \t\t\t$encoded_curs = json_encode(stripslashes($_POST['cicle_curs'][$z]), JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE);\r\n \t\t\t$encoded_curs = json_encode($_POST['cicle_curs'][$z], JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE);\r\n//\t\tradio buttons\r\n \t\t\t$titol=\"\";\r\n \t\t\t$prova=\"\";\r\n \t\t\tif(!isset($_POST['hist']['condic'][$z])) $_POST['hist']['condic'][$z] = \"sense\";\r\n \t\t\tif(!isset($_POST['hist']['prova'][$z])) $_POST['hist']['prova'][$z] = \"\";\r\n \t\t\tif(!isset($_POST['hist']['titol'][$z])) $_POST['hist']['titol'][$z] = \"\";\r\n \t\t\tif($_POST['hist']['condic'][$z] == 'prova') $prova = $_POST['hist']['prova'][$z];\r\n \t\t\tif($_POST['hist']['condic'][$z] == 'titol') $titol = $_POST['hist']['titol'][$z];\r\n//\r\n// \t\t\t$wpdb->update('ricca3_historial' ,\r\n \t\t\tricca3_dbupdate('ricca3_historial' ,\r\n \t\t\t\t\tarray( 'codi_c' => $_POST['hist']['codi_c'][$z],\r\n \t\t\t\t\t\t\t'grau_c' => $_POST['hist']['grau_c'][$z],\r\n \t\t\t\t\t\t\t'nom_c' => $_POST['hist']['nom_c'][$z],\r\n \t\t\t\t\t\t\t'titol' => $titol,\r\n \t\t\t\t\t\t\t'prova' => $prova,\r\n \t\t\t\t\t\t\t'condic' => $_POST['hist']['condic'][$z],\r\n \t\t\t\t\t\t\t'cicle_codi' => $encoded_codi,\r\n \t\t\t\t\t\t\t'cicle_nom' => $encoded_nom,\r\n \t\t\t\t\t\t\t'cicle_any_de' => $encoded_anyd,\r\n \t\t\t\t\t\t\t'cicle_any_a' => $encoded_anya,\r\n \t\t\t\t\t\t\t'cicle_curs' => $encoded_curs,\r\n \t\t\t\t\t\t\t'obs' => stripslashes($_POST['obs'][$z]),\r\n \t\t\t\t\t\t\t'stampuser' => $current_user->user_login,\r\n \t\t\t\t\t\t\t'stampplace' => 'ricca_shortcode_historial'\r\n \t\t\t\t\t) ,\r\n \t\t\t\t\tarray( 'idalumne' => $_GET['ID'], 'idespecialitat' => $idespec['idespecialitat'] )\r\n \t\t\t);\r\n//\talumnes \r\n \t\t\t$data_naix=strftime(\"%Y-%m-%d\",strtotime(str_replace('/',\"-\",$_POST['alumne']['FechaNac'][$z])));\r\n// \t\t\t$wpdb->update('ricca3_alumne',\r\n \t\t\tricca3_dbupdate('ricca3_alumne',\r\n \t\t\t\t\tarray(\t'tipusdni' => $_POST['alumne']['tipoDNI'][$z],\r\n \t\t\t\t\t\t\t'datanai' => $data_naix,\r\n \t\t\t\t\t\t\t'llocnai' => stripslashes($_POST['alumne']['LocalidadNac'][$z]),\r\n \t\t\t\t\t\t\t'paisnai' => stripslashes($_POST['alumne']['PaisNac'][$z]),\r\n \t\t\t\t\t\t\t'nacionalitat' => stripslashes($_POST['alumne']['nacionalitat'][$z]),\r\n \t\t\t\t\t\t\t'stampuser' => $current_user->user_login,\r\n \t\t\t\t\t\t\t'stampplace' => 'ricca_shortcode_historial'\r\n \t\t\t\t\t),\r\n \t\t\t\t\tarray( 'idalumne' => $_GET['ID'])\r\n \t\t\t);\r\n \t\t}\r\n//\r\n// FI ACTUALITZAR\r\n//\r\n \t\t$query_hist = $wpdb->prepare( 'SELECT * FROM ricca3_historial WHERE idalumne=%s AND idespecialitat=%s' , $_GET['ID'], $idespec['idespecialitat'] );\r\n \t\t$res_hist = $wpdb->query( $query_hist );\r\n \t\t$row_h = $wpdb->get_row( $query_hist, ARRAY_A, 0);\r\n//\r\n//\tSI NO TE HISTORIAL\r\n//\r\n \t\tif( $res_hist == 0){\r\n \t\t\t$row = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumne WHERE idalumne = %s', $_GET['ID']),ARRAY_A,0);\r\n//\tcomprovar el DNI i mirar si es espanyol o no\r\n// \tcomprova que el camp 'tipusdni' estigui vuid,\r\n//\t\tSi el primer caracter del DNI es un numero i el ultim una lletra, el marca com DNI,\r\n//\t\tSi el primer caracter del DNI es una lletra i el ultim una lletra, el marca com a NIE,\r\n//\t\tsino com a pasaport\r\n \t\t\tif( strlen(trim($row['dni'])) == 9\r\n \t\t\t\t\t&& (ord(trim($row['dni'])) > 47 && ord(trim($row['dni'])) < 58 )\r\n \t\t\t\t\t&& (ord(strrev(trim($row['dni']))) > 64 )){\r\n \t\t\t\t$tipodni=\"DNI\";\r\n \t\t\t}elseif( strlen(trim($row['dni'])) == 9\r\n \t\t\t\t\t&& (ord(trim($row['dni'])) > 64)\r\n \t\t\t\t\t&& (ord(strrev(trim($row['dni']))) > 64 )){\r\n \t\t\t\t$tipodni=\"NIE\";\r\n \t\t\t}else{\r\n \t\t\t\t$tipodni=\"Passaport\";\r\n \t\t\t}\r\n//\tsi el tipus de DNI es DNI assigna 'nacionalitat' a espanyola i si ho deixa en blanc\r\n \t\t\t$nacio = $row['nacionalitat'];\r\n \t\t\tif($tipodni == \"DNI\" ) $nacio = \"Espanyola\";\r\n//\tcanviem el lloc de naixemant de 'España' a 'Espanya'\r\n \t\t\t$pais = $row['paisnai'];\r\n \t\t\tif( strtolower( $pais ) == \"españa\") $pais = \"Espanya\";\r\n// \tbusquem el nom del cicle formatiu\r\n \t\t\t$row_espec = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_especialitats WHERE idespecialitat = %s', $idespec['idespecialitat'] ),ARRAY_A,0);\r\n//\tCondicions d'acces\r\n \t\t\t$titol = \"\"; $prova = \"\";\r\n \t\t\tif( strtolower( $row['estudisrealitzats']) == 'batxillerat'){\r\n \t\t\t\t$titol = \"Batxillerat\"; $condic = 'titol';\r\n \t\t\t}else{\r\n \t\t\t\t$prova = $row['estudisrealitzats']; $condic = 'prova';\r\n \t\t\t}\r\n//\tmatriculacions\r\n \t\t\t$query = $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne = %s AND idespecialitat = %s ORDER BY idany ASC', $_GET['ID'], $idespec['idespecialitat'] );\r\n \t\t\t$result = $wpdb->query( $query );\r\n \t\t\tfor( $i = 0; $i < $result; $i++){\r\n \t\t\t\t$row_grup = $wpdb->get_row( $query, ARRAY_A, $i);\r\n \t\t\t\t$row_desde = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_any WHERE idany=%s', $row_grup['idany']), ARRAY_A, 0);\r\n \t\t\t\t$row_cur = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_grups WHERE idgrup=%s', $row_grup['idgrup']), ARRAY_A, 0);\r\n \t\t\t\t$row_curs = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_cursos WHERE idcurs=%s', $row_cur['idcurs']), ARRAY_A, 0); \r\n \t\t\t\tlist($anydesde[],$anyfins[]) = explode('-',$row_desde['any']);\r\n \t\t\t\t$cursespec[$i] = sprintf('%s %s', mb_strtoupper($row_grup['nomespecialitat'], \"utf-8\"), $row_curs['curs']);\r\n \t\t\t\t$ciclecodi[$i] ='08035672';\r\n \t\t\t\t$ciclecentre[$i] = 'Escola Ramon i Cajal';\r\n \t\t\t}\r\n \t\t\t$encoded_anyd = json_encode($anydesde, JSON_FORCE_OBJECT);\r\n \t\t\t$encoded_anya = json_encode($anyfins, JSON_FORCE_OBJECT);\r\n \t\t\t$encoded_cursespec= json_encode($cursespec, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE );\r\n \t\t\t$encoded_ciclecodi= json_encode($ciclecodi, JSON_FORCE_OBJECT);\r\n \t\t\t$encoded_ciclecentre= json_encode($ciclecentre, JSON_FORCE_OBJECT);\r\n\r\n \t\t\t$modul='{\"0\":\"\"}';\r\n \t\t\t$wpdb->insert('ricca3_historial',\r\n \t\t\t\t\tarray( 'idalumne' => $_GET['ID'],\r\n \t\t\t\t\t\t\t'idespecialitat' => $idespec['idespecialitat'],\r\n \t\t\t\t\t\t\t'nom_c' => $row_espec['nomespecialitat'],\r\n \t\t\t\t\t\t\t'codi_c' => $row_espec['codiespecialitat'],\r\n \t\t\t\t\t\t\t'cicle_codi' => $encoded_ciclecodi,\r\n \t\t\t\t\t\t\t'cicle_nom' => $encoded_ciclecentre,\r\n \t\t\t\t\t\t\t'cicle_any_de' => $encoded_anyd,\r\n \t\t\t\t\t\t\t'cicle_any_a' => $encoded_anya,\r\n \t\t\t\t\t\t\t'cicle_curs' => $encoded_cursespec,\r\n \t\t\t\t\t\t\t'condic' => $condic,\r\n \t\t\t\t\t\t\t'titol' => $titol,\r\n \t\t\t\t\t\t\t'prova' => $prova,\r\n \t\t\t\t\t\t\t'obs' => '',\r\n \t\t\t\t\t\t\t'stampuser' => $current_user->user_login,\r\n \t\t\t\t\t\t\t'stampplace' => 'ricca_shortcode_historial_insert'\r\n \t\t\r\n \t\t\t\t\t)\r\n \t\t\t);\r\n// \t\t\t$wpdb->update( 'ricca3_alumne',\r\n \t\t\tricca3_dbupdate( 'ricca3_alumne',\r\n \t\t\t\t\tarray( 'idhistorial' => 'si',\r\n \t\t\t\t\t\t\t'tipusdni' => $tipodni,\r\n \t\t\t\t\t\t\t'paisnai' => $pais,\r\n \t\t\t\t\t\t\t'nacionalitat' => $nacio,\r\n \t\t\t\t\t\t\t'stampuser' => $current_user->user_login,\r\n \t\t\t\t\t\t\t'stampplace' => 'ricca_shortcode_historial'\r\n \t\t\t\t\t),\r\n \t\t\t\t\tarray( 'idalumne' => $_GET['ID'] )\r\n \t\t\t);\r\n//\r\n// \tFI DE 'SI NO TE HISTORIAL'\r\n//\r\n \t\t}\r\n \t\t$row_h = $wpdb->get_row( $query_hist, ARRAY_A, 0);\r\n//\r\n//\tRECALCULEM LES DADES\r\n//\r\n//\tcerquem tots el crèdits de l'alumne\r\n\r\n \t\t$dades_cred = $wpdb->get_results( $wpdb->prepare('SELECT DISTINCT ricca3_credits.idcredit ,ricca3_credits.ordre_cr '.\r\n\t\t\t\t'FROM ricca3_credits_avaluacions '.\r\n\t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp = ricca3_credits_avaluacions.idccomp '.\r\n\t\t\t\t'INNER JOIN ricca3_credits ON ricca3_credits.idcredit = ricca3_ccomp.idcredit '.\r\n\t\t\t\t'WHERE idalumne=%s AND ricca3_credits.idespecialitat=%s '.\r\n\t\t\t\t'ORDER BY ricca3_credits.ordre_cr', $_GET['ID'], $idespec['idespecialitat'] ), ARRAY_A);\r\n//\tmirem si l'alumne te resultats del crèdit\r\n\t\tfor( $j = 0; $j < count($dades_cred); $j++ ){\r\n\t\t\t$dades_ccomp = $wpdb->get_results( $wpdb->prepare('SELECT * FROM ricca3_credits_avaluacions '.\r\n \t\t\t\t'INNER JOIN ricca3_ccomp ON ricca3_ccomp.idccomp=ricca3_credits_avaluacions.idccomp '.\r\n \t\t\t\t'INNER JOIN ricca3_credits ON ricca3_credits.idcredit = ricca3_ccomp.idcredit '.\r\n \t\t\t\t'INNER JOIN ricca3_especialitats ON ricca3_especialitats.idespecialitat = ricca3_credits.idespecialitat '.\r\n \t\t\t\t'INNER JOIN ricca3_grups ON ricca3_grups.idgrup = ricca3_ccomp.idgrup '.\r\n \t\t\t\t'INNER JOIN ricca3_any ON ricca3_any.idany = ricca3_credits_avaluacions.idany '.\r\n \t\t\t\t'INNER JOIN ricca3_professors ON ricca3_professors.idprof = ricca3_ccomp.idprofessor '.\r\n \t\t\t\t'WHERE idalumne=%s AND ricca3_credits.idespecialitat=%s AND ricca3_credits.idcredit=%s '.\r\n \t\t\t\t'ORDER BY ordre_cr, ricca3_credits_avaluacions.idccomp, ricca3_credits_avaluacions.idany DESC', \r\n\t\t\t\t\t$_GET['ID'], $idespec['idespecialitat'], $dades_cred[$j]['idcredit']), ARRAY_A);\r\n\t\t\t$nom_modul[$j] = $dades_ccomp[0]['nomcredit'];\r\n\t\t\t$hores_modul[$j] = $dades_ccomp[0]['hores_cr'];\r\n\t\t\t$qual_modul[$j] = $dades_ccomp[0]['notaf_cr'];\r\n\t\t\t$conv_modul[$j] = $dades_ccomp[0]['convord'];\t\t\r\n\t\t}\r\n// nota final\r\n\t \t$notafinal = \"\";\r\n\t\t$query = $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idalumne = %s AND idespecialitat = %s ORDER BY idany DESC',\r\n\t\t\t\t$_GET['ID'],$idespec['idespecialitat']);\r\n\t\t$result = $wpdb->query( $query );\r\n\t\tif($result > 0){\r\n\t\t\t$row = $wpdb->get_row( $query, ARRAY_A, 0);\r\n\t\t\tif($row['notaf_es'] != 0){\r\n\t\t\t\t$notafinal = $row['notaf_es'];\r\n\t\t\t}else{\r\n\t\t\t\t$notafinal='';\r\n\t\t\t}\r\n// si hem introduit la nota final a mà, fer-la servir.\t\t\t\r\n\t\t\tif($row['notaf_es_manual'] != 0) $notafinal = $row['notaf_es_manual'];\r\n\t\t}\r\n//\r\n//\tFI RECALCULEM LES DADES\r\n// \t\t\r\n \t\t$row = $wpdb->get_row( $wpdb->prepare('SELECT * FROM ricca3_alumne WHERE idalumne=%s', $_GET['ID']), ARRAY_A, 0);\r\n \t\tprintf('<form method=\"post\" action=\"\" target=\"_self\" name=\"hist\" id=\"hist\"><table><tr><td><b>%s</b></td></tr></table>',\r\n \t\t\t__('DADES DEL ALUMNE','ricca3-alum'));\r\n \t\tprintf('<table><tr><td><b>%s</b></td><td>%s</td>', \r\n \t\t\t__('Cognoms i nom','ricca3-alum'), $row['cognomsinom']);\r\n \t\tprintf('<td><b>%s</b></td><td>%s</td></tr></table>', \r\n \t\t\t__('Núm. d\\'identificació','ricca3-alum'), $_GET['ID']);\r\n \t\tprintf('<table><tr><td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"alumne[tipoDNI][%s]\" size=\"10\" maxlength=\"15\" value=\"%s\" ></td>',\r\n \t\t\t __('ajuda-historial-tipusdni','ricca3-alum'), __('Document d\\'indentificació','ricca3-alum'), $z, $row['tipusdni'] );\r\n \t\tprintf('<td><b>%s</b></td><td>%s</td></tr></table>',\r\n \t\t\t__('Número','ricca3-alum'), $row['dni']);\r\n \t\tprintf('<table><tr><td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"alumne[FechaNac][%s]\" size=\"15\" maxlength=\"15\" value=\"%s\"></td>',\r\n \t\t\t__('ajuda-historial-datanai','ricca3-alum'), __('Data de neixament','ricca3-alum'), $z, date('d/m/Y',strtotime($row['datanai'])) );\r\n \t\tprintf('<td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"alumne[LocalidadNac][%s]\" size=\"25\" maxlength=\"35\" value=\"%s\" \\></td></tr></table>',\r\n \t\t\t__('ajuda-historial-llocnai','ricca3-alum'), __('Lloc de neixament','ricca3-alum'), $z, $row['llocnai'] );\r\n \t\tprintf('<table><tr><td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"alumne[PaisNac][%s]\" size=\"15\" maxlength=\"25\" value=\"%s\" \\></td>',\r\n \t\t\t__('ajuda-historial-paisnai','ricca3-alum'), __('País','ricca3-alum'), $z, $row['paisnai'] );\r\n \t\tprintf('<td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"alumne[nacionalitat][%s]\" size=\"15\" maxlength=\"25\" value=\"%s\" ></td></tr></table>',\r\n \t\t\t__('ajuda-historial-nacionalitat','ricca3-alum'), __('Nacionalitat','ricca3-alum'), $z, $row['nacionalitat'] );\r\n \t\tprintf('<hr /><table><tr><td><b>%s</b></td></tr></table>',\r\n \t\t\t__('DADES ACADÈMIQUES','ricca3-alum'));\r\n \t\tprintf('<table><tr><td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"hist[codi_c][%s]\" size=\"6\" maxlength=\"15\" value=\"%s\" /></td>',\r\n \t\t\t__('ajuda-historial-codidades','ricca3-alum'), __('Codi','ricca3-alum'), $z, $row_h['codi_c'] );\r\n \t\tprintf('<td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"hist[nom_c][%s]\" size=\"35\" maxlength=\"65\" value=\"%s\" /></td>',\r\n \t\t\t__('ajuda-historial-nomcicle','ricca3-alum'), __('Nom del cicle formatiu','ricca3-alum'), $z, $row_h['nom_c'] );\r\n \t\tprintf('<td title=\"%s\"><b>%s</b></td><td><INPUT type=\"text\" name=\"hist[grau_c][%s]\" size=\"10\" maxlength=\"15\" value=\"%s\" /></td></tr></table>',\r\n \t\t\t__('ajuda-historial-graucicle','ricca3-alum'), __('Grau','ricca3-alum'), $z, $row_h['grau_c'] );\r\n \t\tprintf('<hr />', NULL);\r\n \t\tricca3_desar_color('accio', 'actualitzar', __('ajuda-historial-desar', 'ricca3-alum'));\r\n \t\tprintf('<hr /><table><tr><td><b>%s</b></td></tr></table>',\r\n \t\t\t__('CONDICIONS D\\'ACCÉS','ricca3-alum'));\r\n \t\tprintf('<table><tr><td title=\"%s\"> <INPUT type=\"radio\" name=\"hist[condic][%s]\" value=\"titol\" ', \r\n \t\t\t__('ajuda-historial-radiotitol', 'ricca3-alum'), $z);\r\n \t\tif($row_h['condic'] == 'titol')printf('checked', NULL);\r\n \t\tprintf(' /><b>%s</b></td>',__('Títol de:','ricca3-alum'));\r\n \t\tprintf('<td title=\"%s\"><INPUT type=\"text\" name=\"hist[titol][%s]\" size=\"20\" maxlength=\"35\" value=\"%s\" \\></td>', \r\n \t\t\t__('ajuda-historial-titolde', 'ricca3-alum'), $z, $row_h['titol'] );\r\n\t\tprintf('<td title=\"%s\"><INPUT type=\"radio\" name=\"hist[condic][%s]\" value=\"prova\" ', \r\n\t\t\t__('ajuda-historial-radioprova', 'ricca3-alum'), $z);\r\n \t\tif($row_h['condic'] == 'prova')printf('checked', NULL);\r\n \t\tprintf(' /><b>%s</b></td>',__('Prova d\\'accés a:','ricca3-alum'));\r\n\t\tprintf('<td title=\"%s\"><INPUT type=\"text\" name=\"hist[prova][%s]\" size=\"20\" maxlength=\"35\" value=\"%s\" \\></td>',\r\n \t\t\t__('ajuda-historial-provaa', 'ricca3-alum'), $z, $row_h['prova'] );\r\n \t\tprintf('<td title=\"%s\"><INPUT type=\"radio\" name=\"hist[condic][%s]\" value=\"sense\" ', \r\n \t\t\t__('ajuda-historial-radiosense', 'ricca3-alum'), $z );\r\n \t\tif($row_h['condic'] == 'sense') printf('checked', NULL);\r\n \t\tprintf(' /><b>%s</b></td></tr></table>',\r\n \t\t\t__('Sense requisits, amb autorització:','ricca3-alum'));\r\n \t\tprintf('<hr /><table><tr><td><b>%s</b></td></tr></table>',\r\n \t\t\t__('MATRICULACIONS EN EL CICLE FORMATIU','ricca3-alum'));\r\n \t\tprintf('<table><tr><td title=\"%s\"><b>%s</b></td>',\r\n \t\t\t__('ajuda-hist-codidelcentre','ricca3-alum'), __('Codi de centre','ricca3-alum'));\r\n \t\tprintf('<td title=\"%s\"><b>%s</b></td>',\r\n \t\t\t__('ajuda-hist-cnomdelcentre','ricca3-alum'), __('Nom del centre','ricca3-alum'));\r\n \t\tprintf('<td title=\"%s\"><b>%s</b></td></tr>',\r\n \t\t\t__('ajuda-hist-anycicle','ricca3-alum'), __('Anys acadèmics','ricca3-alum'));\r\n \t\t$decoded_codi = json_decode($row_h['cicle_codi'], true);\r\n \t\t$decoded_nom = json_decode($row_h['cicle_nom'], true);\r\n \t\t$decoded_anyd = json_decode($row_h['cicle_any_de'], true);\r\n \t\t$decoded_anya = json_decode($row_h['cicle_any_a'], true);\r\n \t\t$decoded_curs = json_decode($row_h['cicle_curs'], true);\r\n \t\tfor( $i = 0; $i < 5; $i++){\r\n \t\t\tif(count($decoded_codi) > $i){\r\n\t\t\t\tprintf('<tr> <td><INPUT type=\"text\" name=\"cicle_codi[%s][]\" size=\"8\" maxlength=\"15\" value=\"%s\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, $decoded_codi[$i], __('ajuda-historial-codicentre', 'ricca3-alum'));\r\n\t\t\t\tprintf(' <td><INPUT type=\"text\" name=\"cicle_nom[%s][]\" size=\"20\" maxlength=\"45\" value=\"%s\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, $decoded_nom[$i], __('ajuda-historial-nomcentre', 'ricca3-alum'));\r\n\t\t\t\tprintf('<td><table><tr><td>de</td><td><INPUT type=\"text\" name=\"cicle_any_de[%s][]\" size=\"8\" maxlength=\"15\" value=\"%s\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, $decoded_anyd[$i], __('ajuda-historial-anydesde', 'ricca3-alum'));\r\n\t\t\t\tprintf(' <td>a</td><td><INPUT type=\"text\" name=\"cicle_any_a[%s][]\" size=\"8\" maxlength=\"15\" value=\"%s\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, $decoded_anya[$i], __('ajuda-historial-anyfins', 'ricca3-alum'));\r\n\t\t\t\tprintf(' <td><INPUT type=\"text\" name=\"cicle_curs[%s][]\" size=\"45\" maxlength=\"75\" value=\"%s\" title=\"%s\" ></td></tr></table>',\r\n\t\t\t\t\t$z, $decoded_curs[$i], __('ajuda-historial-nomcurs', 'ricca3-alum'));\r\n\t\t\t}else{\r\n\t\t\t\tprintf('<tr> <td><INPUT type=\"text\" name=\"cicle_codi[%s][]\" size=\"8\" maxlength=\"15\" value=\"\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, __('ajuda-historial-codicentre', 'ricca3-alum'));\r\n\t\t\t\tprintf(' <td><INPUT type=\"text\" name=\"cicle_nom[%s][]\" size=\"20\" maxlength=\"45\" value=\"\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, __('ajuda-historial-nomcentre', 'ricca3-alum'));\r\n\t\t\t\tprintf('<td><table><tr><td>de</td><td><INPUT type=\"text\" name=\"cicle_any_de[%s][]\" size=\"8\" maxlength=\"15\" value=\"\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, __('ajuda-historial-anydesde', 'ricca3-alum'));\r\n\t\t\t\tprintf(' <td>a</td><td><INPUT type=\"text\" name=\"cicle_any_a[%s][]\" size=\"8\" maxlength=\"15\" value=\"\" title=\"%s\" ></td>',\r\n\t\t\t\t\t$z, __('ajuda-historial-anyfins', 'ricca3-alum'));\r\n\t\t\t\tprintf(' <td><INPUT type=\"text\" name=\"cicle_curs[%s][]\" size=\"45\" maxlength=\"75\" value=\"\" title=\"%s\" ></td></tr></table>',\r\n\t\t\t\t\t$z, __('ajuda-historial-nomcurs', 'ricca3-alum'));\r\n\t\t\t}\r\n \t\t}\r\n \t\tprintf('</table>', NULL);\r\n \t\tprintf('<hr />', NULL);\r\n \t\tricca3_desar_color('accio', 'actualitzar', __('ajuda-historial-desar', 'ricca3-alum'));\r\n \t\tprintf('<hr /><table><tr><td><b>%s</b></td></tr></table>', __('QUALIFICACIONS','ricca3-alum'));\r\n \t\tprintf('<table><tr><th title=\"%s\">%s</th><th title=\"%s\">%s</th><th title=\"%s\">%s</th><th title=\"%s\">%s</th></tr>',\r\n \t\t\t__('ajuda-hist-nomcredit','ricca3-alum'), __('Crèdit','ricca3-alum'), \r\n \t\t\t__('ajuda-hist-horescredit','ricca3-alum'), __('Hores','ricca3-alum'), \r\n \t\t\t__('ajuda-hist-qualcredit','ricca3-alum'), __('Qualif.','ricca3-alum'),\r\n \t\t\t__('ajuda-hist-convcredit','ricca3-alum'), __('Conv.','ricca3-alum'));\r\n \t\tfor( $y = 0; $y < 20; $y++){\r\n\t\t\tif(isset($nom_modul[$y]) && strlen( $nom_modul[$y]) > 5){\r\n\t\t\t\tprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>',\r\n\t\t\t\t$nom_modul[$y], $hores_modul[$y], $qual_modul[$y], $conv_modul[$y]); \t\t\t\t\t\r\n\t\t\t}\r\n \t\t}\r\n \t\tprintf('</table><hr /><table><tr><td><b>%s</b></td><td>%s</td></tr></table>', \r\n \t\t\t__('Qualificació final del cicle formatiu','ricca3-alum'), $notafinal);\r\n \t\tprintf('');\r\n \t\tprintf('<hr /><table><tr><td><b>%s</b></td></tr></table>', __('OBSERVACIONS','ricca3-alum')); \r\n \t\tprintf('<table><tr><td title=\"%s\"><INPUT type=\"text\" name=\"obs[%s]\" size=\"180\" maxlength=\"225\" value=\"%s\" ></td></tr></table>', \r\n \t\t\t__('ajuda-historial-observacions', 'ricca3-alum'), $z, $row_h['obs'] );\r\n \t\tprintf('<table class=\"opcions\"><tr><td class=\"opcions\"><input type=\"hidden\" name=\"ID\" value=\"%s\"><input type=\"hidden\" name=\"espec[%s]\" value=\"%s\"></tr></td></table>', \r\n \t\t\t$_GET['ID'], $z, $idespec['idespecialitat'] );\r\n \t\tricca3_desar_color('accio', 'actualitzar', __('ajuda-historial-desar', 'ricca3-alum'));\r\n//\r\n\t\tprintf('</form>', NULL);\r\n \t\tprintf('</div>', NULL);\r\n \t}\r\n\tprintf('</div>', NULL);\r\n#############################################\r\n// \tnavegació endevant i enrere\r\n#############################################\r\n\tif(isset($_GET['grup']) && $_GET['grup'] != '-1'){\r\n\t\t$query= $wpdb->prepare('SELECT * FROM ricca3_alumespec_view WHERE idgrup=%s AND idany=%s AND idestat_es=1 ', \r\n\t\t\t\t$_GET['grup'], $_GET['any']);\r\n\t\t$dades = $wpdb->get_results( $query, ARRAY_A );\r\n\t\tfor( $i=0; $i < count($dades); $i++){\r\n\t\t\tif( $dades[$i]['idalumne'] == $_GET['ID']){\r\n\t\t\t\t$ara = $i;\r\n\t\t\t\t$despr = $i + 1;\r\n\t\t\t\t$abans = $i - 1;\r\n\t\t\t\tif( $despr > count($dades) - 1) $despr = 0;\r\n\t\t\t\tif( $abans == -1) $abans = count($dades) - 1 ;\r\n\t\t\t\t$row_abans = $wpdb->get_row( $query, ARRAY_A, $abans);\r\n\t\t\t\t$row_despr = $wpdb->get_row( $query, ARRAY_A, $despr);\r\n\t\t\t\tprintf('<table width=\"100%%\"><tr><td align=\"left\"> <a href=\"%s/%s?ID=%s&espec=%s&grup=%s&any=%s&estat=%s&repe=%s\"><img src=\"%s/ricca3/imatges/ricca3-anterior.png\" border=0 title=\"%s\" /></a></td>',\r\n\t\t\t\t\tsite_url(), 'ricca3-especalum', $row_abans['idalumne'],$_GET['espec'], $_GET['grup'], $_GET['any'], $_GET['estat'], $_GET['repe'], WP_PLUGIN_URL, __('ajuda-especalum-anterior', 'ricca3-alum'));\r\n\t\t\t\tprintf(' <td align=\"right\"><a href=\"%s/%s?ID=%s&espec=%s&grup=%s&any=%s&estat=%s&repe=%s\"><img src=\"%s/ricca3/imatges/ricca3-seguent.png\" border=0 title=\"%s\" /></a></td></tr></table>',\r\n\t\t\t\t\tsite_url(), 'ricca3-especalum', $row_despr['idalumne'],$_GET['espec'], $_GET['grup'], $_GET['any'], $_GET['estat'], $_GET['repe'], WP_PLUGIN_URL, __('ajuda-especalum-seguent', 'ricca3-alum'));\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "a2dca045209f1b9809b419888e4c6c09", "score": "0.42386362", "text": "public function enviarGuiaEnvio($pedido)\n {\n\t\t$usuario = $pedido->getUsuario();\n\t\t$title = 'Pedido despachado!';\n\t\t\n\t\tif ( $pedido->getIdEshop() ) {\n\t\t $eshop = $pedido->getEshop();\n\t\t $from = $eshop->getEmailNoReply();\n\t\t $tipoMail = 'ESHOP';\n\t\t} else {\n\t\t $eshop = false;\n\t\t $from = sfConfig::get('app_email_from_noreply');\n\t\t $tipoMail = 'DELUXE';\n\t\t}\n\t\t\n\n if ( $pedido->getEnvioTipo() == carritoEnvio::DOMICILIO )\n\t\t{\n\t\t\t$vars = array( 'eshop' => $eshop, 'title' => $title, 'pedido' => $pedido, 'usuario' => $usuario );\n\t\t\t$mailer = new Mailer('envioDomicilio' . $tipoMail, $vars);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$vars = array( 'eshop' => $eshop, 'title' => $title, 'pedido' => $pedido, 'usuario' => $usuario );\n\t\t\t$mailer = new Mailer('envioSucursal' . $tipoMail, $vars);\n\t\t}\n\t\t\n\t\t$subject = 'Pedido despachado';\n\t\t$mailer->send( $subject, $usuario->getEmail(), $from );\n }", "title": "" }, { "docid": "5f68f3736c877fd4eed7b6237b431b3e", "score": "0.42373484", "text": "function drawBody()\r\n {\r\n\tob_start();\r\n\t\techo $this->get_value();\r\n\t\t$output .=ob_get_contents(); \r\n\tob_end_clean(); \r\n\r\n $this->ob_collection->goFirst();\r\n while($this->ob_collection->isLastElement() == false )\r\n {\r\n $ob = $this->ob_collection->get_CpyElement(); \r\n //$kiave = $ob->get_Key();\r\n\t\t$ob = $ob->get_Object();\r\n \r\n ob_start();\r\n $ob->draw();\r\n $output .=ob_get_contents(); \r\n ob_end_clean(); \r\n \r\n $this->ob_collection->goNext();\r\n }\r\n\techo $output; \r\n }", "title": "" } ]
cd0f0658786b146fd3b9a6211baa43aa
Parse the blocks in a form post object to get a standardised array of the form config
[ { "docid": "5aa438a8aea6e0f6cdabac03d242eaab", "score": "0.86295503", "text": "public function parse_config() {\n\t\t$form = get_post( $this->form_id );\n\n\t\tif ( ! $form || Form::$slug !== $form->post_type ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$blocks = parse_blocks( $form->post_content );\n\n\t\treturn static::parse_blocks_for_fields( $blocks );\n\n\t}", "title": "" } ]
[ { "docid": "8c38498907c729de26fc5742cbdc3b46", "score": "0.68614143", "text": "public function getFields() {\n $blocks = parse_blocks( $this->post->post_content );\n $fields = array_filter(\n $blocks,\n function( $block ) {\n if ( false === strpos( $block['blockName'], 'shokka-forms' ) ) {\n return false;\n }\n\n if ( 'shokka-forms/button' === $block['blockName'] ) {\n return false;\n }\n return true;\n }\n );\n\n return $fields;\n }", "title": "" }, { "docid": "7f4d4a945839c7cd98becd616b605c32", "score": "0.6434447", "text": "private function getFullPostSettingsForm(): array\n {\n return $this->getFullSettingsFrom(\n $this->getPostTypes(),\n [ObjectHandler::ATTACHMENT_OBJECT_TYPE],\n function ($type = MainConfig::DEFAULT_TYPE) {\n return $this->getPostSettingsForm($type);\n }\n );\n }", "title": "" }, { "docid": "b28b1ccd9f7e94ea98ddd55ca2d4c177", "score": "0.6326849", "text": "public function getValuesHtmlBlock()\n\t{\n\t\t$values = array();\n\t\t\n\t\tswitch ($this->getFormEditMode())\n\t\t{\n\t\t\tcase IL_FORM_CREATE:\n\t\t\t\t$values[\"Title\"] = \"\";\n\t\t\t\t$values[\"Content\"] = \"\";\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase IL_FORM_EDIT:\n\t\t\t\t$values[\"Title\"] = $this->html_block->getTitle();\n\t\t\t\t$values[\"Content\"] = $this->html_block->getContent();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase IL_FORM_RE_EDIT:\n\t\t\tcase IL_FORM_RE_CREATE:\n\t\t\t\t$values[\"Title\"] = ilUtil::stripSlashes($_POST[\"block_title\"]);\n\t\t\t\t$values[\"Content\"] = ilUtil::stripSlashes($_POST[\"block_content\"]\n\t\t\t\t,true, ilObjAdvancedEditing::_getUsedHTMLTagsAsString());\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $values;\n\n\t}", "title": "" }, { "docid": "f18cf4eed77dc312d015a7204e1f87be", "score": "0.6217859", "text": "protected function getConfigFormValues()\n {\n $fields = array();\n $configMap = $this->getConfigMap();\n foreach (array_keys($configMap) as $key) {\n $fields[$key] = Tools::getValue($key, Configuration::get($key));\n }\n $fields['HEPSIPAY_ENDPOINT'] = 'https://pluginmanager.hepsipay.com/portal/web/api/v1';\n $fields['HEPSIPAY_FORCE_3D_DEBIT_CHECK'] = true;\n\t\treturn $fields;\n }", "title": "" }, { "docid": "a4be6bdb7662ef93de4719fd1fd11212", "score": "0.61981064", "text": "function options_form_submit($values) {\n $blocks = array();\n $block_info = $this->get_blocks();\n\n // Retrieve blocks from submitted JSON string.\n if (!empty($values['state'])) {\n $edited = $this->json_decode($values['state']);\n }\n else {\n $edited = array();\n }\n\n foreach ($edited as $region => $block_data) {\n foreach ($block_data as $position => $data) {\n if (isset($block_info[$data->bid])) {\n $blocks[$data->bid] = array(\n 'module' => $block_info[$data->bid]->module,\n 'delta' => $block_info[$data->bid]->delta,\n 'region' => $region,\n 'weight' => $data->weight,\n );\n }\n }\n }\n return array('blocks' => $blocks);\n }", "title": "" }, { "docid": "9df8568b7468edbd85ec9e457ac24c7e", "score": "0.61356014", "text": "protected function getConfigFormValues()\n {\n return array_merge(\n [\n 'URBIT_INVENTORYFEED_CACHE_DURATION' => Configuration::get('URBIT_INVENTORYFEED_CACHE_DURATION', null),\n 'URBIT_INVENTORYFEED_FILTER_CATEGORIES' => explode(',', Configuration::get('URBIT_INVENTORYFEED_FILTER_CATEGORIES', null)),\n 'URBIT_INVENTORYFEED_TAGS_IDS' => explode(',', Configuration::get('URBIT_INVENTORYFEED_TAGS_IDS', null)),\n 'URBIT_INVENTORYFEED_TAX_COUNTRY' => Configuration::get('URBIT_INVENTORYFEED_TAX_COUNTRY', null),\n ],\n $this->fields['factory']->getInputsConfig(),\n $this->fields['factory']->getPriceInputsConfig(),\n $this->fields['factory']->getInventoryInputsConfig(),\n $this->fields['factory']->getInventoryListInputsConfig()\n );\n }", "title": "" }, { "docid": "2cccadc3f50a0327da98b214adf11c1a", "score": "0.6133177", "text": "private function normalizeConfiguration( $post_id )\r\n {\r\n $collection = array();\r\n $layout = get_post_meta( $post_id, 'kb_kontentblocks', true );\r\n\r\n if (!empty( $layout )) {\r\n foreach ($layout as $bucket) {\r\n $unique = uniqid();\r\n $bucket['state']['draft'] = 'true';\r\n $bucket['mid'] = null;\r\n $collection[$unique] = $bucket;\r\n\r\n };\r\n }\r\n\r\n return $collection;\r\n\r\n }", "title": "" }, { "docid": "27dff757a681c69097f22060133e4e3e", "score": "0.607611", "text": "protected function getConfigFormValues()\n {\n return array();\n }", "title": "" }, { "docid": "e0a6cf44f24c2739836fbcf9943c2ea3", "score": "0.60737795", "text": "protected function getConfigFormValues()\n {\n return array(\n 'EVERPSBOOKSTORE_CUSTOMERS_IDS[]' => json_decode(\n Configuration::get('EVERPSBOOKSTORE_CUSTOMERS_IDS')\n ),\n 'EVERPSBOOKSTORE_VALIDATED_STATE_ID' => Tools::getValue('EVERPSBOOKSTORE_VALIDATED_STATE_ID'),\n 'EVERPSBOOKSTORE_CANCELLED_STATE_IDS[]' => json_decode(\n Configuration::get('EVERPSBOOKSTORE_CANCELLED_STATE_IDS')\n ),\n 'EVERPSBOOKSTORE_SHIPPED_STATE_IDS[]' => json_decode(\n Configuration::get('EVERPSBOOKSTORE_SHIPPED_STATE_IDS')\n ),\n 'EVERPSBOOKSTORE_ID_CARRIER' => Configuration::get('EVERPSBOOKSTORE_ID_CARRIER'),\n 'EVERPSBOOKSTORE_DATE_FEATURE' => Configuration::get('EVERPSBOOKSTORE_DATE_FEATURE'),\n 'EVERPSBOOKSTORE_CONDITION_FEATURE' => Configuration::get('EVERPSBOOKSTORE_CONDITION_FEATURE'),\n 'EVERPSBOOKSTORE_EDITOR_FEATURE' => Configuration::get('EVERPSBOOKSTORE_EDITOR_FEATURE'),\n 'EVERPSBOOKSTORE_ALLOW_IMG' => Configuration::get('EVERPSBOOKSTORE_ALLOW_IMG'),\n );\n }", "title": "" }, { "docid": "c44749d8b88d59dfdcff5c012ba4956a", "score": "0.6035559", "text": "public static function parseFields( $block ) {\n\n\t\t\t$fields = self::getRegisteredFields($block);\n\t\t\t$fieldsArray = array();\n\n\t\t\tforeach ( $fields as $field ) { \n\t\t\t\t$fieldsArray[$field] = self::getField( $field );\n\t\t\t}\n\n\t\t\treturn $fieldsArray;\n\t\t}", "title": "" }, { "docid": "192c0d8723ef915e37e48a9d3382c0a9", "score": "0.60243404", "text": "public function getArray()\n\t{\n\t\t$formData = $this->form->get();\n\t\t$config = $this->config->toArray();\n\t\treturn [\n\t\t\t'data' => $config['data'],\n\n\t\t\t'id' => $this->form->getId(),\n\t\t\t'name' => $formData['NAME'],\n\n\t\t\t'templateId' => $formData['TEMPLATE_ID'],\n\t\t\t'presetFields' => $this->getPresetFields(),\n\t\t\t'payment' => [\n\t\t\t\t'use' => $formData['IS_PAY'] === 'Y',\n\t\t\t\t'payer' => '',\n\t\t\t\t'systems' => []\n\t\t\t],\n\t\t\t'captcha' => [\n\t\t\t\t'key' => ReCaptcha::getKey(2),\n\t\t\t\t'secret' => ReCaptcha::getSecret(2),\n\t\t\t\t'hasDefaults' => ReCaptcha::getDefaultKey(2) && ReCaptcha::getDefaultSecret(2)\n\t\t\t],\n\t\t\t'document' => [\n\t\t\t\t'scheme' => $formData['ENTITY_SCHEME'],\n\t\t\t\t'duplicateMode' => $formData['DUPLICATE_MODE'],\n\t\t\t\t'deal' => [\n\t\t\t\t\t'category' => $formData['FORM_SETTINGS']['DEAL_CATEGORY'],\n\t\t\t\t\t'duplicatesEnabled' => $formData['FORM_SETTINGS']['DEAL_DC_ENABLED'] === 'Y',\n\t\t\t\t],\n\t\t\t],\n\n\t\t\t'responsible' => [\n\t\t\t\t'users' => $formData['ASSIGNED_BY_ID'],\n\t\t\t\t'checkWorkTime' => $formData['ASSIGNED_WORK_TIME'],\n\t\t\t\t'supportWorkTime' => ResponsibleQueue::isSupportedWorkTime(),\n\t\t\t],\n\t\t\t'agreements' => [\n\t\t\t\t'use' => $formData['USE_LICENCE'] === 'Y',\n\t\t\t],\n\t\t\t'result' => [\n\t\t\t\t'success' => [\n\t\t\t\t\t'url' => $formData['RESULT_SUCCESS_URL'],\n\t\t\t\t\t'text' => $formData['RESULT_SUCCESS_TEXT'],\n\t\t\t\t],\n\t\t\t\t'failure' => [\n\t\t\t\t\t'url' => $formData['RESULT_FAILURE_URL'],\n\t\t\t\t\t'text' => $formData['RESULT_FAILURE_TEXT'],\n\t\t\t\t],\n\t\t\t\t'redirectDelay' => $formData['FORM_SETTINGS']['REDIRECT_DELAY']\n\t\t\t],\n\t\t\t'callback' => [\n\t\t\t\t'use' => $formData['IS_CALLBACK_FORM'] === 'Y',\n\t\t\t\t'from' => $formData['CALL_FROM'],\n\t\t\t\t'text' => $formData['CALL_TEXT'],\n\t\t\t],\n\t\t\t'analytics' => $this->getAnalytics(),\n\t\t\t'integration' => $this->getIntegration(),\n\t\t\t'embedding' => $this->getEmbedding(),\n\t\t];\n\t}", "title": "" }, { "docid": "9e5c6684d9f63c0eaaa77711153b9ee3", "score": "0.5971864", "text": "protected function getConfigFormValues()\n {\n return array(\n 'PACKETERY_LIVE_MODE' => Configuration::get('PACKETERY_LIVE_MODE', true),\n 'PACKETERY_ACCOUNT_EMAIL' => Configuration::get('PACKETERY_ACCOUNT_EMAIL', '[email protected]'),\n 'PACKETERY_ACCOUNT_PASSWORD' => Configuration::get('PACKETERY_ACCOUNT_PASSWORD', null),\n );\n }", "title": "" }, { "docid": "9a89ed9bbdb29d4f0d86ad62a8f0528b", "score": "0.59641206", "text": "private function getDataFromForm(): array\n {\n $guid = $this->request()->site() . \"/\" . slug($this->post('post_title'));\n\n return [\n 'user_id' => Auth::id(),\n 'post_date' => $this->post('post_date') !== '' ? $this->post('post_date') : null,\n 'post_title' => $this->post('post_title'),\n 'post_content' => $this->post('post_content'),\n 'post_status' => $this->post('post_status'),\n 'comment_status' => $this->post('comment_status'),\n 'post_password' => $this->post('post_password') !== '' ? password_hash($this->post('post_password'), PASSWORD_DEFAULT) : null,\n 'post_access' => $this->post('post_access'),\n 'post_name' => slug($this->post('post_title')),\n 'post_parent' => $this->post('post_parent') !== '' ? $this->post('post_parent') : null,\n 'guid' => $guid,\n 'deleted_at' => null,\n ];\n }", "title": "" }, { "docid": "cb7fd0b6aa07d18bf49f7434c168820c", "score": "0.593336", "text": "protected function getConfigForm()\n {\n return [\n 'form' => [\n 'legend' => [\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ],\n 'input' => [\n [\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'URBIT_INVENTORYFEED_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled'),\n ],\n [\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled'),\n ],\n ],\n ],\n [\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'URBIT_INVENTORYFEED_ACCOUNT_EMAIL',\n 'label' => $this->l('Email'),\n ],\n [\n 'type' => 'password',\n 'name' => 'URBIT_INVENTORYFEED_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n ],\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n ],\n ],\n ];\n }", "title": "" }, { "docid": "b2d7d3064a56af0ee4751c8b4fe891a1", "score": "0.5900033", "text": "protected function getConfigFormValues()\n {\n return array(\n 'SECUREMODULE_LIVE_MODE' => Configuration::get('SECUREMODULE_LIVE_MODE', true),\n 'SECUREMODULE_ACCOUNT_EMAIL' => Configuration::get('SECUREMODULE_ACCOUNT_EMAIL', '[email protected]'),\n 'SECUREMODULE_ACCOUNT_PASSWORD' => Configuration::get('SECUREMODULE_ACCOUNT_PASSWORD', null),\n );\n }", "title": "" }, { "docid": "dd97f87e05011073b030d07bf02ab5b4", "score": "0.5855817", "text": "public function getFormConfiguration()\n {\n $fields = $this->setupFields(FormConfiguration::all()->toArray());\n $fields['field'] = $this->populateSelectLists($fields['field']);\n\n return $fields;\n }", "title": "" }, { "docid": "0f5a54384044651b859944c6561ab50f", "score": "0.584057", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('PARAMÈTRES'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'text',\n 'label' => $this->l('Titre maison'),\n 'name' => 'FFF_MAP_SUPPLIERS_HOME_TITLE',\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Titre de la page intérieure'),\n 'name' => 'FFF_MAP_SUPPLIERS_PAGE_TITLE',\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Sous-titre de la page intérieure'),\n 'name' => 'FFF_MAP_SUPPLIERS_PAGE_SUBTITLE',\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "6a6dd7710e37657628c39846fd100bb9", "score": "0.58380675", "text": "protected function getConfigFormValues()\n {\n return array(\n 'DBCONTACTINFO_DISPLAYTOP' => Configuration::get('DBCONTACTINFO_DISPLAYTOP'),\n 'DBCONTACTINFO_PHONE' => Configuration::get('DBCONTACTINFO_PHONE'),\n );\n }", "title": "" }, { "docid": "7ed6fee9e511731394d21c44b51dc3ad", "score": "0.58116215", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'SECUREMODULE_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled'),\n ),\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'SECUREMODULE_ACCOUNT_EMAIL',\n 'label' => $this->l('Email'),\n ),\n array(\n 'type' => 'password',\n 'name' => 'SECUREMODULE_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "dcf2d4e2dd42c06de4c04780af9e9fa0", "score": "0.57810205", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Display Top'),\n 'name' => 'DBCONTACTINFO_DISPLAYTOP',\n 'is_bool' => true,\n 'desc' => $this->l('¿Mostrar enlace a formulario de contacto en la posición displaytop?'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'desc' => $this->l('Insertar número de teléfono que aparecerá en el topnav'),\n 'name' => 'DBCONTACTINFO_PHONE',\n 'label' => $this->l('Teléfono'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "7e23712fb9a793c9aaa567f9ddba583b", "score": "0.57791895", "text": "public function form_settings_fields( $form ) {\r\n\t\t// should return an array of sections, each section contains a title, description and an array of fields\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "96835db23ef6f2152a6a62083834452c", "score": "0.57583225", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Price range'),\n 'icon' => 'dollar-sign',\n ),\n 'input' => array(\n array(\n 'type' => 'text',\n 'prefix' => '',\n 'name' => 'WDS_PRICE_MINPRICE',\n 'label' => $this->l('Minimum price'),\n ),\n array(\n 'type' => 'text',\n 'prefix' => '',\n 'name' => 'WDS_PRICE_MAXPRICE',\n 'label' => $this->l('Maximum price'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "817ba35aa0e0d5ace84db2fc1ba28af0", "score": "0.5753218", "text": "private function widget_fields() {\r\n\r\n $news_portal_categories_dropdown = news_portal_categories_dropdown();\r\n \r\n $fields = array(\r\n\r\n 'block_title' => array(\r\n 'news_portal_widgets_name' => 'block_title',\r\n 'news_portal_widgets_title' => __( 'Block title', 'news-portal' ),\r\n 'news_portal_widgets_description' => __( 'Enter your block title. (Optional - Leave blank to hide the title.)', 'news-portal' ),\r\n 'news_portal_widgets_field_type' => 'text'\r\n ),\r\n\r\n 'block_cat_id' => array(\r\n 'news_portal_widgets_name' => 'block_cat_id',\r\n 'news_portal_widgets_title' => __( 'Block Category', 'news-portal' ),\r\n 'news_portal_widgets_default' => 0,\r\n 'news_portal_widgets_field_type' => 'select',\r\n 'news_portal_widgets_field_options' => $news_portal_categories_dropdown\r\n ),\r\n\r\n 'block_layout' => array(\r\n 'news_portal_widgets_name' => 'block_layout',\r\n 'news_portal_widgets_title' => __( 'Block Layouts', 'news-portal' ),\r\n 'news_portal_widgets_default' => 'layout1',\r\n 'news_portal_widgets_field_type' => 'selector',\r\n 'news_portal_widgets_field_options' => array(\r\n 'layout1' => esc_url( get_template_directory_uri() . '/assets/images/block-layout1.png' ),\r\n 'layout2' => esc_url( get_template_directory_uri() . '/assets/images/block-layout2.png' ),\r\n 'layout3' => esc_url( get_template_directory_uri() . '/assets/images/block-layout3.png' ),\r\n 'layout4' => esc_url( get_template_directory_uri() . '/assets/images/block-grid-alternate.png' )\r\n )\r\n ),\r\n\r\n );\r\n return $fields;\r\n }", "title": "" }, { "docid": "3d749e8a086322e31118676404d60229", "score": "0.57339644", "text": "protected function getConfigFormValues()\n {\n $values = [\n 'PAYMENT_GATEWAY_CLOUD_ENABLED' => Configuration::get('PAYMENT_GATEWAY_CLOUD_ENABLED', null),\n 'PAYMENT_GATEWAY_CLOUD_HOST' => Configuration::get('PAYMENT_GATEWAY_CLOUD_HOST', null),\n ];\n\n foreach ($this->getCreditCards() as $creditCard) {\n $prefix = strtoupper($creditCard);\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ENABLED'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ENABLED', null);\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_TITLE'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_TITLE') ?: $creditCard;\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ACCOUNT_USER'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ACCOUNT_USER', null);\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ACCOUNT_PASSWORD'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ACCOUNT_PASSWORD', null);\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_API_KEY'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_API_KEY', null);\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_SHARED_SECRET'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_SHARED_SECRET', null);\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_INTEGRATION_KEY'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_INTEGRATION_KEY', null);\n $values['PAYMENT_GATEWAY_CLOUD_' . $prefix . '_SEAMLESS'] = Configuration::get('PAYMENT_GATEWAY_CLOUD_' . $prefix . '_SEAMLESS', null);\n }\n\n return $values;\n }", "title": "" }, { "docid": "05a7a492e35155d55a0775be4bbf830b", "score": "0.57200503", "text": "function _whos_amung_us_block_configure($delta = '') {\n\n $form = array();\n $item = whos_amung_us_item_load($delta);\n if ($item) {\n $form_state = array('values' => unserialize($item['config']));\n $form_state['values']['name'] = $item['info'];\n $form_state['values']['mname'] = $item['machine_name'];\n return whos_amung_us_configuration_form(array(), $form_state, 'block');\n }\n return $form;\n\n}", "title": "" }, { "docid": "9353f38bf1fe681a6b1f9599904717b8", "score": "0.571941", "text": "protected function _getBlocks()\n {\n $blocks = $this->getRequest()->getParam('blocks', '');\n $handles = $this->getRequest()->getParam('handles', '');\n\n if (!$handles || !$blocks) {\n return [];\n }\n $blocks = $this->jsonSerializer->unserialize($blocks);\n $handles = $this->base64jsonSerializer->unserialize($handles);\n\n $layout = $this->_view->getLayout();\n $this->layoutCacheKey->addCacheKeys($this->layoutCacheKeyName);\n\n $this->_view->loadLayout($handles, true, true, false);\n $data = [];\n\n foreach ($blocks as $blockName) {\n $blockInstance = $layout->getBlock($blockName);\n if (is_object($blockInstance)) {\n $data[$blockName] = $blockInstance;\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "333dafdc54b272e778150baa904dc872", "score": "0.5710804", "text": "protected function getConfigFormValues()\n {\n return array(\n 'EPAYCO_LIVE_MODE' => Configuration::get('EPAYCO_LIVE_MODE', false),\n 'EPAYCO_CLIENT_ID' => Configuration::get('EPAYCO_CLIENT_ID', false),\n 'EPAYCO_PUBLIC_KEY' => Configuration::get('EPAYCO_PUBLIC_KEY', null),\n 'EPAYCO_PRIVATE_KEY' => Configuration::get('EPAYCO_PRIVATE_KEY', null),\n 'EPAYCO_ONPAGE_CHECKOUT' => Configuration::get('EPAYCO_ONPAGE_CHECKOUT', true),\n 'EPAYCO_PAYMENT_TOP' => Configuration::get('EPAYCO_PAYMENT_TOP', ''),\n );\n }", "title": "" }, { "docid": "0e43e366234309f02ba9303380de71cc", "score": "0.57085305", "text": "private function get_content_blocks_from_config( $blockdata ) {\r\n\t\t$blocks = [];\r\n\t\tforeach ( (array) $blockdata as $blockarr ) {\r\n\t\t\tif ( ! is_array( $blockarr ) || empty( $blockarr['type'] ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// check if block class exists\r\n\t\t\t$blockclass = sprintf( '\\MyListing\\Src\\Listing_Types\\Content_Blocks\\%s_Block', c27()->file2class( $blockarr['type'] ) );\r\n\t\t\tif ( ! class_exists( $blockclass ) ) {\r\n\t\t\t\tmlog()->warn( sprintf( 'No class handler for content block type %s found.', c27()->file2class( $blockarr['type'] ) ) );\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// initiate class\r\n\t\t\t$blocks[] = new $blockclass( $blockarr );\r\n\t\t}\r\n\r\n\t\treturn $blocks;\r\n\t}", "title": "" }, { "docid": "a4f7b6f6de35db16abed839e17381937", "score": "0.5700612", "text": "public function getConfig(array $params)\n {\n\n $field = $params['fieldLayoutField']->getField();\n\n $id = craft()->templates->namespaceInputId($field->handle, $params['namespace']);\n $name = craft()->templates->namespaceInputName($field->handle, $params['namespace']);\n $settings = $field->getFieldType()->getSettings();\n\n $blocks = [];\n $totalNewBlocks = 0;\n\n foreach ($params['value']->find(['status'=>null]) as $block) {\n\n $blockId = $block->id;\n\n if (!$blockId) {\n $totalNewBlocks++;\n $blockId = 'new' . $totalNewBlocks;\n }\n\n $fields = [];\n\n $blockTypeFieldLayout = $block->type->getFieldLayout();\n\n $matrixNamespace = $name.'['.$blockId.'][fields]';\n\n foreach ($blockTypeFieldLayout->getFields() as $blockFieldLayoutField) {\n\n $blockField = $blockFieldLayoutField->getField();\n\n $blockFieldValue = ($block ? $block->getFieldValue($blockField->handle) : null);\n\n $fields[] = [\n 'handle' => $blockField->handle,\n 'config' => craft()->fffields->getFieldConfig([\n 'element' => $params['element'],\n 'fieldLayoutField' => $blockFieldLayoutField,\n 'value' => $blockFieldValue,\n 'namespace' => $matrixNamespace\n\n ])\n ];\n }\n\n $blocks[] = [\n 'name' => $block->type->name,\n 'type' => [\n 'name' => $name.'['.$blockId.'][type]',\n 'value' => $block->type->handle,\n ],\n 'enabled' => [\n 'name' => $name.'['.$blockId.'][enabled]',\n 'value' => $block->enabled,\n ],\n 'fields' => $fields\n ];\n }\n\n $blockTypes = [];\n\n foreach ($settings->getBlockTypes() as $blockType) {\n\n $fields = [];\n\n $blockTypeFieldLayout = $blockType->getFieldLayout();\n\n $matrixNamespace = $name.'[__BLOCK__][fields]';\n\n foreach ($blockTypeFieldLayout->getFields() as $blockFieldLayoutField) {\n\n $blockField = $blockFieldLayoutField->getField();\n\n $fields[] = [\n 'handle' => $blockField->handle,\n 'config' => craft()->fffields->getFieldConfig([\n 'element' => $params['element'],\n 'fieldLayoutField' => $blockFieldLayoutField,\n 'value' => null,\n 'namespace' => $matrixNamespace\n ])\n ];\n }\n\n $blockTypes[] = [\n 'name' => $blockType->name,\n 'type' => [\n 'name' => $name.'[__BLOCK__][type]',\n 'value' => $blockType->handle,\n ],\n 'enabled' => [\n 'name' => $name.'[__BLOCK__][enabled]',\n 'value' => '1'\n ],\n 'fields' => $fields\n ];\n }\n\n $config = [\n 'id' => $id,\n 'name' => $name,\n 'blocks' => $blocks,\n 'blockTypes' => $blockTypes,\n 'totalNewBlocks' => $totalNewBlocks\n ];\n\n return $config;\n\n }", "title": "" }, { "docid": "c918f815a5709b6fa72ec9d48a58ee7e", "score": "0.5697913", "text": "public function DiscoverForm(&$form){\n $view = $form->createView();\n\n $fields = []; \n\n foreach ($form->all() as $child) {\n $childView = $view->offsetGet($child->getName());\n\n $fields[$child->getName()] = [\n 'name' => $child->getName(),\n 'required' => $child->isRequired(),\n 'label' => $child->getConfig()->getOption('label'),\n 'type' => get_class($child->getConfig()->getType()->getInnerType()),\n 'values' => (array_key_exists('choices', $childView->vars))? $childView->vars['choices'] : $childView->vars['value'],\n 'class' => $child->getConfig()->getOption('class'),\n 'multiple' => $child->getConfig()->getOption('multiple'),\n ];\n }\n\n return $fields;\n }", "title": "" }, { "docid": "7638cae2520a0899b63d81b3f079bdab", "score": "0.5692654", "text": "function readBlockINI($viewname)\n {\n # read the configuration file\n $ini_array = $this->getConfigArray($viewname);\n\n $block = array();\n # parse settings for each section\n foreach ($ini_array as $section_name => $section_arr)\n {\n # it is the block description.\n $block[$section_name] = array('template' => array(), 'options' => array(), 'layout' => array( 'categories' => array(), 'products' => array()));\n $block_section = &$block[$section_name];\n # parse every option for this block.\n foreach ($section_arr as $key => $value)\n {\n // keyword: TemplateDirectory, TemplateFile, Option\n $_key = _ml_strtolower($key);\n // describe the references to the other templates\n if (_ml_strpos($_key, 'categories') === 0 || _ml_strpos($_key, 'products') === 0)\n {\n $layout_line = $this->readLayoutLine($_key, $value);\n # add the references to the array\n if (is_array($layout_line) && array_key_exists('categories', $layout_line))\n {\n $block_section['layout']['categories'] = $block_section['layout']['categories'] + $layout_line['categories'];\n }\n elseif (is_array($layout_line) && array_key_exists('products', $layout_line))\n {\n $block_section['layout']['products'] = $block_section['layout']['products'] + $layout_line['products'];\n }\n }\n // the keyword variation, that may contain branches: ProductType\n $_subkey = \"\";\n if (_ml_strpos($_key, '-') > 0)\n {\n $_subkey = _ml_substr($_key, _ml_strpos($_key, '-') + 1);\n $_key = _ml_substr($_key, 0, _ml_strpos($_key, '-'));\n }\n # if the option has branches, then parse it.\n if (_ml_strpos($_subkey, '-') > 0)\n {\n $_vary = _ml_substr($_subkey, _ml_strpos($_subkey, '-') + 1);\n $_subkey = _ml_substr($_subkey, 0, _ml_strpos($_subkey, '-'));\n if ($_vary == \"default\")\n {\n $value = array('default' => $value);\n }\n else\n {\n $value = $this->readLayoutLine($_vary, $value);\n }\n }\n switch ($_key)\n {\n case 'templatedirectory':\n $block_section['template']['directory'] = $value;\n break;\n\n case 'templatefile':\n if (array_key_exists($_subkey, $block_section['template']) && is_array($block_section['template'][$_subkey]))\n {\n $block_section['template'][$_subkey] = _array_merge_recursive($block_section['template'][$_subkey], $value);\n }\n else\n {\n $block_section['template'][$_subkey] = $value;\n }\n break;\n\n case 'option':\n $block_section['options'][$_subkey] = $value;\n break;\n\n default:\n break;\n }\n }\n }\n return $block;\n }", "title": "" }, { "docid": "16e0fee9c442ee2b357b1317523d0f3f", "score": "0.5690497", "text": "public function getRequestData()\n {\n $postList = array();\n $formName = $this->getFormName();\n\n $requestData = $this->request->getPostList()->toArray();\n if (array_key_exists($formName, $requestData)) {\n $postList = array_merge($postList, $requestData[$formName]);\n }\n\n $filesData = $this->request->getFileList()->toArray();\n if (array_key_exists($formName, $filesData)) {\n $filesData = $filesData[$formName];\n $postList = array_merge($postList, $this->normalizeFilesData($filesData));\n }\n\n return $postList;\n }", "title": "" }, { "docid": "a03ad3a1a97451a0d32ebf9738f60578", "score": "0.568684", "text": "protected function getConfigFormValues()\n {\n return array(\n 'OXXODEPOSIT_LIVE_MODE' => Configuration::get('OXXODEPOSIT_LIVE_MODE'),\n 'OXXODEPOSIT_INFO' => Configuration::get('OXXODEPOSIT_INFO'),\n 'OXXODEPOSIT_INFO_FOOTER' => Configuration::get('OXXODEPOSIT_INFO_FOOTER'),\n 'OXXODEPOSIT_DEFAULT_ORDER_PAYMENT' => Configuration::get('OXXODEPOSIT_DEFAULT_ORDER_PAYMENT'),\n );\n }", "title": "" }, { "docid": "af0346d344fddb841ee2113addcbf65f", "score": "0.5681162", "text": "function cf_post_mdb_post_process( $config, $form){\n\t\n\t$data = array();\n\tforeach($form['fields'] as $field_id=>$field){\n\t\t$data[$field['slug']] = Caldera_Forms::get_field_data($field_id, $form);\n\t}\n}", "title": "" }, { "docid": "bbeddd632952158f4123a947a4e519e5", "score": "0.5676909", "text": "protected function getConfigFormValues()\n {\n return array(\n 'FFF_MAP_SUPPLIERS_PAGE_TITLE' => Configuration::get('FFF_MAP_SUPPLIERS_PAGE_TITLE', 'Map Créateurs'),\n 'FFF_MAP_SUPPLIERS_PAGE_SUBTITLE' => Configuration::get('FFF_MAP_SUPPLIERS_PAGE_SUBTITLE', 'Discover and shop innovated new products from local makers and small buiness.'),\n 'FFF_MAP_SUPPLIERS_HOME_TITLE' => Configuration::get('FFF_MAP_SUPPLIERS_HOME_TITLE', 'Nos producteurs partout en France'),\n );\n }", "title": "" }, { "docid": "b78700927fb74e3426f4d556d45f680b", "score": "0.5654666", "text": "private function widget_fields() {\r\n\r\n $news_vibrant_categories_lists = news_vibrant_categories_lists();\r\n \r\n $fields = array(\r\n\r\n 'block_title' => array(\r\n 'news_vibrant_widgets_name' => 'block_title',\r\n 'news_vibrant_widgets_title' => __( 'Block title', 'news-vibrant' ),\r\n 'news_vibrant_widgets_description' => __( 'Enter your block title. (Optional - Leave blank to hide title.)', 'news-vibrant' ),\r\n 'news_vibrant_widgets_field_type' => 'text'\r\n ),\r\n\r\n 'block_cat_slugs' => array(\r\n 'news_vibrant_widgets_name' => 'block_cat_slugs',\r\n 'news_vibrant_widgets_title' => __( 'Block Categories', 'news-vibrant' ),\r\n 'news_vibrant_widgets_field_type' => 'multicheckboxes',\r\n 'news_vibrant_widgets_field_options' => $news_vibrant_categories_lists\r\n ),\r\n\r\n 'block_layout' => array(\r\n 'news_vibrant_widgets_name' => 'block_layout',\r\n 'news_vibrant_widgets_title' => __( 'Block Layouts', 'news-vibrant' ),\r\n 'news_vibrant_widgets_default' => 'layout1',\r\n 'news_vibrant_widgets_field_type' => 'selector',\r\n 'news_vibrant_widgets_field_options' => array(\r\n 'layout1' => esc_url( get_template_directory_uri() . '/assets/images/full-width1.png' )\r\n )\r\n ),\r\n\r\n );\r\n return $fields;\r\n }", "title": "" }, { "docid": "6be67b10c487229ccf5595e2c7b34bcc", "score": "0.56302005", "text": "function get_block_list () {\r\n global $blog_content, $blog_subject, $blog_text, $blog_date, $user_colors, $logged_in;\r\n global $lang_string;\r\n\r\n // Read blocks file.\r\n $filename = CONFIG_DIR.'blocks.txt';\r\n $result = sb_read_file( $filename );\r\n\r\n $blocklist = array();\r\n if ( $result ) {\r\n $blocklist = explode('|', $result);\r\n for ( $i = 0; $i < count( $blocklist ); $i+=2 ) {\r\n $blocklist[ 'title' ] = blog_to_html( $blocklist[$i], false, false, false, true );\r\n $blocklist[ 'text' ] = blog_to_html( $blocklist[$i+1], false, false, false, true );\r\n }\r\n }\r\n return ( $blocklist );\r\n }", "title": "" }, { "docid": "814e3738118d0039056f3fa7c0d63fcf", "score": "0.56301904", "text": "protected function getConfigFormValues()\n {\n $config_pc = $this->getConfigFormValuesByDevice('PC');\n $config_mobile = $this->getConfigFormValuesByDevice('MB');\n $config_tablet = $this->getConfigFormValuesByDevice('TB');\n\n $config = array_merge($config_pc, $config_mobile, $config_tablet);\n return $config;\n }", "title": "" }, { "docid": "6586fabe17740d065af579931445547d", "score": "0.5627305", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Update All Product'),\n 'name' => 'FIXDEFAULTATTRIBUTES_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('if you want to fix all products default combination, enabled this and click on save button.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Yes')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('No')\n )\n ),\n ),\n array(\n 'col' => 6,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-file\"></i>',\n 'name' => 'FIXDEFAULTATTRIBUTES_PRODUCT_ID',\n 'label' => $this->l('Product ID'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Update'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "ff9a0731d5f97599015f621ebd7988f3", "score": "0.56109643", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-euro\"></i>',\n 'desc' => $this->l('Conversión euro pagado - euro monedero'),\n 'name' => 'MONEDERO_VIRTUAL_VALOR_EURO',\n 'label' => $this->l('Valor euro'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "b436c1ac0946a4dc1139ba8177a2ebaa", "score": "0.5604153", "text": "protected function getFormTemplateData()\n {\n return array(\n 'banks' => array(\n array('key' => IdealBic::ABNANL2A, 'label' => 'ABN Amro Bank'),\n array('key' => IdealBic::ASNBNL21, 'label' => 'ASN Bank'),\n array('key' => IdealBic::BUNQNL2A, 'label' => 'bunq'),\n array('key' => IdealBic::INGBNL2A, 'label' => 'ING'),\n array('key' => IdealBic::KNABNL2H, 'label' => 'Knab'),\n array('key' => IdealBic::RABONL2U, 'label' => 'Rabobank'),\n array('key' => IdealBic::RGGINL21, 'label' => 'Regio Bank'),\n array('key' => IdealBic::SNSBNL2A, 'label' => 'SNS Bank'),\n array('key' => IdealBic::TRIONL2U, 'label' => 'Triodos Bank'),\n array('key' => IdealBic::FVLBNL22, 'label' => 'Van Lanschot Bankiers')\n )\n );\n }", "title": "" }, { "docid": "cc44e4d26ca8e5e0ad11f5e31c44969e", "score": "0.5599786", "text": "public function getPostValues(){\n\t $post_check_array = array (\n\n\t // Add Briefje form\n\t // submit action\n\t 'add_ticket' => array('filter' => FILTER_SANITIZE_STRING ),\n\n\t // Naam\n\t 'naam' => array('filter' => FILTER_SANITIZE_STRING ),\n\n\t // Briefje nummer\n\t 'Briefje' => array('filter' => FILTER_SANITIZE_NUMBER_INT ),\n\n\t // Email\n\t 'email' => array('filter' => FILTER_SANITIZE_STRING ),\n\t \n\t // Adres\n\t 'adres' => array('filter' => FILTER_SANITIZE_STRING ),\n\t \n\t // Woonplaats\n\t 'woonplaats' => array('filter' => FILTER_SANITIZE_STRING ),\n\t \n\t // Postcode\n\t 'postcode' => array('filter' => FILTER_SANITIZE_STRING ),\n\n\t // Calendar info\n\t 'datum' => array('filter' => FILTER_SANITIZE_STRING )\n\t );\n\t // Get filtered input:\n\t $post_inputs = filter_input_array( INPUT_POST, $post_check_array );\n\n\n\t return $post_inputs;\n\t }", "title": "" }, { "docid": "07482dc233c607fda31d835ed66eceb5", "score": "0.5589518", "text": "public function getConfigFieldsValues( $obj ) { \n\t \n\t $languages = Language::getLanguages(false);\n\t $fields_values = array();\n\n\n\t foreach( $this->fields_form as $k=> $f ){ \n\t foreach( $f['form']['input'] as $j=> $input ){\n\t if( isset($obj->{trim($input['name'])}) ){\n if(isset($obj->{trim($input['name'])}))\n $data = $obj->{trim($input['name'])};\n else\n $data = $input['default'];\n \n\t if( $input['name'] == 'image' && $data ){ \n\t $thumb = __PS_BASE_URI__.'modules/'.$this->name.'/img/c/'. $data; \n\t $this->fields_form[$k]['form']['input'][$j]['thumb'] = $thumb; \n\t }\n\n\t if( isset($input['lang']) ) {\n\t foreach ( $languages as $lang ){\n\t \n\t $fields_values[$input['name']][$lang['id_lang']] = isset($data[$lang['id_lang']]) ? $data[$lang['id_lang']] : $input['default'];\n\t }\n\t }else {\n\t $fields_values[$input['name']] = $data;\n\t } \n\t }else{\n\t if( isset($input['lang']) ) {\n\t foreach ($languages as $lang){\n\t $v = Tools::getValue( 'title', Configuration::get($input['name'], $lang['id_lang']) );\n\t $fields_values[$input['name']][$lang['id_lang']] = $v ? $v : $input['default'];\n\t }\n\t }else {\n\t $v = Tools::getValue( $input['name'], Configuration::get( $input['name']) );\n\t $fields_values[$input['name']] =$v?$v:$input['default'];\n\t } \n\n\t if( $input['name'] == $obj->type.\"_type\" ){\n\t $fields_values[$input['name']] = $obj->item;\n\t }\n\t } \n\t } \n\t }\n //echo \"<pre>\";print_r($fields_values);die;\n\t return $fields_values;\n\t }", "title": "" }, { "docid": "7bcefb3b3ebeec16af49c27c73fed47d", "score": "0.5584212", "text": "protected function getConfigForm()\n {\n $form = [\n 'form' => [\n 'tabs' => [\n 'General' => 'General',\n 'CreditCard' => 'Credit Card',\n ],\n 'legend' => [\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ],\n 'input' => [\n [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_ENABLED',\n 'label' => $this->l('Enable'),\n 'tab' => 'General',\n 'type' => 'switch',\n 'is_bool' => 1,\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => 'Enabled',\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => 'Disabled',\n ],\n ],\n ],\n [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_HOST',\n 'label' => $this->l('Host'),\n 'tab' => 'General',\n 'type' => 'text',\n ],\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n ],\n ],\n ];\n\n foreach ($this->getCreditCards() as $creditCard) {\n\n $prefix = strtoupper($creditCard);\n\n $form['form']['input'][] = [\n 'name' => 'line',\n 'type' => 'html',\n 'tab' => 'CreditCard',\n 'html_content' => '<h3 style=\"margin-top: 10px;\">' . $creditCard . '</h3>',\n ];\n\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ENABLED',\n 'label' => $this->l('Enable'),\n 'tab' => 'CreditCard',\n 'type' => 'switch',\n 'is_bool' => 1,\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => 'Enabled',\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => 'Disabled',\n ],\n ],\n ];\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_TITLE',\n 'label' => $this->l('Title'),\n 'tab' => 'CreditCard',\n 'type' => 'text',\n ];\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ACCOUNT_USER',\n 'label' => $this->l('User'),\n 'tab' => 'CreditCard',\n 'type' => 'text',\n ];\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_ACCOUNT_PASSWORD',\n 'label' => $this->l('Password'),\n 'tab' => 'CreditCard',\n 'type' => 'text',\n ];\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_API_KEY',\n 'label' => $this->l('API Key'),\n 'tab' => 'CreditCard',\n 'type' => 'text',\n ];\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_SHARED_SECRET',\n 'label' => $this->l('Shared Secret'),\n 'tab' => 'CreditCard',\n 'type' => 'text',\n ];\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_INTEGRATION_KEY',\n 'label' => $this->l('Integration Key'),\n 'tab' => 'CreditCard',\n 'type' => 'text',\n ];\n $form['form']['input'][] = [\n 'name' => 'PAYMENT_GATEWAY_CLOUD_' . $prefix . '_SEAMLESS',\n 'label' => $this->l('Seamless Integration'),\n 'tab' => 'CreditCard',\n 'type' => 'switch',\n 'is_bool' => 1,\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => 'Enabled',\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => 'Disabled',\n ],\n ],\n ];\n // $form['form']['input'][] = [\n // 'name' => 'line',\n // 'type' => 'html',\n // 'tab' => 'CreditCard',\n // 'html_content' => '<hr>',\n // ];\n }\n\n return $form;\n }", "title": "" }, { "docid": "bcf3cfaacc9f56235e616f9d095adf1d", "score": "0.55415183", "text": "function editor_form_submit(&$context, $values) {\n $edited = !empty($values['state']) ? (array) $this->json_decode($values['state']) : array();\n\n $options = array();\n\n // Take the existing context values and remove blocks that belong affected regions.\n $affected_regions = array_keys($edited);\n if (!empty($context->reactions['block']['blocks'])) {\n $options = $context->reactions['block'];\n foreach ($options['blocks'] as $key => $block) {\n if (in_array($block['region'], $affected_regions)) {\n unset($options['blocks'][$key]);\n }\n }\n }\n\n // Iterate through blocks and add in the ones that belong to the context.\n foreach ($edited as $region => $blocks) {\n foreach ($blocks as $weight => $block) {\n if ($block->context === $context->name) {\n $split = explode('-', $block->bid);\n $options['blocks'][$block->bid] = array(\n 'module' => array_shift($split),\n 'delta' => implode('-', $split),\n 'region' => $region,\n 'weight' => $weight,\n );\n }\n }\n }\n\n return $options;\n }", "title": "" }, { "docid": "cb71ea8e2e97568a5ea9abb993dd26f8", "score": "0.5538774", "text": "protected function getConfigFormValues()\n {\n return array(\n 'FIXDEFAULTATTRIBUTES_LIVE_MODE' => false,\n 'FIXDEFAULTATTRIBUTES_PRODUCT_ID' => null,\n );\n }", "title": "" }, { "docid": "9c4912ec238656e9f87d6ba89c388089", "score": "0.5527696", "text": "protected function prepareUploadFormVars() {\n\t\t$values = array(\n\t\t\t'title' => '',\n\t\t\t'description' => '',\n\t\t\t'access_id' => ACCESS_DEFAULT,\n\t\t\t'tags' => '',\n\t\t\t'container_guid' => elgg_get_page_owner_guid(),\n\t\t);\n\n\t\tif (elgg_is_sticky_form('present')) {\n\t\t\t$sticky_values = elgg_get_sticky_values('present');\n\t\t\tforeach ($sticky_values as $key => $value) {\n\t\t\t\t$values[$key] = $value;\n\t\t\t}\n\t\t}\n\n\t\telgg_clear_sticky_form('present');\n\n\t\treturn $values;\n\t}", "title": "" }, { "docid": "6e1a8d518f7bbcc8391db95846af0cef", "score": "0.5524603", "text": "public function allowed_block_types( $allowed_blocks, $post ) {\n return $allowed_blocks;\n\n }", "title": "" }, { "docid": "646bdc1b51a8c10828ccf1504f786463", "score": "0.55154693", "text": "protected function getConfigForm()\n {\n $serverIP = self::getAddresses_www($_SERVER['SERVER_NAME']);\n $serverIP = isset($serverIP['ip'])?$serverIP['ip']:$serverIP;\n\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Hepsipay Module Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'html',\n 'label' => $this->l('Sunucunuzun IP\\'si').': <strong>'.$serverIP.'</strong>',\n 'html_content' => '',\n ),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => $this->l('Endpoint'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_ENDPOINT',\n\t\t\t\t\t\t'required' => true,\n 'disabled' => true,\n\t\t\t\t\t),\n array(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => $this->l('API Key'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_APIKEY',\n\t\t\t\t\t\t'required' => true\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => $this->l('Secret'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_SECRET',\n\t\t\t\t\t\t'required' => true\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t//'label' => $this->l('Enable Installment'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_ENABLE_INSTALLMENT',\n 'values' => array(\n 'query' => array(\n array(\n 'id' => 'CHECK',\n 'name' => $this->l('Enable installment options in the checkout page.'),\n 'val' => '1'\n ),\n ),\n 'id' => 'id',\n 'name' => 'name'\n )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t//'label' => $this->l('Enable 3D'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_ENABLE_3D',\n 'values' => array(\n 'query' => array(\n array(\n 'id' => 'CHECK',\n 'name' => $this->l('Enable \"3D Secure\" as an option in the checkout page.'),\n 'val' => '1'\n ),\n ),\n 'id' => 'id',\n 'name' => 'name'\n )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t//'label' => $this->l('Force 3D'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_FORCE_3D',\n 'values' => array(\n 'query' => array(\n array(\n 'id' => 'CHECK',\n 'name' => $this->l('Forec 3D for all transctions'),\n 'val' => '1'\n ),\n ),\n 'id' => 'id',\n 'name' => 'name'\n )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t//'label' => $this->l('Force 3D for Debit'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_FORCE_3D_DEBIT',\n 'desc' => $this->l('If 3D secure option is mandatory in Hepsipay side, this option must be enable. Otherwise your transactions will fail.'),\n 'values' => array(\n 'query' => array(\n array(\n 'id' => 'CHECK',\n 'name' => $this->l('Force 3D for debit cards.'),\n 'val' => '1'\n ),\n ),\n 'id' => 'id',\n 'name' => 'name'\n )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'name' => 'HEPSIPAY_MERCHANT_PAY_FEES',\n\t\t\t\t\t\t'desc' => $this->l('If not checked, the transaction fee will be added to the order\\'s total so the customer will be charged for the fees.'),\n 'values' => array(\n 'query' => array(\n array(\n 'id' => 'CHECK',\n 'name' => $this->l('Merchant Pay Fees.'),\n 'val' => '1'\n ),\n ),\n 'id' => 'id',\n 'name' => 'name'\n )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'label' => $this->l('Custom CSS'),\n\t\t\t\t\t\t'name' => 'HEPSIPAY_CUSTOM_CSS',\n\t\t\t\t\t\t'desc' => $this->l('Put your CSS here to make customization to the checkout form.'),\n\t\t\t\t\t),\n array(\n 'type' => 'html',\n 'label' => '',\n 'html_content' => '\n <script>\n document.getElementById(\"HEPSIPAY_FORCE_3D_DEBIT_CHECK\").checked = \"checked\";\n document.getElementById(\"HEPSIPAY_FORCE_3D_DEBIT_CHECK\").disabled = \"disabled\";\n </script>',\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "a45d7e0302d1db4b8bdb7a2cdb7f0a1a", "score": "0.54998493", "text": "protected function getConfigFormValues()\n {\n return array(\n 'WDS_PRICE_MINPRICE' => Configuration::get('WDS_PRICE_MINPRICE', null),\n 'WDS_PRICE_MAXPRICE' => Configuration::get('WDS_PRICE_MAXPRICE', null),\n );\n }", "title": "" }, { "docid": "534c1bc0791bf36b8d70e3d6f7abab16", "score": "0.5481587", "text": "protected function getFormElements() {\n\t\treturn array(\n\t\t\t'fromid' => array(\n\t\t\t\t'name' => 'fromid',\n\t\t\t\t'default' => $this->getRequest()->getVal( 'fromid' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'id' => 'wb-redirectentity-fromid',\n\t\t\t\t'label-message' => 'wikibase-redirectentity-fromid'\n\t\t\t),\n\t\t\t'toid' => array(\n\t\t\t\t'name' => 'toid',\n\t\t\t\t'default' => $this->getRequest()->getVal( 'toid' ),\n\t\t\t\t'type' => 'text',\n\t\t\t\t'id' => 'wb-redirectentity-toid',\n\t\t\t\t'label-message' => 'wikibase-redirectentity-toid'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "eaef31750ae19cb4d3a6be4f0374e8e2", "score": "0.54616505", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n ),\n );\n }", "title": "" }, { "docid": "49ad3844c1640e4bdbb3becfbbc9c6b3", "score": "0.54551494", "text": "function get_form_data() {\r\n global $bp;\r\n \r\n if( $this->has_assignment_caps( $bp->loggedin_user->id ) || is_super_admin() ) {\r\n header( 'HTTP/1.1 200 OK' );\r\n header( \"Content-Type: application/json\" );\r\n $this->frmb->set_data( $this->current_assignment->form_data );\r\n $data = $this->frmb->get_data();\r\n \r\n foreach ( $data as $k => $q ) {\r\n if ( !is_array( $data[$k]['values'] ) ) {\r\n $data[$k]['values'] = esc_textarea( $q['values'] );\r\n } else {\r\n $data[$k]['title'] = esc_textarea( $data[$k]['title'] );\r\n foreach ( $data[$k]['values'] as $i => $v ) {\r\n $data[$k]['values'][$i]['value'] = esc_textarea( $v['value'] );\r\n }\r\n }\r\n }\r\n echo json_encode( Array( 'form_structure' => $data ) );\r\n exit( 0 );\r\n }\r\n }", "title": "" }, { "docid": "a31ffbceaa52b852de18ce278015a499", "score": "0.54541516", "text": "function misha_allowed_block_types( $allowed_blocks, $post ) {\r\n \r\n\t$allowed_blocks = array(\r\n\t\t'core/image',\r\n\t\t'core/paragraph',\r\n\t\t'core/heading',\r\n 'core/list',\r\n 'core/embed',\r\n 'core/media-text',\r\n 'core/spacer',\r\n 'core/table',\r\n 'core/code',\r\n 'core/quote',\r\n 'core/block',\r\n 'core/columns',\r\n 'core/separator',\r\n\r\n 'acf/suggestion',\r\n 'acf/snipped',\r\n 'acf/list-content',\r\n 'acf/feature-download'\r\n\r\n\t);\r\n \r\n\tif( $post->post_type === 'pillar' ) {\r\n\t\t$allowed_blocks[] = 'core/shortcode';\r\n\t}\r\n \r\n\treturn $allowed_blocks;\r\n \r\n}", "title": "" }, { "docid": "75ccfd07ea46044eaee7751c29b51e4d", "score": "0.5453722", "text": "function cf_post_mdb_pre_process( $config, $form){\n\t\n\t$data = array();\n\tforeach($form['fields'] as $field_id=>$field){\n\t\t$data[$field['slug']] = Caldera_Forms::get_field_data($field_id, $form);\n\t}\n}", "title": "" }, { "docid": "6c17e1deb8e829caabf66514e32d87ec", "score": "0.5446234", "text": "public function getFormFields()\n {\n $this->addCheckBox('is_enabled');\n $this->add('slug', 'text');\n if ($this->isCreate) {\n $this->addCheckBox('has_multiple_images');\n $this->add('layout', 'hidden');\n } else {\n\n\n $this->add('layout', 'select', [\n 'choices' => $this->getLayoutsList(),\n 'empty_value' => $this->getSelectEmptyValueLabel(),\n 'help_block' => [\n 'text' => $this->transHelpText('layout', ['path' => $this->getBlockLayoutsPath('views')])\n ]\n ]);\n\n }\n\n $this->getBlockSecondaries();\n\n if (!$this->isCreate) {\n $this->getBlockMainContent();\n }\n\n }", "title": "" }, { "docid": "fa896eda4a0e55f101745088d34bde14", "score": "0.54396635", "text": "protected function getConfigForm()\n {\n $customers = Customer::getCustomers();\n $features = Feature::getFeatures(\n (int)Context::getContext()->language->id\n );\n $orderStates = OrderState::getOrderStates(\n (int)Context::getContext()->language->id\n );\n $carriers = Carrier::getCarriers(\n (int)Context::getContext()->language->id\n );\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-book',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Auto add book images if found ?'),\n 'desc' => $this->l('Will auto upload book images if found based on ISBN'),\n 'hint' => $this->l('Beware of editors properties !'),\n 'name' => 'EVERPSBOOKSTORE_ALLOW_IMG',\n 'is_bool' => true,\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Yes')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('No')\n )\n ),\n ),\n array(\n 'type' => 'select',\n 'class' => 'chosen',\n 'multiple' => true,\n 'required' => true,\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'label' => $this->l('Super customer accounts'),\n 'desc' => $this->l('Will be allowed for creating and quick selling books'),\n 'hint' => $this->l('Please choose at least one customer account'),\n 'name' => 'EVERPSBOOKSTORE_CUSTOMERS_IDS',\n 'options' => array(\n 'query' => $customers,\n 'id' => 'id_customer',\n 'name' => 'email'\n ),\n 'required' => true,\n ),\n array(\n 'type' => 'select',\n 'required' => true,\n 'label' => $this->l('Edition date feature'),\n 'name' => 'EVERPSBOOKSTORE_DATE_FEATURE',\n 'desc' => $this->l('Specify the edition date'),\n 'hint' => $this->l('Will be used for searching filters'),\n 'options' => array(\n 'query' => $features,\n 'id' => 'id_feature',\n 'name' => 'name'\n ),\n ),\n array(\n 'type' => 'select',\n 'required' => true,\n 'label' => $this->l('Editor feature'),\n 'name' => 'EVERPSBOOKSTORE_EDITOR_FEATURE',\n 'desc' => $this->l('Specify the editior name'),\n 'hint' => $this->l('Will be used for searching filters'),\n 'options' => array(\n 'query' => $features,\n 'id' => 'id_feature',\n 'name' => 'name'\n ),\n ),\n array(\n 'type' => 'select',\n 'required' => true,\n 'label' => $this->l('Condition feature'),\n 'name' => 'EVERPSBOOKSTORE_CONDITION_FEATURE',\n 'desc' => $this->l('Specify the condition feature (for searching new, refurbished...)'),\n 'hint' => $this->l('Will be used for searching filters'),\n 'options' => array(\n 'query' => $features,\n 'id' => 'id_feature',\n 'name' => 'name'\n ),\n ),\n array(\n 'type' => 'select',\n 'required' => true,\n 'label' => $this->l('Default carrier'),\n 'hint' => $this->l('Default carrier for super customer'),\n 'name' => 'EVERPSBOOKSTORE_ID_CARRIER',\n 'desc' => $this->l('Will be the only carrier allowed for payments in one click'),\n 'options' => array(\n 'query' => $carriers,\n 'id' => 'id_carrier',\n 'name' => 'name'\n )\n ),\n array(\n 'type' => 'select',\n 'required' => true,\n 'label' => $this->l('Validated order state'),\n 'name' => 'EVERPSBOOKSTORE_VALIDATED_STATE_ID',\n 'desc' => $this->l('Specify the validated order state'),\n 'hint' => $this->l('Will send email to seller'),\n 'options' => array(\n 'query' => $orderStates,\n 'id' => 'id_order_state',\n 'name' => 'name'\n ),\n 'required' => true,\n ),\n array(\n 'type' => 'select',\n 'class' => 'chosen',\n 'multiple' => true,\n 'required' => true,\n 'label' => $this->l('Cancelled order state'),\n 'name' => 'EVERPSBOOKSTORE_CANCELLED_STATE_IDS',\n 'desc' => $this->l('Specify the cancelled order state'),\n 'hint' => $this->l('Will cancel transaction between customer and seller'),\n 'options' => array(\n 'query' => $orderStates,\n 'id' => 'id_order_state',\n 'name' => 'name'\n ),\n 'required' => true,\n ),\n array(\n 'type' => 'select',\n 'class' => 'chosen',\n 'multiple' => true,\n 'required' => true,\n 'label' => $this->l('Shipped order state'),\n 'name' => 'EVERPSBOOKSTORE_SHIPPED_STATE_IDS',\n 'desc' => $this->l('Specify the shipped order state'),\n 'hint' => $this->l('Won\\'t send email from module'),\n 'options' => array(\n 'query' => $orderStates,\n 'id' => 'id_order_state',\n 'name' => 'name'\n ),\n 'required' => true,\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "78c453c7cf561b74422779faa95913fd", "score": "0.5439067", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'EPAYCO_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n //'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('You can find it at the top right of the page in your admin account.'),\n 'name' => 'EPAYCO_CLIENT_ID',\n 'label' => $this->l('Client Id'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n //'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Open \"Integraciones\" --> \"Llaves API\" and search \"Llaves secretas\"'),\n 'name' => 'EPAYCO_PUBLIC_KEY',\n 'label' => $this->l('Public Key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n //'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Open \"Integraciones\" --> \"Llaves API\" and search \"Llaves secretas\" --> P_KEY'),\n 'name' => 'EPAYCO_PRIVATE_KEY',\n 'label' => $this->l('Private Key'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('OnPage Checkout'),\n 'name' => 'EPAYCO_ONPAGE_CHECKOUT',\n 'is_bool' => true,\n 'desc' => $this->l('If you set No, you will use standard redirect payment process,\n else, set Yes to use Onpage Checkout'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n //'col' => 3,\n 'type' => 'textarea',\n //'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Show help information to customer before payment methods list.'),\n 'name' => 'EPAYCO_PAYMENT_TOP',\n 'label' => $this->l('Payment Top Message'),\n 'autoload_rte' => true,\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "2f135ee15b98add616732ecc57d5d60c", "score": "0.5436747", "text": "protected function _prepareForm()\n {\n\n if (!$this->_configDataObject) {\n $this->_initObjects();\n }\n\n $form = new Varien_Data_Form();\n $form->setFieldsetRenderer($this->getLayout()->createBlock('adminhtml/widget_form_renderer_fieldset'));\n $form->setFieldsetElementRenderer($this->getLayout()\n ->createBlock('adminhtml/widget_form_renderer_fieldset_element'));\n\n /**\n * if there is a parent element defined, it will be replaced by a hidden element with the same name\n * and overriden by the form elements\n * It is needed to maintain HTML consistency of the parent element's form\n */\n if ($this->_parentElement) {\n $form->setHtmlIdPrefix($this->_parentElement->getHtmlId())\n ->setFieldNameSuffix($this->_parentElement->getName());\n $form->addField('', 'hidden', array('name' => ''));\n }\n\n $this->_section = Mage::getSingleton('adminhtml/config')->getSection($this->_sectionName);\n //$sectionName = $this->_sectionName;\n $groups = $this->_section->groups;\n\n $groups = (array)$groups;\n if ($group = $groups[$this->_group]) {\n $fieldset = $form->addFieldset(\n $this->_group,\n array(\n 'legend' => (string)$group->label,\n ));\n\n\n foreach ($group->fields as $elements) {\n $elements = (array)$elements;\n $this->prepareElements($elements, $group, $fieldset);\n\n }\n }\n\n //$form->setValues(Mage::getStoreConfig($this->_sectionName . '/' . $this->_group));\n\n\n return $form;\n }", "title": "" }, { "docid": "57611de499ea21d103ab89c41f328f6e", "score": "0.5435118", "text": "public function pullFields(){\n $form = $this->pull();\n $fields = [];\n\n foreach($form->elements as $element){\n $fieldElement = new FieldElement($element, $this->_client);\n $fieldElement->getOptionList();\n $fields[] = $fieldElement;\n }\n return $fields;\n }", "title": "" }, { "docid": "a4cb562ef6d8a664b973b92c1c1a2939", "score": "0.5431588", "text": "protected static function parse_blocks_for_fields( $blocks, $fields = array(), $parent = '' ) {\n\n\t\tforeach ( $blocks as $block ) {\n\t\t\t$is_form_field = ( strpos( $block['blockName'], 'formation/' ) === 0 );\n\n\t\t\tif ( $is_form_field ) {\n\t\t\t\t$fields[ $block['attrs']['slug'] ] = array(\n\t\t\t\t\t'type' => str_replace( 'formation/', '', $block['blockName'] ),\n\t\t\t\t\t'parent' => $parent,\n\t\t\t\t\t'attrs' => $block['attrs'],\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( $block['innerBlocks'] ) {\n\t\t\t\t$inner_parent = $is_form_field ? $block['attrs']['slug'] : '';\n\t\t\t\t$fields = static::parse_blocks_for_fields( $block['innerBlocks'], $fields, $inner_parent );\n\t\t\t}\n\t\t}\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "2da05ba5a54afab92c8c37f022dfdf68", "score": "0.5424296", "text": "function tweet_block_settings_form_submit(&$form, &$form_state) {\n // store the ids in variables, mainly so we can revoer the values and place them in the form for defaults\n variable_set('tweet_id_1', $form_state['values']['tweet_block_1_id']);\n variable_set('tweet_id_2', $form_state['values']['tweet_block_2_id']);\n variable_set('tweet_id_3', $form_state['values']['tweet_block_3_id']);\n $i = 1;\n $blocks_built = 0;\n // cycle through the 3 blocks, tbd make this extensible to have more than 3\n while ($i<4) {\n $form_value_id = 'tweet_block_' . $i . '_id';\n if ($form_state['values'][$form_value_id] != \"\") {\n // ping the twitter api if ID exists\n $block_content = tweet_block_get_tweet($form_state['values'][$form_value_id]);\n // stash ID and html JSON response in the db\n tweet_block_set_tweet_info($i, $form_state['values'][$form_value_id], $block_content);\n $blocks_built++;\n }\n else {\n tweet_block_delete_tweet_info($i);\n }\n $i++;\n }\n drupal_set_message(t('Your tweet block settings have been saved. ' . $blocks_built . ' blocks have been generated and are available through the block system.'));\n \n if($form_state['values']['tweet_block_4_id']) {\n tweet_block_set_feed_info($form_state['values']['tweet_block_4_title'], $form_state['values']['tweet_block_4_id'], $form_state['values']['tweet_block_4_rm']);\n }\n}", "title": "" }, { "docid": "7b7bc0883dcd1aa6741207e6e1bb9c07", "score": "0.5404265", "text": "function contact_form_prepare_for_akismet( $form ) {\n\n\t$form['comment_type'] = 'contact_form';\n\t$form['user_ip'] = preg_replace( '/[^0-9., ]/', '', $_SERVER['REMOTE_ADDR'] );\n\t$form['user_agent'] = $_SERVER['HTTP_USER_AGENT'];\n\t$form['referrer'] = $_SERVER['HTTP_REFERER'];\n\t$form['blog'] = get_option( 'home' );\n\n\t$ignore = array( 'HTTP_COOKIE' );\n\n\tforeach ( $_SERVER as $k => $value )\n\t\tif ( !in_array( $k, $ignore ) && is_string( $value ) )\n\t\t\t$form[\"$k\"] = $value;\n\t\t\t\n\treturn $form;\n}", "title": "" }, { "docid": "aaaaf17ab352b57c33402850a6ff2670", "score": "0.54010767", "text": "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Impostazioni'),\n 'icon' => 'icon-cogs',\n 'class' => 'soisy_free',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'SOISY_FREE_LIVE_MODE',\n 'required' => true,\n 'validate' => 'isBool',\n 'is_bool' => true,\n 'desc' => $this->l('Utilizza il modulo in versione live (attiva) o test (non attiva)'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Si'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('No'),\n )\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Abilita Log'),\n 'name' => 'SOISY_FREE_LOG_ENABLED',\n 'required' => true,\n 'validate' => 'isBool',\n 'is_bool' => true,\n 'desc' => $this->l('Abilita salvataggio Log'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Si'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('No'),\n )\n ),\n ),\n array(\n 'type' => 'text',\n 'class' => 'soisy_free-input',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'label' => $this->l('Shop ID'),\n 'name' => 'SOISY_FREE_SHOP_ID',\n 'required' => true,\n 'validate' => 'isRequired',\n 'is_bool' => false,\n 'desc' => $this->l('API shop ID'),\n ),\n array(\n 'type' => 'text',\n 'class' => 'soisy_free-input',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'label' => $this->l('API key'),\n 'name' => 'SOISY_FREE_API_KEY',\n 'required' => true,\n 'validate' => 'isRequired',\n 'is_bool' => false,\n 'desc' => $this->l('API Shop Key'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "dbcaac4aa8d87e32408a9e664b880e20", "score": "0.5399391", "text": "protected function prepare_post( $post, $context = 'view' ) {\n if ( ! class_exists( 'acf' ) ) return parent::prepare_post( $post, $context );\n\n $fields = array();\n\n if ( ! empty( $this->fields ) ) {\n foreach ( $this->fields as $field ) {\n // TODO: this causes incompatibility with polylang (hence the @ operator)\n $fields[$field] = @get_field( $field, $post['ID'], true );\n }\n }\n\n return array_merge( parent::prepare_post( $post, $context ), array( 'fields' => $fields ) );\n }", "title": "" }, { "docid": "38728ff73caa6efe2462d2761b3107df", "score": "0.5393411", "text": "protected function getConfigFormValues()\n {\n return array(\n\n 'MONEDERO_VIRTUAL_VALOR_EURO' => Configuration::get('MONEDERO_VIRTUAL_VALOR_EURO'),\n );\n }", "title": "" }, { "docid": "5dddd6c7ede63bbd6852e48bda0b6564", "score": "0.53908217", "text": "public function getFieldProperties() {\n return array(\n array(\n 'key' => 'crop',\n 'fieldLabel' => $this->modx->lexicon('blockup.crop'),\n 'xtype' => 'textfield',\n 'value' => 'free',\n 'description' => $this->modx->lexicon('blockup.crop.description')\n ),\n array(\n 'key' => 'tab_file',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_file'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_file.description')\n ),\n array(\n 'key' => 'tab_camera',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_camera'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_camera.description')\n ),\n array(\n 'key' => 'tab_url',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_url'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_url.description')\n ),\n array(\n 'key' => 'tab_facebook',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_facebook'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_facebook.description')\n ),\n array(\n 'key' => 'tab_gdrive',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_gdrive'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_gdrive.description')\n ),\n array(\n 'key' => 'tab_dropbox',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_dropbox'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_dropbox.description')\n ),\n array(\n 'key' => 'tab_instagram',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_instagram'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_instagram.description')\n ),\n array(\n 'key' => 'tab_evernote',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_evernote'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_evernote.description')\n ),\n array(\n 'key' => 'tab_flickr',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_flickr'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_flickr.description')\n ),\n array(\n 'key' => 'tab_skydrive',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_skydrive'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_skydrive.description')\n ),\n array(\n 'key' => 'tab_box',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_box'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_box.description')\n ),\n array(\n 'key' => 'tab_vk',\n 'fieldLabel' => $this->modx->lexicon('blockup.tab_vk'),\n 'xtype' => 'contentblocks-combo-boolean',\n 'default' => '1',\n 'description' => $this->modx->lexicon('blockup.tab_vk.description')\n )\n );\n }", "title": "" }, { "docid": "7eccf5641a0fd7ee94642d06d8f7e964", "score": "0.5387031", "text": "public function getFormBlockType();", "title": "" }, { "docid": "ae4bf6e04ea57594189323d273f36dac", "score": "0.5379177", "text": "public function get_encoded_form_array(){\n\t\treturn array('form_id'=>$this->_form_array['form_id'],'form_structure'=>json_encode($this->_form_array['form_structure']));\n\t}", "title": "" }, { "docid": "2ac2492fa47f4934b3db490f4f5a7d74", "score": "0.5378341", "text": "protected function form_elements() {\n return array();\n }", "title": "" }, { "docid": "c298b5b034b7231ec7167b9c56bdab6b", "score": "0.5372523", "text": "public function parse() {\r\n if (!empty($this->form->getVar('_contactID'))) {\r\n $contactId = $this->form->getVar('_contactID');\r\n //the contact id is already set on this form so set the information static\r\n $this->parseStatic($contactId);\r\n } else {\r\n $this->parseDynamic();\r\n }\r\n }", "title": "" }, { "docid": "10559ea986dd6b35968632582c47435c", "score": "0.5369565", "text": "public function getReceiptFormdefines(): array\n {\n /* Cache formdefines */\n if (! isset(self::$receiptFormdefines)) {\n self::$receiptFormdefines = config('receipt.formdefines');\n self::$receiptFormdefines = (is_array(self::$receiptFormdefines) ? self::$receiptFormdefines : []);\n self::$receiptFormdefines = array_unique(collect(self::$receiptFormdefines)->map(function ($item, $key) {\n if (isset($key[0], $item['code'], $item['status']) && $item['code'] > 0 && $item['code'] <= 99) {\n return $item['code'];\n } else {\n return null;\n }\n })->reject(function ($item) {\n return empty($item);\n })->all());\n self::$receiptFormdefines = array_flip(self::$receiptFormdefines);\n }\n return self::$receiptFormdefines;\n }", "title": "" }, { "docid": "a7c83dec1708a9fa1228843579c3ad49", "score": "0.53575486", "text": "function allowed_block_types( $allowed_blocks, $post ) {\n if ( null !== THEME_SETTINGS['allowed_blocks'] || 'all' === THEME_SETTINGS['allowed_blocks'] ) {\n return $allowed_blocks;\n }\n\n // Add the default allowed blocks\n $allowed_blocks = null !== THEME_SETTINGS['allowed_blocks']['default'] ? THEME_SETTINGS['allowed_blocks']['default'] : [];\n\n // If there is post type specific blocks, add them to the allowed blocks list\n if ( null !== THEME_SETTINGS['allowed_blocks'][ get_post_type( $post->post_type ) ] ) {\n $allowed_blocks = array_merge( $allowed_blocks, THEME_SETTINGS['allowed_blocks'][ get_post_type( $post->post_type ) ] );\n }\n\n return $allowed_blocks;\n}", "title": "" }, { "docid": "89c1d3635bf88594d0a4aafdc42724c3", "score": "0.5348047", "text": "public function getConfigForm( $cblock )\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "6893ad2d8dc060217d1690a1253160c1", "score": "0.5343274", "text": "private function parse_blocks( $content ) {\n\t\t$parsed_blocks = parse_blocks( $content );\n\n\t\t$blocks = [];\n\t\tforeach ( $parsed_blocks as $block ) {\n\t\t\tif ( empty( $block['blockName'] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$name = strtolower( $block['blockName'] );\n\t\t\tif ( ! isset( $blocks[ $name ] ) || ! is_array( $blocks[ $name ] ) ) {\n\t\t\t\t$blocks[ $name ] = [];\n\t\t\t}\n\n\t\t\tif ( ! isset( $block['innerContent'] ) ) {\n\t\t\t\t$block['innerContent'] = [];\n\t\t\t}\n\n\t\t\tif ( 'yoast/faq-block' === $name ) {\n\t\t\t\t$block = $this->faq_converter->convert( $block );\n\t\t\t\t$blocks[ $name ][] = \\serialize_block( $block );\n\t\t\t}\n\n\t\t\tif ( 'yoast/how-to-block' === $name ) {\n\t\t\t\t$block = $this->howto_converter->convert( $block );\n\t\t\t\t$blocks[ $name ][] = \\serialize_block( $block );\n\t\t\t}\n\n\t\t\tif ( in_array( $name, $this->local_converter->yoast_blocks, true ) ) {\n\t\t\t\t$block = $this->local_converter->convert( $block );\n\t\t\t\t$blocks[ $name ][] = \\serialize_block( $block );\n\t\t\t}\n\t\t}\n\n\t\treturn $blocks;\n\t}", "title": "" }, { "docid": "657f9f209ec57fef578edebf935cadfe", "score": "0.5343099", "text": "private function _getFieldOptionsForConfigurator(): array\n {\n $fieldTypes = [];\n\n // Set a temporary namespace for these\n $originalNamespace = Craft::$app->getView()->getNamespace();\n $namespace = Craft::$app->getView()->namespaceInputName('blockTypes[__BLOCK_TYPE_NESTED__][fields][__FIELD_NESTED__][typesettings]', $originalNamespace);\n Craft::$app->getView()->setNamespace($namespace);\n\n foreach (Craft::$app->getFields()->getAllFieldTypes() as $class) {\n /** @var Field|string $class */\n // No Matrix-Inception, sorry buddy.\n if ($class === 'craft\\fields\\Matrix' || $class === 'verbb\\supertable\\fields\\SuperTableField') {\n continue;\n }\n\n Craft::$app->getView()->startJsBuffer();\n /** @var FieldInterface $field */\n $field = new $class();\n $settingsBodyHtml = Craft::$app->getView()->namespaceInputs((string)$field->getSettingsHtml());\n $settingsFootHtml = Craft::$app->getView()->clearJsBuffer();\n\n $fieldTypes[] = [\n 'type' => $class,\n 'name' => $class::displayName(),\n 'settingsBodyHtml' => $settingsBodyHtml,\n 'settingsFootHtml' => $settingsFootHtml,\n ];\n }\n\n // Sort them by name\n ArrayHelper::multisort($fieldTypes, 'name');\n\n Craft::$app->getView()->setNamespace($originalNamespace);\n\n return $fieldTypes;\n }", "title": "" }, { "docid": "24f734b00f6cebb281a54937a00fa403", "score": "0.53359556", "text": "protected function getLayoutData()\n\t{\n\t\t$data = parent::getLayoutData();\n\t\t$valueAll = (object) $this->form->getValue('params');\n\t\t$setsAmount = empty($valueAll->sets_amount) ? 3 : $valueAll->sets_amount;\n\n\t\t// Get the plugin\n\t\trequire_once JPATH_PLUGINS . '/editors/tinymce/tinymce.php';\n\n\t\t$menus = array(\n\t\t\t'edit' => array('label' => 'Edit'),\n\t\t\t'insert' => array('label' => 'Insert'),\n\t\t\t'view' => array('label' => 'View'),\n\t\t\t'format' => array('label' => 'Format'),\n\t\t\t'table' => array('label' => 'Table'),\n\t\t\t'tools' => array('label' => 'Tools'),\n\t\t);\n\n\t\t$data['menus'] = $menus;\n\t\t$data['menubarSource'] = array_keys($menus);\n\t\t$data['buttons'] = PlgEditorTinymce::getKnownButtons();\n\t\t$data['buttonsSource'] = array_keys($data['buttons']);\n\t\t$data['toolbarPreset'] = PlgEditorTinymce::getToolbarPreset();\n\t\t$data['setsAmount'] = $setsAmount;\n\n\t\t// Get array of sets names\n\t\tfor ($i = 0; $i < $setsAmount; $i++)\n\t\t{\n\t\t\t$data['setsNames'][$i] = JText::sprintf('PLG_TINY_SET_TITLE', $i);\n\t\t}\n\n\t\tkrsort($data['setsNames']);\n\n\t\t// Prepare the forms for each set\n\t\t$setsForms = array();\n\t\t$formsource = JPATH_PLUGINS . '/editors/tinymce/form/setoptions.xml';\n\n\t\t// Check the old values for B/C\n\t\t$valueOld = new stdClass;\n\t\tif ($this->value && empty($this->value['setoptions']))\n\t\t{\n\t\t\t$valueOld = $valueAll;\n\t\t}\n\n\t\tforeach (array_keys($data['setsNames']) as $num)\n\t\t{\n\t\t\t$formname = 'set.form.' . $num;\n\t\t\t$control = $this->name . '[setoptions][' . $num . ']';\n\n\t\t\t$setsForms[$num] = JForm::getInstance($formname, $formsource, array('control' => $control));\n\n\t\t\t// Bind the values\n\n\t\t\tif (empty($this->value['setoptions'][$num]))\n\t\t\t{\n\t\t\t\t$formValues = $valueOld;\n\n\t\t\t\t// Predefine access: 0 for special, 1 for registered, all else is public\n\t\t\t\t$formValues->access = !$num ? 3 : ($num === 1 ? 2 : 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$formValues = $this->value['setoptions'][$num];\n\t\t\t}\n\n\t\t\t$setsForms[$num]->bind($formValues);\n\t\t}\n\n\t\t$data['setsForms'] = $setsForms;\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "37a6d6aaba570f35977df9b954193e6c", "score": "0.532949", "text": "public function get_form_info() {\r\n\t\t$form = array();\r\n\t\t$form['heading'] = __( 'Sorry to see you go', 'modula-gallery' );\r\n\t\t$form['body'] = __( 'Before you deactivate the plugin, would you quickly give us your reason for doing so?', 'modula-gallery' );\r\n\t\t$form['options'] = array(\r\n\t\t\t'setup' => __( 'Set up is too difficult', 'modula-gallery' ),\r\n\t\t\t'documentation' => __( 'Lack of documentation', 'modula-gallery' ),\r\n\t\t\t'features' => __( 'Not the features I wanted', 'modula-gallery' ),\r\n\t\t\t'better-plugin' => __( 'Found a better plugin', 'modula-gallery' ),\r\n\t\t\t'incompatibility' => __( 'Incompatible with theme or plugin', 'modula-gallery' ),\r\n\t\t);\r\n\t\t$form['details'] = __( 'How could we improve ?', 'modula-gallery' );\r\n\t\treturn $form;\r\n\t}", "title": "" }, { "docid": "e243969db9de69eb5748a151d4a29815", "score": "0.5323123", "text": "private function getFields(){\n\n\t\t$types = FieldFactory::getAvailableTypes();\n\t\t//$types = Sort::pluck( $types, 'name' );\n\n\n\n\t\t$in_standard = array( 'text', 'textarea', 'email', 'checkbox', 'number', 'checkboxes', 'radio', 'select' );\n\t\t$in_adv = array( 'file', 'wysiwyg', 'date', 'password', 'hidden', 'address' );\n\n\t\t$in_des = array( 'html', 'break' );\n\n\t\t$in_standard = apply_filters( 'chef_forms_standard_fields', $in_standard );\n\t\t$in_adv = apply_filters( 'chef_forms_advanced_fields', $in_adv );\n\t\t$in_des = apply_filters( 'chef_forms_design_fields', $in_des );\n\n\t\t$return = array( 'standard' => array(), 'advanced' => array(), 'design' => array() );\n\n\n\t\tforeach( $types as $key => $value ){\n\n\t\t\tif( in_array( $key, $in_standard ) )\n\t\t\t\t$return['standard'][ $key ] = $value;\n\n\t\t\tif( in_array( $key, $in_adv ) )\n\t\t\t\t$return['advanced'][ $key ] = $value; \n\n\t\t\tif( in_array( $key, $in_des ) )\n\t\t\t\t$return['design'][ $key ] = $value;\n \t\t}\n\n\n\t\treturn $return;\n\n\t}", "title": "" }, { "docid": "0421cc2495639feaf94d333713ec52aa", "score": "0.5317942", "text": "private function getFullTaxonomySettingsForm(): array\n {\n return $this->getFullSettingsFrom(\n $this->getTaxonomies(),\n [ObjectHandler::POST_FORMAT_TYPE],\n function ($type = MainConfig::DEFAULT_TYPE) {\n return $this->getTaxonomySettingsForm($type);\n }\n );\n }", "title": "" }, { "docid": "816491cce64d447d49898b6d5d93edda", "score": "0.53145695", "text": "protected function getMainFormValues()\n {\n return [\n static::STORE_COUNTRY => (int) \\Configuration::get(static::STORE_COUNTRY),\n static::LIVE => \\Configuration::get(static::LIVE),\n static::STANDARD_WEBSITE_PROFILE_ID => \\Configuration::get(static::STANDARD_WEBSITE_PROFILE_ID),\n\n static::WEBSITE_PAYMENTS_STANDARD_ENABLED => \\Configuration::get(static::WEBSITE_PAYMENTS_STANDARD_ENABLED),\n static::WEBSITE_PAYMENTS_PLUS_ENABLED => \\Configuration::get(static::WEBSITE_PAYMENTS_PLUS_ENABLED),\n static::EXPRESS_CHECKOUT_ENABLED => \\Configuration::get(static::EXPRESS_CHECKOUT_ENABLED),\n static::LOGIN_ENABLED => \\Configuration::get(static::LOGIN_ENABLED),\n static::LOGIN_THEME => \\Configuration::get(static::LOGIN_THEME),\n\n static::CLIENT_ID => \\Configuration::get(static::CLIENT_ID),\n static::SECRET => \\Configuration::get(static::SECRET),\n ];\n }", "title": "" }, { "docid": "fcb219c27e4f21959d3453fac40bf677", "score": "0.5308731", "text": "public function createFormFields()\n {\n return array(\n 'tab' => 'ideal',\n 'fields' => array(\n array(\n 'name' => 'enabled',\n 'label' => $this->getTranslatedString('text_enable'),\n 'type' => 'onoff',\n 'doc' => $this->getTranslatedString('enable_heading_title_ideal'),\n 'default' => 0,\n ),\n array(\n 'name' => 'title',\n 'label' => $this->getTranslatedString('config_title'),\n 'type' => 'text',\n 'default' => $this->getTranslatedString('heading_title_ideal'),\n 'required' => true,\n ),\n array(\n 'name' => 'merchant_account_id',\n 'label' => $this->getTranslatedString('config_merchant_account_id'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getMerchantAccountId(),\n 'required' => true,\n ),\n array(\n 'name' => 'secret',\n 'label' => $this->getTranslatedString('config_merchant_secret'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getSecret(),\n 'required' => true,\n ),\n array(\n 'name' => 'base_url',\n 'label' => $this->getTranslatedString('config_base_url'),\n 'type' => 'text',\n 'doc' => $this->getTranslatedString('config_base_url_desc'),\n 'default' => $this->credentialsConfig->getBaseUrl(),\n 'required' => true,\n ),\n array(\n 'name' => 'http_user',\n 'label' => $this->getTranslatedString('config_http_user'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getHttpUser(),\n 'required' => true,\n ),\n array(\n 'name' => 'http_pass',\n 'label' => $this->getTranslatedString('config_http_password'),\n 'type' => 'text',\n 'default' => $this->credentialsConfig->getHttpPassword(),\n 'required' => true,\n ),\n array(\n 'name' => 'payment_action',\n 'type' => 'hidden',\n 'default' => 'pay',\n ),\n array(\n 'name' => 'descriptor',\n 'label' => $this->getTranslatedString('config_descriptor'),\n 'type' => 'onoff',\n 'default' => 0,\n ),\n array(\n 'name' => 'send_additional',\n 'label' => $this->getTranslatedString('config_additional_info'),\n 'type' => 'onoff',\n 'default' => 1,\n ),\n array(\n 'name' => 'test_credentials',\n 'type' => 'linkbutton',\n 'required' => false,\n 'buttonText' => $this->getTranslatedString('test_config'),\n 'id' => 'idealConfig',\n 'method' => 'iDEAL',\n 'send' => array(\n 'WIRECARD_PAYMENT_GATEWAY_IDEAL_BASE_URL',\n 'WIRECARD_PAYMENT_GATEWAY_IDEAL_HTTP_USER',\n 'WIRECARD_PAYMENT_GATEWAY_IDEAL_HTTP_PASS'\n )\n )\n )\n );\n }", "title": "" }, { "docid": "7d10c23047826af5be9123b25ec712cf", "score": "0.53055334", "text": "public static function posted_values($post){\n $sanArray = [];\n foreach($post as $key => $value){\n $sanArray[$key] = self::sanitize($value);\n }\n return $sanArray;\n }", "title": "" }, { "docid": "e0d1896745c92d173ed297aadb699f93", "score": "0.53003013", "text": "function readBlocksINI($block)\n {\n if (!isset($this->Configs_array[$block]))\n {\n return;\n }\n $block_arr = $this->Configs_array[$block];\n\n if (_ml_strtolower($block) == 'layouts') return;\n # read the configuration file for this block\n $config = $this->readBlockINI($block);\n # register functions for derived blocks.\n foreach ($config as $custom_tag => $template)\n {\n # skip the special tag layouts\n if ($custom_tag == \"layout\") continue;\n # skip the tags, which are representation names\n if (class_exists($custom_tag) && ($custom_tag != \"Checkout\")) continue;\n if(function_exists($custom_tag)) continue;\n $func = '\n function '. $custom_tag .'() {\n global $application;\n $application->setBlockOverride(\\''.$block.'\\', \\''.$custom_tag.'\\');\n $arg0 = @func_get_arg(0);\n if ($arg0 === false) {\n $out = '. $block .'();\n } else {\n $out = '. $block .'($arg0);\n }\n $application->resetBlockOverride(\\''.$block.'\\');\n return $out;\n }';\n eval($func);\n }\n # save information.\n $this->block_config[$block] = $config;\n }", "title": "" }, { "docid": "c3576346a068c7d52b8ab9460b4918f0", "score": "0.5299105", "text": "public function configure(&$form){\n $form['og_block_title'] = array(\n '#type' => 'textfield',\n '#title' => 'Title',\n '#default_value' => $this->title\n );\n \n $form['og_block_class'] = array(\n '#type' => 'select',\n '#title' => 'OG Block Type',\n '#options' => og_blocks_get_block_class_options(),\n '#default_value' => get_class($this)\n );\n }", "title": "" }, { "docid": "288f94658e2a06e5a2911211ac41cb00", "score": "0.5284774", "text": "public function getFormElements() {\n $formArray = array();\n foreach($this->nameFormElements as $value) {\n array_push($formArray,$value);\n }\n foreach($this->contactFormElements as $value) {\n array_push($formArray,$value);\n }\n return $formArray;\n }", "title": "" }, { "docid": "06a64ee571c1885007581b6c4bab3834", "score": "0.52827513", "text": "public function getPost()\n\t{\n\t\t$post = array();\n\t\t$post['id'] = preg_replace('/[^0-9]/', '', $this->getParser()->getUrl());\n\t\t$post['title'] = $this->findOne('/html/head/title')->getText();\n\t\t$post['url'] = $this->getParser()->getUrl();\n\t\t$post['date'] = $this->selectOne('span.postingdate')->extractText('/ (\\d.*)/');\n\t\t$post['date'] = new \\DateTime((str_replace(', ', '', $post['date'])));\n\n\t\tforeach ($this->select('ul.blurbs li') as $i => $blurb) {\n\t\t\tif (false !== strpos($blurb->getText(), ':')) {\n\t\t\t\tlist($name, $value) = explode(':', $blurb->getText(), 2);\n\t\t\t} else {\n\t\t\t\t$name = $i;\n\t\t\t\t$value = $blurb->getText();\n\t\t\t}\n\n\t\t\t$post['blurbs'][trim($name)] = trim($value);\n\t\t}\n\n\t\t// Now remove the blurbs so they don't show up in the post body\n\t\t$this->select('ul.blurbs')->remove();\n\n\t\t$post['email'] = $this->selectOne('span.returnemail a')->getText();\n\t\t$post['body'] = $this->selectOne('div#userbody')->getText();\n\n\t\treturn $post;\n\t}", "title": "" }, { "docid": "caccb904dfe8cd075f496e4faab43df9", "score": "0.5279658", "text": "protected function getConfigForm()\n {\n\n $allStates = OrderState::getOrderStates((int)$this->context->language->id);\n\n $options = array(\n array(\n 'id_option' => 1, // The value of the 'value' attribute of the <option> tag.\n 'name' => 'Method 1' // The value of the text content of the <option> tag.\n ),\n array(\n 'id_option' => 2,\n 'name' => 'Method 2'\n ),\n );\n\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'OXXODEPOSIT_LIVE_MODE',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'type' => 'select', // This is a <select> tag.\n 'label' => $this->l('Estatus predeterminado:'), // The <label> for this <select> tag.\n 'desc' => $this->l('Estatus predeterminado con el que se creará la orden al hacer un pago mediante este módulo'), // A help text, displayed right next to the <select> tag.\n 'name' => 'OXXODEPOSIT_DEFAULT_ORDER_PAYMENT', // The content of the 'id' attribute of the <select> tag.\n 'required' => true, // If set to true, this option must be set.\n 'options' => array(\n 'query' => $allStates, // $options contains the data itself.\n 'id' => 'id_order_state', // The value of the 'id' key must be the same as the key for 'value' attribute of the <option> tag in each $options sub-array.\n 'name' => 'name' // The value of the 'name' key must be the same as the key for the text content of the <option> tag in each $options sub-array.\n )\n ),\n array(\n 'col' => 8,\n 'type' => 'textarea',\n 'rows' => 10,\n 'cols' => 10,\n 'class' => 'rte',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'OXXODEPOSIT_INFO',\n 'label' => $this->l('Información general'),\n ),\n array(\n 'col' => 8,\n 'type' => 'textarea',\n 'rows' => 10,\n 'cols' => 10,\n 'class' => 'rte',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a valid email address'),\n 'name' => 'OXXODEPOSIT_INFO_FOOTER',\n 'label' => $this->l('Información pie de pagina'),\n ),\n \n ),\n 'submit' => array(\n 'title' => $this->l('Guardar'),\n ),\n ),\n );\n }", "title": "" }, { "docid": "764e83212e3204289e9b009e310cd1ef", "score": "0.5279082", "text": "protected function getFieldConfigurations() {\n $options = [];\n foreach ( \\Drupal::service('entity_field.manager')->getFieldDefinitions($this->plugin->entityType(), 'evergreen') as $field_name => $field_definition) {\n if(!$field_definition->isReadOnly() && strpos($field_name, 'revision') === false && strpos($field_name, 'langcode') === false){\n $options[] = [\n 'name' => $field_name,\n 'multivalue'=> $field_definition->getFieldStorageDefinition()->getCardinality() == 1 ? FALSE : TRUE\n ];\n }\n }\n return $options;\n }", "title": "" }, { "docid": "9927355e35d114d8752918cfc7242a2d", "score": "0.5277776", "text": "protected function prepareValuesForPost(): array\n {\n return collect($this->decodeValueType(true)['fields'])\n ->filter(fn($field) => $field['values'] !== null)\n ->keyBy('field_id')\n ->map(fn($field) => $field['values'])\n ->toArray();\n }", "title": "" }, { "docid": "d58b80a457272922248dceea1f35aaa4", "score": "0.5264055", "text": "public function getConfigFieldInfo() {\n\t\t$config = [];\n\t\t// mixed small type\n\t\t$config[] = new FieldInfo(\n\t\t\t'field1', // key\n\t\t\tFieldInfo::TYPE_PLAIN | FieldInfo::TYPE_HTML | FieldInfo::TYPE_MARKDOWN, // allowedContentTypes\n\t\t\t'FIELD_1' // name\n\t\t\t);\n\n\t\t// mixed small type with default\n\t\t$config[] = new FieldInfo(\n\t\t\t'field2', // key\n\t\t\tFieldInfo::TYPE_PLAIN | FieldInfo::TYPE_HTML | FieldInfo::TYPE_MARKDOWN, // allowedTypes\n\t\t\t'FIELD_2', // name\n\t\t\tnull, // array\n\t\t\tnull, // required\n\t\t\tnull, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_HTML, // defaultType\n\t\t\t'<b>THIS IS STRONG</b>' // defaultContent\n\t\t\t);\n\n\t\t// mixed small type required\n\t\t$config[] = new FieldInfo(\n\t\t\t'field3', // key\n\t\t\tFieldInfo::TYPE_PLAIN | FieldInfo::TYPE_HTML | FieldInfo::TYPE_MARKDOWN, // allowedTypes\n\t\t\t'FIELD_3', // name\n\t\t\tnull, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_HTML, // defaultType\n\t\t\t'<b>THIS IS STRONG</b>' // defaultContent\n\t\t\t);\n\n\t\t// array of TEXT\n\t\t$config[] = new FieldInfo(\n\t\t\t'field4', // key\n\t\t\tFieldInfo::TYPE_PLAIN, // allowedTypes\n\t\t\t'FIELD_4', // name\n\t\t\ttrue\n\t\t\t);\n\n\t\t// array of mixed small type required\n\t\t$config[] = new FieldInfo(\n\t\t\t'field5', // key\n\t\t\tFieldInfo::TYPE_PLAIN | FieldInfo::TYPE_HTML | FieldInfo::TYPE_MARKDOWN, // allowedTypes\n\t\t\t'FIELD_5', // name\n\t\t\ttrue\n\t\t\t);\n\n\t\t// page\n\t\t$config[] = new FieldInfo(\n\t\t\t'field6', // key\n\t\t\tFieldInfo::TYPE_PAGE, // allowedTypes\n\t\t\t'FIELD_6' // name\n\t\t\t);\n\n\t\t// enum\n\t\t$config[] = new FieldInfo(\n\t\t\t'field7', // key\n\t\t\tFieldInfo::TYPE_ENUM | FieldInfo::TYPE_PLAIN, // allowedTypes\n\t\t\t'FIELD_7', // name\n\t\t\ttrue, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\t['OTHER' => 'MY_OTHER_FIELD', 'APPLICATION' => 'MY_APPLICATION_FIELD'], // auxiliaryInfo\n\t\t\t[FieldInfo::TYPE_PLAIN, FieldInfo::TYPE_ENUM], // defaultType\n\t\t\t['hello', 'OTHER'] // defaultContent\n\t\t\t);\n\n\t\t// enum\n\t\t$config[] = new FieldInfo(\n\t\t\t'field7', // key\n\t\t\tFieldInfo::TYPE_ENUM, // allowedTypes\n\t\t\t'FIELD_7', // name\n\t\t\tfalse, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\t['OTHER' => 'MY_OTHER_FIELD', 'APPLICATION' => 'MY_APPLICATION_FIELD'], // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_ENUM, // defaultType\n\t\t\t'APPLICATION' // defaultContent\n\t\t\t);\n\n\t\t// int\n\t\t$config[] = new FieldInfo(\n\t\t\t'field8', // key\n\t\t\tFieldInfo::TYPE_INT, // allowedTypes\n\t\t\t'FIELD_8', // name\n\t\t\tfalse, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\t3, // minContentLength\n\t\t\t10, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_INT, // defaultType\n\t\t\t7 // defaultContent\n\t\t\t);\n\n\t\t// date time\n\t\t$config[] = new FieldInfo(\n\t\t\t'field9', // key\n\t\t\tFieldInfo::TYPE_DATE_TIME, // allowedTypes\n\t\t\t'FIELD_9', // name\n\t\t\tfalse, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\t'2018-01-01 12:30:00', // minContentLength\n\t\t\t'2018-06-01 12:30:00', // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_DATE_TIME, // defaultType\n\t\t\t'2018-03-01 12:30:00' // defaultContent\n\t\t\t);\n\n\t\t// tags\n\t\t$config[] = new FieldInfo(\n\t\t\t'field10', // key\n\t\t\tFieldInfo::TYPE_TAGS, // allowedTypes\n\t\t\t'FIELD_10', // name\n\t\t\tfalse, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_TAGS, // defaultType\n\t\t\t'hello, world' // defaultContent\n\t\t\t);\n\n\t\t// float\n\t\t$config[] = new FieldInfo(\n\t\t\t'field11', // key\n\t\t\tFieldInfo::TYPE_FLOAT, // allowedTypes\n\t\t\t'FIELD_11', // name\n\t\t\tfalse, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\t3, // minContentLength\n\t\t\t10, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_FLOAT, // defaultType\n\t\t\t7.0 // defaultContent\n\t\t\t);\n\n\t\t// locale\n\t\t$config[] = new FieldInfo(\n\t\t\t'field12', // key\n\t\t\tFieldInfo::TYPE_LOCALE, // allowedTypes\n\t\t\t'FIELD_12', // name\n\t\t\tfalse, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_LOCALE, // defaultType\n\t\t\t'de' // defaultContent\n\t\t\t);\n\n\t\t// duration\n\t\t$config[] = new FieldInfo(\n\t\t\t'field13', // key\n\t\t\tFieldInfo::TYPE_DURATION, // allowedTypes\n\t\t\t'FIELD_13', // name\n\t\t\tfalse, // array\n\t\t\ttrue, // required\n\t\t\tnull, // largeContent\n\t\t\t1, // minContentLength\n\t\t\t10, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_DURATION, // defaultType\n\t\t\t'0000-00-00 12:30:00' // defaultContent\n\t\t\t);\n\n\t\t// boolean\n\t\t$config[] = new FieldInfo(\n\t\t\t'field14', // key\n\t\t\tFieldInfo::TYPE_BOOLEAN, // allowedTypes\n\t\t\t'FIELD_14', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\tnull, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\t\"Dhis is a test.\", // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_BOOLEAN, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\t// range\n\t\t$config[] = new FieldInfo(\n\t\t\t'field15', // key\n\t\t\tFieldInfo::TYPE_RANGE, // allowedTypes\n\t\t\t'FIELD_15', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\tnull, // largeContent\n\t\t\t0, // minContentLength\n\t\t\t10, // maxContentLength\n\t\t\t1, // auxiliaryInfo\n\t\t\tnull, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\t// encrypted\n\t\t$config[] = new FieldInfo(\n\t\t\t'field16', // key\n\t\t\tFieldInfo::TYPE_ENCRYPTED, // allowedTypes\n\t\t\t'FIELD_16', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\tfalse, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tnull, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\t// encrypted\n\t\t$config[] = new FieldInfo(\n\t\t\t'field17', // key\n\t\t\tFieldInfo::TYPE_ENCRYPTED, // allowedTypes\n\t\t\t'FIELD_17', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\ttrue, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tnull, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\t// color\n\t\t$config[] = new FieldInfo(\n\t\t\t'field18', // key\n\t\t\tFieldInfo::TYPE_COLOR, // allowedTypes\n\t\t\t'FIELD_18', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\tfalse, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tnull, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\t// link\n\t\t$config[] = new FieldInfo(\n\t\t\t'field19', // key\n\t\t\tFieldInfo::TYPE_LINK, // allowedTypes\n\t\t\t'FIELD_19', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\tfalse, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\tnull, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tnull, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\t// date\n\t\t$config[] = new FieldInfo(\n\t\t\t'field20', // key\n\t\t\tFieldInfo::TYPE_DATE, // allowedTypes\n\t\t\t'FIELD_20', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\tfalse, // largeContent\n\t\t\t'2012-04-12', // minContentLength\n\t\t\t'2012-04-15', // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tFieldInfo::TYPE_DATE, // defaultType\n\t\t\t'2012-04-12' // defaultContent\n\t\t\t);\n\n\t\t// email\n\t\t$config[] = new FieldInfo(\n\t\t\t'field21', // key\n\t\t\tFieldInfo::TYPE_EMAIL, // allowedTypes\n\t\t\t'FIELD_21', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\ttrue, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\t10, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tnull, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\t// id\n\t\t$config[] = new FieldInfo(\n\t\t\t'field22', // key\n\t\t\tFieldInfo::TYPE_ID, // allowedTypes\n\t\t\t'FIELD_22', // name\n\t\t\tfalse, // array\n\t\t\tfalse, // required\n\t\t\ttrue, // largeContent\n\t\t\tnull, // minContentLength\n\t\t\t10, // maxContentLength\n\t\t\tnull, // auxiliaryInfo\n\t\t\tnull, // defaultType\n\t\t\tnull // defaultContent\n\t\t\t);\n\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "d09dd27dab456dde3c7e99782500ffc3", "score": "0.5255955", "text": "function esb_cie_get_all_post_fields() {\n \n $default_options = array(\n array(\n 'key' => 'post_name',\n 'label' => __( 'Name / Identifier / Slug', 'esbcie' ),\n 'notice' => __( 'Name (slug) for identifing item', 'esbcie' ),\n ),\n array(\n 'key' => 'post_title',\n 'label' => __( 'Title', 'esbcie' ),\n 'notice' => ''\n ),\n array(\n 'key' => 'post_status',\n 'label' => __( 'Status', 'esbcie' ),\n 'notice' => __( 'Available values: <b>draft</b>, <b>publish</b>, <b>pending</b>, <b>future</b>, <b>private</b>. Default value is <b>draft</b>', 'esbcie' )\n ),\n array(\n 'key' => 'post_content',\n 'label' => __( 'Content', 'esbcie' ),\n 'notice' => ''\n ),\n array(\n 'key' => 'post_excerpt',\n 'label' => __( 'Excerpt', 'esbcie' ),\n 'notice' => ''\n ),\n array(\n 'key' => 'post_author',\n 'label' => __( 'Author username', 'esbcie' ),\n 'notice' => __( 'Default author is currently logged user', 'esbcie' )\n ),\n array(\n 'key' => 'post_parent',\n 'label' => __( 'Parent', 'esbcie' ),\n 'notice' => __( 'Name (slug) of parent item if post type support it', 'esbcie' )\n ),\n array(\n 'key' => 'post_date',\n 'label' => __( 'Date', 'esbcie' ),\n 'notice' => __( 'Date in format: <b>Y-m-d H:i:s</b> (e.g. <b>2014-08-20 17:16:18</b>). Default insert current date and time.', 'esbcie' )\n ),\n array(\n 'key' => 'post_image',\n 'label' => __( 'Featured Image', 'esbcie' ),\n 'notice' => __( 'Slug (name) of media file', 'esbcie' )\n ),\n array(\n 'key' => 'comment_status',\n 'label' => __( 'Comment status', 'esbcie' ),\n 'notice' => __( 'Available values: <b>closed</b>, <b>open</b>. Default value is <b>closed</b>', 'esbcie' )\n ),\n array(\n 'key' => 'ping_status',\n 'label' => __( 'Ping status', 'esbcie' ),\n 'notice' => __( 'Available values: <b>closed</b>, <b>open</b>. Default value is <b>closed</b>', 'esbcie' )\n ),\n );\n return $default_options;\n}", "title": "" }, { "docid": "434159677eb42677e4c32abb4a0364ac", "score": "0.52549547", "text": "function configForm() {\n\t\t$content = '';\n\t\t$pageTypes = array();\n\t\t$languages = array();\n\n\t\t$pt = $this->tmpl->setup['types.'];\n\t\tforeach( $pt as $num => $label ) {\n\t\t\tif( $num != $this->tmpl->setup['plugin.']['tx_dkdstaticpublish_pi_xmlmenu.']['type_self'] ) {\n\t\t\t\t$pageTypes[$num] = array(\n\t\t\t\t\t'typeNum' => $num,\n\t\t\t\t\t'label' => sprintf( '%s (%s)', $label, $num ),\n\t\t\t\t\t'selected' => false\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif( is_array( $this->modVars['pageTypes'] ) ) {\n\t\t\tforeach( array_keys( $this->modVars['pageTypes'] ) as $type )\n\t\t\t\t$pageTypes[$type]['selected'] = true;\n\t\t}\n\t\tunset($pt);\n\t\tksort($pageTypes);\n\n\t\t$languages = $this->getLanguagesInDb();\n\t\tif( is_array( $this->modVars['languages'] ) ) {\n\t\t\tforeach( array_keys( $this->modVars['languages'] ) as $langID ) {\n\t\t\t\t$languages[$langID]['sel'] = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\t// config for $this->form_checkBoxes()\n\t\t$conf_pageTypes = array(\n\t\t\t'value' => 'typeNum',\n\t\t\t'label' => 'label',\n\t\t\t'checked' => 'selected'\n\t\t);\n\t\t$conf_languages = array(\n\t\t\t'value' => 'langID',\n\t\t\t'label' => 'langTitle',\n\t\t\t'checked' => 'sel'\n\t\t);\n\t\t$wrap = '<li>%2$s%1$s</li>';\n\t\t\n\t\t$cbName = $this->prefixId.'[pageTypes]';\n\t\t$cb_pageTypes = $this->form_checkBoxes( $cbName, $pageTypes, $conf_pageTypes, $wrap );\n\n\t\t$cbName = $this->prefixId.'[languages]';\n\t\t$cb_languages = $this->form_checkBoxes( $cbName, $languages, $conf_languages, $wrap );\n\n\t\t\t// insert checkboxes into content\n\t\t$cbWrap= '<h4>%s:</h4><ul class=\"selection-list\">%s</ul>';\n\t\t$content .= sprintf( $cbWrap, $GLOBALS['LANG']->getLL( 'header_cbPageTypes' ), $cb_pageTypes );\n\t\t$content .= sprintf( $cbWrap, $GLOBALS['LANG']->getLL( 'header_cbLanguages' ), $cb_languages );\n\t\t\n\t\t$content .= sprintf( '<h4>%s:</h4>', $GLOBALS['LANG']->getLL( 'header_scope' ) );\n\t\t\t// which pages should be published? (single(default), sub, all)\n\t\t$scopes = t3lib_div::trimExplode( ',', 'single, sub, all' );\n\t\tforeach( $scopes as $s ) {\n\t\t\t$scopeOptions[]= array(\n\t\t\t\t'value' => $s,\n\t\t\t\t'label' => $GLOBALS['LANG']->getLL( 'lbl_scope_'. $s ),\n\t\t\t\t'selected' => ( $this->modVars['scope'] == $s )\n\t\t\t);\n\t\t}\n\t\t\t\n\t\t$ddName = $this->prefixId.'[scope]';\n\t\t$content .= $this->form_dropDown($ddName, $scopeOptions);\n\t\t\t// preview selection\n\t\t$content .= $this->showTree( $this->id, $this->modVars['scope'], $this->modVars['maxDepth'] );\n\n\t\t\t// set checkbox to switch to next step\n\t\tif( is_array( $this->modVars['pageTypes'] ) ) {\n\t\t\t$cb_ready = array( 'type' => 'checkbox', 'name' => $this->prefixId.'[ready]' );\n\t\t\t$content .= sprintf(\n\t\t\t\t'<h4>%s</h4><p>%s%s</p>',\n\t\t\t\t$GLOBALS['LANG']->getLL( 'header_ready' ),\n\t\t\t\t$GLOBALS['LANG']->getLL( 'msg_ready' ),\n\t\t\t\t$this->form_input( $cb_ready )\n\t\t\t );\n\t\t}\n\n\t\t$submitButton = array( 'type' => 'submit', 'value' => 'Send' );\n\t\t$content .= '<p>'. $this->form_input( $submitButton ) .'</p>';\n\t\t\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "51ec761ba4fb9ee88e0b3d40e723da2e", "score": "0.5249299", "text": "private function parseFieldsValues()\n {\n $fields = array();\n foreach ($this->fields as $key => $field) {\n if (is_array($field)) {\n $fields[$key] = $this->{$key}->getValue();\n } else {\n $fields[$field] = $this->{$field}->getValue();\n }\n }\n return $fields;\n }", "title": "" }, { "docid": "96bb4e020b506cac4d3b2aa8cdb38dd2", "score": "0.5239424", "text": "public function get_config() {\n return [\n 'fields' => [ 'used' => $this->fields ],\n 'single' => $this->single,\n 'result' => $this->preview,\n 'search' => $this->search,\n 'settings' => $this->settings,\n ];\n\t}", "title": "" }, { "docid": "d65fe0861aae314adfb780ddf76918c7", "score": "0.5238613", "text": "function parse_form($array) {\r\n\r\n// build reserved keyword array\r\n $reserved_keys[] = \"MAX_FILE_SIZE\";\r\n $reserved_keys[] = \"required\";\r\n $reserved_keys[] = \"redirect\";\r\n $reserved_keys[] = \"email\";\r\n $reserved_keys[] = \"require\";\r\n $reserved_keys[] = \"path_to_file\";\r\n $reserved_keys[] = \"recipient\";\r\n $reserved_keys[] = \"subject\";\r\n $reserved_keys[] = \"bgcolor\";\r\n $reserved_keys[] = \"text_color\";\r\n $reserved_keys[] = \"link_color\";\r\n $reserved_keys[] = \"vlink_color\";\r\n $reserved_keys[] = \"alink_color\";\r\n $reserved_keys[] = \"title\";\r\n $reserved_keys[] = \"missing_fields_redirect\";\r\n $reserved_keys[] = \"env_report\";\r\n if (count($array)) {\r\n while (list($key, $val) = each($array)) {\r\n // exclude reserved keywords\r\n $reserved_violation = 0;\r\n for ($ri=0; $ri<count($reserved_keys); $ri++) {\r\n if ($key == $reserved_keys[$ri]) {\r\n $reserved_violation = 1;\r\n }\r\n }\r\n // prepare content\r\n if ($reserved_violation != 1) {\r\n if (is_array($val)) {\r\n for ($z=0;$z<count($val);$z++) {\r\n $content .= \"$key: $val[$z]\\n\";\r\n }\r\n } else {\r\n $content .= \"$key: $val\\n\";\r\n }\r\n }\r\n }\r\n }\r\n return $content;\r\n}", "title": "" }, { "docid": "c17399b8910c9c8f85ca27746857d92a", "score": "0.52369356", "text": "function blockswp_share_block_post_to_attributes( WP_Post $post ){\n\n\n $attributes = blockswp_share_block_get_attributes($post);\n\n $prepared_attributes = array();\n\n foreach ( $attributes as $attribute => $args ){\n $meta_key = blockswp_share_block_prefix_attribute( $attribute );\n $value = $post->$meta_key || 0 == $post->$meta_key ? $post->$meta_key : $args[ 'default' ];\n if( 'boolean' === $args[ 'type' ] ) {\n $value = rest_sanitize_boolean($value);\n }elseif( 'iconSize' === $attribute ){\n $value = 32 <= absint( $value ) && 128 >= absint($value) ? intval($value) : 32;\n } elseif ( 'shareUrl' === $attribute ){\n $value = esc_url( $value );\n } else{\n $value = esc_attr($value);\n }\n\n $prepared_attributes[esc_attr($attribute) ]= $value;\n\n }\n\n return $prepared_attributes;\n\n}", "title": "" }, { "docid": "5d07c1a98d05def1c84c246052b5d4ad", "score": "0.52358454", "text": "public function setSections()\n {\n return [array_keys($this->parseFields($this->fields()))];\n }", "title": "" }, { "docid": "267c302a3d3930dfa51cc2915f305c28", "score": "0.5230808", "text": "public function getFormElementConfig ()\n {\n return array (\n 'factories' => array (\n 'FacebookEvents\\Form\\Element\\Pages' => function ($sm)\n {\n $serviceLocator = $sm->getServiceLocator();\n $service = $serviceLocator->get('FacebookService');\n $element = new \\FacebookEvents\\Form\\Element\\Pages($service);\n return $element;\n },\n )\n );\n }", "title": "" }, { "docid": "894842f22ead4a8a5084e126d2c5387a", "score": "0.5225661", "text": "public static function posted_values($post)\n\t\t{\n\t\t $clean_array = [];\n\n\t\t foreach($post as $key => $value)\n\t\t {\n\t\t $clean_array[$key] = self::sanitize($value);\n\t\t }\n\n\t\t return $clean_array;\n\t\t}", "title": "" } ]
fddf4bae7ae411483e2bc6e4debce07d
Transform the resource into an array.
[ { "docid": "ec1e20cec6942338125c6b6f0c1bf1e1", "score": "0.0", "text": "public function toArray($request)\n {\n return [\n 'id' => $this->id,\n 'country' => $this->country,\n 'expert' => $this->expert,\n 'name' => $this->name,\n 'timezone' => $this->timezone,\n 'working_hours_from' => $this->working_hours_from,\n 'working_hours_to' => $this->working_hours_to,\n 'books' => BookResource::collection($this->books),\n 'approved_books' => ApprovedBookResource::collection($this->approvedBooks)\n\n ];\n }", "title": "" } ]
[ { "docid": "ada33da971ce30c02633d01c3a3207fa", "score": "0.78276706", "text": "public function toArray(): array\n {\n $result = $this->extractProperties();\n\n $eventData = GeneralUtility::makeInstance(ResourceToArray::class, $result);\n $this->dispatcher->dispatch(get_class($this), 'resourceToArray', [$eventData, $this->entity]);\n\n return $eventData->getData();\n }", "title": "" }, { "docid": "82c2d73de83e7de4342b0c01b00908b5", "score": "0.7750167", "text": "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "title": "" }, { "docid": "d34246712e6dfd93701ce76456690b91", "score": "0.75877684", "text": "public function toArray()\n {\n $a = array();\n if ($this->resource) {\n $a[\"resource\"] = $this->resource;\n }\n return $a;\n }", "title": "" }, { "docid": "f1f5b5def4338aee13dc4373460fa7f5", "score": "0.7311407", "text": "public function toArray()\n {\n $r = false;\n\n // Already array\n if(is_array($this->_resource)) {\n $r = $this->_resource;\n \n // String\n } elseif(is_string($this->_resource)) {\n // JSON decode\n if($json = json_decode($this->_resource)) {\n $r = $json;\n // Unserialize\n } elseif($data = unserialize($this->_resource)) {\n $r = $data;\n }\n \n // Object\n } elseif(is_object($this->_resource)) {\n // Call 'toArray' on object\n if(method_exists($this->_resource, 'toArray')) {\n $r = $this->_resource->toArray();\n }\n }\n\n // Ensure we do have an array\n if(!is_array($r)) {\n throw new Exception(\"Resource (\" . gettype($this->_resource) . \") could not be converted to array\");\n }\n\n // Put results in names key\n if(!isset($r['results'])) {\n $r = array('results' => $r);\n }\n\n // Set/add errors, if any\n if($errors = $this->errors()) {\n $r['errors'] = $errors;\n }\n\n return $r;\n }", "title": "" }, { "docid": "ff6e902a8671bc2a65a4d51c273d6af4", "score": "0.7214889", "text": "protected function _getArray() {\n\t\tif($this->isArray($this->_resource)) {\n\t\t\treturn $this->_resource;\n\t\t} else {\n\t\t\treturn include $this->_resource;\n\t\t}\n\t}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7095559", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7095559", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7095559", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70951104", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7095091", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70937836", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70937836", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70937836", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70937836", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70937836", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70937836", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.70937836", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.7093398", "text": "public function toArray() {}", "title": "" }, { "docid": "d9984624778e0a6a4f63837e82d82fca", "score": "0.7077786", "text": "public function toArray()\n {\n return [\n 'id' => $this->getId(),\n 'type' => $this->getType(),\n 'resource' => $this->getResource() ? $this->getResource()->toArray() : null,\n ];\n }", "title": "" }, { "docid": "1e80959291d42c058ea04ec052ce186f", "score": "0.70422477", "text": "public abstract function fetchArray($resource);", "title": "" }, { "docid": "19f5807e7fedabe273a76005cc75db9b", "score": "0.7028052", "text": "public function toArray()\r\n {\r\n $a = array();\r\n if ($this->survivorResource) {\r\n $a[\"survivorResource\"] = $this->survivorResource->toArray();\r\n }\r\n if ($this->duplicateResource) {\r\n $a[\"duplicateResource\"] = $this->duplicateResource->toArray();\r\n }\r\n\r\n return $a;\r\n }", "title": "" }, { "docid": "0b9d3ae5afa0f141642b6c9fe30731d2", "score": "0.695475", "text": "public function toArray($request)\n {\n $resource = $this->resource;\n $response = $resource;\n// $response = parent::toArray($resource);\n return $response;\n }", "title": "" }, { "docid": "b0c9792bbdc83c6f6a71783154481ff3", "score": "0.6892642", "text": "public function fetch_array($resource) {}", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.688961", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.688961", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.688961", "text": "public function asArray();", "title": "" }, { "docid": "ee31c8db8468dad322d18a74745d845f", "score": "0.68718195", "text": "public function toArray()\n {\n $resourceArray = $this->getResourceArray();\n\n foreach (array_keys($resourceArray) as $key) {\n $resourceArray[Str::snake($key)] = $this->getPresenterAttribute($key, $resourceArray);\n }\n\n return $resourceArray;\n }", "title": "" }, { "docid": "e862f23255f09072df83b1f0c23a4d4b", "score": "0.68641156", "text": "public function toArray() {\n\t\treturn is_array($this->source) ? $this->source : array($this->source);\n\t}", "title": "" }, { "docid": "7c0cad5691b755932060a73ee355f459", "score": "0.6860436", "text": "public function toArray()\n {\n if (empty($this->_data)) {\n $this->process();\n }\n\n return $this->_data;\n }", "title": "" }, { "docid": "1dd5492b92823f1ecb0e190f6b96f48d", "score": "0.6859692", "text": "public function toArray() : array {}", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "58e92c5cfdabe669dbe8f6326213f9a6", "score": "0.68506885", "text": "public function toArray();", "title": "" }, { "docid": "231e885591a76214ad04dff9dd20c067", "score": "0.6835096", "text": "public function resourceToArray(JsonResource $resource): array\n {\n return json_decode($resource->toJson(), 1);\n }", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.6833758", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.6833758", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.6833758", "text": "public abstract function toArray();", "title": "" }, { "docid": "cefecf1b400173ef4dde2f9a646d058a", "score": "0.6797756", "text": "public function toArray(): array\n {\n return [\n 'ProxyPort' => '',\n \"Msg\" => \"\",\n \"ActiveProxy\" => false,\n \"ProxyIP\" => \"\",\n \"Data\" => [\n 'genres' => Arr::get($this->resource, 'genres', []),\n 'alt' => Arr::get($this->resource, 'alt', ''),\n 'images_medium' => Arr::get($this->resource, 'images_medium', ''),\n 'directors' => [],\n 'images_large' => Arr::get($this->resource, 'images_large', ''),\n 'original_title' => Arr::get($this->resource, 'original_title', []),\n 'id' => Arr::get($this->resource, 'alt', ''),\n 'summary' => Arr::get($this->resource, 'summary', ''),\n 'title' => Arr::get($this->resource, 'title', ''),\n 'countries' => [\n '日本'\n ],\n 'rating' => Arr::get($this->resource, 'rating', ''),\n 'year' => Arr::get($this->resource, 'year', ''),\n 'casts' => Arr::get($this->resource, 'casts', []),\n 'number' => Arr::get($this->resource, 'number', ''),\n 'images_content' => Arr::get($this->resource, 'images_content', []),\n 'favorites' => Arr::get($this->resource, 'favorites', 0)\n ]\n ];\n }", "title": "" }, { "docid": "63ad6aec2b81d5d248aa90745c8176bf", "score": "0.6782203", "text": "public function toArray()\r\n {\r\n }", "title": "" }, { "docid": "7efad91c2502fd48ffca26587565fdd6", "score": "0.67806184", "text": "public function convert(): array;", "title": "" }, { "docid": "7dea268fcd502a79b41367a889f8e347", "score": "0.6765623", "text": "public function getAsArray()\n {\n return json_decode($this->getContent(), true);\n }", "title": "" }, { "docid": "0123d65ffafecd79ca4ce11f2bcfaeca", "score": "0.6757187", "text": "public function make_resource_array($resource) {\n $resource_type = strpos($resource, '_:' ) === 0 ? 'bnode' : 'uri';\n return array('type' => $resource_type, 'value' => $resource);\n }", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.67444956", "text": "function toArray() ;", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.6744461", "text": "function toArray() ;", "title": "" }, { "docid": "59ba1bc641c65ea317ec1bb9281db297", "score": "0.67354226", "text": "public function convertItemArray() {}", "title": "" }, { "docid": "8f41046d031b261f30fa06bc5816089b", "score": "0.67273384", "text": "public function toArray() {\n return (array) $this->_data;\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.6723589", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.6723589", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "f2a9ea38b2041450bfe04b738c90c037", "score": "0.6723589", "text": "public function toArray()\n {\n }", "title": "" }, { "docid": "1d0063193c8b68f9eea95f7bddc182c6", "score": "0.670049", "text": "public function transform($resource)\n {\n return [\n 'id' => $resource->id,\n 'category_id' => $resource->category_id,\n 'field_id' => $resource->field_id,\n 'field_sname' => $resource->fields->field_sname,\n 'field_cname' => $resource->fields->field_cname,\n 'require1' => $resource->require1,\n 'require2' => $resource->require2,\n 'require3' => $resource->require3,\n 'require5' => $resource->require5,\n 'is_show' => $resource->is_show,\n ];\n }", "title": "" }, { "docid": "6de7005223b5a580e9a53723640dd932", "score": "0.6685996", "text": "protected function executeResourceTransformers()\n {\n $data = $this->resource->getData();\n\n if (null === $data || is_array($data)) {\n return [$data, []];\n }\n\n return parent::executeResourceTransformers();\n }", "title": "" }, { "docid": "b785c66e3b5728015e19ec18f830e533", "score": "0.6684943", "text": "public function toArray($request)\n {\n return $this->resource->toArray();\n }", "title": "" }, { "docid": "02bd9782c7bfaacd4c61c6192b3d4b96", "score": "0.66765124", "text": "public function __toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6646621", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6646621", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6646621", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6646621", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6646621", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.6646621", "text": "abstract public function toArray();", "title": "" }, { "docid": "7834d009f895152560449aededf95af9", "score": "0.6640558", "text": "public function toArray() : array\n {\n\n return $this->data;\n\n }", "title": "" }, { "docid": "64cdaf9420b06be5e234ce81d4b8403d", "score": "0.6639262", "text": "public function toArray()\n {\n return $this->array ?: ($this->array = $this->response->toArray());\n }", "title": "" }, { "docid": "7b1beb2c9b7810b7114be919b2cbdd9c", "score": "0.66353935", "text": "public function toArray(): array {\n\t\t\treturn $this->arrayResponse();\n\t\t}", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.6626979", "text": "public function toArray(): array;", "title": "" } ]